google_cloud_edgecontainer_v1/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gax;
23extern crate gaxi;
24extern crate lazy_static;
25extern crate location;
26extern crate longrunning;
27extern crate lro;
28extern crate reqwest;
29extern crate rpc;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37/// A Google Distributed Cloud Edge Kubernetes cluster.
38#[serde_with::serde_as]
39#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
40#[serde(default, rename_all = "camelCase")]
41#[non_exhaustive]
42pub struct Cluster {
43    /// Required. The resource name of the cluster.
44    #[serde(skip_serializing_if = "std::string::String::is_empty")]
45    pub name: std::string::String,
46
47    /// Output only. The time when the cluster was created.
48    #[serde(skip_serializing_if = "std::option::Option::is_none")]
49    pub create_time: std::option::Option<wkt::Timestamp>,
50
51    /// Output only. The time when the cluster was last updated.
52    #[serde(skip_serializing_if = "std::option::Option::is_none")]
53    pub update_time: std::option::Option<wkt::Timestamp>,
54
55    /// Labels associated with this resource.
56    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
57    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
58
59    /// Required. Fleet configuration.
60    #[serde(skip_serializing_if = "std::option::Option::is_none")]
61    pub fleet: std::option::Option<crate::model::Fleet>,
62
63    /// Required. Cluster-wide networking configuration.
64    #[serde(skip_serializing_if = "std::option::Option::is_none")]
65    pub networking: std::option::Option<crate::model::ClusterNetworking>,
66
67    /// Required. Immutable. RBAC policy that will be applied and managed by GEC.
68    #[serde(skip_serializing_if = "std::option::Option::is_none")]
69    pub authorization: std::option::Option<crate::model::Authorization>,
70
71    /// Optional. The default maximum number of pods per node used if a maximum
72    /// value is not specified explicitly for a node pool in this cluster. If
73    /// unspecified, the Kubernetes default value will be used.
74    #[serde(skip_serializing_if = "wkt::internal::is_default")]
75    pub default_max_pods_per_node: i32,
76
77    /// Output only. The IP address of the Kubernetes API server.
78    #[serde(skip_serializing_if = "std::string::String::is_empty")]
79    pub endpoint: std::string::String,
80
81    /// Output only. The port number of the Kubernetes API server.
82    #[serde(skip_serializing_if = "wkt::internal::is_default")]
83    pub port: i32,
84
85    /// Output only. The PEM-encoded public certificate of the cluster's CA.
86    #[serde(skip_serializing_if = "std::string::String::is_empty")]
87    pub cluster_ca_certificate: std::string::String,
88
89    /// Optional. Cluster-wide maintenance policy configuration.
90    #[serde(skip_serializing_if = "std::option::Option::is_none")]
91    pub maintenance_policy: std::option::Option<crate::model::MaintenancePolicy>,
92
93    /// Output only. The control plane release version
94    #[serde(skip_serializing_if = "std::string::String::is_empty")]
95    pub control_plane_version: std::string::String,
96
97    /// Output only. The lowest release version among all worker nodes. This field
98    /// can be empty if the cluster does not have any worker nodes.
99    #[serde(skip_serializing_if = "std::string::String::is_empty")]
100    pub node_version: std::string::String,
101
102    /// Optional. The configuration of the cluster control plane.
103    #[serde(skip_serializing_if = "std::option::Option::is_none")]
104    pub control_plane: std::option::Option<crate::model::cluster::ControlPlane>,
105
106    /// Optional. The configuration of the system add-ons.
107    #[serde(skip_serializing_if = "std::option::Option::is_none")]
108    pub system_addons_config: std::option::Option<crate::model::cluster::SystemAddonsConfig>,
109
110    /// Optional. IPv4 address pools for cluster data plane external load
111    /// balancing.
112    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
113    pub external_load_balancer_ipv4_address_pools: std::vec::Vec<std::string::String>,
114
115    /// Optional. Remote control plane disk encryption options. This field is only
116    /// used when enabling CMEK support.
117    #[serde(skip_serializing_if = "std::option::Option::is_none")]
118    pub control_plane_encryption:
119        std::option::Option<crate::model::cluster::ControlPlaneEncryption>,
120
121    /// Output only. The current status of the cluster.
122    pub status: crate::model::cluster::Status,
123
124    /// Output only. All the maintenance events scheduled for the cluster,
125    /// including the ones ongoing, planned for the future and done in the past (up
126    /// to 90 days).
127    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
128    pub maintenance_events: std::vec::Vec<crate::model::cluster::MaintenanceEvent>,
129
130    /// Optional. The target cluster version. For example: "1.5.0".
131    #[serde(skip_serializing_if = "std::string::String::is_empty")]
132    pub target_version: std::string::String,
133
134    /// Optional. The release channel a cluster is subscribed to.
135    pub release_channel: crate::model::cluster::ReleaseChannel,
136
137    /// Optional. Configuration of the cluster survivability, e.g., for the case
138    /// when network connectivity is lost. Note: This only applies to local control
139    /// plane clusters.
140    #[serde(skip_serializing_if = "std::option::Option::is_none")]
141    pub survivability_config: std::option::Option<crate::model::cluster::SurvivabilityConfig>,
142
143    /// Optional. IPv6 address pools for cluster data plane external load
144    /// balancing.
145    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
146    pub external_load_balancer_ipv6_address_pools: std::vec::Vec<std::string::String>,
147
148    /// Output only. The current connection state of the cluster.
149    #[serde(skip_serializing_if = "std::option::Option::is_none")]
150    pub connection_state: std::option::Option<crate::model::cluster::ConnectionState>,
151
152    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
153    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
154}
155
156impl Cluster {
157    pub fn new() -> Self {
158        std::default::Default::default()
159    }
160
161    /// Sets the value of [name][crate::model::Cluster::name].
162    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
163        self.name = v.into();
164        self
165    }
166
167    /// Sets the value of [create_time][crate::model::Cluster::create_time].
168    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
169        mut self,
170        v: T,
171    ) -> Self {
172        self.create_time = v.into();
173        self
174    }
175
176    /// Sets the value of [update_time][crate::model::Cluster::update_time].
177    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
178        mut self,
179        v: T,
180    ) -> Self {
181        self.update_time = v.into();
182        self
183    }
184
185    /// Sets the value of [labels][crate::model::Cluster::labels].
186    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
187    where
188        T: std::iter::IntoIterator<Item = (K, V)>,
189        K: std::convert::Into<std::string::String>,
190        V: std::convert::Into<std::string::String>,
191    {
192        use std::iter::Iterator;
193        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
194        self
195    }
196
197    /// Sets the value of [fleet][crate::model::Cluster::fleet].
198    pub fn set_fleet<T: std::convert::Into<std::option::Option<crate::model::Fleet>>>(
199        mut self,
200        v: T,
201    ) -> Self {
202        self.fleet = v.into();
203        self
204    }
205
206    /// Sets the value of [networking][crate::model::Cluster::networking].
207    pub fn set_networking<
208        T: std::convert::Into<std::option::Option<crate::model::ClusterNetworking>>,
209    >(
210        mut self,
211        v: T,
212    ) -> Self {
213        self.networking = v.into();
214        self
215    }
216
217    /// Sets the value of [authorization][crate::model::Cluster::authorization].
218    pub fn set_authorization<
219        T: std::convert::Into<std::option::Option<crate::model::Authorization>>,
220    >(
221        mut self,
222        v: T,
223    ) -> Self {
224        self.authorization = v.into();
225        self
226    }
227
228    /// Sets the value of [default_max_pods_per_node][crate::model::Cluster::default_max_pods_per_node].
229    pub fn set_default_max_pods_per_node<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
230        self.default_max_pods_per_node = v.into();
231        self
232    }
233
234    /// Sets the value of [endpoint][crate::model::Cluster::endpoint].
235    pub fn set_endpoint<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
236        self.endpoint = v.into();
237        self
238    }
239
240    /// Sets the value of [port][crate::model::Cluster::port].
241    pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
242        self.port = v.into();
243        self
244    }
245
246    /// Sets the value of [cluster_ca_certificate][crate::model::Cluster::cluster_ca_certificate].
247    pub fn set_cluster_ca_certificate<T: std::convert::Into<std::string::String>>(
248        mut self,
249        v: T,
250    ) -> Self {
251        self.cluster_ca_certificate = v.into();
252        self
253    }
254
255    /// Sets the value of [maintenance_policy][crate::model::Cluster::maintenance_policy].
256    pub fn set_maintenance_policy<
257        T: std::convert::Into<std::option::Option<crate::model::MaintenancePolicy>>,
258    >(
259        mut self,
260        v: T,
261    ) -> Self {
262        self.maintenance_policy = v.into();
263        self
264    }
265
266    /// Sets the value of [control_plane_version][crate::model::Cluster::control_plane_version].
267    pub fn set_control_plane_version<T: std::convert::Into<std::string::String>>(
268        mut self,
269        v: T,
270    ) -> Self {
271        self.control_plane_version = v.into();
272        self
273    }
274
275    /// Sets the value of [node_version][crate::model::Cluster::node_version].
276    pub fn set_node_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
277        self.node_version = v.into();
278        self
279    }
280
281    /// Sets the value of [control_plane][crate::model::Cluster::control_plane].
282    pub fn set_control_plane<
283        T: std::convert::Into<std::option::Option<crate::model::cluster::ControlPlane>>,
284    >(
285        mut self,
286        v: T,
287    ) -> Self {
288        self.control_plane = v.into();
289        self
290    }
291
292    /// Sets the value of [system_addons_config][crate::model::Cluster::system_addons_config].
293    pub fn set_system_addons_config<
294        T: std::convert::Into<std::option::Option<crate::model::cluster::SystemAddonsConfig>>,
295    >(
296        mut self,
297        v: T,
298    ) -> Self {
299        self.system_addons_config = v.into();
300        self
301    }
302
303    /// Sets the value of [external_load_balancer_ipv4_address_pools][crate::model::Cluster::external_load_balancer_ipv4_address_pools].
304    pub fn set_external_load_balancer_ipv4_address_pools<T, V>(mut self, v: T) -> Self
305    where
306        T: std::iter::IntoIterator<Item = V>,
307        V: std::convert::Into<std::string::String>,
308    {
309        use std::iter::Iterator;
310        self.external_load_balancer_ipv4_address_pools = v.into_iter().map(|i| i.into()).collect();
311        self
312    }
313
314    /// Sets the value of [control_plane_encryption][crate::model::Cluster::control_plane_encryption].
315    pub fn set_control_plane_encryption<
316        T: std::convert::Into<std::option::Option<crate::model::cluster::ControlPlaneEncryption>>,
317    >(
318        mut self,
319        v: T,
320    ) -> Self {
321        self.control_plane_encryption = v.into();
322        self
323    }
324
325    /// Sets the value of [status][crate::model::Cluster::status].
326    pub fn set_status<T: std::convert::Into<crate::model::cluster::Status>>(
327        mut self,
328        v: T,
329    ) -> Self {
330        self.status = v.into();
331        self
332    }
333
334    /// Sets the value of [maintenance_events][crate::model::Cluster::maintenance_events].
335    pub fn set_maintenance_events<T, V>(mut self, v: T) -> Self
336    where
337        T: std::iter::IntoIterator<Item = V>,
338        V: std::convert::Into<crate::model::cluster::MaintenanceEvent>,
339    {
340        use std::iter::Iterator;
341        self.maintenance_events = v.into_iter().map(|i| i.into()).collect();
342        self
343    }
344
345    /// Sets the value of [target_version][crate::model::Cluster::target_version].
346    pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
347        self.target_version = v.into();
348        self
349    }
350
351    /// Sets the value of [release_channel][crate::model::Cluster::release_channel].
352    pub fn set_release_channel<T: std::convert::Into<crate::model::cluster::ReleaseChannel>>(
353        mut self,
354        v: T,
355    ) -> Self {
356        self.release_channel = v.into();
357        self
358    }
359
360    /// Sets the value of [survivability_config][crate::model::Cluster::survivability_config].
361    pub fn set_survivability_config<
362        T: std::convert::Into<std::option::Option<crate::model::cluster::SurvivabilityConfig>>,
363    >(
364        mut self,
365        v: T,
366    ) -> Self {
367        self.survivability_config = v.into();
368        self
369    }
370
371    /// Sets the value of [external_load_balancer_ipv6_address_pools][crate::model::Cluster::external_load_balancer_ipv6_address_pools].
372    pub fn set_external_load_balancer_ipv6_address_pools<T, V>(mut self, v: T) -> Self
373    where
374        T: std::iter::IntoIterator<Item = V>,
375        V: std::convert::Into<std::string::String>,
376    {
377        use std::iter::Iterator;
378        self.external_load_balancer_ipv6_address_pools = v.into_iter().map(|i| i.into()).collect();
379        self
380    }
381
382    /// Sets the value of [connection_state][crate::model::Cluster::connection_state].
383    pub fn set_connection_state<
384        T: std::convert::Into<std::option::Option<crate::model::cluster::ConnectionState>>,
385    >(
386        mut self,
387        v: T,
388    ) -> Self {
389        self.connection_state = v.into();
390        self
391    }
392}
393
394impl wkt::message::Message for Cluster {
395    fn typename() -> &'static str {
396        "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster"
397    }
398}
399
400/// Defines additional types related to [Cluster].
401pub mod cluster {
402    #[allow(unused_imports)]
403    use super::*;
404
405    /// Configuration of the cluster control plane.
406    #[serde_with::serde_as]
407    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
408    #[serde(default, rename_all = "camelCase")]
409    #[non_exhaustive]
410    pub struct ControlPlane {
411        #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
412        pub config: std::option::Option<crate::model::cluster::control_plane::Config>,
413
414        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
415        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
416    }
417
418    impl ControlPlane {
419        pub fn new() -> Self {
420            std::default::Default::default()
421        }
422
423        /// Sets the value of [config][crate::model::cluster::ControlPlane::config].
424        ///
425        /// Note that all the setters affecting `config` are mutually
426        /// exclusive.
427        pub fn set_config<
428            T: std::convert::Into<std::option::Option<crate::model::cluster::control_plane::Config>>,
429        >(
430            mut self,
431            v: T,
432        ) -> Self {
433            self.config = v.into();
434            self
435        }
436
437        /// The value of [config][crate::model::cluster::ControlPlane::config]
438        /// if it holds a `Remote`, `None` if the field is not set or
439        /// holds a different branch.
440        pub fn remote(
441            &self,
442        ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::control_plane::Remote>>
443        {
444            #[allow(unreachable_patterns)]
445            self.config.as_ref().and_then(|v| match v {
446                crate::model::cluster::control_plane::Config::Remote(v) => {
447                    std::option::Option::Some(v)
448                }
449                _ => std::option::Option::None,
450            })
451        }
452
453        /// Sets the value of [config][crate::model::cluster::ControlPlane::config]
454        /// to hold a `Remote`.
455        ///
456        /// Note that all the setters affecting `config` are
457        /// mutually exclusive.
458        pub fn set_remote<
459            T: std::convert::Into<std::boxed::Box<crate::model::cluster::control_plane::Remote>>,
460        >(
461            mut self,
462            v: T,
463        ) -> Self {
464            self.config = std::option::Option::Some(
465                crate::model::cluster::control_plane::Config::Remote(v.into()),
466            );
467            self
468        }
469
470        /// The value of [config][crate::model::cluster::ControlPlane::config]
471        /// if it holds a `Local`, `None` if the field is not set or
472        /// holds a different branch.
473        pub fn local(
474            &self,
475        ) -> std::option::Option<&std::boxed::Box<crate::model::cluster::control_plane::Local>>
476        {
477            #[allow(unreachable_patterns)]
478            self.config.as_ref().and_then(|v| match v {
479                crate::model::cluster::control_plane::Config::Local(v) => {
480                    std::option::Option::Some(v)
481                }
482                _ => std::option::Option::None,
483            })
484        }
485
486        /// Sets the value of [config][crate::model::cluster::ControlPlane::config]
487        /// to hold a `Local`.
488        ///
489        /// Note that all the setters affecting `config` are
490        /// mutually exclusive.
491        pub fn set_local<
492            T: std::convert::Into<std::boxed::Box<crate::model::cluster::control_plane::Local>>,
493        >(
494            mut self,
495            v: T,
496        ) -> Self {
497            self.config = std::option::Option::Some(
498                crate::model::cluster::control_plane::Config::Local(v.into()),
499            );
500            self
501        }
502    }
503
504    impl wkt::message::Message for ControlPlane {
505        fn typename() -> &'static str {
506            "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlane"
507        }
508    }
509
510    /// Defines additional types related to [ControlPlane].
511    pub mod control_plane {
512        #[allow(unused_imports)]
513        use super::*;
514
515        /// Configuration specific to clusters with a control plane hosted remotely.
516        #[serde_with::serde_as]
517        #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
518        #[serde(default, rename_all = "camelCase")]
519        #[non_exhaustive]
520        pub struct Remote {
521            #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
522            _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
523        }
524
525        impl Remote {
526            pub fn new() -> Self {
527                std::default::Default::default()
528            }
529        }
530
531        impl wkt::message::Message for Remote {
532            fn typename() -> &'static str {
533                "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlane.Remote"
534            }
535        }
536
537        /// Configuration specific to clusters with a control plane hosted locally.
538        ///
539        /// Warning: Local control plane clusters must be created in their own
540        /// project. Local control plane clusters cannot coexist in the same
541        /// project with any other type of clusters, including non-GDCE clusters.
542        /// Mixing local control plane GDCE clusters with any other type of
543        /// clusters in the same project can result in data loss.
544        #[serde_with::serde_as]
545        #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
546        #[serde(default, rename_all = "camelCase")]
547        #[non_exhaustive]
548        pub struct Local {
549            /// Name of the Google Distributed Cloud Edge zones where this node pool
550            /// will be created. For example: `us-central1-edge-customer-a`.
551            #[serde(skip_serializing_if = "std::string::String::is_empty")]
552            pub node_location: std::string::String,
553
554            /// The number of nodes to serve as replicas of the Control Plane.
555            #[serde(skip_serializing_if = "wkt::internal::is_default")]
556            pub node_count: i32,
557
558            /// Only machines matching this filter will be allowed to host control
559            /// plane nodes. The filtering language accepts strings like "name=\<name\>",
560            /// and is documented here: [AIP-160](https://google.aip.dev/160).
561            #[serde(skip_serializing_if = "std::string::String::is_empty")]
562            pub machine_filter: std::string::String,
563
564            /// Policy configuration about how user applications are deployed.
565            pub shared_deployment_policy:
566                crate::model::cluster::control_plane::SharedDeploymentPolicy,
567
568            /// Optional. Name for the storage schema of control plane nodes.
569            ///
570            /// Warning: Configurable node local storage schema feature is an
571            /// experimental feature, and is not recommended for general use
572            /// in production clusters/nodepools.
573            #[serde(skip_serializing_if = "std::string::String::is_empty")]
574            pub control_plane_node_storage_schema: std::string::String,
575
576            #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
577            _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
578        }
579
580        impl Local {
581            pub fn new() -> Self {
582                std::default::Default::default()
583            }
584
585            /// Sets the value of [node_location][crate::model::cluster::control_plane::Local::node_location].
586            pub fn set_node_location<T: std::convert::Into<std::string::String>>(
587                mut self,
588                v: T,
589            ) -> Self {
590                self.node_location = v.into();
591                self
592            }
593
594            /// Sets the value of [node_count][crate::model::cluster::control_plane::Local::node_count].
595            pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
596                self.node_count = v.into();
597                self
598            }
599
600            /// Sets the value of [machine_filter][crate::model::cluster::control_plane::Local::machine_filter].
601            pub fn set_machine_filter<T: std::convert::Into<std::string::String>>(
602                mut self,
603                v: T,
604            ) -> Self {
605                self.machine_filter = v.into();
606                self
607            }
608
609            /// Sets the value of [shared_deployment_policy][crate::model::cluster::control_plane::Local::shared_deployment_policy].
610            pub fn set_shared_deployment_policy<
611                T: std::convert::Into<crate::model::cluster::control_plane::SharedDeploymentPolicy>,
612            >(
613                mut self,
614                v: T,
615            ) -> Self {
616                self.shared_deployment_policy = v.into();
617                self
618            }
619
620            /// Sets the value of [control_plane_node_storage_schema][crate::model::cluster::control_plane::Local::control_plane_node_storage_schema].
621            pub fn set_control_plane_node_storage_schema<
622                T: std::convert::Into<std::string::String>,
623            >(
624                mut self,
625                v: T,
626            ) -> Self {
627                self.control_plane_node_storage_schema = v.into();
628                self
629            }
630        }
631
632        impl wkt::message::Message for Local {
633            fn typename() -> &'static str {
634                "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlane.Local"
635            }
636        }
637
638        /// Represents the policy configuration about how user applications are
639        /// deployed.
640        ///
641        /// # Working with unknown values
642        ///
643        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
644        /// additional enum variants at any time. Adding new variants is not considered
645        /// a breaking change. Applications should write their code in anticipation of:
646        ///
647        /// - New values appearing in future releases of the client library, **and**
648        /// - New values received dynamically, without application changes.
649        ///
650        /// Please consult the [Working with enums] section in the user guide for some
651        /// guidelines.
652        ///
653        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
654        #[derive(Clone, Debug, PartialEq)]
655        #[non_exhaustive]
656        pub enum SharedDeploymentPolicy {
657            /// Unspecified.
658            Unspecified,
659            /// User applications can be deployed both on control plane and worker
660            /// nodes.
661            Allowed,
662            /// User applications can not be deployed on control plane nodes and can
663            /// only be deployed on worker nodes.
664            Disallowed,
665            /// If set, the enum was initialized with an unknown value.
666            ///
667            /// Applications can examine the value using [SharedDeploymentPolicy::value] or
668            /// [SharedDeploymentPolicy::name].
669            UnknownValue(shared_deployment_policy::UnknownValue),
670        }
671
672        #[doc(hidden)]
673        pub mod shared_deployment_policy {
674            #[allow(unused_imports)]
675            use super::*;
676            #[derive(Clone, Debug, PartialEq)]
677            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
678        }
679
680        impl SharedDeploymentPolicy {
681            /// Gets the enum value.
682            ///
683            /// Returns `None` if the enum contains an unknown value deserialized from
684            /// the string representation of enums.
685            pub fn value(&self) -> std::option::Option<i32> {
686                match self {
687                    Self::Unspecified => std::option::Option::Some(0),
688                    Self::Allowed => std::option::Option::Some(1),
689                    Self::Disallowed => std::option::Option::Some(2),
690                    Self::UnknownValue(u) => u.0.value(),
691                }
692            }
693
694            /// Gets the enum value as a string.
695            ///
696            /// Returns `None` if the enum contains an unknown value deserialized from
697            /// the integer representation of enums.
698            pub fn name(&self) -> std::option::Option<&str> {
699                match self {
700                    Self::Unspecified => {
701                        std::option::Option::Some("SHARED_DEPLOYMENT_POLICY_UNSPECIFIED")
702                    }
703                    Self::Allowed => std::option::Option::Some("ALLOWED"),
704                    Self::Disallowed => std::option::Option::Some("DISALLOWED"),
705                    Self::UnknownValue(u) => u.0.name(),
706                }
707            }
708        }
709
710        impl std::default::Default for SharedDeploymentPolicy {
711            fn default() -> Self {
712                use std::convert::From;
713                Self::from(0)
714            }
715        }
716
717        impl std::fmt::Display for SharedDeploymentPolicy {
718            fn fmt(
719                &self,
720                f: &mut std::fmt::Formatter<'_>,
721            ) -> std::result::Result<(), std::fmt::Error> {
722                wkt::internal::display_enum(f, self.name(), self.value())
723            }
724        }
725
726        impl std::convert::From<i32> for SharedDeploymentPolicy {
727            fn from(value: i32) -> Self {
728                match value {
729                    0 => Self::Unspecified,
730                    1 => Self::Allowed,
731                    2 => Self::Disallowed,
732                    _ => Self::UnknownValue(shared_deployment_policy::UnknownValue(
733                        wkt::internal::UnknownEnumValue::Integer(value),
734                    )),
735                }
736            }
737        }
738
739        impl std::convert::From<&str> for SharedDeploymentPolicy {
740            fn from(value: &str) -> Self {
741                use std::string::ToString;
742                match value {
743                    "SHARED_DEPLOYMENT_POLICY_UNSPECIFIED" => Self::Unspecified,
744                    "ALLOWED" => Self::Allowed,
745                    "DISALLOWED" => Self::Disallowed,
746                    _ => Self::UnknownValue(shared_deployment_policy::UnknownValue(
747                        wkt::internal::UnknownEnumValue::String(value.to_string()),
748                    )),
749                }
750            }
751        }
752
753        impl serde::ser::Serialize for SharedDeploymentPolicy {
754            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
755            where
756                S: serde::Serializer,
757            {
758                match self {
759                    Self::Unspecified => serializer.serialize_i32(0),
760                    Self::Allowed => serializer.serialize_i32(1),
761                    Self::Disallowed => serializer.serialize_i32(2),
762                    Self::UnknownValue(u) => u.0.serialize(serializer),
763                }
764            }
765        }
766
767        impl<'de> serde::de::Deserialize<'de> for SharedDeploymentPolicy {
768            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
769            where
770                D: serde::Deserializer<'de>,
771            {
772                deserializer.deserialize_any(wkt::internal::EnumVisitor::<SharedDeploymentPolicy>::new(
773                    ".google.cloud.edgecontainer.v1.Cluster.ControlPlane.SharedDeploymentPolicy"))
774            }
775        }
776
777        #[serde_with::serde_as]
778        #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
779        #[serde(rename_all = "camelCase")]
780        #[non_exhaustive]
781        pub enum Config {
782            /// Remote control plane configuration.
783            Remote(std::boxed::Box<crate::model::cluster::control_plane::Remote>),
784            /// Local control plane configuration.
785            ///
786            /// Warning: Local control plane clusters must be created in their own
787            /// project. Local control plane clusters cannot coexist in the same
788            /// project with any other type of clusters, including non-GDCE clusters.
789            /// Mixing local control plane GDCE clusters with any other type of
790            /// clusters in the same project can result in data loss.
791            Local(std::boxed::Box<crate::model::cluster::control_plane::Local>),
792        }
793    }
794
795    /// Config that customers are allowed to define for GDCE system add-ons.
796    #[serde_with::serde_as]
797    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
798    #[serde(default, rename_all = "camelCase")]
799    #[non_exhaustive]
800    pub struct SystemAddonsConfig {
801        /// Optional. Config for Ingress.
802        #[serde(skip_serializing_if = "std::option::Option::is_none")]
803        pub ingress: std::option::Option<crate::model::cluster::system_addons_config::Ingress>,
804
805        /// Optional. Config for VM Service.
806        #[serde(skip_serializing_if = "std::option::Option::is_none")]
807        pub vm_service_config:
808            std::option::Option<crate::model::cluster::system_addons_config::VMServiceConfig>,
809
810        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
811        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
812    }
813
814    impl SystemAddonsConfig {
815        pub fn new() -> Self {
816            std::default::Default::default()
817        }
818
819        /// Sets the value of [ingress][crate::model::cluster::SystemAddonsConfig::ingress].
820        pub fn set_ingress<
821            T: std::convert::Into<
822                    std::option::Option<crate::model::cluster::system_addons_config::Ingress>,
823                >,
824        >(
825            mut self,
826            v: T,
827        ) -> Self {
828            self.ingress = v.into();
829            self
830        }
831
832        /// Sets the value of [vm_service_config][crate::model::cluster::SystemAddonsConfig::vm_service_config].
833        pub fn set_vm_service_config<
834            T: std::convert::Into<
835                    std::option::Option<
836                        crate::model::cluster::system_addons_config::VMServiceConfig,
837                    >,
838                >,
839        >(
840            mut self,
841            v: T,
842        ) -> Self {
843            self.vm_service_config = v.into();
844            self
845        }
846    }
847
848    impl wkt::message::Message for SystemAddonsConfig {
849        fn typename() -> &'static str {
850            "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SystemAddonsConfig"
851        }
852    }
853
854    /// Defines additional types related to [SystemAddonsConfig].
855    pub mod system_addons_config {
856        #[allow(unused_imports)]
857        use super::*;
858
859        /// Config for the Ingress add-on which allows customers to create an Ingress
860        /// object to manage external access to the servers in a cluster. The add-on
861        /// consists of istiod and istio-ingress.
862        #[serde_with::serde_as]
863        #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
864        #[serde(default, rename_all = "camelCase")]
865        #[non_exhaustive]
866        pub struct Ingress {
867            /// Optional. Whether Ingress is disabled.
868            #[serde(skip_serializing_if = "wkt::internal::is_default")]
869            pub disabled: bool,
870
871            /// Optional. Ingress VIP.
872            #[serde(skip_serializing_if = "std::string::String::is_empty")]
873            pub ipv4_vip: std::string::String,
874
875            #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
876            _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
877        }
878
879        impl Ingress {
880            pub fn new() -> Self {
881                std::default::Default::default()
882            }
883
884            /// Sets the value of [disabled][crate::model::cluster::system_addons_config::Ingress::disabled].
885            pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
886                self.disabled = v.into();
887                self
888            }
889
890            /// Sets the value of [ipv4_vip][crate::model::cluster::system_addons_config::Ingress::ipv4_vip].
891            pub fn set_ipv4_vip<T: std::convert::Into<std::string::String>>(
892                mut self,
893                v: T,
894            ) -> Self {
895                self.ipv4_vip = v.into();
896                self
897            }
898        }
899
900        impl wkt::message::Message for Ingress {
901            fn typename() -> &'static str {
902                "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SystemAddonsConfig.Ingress"
903            }
904        }
905
906        /// VMServiceConfig defines the configuration for GDCE VM Service.
907        #[serde_with::serde_as]
908        #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
909        #[serde(default, rename_all = "camelCase")]
910        #[non_exhaustive]
911        pub struct VMServiceConfig {
912            /// Optional. Whether VMM is enabled.
913            #[serde(skip_serializing_if = "wkt::internal::is_default")]
914            pub vmm_enabled: bool,
915
916            #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
917            _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
918        }
919
920        impl VMServiceConfig {
921            pub fn new() -> Self {
922                std::default::Default::default()
923            }
924
925            /// Sets the value of [vmm_enabled][crate::model::cluster::system_addons_config::VMServiceConfig::vmm_enabled].
926            pub fn set_vmm_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
927                self.vmm_enabled = v.into();
928                self
929            }
930        }
931
932        impl wkt::message::Message for VMServiceConfig {
933            fn typename() -> &'static str {
934                "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SystemAddonsConfig.VMServiceConfig"
935            }
936        }
937    }
938
939    /// Configuration for Customer-managed KMS key support for control plane nodes.
940    #[serde_with::serde_as]
941    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
942    #[serde(default, rename_all = "camelCase")]
943    #[non_exhaustive]
944    pub struct ControlPlaneEncryption {
945        /// Optional. The Cloud KMS CryptoKey e.g.
946        /// projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
947        /// to use for protecting control plane disks. If not specified, a
948        /// Google-managed key will be used instead.
949        #[serde(skip_serializing_if = "std::string::String::is_empty")]
950        pub kms_key: std::string::String,
951
952        /// Output only. The Cloud KMS CryptoKeyVersion currently in use for
953        /// protecting control plane disks. Only applicable if kms_key is set.
954        #[serde(skip_serializing_if = "std::string::String::is_empty")]
955        pub kms_key_active_version: std::string::String,
956
957        /// Output only. Availability of the Cloud KMS CryptoKey. If not
958        /// `KEY_AVAILABLE`, then nodes may go offline as they cannot access their
959        /// local data. This can be caused by a lack of permissions to use the key,
960        /// or if the key is disabled or deleted.
961        pub kms_key_state: crate::model::KmsKeyState,
962
963        /// Output only. Error status returned by Cloud KMS when using this key. This
964        /// field may be populated only if `kms_key_state` is not
965        /// `KMS_KEY_STATE_KEY_AVAILABLE`. If populated, this field contains the
966        /// error status reported by Cloud KMS.
967        #[serde(skip_serializing_if = "std::option::Option::is_none")]
968        pub kms_status: std::option::Option<rpc::model::Status>,
969
970        /// Output only. The current resource state associated with the cmek.
971        pub resource_state: crate::model::ResourceState,
972
973        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
974        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
975    }
976
977    impl ControlPlaneEncryption {
978        pub fn new() -> Self {
979            std::default::Default::default()
980        }
981
982        /// Sets the value of [kms_key][crate::model::cluster::ControlPlaneEncryption::kms_key].
983        pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
984            self.kms_key = v.into();
985            self
986        }
987
988        /// Sets the value of [kms_key_active_version][crate::model::cluster::ControlPlaneEncryption::kms_key_active_version].
989        pub fn set_kms_key_active_version<T: std::convert::Into<std::string::String>>(
990            mut self,
991            v: T,
992        ) -> Self {
993            self.kms_key_active_version = v.into();
994            self
995        }
996
997        /// Sets the value of [kms_key_state][crate::model::cluster::ControlPlaneEncryption::kms_key_state].
998        pub fn set_kms_key_state<T: std::convert::Into<crate::model::KmsKeyState>>(
999            mut self,
1000            v: T,
1001        ) -> Self {
1002            self.kms_key_state = v.into();
1003            self
1004        }
1005
1006        /// Sets the value of [kms_status][crate::model::cluster::ControlPlaneEncryption::kms_status].
1007        pub fn set_kms_status<T: std::convert::Into<std::option::Option<rpc::model::Status>>>(
1008            mut self,
1009            v: T,
1010        ) -> Self {
1011            self.kms_status = v.into();
1012            self
1013        }
1014
1015        /// Sets the value of [resource_state][crate::model::cluster::ControlPlaneEncryption::resource_state].
1016        pub fn set_resource_state<T: std::convert::Into<crate::model::ResourceState>>(
1017            mut self,
1018            v: T,
1019        ) -> Self {
1020            self.resource_state = v.into();
1021            self
1022        }
1023    }
1024
1025    impl wkt::message::Message for ControlPlaneEncryption {
1026        fn typename() -> &'static str {
1027            "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ControlPlaneEncryption"
1028        }
1029    }
1030
1031    /// A Maintenance Event is an operation that could cause temporary disruptions
1032    /// to the cluster workloads, including Google-driven or user-initiated cluster
1033    /// upgrades, user-initiated cluster configuration changes that require
1034    /// restarting nodes, etc.
1035    #[serde_with::serde_as]
1036    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1037    #[serde(default, rename_all = "camelCase")]
1038    #[non_exhaustive]
1039    pub struct MaintenanceEvent {
1040        /// Output only. UUID of the maintenance event.
1041        #[serde(skip_serializing_if = "std::string::String::is_empty")]
1042        pub uuid: std::string::String,
1043
1044        /// Output only. The target version of the cluster.
1045        #[serde(skip_serializing_if = "std::string::String::is_empty")]
1046        pub target_version: std::string::String,
1047
1048        /// Output only. The operation for running the maintenance event. Specified
1049        /// in the format projects/*/locations/*/operations/*. If the maintenance
1050        /// event is split into multiple operations (e.g. due to maintenance
1051        /// windows), the latest one is recorded.
1052        #[serde(skip_serializing_if = "std::string::String::is_empty")]
1053        pub operation: std::string::String,
1054
1055        /// Output only. The type of the maintenance event.
1056        #[serde(rename = "type")]
1057        pub r#type: crate::model::cluster::maintenance_event::Type,
1058
1059        /// Output only. The schedule of the maintenance event.
1060        pub schedule: crate::model::cluster::maintenance_event::Schedule,
1061
1062        /// Output only. The state of the maintenance event.
1063        pub state: crate::model::cluster::maintenance_event::State,
1064
1065        /// Output only. The time when the maintenance event request was created.
1066        #[serde(skip_serializing_if = "std::option::Option::is_none")]
1067        pub create_time: std::option::Option<wkt::Timestamp>,
1068
1069        /// Output only. The time when the maintenance event started.
1070        #[serde(skip_serializing_if = "std::option::Option::is_none")]
1071        pub start_time: std::option::Option<wkt::Timestamp>,
1072
1073        /// Output only. The time when the maintenance event ended, either
1074        /// successfully or not. If the maintenance event is split into multiple
1075        /// maintenance windows, end_time is only updated when the whole flow ends.
1076        #[serde(skip_serializing_if = "std::option::Option::is_none")]
1077        pub end_time: std::option::Option<wkt::Timestamp>,
1078
1079        /// Output only. The time when the maintenance event message was updated.
1080        #[serde(skip_serializing_if = "std::option::Option::is_none")]
1081        pub update_time: std::option::Option<wkt::Timestamp>,
1082
1083        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1084        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1085    }
1086
1087    impl MaintenanceEvent {
1088        pub fn new() -> Self {
1089            std::default::Default::default()
1090        }
1091
1092        /// Sets the value of [uuid][crate::model::cluster::MaintenanceEvent::uuid].
1093        pub fn set_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1094            self.uuid = v.into();
1095            self
1096        }
1097
1098        /// Sets the value of [target_version][crate::model::cluster::MaintenanceEvent::target_version].
1099        pub fn set_target_version<T: std::convert::Into<std::string::String>>(
1100            mut self,
1101            v: T,
1102        ) -> Self {
1103            self.target_version = v.into();
1104            self
1105        }
1106
1107        /// Sets the value of [operation][crate::model::cluster::MaintenanceEvent::operation].
1108        pub fn set_operation<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1109            self.operation = v.into();
1110            self
1111        }
1112
1113        /// Sets the value of [r#type][crate::model::cluster::MaintenanceEvent::type].
1114        pub fn set_type<T: std::convert::Into<crate::model::cluster::maintenance_event::Type>>(
1115            mut self,
1116            v: T,
1117        ) -> Self {
1118            self.r#type = v.into();
1119            self
1120        }
1121
1122        /// Sets the value of [schedule][crate::model::cluster::MaintenanceEvent::schedule].
1123        pub fn set_schedule<
1124            T: std::convert::Into<crate::model::cluster::maintenance_event::Schedule>,
1125        >(
1126            mut self,
1127            v: T,
1128        ) -> Self {
1129            self.schedule = v.into();
1130            self
1131        }
1132
1133        /// Sets the value of [state][crate::model::cluster::MaintenanceEvent::state].
1134        pub fn set_state<T: std::convert::Into<crate::model::cluster::maintenance_event::State>>(
1135            mut self,
1136            v: T,
1137        ) -> Self {
1138            self.state = v.into();
1139            self
1140        }
1141
1142        /// Sets the value of [create_time][crate::model::cluster::MaintenanceEvent::create_time].
1143        pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1144            mut self,
1145            v: T,
1146        ) -> Self {
1147            self.create_time = v.into();
1148            self
1149        }
1150
1151        /// Sets the value of [start_time][crate::model::cluster::MaintenanceEvent::start_time].
1152        pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1153            mut self,
1154            v: T,
1155        ) -> Self {
1156            self.start_time = v.into();
1157            self
1158        }
1159
1160        /// Sets the value of [end_time][crate::model::cluster::MaintenanceEvent::end_time].
1161        pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1162            mut self,
1163            v: T,
1164        ) -> Self {
1165            self.end_time = v.into();
1166            self
1167        }
1168
1169        /// Sets the value of [update_time][crate::model::cluster::MaintenanceEvent::update_time].
1170        pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1171            mut self,
1172            v: T,
1173        ) -> Self {
1174            self.update_time = v.into();
1175            self
1176        }
1177    }
1178
1179    impl wkt::message::Message for MaintenanceEvent {
1180        fn typename() -> &'static str {
1181            "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.MaintenanceEvent"
1182        }
1183    }
1184
1185    /// Defines additional types related to [MaintenanceEvent].
1186    pub mod maintenance_event {
1187        #[allow(unused_imports)]
1188        use super::*;
1189
1190        /// Indicates the maintenance event type.
1191        ///
1192        /// # Working with unknown values
1193        ///
1194        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1195        /// additional enum variants at any time. Adding new variants is not considered
1196        /// a breaking change. Applications should write their code in anticipation of:
1197        ///
1198        /// - New values appearing in future releases of the client library, **and**
1199        /// - New values received dynamically, without application changes.
1200        ///
1201        /// Please consult the [Working with enums] section in the user guide for some
1202        /// guidelines.
1203        ///
1204        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1205        #[derive(Clone, Debug, PartialEq)]
1206        #[non_exhaustive]
1207        pub enum Type {
1208            /// Unspecified.
1209            Unspecified,
1210            /// Upgrade initiated by users.
1211            UserInitiatedUpgrade,
1212            /// Upgrade driven by Google.
1213            GoogleDrivenUpgrade,
1214            /// If set, the enum was initialized with an unknown value.
1215            ///
1216            /// Applications can examine the value using [Type::value] or
1217            /// [Type::name].
1218            UnknownValue(r#type::UnknownValue),
1219        }
1220
1221        #[doc(hidden)]
1222        pub mod r#type {
1223            #[allow(unused_imports)]
1224            use super::*;
1225            #[derive(Clone, Debug, PartialEq)]
1226            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1227        }
1228
1229        impl Type {
1230            /// Gets the enum value.
1231            ///
1232            /// Returns `None` if the enum contains an unknown value deserialized from
1233            /// the string representation of enums.
1234            pub fn value(&self) -> std::option::Option<i32> {
1235                match self {
1236                    Self::Unspecified => std::option::Option::Some(0),
1237                    Self::UserInitiatedUpgrade => std::option::Option::Some(1),
1238                    Self::GoogleDrivenUpgrade => std::option::Option::Some(2),
1239                    Self::UnknownValue(u) => u.0.value(),
1240                }
1241            }
1242
1243            /// Gets the enum value as a string.
1244            ///
1245            /// Returns `None` if the enum contains an unknown value deserialized from
1246            /// the integer representation of enums.
1247            pub fn name(&self) -> std::option::Option<&str> {
1248                match self {
1249                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
1250                    Self::UserInitiatedUpgrade => {
1251                        std::option::Option::Some("USER_INITIATED_UPGRADE")
1252                    }
1253                    Self::GoogleDrivenUpgrade => std::option::Option::Some("GOOGLE_DRIVEN_UPGRADE"),
1254                    Self::UnknownValue(u) => u.0.name(),
1255                }
1256            }
1257        }
1258
1259        impl std::default::Default for Type {
1260            fn default() -> Self {
1261                use std::convert::From;
1262                Self::from(0)
1263            }
1264        }
1265
1266        impl std::fmt::Display for Type {
1267            fn fmt(
1268                &self,
1269                f: &mut std::fmt::Formatter<'_>,
1270            ) -> std::result::Result<(), std::fmt::Error> {
1271                wkt::internal::display_enum(f, self.name(), self.value())
1272            }
1273        }
1274
1275        impl std::convert::From<i32> for Type {
1276            fn from(value: i32) -> Self {
1277                match value {
1278                    0 => Self::Unspecified,
1279                    1 => Self::UserInitiatedUpgrade,
1280                    2 => Self::GoogleDrivenUpgrade,
1281                    _ => Self::UnknownValue(r#type::UnknownValue(
1282                        wkt::internal::UnknownEnumValue::Integer(value),
1283                    )),
1284                }
1285            }
1286        }
1287
1288        impl std::convert::From<&str> for Type {
1289            fn from(value: &str) -> Self {
1290                use std::string::ToString;
1291                match value {
1292                    "TYPE_UNSPECIFIED" => Self::Unspecified,
1293                    "USER_INITIATED_UPGRADE" => Self::UserInitiatedUpgrade,
1294                    "GOOGLE_DRIVEN_UPGRADE" => Self::GoogleDrivenUpgrade,
1295                    _ => Self::UnknownValue(r#type::UnknownValue(
1296                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1297                    )),
1298                }
1299            }
1300        }
1301
1302        impl serde::ser::Serialize for Type {
1303            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1304            where
1305                S: serde::Serializer,
1306            {
1307                match self {
1308                    Self::Unspecified => serializer.serialize_i32(0),
1309                    Self::UserInitiatedUpgrade => serializer.serialize_i32(1),
1310                    Self::GoogleDrivenUpgrade => serializer.serialize_i32(2),
1311                    Self::UnknownValue(u) => u.0.serialize(serializer),
1312                }
1313            }
1314        }
1315
1316        impl<'de> serde::de::Deserialize<'de> for Type {
1317            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1318            where
1319                D: serde::Deserializer<'de>,
1320            {
1321                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
1322                    ".google.cloud.edgecontainer.v1.Cluster.MaintenanceEvent.Type",
1323                ))
1324            }
1325        }
1326
1327        /// Indicates when the maintenance event should be performed.
1328        ///
1329        /// # Working with unknown values
1330        ///
1331        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1332        /// additional enum variants at any time. Adding new variants is not considered
1333        /// a breaking change. Applications should write their code in anticipation of:
1334        ///
1335        /// - New values appearing in future releases of the client library, **and**
1336        /// - New values received dynamically, without application changes.
1337        ///
1338        /// Please consult the [Working with enums] section in the user guide for some
1339        /// guidelines.
1340        ///
1341        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1342        #[derive(Clone, Debug, PartialEq)]
1343        #[non_exhaustive]
1344        pub enum Schedule {
1345            /// Unspecified.
1346            Unspecified,
1347            /// Immediately after receiving the request.
1348            Immediately,
1349            /// If set, the enum was initialized with an unknown value.
1350            ///
1351            /// Applications can examine the value using [Schedule::value] or
1352            /// [Schedule::name].
1353            UnknownValue(schedule::UnknownValue),
1354        }
1355
1356        #[doc(hidden)]
1357        pub mod schedule {
1358            #[allow(unused_imports)]
1359            use super::*;
1360            #[derive(Clone, Debug, PartialEq)]
1361            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1362        }
1363
1364        impl Schedule {
1365            /// Gets the enum value.
1366            ///
1367            /// Returns `None` if the enum contains an unknown value deserialized from
1368            /// the string representation of enums.
1369            pub fn value(&self) -> std::option::Option<i32> {
1370                match self {
1371                    Self::Unspecified => std::option::Option::Some(0),
1372                    Self::Immediately => std::option::Option::Some(1),
1373                    Self::UnknownValue(u) => u.0.value(),
1374                }
1375            }
1376
1377            /// Gets the enum value as a string.
1378            ///
1379            /// Returns `None` if the enum contains an unknown value deserialized from
1380            /// the integer representation of enums.
1381            pub fn name(&self) -> std::option::Option<&str> {
1382                match self {
1383                    Self::Unspecified => std::option::Option::Some("SCHEDULE_UNSPECIFIED"),
1384                    Self::Immediately => std::option::Option::Some("IMMEDIATELY"),
1385                    Self::UnknownValue(u) => u.0.name(),
1386                }
1387            }
1388        }
1389
1390        impl std::default::Default for Schedule {
1391            fn default() -> Self {
1392                use std::convert::From;
1393                Self::from(0)
1394            }
1395        }
1396
1397        impl std::fmt::Display for Schedule {
1398            fn fmt(
1399                &self,
1400                f: &mut std::fmt::Formatter<'_>,
1401            ) -> std::result::Result<(), std::fmt::Error> {
1402                wkt::internal::display_enum(f, self.name(), self.value())
1403            }
1404        }
1405
1406        impl std::convert::From<i32> for Schedule {
1407            fn from(value: i32) -> Self {
1408                match value {
1409                    0 => Self::Unspecified,
1410                    1 => Self::Immediately,
1411                    _ => Self::UnknownValue(schedule::UnknownValue(
1412                        wkt::internal::UnknownEnumValue::Integer(value),
1413                    )),
1414                }
1415            }
1416        }
1417
1418        impl std::convert::From<&str> for Schedule {
1419            fn from(value: &str) -> Self {
1420                use std::string::ToString;
1421                match value {
1422                    "SCHEDULE_UNSPECIFIED" => Self::Unspecified,
1423                    "IMMEDIATELY" => Self::Immediately,
1424                    _ => Self::UnknownValue(schedule::UnknownValue(
1425                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1426                    )),
1427                }
1428            }
1429        }
1430
1431        impl serde::ser::Serialize for Schedule {
1432            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1433            where
1434                S: serde::Serializer,
1435            {
1436                match self {
1437                    Self::Unspecified => serializer.serialize_i32(0),
1438                    Self::Immediately => serializer.serialize_i32(1),
1439                    Self::UnknownValue(u) => u.0.serialize(serializer),
1440                }
1441            }
1442        }
1443
1444        impl<'de> serde::de::Deserialize<'de> for Schedule {
1445            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1446            where
1447                D: serde::Deserializer<'de>,
1448            {
1449                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Schedule>::new(
1450                    ".google.cloud.edgecontainer.v1.Cluster.MaintenanceEvent.Schedule",
1451                ))
1452            }
1453        }
1454
1455        /// Indicates the maintenance event state.
1456        ///
1457        /// # Working with unknown values
1458        ///
1459        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1460        /// additional enum variants at any time. Adding new variants is not considered
1461        /// a breaking change. Applications should write their code in anticipation of:
1462        ///
1463        /// - New values appearing in future releases of the client library, **and**
1464        /// - New values received dynamically, without application changes.
1465        ///
1466        /// Please consult the [Working with enums] section in the user guide for some
1467        /// guidelines.
1468        ///
1469        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1470        #[derive(Clone, Debug, PartialEq)]
1471        #[non_exhaustive]
1472        pub enum State {
1473            /// Unspecified.
1474            Unspecified,
1475            /// The maintenance event is ongoing. The cluster might be unusable.
1476            Reconciling,
1477            /// The maintenance event succeeded.
1478            Succeeded,
1479            /// The maintenance event failed.
1480            Failed,
1481            /// If set, the enum was initialized with an unknown value.
1482            ///
1483            /// Applications can examine the value using [State::value] or
1484            /// [State::name].
1485            UnknownValue(state::UnknownValue),
1486        }
1487
1488        #[doc(hidden)]
1489        pub mod state {
1490            #[allow(unused_imports)]
1491            use super::*;
1492            #[derive(Clone, Debug, PartialEq)]
1493            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1494        }
1495
1496        impl State {
1497            /// Gets the enum value.
1498            ///
1499            /// Returns `None` if the enum contains an unknown value deserialized from
1500            /// the string representation of enums.
1501            pub fn value(&self) -> std::option::Option<i32> {
1502                match self {
1503                    Self::Unspecified => std::option::Option::Some(0),
1504                    Self::Reconciling => std::option::Option::Some(1),
1505                    Self::Succeeded => std::option::Option::Some(2),
1506                    Self::Failed => std::option::Option::Some(3),
1507                    Self::UnknownValue(u) => u.0.value(),
1508                }
1509            }
1510
1511            /// Gets the enum value as a string.
1512            ///
1513            /// Returns `None` if the enum contains an unknown value deserialized from
1514            /// the integer representation of enums.
1515            pub fn name(&self) -> std::option::Option<&str> {
1516                match self {
1517                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1518                    Self::Reconciling => std::option::Option::Some("RECONCILING"),
1519                    Self::Succeeded => std::option::Option::Some("SUCCEEDED"),
1520                    Self::Failed => std::option::Option::Some("FAILED"),
1521                    Self::UnknownValue(u) => u.0.name(),
1522                }
1523            }
1524        }
1525
1526        impl std::default::Default for State {
1527            fn default() -> Self {
1528                use std::convert::From;
1529                Self::from(0)
1530            }
1531        }
1532
1533        impl std::fmt::Display for State {
1534            fn fmt(
1535                &self,
1536                f: &mut std::fmt::Formatter<'_>,
1537            ) -> std::result::Result<(), std::fmt::Error> {
1538                wkt::internal::display_enum(f, self.name(), self.value())
1539            }
1540        }
1541
1542        impl std::convert::From<i32> for State {
1543            fn from(value: i32) -> Self {
1544                match value {
1545                    0 => Self::Unspecified,
1546                    1 => Self::Reconciling,
1547                    2 => Self::Succeeded,
1548                    3 => Self::Failed,
1549                    _ => Self::UnknownValue(state::UnknownValue(
1550                        wkt::internal::UnknownEnumValue::Integer(value),
1551                    )),
1552                }
1553            }
1554        }
1555
1556        impl std::convert::From<&str> for State {
1557            fn from(value: &str) -> Self {
1558                use std::string::ToString;
1559                match value {
1560                    "STATE_UNSPECIFIED" => Self::Unspecified,
1561                    "RECONCILING" => Self::Reconciling,
1562                    "SUCCEEDED" => Self::Succeeded,
1563                    "FAILED" => Self::Failed,
1564                    _ => Self::UnknownValue(state::UnknownValue(
1565                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1566                    )),
1567                }
1568            }
1569        }
1570
1571        impl serde::ser::Serialize for State {
1572            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1573            where
1574                S: serde::Serializer,
1575            {
1576                match self {
1577                    Self::Unspecified => serializer.serialize_i32(0),
1578                    Self::Reconciling => serializer.serialize_i32(1),
1579                    Self::Succeeded => serializer.serialize_i32(2),
1580                    Self::Failed => serializer.serialize_i32(3),
1581                    Self::UnknownValue(u) => u.0.serialize(serializer),
1582                }
1583            }
1584        }
1585
1586        impl<'de> serde::de::Deserialize<'de> for State {
1587            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1588            where
1589                D: serde::Deserializer<'de>,
1590            {
1591                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1592                    ".google.cloud.edgecontainer.v1.Cluster.MaintenanceEvent.State",
1593                ))
1594            }
1595        }
1596    }
1597
1598    /// Configuration of the cluster survivability, e.g., for the case when network
1599    /// connectivity is lost.
1600    #[serde_with::serde_as]
1601    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1602    #[serde(default, rename_all = "camelCase")]
1603    #[non_exhaustive]
1604    pub struct SurvivabilityConfig {
1605        /// Optional. Time period that allows the cluster nodes to be rebooted and
1606        /// become functional without network connectivity to Google. The default 0
1607        /// means not allowed. The maximum is 7 days.
1608        #[serde(skip_serializing_if = "std::option::Option::is_none")]
1609        pub offline_reboot_ttl: std::option::Option<wkt::Duration>,
1610
1611        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1612        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1613    }
1614
1615    impl SurvivabilityConfig {
1616        pub fn new() -> Self {
1617            std::default::Default::default()
1618        }
1619
1620        /// Sets the value of [offline_reboot_ttl][crate::model::cluster::SurvivabilityConfig::offline_reboot_ttl].
1621        pub fn set_offline_reboot_ttl<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
1622            mut self,
1623            v: T,
1624        ) -> Self {
1625            self.offline_reboot_ttl = v.into();
1626            self
1627        }
1628    }
1629
1630    impl wkt::message::Message for SurvivabilityConfig {
1631        fn typename() -> &'static str {
1632            "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.SurvivabilityConfig"
1633        }
1634    }
1635
1636    /// ConnectionState holds the current connection state from the cluster to
1637    /// Google.
1638    #[serde_with::serde_as]
1639    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1640    #[serde(default, rename_all = "camelCase")]
1641    #[non_exhaustive]
1642    pub struct ConnectionState {
1643        /// Output only. The current connection state.
1644        pub state: crate::model::cluster::connection_state::State,
1645
1646        /// Output only. The time when the connection state was last changed.
1647        #[serde(skip_serializing_if = "std::option::Option::is_none")]
1648        pub update_time: std::option::Option<wkt::Timestamp>,
1649
1650        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1651        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1652    }
1653
1654    impl ConnectionState {
1655        pub fn new() -> Self {
1656            std::default::Default::default()
1657        }
1658
1659        /// Sets the value of [state][crate::model::cluster::ConnectionState::state].
1660        pub fn set_state<T: std::convert::Into<crate::model::cluster::connection_state::State>>(
1661            mut self,
1662            v: T,
1663        ) -> Self {
1664            self.state = v.into();
1665            self
1666        }
1667
1668        /// Sets the value of [update_time][crate::model::cluster::ConnectionState::update_time].
1669        pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
1670            mut self,
1671            v: T,
1672        ) -> Self {
1673            self.update_time = v.into();
1674            self
1675        }
1676    }
1677
1678    impl wkt::message::Message for ConnectionState {
1679        fn typename() -> &'static str {
1680            "type.googleapis.com/google.cloud.edgecontainer.v1.Cluster.ConnectionState"
1681        }
1682    }
1683
1684    /// Defines additional types related to [ConnectionState].
1685    pub mod connection_state {
1686        #[allow(unused_imports)]
1687        use super::*;
1688
1689        /// The connection state.
1690        ///
1691        /// # Working with unknown values
1692        ///
1693        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1694        /// additional enum variants at any time. Adding new variants is not considered
1695        /// a breaking change. Applications should write their code in anticipation of:
1696        ///
1697        /// - New values appearing in future releases of the client library, **and**
1698        /// - New values received dynamically, without application changes.
1699        ///
1700        /// Please consult the [Working with enums] section in the user guide for some
1701        /// guidelines.
1702        ///
1703        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1704        #[derive(Clone, Debug, PartialEq)]
1705        #[non_exhaustive]
1706        pub enum State {
1707            /// Unknown connection state.
1708            Unspecified,
1709            /// This cluster is currently disconnected from Google.
1710            Disconnected,
1711            /// This cluster is currently connected to Google.
1712            Connected,
1713            /// This cluster is currently connected to Google, but may have recently
1714            /// reconnected after a disconnection. It is still syncing back.
1715            ConnectedAndSyncing,
1716            /// If set, the enum was initialized with an unknown value.
1717            ///
1718            /// Applications can examine the value using [State::value] or
1719            /// [State::name].
1720            UnknownValue(state::UnknownValue),
1721        }
1722
1723        #[doc(hidden)]
1724        pub mod state {
1725            #[allow(unused_imports)]
1726            use super::*;
1727            #[derive(Clone, Debug, PartialEq)]
1728            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1729        }
1730
1731        impl State {
1732            /// Gets the enum value.
1733            ///
1734            /// Returns `None` if the enum contains an unknown value deserialized from
1735            /// the string representation of enums.
1736            pub fn value(&self) -> std::option::Option<i32> {
1737                match self {
1738                    Self::Unspecified => std::option::Option::Some(0),
1739                    Self::Disconnected => std::option::Option::Some(1),
1740                    Self::Connected => std::option::Option::Some(2),
1741                    Self::ConnectedAndSyncing => std::option::Option::Some(3),
1742                    Self::UnknownValue(u) => u.0.value(),
1743                }
1744            }
1745
1746            /// Gets the enum value as a string.
1747            ///
1748            /// Returns `None` if the enum contains an unknown value deserialized from
1749            /// the integer representation of enums.
1750            pub fn name(&self) -> std::option::Option<&str> {
1751                match self {
1752                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
1753                    Self::Disconnected => std::option::Option::Some("DISCONNECTED"),
1754                    Self::Connected => std::option::Option::Some("CONNECTED"),
1755                    Self::ConnectedAndSyncing => std::option::Option::Some("CONNECTED_AND_SYNCING"),
1756                    Self::UnknownValue(u) => u.0.name(),
1757                }
1758            }
1759        }
1760
1761        impl std::default::Default for State {
1762            fn default() -> Self {
1763                use std::convert::From;
1764                Self::from(0)
1765            }
1766        }
1767
1768        impl std::fmt::Display for State {
1769            fn fmt(
1770                &self,
1771                f: &mut std::fmt::Formatter<'_>,
1772            ) -> std::result::Result<(), std::fmt::Error> {
1773                wkt::internal::display_enum(f, self.name(), self.value())
1774            }
1775        }
1776
1777        impl std::convert::From<i32> for State {
1778            fn from(value: i32) -> Self {
1779                match value {
1780                    0 => Self::Unspecified,
1781                    1 => Self::Disconnected,
1782                    2 => Self::Connected,
1783                    3 => Self::ConnectedAndSyncing,
1784                    _ => Self::UnknownValue(state::UnknownValue(
1785                        wkt::internal::UnknownEnumValue::Integer(value),
1786                    )),
1787                }
1788            }
1789        }
1790
1791        impl std::convert::From<&str> for State {
1792            fn from(value: &str) -> Self {
1793                use std::string::ToString;
1794                match value {
1795                    "STATE_UNSPECIFIED" => Self::Unspecified,
1796                    "DISCONNECTED" => Self::Disconnected,
1797                    "CONNECTED" => Self::Connected,
1798                    "CONNECTED_AND_SYNCING" => Self::ConnectedAndSyncing,
1799                    _ => Self::UnknownValue(state::UnknownValue(
1800                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1801                    )),
1802                }
1803            }
1804        }
1805
1806        impl serde::ser::Serialize for State {
1807            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1808            where
1809                S: serde::Serializer,
1810            {
1811                match self {
1812                    Self::Unspecified => serializer.serialize_i32(0),
1813                    Self::Disconnected => serializer.serialize_i32(1),
1814                    Self::Connected => serializer.serialize_i32(2),
1815                    Self::ConnectedAndSyncing => serializer.serialize_i32(3),
1816                    Self::UnknownValue(u) => u.0.serialize(serializer),
1817                }
1818            }
1819        }
1820
1821        impl<'de> serde::de::Deserialize<'de> for State {
1822            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1823            where
1824                D: serde::Deserializer<'de>,
1825            {
1826                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
1827                    ".google.cloud.edgecontainer.v1.Cluster.ConnectionState.State",
1828                ))
1829            }
1830        }
1831    }
1832
1833    /// Indicates the status of the cluster.
1834    ///
1835    /// # Working with unknown values
1836    ///
1837    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1838    /// additional enum variants at any time. Adding new variants is not considered
1839    /// a breaking change. Applications should write their code in anticipation of:
1840    ///
1841    /// - New values appearing in future releases of the client library, **and**
1842    /// - New values received dynamically, without application changes.
1843    ///
1844    /// Please consult the [Working with enums] section in the user guide for some
1845    /// guidelines.
1846    ///
1847    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1848    #[derive(Clone, Debug, PartialEq)]
1849    #[non_exhaustive]
1850    pub enum Status {
1851        /// Status unknown.
1852        Unspecified,
1853        /// The cluster is being created.
1854        Provisioning,
1855        /// The cluster is created and fully usable.
1856        Running,
1857        /// The cluster is being deleted.
1858        Deleting,
1859        /// The status indicates that some errors occurred while reconciling/deleting
1860        /// the cluster.
1861        Error,
1862        /// The cluster is undergoing some work such as version upgrades, etc.
1863        Reconciling,
1864        /// If set, the enum was initialized with an unknown value.
1865        ///
1866        /// Applications can examine the value using [Status::value] or
1867        /// [Status::name].
1868        UnknownValue(status::UnknownValue),
1869    }
1870
1871    #[doc(hidden)]
1872    pub mod status {
1873        #[allow(unused_imports)]
1874        use super::*;
1875        #[derive(Clone, Debug, PartialEq)]
1876        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1877    }
1878
1879    impl Status {
1880        /// Gets the enum value.
1881        ///
1882        /// Returns `None` if the enum contains an unknown value deserialized from
1883        /// the string representation of enums.
1884        pub fn value(&self) -> std::option::Option<i32> {
1885            match self {
1886                Self::Unspecified => std::option::Option::Some(0),
1887                Self::Provisioning => std::option::Option::Some(1),
1888                Self::Running => std::option::Option::Some(2),
1889                Self::Deleting => std::option::Option::Some(3),
1890                Self::Error => std::option::Option::Some(4),
1891                Self::Reconciling => std::option::Option::Some(5),
1892                Self::UnknownValue(u) => u.0.value(),
1893            }
1894        }
1895
1896        /// Gets the enum value as a string.
1897        ///
1898        /// Returns `None` if the enum contains an unknown value deserialized from
1899        /// the integer representation of enums.
1900        pub fn name(&self) -> std::option::Option<&str> {
1901            match self {
1902                Self::Unspecified => std::option::Option::Some("STATUS_UNSPECIFIED"),
1903                Self::Provisioning => std::option::Option::Some("PROVISIONING"),
1904                Self::Running => std::option::Option::Some("RUNNING"),
1905                Self::Deleting => std::option::Option::Some("DELETING"),
1906                Self::Error => std::option::Option::Some("ERROR"),
1907                Self::Reconciling => std::option::Option::Some("RECONCILING"),
1908                Self::UnknownValue(u) => u.0.name(),
1909            }
1910        }
1911    }
1912
1913    impl std::default::Default for Status {
1914        fn default() -> Self {
1915            use std::convert::From;
1916            Self::from(0)
1917        }
1918    }
1919
1920    impl std::fmt::Display for Status {
1921        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1922            wkt::internal::display_enum(f, self.name(), self.value())
1923        }
1924    }
1925
1926    impl std::convert::From<i32> for Status {
1927        fn from(value: i32) -> Self {
1928            match value {
1929                0 => Self::Unspecified,
1930                1 => Self::Provisioning,
1931                2 => Self::Running,
1932                3 => Self::Deleting,
1933                4 => Self::Error,
1934                5 => Self::Reconciling,
1935                _ => Self::UnknownValue(status::UnknownValue(
1936                    wkt::internal::UnknownEnumValue::Integer(value),
1937                )),
1938            }
1939        }
1940    }
1941
1942    impl std::convert::From<&str> for Status {
1943        fn from(value: &str) -> Self {
1944            use std::string::ToString;
1945            match value {
1946                "STATUS_UNSPECIFIED" => Self::Unspecified,
1947                "PROVISIONING" => Self::Provisioning,
1948                "RUNNING" => Self::Running,
1949                "DELETING" => Self::Deleting,
1950                "ERROR" => Self::Error,
1951                "RECONCILING" => Self::Reconciling,
1952                _ => Self::UnknownValue(status::UnknownValue(
1953                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1954                )),
1955            }
1956        }
1957    }
1958
1959    impl serde::ser::Serialize for Status {
1960        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1961        where
1962            S: serde::Serializer,
1963        {
1964            match self {
1965                Self::Unspecified => serializer.serialize_i32(0),
1966                Self::Provisioning => serializer.serialize_i32(1),
1967                Self::Running => serializer.serialize_i32(2),
1968                Self::Deleting => serializer.serialize_i32(3),
1969                Self::Error => serializer.serialize_i32(4),
1970                Self::Reconciling => serializer.serialize_i32(5),
1971                Self::UnknownValue(u) => u.0.serialize(serializer),
1972            }
1973        }
1974    }
1975
1976    impl<'de> serde::de::Deserialize<'de> for Status {
1977        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1978        where
1979            D: serde::Deserializer<'de>,
1980        {
1981            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Status>::new(
1982                ".google.cloud.edgecontainer.v1.Cluster.Status",
1983            ))
1984        }
1985    }
1986
1987    /// The release channel a cluster is subscribed to.
1988    ///
1989    /// # Working with unknown values
1990    ///
1991    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1992    /// additional enum variants at any time. Adding new variants is not considered
1993    /// a breaking change. Applications should write their code in anticipation of:
1994    ///
1995    /// - New values appearing in future releases of the client library, **and**
1996    /// - New values received dynamically, without application changes.
1997    ///
1998    /// Please consult the [Working with enums] section in the user guide for some
1999    /// guidelines.
2000    ///
2001    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2002    #[derive(Clone, Debug, PartialEq)]
2003    #[non_exhaustive]
2004    pub enum ReleaseChannel {
2005        /// Unspecified release channel. This will default to the REGULAR channel.
2006        Unspecified,
2007        /// No release channel.
2008        None,
2009        /// Regular release channel.
2010        Regular,
2011        /// If set, the enum was initialized with an unknown value.
2012        ///
2013        /// Applications can examine the value using [ReleaseChannel::value] or
2014        /// [ReleaseChannel::name].
2015        UnknownValue(release_channel::UnknownValue),
2016    }
2017
2018    #[doc(hidden)]
2019    pub mod release_channel {
2020        #[allow(unused_imports)]
2021        use super::*;
2022        #[derive(Clone, Debug, PartialEq)]
2023        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2024    }
2025
2026    impl ReleaseChannel {
2027        /// Gets the enum value.
2028        ///
2029        /// Returns `None` if the enum contains an unknown value deserialized from
2030        /// the string representation of enums.
2031        pub fn value(&self) -> std::option::Option<i32> {
2032            match self {
2033                Self::Unspecified => std::option::Option::Some(0),
2034                Self::None => std::option::Option::Some(1),
2035                Self::Regular => std::option::Option::Some(2),
2036                Self::UnknownValue(u) => u.0.value(),
2037            }
2038        }
2039
2040        /// Gets the enum value as a string.
2041        ///
2042        /// Returns `None` if the enum contains an unknown value deserialized from
2043        /// the integer representation of enums.
2044        pub fn name(&self) -> std::option::Option<&str> {
2045            match self {
2046                Self::Unspecified => std::option::Option::Some("RELEASE_CHANNEL_UNSPECIFIED"),
2047                Self::None => std::option::Option::Some("NONE"),
2048                Self::Regular => std::option::Option::Some("REGULAR"),
2049                Self::UnknownValue(u) => u.0.name(),
2050            }
2051        }
2052    }
2053
2054    impl std::default::Default for ReleaseChannel {
2055        fn default() -> Self {
2056            use std::convert::From;
2057            Self::from(0)
2058        }
2059    }
2060
2061    impl std::fmt::Display for ReleaseChannel {
2062        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2063            wkt::internal::display_enum(f, self.name(), self.value())
2064        }
2065    }
2066
2067    impl std::convert::From<i32> for ReleaseChannel {
2068        fn from(value: i32) -> Self {
2069            match value {
2070                0 => Self::Unspecified,
2071                1 => Self::None,
2072                2 => Self::Regular,
2073                _ => Self::UnknownValue(release_channel::UnknownValue(
2074                    wkt::internal::UnknownEnumValue::Integer(value),
2075                )),
2076            }
2077        }
2078    }
2079
2080    impl std::convert::From<&str> for ReleaseChannel {
2081        fn from(value: &str) -> Self {
2082            use std::string::ToString;
2083            match value {
2084                "RELEASE_CHANNEL_UNSPECIFIED" => Self::Unspecified,
2085                "NONE" => Self::None,
2086                "REGULAR" => Self::Regular,
2087                _ => Self::UnknownValue(release_channel::UnknownValue(
2088                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2089                )),
2090            }
2091        }
2092    }
2093
2094    impl serde::ser::Serialize for ReleaseChannel {
2095        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2096        where
2097            S: serde::Serializer,
2098        {
2099            match self {
2100                Self::Unspecified => serializer.serialize_i32(0),
2101                Self::None => serializer.serialize_i32(1),
2102                Self::Regular => serializer.serialize_i32(2),
2103                Self::UnknownValue(u) => u.0.serialize(serializer),
2104            }
2105        }
2106    }
2107
2108    impl<'de> serde::de::Deserialize<'de> for ReleaseChannel {
2109        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2110        where
2111            D: serde::Deserializer<'de>,
2112        {
2113            deserializer.deserialize_any(wkt::internal::EnumVisitor::<ReleaseChannel>::new(
2114                ".google.cloud.edgecontainer.v1.Cluster.ReleaseChannel",
2115            ))
2116        }
2117    }
2118}
2119
2120/// Cluster-wide networking configuration.
2121#[serde_with::serde_as]
2122#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2123#[serde(default, rename_all = "camelCase")]
2124#[non_exhaustive]
2125pub struct ClusterNetworking {
2126    /// Required. All pods in the cluster are assigned an RFC1918 IPv4 address from
2127    /// these blocks. Only a single block is supported. This field cannot be
2128    /// changed after creation.
2129    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2130    pub cluster_ipv4_cidr_blocks: std::vec::Vec<std::string::String>,
2131
2132    /// Required. All services in the cluster are assigned an RFC1918 IPv4 address
2133    /// from these blocks. Only a single block is supported. This field cannot be
2134    /// changed after creation.
2135    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2136    pub services_ipv4_cidr_blocks: std::vec::Vec<std::string::String>,
2137
2138    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2139    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2140}
2141
2142impl ClusterNetworking {
2143    pub fn new() -> Self {
2144        std::default::Default::default()
2145    }
2146
2147    /// Sets the value of [cluster_ipv4_cidr_blocks][crate::model::ClusterNetworking::cluster_ipv4_cidr_blocks].
2148    pub fn set_cluster_ipv4_cidr_blocks<T, V>(mut self, v: T) -> Self
2149    where
2150        T: std::iter::IntoIterator<Item = V>,
2151        V: std::convert::Into<std::string::String>,
2152    {
2153        use std::iter::Iterator;
2154        self.cluster_ipv4_cidr_blocks = v.into_iter().map(|i| i.into()).collect();
2155        self
2156    }
2157
2158    /// Sets the value of [services_ipv4_cidr_blocks][crate::model::ClusterNetworking::services_ipv4_cidr_blocks].
2159    pub fn set_services_ipv4_cidr_blocks<T, V>(mut self, v: T) -> Self
2160    where
2161        T: std::iter::IntoIterator<Item = V>,
2162        V: std::convert::Into<std::string::String>,
2163    {
2164        use std::iter::Iterator;
2165        self.services_ipv4_cidr_blocks = v.into_iter().map(|i| i.into()).collect();
2166        self
2167    }
2168}
2169
2170impl wkt::message::Message for ClusterNetworking {
2171    fn typename() -> &'static str {
2172        "type.googleapis.com/google.cloud.edgecontainer.v1.ClusterNetworking"
2173    }
2174}
2175
2176/// Fleet related configuration.
2177///
2178/// Fleets are a Google Cloud concept for logically organizing clusters,
2179/// letting you use and manage multi-cluster capabilities and apply
2180/// consistent policies across your systems.
2181#[serde_with::serde_as]
2182#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2183#[serde(default, rename_all = "camelCase")]
2184#[non_exhaustive]
2185pub struct Fleet {
2186    /// Required. The name of the Fleet host project where this cluster will be
2187    /// registered.
2188    ///
2189    /// Project names are formatted as
2190    /// `projects/<project-number>`.
2191    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2192    pub project: std::string::String,
2193
2194    /// Output only. The name of the managed Hub Membership resource associated to
2195    /// this cluster.
2196    ///
2197    /// Membership names are formatted as
2198    /// `projects/<project-number>/locations/global/membership/<cluster-id>`.
2199    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2200    pub membership: std::string::String,
2201
2202    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2203    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2204}
2205
2206impl Fleet {
2207    pub fn new() -> Self {
2208        std::default::Default::default()
2209    }
2210
2211    /// Sets the value of [project][crate::model::Fleet::project].
2212    pub fn set_project<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2213        self.project = v.into();
2214        self
2215    }
2216
2217    /// Sets the value of [membership][crate::model::Fleet::membership].
2218    pub fn set_membership<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2219        self.membership = v.into();
2220        self
2221    }
2222}
2223
2224impl wkt::message::Message for Fleet {
2225    fn typename() -> &'static str {
2226        "type.googleapis.com/google.cloud.edgecontainer.v1.Fleet"
2227    }
2228}
2229
2230/// A user principal for an RBAC policy.
2231#[serde_with::serde_as]
2232#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2233#[serde(default, rename_all = "camelCase")]
2234#[non_exhaustive]
2235pub struct ClusterUser {
2236    /// Required. An active Google username.
2237    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2238    pub username: std::string::String,
2239
2240    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2241    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2242}
2243
2244impl ClusterUser {
2245    pub fn new() -> Self {
2246        std::default::Default::default()
2247    }
2248
2249    /// Sets the value of [username][crate::model::ClusterUser::username].
2250    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2251        self.username = v.into();
2252        self
2253    }
2254}
2255
2256impl wkt::message::Message for ClusterUser {
2257    fn typename() -> &'static str {
2258        "type.googleapis.com/google.cloud.edgecontainer.v1.ClusterUser"
2259    }
2260}
2261
2262/// RBAC policy that will be applied and managed by GEC.
2263#[serde_with::serde_as]
2264#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2265#[serde(default, rename_all = "camelCase")]
2266#[non_exhaustive]
2267pub struct Authorization {
2268    /// Required. User that will be granted the cluster-admin role on the cluster,
2269    /// providing full access to the cluster. Currently, this is a singular field,
2270    /// but will be expanded to allow multiple admins in the future.
2271    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2272    pub admin_users: std::option::Option<crate::model::ClusterUser>,
2273
2274    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2275    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2276}
2277
2278impl Authorization {
2279    pub fn new() -> Self {
2280        std::default::Default::default()
2281    }
2282
2283    /// Sets the value of [admin_users][crate::model::Authorization::admin_users].
2284    pub fn set_admin_users<
2285        T: std::convert::Into<std::option::Option<crate::model::ClusterUser>>,
2286    >(
2287        mut self,
2288        v: T,
2289    ) -> Self {
2290        self.admin_users = v.into();
2291        self
2292    }
2293}
2294
2295impl wkt::message::Message for Authorization {
2296    fn typename() -> &'static str {
2297        "type.googleapis.com/google.cloud.edgecontainer.v1.Authorization"
2298    }
2299}
2300
2301/// A set of Kubernetes nodes in a cluster with common configuration and
2302/// specification.
2303#[serde_with::serde_as]
2304#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2305#[serde(default, rename_all = "camelCase")]
2306#[non_exhaustive]
2307pub struct NodePool {
2308    /// Required. The resource name of the node pool.
2309    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2310    pub name: std::string::String,
2311
2312    /// Output only. The time when the node pool was created.
2313    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2314    pub create_time: std::option::Option<wkt::Timestamp>,
2315
2316    /// Output only. The time when the node pool was last updated.
2317    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2318    pub update_time: std::option::Option<wkt::Timestamp>,
2319
2320    /// Labels associated with this resource.
2321    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2322    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2323
2324    /// Name of the Google Distributed Cloud Edge zone where this node pool will be
2325    /// created. For example: `us-central1-edge-customer-a`.
2326    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2327    pub node_location: std::string::String,
2328
2329    /// Required. The number of nodes in the pool.
2330    #[serde(skip_serializing_if = "wkt::internal::is_default")]
2331    pub node_count: i32,
2332
2333    /// Only machines matching this filter will be allowed to join the node pool.
2334    /// The filtering language accepts strings like "name=\<name\>", and is
2335    /// documented in more detail in [AIP-160](https://google.aip.dev/160).
2336    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2337    pub machine_filter: std::string::String,
2338
2339    /// Optional. Local disk encryption options. This field is only used when
2340    /// enabling CMEK support.
2341    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2342    pub local_disk_encryption: std::option::Option<crate::model::node_pool::LocalDiskEncryption>,
2343
2344    /// Output only. The lowest release version among all worker nodes.
2345    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2346    pub node_version: std::string::String,
2347
2348    /// Optional. Configuration for each node in the NodePool
2349    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2350    pub node_config: std::option::Option<crate::model::node_pool::NodeConfig>,
2351
2352    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2353    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2354}
2355
2356impl NodePool {
2357    pub fn new() -> Self {
2358        std::default::Default::default()
2359    }
2360
2361    /// Sets the value of [name][crate::model::NodePool::name].
2362    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2363        self.name = v.into();
2364        self
2365    }
2366
2367    /// Sets the value of [create_time][crate::model::NodePool::create_time].
2368    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2369        mut self,
2370        v: T,
2371    ) -> Self {
2372        self.create_time = v.into();
2373        self
2374    }
2375
2376    /// Sets the value of [update_time][crate::model::NodePool::update_time].
2377    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2378        mut self,
2379        v: T,
2380    ) -> Self {
2381        self.update_time = v.into();
2382        self
2383    }
2384
2385    /// Sets the value of [labels][crate::model::NodePool::labels].
2386    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2387    where
2388        T: std::iter::IntoIterator<Item = (K, V)>,
2389        K: std::convert::Into<std::string::String>,
2390        V: std::convert::Into<std::string::String>,
2391    {
2392        use std::iter::Iterator;
2393        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2394        self
2395    }
2396
2397    /// Sets the value of [node_location][crate::model::NodePool::node_location].
2398    pub fn set_node_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2399        self.node_location = v.into();
2400        self
2401    }
2402
2403    /// Sets the value of [node_count][crate::model::NodePool::node_count].
2404    pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2405        self.node_count = v.into();
2406        self
2407    }
2408
2409    /// Sets the value of [machine_filter][crate::model::NodePool::machine_filter].
2410    pub fn set_machine_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2411        self.machine_filter = v.into();
2412        self
2413    }
2414
2415    /// Sets the value of [local_disk_encryption][crate::model::NodePool::local_disk_encryption].
2416    pub fn set_local_disk_encryption<
2417        T: std::convert::Into<std::option::Option<crate::model::node_pool::LocalDiskEncryption>>,
2418    >(
2419        mut self,
2420        v: T,
2421    ) -> Self {
2422        self.local_disk_encryption = v.into();
2423        self
2424    }
2425
2426    /// Sets the value of [node_version][crate::model::NodePool::node_version].
2427    pub fn set_node_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2428        self.node_version = v.into();
2429        self
2430    }
2431
2432    /// Sets the value of [node_config][crate::model::NodePool::node_config].
2433    pub fn set_node_config<
2434        T: std::convert::Into<std::option::Option<crate::model::node_pool::NodeConfig>>,
2435    >(
2436        mut self,
2437        v: T,
2438    ) -> Self {
2439        self.node_config = v.into();
2440        self
2441    }
2442}
2443
2444impl wkt::message::Message for NodePool {
2445    fn typename() -> &'static str {
2446        "type.googleapis.com/google.cloud.edgecontainer.v1.NodePool"
2447    }
2448}
2449
2450/// Defines additional types related to [NodePool].
2451pub mod node_pool {
2452    #[allow(unused_imports)]
2453    use super::*;
2454
2455    /// Configuration for CMEK support for edge machine local disk encryption.
2456    #[serde_with::serde_as]
2457    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2458    #[serde(default, rename_all = "camelCase")]
2459    #[non_exhaustive]
2460    pub struct LocalDiskEncryption {
2461        /// Optional. The Cloud KMS CryptoKey e.g.
2462        /// projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
2463        /// to use for protecting node local disks. If not specified, a
2464        /// Google-managed key will be used instead.
2465        #[serde(skip_serializing_if = "std::string::String::is_empty")]
2466        pub kms_key: std::string::String,
2467
2468        /// Output only. The Cloud KMS CryptoKeyVersion currently in use for
2469        /// protecting node local disks. Only applicable if kms_key is set.
2470        #[serde(skip_serializing_if = "std::string::String::is_empty")]
2471        pub kms_key_active_version: std::string::String,
2472
2473        /// Output only. Availability of the Cloud KMS CryptoKey. If not
2474        /// `KEY_AVAILABLE`, then nodes may go offline as they cannot access their
2475        /// local data. This can be caused by a lack of permissions to use the key,
2476        /// or if the key is disabled or deleted.
2477        pub kms_key_state: crate::model::KmsKeyState,
2478
2479        /// Output only. Error status returned by Cloud KMS when using this key. This
2480        /// field may be populated only if `kms_key_state` is not
2481        /// `KMS_KEY_STATE_KEY_AVAILABLE`. If populated, this field contains the
2482        /// error status reported by Cloud KMS.
2483        #[serde(skip_serializing_if = "std::option::Option::is_none")]
2484        pub kms_status: std::option::Option<rpc::model::Status>,
2485
2486        /// Output only. The current resource state associated with the cmek.
2487        pub resource_state: crate::model::ResourceState,
2488
2489        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2490        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2491    }
2492
2493    impl LocalDiskEncryption {
2494        pub fn new() -> Self {
2495            std::default::Default::default()
2496        }
2497
2498        /// Sets the value of [kms_key][crate::model::node_pool::LocalDiskEncryption::kms_key].
2499        pub fn set_kms_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2500            self.kms_key = v.into();
2501            self
2502        }
2503
2504        /// Sets the value of [kms_key_active_version][crate::model::node_pool::LocalDiskEncryption::kms_key_active_version].
2505        pub fn set_kms_key_active_version<T: std::convert::Into<std::string::String>>(
2506            mut self,
2507            v: T,
2508        ) -> Self {
2509            self.kms_key_active_version = v.into();
2510            self
2511        }
2512
2513        /// Sets the value of [kms_key_state][crate::model::node_pool::LocalDiskEncryption::kms_key_state].
2514        pub fn set_kms_key_state<T: std::convert::Into<crate::model::KmsKeyState>>(
2515            mut self,
2516            v: T,
2517        ) -> Self {
2518            self.kms_key_state = v.into();
2519            self
2520        }
2521
2522        /// Sets the value of [kms_status][crate::model::node_pool::LocalDiskEncryption::kms_status].
2523        pub fn set_kms_status<T: std::convert::Into<std::option::Option<rpc::model::Status>>>(
2524            mut self,
2525            v: T,
2526        ) -> Self {
2527            self.kms_status = v.into();
2528            self
2529        }
2530
2531        /// Sets the value of [resource_state][crate::model::node_pool::LocalDiskEncryption::resource_state].
2532        pub fn set_resource_state<T: std::convert::Into<crate::model::ResourceState>>(
2533            mut self,
2534            v: T,
2535        ) -> Self {
2536            self.resource_state = v.into();
2537            self
2538        }
2539    }
2540
2541    impl wkt::message::Message for LocalDiskEncryption {
2542        fn typename() -> &'static str {
2543            "type.googleapis.com/google.cloud.edgecontainer.v1.NodePool.LocalDiskEncryption"
2544        }
2545    }
2546
2547    /// Configuration for each node in the NodePool
2548    #[serde_with::serde_as]
2549    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2550    #[serde(default, rename_all = "camelCase")]
2551    #[non_exhaustive]
2552    pub struct NodeConfig {
2553        /// Optional. The Kubernetes node labels
2554        #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2555        pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2556
2557        /// Optional. Name for the storage schema of worker nodes.
2558        ///
2559        /// Warning: Configurable node local storage schema feature is an
2560        /// experimental feature, and is not recommended for general use
2561        /// in production clusters/nodepools.
2562        #[serde(skip_serializing_if = "std::string::String::is_empty")]
2563        pub node_storage_schema: std::string::String,
2564
2565        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2566        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2567    }
2568
2569    impl NodeConfig {
2570        pub fn new() -> Self {
2571            std::default::Default::default()
2572        }
2573
2574        /// Sets the value of [labels][crate::model::node_pool::NodeConfig::labels].
2575        pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2576        where
2577            T: std::iter::IntoIterator<Item = (K, V)>,
2578            K: std::convert::Into<std::string::String>,
2579            V: std::convert::Into<std::string::String>,
2580        {
2581            use std::iter::Iterator;
2582            self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2583            self
2584        }
2585
2586        /// Sets the value of [node_storage_schema][crate::model::node_pool::NodeConfig::node_storage_schema].
2587        pub fn set_node_storage_schema<T: std::convert::Into<std::string::String>>(
2588            mut self,
2589            v: T,
2590        ) -> Self {
2591            self.node_storage_schema = v.into();
2592            self
2593        }
2594    }
2595
2596    impl wkt::message::Message for NodeConfig {
2597        fn typename() -> &'static str {
2598            "type.googleapis.com/google.cloud.edgecontainer.v1.NodePool.NodeConfig"
2599        }
2600    }
2601}
2602
2603/// A Google Distributed Cloud Edge machine capable of acting as a Kubernetes
2604/// node.
2605#[serde_with::serde_as]
2606#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2607#[serde(default, rename_all = "camelCase")]
2608#[non_exhaustive]
2609pub struct Machine {
2610    /// Required. The resource name of the machine.
2611    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2612    pub name: std::string::String,
2613
2614    /// Output only. The time when the node pool was created.
2615    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2616    pub create_time: std::option::Option<wkt::Timestamp>,
2617
2618    /// Output only. The time when the node pool was last updated.
2619    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2620    pub update_time: std::option::Option<wkt::Timestamp>,
2621
2622    /// Labels associated with this resource.
2623    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2624    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2625
2626    /// Canonical resource name of the node that this machine is responsible for
2627    /// hosting e.g.
2628    /// projects/{project}/locations/{location}/clusters/{cluster_id}/nodePools/{pool_id}/{node},
2629    /// Or empty if the machine is not assigned to assume the role of a node.
2630    ///
2631    /// For control plane nodes hosted on edge machines, this will return
2632    /// the following format:
2633    /// "projects/{project}/locations/{location}/clusters/{cluster_id}/controlPlaneNodes/{node}".
2634    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2635    pub hosted_node: std::string::String,
2636
2637    /// The Google Distributed Cloud Edge zone of this machine.
2638    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2639    pub zone: std::string::String,
2640
2641    /// Output only. The software version of the machine.
2642    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2643    pub version: std::string::String,
2644
2645    /// Output only. Whether the machine is disabled. If disabled, the machine is
2646    /// unable to enter service.
2647    #[serde(skip_serializing_if = "wkt::internal::is_default")]
2648    pub disabled: bool,
2649
2650    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2651    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2652}
2653
2654impl Machine {
2655    pub fn new() -> Self {
2656        std::default::Default::default()
2657    }
2658
2659    /// Sets the value of [name][crate::model::Machine::name].
2660    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2661        self.name = v.into();
2662        self
2663    }
2664
2665    /// Sets the value of [create_time][crate::model::Machine::create_time].
2666    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2667        mut self,
2668        v: T,
2669    ) -> Self {
2670        self.create_time = v.into();
2671        self
2672    }
2673
2674    /// Sets the value of [update_time][crate::model::Machine::update_time].
2675    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2676        mut self,
2677        v: T,
2678    ) -> Self {
2679        self.update_time = v.into();
2680        self
2681    }
2682
2683    /// Sets the value of [labels][crate::model::Machine::labels].
2684    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2685    where
2686        T: std::iter::IntoIterator<Item = (K, V)>,
2687        K: std::convert::Into<std::string::String>,
2688        V: std::convert::Into<std::string::String>,
2689    {
2690        use std::iter::Iterator;
2691        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2692        self
2693    }
2694
2695    /// Sets the value of [hosted_node][crate::model::Machine::hosted_node].
2696    pub fn set_hosted_node<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2697        self.hosted_node = v.into();
2698        self
2699    }
2700
2701    /// Sets the value of [zone][crate::model::Machine::zone].
2702    pub fn set_zone<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2703        self.zone = v.into();
2704        self
2705    }
2706
2707    /// Sets the value of [version][crate::model::Machine::version].
2708    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2709        self.version = v.into();
2710        self
2711    }
2712
2713    /// Sets the value of [disabled][crate::model::Machine::disabled].
2714    pub fn set_disabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2715        self.disabled = v.into();
2716        self
2717    }
2718}
2719
2720impl wkt::message::Message for Machine {
2721    fn typename() -> &'static str {
2722        "type.googleapis.com/google.cloud.edgecontainer.v1.Machine"
2723    }
2724}
2725
2726/// A VPN connection .
2727#[serde_with::serde_as]
2728#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2729#[serde(default, rename_all = "camelCase")]
2730#[non_exhaustive]
2731pub struct VpnConnection {
2732    /// Required. The resource name of VPN connection
2733    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2734    pub name: std::string::String,
2735
2736    /// Output only. The time when the VPN connection was created.
2737    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2738    pub create_time: std::option::Option<wkt::Timestamp>,
2739
2740    /// Output only. The time when the VPN connection was last updated.
2741    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2742    pub update_time: std::option::Option<wkt::Timestamp>,
2743
2744    /// Labels associated with this resource.
2745    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
2746    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
2747
2748    /// NAT gateway IP, or WAN IP address. If a customer has multiple NAT IPs, the
2749    /// customer needs to configure NAT such that only one external IP maps to the
2750    /// GMEC Anthos cluster. This is empty if NAT is not used.
2751    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2752    pub nat_gateway_ip: std::string::String,
2753
2754    /// Dynamic routing mode of the VPC network, `regional` or `global`.
2755    #[deprecated]
2756    pub bgp_routing_mode: crate::model::vpn_connection::BgpRoutingMode,
2757
2758    /// The canonical Cluster name to connect to. It is in the form of
2759    /// projects/{project}/locations/{location}/clusters/{cluster}.
2760    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2761    pub cluster: std::string::String,
2762
2763    /// The network ID of VPC to connect to.
2764    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2765    pub vpc: std::string::String,
2766
2767    /// Optional. Project detail of the VPC network. Required if VPC is in a
2768    /// different project than the cluster project.
2769    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2770    pub vpc_project: std::option::Option<crate::model::vpn_connection::VpcProject>,
2771
2772    /// Whether this VPN connection has HA enabled on cluster side. If enabled,
2773    /// when creating VPN connection we will attempt to use 2 ANG floating IPs.
2774    #[serde(skip_serializing_if = "wkt::internal::is_default")]
2775    pub enable_high_availability: bool,
2776
2777    /// Optional. The VPN connection Cloud Router name.
2778    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2779    pub router: std::string::String,
2780
2781    /// Output only. The created connection details.
2782    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2783    pub details: std::option::Option<crate::model::vpn_connection::Details>,
2784
2785    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2786    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2787}
2788
2789impl VpnConnection {
2790    pub fn new() -> Self {
2791        std::default::Default::default()
2792    }
2793
2794    /// Sets the value of [name][crate::model::VpnConnection::name].
2795    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2796        self.name = v.into();
2797        self
2798    }
2799
2800    /// Sets the value of [create_time][crate::model::VpnConnection::create_time].
2801    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2802        mut self,
2803        v: T,
2804    ) -> Self {
2805        self.create_time = v.into();
2806        self
2807    }
2808
2809    /// Sets the value of [update_time][crate::model::VpnConnection::update_time].
2810    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2811        mut self,
2812        v: T,
2813    ) -> Self {
2814        self.update_time = v.into();
2815        self
2816    }
2817
2818    /// Sets the value of [labels][crate::model::VpnConnection::labels].
2819    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
2820    where
2821        T: std::iter::IntoIterator<Item = (K, V)>,
2822        K: std::convert::Into<std::string::String>,
2823        V: std::convert::Into<std::string::String>,
2824    {
2825        use std::iter::Iterator;
2826        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
2827        self
2828    }
2829
2830    /// Sets the value of [nat_gateway_ip][crate::model::VpnConnection::nat_gateway_ip].
2831    pub fn set_nat_gateway_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2832        self.nat_gateway_ip = v.into();
2833        self
2834    }
2835
2836    /// Sets the value of [bgp_routing_mode][crate::model::VpnConnection::bgp_routing_mode].
2837    #[deprecated]
2838    pub fn set_bgp_routing_mode<
2839        T: std::convert::Into<crate::model::vpn_connection::BgpRoutingMode>,
2840    >(
2841        mut self,
2842        v: T,
2843    ) -> Self {
2844        self.bgp_routing_mode = v.into();
2845        self
2846    }
2847
2848    /// Sets the value of [cluster][crate::model::VpnConnection::cluster].
2849    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2850        self.cluster = v.into();
2851        self
2852    }
2853
2854    /// Sets the value of [vpc][crate::model::VpnConnection::vpc].
2855    pub fn set_vpc<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2856        self.vpc = v.into();
2857        self
2858    }
2859
2860    /// Sets the value of [vpc_project][crate::model::VpnConnection::vpc_project].
2861    pub fn set_vpc_project<
2862        T: std::convert::Into<std::option::Option<crate::model::vpn_connection::VpcProject>>,
2863    >(
2864        mut self,
2865        v: T,
2866    ) -> Self {
2867        self.vpc_project = v.into();
2868        self
2869    }
2870
2871    /// Sets the value of [enable_high_availability][crate::model::VpnConnection::enable_high_availability].
2872    pub fn set_enable_high_availability<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2873        self.enable_high_availability = v.into();
2874        self
2875    }
2876
2877    /// Sets the value of [router][crate::model::VpnConnection::router].
2878    pub fn set_router<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2879        self.router = v.into();
2880        self
2881    }
2882
2883    /// Sets the value of [details][crate::model::VpnConnection::details].
2884    pub fn set_details<
2885        T: std::convert::Into<std::option::Option<crate::model::vpn_connection::Details>>,
2886    >(
2887        mut self,
2888        v: T,
2889    ) -> Self {
2890        self.details = v.into();
2891        self
2892    }
2893}
2894
2895impl wkt::message::Message for VpnConnection {
2896    fn typename() -> &'static str {
2897        "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection"
2898    }
2899}
2900
2901/// Defines additional types related to [VpnConnection].
2902pub mod vpn_connection {
2903    #[allow(unused_imports)]
2904    use super::*;
2905
2906    /// Project detail of the VPC network.
2907    #[serde_with::serde_as]
2908    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2909    #[serde(default, rename_all = "camelCase")]
2910    #[non_exhaustive]
2911    pub struct VpcProject {
2912        /// The project of the VPC to connect to. If not specified, it is the same as
2913        /// the cluster project.
2914        #[serde(skip_serializing_if = "std::string::String::is_empty")]
2915        pub project_id: std::string::String,
2916
2917        /// Optional. Deprecated: do not use.
2918        #[serde(skip_serializing_if = "std::string::String::is_empty")]
2919        #[deprecated]
2920        pub service_account: std::string::String,
2921
2922        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2923        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2924    }
2925
2926    impl VpcProject {
2927        pub fn new() -> Self {
2928            std::default::Default::default()
2929        }
2930
2931        /// Sets the value of [project_id][crate::model::vpn_connection::VpcProject::project_id].
2932        pub fn set_project_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2933            self.project_id = v.into();
2934            self
2935        }
2936
2937        /// Sets the value of [service_account][crate::model::vpn_connection::VpcProject::service_account].
2938        #[deprecated]
2939        pub fn set_service_account<T: std::convert::Into<std::string::String>>(
2940            mut self,
2941            v: T,
2942        ) -> Self {
2943            self.service_account = v.into();
2944            self
2945        }
2946    }
2947
2948    impl wkt::message::Message for VpcProject {
2949        fn typename() -> &'static str {
2950            "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.VpcProject"
2951        }
2952    }
2953
2954    /// The created connection details.
2955    #[serde_with::serde_as]
2956    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2957    #[serde(default, rename_all = "camelCase")]
2958    #[non_exhaustive]
2959    pub struct Details {
2960        /// The state of this connection.
2961        pub state: crate::model::vpn_connection::details::State,
2962
2963        /// The error message. This is only populated when state=ERROR.
2964        #[serde(skip_serializing_if = "std::string::String::is_empty")]
2965        pub error: std::string::String,
2966
2967        /// The Cloud Router info.
2968        #[serde(skip_serializing_if = "std::option::Option::is_none")]
2969        pub cloud_router: std::option::Option<crate::model::vpn_connection::details::CloudRouter>,
2970
2971        /// Each connection has multiple Cloud VPN gateways.
2972        #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2973        pub cloud_vpns: std::vec::Vec<crate::model::vpn_connection::details::CloudVpn>,
2974
2975        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2976        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2977    }
2978
2979    impl Details {
2980        pub fn new() -> Self {
2981            std::default::Default::default()
2982        }
2983
2984        /// Sets the value of [state][crate::model::vpn_connection::Details::state].
2985        pub fn set_state<T: std::convert::Into<crate::model::vpn_connection::details::State>>(
2986            mut self,
2987            v: T,
2988        ) -> Self {
2989            self.state = v.into();
2990            self
2991        }
2992
2993        /// Sets the value of [error][crate::model::vpn_connection::Details::error].
2994        pub fn set_error<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2995            self.error = v.into();
2996            self
2997        }
2998
2999        /// Sets the value of [cloud_router][crate::model::vpn_connection::Details::cloud_router].
3000        pub fn set_cloud_router<
3001            T: std::convert::Into<
3002                    std::option::Option<crate::model::vpn_connection::details::CloudRouter>,
3003                >,
3004        >(
3005            mut self,
3006            v: T,
3007        ) -> Self {
3008            self.cloud_router = v.into();
3009            self
3010        }
3011
3012        /// Sets the value of [cloud_vpns][crate::model::vpn_connection::Details::cloud_vpns].
3013        pub fn set_cloud_vpns<T, V>(mut self, v: T) -> Self
3014        where
3015            T: std::iter::IntoIterator<Item = V>,
3016            V: std::convert::Into<crate::model::vpn_connection::details::CloudVpn>,
3017        {
3018            use std::iter::Iterator;
3019            self.cloud_vpns = v.into_iter().map(|i| i.into()).collect();
3020            self
3021        }
3022    }
3023
3024    impl wkt::message::Message for Details {
3025        fn typename() -> &'static str {
3026            "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.Details"
3027        }
3028    }
3029
3030    /// Defines additional types related to [Details].
3031    pub mod details {
3032        #[allow(unused_imports)]
3033        use super::*;
3034
3035        /// The Cloud Router info.
3036        #[serde_with::serde_as]
3037        #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3038        #[serde(default, rename_all = "camelCase")]
3039        #[non_exhaustive]
3040        pub struct CloudRouter {
3041            /// The associated Cloud Router name.
3042            #[serde(skip_serializing_if = "std::string::String::is_empty")]
3043            pub name: std::string::String,
3044
3045            #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3046            _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3047        }
3048
3049        impl CloudRouter {
3050            pub fn new() -> Self {
3051                std::default::Default::default()
3052            }
3053
3054            /// Sets the value of [name][crate::model::vpn_connection::details::CloudRouter::name].
3055            pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3056                self.name = v.into();
3057                self
3058            }
3059        }
3060
3061        impl wkt::message::Message for CloudRouter {
3062            fn typename() -> &'static str {
3063                "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.Details.CloudRouter"
3064            }
3065        }
3066
3067        /// The Cloud VPN info.
3068        #[serde_with::serde_as]
3069        #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3070        #[serde(default, rename_all = "camelCase")]
3071        #[non_exhaustive]
3072        pub struct CloudVpn {
3073            /// The created Cloud VPN gateway name.
3074            #[serde(skip_serializing_if = "std::string::String::is_empty")]
3075            pub gateway: std::string::String,
3076
3077            #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3078            _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3079        }
3080
3081        impl CloudVpn {
3082            pub fn new() -> Self {
3083                std::default::Default::default()
3084            }
3085
3086            /// Sets the value of [gateway][crate::model::vpn_connection::details::CloudVpn::gateway].
3087            pub fn set_gateway<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3088                self.gateway = v.into();
3089                self
3090            }
3091        }
3092
3093        impl wkt::message::Message for CloudVpn {
3094            fn typename() -> &'static str {
3095                "type.googleapis.com/google.cloud.edgecontainer.v1.VpnConnection.Details.CloudVpn"
3096            }
3097        }
3098
3099        /// The current connection state.
3100        ///
3101        /// # Working with unknown values
3102        ///
3103        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3104        /// additional enum variants at any time. Adding new variants is not considered
3105        /// a breaking change. Applications should write their code in anticipation of:
3106        ///
3107        /// - New values appearing in future releases of the client library, **and**
3108        /// - New values received dynamically, without application changes.
3109        ///
3110        /// Please consult the [Working with enums] section in the user guide for some
3111        /// guidelines.
3112        ///
3113        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3114        #[derive(Clone, Debug, PartialEq)]
3115        #[non_exhaustive]
3116        pub enum State {
3117            /// Unknown.
3118            Unspecified,
3119            /// Connected.
3120            Connected,
3121            /// Still connecting.
3122            Connecting,
3123            /// Error occurred.
3124            Error,
3125            /// If set, the enum was initialized with an unknown value.
3126            ///
3127            /// Applications can examine the value using [State::value] or
3128            /// [State::name].
3129            UnknownValue(state::UnknownValue),
3130        }
3131
3132        #[doc(hidden)]
3133        pub mod state {
3134            #[allow(unused_imports)]
3135            use super::*;
3136            #[derive(Clone, Debug, PartialEq)]
3137            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3138        }
3139
3140        impl State {
3141            /// Gets the enum value.
3142            ///
3143            /// Returns `None` if the enum contains an unknown value deserialized from
3144            /// the string representation of enums.
3145            pub fn value(&self) -> std::option::Option<i32> {
3146                match self {
3147                    Self::Unspecified => std::option::Option::Some(0),
3148                    Self::Connected => std::option::Option::Some(1),
3149                    Self::Connecting => std::option::Option::Some(2),
3150                    Self::Error => std::option::Option::Some(3),
3151                    Self::UnknownValue(u) => u.0.value(),
3152                }
3153            }
3154
3155            /// Gets the enum value as a string.
3156            ///
3157            /// Returns `None` if the enum contains an unknown value deserialized from
3158            /// the integer representation of enums.
3159            pub fn name(&self) -> std::option::Option<&str> {
3160                match self {
3161                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
3162                    Self::Connected => std::option::Option::Some("STATE_CONNECTED"),
3163                    Self::Connecting => std::option::Option::Some("STATE_CONNECTING"),
3164                    Self::Error => std::option::Option::Some("STATE_ERROR"),
3165                    Self::UnknownValue(u) => u.0.name(),
3166                }
3167            }
3168        }
3169
3170        impl std::default::Default for State {
3171            fn default() -> Self {
3172                use std::convert::From;
3173                Self::from(0)
3174            }
3175        }
3176
3177        impl std::fmt::Display for State {
3178            fn fmt(
3179                &self,
3180                f: &mut std::fmt::Formatter<'_>,
3181            ) -> std::result::Result<(), std::fmt::Error> {
3182                wkt::internal::display_enum(f, self.name(), self.value())
3183            }
3184        }
3185
3186        impl std::convert::From<i32> for State {
3187            fn from(value: i32) -> Self {
3188                match value {
3189                    0 => Self::Unspecified,
3190                    1 => Self::Connected,
3191                    2 => Self::Connecting,
3192                    3 => Self::Error,
3193                    _ => Self::UnknownValue(state::UnknownValue(
3194                        wkt::internal::UnknownEnumValue::Integer(value),
3195                    )),
3196                }
3197            }
3198        }
3199
3200        impl std::convert::From<&str> for State {
3201            fn from(value: &str) -> Self {
3202                use std::string::ToString;
3203                match value {
3204                    "STATE_UNSPECIFIED" => Self::Unspecified,
3205                    "STATE_CONNECTED" => Self::Connected,
3206                    "STATE_CONNECTING" => Self::Connecting,
3207                    "STATE_ERROR" => Self::Error,
3208                    _ => Self::UnknownValue(state::UnknownValue(
3209                        wkt::internal::UnknownEnumValue::String(value.to_string()),
3210                    )),
3211                }
3212            }
3213        }
3214
3215        impl serde::ser::Serialize for State {
3216            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3217            where
3218                S: serde::Serializer,
3219            {
3220                match self {
3221                    Self::Unspecified => serializer.serialize_i32(0),
3222                    Self::Connected => serializer.serialize_i32(1),
3223                    Self::Connecting => serializer.serialize_i32(2),
3224                    Self::Error => serializer.serialize_i32(3),
3225                    Self::UnknownValue(u) => u.0.serialize(serializer),
3226                }
3227            }
3228        }
3229
3230        impl<'de> serde::de::Deserialize<'de> for State {
3231            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3232            where
3233                D: serde::Deserializer<'de>,
3234            {
3235                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
3236                    ".google.cloud.edgecontainer.v1.VpnConnection.Details.State",
3237                ))
3238            }
3239        }
3240    }
3241
3242    /// Routing mode.
3243    ///
3244    /// # Working with unknown values
3245    ///
3246    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3247    /// additional enum variants at any time. Adding new variants is not considered
3248    /// a breaking change. Applications should write their code in anticipation of:
3249    ///
3250    /// - New values appearing in future releases of the client library, **and**
3251    /// - New values received dynamically, without application changes.
3252    ///
3253    /// Please consult the [Working with enums] section in the user guide for some
3254    /// guidelines.
3255    ///
3256    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3257    #[derive(Clone, Debug, PartialEq)]
3258    #[non_exhaustive]
3259    pub enum BgpRoutingMode {
3260        /// Unknown.
3261        Unspecified,
3262        /// Regional mode.
3263        Regional,
3264        /// Global mode.
3265        Global,
3266        /// If set, the enum was initialized with an unknown value.
3267        ///
3268        /// Applications can examine the value using [BgpRoutingMode::value] or
3269        /// [BgpRoutingMode::name].
3270        UnknownValue(bgp_routing_mode::UnknownValue),
3271    }
3272
3273    #[doc(hidden)]
3274    pub mod bgp_routing_mode {
3275        #[allow(unused_imports)]
3276        use super::*;
3277        #[derive(Clone, Debug, PartialEq)]
3278        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3279    }
3280
3281    impl BgpRoutingMode {
3282        /// Gets the enum value.
3283        ///
3284        /// Returns `None` if the enum contains an unknown value deserialized from
3285        /// the string representation of enums.
3286        pub fn value(&self) -> std::option::Option<i32> {
3287            match self {
3288                Self::Unspecified => std::option::Option::Some(0),
3289                Self::Regional => std::option::Option::Some(1),
3290                Self::Global => std::option::Option::Some(2),
3291                Self::UnknownValue(u) => u.0.value(),
3292            }
3293        }
3294
3295        /// Gets the enum value as a string.
3296        ///
3297        /// Returns `None` if the enum contains an unknown value deserialized from
3298        /// the integer representation of enums.
3299        pub fn name(&self) -> std::option::Option<&str> {
3300            match self {
3301                Self::Unspecified => std::option::Option::Some("BGP_ROUTING_MODE_UNSPECIFIED"),
3302                Self::Regional => std::option::Option::Some("REGIONAL"),
3303                Self::Global => std::option::Option::Some("GLOBAL"),
3304                Self::UnknownValue(u) => u.0.name(),
3305            }
3306        }
3307    }
3308
3309    impl std::default::Default for BgpRoutingMode {
3310        fn default() -> Self {
3311            use std::convert::From;
3312            Self::from(0)
3313        }
3314    }
3315
3316    impl std::fmt::Display for BgpRoutingMode {
3317        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3318            wkt::internal::display_enum(f, self.name(), self.value())
3319        }
3320    }
3321
3322    impl std::convert::From<i32> for BgpRoutingMode {
3323        fn from(value: i32) -> Self {
3324            match value {
3325                0 => Self::Unspecified,
3326                1 => Self::Regional,
3327                2 => Self::Global,
3328                _ => Self::UnknownValue(bgp_routing_mode::UnknownValue(
3329                    wkt::internal::UnknownEnumValue::Integer(value),
3330                )),
3331            }
3332        }
3333    }
3334
3335    impl std::convert::From<&str> for BgpRoutingMode {
3336        fn from(value: &str) -> Self {
3337            use std::string::ToString;
3338            match value {
3339                "BGP_ROUTING_MODE_UNSPECIFIED" => Self::Unspecified,
3340                "REGIONAL" => Self::Regional,
3341                "GLOBAL" => Self::Global,
3342                _ => Self::UnknownValue(bgp_routing_mode::UnknownValue(
3343                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3344                )),
3345            }
3346        }
3347    }
3348
3349    impl serde::ser::Serialize for BgpRoutingMode {
3350        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3351        where
3352            S: serde::Serializer,
3353        {
3354            match self {
3355                Self::Unspecified => serializer.serialize_i32(0),
3356                Self::Regional => serializer.serialize_i32(1),
3357                Self::Global => serializer.serialize_i32(2),
3358                Self::UnknownValue(u) => u.0.serialize(serializer),
3359            }
3360        }
3361    }
3362
3363    impl<'de> serde::de::Deserialize<'de> for BgpRoutingMode {
3364        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3365        where
3366            D: serde::Deserializer<'de>,
3367        {
3368            deserializer.deserialize_any(wkt::internal::EnumVisitor::<BgpRoutingMode>::new(
3369                ".google.cloud.edgecontainer.v1.VpnConnection.BgpRoutingMode",
3370            ))
3371        }
3372    }
3373}
3374
3375/// Metadata for a given
3376/// [google.cloud.location.Location][google.cloud.location.Location].
3377///
3378/// [google.cloud.location.Location]: location::model::Location
3379#[serde_with::serde_as]
3380#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3381#[serde(default, rename_all = "camelCase")]
3382#[non_exhaustive]
3383pub struct LocationMetadata {
3384    /// The set of available Google Distributed Cloud Edge zones in the location.
3385    /// The map is keyed by the lowercase ID of each zone.
3386    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
3387    pub available_zones: std::collections::HashMap<std::string::String, crate::model::ZoneMetadata>,
3388
3389    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3390    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3391}
3392
3393impl LocationMetadata {
3394    pub fn new() -> Self {
3395        std::default::Default::default()
3396    }
3397
3398    /// Sets the value of [available_zones][crate::model::LocationMetadata::available_zones].
3399    pub fn set_available_zones<T, K, V>(mut self, v: T) -> Self
3400    where
3401        T: std::iter::IntoIterator<Item = (K, V)>,
3402        K: std::convert::Into<std::string::String>,
3403        V: std::convert::Into<crate::model::ZoneMetadata>,
3404    {
3405        use std::iter::Iterator;
3406        self.available_zones = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3407        self
3408    }
3409}
3410
3411impl wkt::message::Message for LocationMetadata {
3412    fn typename() -> &'static str {
3413        "type.googleapis.com/google.cloud.edgecontainer.v1.LocationMetadata"
3414    }
3415}
3416
3417/// A Google Distributed Cloud Edge zone where edge machines are located.
3418#[serde_with::serde_as]
3419#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3420#[serde(default, rename_all = "camelCase")]
3421#[non_exhaustive]
3422pub struct ZoneMetadata {
3423    /// Quota for resources in this zone.
3424    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3425    pub quota: std::vec::Vec<crate::model::Quota>,
3426
3427    /// The map keyed by rack name and has value of RackType.
3428    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
3429    pub rack_types:
3430        std::collections::HashMap<std::string::String, crate::model::zone_metadata::RackType>,
3431
3432    /// Config data for the zone.
3433    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3434    pub config_data: std::option::Option<crate::model::ConfigData>,
3435
3436    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3437    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3438}
3439
3440impl ZoneMetadata {
3441    pub fn new() -> Self {
3442        std::default::Default::default()
3443    }
3444
3445    /// Sets the value of [quota][crate::model::ZoneMetadata::quota].
3446    pub fn set_quota<T, V>(mut self, v: T) -> Self
3447    where
3448        T: std::iter::IntoIterator<Item = V>,
3449        V: std::convert::Into<crate::model::Quota>,
3450    {
3451        use std::iter::Iterator;
3452        self.quota = v.into_iter().map(|i| i.into()).collect();
3453        self
3454    }
3455
3456    /// Sets the value of [rack_types][crate::model::ZoneMetadata::rack_types].
3457    pub fn set_rack_types<T, K, V>(mut self, v: T) -> Self
3458    where
3459        T: std::iter::IntoIterator<Item = (K, V)>,
3460        K: std::convert::Into<std::string::String>,
3461        V: std::convert::Into<crate::model::zone_metadata::RackType>,
3462    {
3463        use std::iter::Iterator;
3464        self.rack_types = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3465        self
3466    }
3467
3468    /// Sets the value of [config_data][crate::model::ZoneMetadata::config_data].
3469    pub fn set_config_data<T: std::convert::Into<std::option::Option<crate::model::ConfigData>>>(
3470        mut self,
3471        v: T,
3472    ) -> Self {
3473        self.config_data = v.into();
3474        self
3475    }
3476}
3477
3478impl wkt::message::Message for ZoneMetadata {
3479    fn typename() -> &'static str {
3480        "type.googleapis.com/google.cloud.edgecontainer.v1.ZoneMetadata"
3481    }
3482}
3483
3484/// Defines additional types related to [ZoneMetadata].
3485pub mod zone_metadata {
3486    #[allow(unused_imports)]
3487    use super::*;
3488
3489    /// Type of the rack.
3490    ///
3491    /// # Working with unknown values
3492    ///
3493    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3494    /// additional enum variants at any time. Adding new variants is not considered
3495    /// a breaking change. Applications should write their code in anticipation of:
3496    ///
3497    /// - New values appearing in future releases of the client library, **and**
3498    /// - New values received dynamically, without application changes.
3499    ///
3500    /// Please consult the [Working with enums] section in the user guide for some
3501    /// guidelines.
3502    ///
3503    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3504    #[derive(Clone, Debug, PartialEq)]
3505    #[non_exhaustive]
3506    pub enum RackType {
3507        /// Unspecified rack type, single rack also belongs to this type.
3508        Unspecified,
3509        /// Base rack type, a pair of two modified Config-1 racks containing
3510        /// Aggregation switches.
3511        Base,
3512        /// Expansion rack type, also known as standalone racks,
3513        /// added by customers on demand.
3514        Expansion,
3515        /// If set, the enum was initialized with an unknown value.
3516        ///
3517        /// Applications can examine the value using [RackType::value] or
3518        /// [RackType::name].
3519        UnknownValue(rack_type::UnknownValue),
3520    }
3521
3522    #[doc(hidden)]
3523    pub mod rack_type {
3524        #[allow(unused_imports)]
3525        use super::*;
3526        #[derive(Clone, Debug, PartialEq)]
3527        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3528    }
3529
3530    impl RackType {
3531        /// Gets the enum value.
3532        ///
3533        /// Returns `None` if the enum contains an unknown value deserialized from
3534        /// the string representation of enums.
3535        pub fn value(&self) -> std::option::Option<i32> {
3536            match self {
3537                Self::Unspecified => std::option::Option::Some(0),
3538                Self::Base => std::option::Option::Some(1),
3539                Self::Expansion => std::option::Option::Some(2),
3540                Self::UnknownValue(u) => u.0.value(),
3541            }
3542        }
3543
3544        /// Gets the enum value as a string.
3545        ///
3546        /// Returns `None` if the enum contains an unknown value deserialized from
3547        /// the integer representation of enums.
3548        pub fn name(&self) -> std::option::Option<&str> {
3549            match self {
3550                Self::Unspecified => std::option::Option::Some("RACK_TYPE_UNSPECIFIED"),
3551                Self::Base => std::option::Option::Some("BASE"),
3552                Self::Expansion => std::option::Option::Some("EXPANSION"),
3553                Self::UnknownValue(u) => u.0.name(),
3554            }
3555        }
3556    }
3557
3558    impl std::default::Default for RackType {
3559        fn default() -> Self {
3560            use std::convert::From;
3561            Self::from(0)
3562        }
3563    }
3564
3565    impl std::fmt::Display for RackType {
3566        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
3567            wkt::internal::display_enum(f, self.name(), self.value())
3568        }
3569    }
3570
3571    impl std::convert::From<i32> for RackType {
3572        fn from(value: i32) -> Self {
3573            match value {
3574                0 => Self::Unspecified,
3575                1 => Self::Base,
3576                2 => Self::Expansion,
3577                _ => Self::UnknownValue(rack_type::UnknownValue(
3578                    wkt::internal::UnknownEnumValue::Integer(value),
3579                )),
3580            }
3581        }
3582    }
3583
3584    impl std::convert::From<&str> for RackType {
3585        fn from(value: &str) -> Self {
3586            use std::string::ToString;
3587            match value {
3588                "RACK_TYPE_UNSPECIFIED" => Self::Unspecified,
3589                "BASE" => Self::Base,
3590                "EXPANSION" => Self::Expansion,
3591                _ => Self::UnknownValue(rack_type::UnknownValue(
3592                    wkt::internal::UnknownEnumValue::String(value.to_string()),
3593                )),
3594            }
3595        }
3596    }
3597
3598    impl serde::ser::Serialize for RackType {
3599        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3600        where
3601            S: serde::Serializer,
3602        {
3603            match self {
3604                Self::Unspecified => serializer.serialize_i32(0),
3605                Self::Base => serializer.serialize_i32(1),
3606                Self::Expansion => serializer.serialize_i32(2),
3607                Self::UnknownValue(u) => u.0.serialize(serializer),
3608            }
3609        }
3610    }
3611
3612    impl<'de> serde::de::Deserialize<'de> for RackType {
3613        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
3614        where
3615            D: serde::Deserializer<'de>,
3616        {
3617            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RackType>::new(
3618                ".google.cloud.edgecontainer.v1.ZoneMetadata.RackType",
3619            ))
3620        }
3621    }
3622}
3623
3624/// Config data holds all the config related data for the zone.
3625#[serde_with::serde_as]
3626#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3627#[serde(default, rename_all = "camelCase")]
3628#[non_exhaustive]
3629pub struct ConfigData {
3630    /// list of available v4 ip pools for external loadbalancer
3631    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3632    pub available_external_lb_pools_ipv4: std::vec::Vec<std::string::String>,
3633
3634    /// list of available v6 ip pools for external loadbalancer
3635    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3636    pub available_external_lb_pools_ipv6: std::vec::Vec<std::string::String>,
3637
3638    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3639    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3640}
3641
3642impl ConfigData {
3643    pub fn new() -> Self {
3644        std::default::Default::default()
3645    }
3646
3647    /// Sets the value of [available_external_lb_pools_ipv4][crate::model::ConfigData::available_external_lb_pools_ipv4].
3648    pub fn set_available_external_lb_pools_ipv4<T, V>(mut self, v: T) -> Self
3649    where
3650        T: std::iter::IntoIterator<Item = V>,
3651        V: std::convert::Into<std::string::String>,
3652    {
3653        use std::iter::Iterator;
3654        self.available_external_lb_pools_ipv4 = v.into_iter().map(|i| i.into()).collect();
3655        self
3656    }
3657
3658    /// Sets the value of [available_external_lb_pools_ipv6][crate::model::ConfigData::available_external_lb_pools_ipv6].
3659    pub fn set_available_external_lb_pools_ipv6<T, V>(mut self, v: T) -> Self
3660    where
3661        T: std::iter::IntoIterator<Item = V>,
3662        V: std::convert::Into<std::string::String>,
3663    {
3664        use std::iter::Iterator;
3665        self.available_external_lb_pools_ipv6 = v.into_iter().map(|i| i.into()).collect();
3666        self
3667    }
3668}
3669
3670impl wkt::message::Message for ConfigData {
3671    fn typename() -> &'static str {
3672        "type.googleapis.com/google.cloud.edgecontainer.v1.ConfigData"
3673    }
3674}
3675
3676/// Represents quota for Edge Container resources.
3677#[serde_with::serde_as]
3678#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3679#[serde(default, rename_all = "camelCase")]
3680#[non_exhaustive]
3681pub struct Quota {
3682    /// Name of the quota metric.
3683    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3684    pub metric: std::string::String,
3685
3686    /// Quota limit for this metric.
3687    #[serde(skip_serializing_if = "wkt::internal::is_default")]
3688    #[serde_as(as = "wkt::internal::F64")]
3689    pub limit: f64,
3690
3691    /// Current usage of this metric.
3692    #[serde(skip_serializing_if = "wkt::internal::is_default")]
3693    #[serde_as(as = "wkt::internal::F64")]
3694    pub usage: f64,
3695
3696    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3697    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3698}
3699
3700impl Quota {
3701    pub fn new() -> Self {
3702        std::default::Default::default()
3703    }
3704
3705    /// Sets the value of [metric][crate::model::Quota::metric].
3706    pub fn set_metric<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3707        self.metric = v.into();
3708        self
3709    }
3710
3711    /// Sets the value of [limit][crate::model::Quota::limit].
3712    pub fn set_limit<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3713        self.limit = v.into();
3714        self
3715    }
3716
3717    /// Sets the value of [usage][crate::model::Quota::usage].
3718    pub fn set_usage<T: std::convert::Into<f64>>(mut self, v: T) -> Self {
3719        self.usage = v.into();
3720        self
3721    }
3722}
3723
3724impl wkt::message::Message for Quota {
3725    fn typename() -> &'static str {
3726        "type.googleapis.com/google.cloud.edgecontainer.v1.Quota"
3727    }
3728}
3729
3730/// Maintenance policy configuration.
3731#[serde_with::serde_as]
3732#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3733#[serde(default, rename_all = "camelCase")]
3734#[non_exhaustive]
3735pub struct MaintenancePolicy {
3736    /// Specifies the maintenance window in which maintenance may be performed.
3737    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3738    pub window: std::option::Option<crate::model::MaintenanceWindow>,
3739
3740    /// Optional. Exclusions to automatic maintenance. Non-emergency maintenance
3741    /// should not occur in these windows. Each exclusion has a unique name and may
3742    /// be active or expired. The max number of maintenance exclusions allowed at a
3743    /// given time is 3.
3744    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3745    pub maintenance_exclusions: std::vec::Vec<crate::model::MaintenanceExclusionWindow>,
3746
3747    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3748    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3749}
3750
3751impl MaintenancePolicy {
3752    pub fn new() -> Self {
3753        std::default::Default::default()
3754    }
3755
3756    /// Sets the value of [window][crate::model::MaintenancePolicy::window].
3757    pub fn set_window<
3758        T: std::convert::Into<std::option::Option<crate::model::MaintenanceWindow>>,
3759    >(
3760        mut self,
3761        v: T,
3762    ) -> Self {
3763        self.window = v.into();
3764        self
3765    }
3766
3767    /// Sets the value of [maintenance_exclusions][crate::model::MaintenancePolicy::maintenance_exclusions].
3768    pub fn set_maintenance_exclusions<T, V>(mut self, v: T) -> Self
3769    where
3770        T: std::iter::IntoIterator<Item = V>,
3771        V: std::convert::Into<crate::model::MaintenanceExclusionWindow>,
3772    {
3773        use std::iter::Iterator;
3774        self.maintenance_exclusions = v.into_iter().map(|i| i.into()).collect();
3775        self
3776    }
3777}
3778
3779impl wkt::message::Message for MaintenancePolicy {
3780    fn typename() -> &'static str {
3781        "type.googleapis.com/google.cloud.edgecontainer.v1.MaintenancePolicy"
3782    }
3783}
3784
3785/// Maintenance window configuration
3786#[serde_with::serde_as]
3787#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3788#[serde(default, rename_all = "camelCase")]
3789#[non_exhaustive]
3790pub struct MaintenanceWindow {
3791    /// Configuration of a recurring maintenance window.
3792    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3793    pub recurring_window: std::option::Option<crate::model::RecurringTimeWindow>,
3794
3795    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3796    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3797}
3798
3799impl MaintenanceWindow {
3800    pub fn new() -> Self {
3801        std::default::Default::default()
3802    }
3803
3804    /// Sets the value of [recurring_window][crate::model::MaintenanceWindow::recurring_window].
3805    pub fn set_recurring_window<
3806        T: std::convert::Into<std::option::Option<crate::model::RecurringTimeWindow>>,
3807    >(
3808        mut self,
3809        v: T,
3810    ) -> Self {
3811        self.recurring_window = v.into();
3812        self
3813    }
3814}
3815
3816impl wkt::message::Message for MaintenanceWindow {
3817    fn typename() -> &'static str {
3818        "type.googleapis.com/google.cloud.edgecontainer.v1.MaintenanceWindow"
3819    }
3820}
3821
3822/// Represents an arbitrary window of time that recurs.
3823#[serde_with::serde_as]
3824#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3825#[serde(default, rename_all = "camelCase")]
3826#[non_exhaustive]
3827pub struct RecurringTimeWindow {
3828    /// The window of the first recurrence.
3829    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3830    pub window: std::option::Option<crate::model::TimeWindow>,
3831
3832    /// An RRULE (<https://tools.ietf.org/html/rfc5545#section-3.8.5.3>) for how
3833    /// this window recurs. They go on for the span of time between the start and
3834    /// end time.
3835    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3836    pub recurrence: std::string::String,
3837
3838    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3839    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3840}
3841
3842impl RecurringTimeWindow {
3843    pub fn new() -> Self {
3844        std::default::Default::default()
3845    }
3846
3847    /// Sets the value of [window][crate::model::RecurringTimeWindow::window].
3848    pub fn set_window<T: std::convert::Into<std::option::Option<crate::model::TimeWindow>>>(
3849        mut self,
3850        v: T,
3851    ) -> Self {
3852        self.window = v.into();
3853        self
3854    }
3855
3856    /// Sets the value of [recurrence][crate::model::RecurringTimeWindow::recurrence].
3857    pub fn set_recurrence<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3858        self.recurrence = v.into();
3859        self
3860    }
3861}
3862
3863impl wkt::message::Message for RecurringTimeWindow {
3864    fn typename() -> &'static str {
3865        "type.googleapis.com/google.cloud.edgecontainer.v1.RecurringTimeWindow"
3866    }
3867}
3868
3869/// Represents a maintenance exclusion window.
3870#[serde_with::serde_as]
3871#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3872#[serde(default, rename_all = "camelCase")]
3873#[non_exhaustive]
3874pub struct MaintenanceExclusionWindow {
3875    /// Optional. The time window.
3876    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3877    pub window: std::option::Option<crate::model::TimeWindow>,
3878
3879    /// Optional. A unique (per cluster) id for the window.
3880    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3881    pub id: std::string::String,
3882
3883    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3884    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3885}
3886
3887impl MaintenanceExclusionWindow {
3888    pub fn new() -> Self {
3889        std::default::Default::default()
3890    }
3891
3892    /// Sets the value of [window][crate::model::MaintenanceExclusionWindow::window].
3893    pub fn set_window<T: std::convert::Into<std::option::Option<crate::model::TimeWindow>>>(
3894        mut self,
3895        v: T,
3896    ) -> Self {
3897        self.window = v.into();
3898        self
3899    }
3900
3901    /// Sets the value of [id][crate::model::MaintenanceExclusionWindow::id].
3902    pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3903        self.id = v.into();
3904        self
3905    }
3906}
3907
3908impl wkt::message::Message for MaintenanceExclusionWindow {
3909    fn typename() -> &'static str {
3910        "type.googleapis.com/google.cloud.edgecontainer.v1.MaintenanceExclusionWindow"
3911    }
3912}
3913
3914/// Represents an arbitrary window of time.
3915#[serde_with::serde_as]
3916#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3917#[serde(default, rename_all = "camelCase")]
3918#[non_exhaustive]
3919pub struct TimeWindow {
3920    /// The time that the window first starts.
3921    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3922    pub start_time: std::option::Option<wkt::Timestamp>,
3923
3924    /// The time that the window ends. The end time must take place after the
3925    /// start time.
3926    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3927    pub end_time: std::option::Option<wkt::Timestamp>,
3928
3929    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3930    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3931}
3932
3933impl TimeWindow {
3934    pub fn new() -> Self {
3935        std::default::Default::default()
3936    }
3937
3938    /// Sets the value of [start_time][crate::model::TimeWindow::start_time].
3939    pub fn set_start_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3940        mut self,
3941        v: T,
3942    ) -> Self {
3943        self.start_time = v.into();
3944        self
3945    }
3946
3947    /// Sets the value of [end_time][crate::model::TimeWindow::end_time].
3948    pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3949        mut self,
3950        v: T,
3951    ) -> Self {
3952        self.end_time = v.into();
3953        self
3954    }
3955}
3956
3957impl wkt::message::Message for TimeWindow {
3958    fn typename() -> &'static str {
3959        "type.googleapis.com/google.cloud.edgecontainer.v1.TimeWindow"
3960    }
3961}
3962
3963/// Server configuration for supported versions and release channels.
3964#[serde_with::serde_as]
3965#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3966#[serde(default, rename_all = "camelCase")]
3967#[non_exhaustive]
3968pub struct ServerConfig {
3969    /// Output only. Mapping from release channel to channel config.
3970    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
3971    pub channels: std::collections::HashMap<std::string::String, crate::model::ChannelConfig>,
3972
3973    /// Output only. Supported versions, e.g.: ["1.4.0", "1.5.0"].
3974    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3975    pub versions: std::vec::Vec<crate::model::Version>,
3976
3977    /// Output only. Default version, e.g.: "1.4.0".
3978    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3979    pub default_version: std::string::String,
3980
3981    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3982    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3983}
3984
3985impl ServerConfig {
3986    pub fn new() -> Self {
3987        std::default::Default::default()
3988    }
3989
3990    /// Sets the value of [channels][crate::model::ServerConfig::channels].
3991    pub fn set_channels<T, K, V>(mut self, v: T) -> Self
3992    where
3993        T: std::iter::IntoIterator<Item = (K, V)>,
3994        K: std::convert::Into<std::string::String>,
3995        V: std::convert::Into<crate::model::ChannelConfig>,
3996    {
3997        use std::iter::Iterator;
3998        self.channels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
3999        self
4000    }
4001
4002    /// Sets the value of [versions][crate::model::ServerConfig::versions].
4003    pub fn set_versions<T, V>(mut self, v: T) -> Self
4004    where
4005        T: std::iter::IntoIterator<Item = V>,
4006        V: std::convert::Into<crate::model::Version>,
4007    {
4008        use std::iter::Iterator;
4009        self.versions = v.into_iter().map(|i| i.into()).collect();
4010        self
4011    }
4012
4013    /// Sets the value of [default_version][crate::model::ServerConfig::default_version].
4014    pub fn set_default_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4015        self.default_version = v.into();
4016        self
4017    }
4018}
4019
4020impl wkt::message::Message for ServerConfig {
4021    fn typename() -> &'static str {
4022        "type.googleapis.com/google.cloud.edgecontainer.v1.ServerConfig"
4023    }
4024}
4025
4026/// Configuration for a release channel.
4027#[serde_with::serde_as]
4028#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4029#[serde(default, rename_all = "camelCase")]
4030#[non_exhaustive]
4031pub struct ChannelConfig {
4032    /// Output only. Default version for this release channel, e.g.: "1.4.0".
4033    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4034    pub default_version: std::string::String,
4035
4036    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4037    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4038}
4039
4040impl ChannelConfig {
4041    pub fn new() -> Self {
4042        std::default::Default::default()
4043    }
4044
4045    /// Sets the value of [default_version][crate::model::ChannelConfig::default_version].
4046    pub fn set_default_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4047        self.default_version = v.into();
4048        self
4049    }
4050}
4051
4052impl wkt::message::Message for ChannelConfig {
4053    fn typename() -> &'static str {
4054        "type.googleapis.com/google.cloud.edgecontainer.v1.ChannelConfig"
4055    }
4056}
4057
4058/// Version of a cluster.
4059#[serde_with::serde_as]
4060#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4061#[serde(default, rename_all = "camelCase")]
4062#[non_exhaustive]
4063pub struct Version {
4064    /// Output only. Name of the version, e.g.: "1.4.0".
4065    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4066    pub name: std::string::String,
4067
4068    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4069    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4070}
4071
4072impl Version {
4073    pub fn new() -> Self {
4074        std::default::Default::default()
4075    }
4076
4077    /// Sets the value of [name][crate::model::Version::name].
4078    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4079        self.name = v.into();
4080        self
4081    }
4082}
4083
4084impl wkt::message::Message for Version {
4085    fn typename() -> &'static str {
4086        "type.googleapis.com/google.cloud.edgecontainer.v1.Version"
4087    }
4088}
4089
4090/// Long-running operation metadata for Edge Container API methods.
4091#[serde_with::serde_as]
4092#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4093#[serde(default, rename_all = "camelCase")]
4094#[non_exhaustive]
4095pub struct OperationMetadata {
4096    /// The time the operation was created.
4097    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4098    pub create_time: std::option::Option<wkt::Timestamp>,
4099
4100    /// The time the operation finished running.
4101    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4102    pub end_time: std::option::Option<wkt::Timestamp>,
4103
4104    /// Server-defined resource path for the target of the operation.
4105    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4106    pub target: std::string::String,
4107
4108    /// The verb executed by the operation.
4109    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4110    pub verb: std::string::String,
4111
4112    /// Human-readable status of the operation, if any.
4113    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4114    pub status_message: std::string::String,
4115
4116    /// Identifies whether the user has requested cancellation of the operation.
4117    /// Operations that have successfully been cancelled have [Operation.error][]
4118    /// value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
4119    /// corresponding to `Code.CANCELLED`.
4120    ///
4121    /// [google.rpc.Status.code]: rpc::model::Status::code
4122    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4123    pub requested_cancellation: bool,
4124
4125    /// API version used to start the operation.
4126    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4127    pub api_version: std::string::String,
4128
4129    /// Warnings that do not block the operation, but still hold relevant
4130    /// information for the end user to receive.
4131    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4132    pub warnings: std::vec::Vec<std::string::String>,
4133
4134    /// Machine-readable status of the operation, if any.
4135    pub status_reason: crate::model::operation_metadata::StatusReason,
4136
4137    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4138    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4139}
4140
4141impl OperationMetadata {
4142    pub fn new() -> Self {
4143        std::default::Default::default()
4144    }
4145
4146    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
4147    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
4148        mut self,
4149        v: T,
4150    ) -> Self {
4151        self.create_time = v.into();
4152        self
4153    }
4154
4155    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
4156    pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
4157        mut self,
4158        v: T,
4159    ) -> Self {
4160        self.end_time = v.into();
4161        self
4162    }
4163
4164    /// Sets the value of [target][crate::model::OperationMetadata::target].
4165    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4166        self.target = v.into();
4167        self
4168    }
4169
4170    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
4171    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4172        self.verb = v.into();
4173        self
4174    }
4175
4176    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
4177    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4178        self.status_message = v.into();
4179        self
4180    }
4181
4182    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
4183    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4184        self.requested_cancellation = v.into();
4185        self
4186    }
4187
4188    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
4189    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4190        self.api_version = v.into();
4191        self
4192    }
4193
4194    /// Sets the value of [warnings][crate::model::OperationMetadata::warnings].
4195    pub fn set_warnings<T, V>(mut self, v: T) -> Self
4196    where
4197        T: std::iter::IntoIterator<Item = V>,
4198        V: std::convert::Into<std::string::String>,
4199    {
4200        use std::iter::Iterator;
4201        self.warnings = v.into_iter().map(|i| i.into()).collect();
4202        self
4203    }
4204
4205    /// Sets the value of [status_reason][crate::model::OperationMetadata::status_reason].
4206    pub fn set_status_reason<
4207        T: std::convert::Into<crate::model::operation_metadata::StatusReason>,
4208    >(
4209        mut self,
4210        v: T,
4211    ) -> Self {
4212        self.status_reason = v.into();
4213        self
4214    }
4215}
4216
4217impl wkt::message::Message for OperationMetadata {
4218    fn typename() -> &'static str {
4219        "type.googleapis.com/google.cloud.edgecontainer.v1.OperationMetadata"
4220    }
4221}
4222
4223/// Defines additional types related to [OperationMetadata].
4224pub mod operation_metadata {
4225    #[allow(unused_imports)]
4226    use super::*;
4227
4228    /// Indicates the reason for the status of the operation.
4229    ///
4230    /// # Working with unknown values
4231    ///
4232    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4233    /// additional enum variants at any time. Adding new variants is not considered
4234    /// a breaking change. Applications should write their code in anticipation of:
4235    ///
4236    /// - New values appearing in future releases of the client library, **and**
4237    /// - New values received dynamically, without application changes.
4238    ///
4239    /// Please consult the [Working with enums] section in the user guide for some
4240    /// guidelines.
4241    ///
4242    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4243    #[derive(Clone, Debug, PartialEq)]
4244    #[non_exhaustive]
4245    pub enum StatusReason {
4246        /// Reason unknown.
4247        Unspecified,
4248        /// The cluster upgrade is currently paused.
4249        UpgradePaused,
4250        /// If set, the enum was initialized with an unknown value.
4251        ///
4252        /// Applications can examine the value using [StatusReason::value] or
4253        /// [StatusReason::name].
4254        UnknownValue(status_reason::UnknownValue),
4255    }
4256
4257    #[doc(hidden)]
4258    pub mod status_reason {
4259        #[allow(unused_imports)]
4260        use super::*;
4261        #[derive(Clone, Debug, PartialEq)]
4262        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4263    }
4264
4265    impl StatusReason {
4266        /// Gets the enum value.
4267        ///
4268        /// Returns `None` if the enum contains an unknown value deserialized from
4269        /// the string representation of enums.
4270        pub fn value(&self) -> std::option::Option<i32> {
4271            match self {
4272                Self::Unspecified => std::option::Option::Some(0),
4273                Self::UpgradePaused => std::option::Option::Some(1),
4274                Self::UnknownValue(u) => u.0.value(),
4275            }
4276        }
4277
4278        /// Gets the enum value as a string.
4279        ///
4280        /// Returns `None` if the enum contains an unknown value deserialized from
4281        /// the integer representation of enums.
4282        pub fn name(&self) -> std::option::Option<&str> {
4283            match self {
4284                Self::Unspecified => std::option::Option::Some("STATUS_REASON_UNSPECIFIED"),
4285                Self::UpgradePaused => std::option::Option::Some("UPGRADE_PAUSED"),
4286                Self::UnknownValue(u) => u.0.name(),
4287            }
4288        }
4289    }
4290
4291    impl std::default::Default for StatusReason {
4292        fn default() -> Self {
4293            use std::convert::From;
4294            Self::from(0)
4295        }
4296    }
4297
4298    impl std::fmt::Display for StatusReason {
4299        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4300            wkt::internal::display_enum(f, self.name(), self.value())
4301        }
4302    }
4303
4304    impl std::convert::From<i32> for StatusReason {
4305        fn from(value: i32) -> Self {
4306            match value {
4307                0 => Self::Unspecified,
4308                1 => Self::UpgradePaused,
4309                _ => Self::UnknownValue(status_reason::UnknownValue(
4310                    wkt::internal::UnknownEnumValue::Integer(value),
4311                )),
4312            }
4313        }
4314    }
4315
4316    impl std::convert::From<&str> for StatusReason {
4317        fn from(value: &str) -> Self {
4318            use std::string::ToString;
4319            match value {
4320                "STATUS_REASON_UNSPECIFIED" => Self::Unspecified,
4321                "UPGRADE_PAUSED" => Self::UpgradePaused,
4322                _ => Self::UnknownValue(status_reason::UnknownValue(
4323                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4324                )),
4325            }
4326        }
4327    }
4328
4329    impl serde::ser::Serialize for StatusReason {
4330        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4331        where
4332            S: serde::Serializer,
4333        {
4334            match self {
4335                Self::Unspecified => serializer.serialize_i32(0),
4336                Self::UpgradePaused => serializer.serialize_i32(1),
4337                Self::UnknownValue(u) => u.0.serialize(serializer),
4338            }
4339        }
4340    }
4341
4342    impl<'de> serde::de::Deserialize<'de> for StatusReason {
4343        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4344        where
4345            D: serde::Deserializer<'de>,
4346        {
4347            deserializer.deserialize_any(wkt::internal::EnumVisitor::<StatusReason>::new(
4348                ".google.cloud.edgecontainer.v1.OperationMetadata.StatusReason",
4349            ))
4350        }
4351    }
4352}
4353
4354/// Lists clusters in a location.
4355#[serde_with::serde_as]
4356#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4357#[serde(default, rename_all = "camelCase")]
4358#[non_exhaustive]
4359pub struct ListClustersRequest {
4360    /// Required. The parent location, which owns this collection of clusters.
4361    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4362    pub parent: std::string::String,
4363
4364    /// The maximum number of resources to list.
4365    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4366    pub page_size: i32,
4367
4368    /// A page token received from previous list request.
4369    /// A page token received from previous list request.
4370    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4371    pub page_token: std::string::String,
4372
4373    /// Only resources matching this filter will be listed.
4374    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4375    pub filter: std::string::String,
4376
4377    /// Specifies the order in which resources will be listed.
4378    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4379    pub order_by: std::string::String,
4380
4381    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4382    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4383}
4384
4385impl ListClustersRequest {
4386    pub fn new() -> Self {
4387        std::default::Default::default()
4388    }
4389
4390    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
4391    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4392        self.parent = v.into();
4393        self
4394    }
4395
4396    /// Sets the value of [page_size][crate::model::ListClustersRequest::page_size].
4397    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4398        self.page_size = v.into();
4399        self
4400    }
4401
4402    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
4403    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4404        self.page_token = v.into();
4405        self
4406    }
4407
4408    /// Sets the value of [filter][crate::model::ListClustersRequest::filter].
4409    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4410        self.filter = v.into();
4411        self
4412    }
4413
4414    /// Sets the value of [order_by][crate::model::ListClustersRequest::order_by].
4415    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4416        self.order_by = v.into();
4417        self
4418    }
4419}
4420
4421impl wkt::message::Message for ListClustersRequest {
4422    fn typename() -> &'static str {
4423        "type.googleapis.com/google.cloud.edgecontainer.v1.ListClustersRequest"
4424    }
4425}
4426
4427/// List of clusters in a location.
4428#[serde_with::serde_as]
4429#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4430#[serde(default, rename_all = "camelCase")]
4431#[non_exhaustive]
4432pub struct ListClustersResponse {
4433    /// Clusters in the location.
4434    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4435    pub clusters: std::vec::Vec<crate::model::Cluster>,
4436
4437    /// A token to retrieve next page of results.
4438    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4439    pub next_page_token: std::string::String,
4440
4441    /// Locations that could not be reached.
4442    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4443    pub unreachable: std::vec::Vec<std::string::String>,
4444
4445    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4446    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4447}
4448
4449impl ListClustersResponse {
4450    pub fn new() -> Self {
4451        std::default::Default::default()
4452    }
4453
4454    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
4455    pub fn set_clusters<T, V>(mut self, v: T) -> Self
4456    where
4457        T: std::iter::IntoIterator<Item = V>,
4458        V: std::convert::Into<crate::model::Cluster>,
4459    {
4460        use std::iter::Iterator;
4461        self.clusters = v.into_iter().map(|i| i.into()).collect();
4462        self
4463    }
4464
4465    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
4466    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4467        self.next_page_token = v.into();
4468        self
4469    }
4470
4471    /// Sets the value of [unreachable][crate::model::ListClustersResponse::unreachable].
4472    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4473    where
4474        T: std::iter::IntoIterator<Item = V>,
4475        V: std::convert::Into<std::string::String>,
4476    {
4477        use std::iter::Iterator;
4478        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4479        self
4480    }
4481}
4482
4483impl wkt::message::Message for ListClustersResponse {
4484    fn typename() -> &'static str {
4485        "type.googleapis.com/google.cloud.edgecontainer.v1.ListClustersResponse"
4486    }
4487}
4488
4489#[doc(hidden)]
4490impl gax::paginator::internal::PageableResponse for ListClustersResponse {
4491    type PageItem = crate::model::Cluster;
4492
4493    fn items(self) -> std::vec::Vec<Self::PageItem> {
4494        self.clusters
4495    }
4496
4497    fn next_page_token(&self) -> std::string::String {
4498        use std::clone::Clone;
4499        self.next_page_token.clone()
4500    }
4501}
4502
4503/// Gets a cluster.
4504#[serde_with::serde_as]
4505#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4506#[serde(default, rename_all = "camelCase")]
4507#[non_exhaustive]
4508pub struct GetClusterRequest {
4509    /// Required. The resource name of the cluster.
4510    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4511    pub name: std::string::String,
4512
4513    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4514    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4515}
4516
4517impl GetClusterRequest {
4518    pub fn new() -> Self {
4519        std::default::Default::default()
4520    }
4521
4522    /// Sets the value of [name][crate::model::GetClusterRequest::name].
4523    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4524        self.name = v.into();
4525        self
4526    }
4527}
4528
4529impl wkt::message::Message for GetClusterRequest {
4530    fn typename() -> &'static str {
4531        "type.googleapis.com/google.cloud.edgecontainer.v1.GetClusterRequest"
4532    }
4533}
4534
4535/// Creates a cluster.
4536#[serde_with::serde_as]
4537#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4538#[serde(default, rename_all = "camelCase")]
4539#[non_exhaustive]
4540pub struct CreateClusterRequest {
4541    /// Required. The parent location where this cluster will be created.
4542    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4543    pub parent: std::string::String,
4544
4545    /// Required. A client-specified unique identifier for the cluster.
4546    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4547    pub cluster_id: std::string::String,
4548
4549    /// Required. The cluster to create.
4550    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4551    pub cluster: std::option::Option<crate::model::Cluster>,
4552
4553    /// A unique identifier for this request. Restricted to 36 ASCII characters. A
4554    /// random UUID is recommended. This request is only idempotent if
4555    /// `request_id` is provided.
4556    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4557    pub request_id: std::string::String,
4558
4559    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4560    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4561}
4562
4563impl CreateClusterRequest {
4564    pub fn new() -> Self {
4565        std::default::Default::default()
4566    }
4567
4568    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
4569    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4570        self.parent = v.into();
4571        self
4572    }
4573
4574    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
4575    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4576        self.cluster_id = v.into();
4577        self
4578    }
4579
4580    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
4581    pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
4582        mut self,
4583        v: T,
4584    ) -> Self {
4585        self.cluster = v.into();
4586        self
4587    }
4588
4589    /// Sets the value of [request_id][crate::model::CreateClusterRequest::request_id].
4590    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4591        self.request_id = v.into();
4592        self
4593    }
4594}
4595
4596impl wkt::message::Message for CreateClusterRequest {
4597    fn typename() -> &'static str {
4598        "type.googleapis.com/google.cloud.edgecontainer.v1.CreateClusterRequest"
4599    }
4600}
4601
4602/// Updates a cluster.
4603#[serde_with::serde_as]
4604#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4605#[serde(default, rename_all = "camelCase")]
4606#[non_exhaustive]
4607pub struct UpdateClusterRequest {
4608    /// Field mask is used to specify the fields to be overwritten in the
4609    /// Cluster resource by the update.
4610    /// The fields specified in the update_mask are relative to the resource, not
4611    /// the full request. A field will be overwritten if it is in the mask. If the
4612    /// user does not provide a mask then all fields will be overwritten.
4613    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4614    pub update_mask: std::option::Option<wkt::FieldMask>,
4615
4616    /// The updated cluster.
4617    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4618    pub cluster: std::option::Option<crate::model::Cluster>,
4619
4620    /// A unique identifier for this request. Restricted to 36 ASCII characters.
4621    /// A random UUID is recommended.
4622    /// This request is only idempotent if `request_id` is provided.
4623    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4624    pub request_id: std::string::String,
4625
4626    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4627    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4628}
4629
4630impl UpdateClusterRequest {
4631    pub fn new() -> Self {
4632        std::default::Default::default()
4633    }
4634
4635    /// Sets the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
4636    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4637        mut self,
4638        v: T,
4639    ) -> Self {
4640        self.update_mask = v.into();
4641        self
4642    }
4643
4644    /// Sets the value of [cluster][crate::model::UpdateClusterRequest::cluster].
4645    pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
4646        mut self,
4647        v: T,
4648    ) -> Self {
4649        self.cluster = v.into();
4650        self
4651    }
4652
4653    /// Sets the value of [request_id][crate::model::UpdateClusterRequest::request_id].
4654    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4655        self.request_id = v.into();
4656        self
4657    }
4658}
4659
4660impl wkt::message::Message for UpdateClusterRequest {
4661    fn typename() -> &'static str {
4662        "type.googleapis.com/google.cloud.edgecontainer.v1.UpdateClusterRequest"
4663    }
4664}
4665
4666/// Upgrades a cluster.
4667#[serde_with::serde_as]
4668#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4669#[serde(default, rename_all = "camelCase")]
4670#[non_exhaustive]
4671pub struct UpgradeClusterRequest {
4672    /// Required. The resource name of the cluster.
4673    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4674    pub name: std::string::String,
4675
4676    /// Required. The version the cluster is going to be upgraded to.
4677    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4678    pub target_version: std::string::String,
4679
4680    /// The schedule for the upgrade.
4681    pub schedule: crate::model::upgrade_cluster_request::Schedule,
4682
4683    /// A unique identifier for this request. Restricted to 36 ASCII characters. A
4684    /// random UUID is recommended. This request is only idempotent if
4685    /// `request_id` is provided.
4686    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4687    pub request_id: std::string::String,
4688
4689    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4690    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4691}
4692
4693impl UpgradeClusterRequest {
4694    pub fn new() -> Self {
4695        std::default::Default::default()
4696    }
4697
4698    /// Sets the value of [name][crate::model::UpgradeClusterRequest::name].
4699    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4700        self.name = v.into();
4701        self
4702    }
4703
4704    /// Sets the value of [target_version][crate::model::UpgradeClusterRequest::target_version].
4705    pub fn set_target_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4706        self.target_version = v.into();
4707        self
4708    }
4709
4710    /// Sets the value of [schedule][crate::model::UpgradeClusterRequest::schedule].
4711    pub fn set_schedule<T: std::convert::Into<crate::model::upgrade_cluster_request::Schedule>>(
4712        mut self,
4713        v: T,
4714    ) -> Self {
4715        self.schedule = v.into();
4716        self
4717    }
4718
4719    /// Sets the value of [request_id][crate::model::UpgradeClusterRequest::request_id].
4720    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4721        self.request_id = v.into();
4722        self
4723    }
4724}
4725
4726impl wkt::message::Message for UpgradeClusterRequest {
4727    fn typename() -> &'static str {
4728        "type.googleapis.com/google.cloud.edgecontainer.v1.UpgradeClusterRequest"
4729    }
4730}
4731
4732/// Defines additional types related to [UpgradeClusterRequest].
4733pub mod upgrade_cluster_request {
4734    #[allow(unused_imports)]
4735    use super::*;
4736
4737    /// Represents the schedule about when the cluster is going to be upgraded.
4738    ///
4739    /// # Working with unknown values
4740    ///
4741    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
4742    /// additional enum variants at any time. Adding new variants is not considered
4743    /// a breaking change. Applications should write their code in anticipation of:
4744    ///
4745    /// - New values appearing in future releases of the client library, **and**
4746    /// - New values received dynamically, without application changes.
4747    ///
4748    /// Please consult the [Working with enums] section in the user guide for some
4749    /// guidelines.
4750    ///
4751    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
4752    #[derive(Clone, Debug, PartialEq)]
4753    #[non_exhaustive]
4754    pub enum Schedule {
4755        /// Unspecified. The default is to upgrade the cluster immediately which is
4756        /// the only option today.
4757        Unspecified,
4758        /// The cluster is going to be upgraded immediately after receiving the
4759        /// request.
4760        Immediately,
4761        /// If set, the enum was initialized with an unknown value.
4762        ///
4763        /// Applications can examine the value using [Schedule::value] or
4764        /// [Schedule::name].
4765        UnknownValue(schedule::UnknownValue),
4766    }
4767
4768    #[doc(hidden)]
4769    pub mod schedule {
4770        #[allow(unused_imports)]
4771        use super::*;
4772        #[derive(Clone, Debug, PartialEq)]
4773        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
4774    }
4775
4776    impl Schedule {
4777        /// Gets the enum value.
4778        ///
4779        /// Returns `None` if the enum contains an unknown value deserialized from
4780        /// the string representation of enums.
4781        pub fn value(&self) -> std::option::Option<i32> {
4782            match self {
4783                Self::Unspecified => std::option::Option::Some(0),
4784                Self::Immediately => std::option::Option::Some(1),
4785                Self::UnknownValue(u) => u.0.value(),
4786            }
4787        }
4788
4789        /// Gets the enum value as a string.
4790        ///
4791        /// Returns `None` if the enum contains an unknown value deserialized from
4792        /// the integer representation of enums.
4793        pub fn name(&self) -> std::option::Option<&str> {
4794            match self {
4795                Self::Unspecified => std::option::Option::Some("SCHEDULE_UNSPECIFIED"),
4796                Self::Immediately => std::option::Option::Some("IMMEDIATELY"),
4797                Self::UnknownValue(u) => u.0.name(),
4798            }
4799        }
4800    }
4801
4802    impl std::default::Default for Schedule {
4803        fn default() -> Self {
4804            use std::convert::From;
4805            Self::from(0)
4806        }
4807    }
4808
4809    impl std::fmt::Display for Schedule {
4810        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
4811            wkt::internal::display_enum(f, self.name(), self.value())
4812        }
4813    }
4814
4815    impl std::convert::From<i32> for Schedule {
4816        fn from(value: i32) -> Self {
4817            match value {
4818                0 => Self::Unspecified,
4819                1 => Self::Immediately,
4820                _ => Self::UnknownValue(schedule::UnknownValue(
4821                    wkt::internal::UnknownEnumValue::Integer(value),
4822                )),
4823            }
4824        }
4825    }
4826
4827    impl std::convert::From<&str> for Schedule {
4828        fn from(value: &str) -> Self {
4829            use std::string::ToString;
4830            match value {
4831                "SCHEDULE_UNSPECIFIED" => Self::Unspecified,
4832                "IMMEDIATELY" => Self::Immediately,
4833                _ => Self::UnknownValue(schedule::UnknownValue(
4834                    wkt::internal::UnknownEnumValue::String(value.to_string()),
4835                )),
4836            }
4837        }
4838    }
4839
4840    impl serde::ser::Serialize for Schedule {
4841        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
4842        where
4843            S: serde::Serializer,
4844        {
4845            match self {
4846                Self::Unspecified => serializer.serialize_i32(0),
4847                Self::Immediately => serializer.serialize_i32(1),
4848                Self::UnknownValue(u) => u.0.serialize(serializer),
4849            }
4850        }
4851    }
4852
4853    impl<'de> serde::de::Deserialize<'de> for Schedule {
4854        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
4855        where
4856            D: serde::Deserializer<'de>,
4857        {
4858            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Schedule>::new(
4859                ".google.cloud.edgecontainer.v1.UpgradeClusterRequest.Schedule",
4860            ))
4861        }
4862    }
4863}
4864
4865/// Deletes a cluster.
4866#[serde_with::serde_as]
4867#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4868#[serde(default, rename_all = "camelCase")]
4869#[non_exhaustive]
4870pub struct DeleteClusterRequest {
4871    /// Required. The resource name of the cluster.
4872    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4873    pub name: std::string::String,
4874
4875    /// A unique identifier for this request. Restricted to 36 ASCII characters. A
4876    /// random UUID is recommended. This request is only idempotent if
4877    /// `request_id` is provided.
4878    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4879    pub request_id: std::string::String,
4880
4881    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4882    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4883}
4884
4885impl DeleteClusterRequest {
4886    pub fn new() -> Self {
4887        std::default::Default::default()
4888    }
4889
4890    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
4891    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4892        self.name = v.into();
4893        self
4894    }
4895
4896    /// Sets the value of [request_id][crate::model::DeleteClusterRequest::request_id].
4897    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4898        self.request_id = v.into();
4899        self
4900    }
4901}
4902
4903impl wkt::message::Message for DeleteClusterRequest {
4904    fn typename() -> &'static str {
4905        "type.googleapis.com/google.cloud.edgecontainer.v1.DeleteClusterRequest"
4906    }
4907}
4908
4909/// Generates an access token for a cluster.
4910#[serde_with::serde_as]
4911#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4912#[serde(default, rename_all = "camelCase")]
4913#[non_exhaustive]
4914pub struct GenerateAccessTokenRequest {
4915    /// Required. The resource name of the cluster.
4916    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4917    pub cluster: std::string::String,
4918
4919    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4920    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4921}
4922
4923impl GenerateAccessTokenRequest {
4924    pub fn new() -> Self {
4925        std::default::Default::default()
4926    }
4927
4928    /// Sets the value of [cluster][crate::model::GenerateAccessTokenRequest::cluster].
4929    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4930        self.cluster = v.into();
4931        self
4932    }
4933}
4934
4935impl wkt::message::Message for GenerateAccessTokenRequest {
4936    fn typename() -> &'static str {
4937        "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateAccessTokenRequest"
4938    }
4939}
4940
4941/// An access token for a cluster.
4942#[serde_with::serde_as]
4943#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4944#[serde(default, rename_all = "camelCase")]
4945#[non_exhaustive]
4946pub struct GenerateAccessTokenResponse {
4947    /// Output only. Access token to authenticate to k8s api-server.
4948    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4949    pub access_token: std::string::String,
4950
4951    /// Output only. Timestamp at which the token will expire.
4952    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4953    pub expire_time: std::option::Option<wkt::Timestamp>,
4954
4955    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4956    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4957}
4958
4959impl GenerateAccessTokenResponse {
4960    pub fn new() -> Self {
4961        std::default::Default::default()
4962    }
4963
4964    /// Sets the value of [access_token][crate::model::GenerateAccessTokenResponse::access_token].
4965    pub fn set_access_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4966        self.access_token = v.into();
4967        self
4968    }
4969
4970    /// Sets the value of [expire_time][crate::model::GenerateAccessTokenResponse::expire_time].
4971    pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
4972        mut self,
4973        v: T,
4974    ) -> Self {
4975        self.expire_time = v.into();
4976        self
4977    }
4978}
4979
4980impl wkt::message::Message for GenerateAccessTokenResponse {
4981    fn typename() -> &'static str {
4982        "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateAccessTokenResponse"
4983    }
4984}
4985
4986/// Generates an offline credential(offline) for a cluster.
4987#[serde_with::serde_as]
4988#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4989#[serde(default, rename_all = "camelCase")]
4990#[non_exhaustive]
4991pub struct GenerateOfflineCredentialRequest {
4992    /// Required. The resource name of the cluster.
4993    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4994    pub cluster: std::string::String,
4995
4996    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4997    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4998}
4999
5000impl GenerateOfflineCredentialRequest {
5001    pub fn new() -> Self {
5002        std::default::Default::default()
5003    }
5004
5005    /// Sets the value of [cluster][crate::model::GenerateOfflineCredentialRequest::cluster].
5006    pub fn set_cluster<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5007        self.cluster = v.into();
5008        self
5009    }
5010}
5011
5012impl wkt::message::Message for GenerateOfflineCredentialRequest {
5013    fn typename() -> &'static str {
5014        "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateOfflineCredentialRequest"
5015    }
5016}
5017
5018/// An offline credential for a cluster.
5019#[serde_with::serde_as]
5020#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5021#[serde(default, rename_all = "camelCase")]
5022#[non_exhaustive]
5023pub struct GenerateOfflineCredentialResponse {
5024    /// Output only. Client certificate to authenticate to k8s api-server.
5025    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5026    pub client_certificate: std::string::String,
5027
5028    /// Output only. Client private key to authenticate to k8s api-server.
5029    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5030    pub client_key: std::string::String,
5031
5032    /// Output only. Client's identity.
5033    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5034    pub user_id: std::string::String,
5035
5036    /// Output only. Timestamp at which this credential will expire.
5037    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5038    pub expire_time: std::option::Option<wkt::Timestamp>,
5039
5040    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5041    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5042}
5043
5044impl GenerateOfflineCredentialResponse {
5045    pub fn new() -> Self {
5046        std::default::Default::default()
5047    }
5048
5049    /// Sets the value of [client_certificate][crate::model::GenerateOfflineCredentialResponse::client_certificate].
5050    pub fn set_client_certificate<T: std::convert::Into<std::string::String>>(
5051        mut self,
5052        v: T,
5053    ) -> Self {
5054        self.client_certificate = v.into();
5055        self
5056    }
5057
5058    /// Sets the value of [client_key][crate::model::GenerateOfflineCredentialResponse::client_key].
5059    pub fn set_client_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5060        self.client_key = v.into();
5061        self
5062    }
5063
5064    /// Sets the value of [user_id][crate::model::GenerateOfflineCredentialResponse::user_id].
5065    pub fn set_user_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5066        self.user_id = v.into();
5067        self
5068    }
5069
5070    /// Sets the value of [expire_time][crate::model::GenerateOfflineCredentialResponse::expire_time].
5071    pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
5072        mut self,
5073        v: T,
5074    ) -> Self {
5075        self.expire_time = v.into();
5076        self
5077    }
5078}
5079
5080impl wkt::message::Message for GenerateOfflineCredentialResponse {
5081    fn typename() -> &'static str {
5082        "type.googleapis.com/google.cloud.edgecontainer.v1.GenerateOfflineCredentialResponse"
5083    }
5084}
5085
5086/// Lists node pools in a cluster.
5087#[serde_with::serde_as]
5088#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5089#[serde(default, rename_all = "camelCase")]
5090#[non_exhaustive]
5091pub struct ListNodePoolsRequest {
5092    /// Required. The parent cluster, which owns this collection of node pools.
5093    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5094    pub parent: std::string::String,
5095
5096    /// The maximum number of resources to list.
5097    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5098    pub page_size: i32,
5099
5100    /// A page token received from previous list request.
5101    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5102    pub page_token: std::string::String,
5103
5104    /// Only resources matching this filter will be listed.
5105    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5106    pub filter: std::string::String,
5107
5108    /// Specifies the order in which resources will be listed.
5109    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5110    pub order_by: std::string::String,
5111
5112    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5113    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5114}
5115
5116impl ListNodePoolsRequest {
5117    pub fn new() -> Self {
5118        std::default::Default::default()
5119    }
5120
5121    /// Sets the value of [parent][crate::model::ListNodePoolsRequest::parent].
5122    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5123        self.parent = v.into();
5124        self
5125    }
5126
5127    /// Sets the value of [page_size][crate::model::ListNodePoolsRequest::page_size].
5128    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5129        self.page_size = v.into();
5130        self
5131    }
5132
5133    /// Sets the value of [page_token][crate::model::ListNodePoolsRequest::page_token].
5134    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5135        self.page_token = v.into();
5136        self
5137    }
5138
5139    /// Sets the value of [filter][crate::model::ListNodePoolsRequest::filter].
5140    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5141        self.filter = v.into();
5142        self
5143    }
5144
5145    /// Sets the value of [order_by][crate::model::ListNodePoolsRequest::order_by].
5146    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5147        self.order_by = v.into();
5148        self
5149    }
5150}
5151
5152impl wkt::message::Message for ListNodePoolsRequest {
5153    fn typename() -> &'static str {
5154        "type.googleapis.com/google.cloud.edgecontainer.v1.ListNodePoolsRequest"
5155    }
5156}
5157
5158/// List of node pools in a cluster.
5159#[serde_with::serde_as]
5160#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5161#[serde(default, rename_all = "camelCase")]
5162#[non_exhaustive]
5163pub struct ListNodePoolsResponse {
5164    /// Node pools in the cluster.
5165    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5166    pub node_pools: std::vec::Vec<crate::model::NodePool>,
5167
5168    /// A token to retrieve next page of results.
5169    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5170    pub next_page_token: std::string::String,
5171
5172    /// Locations that could not be reached.
5173    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5174    pub unreachable: std::vec::Vec<std::string::String>,
5175
5176    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5177    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5178}
5179
5180impl ListNodePoolsResponse {
5181    pub fn new() -> Self {
5182        std::default::Default::default()
5183    }
5184
5185    /// Sets the value of [node_pools][crate::model::ListNodePoolsResponse::node_pools].
5186    pub fn set_node_pools<T, V>(mut self, v: T) -> Self
5187    where
5188        T: std::iter::IntoIterator<Item = V>,
5189        V: std::convert::Into<crate::model::NodePool>,
5190    {
5191        use std::iter::Iterator;
5192        self.node_pools = v.into_iter().map(|i| i.into()).collect();
5193        self
5194    }
5195
5196    /// Sets the value of [next_page_token][crate::model::ListNodePoolsResponse::next_page_token].
5197    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5198        self.next_page_token = v.into();
5199        self
5200    }
5201
5202    /// Sets the value of [unreachable][crate::model::ListNodePoolsResponse::unreachable].
5203    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5204    where
5205        T: std::iter::IntoIterator<Item = V>,
5206        V: std::convert::Into<std::string::String>,
5207    {
5208        use std::iter::Iterator;
5209        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5210        self
5211    }
5212}
5213
5214impl wkt::message::Message for ListNodePoolsResponse {
5215    fn typename() -> &'static str {
5216        "type.googleapis.com/google.cloud.edgecontainer.v1.ListNodePoolsResponse"
5217    }
5218}
5219
5220#[doc(hidden)]
5221impl gax::paginator::internal::PageableResponse for ListNodePoolsResponse {
5222    type PageItem = crate::model::NodePool;
5223
5224    fn items(self) -> std::vec::Vec<Self::PageItem> {
5225        self.node_pools
5226    }
5227
5228    fn next_page_token(&self) -> std::string::String {
5229        use std::clone::Clone;
5230        self.next_page_token.clone()
5231    }
5232}
5233
5234/// Gets a node pool.
5235#[serde_with::serde_as]
5236#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5237#[serde(default, rename_all = "camelCase")]
5238#[non_exhaustive]
5239pub struct GetNodePoolRequest {
5240    /// Required. The resource name of the node pool.
5241    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5242    pub name: std::string::String,
5243
5244    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5245    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5246}
5247
5248impl GetNodePoolRequest {
5249    pub fn new() -> Self {
5250        std::default::Default::default()
5251    }
5252
5253    /// Sets the value of [name][crate::model::GetNodePoolRequest::name].
5254    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5255        self.name = v.into();
5256        self
5257    }
5258}
5259
5260impl wkt::message::Message for GetNodePoolRequest {
5261    fn typename() -> &'static str {
5262        "type.googleapis.com/google.cloud.edgecontainer.v1.GetNodePoolRequest"
5263    }
5264}
5265
5266/// Creates a node pool.
5267#[serde_with::serde_as]
5268#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5269#[serde(default, rename_all = "camelCase")]
5270#[non_exhaustive]
5271pub struct CreateNodePoolRequest {
5272    /// Required. The parent cluster where this node pool will be created.
5273    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5274    pub parent: std::string::String,
5275
5276    /// Required. A client-specified unique identifier for the node pool.
5277    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5278    pub node_pool_id: std::string::String,
5279
5280    /// Required. The node pool to create.
5281    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5282    pub node_pool: std::option::Option<crate::model::NodePool>,
5283
5284    /// A unique identifier for this request. Restricted to 36 ASCII characters. A
5285    /// random UUID is recommended. This request is only idempotent if
5286    /// `request_id` is provided.
5287    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5288    pub request_id: std::string::String,
5289
5290    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5291    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5292}
5293
5294impl CreateNodePoolRequest {
5295    pub fn new() -> Self {
5296        std::default::Default::default()
5297    }
5298
5299    /// Sets the value of [parent][crate::model::CreateNodePoolRequest::parent].
5300    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5301        self.parent = v.into();
5302        self
5303    }
5304
5305    /// Sets the value of [node_pool_id][crate::model::CreateNodePoolRequest::node_pool_id].
5306    pub fn set_node_pool_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5307        self.node_pool_id = v.into();
5308        self
5309    }
5310
5311    /// Sets the value of [node_pool][crate::model::CreateNodePoolRequest::node_pool].
5312    pub fn set_node_pool<T: std::convert::Into<std::option::Option<crate::model::NodePool>>>(
5313        mut self,
5314        v: T,
5315    ) -> Self {
5316        self.node_pool = v.into();
5317        self
5318    }
5319
5320    /// Sets the value of [request_id][crate::model::CreateNodePoolRequest::request_id].
5321    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5322        self.request_id = v.into();
5323        self
5324    }
5325}
5326
5327impl wkt::message::Message for CreateNodePoolRequest {
5328    fn typename() -> &'static str {
5329        "type.googleapis.com/google.cloud.edgecontainer.v1.CreateNodePoolRequest"
5330    }
5331}
5332
5333/// Updates a node pool.
5334#[serde_with::serde_as]
5335#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5336#[serde(default, rename_all = "camelCase")]
5337#[non_exhaustive]
5338pub struct UpdateNodePoolRequest {
5339    /// Field mask is used to specify the fields to be overwritten in the
5340    /// NodePool resource by the update.
5341    /// The fields specified in the update_mask are relative to the resource, not
5342    /// the full request. A field will be overwritten if it is in the mask. If the
5343    /// user does not provide a mask then all fields will be overwritten.
5344    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5345    pub update_mask: std::option::Option<wkt::FieldMask>,
5346
5347    /// The updated node pool.
5348    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5349    pub node_pool: std::option::Option<crate::model::NodePool>,
5350
5351    /// A unique identifier for this request. Restricted to 36 ASCII characters. A
5352    /// random UUID is recommended. This request is only idempotent if
5353    /// `request_id` is provided.
5354    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5355    pub request_id: std::string::String,
5356
5357    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5358    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5359}
5360
5361impl UpdateNodePoolRequest {
5362    pub fn new() -> Self {
5363        std::default::Default::default()
5364    }
5365
5366    /// Sets the value of [update_mask][crate::model::UpdateNodePoolRequest::update_mask].
5367    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
5368        mut self,
5369        v: T,
5370    ) -> Self {
5371        self.update_mask = v.into();
5372        self
5373    }
5374
5375    /// Sets the value of [node_pool][crate::model::UpdateNodePoolRequest::node_pool].
5376    pub fn set_node_pool<T: std::convert::Into<std::option::Option<crate::model::NodePool>>>(
5377        mut self,
5378        v: T,
5379    ) -> Self {
5380        self.node_pool = v.into();
5381        self
5382    }
5383
5384    /// Sets the value of [request_id][crate::model::UpdateNodePoolRequest::request_id].
5385    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5386        self.request_id = v.into();
5387        self
5388    }
5389}
5390
5391impl wkt::message::Message for UpdateNodePoolRequest {
5392    fn typename() -> &'static str {
5393        "type.googleapis.com/google.cloud.edgecontainer.v1.UpdateNodePoolRequest"
5394    }
5395}
5396
5397/// Deletes a node pool.
5398#[serde_with::serde_as]
5399#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5400#[serde(default, rename_all = "camelCase")]
5401#[non_exhaustive]
5402pub struct DeleteNodePoolRequest {
5403    /// Required. The resource name of the node pool.
5404    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5405    pub name: std::string::String,
5406
5407    /// A unique identifier for this request. Restricted to 36 ASCII characters. A
5408    /// random UUID is recommended. This request is only idempotent if
5409    /// `request_id` is provided.
5410    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5411    pub request_id: std::string::String,
5412
5413    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5414    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5415}
5416
5417impl DeleteNodePoolRequest {
5418    pub fn new() -> Self {
5419        std::default::Default::default()
5420    }
5421
5422    /// Sets the value of [name][crate::model::DeleteNodePoolRequest::name].
5423    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5424        self.name = v.into();
5425        self
5426    }
5427
5428    /// Sets the value of [request_id][crate::model::DeleteNodePoolRequest::request_id].
5429    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5430        self.request_id = v.into();
5431        self
5432    }
5433}
5434
5435impl wkt::message::Message for DeleteNodePoolRequest {
5436    fn typename() -> &'static str {
5437        "type.googleapis.com/google.cloud.edgecontainer.v1.DeleteNodePoolRequest"
5438    }
5439}
5440
5441/// Lists machines in a site.
5442#[serde_with::serde_as]
5443#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5444#[serde(default, rename_all = "camelCase")]
5445#[non_exhaustive]
5446pub struct ListMachinesRequest {
5447    /// Required. The parent site, which owns this collection of machines.
5448    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5449    pub parent: std::string::String,
5450
5451    /// The maximum number of resources to list.
5452    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5453    pub page_size: i32,
5454
5455    /// A page token received from previous list request.
5456    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5457    pub page_token: std::string::String,
5458
5459    /// Only resources matching this filter will be listed.
5460    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5461    pub filter: std::string::String,
5462
5463    /// Specifies the order in which resources will be listed.
5464    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5465    pub order_by: std::string::String,
5466
5467    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5468    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5469}
5470
5471impl ListMachinesRequest {
5472    pub fn new() -> Self {
5473        std::default::Default::default()
5474    }
5475
5476    /// Sets the value of [parent][crate::model::ListMachinesRequest::parent].
5477    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5478        self.parent = v.into();
5479        self
5480    }
5481
5482    /// Sets the value of [page_size][crate::model::ListMachinesRequest::page_size].
5483    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5484        self.page_size = v.into();
5485        self
5486    }
5487
5488    /// Sets the value of [page_token][crate::model::ListMachinesRequest::page_token].
5489    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5490        self.page_token = v.into();
5491        self
5492    }
5493
5494    /// Sets the value of [filter][crate::model::ListMachinesRequest::filter].
5495    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5496        self.filter = v.into();
5497        self
5498    }
5499
5500    /// Sets the value of [order_by][crate::model::ListMachinesRequest::order_by].
5501    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5502        self.order_by = v.into();
5503        self
5504    }
5505}
5506
5507impl wkt::message::Message for ListMachinesRequest {
5508    fn typename() -> &'static str {
5509        "type.googleapis.com/google.cloud.edgecontainer.v1.ListMachinesRequest"
5510    }
5511}
5512
5513/// List of machines in a site.
5514#[serde_with::serde_as]
5515#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5516#[serde(default, rename_all = "camelCase")]
5517#[non_exhaustive]
5518pub struct ListMachinesResponse {
5519    /// Machines in the site.
5520    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5521    pub machines: std::vec::Vec<crate::model::Machine>,
5522
5523    /// A token to retrieve next page of results.
5524    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5525    pub next_page_token: std::string::String,
5526
5527    /// Locations that could not be reached.
5528    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5529    pub unreachable: std::vec::Vec<std::string::String>,
5530
5531    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5532    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5533}
5534
5535impl ListMachinesResponse {
5536    pub fn new() -> Self {
5537        std::default::Default::default()
5538    }
5539
5540    /// Sets the value of [machines][crate::model::ListMachinesResponse::machines].
5541    pub fn set_machines<T, V>(mut self, v: T) -> Self
5542    where
5543        T: std::iter::IntoIterator<Item = V>,
5544        V: std::convert::Into<crate::model::Machine>,
5545    {
5546        use std::iter::Iterator;
5547        self.machines = v.into_iter().map(|i| i.into()).collect();
5548        self
5549    }
5550
5551    /// Sets the value of [next_page_token][crate::model::ListMachinesResponse::next_page_token].
5552    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5553        self.next_page_token = v.into();
5554        self
5555    }
5556
5557    /// Sets the value of [unreachable][crate::model::ListMachinesResponse::unreachable].
5558    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5559    where
5560        T: std::iter::IntoIterator<Item = V>,
5561        V: std::convert::Into<std::string::String>,
5562    {
5563        use std::iter::Iterator;
5564        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5565        self
5566    }
5567}
5568
5569impl wkt::message::Message for ListMachinesResponse {
5570    fn typename() -> &'static str {
5571        "type.googleapis.com/google.cloud.edgecontainer.v1.ListMachinesResponse"
5572    }
5573}
5574
5575#[doc(hidden)]
5576impl gax::paginator::internal::PageableResponse for ListMachinesResponse {
5577    type PageItem = crate::model::Machine;
5578
5579    fn items(self) -> std::vec::Vec<Self::PageItem> {
5580        self.machines
5581    }
5582
5583    fn next_page_token(&self) -> std::string::String {
5584        use std::clone::Clone;
5585        self.next_page_token.clone()
5586    }
5587}
5588
5589/// Gets a machine.
5590#[serde_with::serde_as]
5591#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5592#[serde(default, rename_all = "camelCase")]
5593#[non_exhaustive]
5594pub struct GetMachineRequest {
5595    /// Required. The resource name of the machine.
5596    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5597    pub name: std::string::String,
5598
5599    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5600    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5601}
5602
5603impl GetMachineRequest {
5604    pub fn new() -> Self {
5605        std::default::Default::default()
5606    }
5607
5608    /// Sets the value of [name][crate::model::GetMachineRequest::name].
5609    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5610        self.name = v.into();
5611        self
5612    }
5613}
5614
5615impl wkt::message::Message for GetMachineRequest {
5616    fn typename() -> &'static str {
5617        "type.googleapis.com/google.cloud.edgecontainer.v1.GetMachineRequest"
5618    }
5619}
5620
5621/// Lists VPN connections.
5622#[serde_with::serde_as]
5623#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5624#[serde(default, rename_all = "camelCase")]
5625#[non_exhaustive]
5626pub struct ListVpnConnectionsRequest {
5627    /// Required. The parent location, which owns this collection of VPN
5628    /// connections.
5629    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5630    pub parent: std::string::String,
5631
5632    /// The maximum number of resources to list.
5633    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5634    pub page_size: i32,
5635
5636    /// A page token received from previous list request.
5637    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5638    pub page_token: std::string::String,
5639
5640    /// Only resources matching this filter will be listed.
5641    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5642    pub filter: std::string::String,
5643
5644    /// Specifies the order in which resources will be listed.
5645    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5646    pub order_by: std::string::String,
5647
5648    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5649    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5650}
5651
5652impl ListVpnConnectionsRequest {
5653    pub fn new() -> Self {
5654        std::default::Default::default()
5655    }
5656
5657    /// Sets the value of [parent][crate::model::ListVpnConnectionsRequest::parent].
5658    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5659        self.parent = v.into();
5660        self
5661    }
5662
5663    /// Sets the value of [page_size][crate::model::ListVpnConnectionsRequest::page_size].
5664    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5665        self.page_size = v.into();
5666        self
5667    }
5668
5669    /// Sets the value of [page_token][crate::model::ListVpnConnectionsRequest::page_token].
5670    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5671        self.page_token = v.into();
5672        self
5673    }
5674
5675    /// Sets the value of [filter][crate::model::ListVpnConnectionsRequest::filter].
5676    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5677        self.filter = v.into();
5678        self
5679    }
5680
5681    /// Sets the value of [order_by][crate::model::ListVpnConnectionsRequest::order_by].
5682    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5683        self.order_by = v.into();
5684        self
5685    }
5686}
5687
5688impl wkt::message::Message for ListVpnConnectionsRequest {
5689    fn typename() -> &'static str {
5690        "type.googleapis.com/google.cloud.edgecontainer.v1.ListVpnConnectionsRequest"
5691    }
5692}
5693
5694/// List of VPN connections in a location.
5695#[serde_with::serde_as]
5696#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5697#[serde(default, rename_all = "camelCase")]
5698#[non_exhaustive]
5699pub struct ListVpnConnectionsResponse {
5700    /// VpnConnections in the location.
5701    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5702    pub vpn_connections: std::vec::Vec<crate::model::VpnConnection>,
5703
5704    /// A token to retrieve next page of results.
5705    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5706    pub next_page_token: std::string::String,
5707
5708    /// Locations that could not be reached.
5709    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5710    pub unreachable: std::vec::Vec<std::string::String>,
5711
5712    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5713    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5714}
5715
5716impl ListVpnConnectionsResponse {
5717    pub fn new() -> Self {
5718        std::default::Default::default()
5719    }
5720
5721    /// Sets the value of [vpn_connections][crate::model::ListVpnConnectionsResponse::vpn_connections].
5722    pub fn set_vpn_connections<T, V>(mut self, v: T) -> Self
5723    where
5724        T: std::iter::IntoIterator<Item = V>,
5725        V: std::convert::Into<crate::model::VpnConnection>,
5726    {
5727        use std::iter::Iterator;
5728        self.vpn_connections = v.into_iter().map(|i| i.into()).collect();
5729        self
5730    }
5731
5732    /// Sets the value of [next_page_token][crate::model::ListVpnConnectionsResponse::next_page_token].
5733    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5734        self.next_page_token = v.into();
5735        self
5736    }
5737
5738    /// Sets the value of [unreachable][crate::model::ListVpnConnectionsResponse::unreachable].
5739    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5740    where
5741        T: std::iter::IntoIterator<Item = V>,
5742        V: std::convert::Into<std::string::String>,
5743    {
5744        use std::iter::Iterator;
5745        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5746        self
5747    }
5748}
5749
5750impl wkt::message::Message for ListVpnConnectionsResponse {
5751    fn typename() -> &'static str {
5752        "type.googleapis.com/google.cloud.edgecontainer.v1.ListVpnConnectionsResponse"
5753    }
5754}
5755
5756#[doc(hidden)]
5757impl gax::paginator::internal::PageableResponse for ListVpnConnectionsResponse {
5758    type PageItem = crate::model::VpnConnection;
5759
5760    fn items(self) -> std::vec::Vec<Self::PageItem> {
5761        self.vpn_connections
5762    }
5763
5764    fn next_page_token(&self) -> std::string::String {
5765        use std::clone::Clone;
5766        self.next_page_token.clone()
5767    }
5768}
5769
5770/// Gets a VPN connection.
5771#[serde_with::serde_as]
5772#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5773#[serde(default, rename_all = "camelCase")]
5774#[non_exhaustive]
5775pub struct GetVpnConnectionRequest {
5776    /// Required. The resource name of the vpn connection.
5777    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5778    pub name: std::string::String,
5779
5780    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5781    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5782}
5783
5784impl GetVpnConnectionRequest {
5785    pub fn new() -> Self {
5786        std::default::Default::default()
5787    }
5788
5789    /// Sets the value of [name][crate::model::GetVpnConnectionRequest::name].
5790    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5791        self.name = v.into();
5792        self
5793    }
5794}
5795
5796impl wkt::message::Message for GetVpnConnectionRequest {
5797    fn typename() -> &'static str {
5798        "type.googleapis.com/google.cloud.edgecontainer.v1.GetVpnConnectionRequest"
5799    }
5800}
5801
5802/// Creates a VPN connection.
5803#[serde_with::serde_as]
5804#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5805#[serde(default, rename_all = "camelCase")]
5806#[non_exhaustive]
5807pub struct CreateVpnConnectionRequest {
5808    /// Required. The parent location where this vpn connection will be created.
5809    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5810    pub parent: std::string::String,
5811
5812    /// Required. The VPN connection identifier.
5813    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5814    pub vpn_connection_id: std::string::String,
5815
5816    /// Required. The VPN connection to create.
5817    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5818    pub vpn_connection: std::option::Option<crate::model::VpnConnection>,
5819
5820    /// A unique identifier for this request. Restricted to 36 ASCII characters. A
5821    /// random UUID is recommended. This request is only idempotent if
5822    /// `request_id` is provided.
5823    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5824    pub request_id: std::string::String,
5825
5826    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5827    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5828}
5829
5830impl CreateVpnConnectionRequest {
5831    pub fn new() -> Self {
5832        std::default::Default::default()
5833    }
5834
5835    /// Sets the value of [parent][crate::model::CreateVpnConnectionRequest::parent].
5836    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5837        self.parent = v.into();
5838        self
5839    }
5840
5841    /// Sets the value of [vpn_connection_id][crate::model::CreateVpnConnectionRequest::vpn_connection_id].
5842    pub fn set_vpn_connection_id<T: std::convert::Into<std::string::String>>(
5843        mut self,
5844        v: T,
5845    ) -> Self {
5846        self.vpn_connection_id = v.into();
5847        self
5848    }
5849
5850    /// Sets the value of [vpn_connection][crate::model::CreateVpnConnectionRequest::vpn_connection].
5851    pub fn set_vpn_connection<
5852        T: std::convert::Into<std::option::Option<crate::model::VpnConnection>>,
5853    >(
5854        mut self,
5855        v: T,
5856    ) -> Self {
5857        self.vpn_connection = v.into();
5858        self
5859    }
5860
5861    /// Sets the value of [request_id][crate::model::CreateVpnConnectionRequest::request_id].
5862    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5863        self.request_id = v.into();
5864        self
5865    }
5866}
5867
5868impl wkt::message::Message for CreateVpnConnectionRequest {
5869    fn typename() -> &'static str {
5870        "type.googleapis.com/google.cloud.edgecontainer.v1.CreateVpnConnectionRequest"
5871    }
5872}
5873
5874/// Deletes a vpn connection.
5875#[serde_with::serde_as]
5876#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5877#[serde(default, rename_all = "camelCase")]
5878#[non_exhaustive]
5879pub struct DeleteVpnConnectionRequest {
5880    /// Required. The resource name of the vpn connection.
5881    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5882    pub name: std::string::String,
5883
5884    /// A unique identifier for this request. Restricted to 36 ASCII characters. A
5885    /// random UUID is recommended. This request is only idempotent if
5886    /// `request_id` is provided.
5887    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5888    pub request_id: std::string::String,
5889
5890    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5891    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5892}
5893
5894impl DeleteVpnConnectionRequest {
5895    pub fn new() -> Self {
5896        std::default::Default::default()
5897    }
5898
5899    /// Sets the value of [name][crate::model::DeleteVpnConnectionRequest::name].
5900    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5901        self.name = v.into();
5902        self
5903    }
5904
5905    /// Sets the value of [request_id][crate::model::DeleteVpnConnectionRequest::request_id].
5906    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5907        self.request_id = v.into();
5908        self
5909    }
5910}
5911
5912impl wkt::message::Message for DeleteVpnConnectionRequest {
5913    fn typename() -> &'static str {
5914        "type.googleapis.com/google.cloud.edgecontainer.v1.DeleteVpnConnectionRequest"
5915    }
5916}
5917
5918/// Gets the server config.
5919#[serde_with::serde_as]
5920#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5921#[serde(default, rename_all = "camelCase")]
5922#[non_exhaustive]
5923pub struct GetServerConfigRequest {
5924    /// Required. The name (project and location) of the server config to get,
5925    /// specified in the format `projects/*/locations/*`.
5926    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5927    pub name: std::string::String,
5928
5929    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5930    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5931}
5932
5933impl GetServerConfigRequest {
5934    pub fn new() -> Self {
5935        std::default::Default::default()
5936    }
5937
5938    /// Sets the value of [name][crate::model::GetServerConfigRequest::name].
5939    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5940        self.name = v.into();
5941        self
5942    }
5943}
5944
5945impl wkt::message::Message for GetServerConfigRequest {
5946    fn typename() -> &'static str {
5947        "type.googleapis.com/google.cloud.edgecontainer.v1.GetServerConfigRequest"
5948    }
5949}
5950
5951/// Represents the accessibility state of a customer-managed KMS key used for
5952/// CMEK integration.
5953///
5954/// # Working with unknown values
5955///
5956/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
5957/// additional enum variants at any time. Adding new variants is not considered
5958/// a breaking change. Applications should write their code in anticipation of:
5959///
5960/// - New values appearing in future releases of the client library, **and**
5961/// - New values received dynamically, without application changes.
5962///
5963/// Please consult the [Working with enums] section in the user guide for some
5964/// guidelines.
5965///
5966/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
5967#[derive(Clone, Debug, PartialEq)]
5968#[non_exhaustive]
5969pub enum KmsKeyState {
5970    /// Unspecified.
5971    Unspecified,
5972    /// The key is available for use, and dependent resources should be accessible.
5973    KeyAvailable,
5974    /// The key is unavailable for an unspecified reason. Dependent resources may
5975    /// be inaccessible.
5976    KeyUnavailable,
5977    /// If set, the enum was initialized with an unknown value.
5978    ///
5979    /// Applications can examine the value using [KmsKeyState::value] or
5980    /// [KmsKeyState::name].
5981    UnknownValue(kms_key_state::UnknownValue),
5982}
5983
5984#[doc(hidden)]
5985pub mod kms_key_state {
5986    #[allow(unused_imports)]
5987    use super::*;
5988    #[derive(Clone, Debug, PartialEq)]
5989    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
5990}
5991
5992impl KmsKeyState {
5993    /// Gets the enum value.
5994    ///
5995    /// Returns `None` if the enum contains an unknown value deserialized from
5996    /// the string representation of enums.
5997    pub fn value(&self) -> std::option::Option<i32> {
5998        match self {
5999            Self::Unspecified => std::option::Option::Some(0),
6000            Self::KeyAvailable => std::option::Option::Some(1),
6001            Self::KeyUnavailable => std::option::Option::Some(2),
6002            Self::UnknownValue(u) => u.0.value(),
6003        }
6004    }
6005
6006    /// Gets the enum value as a string.
6007    ///
6008    /// Returns `None` if the enum contains an unknown value deserialized from
6009    /// the integer representation of enums.
6010    pub fn name(&self) -> std::option::Option<&str> {
6011        match self {
6012            Self::Unspecified => std::option::Option::Some("KMS_KEY_STATE_UNSPECIFIED"),
6013            Self::KeyAvailable => std::option::Option::Some("KMS_KEY_STATE_KEY_AVAILABLE"),
6014            Self::KeyUnavailable => std::option::Option::Some("KMS_KEY_STATE_KEY_UNAVAILABLE"),
6015            Self::UnknownValue(u) => u.0.name(),
6016        }
6017    }
6018}
6019
6020impl std::default::Default for KmsKeyState {
6021    fn default() -> Self {
6022        use std::convert::From;
6023        Self::from(0)
6024    }
6025}
6026
6027impl std::fmt::Display for KmsKeyState {
6028    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6029        wkt::internal::display_enum(f, self.name(), self.value())
6030    }
6031}
6032
6033impl std::convert::From<i32> for KmsKeyState {
6034    fn from(value: i32) -> Self {
6035        match value {
6036            0 => Self::Unspecified,
6037            1 => Self::KeyAvailable,
6038            2 => Self::KeyUnavailable,
6039            _ => Self::UnknownValue(kms_key_state::UnknownValue(
6040                wkt::internal::UnknownEnumValue::Integer(value),
6041            )),
6042        }
6043    }
6044}
6045
6046impl std::convert::From<&str> for KmsKeyState {
6047    fn from(value: &str) -> Self {
6048        use std::string::ToString;
6049        match value {
6050            "KMS_KEY_STATE_UNSPECIFIED" => Self::Unspecified,
6051            "KMS_KEY_STATE_KEY_AVAILABLE" => Self::KeyAvailable,
6052            "KMS_KEY_STATE_KEY_UNAVAILABLE" => Self::KeyUnavailable,
6053            _ => Self::UnknownValue(kms_key_state::UnknownValue(
6054                wkt::internal::UnknownEnumValue::String(value.to_string()),
6055            )),
6056        }
6057    }
6058}
6059
6060impl serde::ser::Serialize for KmsKeyState {
6061    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6062    where
6063        S: serde::Serializer,
6064    {
6065        match self {
6066            Self::Unspecified => serializer.serialize_i32(0),
6067            Self::KeyAvailable => serializer.serialize_i32(1),
6068            Self::KeyUnavailable => serializer.serialize_i32(2),
6069            Self::UnknownValue(u) => u.0.serialize(serializer),
6070        }
6071    }
6072}
6073
6074impl<'de> serde::de::Deserialize<'de> for KmsKeyState {
6075    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6076    where
6077        D: serde::Deserializer<'de>,
6078    {
6079        deserializer.deserialize_any(wkt::internal::EnumVisitor::<KmsKeyState>::new(
6080            ".google.cloud.edgecontainer.v1.KmsKeyState",
6081        ))
6082    }
6083}
6084
6085/// Represents if the resource is in lock down state or pending.
6086///
6087/// # Working with unknown values
6088///
6089/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6090/// additional enum variants at any time. Adding new variants is not considered
6091/// a breaking change. Applications should write their code in anticipation of:
6092///
6093/// - New values appearing in future releases of the client library, **and**
6094/// - New values received dynamically, without application changes.
6095///
6096/// Please consult the [Working with enums] section in the user guide for some
6097/// guidelines.
6098///
6099/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6100#[derive(Clone, Debug, PartialEq)]
6101#[non_exhaustive]
6102pub enum ResourceState {
6103    /// Default value.
6104    Unspecified,
6105    /// The resource is in LOCK DOWN state.
6106    LockDown,
6107    /// The resource is pending lock down.
6108    LockDownPending,
6109    /// If set, the enum was initialized with an unknown value.
6110    ///
6111    /// Applications can examine the value using [ResourceState::value] or
6112    /// [ResourceState::name].
6113    UnknownValue(resource_state::UnknownValue),
6114}
6115
6116#[doc(hidden)]
6117pub mod resource_state {
6118    #[allow(unused_imports)]
6119    use super::*;
6120    #[derive(Clone, Debug, PartialEq)]
6121    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6122}
6123
6124impl ResourceState {
6125    /// Gets the enum value.
6126    ///
6127    /// Returns `None` if the enum contains an unknown value deserialized from
6128    /// the string representation of enums.
6129    pub fn value(&self) -> std::option::Option<i32> {
6130        match self {
6131            Self::Unspecified => std::option::Option::Some(0),
6132            Self::LockDown => std::option::Option::Some(1),
6133            Self::LockDownPending => std::option::Option::Some(2),
6134            Self::UnknownValue(u) => u.0.value(),
6135        }
6136    }
6137
6138    /// Gets the enum value as a string.
6139    ///
6140    /// Returns `None` if the enum contains an unknown value deserialized from
6141    /// the integer representation of enums.
6142    pub fn name(&self) -> std::option::Option<&str> {
6143        match self {
6144            Self::Unspecified => std::option::Option::Some("RESOURCE_STATE_UNSPECIFIED"),
6145            Self::LockDown => std::option::Option::Some("RESOURCE_STATE_LOCK_DOWN"),
6146            Self::LockDownPending => std::option::Option::Some("RESOURCE_STATE_LOCK_DOWN_PENDING"),
6147            Self::UnknownValue(u) => u.0.name(),
6148        }
6149    }
6150}
6151
6152impl std::default::Default for ResourceState {
6153    fn default() -> Self {
6154        use std::convert::From;
6155        Self::from(0)
6156    }
6157}
6158
6159impl std::fmt::Display for ResourceState {
6160    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6161        wkt::internal::display_enum(f, self.name(), self.value())
6162    }
6163}
6164
6165impl std::convert::From<i32> for ResourceState {
6166    fn from(value: i32) -> Self {
6167        match value {
6168            0 => Self::Unspecified,
6169            1 => Self::LockDown,
6170            2 => Self::LockDownPending,
6171            _ => Self::UnknownValue(resource_state::UnknownValue(
6172                wkt::internal::UnknownEnumValue::Integer(value),
6173            )),
6174        }
6175    }
6176}
6177
6178impl std::convert::From<&str> for ResourceState {
6179    fn from(value: &str) -> Self {
6180        use std::string::ToString;
6181        match value {
6182            "RESOURCE_STATE_UNSPECIFIED" => Self::Unspecified,
6183            "RESOURCE_STATE_LOCK_DOWN" => Self::LockDown,
6184            "RESOURCE_STATE_LOCK_DOWN_PENDING" => Self::LockDownPending,
6185            _ => Self::UnknownValue(resource_state::UnknownValue(
6186                wkt::internal::UnknownEnumValue::String(value.to_string()),
6187            )),
6188        }
6189    }
6190}
6191
6192impl serde::ser::Serialize for ResourceState {
6193    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6194    where
6195        S: serde::Serializer,
6196    {
6197        match self {
6198            Self::Unspecified => serializer.serialize_i32(0),
6199            Self::LockDown => serializer.serialize_i32(1),
6200            Self::LockDownPending => serializer.serialize_i32(2),
6201            Self::UnknownValue(u) => u.0.serialize(serializer),
6202        }
6203    }
6204}
6205
6206impl<'de> serde::de::Deserialize<'de> for ResourceState {
6207    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6208    where
6209        D: serde::Deserializer<'de>,
6210    {
6211        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourceState>::new(
6212            ".google.cloud.edgecontainer.v1.ResourceState",
6213        ))
6214    }
6215}