Skip to main content

google_cloud_edgenetwork_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 gaxi;
23extern crate google_cloud_gax;
24extern crate google_cloud_location;
25extern crate google_cloud_longrunning;
26extern crate google_cloud_lro;
27extern crate lazy_static;
28extern crate serde;
29extern crate serde_json;
30extern crate serde_with;
31extern crate std;
32extern crate tracing;
33extern crate wkt;
34
35mod debug;
36mod deserialize;
37mod serialize;
38
39/// A Google Edge Cloud zone.
40#[derive(Clone, Default, PartialEq)]
41#[non_exhaustive]
42pub struct Zone {
43    /// Required. The resource name of the zone.
44    pub name: std::string::String,
45
46    /// Output only. The time when the zone was created.
47    pub create_time: std::option::Option<wkt::Timestamp>,
48
49    /// Output only. The time when the zone was last updated.
50    pub update_time: std::option::Option<wkt::Timestamp>,
51
52    /// Deprecated: not implemented.
53    /// Labels as key value pairs.
54    #[deprecated]
55    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
56
57    /// Deprecated: not implemented.
58    /// The deployment layout type.
59    #[deprecated]
60    pub layout_name: std::string::String,
61
62    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
63}
64
65impl Zone {
66    pub fn new() -> Self {
67        std::default::Default::default()
68    }
69
70    /// Sets the value of [name][crate::model::Zone::name].
71    ///
72    /// # Example
73    /// ```ignore,no_run
74    /// # use google_cloud_edgenetwork_v1::model::Zone;
75    /// let x = Zone::new().set_name("example");
76    /// ```
77    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
78        self.name = v.into();
79        self
80    }
81
82    /// Sets the value of [create_time][crate::model::Zone::create_time].
83    ///
84    /// # Example
85    /// ```ignore,no_run
86    /// # use google_cloud_edgenetwork_v1::model::Zone;
87    /// use wkt::Timestamp;
88    /// let x = Zone::new().set_create_time(Timestamp::default()/* use setters */);
89    /// ```
90    pub fn set_create_time<T>(mut self, v: T) -> Self
91    where
92        T: std::convert::Into<wkt::Timestamp>,
93    {
94        self.create_time = std::option::Option::Some(v.into());
95        self
96    }
97
98    /// Sets or clears the value of [create_time][crate::model::Zone::create_time].
99    ///
100    /// # Example
101    /// ```ignore,no_run
102    /// # use google_cloud_edgenetwork_v1::model::Zone;
103    /// use wkt::Timestamp;
104    /// let x = Zone::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
105    /// let x = Zone::new().set_or_clear_create_time(None::<Timestamp>);
106    /// ```
107    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
108    where
109        T: std::convert::Into<wkt::Timestamp>,
110    {
111        self.create_time = v.map(|x| x.into());
112        self
113    }
114
115    /// Sets the value of [update_time][crate::model::Zone::update_time].
116    ///
117    /// # Example
118    /// ```ignore,no_run
119    /// # use google_cloud_edgenetwork_v1::model::Zone;
120    /// use wkt::Timestamp;
121    /// let x = Zone::new().set_update_time(Timestamp::default()/* use setters */);
122    /// ```
123    pub fn set_update_time<T>(mut self, v: T) -> Self
124    where
125        T: std::convert::Into<wkt::Timestamp>,
126    {
127        self.update_time = std::option::Option::Some(v.into());
128        self
129    }
130
131    /// Sets or clears the value of [update_time][crate::model::Zone::update_time].
132    ///
133    /// # Example
134    /// ```ignore,no_run
135    /// # use google_cloud_edgenetwork_v1::model::Zone;
136    /// use wkt::Timestamp;
137    /// let x = Zone::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
138    /// let x = Zone::new().set_or_clear_update_time(None::<Timestamp>);
139    /// ```
140    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
141    where
142        T: std::convert::Into<wkt::Timestamp>,
143    {
144        self.update_time = v.map(|x| x.into());
145        self
146    }
147
148    /// Sets the value of [labels][crate::model::Zone::labels].
149    ///
150    /// # Example
151    /// ```ignore,no_run
152    /// # use google_cloud_edgenetwork_v1::model::Zone;
153    /// let x = Zone::new().set_labels([
154    ///     ("key0", "abc"),
155    ///     ("key1", "xyz"),
156    /// ]);
157    /// ```
158    #[deprecated]
159    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
160    where
161        T: std::iter::IntoIterator<Item = (K, V)>,
162        K: std::convert::Into<std::string::String>,
163        V: std::convert::Into<std::string::String>,
164    {
165        use std::iter::Iterator;
166        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
167        self
168    }
169
170    /// Sets the value of [layout_name][crate::model::Zone::layout_name].
171    ///
172    /// # Example
173    /// ```ignore,no_run
174    /// # use google_cloud_edgenetwork_v1::model::Zone;
175    /// let x = Zone::new().set_layout_name("example");
176    /// ```
177    #[deprecated]
178    pub fn set_layout_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
179        self.layout_name = v.into();
180        self
181    }
182}
183
184impl wkt::message::Message for Zone {
185    fn typename() -> &'static str {
186        "type.googleapis.com/google.cloud.edgenetwork.v1.Zone"
187    }
188}
189
190/// Message describing Network object
191#[derive(Clone, Default, PartialEq)]
192#[non_exhaustive]
193pub struct Network {
194    /// Required. The canonical resource name of the network.
195    pub name: std::string::String,
196
197    /// Output only. The time when the network was created.
198    pub create_time: std::option::Option<wkt::Timestamp>,
199
200    /// Output only. The time when the network was last updated.
201    pub update_time: std::option::Option<wkt::Timestamp>,
202
203    /// Labels associated with this resource.
204    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
205
206    /// Optional. A free-text description of the resource. Max length 1024
207    /// characters.
208    pub description: std::string::String,
209
210    /// IP (L3) MTU value of the network.
211    /// Valid values are: 1500 and 9000.
212    /// Default to 1500 if not set.
213    pub mtu: i32,
214
215    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
216}
217
218impl Network {
219    pub fn new() -> Self {
220        std::default::Default::default()
221    }
222
223    /// Sets the value of [name][crate::model::Network::name].
224    ///
225    /// # Example
226    /// ```ignore,no_run
227    /// # use google_cloud_edgenetwork_v1::model::Network;
228    /// let x = Network::new().set_name("example");
229    /// ```
230    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
231        self.name = v.into();
232        self
233    }
234
235    /// Sets the value of [create_time][crate::model::Network::create_time].
236    ///
237    /// # Example
238    /// ```ignore,no_run
239    /// # use google_cloud_edgenetwork_v1::model::Network;
240    /// use wkt::Timestamp;
241    /// let x = Network::new().set_create_time(Timestamp::default()/* use setters */);
242    /// ```
243    pub fn set_create_time<T>(mut self, v: T) -> Self
244    where
245        T: std::convert::Into<wkt::Timestamp>,
246    {
247        self.create_time = std::option::Option::Some(v.into());
248        self
249    }
250
251    /// Sets or clears the value of [create_time][crate::model::Network::create_time].
252    ///
253    /// # Example
254    /// ```ignore,no_run
255    /// # use google_cloud_edgenetwork_v1::model::Network;
256    /// use wkt::Timestamp;
257    /// let x = Network::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
258    /// let x = Network::new().set_or_clear_create_time(None::<Timestamp>);
259    /// ```
260    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
261    where
262        T: std::convert::Into<wkt::Timestamp>,
263    {
264        self.create_time = v.map(|x| x.into());
265        self
266    }
267
268    /// Sets the value of [update_time][crate::model::Network::update_time].
269    ///
270    /// # Example
271    /// ```ignore,no_run
272    /// # use google_cloud_edgenetwork_v1::model::Network;
273    /// use wkt::Timestamp;
274    /// let x = Network::new().set_update_time(Timestamp::default()/* use setters */);
275    /// ```
276    pub fn set_update_time<T>(mut self, v: T) -> Self
277    where
278        T: std::convert::Into<wkt::Timestamp>,
279    {
280        self.update_time = std::option::Option::Some(v.into());
281        self
282    }
283
284    /// Sets or clears the value of [update_time][crate::model::Network::update_time].
285    ///
286    /// # Example
287    /// ```ignore,no_run
288    /// # use google_cloud_edgenetwork_v1::model::Network;
289    /// use wkt::Timestamp;
290    /// let x = Network::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
291    /// let x = Network::new().set_or_clear_update_time(None::<Timestamp>);
292    /// ```
293    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
294    where
295        T: std::convert::Into<wkt::Timestamp>,
296    {
297        self.update_time = v.map(|x| x.into());
298        self
299    }
300
301    /// Sets the value of [labels][crate::model::Network::labels].
302    ///
303    /// # Example
304    /// ```ignore,no_run
305    /// # use google_cloud_edgenetwork_v1::model::Network;
306    /// let x = Network::new().set_labels([
307    ///     ("key0", "abc"),
308    ///     ("key1", "xyz"),
309    /// ]);
310    /// ```
311    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
312    where
313        T: std::iter::IntoIterator<Item = (K, V)>,
314        K: std::convert::Into<std::string::String>,
315        V: std::convert::Into<std::string::String>,
316    {
317        use std::iter::Iterator;
318        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
319        self
320    }
321
322    /// Sets the value of [description][crate::model::Network::description].
323    ///
324    /// # Example
325    /// ```ignore,no_run
326    /// # use google_cloud_edgenetwork_v1::model::Network;
327    /// let x = Network::new().set_description("example");
328    /// ```
329    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
330        self.description = v.into();
331        self
332    }
333
334    /// Sets the value of [mtu][crate::model::Network::mtu].
335    ///
336    /// # Example
337    /// ```ignore,no_run
338    /// # use google_cloud_edgenetwork_v1::model::Network;
339    /// let x = Network::new().set_mtu(42);
340    /// ```
341    pub fn set_mtu<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
342        self.mtu = v.into();
343        self
344    }
345}
346
347impl wkt::message::Message for Network {
348    fn typename() -> &'static str {
349        "type.googleapis.com/google.cloud.edgenetwork.v1.Network"
350    }
351}
352
353/// Message describing Subnet object
354#[derive(Clone, Default, PartialEq)]
355#[non_exhaustive]
356pub struct Subnet {
357    /// Required. The canonical resource name of the subnet.
358    pub name: std::string::String,
359
360    /// Output only. The time when the subnet was created.
361    pub create_time: std::option::Option<wkt::Timestamp>,
362
363    /// Output only. The time when the subnet was last updated.
364    pub update_time: std::option::Option<wkt::Timestamp>,
365
366    /// Labels associated with this resource.
367    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
368
369    /// Optional. A free-text description of the resource. Max length 1024
370    /// characters.
371    pub description: std::string::String,
372
373    /// Required. The network that this subnetwork belongs to.
374    pub network: std::string::String,
375
376    /// The ranges of ipv4 addresses that are owned by this subnetwork.
377    pub ipv4_cidr: std::vec::Vec<std::string::String>,
378
379    /// The ranges of ipv6 addresses that are owned by this subnetwork.
380    pub ipv6_cidr: std::vec::Vec<std::string::String>,
381
382    /// Optional. VLAN id provided by user. If not specified we assign one
383    /// automatically.
384    pub vlan_id: i32,
385
386    /// Optional. A bonding type in the subnet creation specifies whether a VLAN
387    /// being created will be present on Bonded or Non-Bonded or Both port types.
388    /// In addition, this flag is to be used to set the specific network
389    /// configuration which clusters can then use for their workloads based on the
390    /// bonding choice.
391    pub bonding_type: crate::model::subnet::BondingType,
392
393    /// Output only. Current stage of the resource to the device by config push.
394    pub state: crate::model::ResourceState,
395
396    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
397}
398
399impl Subnet {
400    pub fn new() -> Self {
401        std::default::Default::default()
402    }
403
404    /// Sets the value of [name][crate::model::Subnet::name].
405    ///
406    /// # Example
407    /// ```ignore,no_run
408    /// # use google_cloud_edgenetwork_v1::model::Subnet;
409    /// let x = Subnet::new().set_name("example");
410    /// ```
411    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
412        self.name = v.into();
413        self
414    }
415
416    /// Sets the value of [create_time][crate::model::Subnet::create_time].
417    ///
418    /// # Example
419    /// ```ignore,no_run
420    /// # use google_cloud_edgenetwork_v1::model::Subnet;
421    /// use wkt::Timestamp;
422    /// let x = Subnet::new().set_create_time(Timestamp::default()/* use setters */);
423    /// ```
424    pub fn set_create_time<T>(mut self, v: T) -> Self
425    where
426        T: std::convert::Into<wkt::Timestamp>,
427    {
428        self.create_time = std::option::Option::Some(v.into());
429        self
430    }
431
432    /// Sets or clears the value of [create_time][crate::model::Subnet::create_time].
433    ///
434    /// # Example
435    /// ```ignore,no_run
436    /// # use google_cloud_edgenetwork_v1::model::Subnet;
437    /// use wkt::Timestamp;
438    /// let x = Subnet::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
439    /// let x = Subnet::new().set_or_clear_create_time(None::<Timestamp>);
440    /// ```
441    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
442    where
443        T: std::convert::Into<wkt::Timestamp>,
444    {
445        self.create_time = v.map(|x| x.into());
446        self
447    }
448
449    /// Sets the value of [update_time][crate::model::Subnet::update_time].
450    ///
451    /// # Example
452    /// ```ignore,no_run
453    /// # use google_cloud_edgenetwork_v1::model::Subnet;
454    /// use wkt::Timestamp;
455    /// let x = Subnet::new().set_update_time(Timestamp::default()/* use setters */);
456    /// ```
457    pub fn set_update_time<T>(mut self, v: T) -> Self
458    where
459        T: std::convert::Into<wkt::Timestamp>,
460    {
461        self.update_time = std::option::Option::Some(v.into());
462        self
463    }
464
465    /// Sets or clears the value of [update_time][crate::model::Subnet::update_time].
466    ///
467    /// # Example
468    /// ```ignore,no_run
469    /// # use google_cloud_edgenetwork_v1::model::Subnet;
470    /// use wkt::Timestamp;
471    /// let x = Subnet::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
472    /// let x = Subnet::new().set_or_clear_update_time(None::<Timestamp>);
473    /// ```
474    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
475    where
476        T: std::convert::Into<wkt::Timestamp>,
477    {
478        self.update_time = v.map(|x| x.into());
479        self
480    }
481
482    /// Sets the value of [labels][crate::model::Subnet::labels].
483    ///
484    /// # Example
485    /// ```ignore,no_run
486    /// # use google_cloud_edgenetwork_v1::model::Subnet;
487    /// let x = Subnet::new().set_labels([
488    ///     ("key0", "abc"),
489    ///     ("key1", "xyz"),
490    /// ]);
491    /// ```
492    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
493    where
494        T: std::iter::IntoIterator<Item = (K, V)>,
495        K: std::convert::Into<std::string::String>,
496        V: std::convert::Into<std::string::String>,
497    {
498        use std::iter::Iterator;
499        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
500        self
501    }
502
503    /// Sets the value of [description][crate::model::Subnet::description].
504    ///
505    /// # Example
506    /// ```ignore,no_run
507    /// # use google_cloud_edgenetwork_v1::model::Subnet;
508    /// let x = Subnet::new().set_description("example");
509    /// ```
510    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
511        self.description = v.into();
512        self
513    }
514
515    /// Sets the value of [network][crate::model::Subnet::network].
516    ///
517    /// # Example
518    /// ```ignore,no_run
519    /// # use google_cloud_edgenetwork_v1::model::Subnet;
520    /// let x = Subnet::new().set_network("example");
521    /// ```
522    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
523        self.network = v.into();
524        self
525    }
526
527    /// Sets the value of [ipv4_cidr][crate::model::Subnet::ipv4_cidr].
528    ///
529    /// # Example
530    /// ```ignore,no_run
531    /// # use google_cloud_edgenetwork_v1::model::Subnet;
532    /// let x = Subnet::new().set_ipv4_cidr(["a", "b", "c"]);
533    /// ```
534    pub fn set_ipv4_cidr<T, V>(mut self, v: T) -> Self
535    where
536        T: std::iter::IntoIterator<Item = V>,
537        V: std::convert::Into<std::string::String>,
538    {
539        use std::iter::Iterator;
540        self.ipv4_cidr = v.into_iter().map(|i| i.into()).collect();
541        self
542    }
543
544    /// Sets the value of [ipv6_cidr][crate::model::Subnet::ipv6_cidr].
545    ///
546    /// # Example
547    /// ```ignore,no_run
548    /// # use google_cloud_edgenetwork_v1::model::Subnet;
549    /// let x = Subnet::new().set_ipv6_cidr(["a", "b", "c"]);
550    /// ```
551    pub fn set_ipv6_cidr<T, V>(mut self, v: T) -> Self
552    where
553        T: std::iter::IntoIterator<Item = V>,
554        V: std::convert::Into<std::string::String>,
555    {
556        use std::iter::Iterator;
557        self.ipv6_cidr = v.into_iter().map(|i| i.into()).collect();
558        self
559    }
560
561    /// Sets the value of [vlan_id][crate::model::Subnet::vlan_id].
562    ///
563    /// # Example
564    /// ```ignore,no_run
565    /// # use google_cloud_edgenetwork_v1::model::Subnet;
566    /// let x = Subnet::new().set_vlan_id(42);
567    /// ```
568    pub fn set_vlan_id<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
569        self.vlan_id = v.into();
570        self
571    }
572
573    /// Sets the value of [bonding_type][crate::model::Subnet::bonding_type].
574    ///
575    /// # Example
576    /// ```ignore,no_run
577    /// # use google_cloud_edgenetwork_v1::model::Subnet;
578    /// use google_cloud_edgenetwork_v1::model::subnet::BondingType;
579    /// let x0 = Subnet::new().set_bonding_type(BondingType::Bonded);
580    /// let x1 = Subnet::new().set_bonding_type(BondingType::NonBonded);
581    /// ```
582    pub fn set_bonding_type<T: std::convert::Into<crate::model::subnet::BondingType>>(
583        mut self,
584        v: T,
585    ) -> Self {
586        self.bonding_type = v.into();
587        self
588    }
589
590    /// Sets the value of [state][crate::model::Subnet::state].
591    ///
592    /// # Example
593    /// ```ignore,no_run
594    /// # use google_cloud_edgenetwork_v1::model::Subnet;
595    /// use google_cloud_edgenetwork_v1::model::ResourceState;
596    /// let x0 = Subnet::new().set_state(ResourceState::StatePending);
597    /// let x1 = Subnet::new().set_state(ResourceState::StateProvisioning);
598    /// let x2 = Subnet::new().set_state(ResourceState::StateRunning);
599    /// ```
600    pub fn set_state<T: std::convert::Into<crate::model::ResourceState>>(mut self, v: T) -> Self {
601        self.state = v.into();
602        self
603    }
604}
605
606impl wkt::message::Message for Subnet {
607    fn typename() -> &'static str {
608        "type.googleapis.com/google.cloud.edgenetwork.v1.Subnet"
609    }
610}
611
612/// Defines additional types related to [Subnet].
613pub mod subnet {
614    #[allow(unused_imports)]
615    use super::*;
616
617    /// Bonding type in the subnet.
618    ///
619    /// # Working with unknown values
620    ///
621    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
622    /// additional enum variants at any time. Adding new variants is not considered
623    /// a breaking change. Applications should write their code in anticipation of:
624    ///
625    /// - New values appearing in future releases of the client library, **and**
626    /// - New values received dynamically, without application changes.
627    ///
628    /// Please consult the [Working with enums] section in the user guide for some
629    /// guidelines.
630    ///
631    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
632    #[derive(Clone, Debug, PartialEq)]
633    #[non_exhaustive]
634    pub enum BondingType {
635        /// Unspecified
636        /// Bonding type will be unspecified by default and if the user chooses to
637        /// not specify a bonding type at time of creating the VLAN. This will be
638        /// treated as mixed bonding where the VLAN will have both bonded and
639        /// non-bonded connectivity to machines.
640        Unspecified,
641        /// Multi homed.
642        Bonded,
643        /// Single homed.
644        NonBonded,
645        /// If set, the enum was initialized with an unknown value.
646        ///
647        /// Applications can examine the value using [BondingType::value] or
648        /// [BondingType::name].
649        UnknownValue(bonding_type::UnknownValue),
650    }
651
652    #[doc(hidden)]
653    pub mod bonding_type {
654        #[allow(unused_imports)]
655        use super::*;
656        #[derive(Clone, Debug, PartialEq)]
657        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
658    }
659
660    impl BondingType {
661        /// Gets the enum value.
662        ///
663        /// Returns `None` if the enum contains an unknown value deserialized from
664        /// the string representation of enums.
665        pub fn value(&self) -> std::option::Option<i32> {
666            match self {
667                Self::Unspecified => std::option::Option::Some(0),
668                Self::Bonded => std::option::Option::Some(1),
669                Self::NonBonded => std::option::Option::Some(2),
670                Self::UnknownValue(u) => u.0.value(),
671            }
672        }
673
674        /// Gets the enum value as a string.
675        ///
676        /// Returns `None` if the enum contains an unknown value deserialized from
677        /// the integer representation of enums.
678        pub fn name(&self) -> std::option::Option<&str> {
679            match self {
680                Self::Unspecified => std::option::Option::Some("BONDING_TYPE_UNSPECIFIED"),
681                Self::Bonded => std::option::Option::Some("BONDED"),
682                Self::NonBonded => std::option::Option::Some("NON_BONDED"),
683                Self::UnknownValue(u) => u.0.name(),
684            }
685        }
686    }
687
688    impl std::default::Default for BondingType {
689        fn default() -> Self {
690            use std::convert::From;
691            Self::from(0)
692        }
693    }
694
695    impl std::fmt::Display for BondingType {
696        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
697            wkt::internal::display_enum(f, self.name(), self.value())
698        }
699    }
700
701    impl std::convert::From<i32> for BondingType {
702        fn from(value: i32) -> Self {
703            match value {
704                0 => Self::Unspecified,
705                1 => Self::Bonded,
706                2 => Self::NonBonded,
707                _ => Self::UnknownValue(bonding_type::UnknownValue(
708                    wkt::internal::UnknownEnumValue::Integer(value),
709                )),
710            }
711        }
712    }
713
714    impl std::convert::From<&str> for BondingType {
715        fn from(value: &str) -> Self {
716            use std::string::ToString;
717            match value {
718                "BONDING_TYPE_UNSPECIFIED" => Self::Unspecified,
719                "BONDED" => Self::Bonded,
720                "NON_BONDED" => Self::NonBonded,
721                _ => Self::UnknownValue(bonding_type::UnknownValue(
722                    wkt::internal::UnknownEnumValue::String(value.to_string()),
723                )),
724            }
725        }
726    }
727
728    impl serde::ser::Serialize for BondingType {
729        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
730        where
731            S: serde::Serializer,
732        {
733            match self {
734                Self::Unspecified => serializer.serialize_i32(0),
735                Self::Bonded => serializer.serialize_i32(1),
736                Self::NonBonded => serializer.serialize_i32(2),
737                Self::UnknownValue(u) => u.0.serialize(serializer),
738            }
739        }
740    }
741
742    impl<'de> serde::de::Deserialize<'de> for BondingType {
743        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
744        where
745            D: serde::Deserializer<'de>,
746        {
747            deserializer.deserialize_any(wkt::internal::EnumVisitor::<BondingType>::new(
748                ".google.cloud.edgenetwork.v1.Subnet.BondingType",
749            ))
750        }
751    }
752}
753
754/// Message describing Interconnect object
755#[derive(Clone, Default, PartialEq)]
756#[non_exhaustive]
757pub struct Interconnect {
758    /// Required. The canonical resource name of the interconnect.
759    pub name: std::string::String,
760
761    /// Output only. The time when the subnet was created.
762    pub create_time: std::option::Option<wkt::Timestamp>,
763
764    /// Output only. The time when the subnet was last updated.
765    pub update_time: std::option::Option<wkt::Timestamp>,
766
767    /// Labels associated with this resource.
768    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
769
770    /// Optional. A free-text description of the resource. Max length 1024
771    /// characters.
772    pub description: std::string::String,
773
774    /// Optional. Type of interconnect, which takes only the value 'DEDICATED' for
775    /// now.
776    pub interconnect_type: crate::model::interconnect::InterconnectType,
777
778    /// Output only. Unique identifier for the link.
779    pub uuid: std::string::String,
780
781    /// Output only. Cloud resource name of the switch device.
782    pub device_cloud_resource_name: std::string::String,
783
784    /// Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the
785    /// interconnect.
786    pub physical_ports: std::vec::Vec<std::string::String>,
787
788    /// Optional. The remote peering network type of the interconnect. It is
789    /// required when peering separation is enabled.
790    pub remote_peering_network_type: crate::model::RemotePeeringNetworkType,
791
792    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
793}
794
795impl Interconnect {
796    pub fn new() -> Self {
797        std::default::Default::default()
798    }
799
800    /// Sets the value of [name][crate::model::Interconnect::name].
801    ///
802    /// # Example
803    /// ```ignore,no_run
804    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
805    /// let x = Interconnect::new().set_name("example");
806    /// ```
807    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
808        self.name = v.into();
809        self
810    }
811
812    /// Sets the value of [create_time][crate::model::Interconnect::create_time].
813    ///
814    /// # Example
815    /// ```ignore,no_run
816    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
817    /// use wkt::Timestamp;
818    /// let x = Interconnect::new().set_create_time(Timestamp::default()/* use setters */);
819    /// ```
820    pub fn set_create_time<T>(mut self, v: T) -> Self
821    where
822        T: std::convert::Into<wkt::Timestamp>,
823    {
824        self.create_time = std::option::Option::Some(v.into());
825        self
826    }
827
828    /// Sets or clears the value of [create_time][crate::model::Interconnect::create_time].
829    ///
830    /// # Example
831    /// ```ignore,no_run
832    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
833    /// use wkt::Timestamp;
834    /// let x = Interconnect::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
835    /// let x = Interconnect::new().set_or_clear_create_time(None::<Timestamp>);
836    /// ```
837    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
838    where
839        T: std::convert::Into<wkt::Timestamp>,
840    {
841        self.create_time = v.map(|x| x.into());
842        self
843    }
844
845    /// Sets the value of [update_time][crate::model::Interconnect::update_time].
846    ///
847    /// # Example
848    /// ```ignore,no_run
849    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
850    /// use wkt::Timestamp;
851    /// let x = Interconnect::new().set_update_time(Timestamp::default()/* use setters */);
852    /// ```
853    pub fn set_update_time<T>(mut self, v: T) -> Self
854    where
855        T: std::convert::Into<wkt::Timestamp>,
856    {
857        self.update_time = std::option::Option::Some(v.into());
858        self
859    }
860
861    /// Sets or clears the value of [update_time][crate::model::Interconnect::update_time].
862    ///
863    /// # Example
864    /// ```ignore,no_run
865    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
866    /// use wkt::Timestamp;
867    /// let x = Interconnect::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
868    /// let x = Interconnect::new().set_or_clear_update_time(None::<Timestamp>);
869    /// ```
870    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
871    where
872        T: std::convert::Into<wkt::Timestamp>,
873    {
874        self.update_time = v.map(|x| x.into());
875        self
876    }
877
878    /// Sets the value of [labels][crate::model::Interconnect::labels].
879    ///
880    /// # Example
881    /// ```ignore,no_run
882    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
883    /// let x = Interconnect::new().set_labels([
884    ///     ("key0", "abc"),
885    ///     ("key1", "xyz"),
886    /// ]);
887    /// ```
888    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
889    where
890        T: std::iter::IntoIterator<Item = (K, V)>,
891        K: std::convert::Into<std::string::String>,
892        V: std::convert::Into<std::string::String>,
893    {
894        use std::iter::Iterator;
895        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
896        self
897    }
898
899    /// Sets the value of [description][crate::model::Interconnect::description].
900    ///
901    /// # Example
902    /// ```ignore,no_run
903    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
904    /// let x = Interconnect::new().set_description("example");
905    /// ```
906    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
907        self.description = v.into();
908        self
909    }
910
911    /// Sets the value of [interconnect_type][crate::model::Interconnect::interconnect_type].
912    ///
913    /// # Example
914    /// ```ignore,no_run
915    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
916    /// use google_cloud_edgenetwork_v1::model::interconnect::InterconnectType;
917    /// let x0 = Interconnect::new().set_interconnect_type(InterconnectType::Dedicated);
918    /// ```
919    pub fn set_interconnect_type<
920        T: std::convert::Into<crate::model::interconnect::InterconnectType>,
921    >(
922        mut self,
923        v: T,
924    ) -> Self {
925        self.interconnect_type = v.into();
926        self
927    }
928
929    /// Sets the value of [uuid][crate::model::Interconnect::uuid].
930    ///
931    /// # Example
932    /// ```ignore,no_run
933    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
934    /// let x = Interconnect::new().set_uuid("example");
935    /// ```
936    pub fn set_uuid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
937        self.uuid = v.into();
938        self
939    }
940
941    /// Sets the value of [device_cloud_resource_name][crate::model::Interconnect::device_cloud_resource_name].
942    ///
943    /// # Example
944    /// ```ignore,no_run
945    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
946    /// let x = Interconnect::new().set_device_cloud_resource_name("example");
947    /// ```
948    pub fn set_device_cloud_resource_name<T: std::convert::Into<std::string::String>>(
949        mut self,
950        v: T,
951    ) -> Self {
952        self.device_cloud_resource_name = v.into();
953        self
954    }
955
956    /// Sets the value of [physical_ports][crate::model::Interconnect::physical_ports].
957    ///
958    /// # Example
959    /// ```ignore,no_run
960    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
961    /// let x = Interconnect::new().set_physical_ports(["a", "b", "c"]);
962    /// ```
963    pub fn set_physical_ports<T, V>(mut self, v: T) -> Self
964    where
965        T: std::iter::IntoIterator<Item = V>,
966        V: std::convert::Into<std::string::String>,
967    {
968        use std::iter::Iterator;
969        self.physical_ports = v.into_iter().map(|i| i.into()).collect();
970        self
971    }
972
973    /// Sets the value of [remote_peering_network_type][crate::model::Interconnect::remote_peering_network_type].
974    ///
975    /// # Example
976    /// ```ignore,no_run
977    /// # use google_cloud_edgenetwork_v1::model::Interconnect;
978    /// use google_cloud_edgenetwork_v1::model::RemotePeeringNetworkType;
979    /// let x0 = Interconnect::new().set_remote_peering_network_type(RemotePeeringNetworkType::CustomerInternal);
980    /// let x1 = Interconnect::new().set_remote_peering_network_type(RemotePeeringNetworkType::CustomerInternet);
981    /// ```
982    pub fn set_remote_peering_network_type<
983        T: std::convert::Into<crate::model::RemotePeeringNetworkType>,
984    >(
985        mut self,
986        v: T,
987    ) -> Self {
988        self.remote_peering_network_type = v.into();
989        self
990    }
991}
992
993impl wkt::message::Message for Interconnect {
994    fn typename() -> &'static str {
995        "type.googleapis.com/google.cloud.edgenetwork.v1.Interconnect"
996    }
997}
998
999/// Defines additional types related to [Interconnect].
1000pub mod interconnect {
1001    #[allow(unused_imports)]
1002    use super::*;
1003
1004    /// Type of interconnect.
1005    ///
1006    /// # Working with unknown values
1007    ///
1008    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1009    /// additional enum variants at any time. Adding new variants is not considered
1010    /// a breaking change. Applications should write their code in anticipation of:
1011    ///
1012    /// - New values appearing in future releases of the client library, **and**
1013    /// - New values received dynamically, without application changes.
1014    ///
1015    /// Please consult the [Working with enums] section in the user guide for some
1016    /// guidelines.
1017    ///
1018    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
1019    #[derive(Clone, Debug, PartialEq)]
1020    #[non_exhaustive]
1021    pub enum InterconnectType {
1022        /// Unspecified.
1023        Unspecified,
1024        /// Dedicated Interconnect.
1025        Dedicated,
1026        /// If set, the enum was initialized with an unknown value.
1027        ///
1028        /// Applications can examine the value using [InterconnectType::value] or
1029        /// [InterconnectType::name].
1030        UnknownValue(interconnect_type::UnknownValue),
1031    }
1032
1033    #[doc(hidden)]
1034    pub mod interconnect_type {
1035        #[allow(unused_imports)]
1036        use super::*;
1037        #[derive(Clone, Debug, PartialEq)]
1038        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1039    }
1040
1041    impl InterconnectType {
1042        /// Gets the enum value.
1043        ///
1044        /// Returns `None` if the enum contains an unknown value deserialized from
1045        /// the string representation of enums.
1046        pub fn value(&self) -> std::option::Option<i32> {
1047            match self {
1048                Self::Unspecified => std::option::Option::Some(0),
1049                Self::Dedicated => std::option::Option::Some(1),
1050                Self::UnknownValue(u) => u.0.value(),
1051            }
1052        }
1053
1054        /// Gets the enum value as a string.
1055        ///
1056        /// Returns `None` if the enum contains an unknown value deserialized from
1057        /// the integer representation of enums.
1058        pub fn name(&self) -> std::option::Option<&str> {
1059            match self {
1060                Self::Unspecified => std::option::Option::Some("INTERCONNECT_TYPE_UNSPECIFIED"),
1061                Self::Dedicated => std::option::Option::Some("DEDICATED"),
1062                Self::UnknownValue(u) => u.0.name(),
1063            }
1064        }
1065    }
1066
1067    impl std::default::Default for InterconnectType {
1068        fn default() -> Self {
1069            use std::convert::From;
1070            Self::from(0)
1071        }
1072    }
1073
1074    impl std::fmt::Display for InterconnectType {
1075        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1076            wkt::internal::display_enum(f, self.name(), self.value())
1077        }
1078    }
1079
1080    impl std::convert::From<i32> for InterconnectType {
1081        fn from(value: i32) -> Self {
1082            match value {
1083                0 => Self::Unspecified,
1084                1 => Self::Dedicated,
1085                _ => Self::UnknownValue(interconnect_type::UnknownValue(
1086                    wkt::internal::UnknownEnumValue::Integer(value),
1087                )),
1088            }
1089        }
1090    }
1091
1092    impl std::convert::From<&str> for InterconnectType {
1093        fn from(value: &str) -> Self {
1094            use std::string::ToString;
1095            match value {
1096                "INTERCONNECT_TYPE_UNSPECIFIED" => Self::Unspecified,
1097                "DEDICATED" => Self::Dedicated,
1098                _ => Self::UnknownValue(interconnect_type::UnknownValue(
1099                    wkt::internal::UnknownEnumValue::String(value.to_string()),
1100                )),
1101            }
1102        }
1103    }
1104
1105    impl serde::ser::Serialize for InterconnectType {
1106        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1107        where
1108            S: serde::Serializer,
1109        {
1110            match self {
1111                Self::Unspecified => serializer.serialize_i32(0),
1112                Self::Dedicated => serializer.serialize_i32(1),
1113                Self::UnknownValue(u) => u.0.serialize(serializer),
1114            }
1115        }
1116    }
1117
1118    impl<'de> serde::de::Deserialize<'de> for InterconnectType {
1119        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1120        where
1121            D: serde::Deserializer<'de>,
1122        {
1123            deserializer.deserialize_any(wkt::internal::EnumVisitor::<InterconnectType>::new(
1124                ".google.cloud.edgenetwork.v1.Interconnect.InterconnectType",
1125            ))
1126        }
1127    }
1128}
1129
1130/// Message describing InterconnectAttachment object
1131#[derive(Clone, Default, PartialEq)]
1132#[non_exhaustive]
1133pub struct InterconnectAttachment {
1134    /// Required. The canonical resource name of the interconnect attachment.
1135    pub name: std::string::String,
1136
1137    /// Output only. The time when the interconnect attachment was created.
1138    pub create_time: std::option::Option<wkt::Timestamp>,
1139
1140    /// Output only. The time when the interconnect attachment was last updated.
1141    pub update_time: std::option::Option<wkt::Timestamp>,
1142
1143    /// Labels associated with this resource.
1144    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1145
1146    /// Optional. A free-text description of the resource. Max length 1024
1147    /// characters.
1148    pub description: std::string::String,
1149
1150    /// Required. The canonical name of underlying Interconnect object that this
1151    /// attachment's traffic will traverse through. The name is in the form of
1152    /// `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`.
1153    pub interconnect: std::string::String,
1154
1155    /// Optional. The canonical Network name in the form of
1156    /// `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
1157    pub network: std::string::String,
1158
1159    /// Required. VLAN id provided by user. Must be site-wise unique.
1160    pub vlan_id: i32,
1161
1162    /// IP (L3) MTU value of the virtual edge cloud.
1163    /// Valid values are: 1500 and 9000.
1164    /// Default to 1500 if not set.
1165    pub mtu: i32,
1166
1167    /// Output only. Current stage of the resource to the device by config push.
1168    pub state: crate::model::ResourceState,
1169
1170    /// Optional. The remote peering network type of the underlying interconnect.
1171    /// It is required when peering separation is enabled.
1172    pub peering_type: crate::model::RemotePeeringNetworkType,
1173
1174    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1175}
1176
1177impl InterconnectAttachment {
1178    pub fn new() -> Self {
1179        std::default::Default::default()
1180    }
1181
1182    /// Sets the value of [name][crate::model::InterconnectAttachment::name].
1183    ///
1184    /// # Example
1185    /// ```ignore,no_run
1186    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1187    /// let x = InterconnectAttachment::new().set_name("example");
1188    /// ```
1189    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1190        self.name = v.into();
1191        self
1192    }
1193
1194    /// Sets the value of [create_time][crate::model::InterconnectAttachment::create_time].
1195    ///
1196    /// # Example
1197    /// ```ignore,no_run
1198    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1199    /// use wkt::Timestamp;
1200    /// let x = InterconnectAttachment::new().set_create_time(Timestamp::default()/* use setters */);
1201    /// ```
1202    pub fn set_create_time<T>(mut self, v: T) -> Self
1203    where
1204        T: std::convert::Into<wkt::Timestamp>,
1205    {
1206        self.create_time = std::option::Option::Some(v.into());
1207        self
1208    }
1209
1210    /// Sets or clears the value of [create_time][crate::model::InterconnectAttachment::create_time].
1211    ///
1212    /// # Example
1213    /// ```ignore,no_run
1214    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1215    /// use wkt::Timestamp;
1216    /// let x = InterconnectAttachment::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
1217    /// let x = InterconnectAttachment::new().set_or_clear_create_time(None::<Timestamp>);
1218    /// ```
1219    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1220    where
1221        T: std::convert::Into<wkt::Timestamp>,
1222    {
1223        self.create_time = v.map(|x| x.into());
1224        self
1225    }
1226
1227    /// Sets the value of [update_time][crate::model::InterconnectAttachment::update_time].
1228    ///
1229    /// # Example
1230    /// ```ignore,no_run
1231    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1232    /// use wkt::Timestamp;
1233    /// let x = InterconnectAttachment::new().set_update_time(Timestamp::default()/* use setters */);
1234    /// ```
1235    pub fn set_update_time<T>(mut self, v: T) -> Self
1236    where
1237        T: std::convert::Into<wkt::Timestamp>,
1238    {
1239        self.update_time = std::option::Option::Some(v.into());
1240        self
1241    }
1242
1243    /// Sets or clears the value of [update_time][crate::model::InterconnectAttachment::update_time].
1244    ///
1245    /// # Example
1246    /// ```ignore,no_run
1247    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1248    /// use wkt::Timestamp;
1249    /// let x = InterconnectAttachment::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
1250    /// let x = InterconnectAttachment::new().set_or_clear_update_time(None::<Timestamp>);
1251    /// ```
1252    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1253    where
1254        T: std::convert::Into<wkt::Timestamp>,
1255    {
1256        self.update_time = v.map(|x| x.into());
1257        self
1258    }
1259
1260    /// Sets the value of [labels][crate::model::InterconnectAttachment::labels].
1261    ///
1262    /// # Example
1263    /// ```ignore,no_run
1264    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1265    /// let x = InterconnectAttachment::new().set_labels([
1266    ///     ("key0", "abc"),
1267    ///     ("key1", "xyz"),
1268    /// ]);
1269    /// ```
1270    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1271    where
1272        T: std::iter::IntoIterator<Item = (K, V)>,
1273        K: std::convert::Into<std::string::String>,
1274        V: std::convert::Into<std::string::String>,
1275    {
1276        use std::iter::Iterator;
1277        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1278        self
1279    }
1280
1281    /// Sets the value of [description][crate::model::InterconnectAttachment::description].
1282    ///
1283    /// # Example
1284    /// ```ignore,no_run
1285    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1286    /// let x = InterconnectAttachment::new().set_description("example");
1287    /// ```
1288    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1289        self.description = v.into();
1290        self
1291    }
1292
1293    /// Sets the value of [interconnect][crate::model::InterconnectAttachment::interconnect].
1294    ///
1295    /// # Example
1296    /// ```ignore,no_run
1297    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1298    /// let x = InterconnectAttachment::new().set_interconnect("example");
1299    /// ```
1300    pub fn set_interconnect<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1301        self.interconnect = v.into();
1302        self
1303    }
1304
1305    /// Sets the value of [network][crate::model::InterconnectAttachment::network].
1306    ///
1307    /// # Example
1308    /// ```ignore,no_run
1309    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1310    /// let x = InterconnectAttachment::new().set_network("example");
1311    /// ```
1312    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1313        self.network = v.into();
1314        self
1315    }
1316
1317    /// Sets the value of [vlan_id][crate::model::InterconnectAttachment::vlan_id].
1318    ///
1319    /// # Example
1320    /// ```ignore,no_run
1321    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1322    /// let x = InterconnectAttachment::new().set_vlan_id(42);
1323    /// ```
1324    pub fn set_vlan_id<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1325        self.vlan_id = v.into();
1326        self
1327    }
1328
1329    /// Sets the value of [mtu][crate::model::InterconnectAttachment::mtu].
1330    ///
1331    /// # Example
1332    /// ```ignore,no_run
1333    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1334    /// let x = InterconnectAttachment::new().set_mtu(42);
1335    /// ```
1336    pub fn set_mtu<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1337        self.mtu = v.into();
1338        self
1339    }
1340
1341    /// Sets the value of [state][crate::model::InterconnectAttachment::state].
1342    ///
1343    /// # Example
1344    /// ```ignore,no_run
1345    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1346    /// use google_cloud_edgenetwork_v1::model::ResourceState;
1347    /// let x0 = InterconnectAttachment::new().set_state(ResourceState::StatePending);
1348    /// let x1 = InterconnectAttachment::new().set_state(ResourceState::StateProvisioning);
1349    /// let x2 = InterconnectAttachment::new().set_state(ResourceState::StateRunning);
1350    /// ```
1351    pub fn set_state<T: std::convert::Into<crate::model::ResourceState>>(mut self, v: T) -> Self {
1352        self.state = v.into();
1353        self
1354    }
1355
1356    /// Sets the value of [peering_type][crate::model::InterconnectAttachment::peering_type].
1357    ///
1358    /// # Example
1359    /// ```ignore,no_run
1360    /// # use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
1361    /// use google_cloud_edgenetwork_v1::model::RemotePeeringNetworkType;
1362    /// let x0 = InterconnectAttachment::new().set_peering_type(RemotePeeringNetworkType::CustomerInternal);
1363    /// let x1 = InterconnectAttachment::new().set_peering_type(RemotePeeringNetworkType::CustomerInternet);
1364    /// ```
1365    pub fn set_peering_type<T: std::convert::Into<crate::model::RemotePeeringNetworkType>>(
1366        mut self,
1367        v: T,
1368    ) -> Self {
1369        self.peering_type = v.into();
1370        self
1371    }
1372}
1373
1374impl wkt::message::Message for InterconnectAttachment {
1375    fn typename() -> &'static str {
1376        "type.googleapis.com/google.cloud.edgenetwork.v1.InterconnectAttachment"
1377    }
1378}
1379
1380/// Message describing Router object
1381#[derive(Clone, Default, PartialEq)]
1382#[non_exhaustive]
1383pub struct Router {
1384    /// Required. The canonical resource name of the router.
1385    pub name: std::string::String,
1386
1387    /// Output only. The time when the router was created.
1388    pub create_time: std::option::Option<wkt::Timestamp>,
1389
1390    /// Output only. The time when the router was last updated.
1391    pub update_time: std::option::Option<wkt::Timestamp>,
1392
1393    /// Labels associated with this resource.
1394    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
1395
1396    /// Optional. A free-text description of the resource. Max length 1024
1397    /// characters.
1398    pub description: std::string::String,
1399
1400    /// Required. The canonical name of the network to which this router belongs.
1401    /// The name is in the form of
1402    /// `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`.
1403    pub network: std::string::String,
1404
1405    /// Router interfaces.
1406    pub interface: std::vec::Vec<crate::model::router::Interface>,
1407
1408    /// BGP peers.
1409    pub bgp_peer: std::vec::Vec<crate::model::router::BgpPeer>,
1410
1411    /// BGP information specific to this router.
1412    pub bgp: std::option::Option<crate::model::router::Bgp>,
1413
1414    /// Output only. Current stage of the resource to the device by config push.
1415    pub state: crate::model::ResourceState,
1416
1417    /// Optional. A list of CIDRs in IP/Length format to advertise northbound as
1418    /// static routes from this router.
1419    pub route_advertisements: std::vec::Vec<std::string::String>,
1420
1421    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1422}
1423
1424impl Router {
1425    pub fn new() -> Self {
1426        std::default::Default::default()
1427    }
1428
1429    /// Sets the value of [name][crate::model::Router::name].
1430    ///
1431    /// # Example
1432    /// ```ignore,no_run
1433    /// # use google_cloud_edgenetwork_v1::model::Router;
1434    /// let x = Router::new().set_name("example");
1435    /// ```
1436    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1437        self.name = v.into();
1438        self
1439    }
1440
1441    /// Sets the value of [create_time][crate::model::Router::create_time].
1442    ///
1443    /// # Example
1444    /// ```ignore,no_run
1445    /// # use google_cloud_edgenetwork_v1::model::Router;
1446    /// use wkt::Timestamp;
1447    /// let x = Router::new().set_create_time(Timestamp::default()/* use setters */);
1448    /// ```
1449    pub fn set_create_time<T>(mut self, v: T) -> Self
1450    where
1451        T: std::convert::Into<wkt::Timestamp>,
1452    {
1453        self.create_time = std::option::Option::Some(v.into());
1454        self
1455    }
1456
1457    /// Sets or clears the value of [create_time][crate::model::Router::create_time].
1458    ///
1459    /// # Example
1460    /// ```ignore,no_run
1461    /// # use google_cloud_edgenetwork_v1::model::Router;
1462    /// use wkt::Timestamp;
1463    /// let x = Router::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
1464    /// let x = Router::new().set_or_clear_create_time(None::<Timestamp>);
1465    /// ```
1466    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
1467    where
1468        T: std::convert::Into<wkt::Timestamp>,
1469    {
1470        self.create_time = v.map(|x| x.into());
1471        self
1472    }
1473
1474    /// Sets the value of [update_time][crate::model::Router::update_time].
1475    ///
1476    /// # Example
1477    /// ```ignore,no_run
1478    /// # use google_cloud_edgenetwork_v1::model::Router;
1479    /// use wkt::Timestamp;
1480    /// let x = Router::new().set_update_time(Timestamp::default()/* use setters */);
1481    /// ```
1482    pub fn set_update_time<T>(mut self, v: T) -> Self
1483    where
1484        T: std::convert::Into<wkt::Timestamp>,
1485    {
1486        self.update_time = std::option::Option::Some(v.into());
1487        self
1488    }
1489
1490    /// Sets or clears the value of [update_time][crate::model::Router::update_time].
1491    ///
1492    /// # Example
1493    /// ```ignore,no_run
1494    /// # use google_cloud_edgenetwork_v1::model::Router;
1495    /// use wkt::Timestamp;
1496    /// let x = Router::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
1497    /// let x = Router::new().set_or_clear_update_time(None::<Timestamp>);
1498    /// ```
1499    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
1500    where
1501        T: std::convert::Into<wkt::Timestamp>,
1502    {
1503        self.update_time = v.map(|x| x.into());
1504        self
1505    }
1506
1507    /// Sets the value of [labels][crate::model::Router::labels].
1508    ///
1509    /// # Example
1510    /// ```ignore,no_run
1511    /// # use google_cloud_edgenetwork_v1::model::Router;
1512    /// let x = Router::new().set_labels([
1513    ///     ("key0", "abc"),
1514    ///     ("key1", "xyz"),
1515    /// ]);
1516    /// ```
1517    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
1518    where
1519        T: std::iter::IntoIterator<Item = (K, V)>,
1520        K: std::convert::Into<std::string::String>,
1521        V: std::convert::Into<std::string::String>,
1522    {
1523        use std::iter::Iterator;
1524        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
1525        self
1526    }
1527
1528    /// Sets the value of [description][crate::model::Router::description].
1529    ///
1530    /// # Example
1531    /// ```ignore,no_run
1532    /// # use google_cloud_edgenetwork_v1::model::Router;
1533    /// let x = Router::new().set_description("example");
1534    /// ```
1535    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1536        self.description = v.into();
1537        self
1538    }
1539
1540    /// Sets the value of [network][crate::model::Router::network].
1541    ///
1542    /// # Example
1543    /// ```ignore,no_run
1544    /// # use google_cloud_edgenetwork_v1::model::Router;
1545    /// let x = Router::new().set_network("example");
1546    /// ```
1547    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1548        self.network = v.into();
1549        self
1550    }
1551
1552    /// Sets the value of [interface][crate::model::Router::interface].
1553    ///
1554    /// # Example
1555    /// ```ignore,no_run
1556    /// # use google_cloud_edgenetwork_v1::model::Router;
1557    /// use google_cloud_edgenetwork_v1::model::router::Interface;
1558    /// let x = Router::new()
1559    ///     .set_interface([
1560    ///         Interface::default()/* use setters */,
1561    ///         Interface::default()/* use (different) setters */,
1562    ///     ]);
1563    /// ```
1564    pub fn set_interface<T, V>(mut self, v: T) -> Self
1565    where
1566        T: std::iter::IntoIterator<Item = V>,
1567        V: std::convert::Into<crate::model::router::Interface>,
1568    {
1569        use std::iter::Iterator;
1570        self.interface = v.into_iter().map(|i| i.into()).collect();
1571        self
1572    }
1573
1574    /// Sets the value of [bgp_peer][crate::model::Router::bgp_peer].
1575    ///
1576    /// # Example
1577    /// ```ignore,no_run
1578    /// # use google_cloud_edgenetwork_v1::model::Router;
1579    /// use google_cloud_edgenetwork_v1::model::router::BgpPeer;
1580    /// let x = Router::new()
1581    ///     .set_bgp_peer([
1582    ///         BgpPeer::default()/* use setters */,
1583    ///         BgpPeer::default()/* use (different) setters */,
1584    ///     ]);
1585    /// ```
1586    pub fn set_bgp_peer<T, V>(mut self, v: T) -> Self
1587    where
1588        T: std::iter::IntoIterator<Item = V>,
1589        V: std::convert::Into<crate::model::router::BgpPeer>,
1590    {
1591        use std::iter::Iterator;
1592        self.bgp_peer = v.into_iter().map(|i| i.into()).collect();
1593        self
1594    }
1595
1596    /// Sets the value of [bgp][crate::model::Router::bgp].
1597    ///
1598    /// # Example
1599    /// ```ignore,no_run
1600    /// # use google_cloud_edgenetwork_v1::model::Router;
1601    /// use google_cloud_edgenetwork_v1::model::router::Bgp;
1602    /// let x = Router::new().set_bgp(Bgp::default()/* use setters */);
1603    /// ```
1604    pub fn set_bgp<T>(mut self, v: T) -> Self
1605    where
1606        T: std::convert::Into<crate::model::router::Bgp>,
1607    {
1608        self.bgp = std::option::Option::Some(v.into());
1609        self
1610    }
1611
1612    /// Sets or clears the value of [bgp][crate::model::Router::bgp].
1613    ///
1614    /// # Example
1615    /// ```ignore,no_run
1616    /// # use google_cloud_edgenetwork_v1::model::Router;
1617    /// use google_cloud_edgenetwork_v1::model::router::Bgp;
1618    /// let x = Router::new().set_or_clear_bgp(Some(Bgp::default()/* use setters */));
1619    /// let x = Router::new().set_or_clear_bgp(None::<Bgp>);
1620    /// ```
1621    pub fn set_or_clear_bgp<T>(mut self, v: std::option::Option<T>) -> Self
1622    where
1623        T: std::convert::Into<crate::model::router::Bgp>,
1624    {
1625        self.bgp = v.map(|x| x.into());
1626        self
1627    }
1628
1629    /// Sets the value of [state][crate::model::Router::state].
1630    ///
1631    /// # Example
1632    /// ```ignore,no_run
1633    /// # use google_cloud_edgenetwork_v1::model::Router;
1634    /// use google_cloud_edgenetwork_v1::model::ResourceState;
1635    /// let x0 = Router::new().set_state(ResourceState::StatePending);
1636    /// let x1 = Router::new().set_state(ResourceState::StateProvisioning);
1637    /// let x2 = Router::new().set_state(ResourceState::StateRunning);
1638    /// ```
1639    pub fn set_state<T: std::convert::Into<crate::model::ResourceState>>(mut self, v: T) -> Self {
1640        self.state = v.into();
1641        self
1642    }
1643
1644    /// Sets the value of [route_advertisements][crate::model::Router::route_advertisements].
1645    ///
1646    /// # Example
1647    /// ```ignore,no_run
1648    /// # use google_cloud_edgenetwork_v1::model::Router;
1649    /// let x = Router::new().set_route_advertisements(["a", "b", "c"]);
1650    /// ```
1651    pub fn set_route_advertisements<T, V>(mut self, v: T) -> Self
1652    where
1653        T: std::iter::IntoIterator<Item = V>,
1654        V: std::convert::Into<std::string::String>,
1655    {
1656        use std::iter::Iterator;
1657        self.route_advertisements = v.into_iter().map(|i| i.into()).collect();
1658        self
1659    }
1660}
1661
1662impl wkt::message::Message for Router {
1663    fn typename() -> &'static str {
1664        "type.googleapis.com/google.cloud.edgenetwork.v1.Router"
1665    }
1666}
1667
1668/// Defines additional types related to [Router].
1669pub mod router {
1670    #[allow(unused_imports)]
1671    use super::*;
1672
1673    /// Router Interface defines the GDCE zone side layer-3 information for
1674    /// building the BGP session.
1675    #[derive(Clone, Default, PartialEq)]
1676    #[non_exhaustive]
1677    pub struct Interface {
1678        /// Name of this interface entry. Unique within the Zones resource.
1679        pub name: std::string::String,
1680
1681        /// IP address and range of the interface.
1682        pub ipv4_cidr: std::string::String,
1683
1684        /// IPv6 address and range of the interface.
1685        pub ipv6_cidr: std::string::String,
1686
1687        /// The canonical name of the linked Interconnect attachment.
1688        pub linked_interconnect_attachment: std::string::String,
1689
1690        /// The canonical name of the subnetwork resource that this interface
1691        /// belongs to.
1692        pub subnetwork: std::string::String,
1693
1694        /// Create loopback interface in the router when specified.
1695        /// The number of IP addresses must match the number of TOR devices.
1696        pub loopback_ip_addresses: std::vec::Vec<std::string::String>,
1697
1698        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1699    }
1700
1701    impl Interface {
1702        pub fn new() -> Self {
1703            std::default::Default::default()
1704        }
1705
1706        /// Sets the value of [name][crate::model::router::Interface::name].
1707        ///
1708        /// # Example
1709        /// ```ignore,no_run
1710        /// # use google_cloud_edgenetwork_v1::model::router::Interface;
1711        /// let x = Interface::new().set_name("example");
1712        /// ```
1713        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1714            self.name = v.into();
1715            self
1716        }
1717
1718        /// Sets the value of [ipv4_cidr][crate::model::router::Interface::ipv4_cidr].
1719        ///
1720        /// # Example
1721        /// ```ignore,no_run
1722        /// # use google_cloud_edgenetwork_v1::model::router::Interface;
1723        /// let x = Interface::new().set_ipv4_cidr("example");
1724        /// ```
1725        pub fn set_ipv4_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1726            self.ipv4_cidr = v.into();
1727            self
1728        }
1729
1730        /// Sets the value of [ipv6_cidr][crate::model::router::Interface::ipv6_cidr].
1731        ///
1732        /// # Example
1733        /// ```ignore,no_run
1734        /// # use google_cloud_edgenetwork_v1::model::router::Interface;
1735        /// let x = Interface::new().set_ipv6_cidr("example");
1736        /// ```
1737        pub fn set_ipv6_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1738            self.ipv6_cidr = v.into();
1739            self
1740        }
1741
1742        /// Sets the value of [linked_interconnect_attachment][crate::model::router::Interface::linked_interconnect_attachment].
1743        ///
1744        /// # Example
1745        /// ```ignore,no_run
1746        /// # use google_cloud_edgenetwork_v1::model::router::Interface;
1747        /// let x = Interface::new().set_linked_interconnect_attachment("example");
1748        /// ```
1749        pub fn set_linked_interconnect_attachment<T: std::convert::Into<std::string::String>>(
1750            mut self,
1751            v: T,
1752        ) -> Self {
1753            self.linked_interconnect_attachment = v.into();
1754            self
1755        }
1756
1757        /// Sets the value of [subnetwork][crate::model::router::Interface::subnetwork].
1758        ///
1759        /// # Example
1760        /// ```ignore,no_run
1761        /// # use google_cloud_edgenetwork_v1::model::router::Interface;
1762        /// let x = Interface::new().set_subnetwork("example");
1763        /// ```
1764        pub fn set_subnetwork<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1765            self.subnetwork = v.into();
1766            self
1767        }
1768
1769        /// Sets the value of [loopback_ip_addresses][crate::model::router::Interface::loopback_ip_addresses].
1770        ///
1771        /// # Example
1772        /// ```ignore,no_run
1773        /// # use google_cloud_edgenetwork_v1::model::router::Interface;
1774        /// let x = Interface::new().set_loopback_ip_addresses(["a", "b", "c"]);
1775        /// ```
1776        pub fn set_loopback_ip_addresses<T, V>(mut self, v: T) -> Self
1777        where
1778            T: std::iter::IntoIterator<Item = V>,
1779            V: std::convert::Into<std::string::String>,
1780        {
1781            use std::iter::Iterator;
1782            self.loopback_ip_addresses = v.into_iter().map(|i| i.into()).collect();
1783            self
1784        }
1785    }
1786
1787    impl wkt::message::Message for Interface {
1788        fn typename() -> &'static str {
1789            "type.googleapis.com/google.cloud.edgenetwork.v1.Router.Interface"
1790        }
1791    }
1792
1793    /// BGPPeer defines the peer side layer-3 information for building the BGP
1794    /// session.
1795    #[derive(Clone, Default, PartialEq)]
1796    #[non_exhaustive]
1797    pub struct BgpPeer {
1798        /// Name of this BGP peer. Unique within the Zones resource.
1799        pub name: std::string::String,
1800
1801        /// Name of the RouterInterface the BGP peer is associated with.
1802        pub interface: std::string::String,
1803
1804        /// IP range of the interface within Google.
1805        pub interface_ipv4_cidr: std::string::String,
1806
1807        /// IPv6 range of the interface within Google.
1808        pub interface_ipv6_cidr: std::string::String,
1809
1810        /// IP range of the BGP interface outside Google.
1811        pub peer_ipv4_cidr: std::string::String,
1812
1813        /// IPv6 range of the BGP interface outside Google.
1814        pub peer_ipv6_cidr: std::string::String,
1815
1816        /// Peer BGP Autonomous System Number (ASN). Each BGP interface may use
1817        /// a different value.
1818        pub peer_asn: u32,
1819
1820        /// Output only. Local BGP Autonomous System Number (ASN).
1821        /// This field is ST_NOT_REQUIRED because it stores private ASNs, which are
1822        /// meaningless outside the zone in which they are being used.
1823        pub local_asn: u32,
1824
1825        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1826    }
1827
1828    impl BgpPeer {
1829        pub fn new() -> Self {
1830            std::default::Default::default()
1831        }
1832
1833        /// Sets the value of [name][crate::model::router::BgpPeer::name].
1834        ///
1835        /// # Example
1836        /// ```ignore,no_run
1837        /// # use google_cloud_edgenetwork_v1::model::router::BgpPeer;
1838        /// let x = BgpPeer::new().set_name("example");
1839        /// ```
1840        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1841            self.name = v.into();
1842            self
1843        }
1844
1845        /// Sets the value of [interface][crate::model::router::BgpPeer::interface].
1846        ///
1847        /// # Example
1848        /// ```ignore,no_run
1849        /// # use google_cloud_edgenetwork_v1::model::router::BgpPeer;
1850        /// let x = BgpPeer::new().set_interface("example");
1851        /// ```
1852        pub fn set_interface<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1853            self.interface = v.into();
1854            self
1855        }
1856
1857        /// Sets the value of [interface_ipv4_cidr][crate::model::router::BgpPeer::interface_ipv4_cidr].
1858        ///
1859        /// # Example
1860        /// ```ignore,no_run
1861        /// # use google_cloud_edgenetwork_v1::model::router::BgpPeer;
1862        /// let x = BgpPeer::new().set_interface_ipv4_cidr("example");
1863        /// ```
1864        pub fn set_interface_ipv4_cidr<T: std::convert::Into<std::string::String>>(
1865            mut self,
1866            v: T,
1867        ) -> Self {
1868            self.interface_ipv4_cidr = v.into();
1869            self
1870        }
1871
1872        /// Sets the value of [interface_ipv6_cidr][crate::model::router::BgpPeer::interface_ipv6_cidr].
1873        ///
1874        /// # Example
1875        /// ```ignore,no_run
1876        /// # use google_cloud_edgenetwork_v1::model::router::BgpPeer;
1877        /// let x = BgpPeer::new().set_interface_ipv6_cidr("example");
1878        /// ```
1879        pub fn set_interface_ipv6_cidr<T: std::convert::Into<std::string::String>>(
1880            mut self,
1881            v: T,
1882        ) -> Self {
1883            self.interface_ipv6_cidr = v.into();
1884            self
1885        }
1886
1887        /// Sets the value of [peer_ipv4_cidr][crate::model::router::BgpPeer::peer_ipv4_cidr].
1888        ///
1889        /// # Example
1890        /// ```ignore,no_run
1891        /// # use google_cloud_edgenetwork_v1::model::router::BgpPeer;
1892        /// let x = BgpPeer::new().set_peer_ipv4_cidr("example");
1893        /// ```
1894        pub fn set_peer_ipv4_cidr<T: std::convert::Into<std::string::String>>(
1895            mut self,
1896            v: T,
1897        ) -> Self {
1898            self.peer_ipv4_cidr = v.into();
1899            self
1900        }
1901
1902        /// Sets the value of [peer_ipv6_cidr][crate::model::router::BgpPeer::peer_ipv6_cidr].
1903        ///
1904        /// # Example
1905        /// ```ignore,no_run
1906        /// # use google_cloud_edgenetwork_v1::model::router::BgpPeer;
1907        /// let x = BgpPeer::new().set_peer_ipv6_cidr("example");
1908        /// ```
1909        pub fn set_peer_ipv6_cidr<T: std::convert::Into<std::string::String>>(
1910            mut self,
1911            v: T,
1912        ) -> Self {
1913            self.peer_ipv6_cidr = v.into();
1914            self
1915        }
1916
1917        /// Sets the value of [peer_asn][crate::model::router::BgpPeer::peer_asn].
1918        ///
1919        /// # Example
1920        /// ```ignore,no_run
1921        /// # use google_cloud_edgenetwork_v1::model::router::BgpPeer;
1922        /// let x = BgpPeer::new().set_peer_asn(42_u32);
1923        /// ```
1924        pub fn set_peer_asn<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1925            self.peer_asn = v.into();
1926            self
1927        }
1928
1929        /// Sets the value of [local_asn][crate::model::router::BgpPeer::local_asn].
1930        ///
1931        /// # Example
1932        /// ```ignore,no_run
1933        /// # use google_cloud_edgenetwork_v1::model::router::BgpPeer;
1934        /// let x = BgpPeer::new().set_local_asn(42_u32);
1935        /// ```
1936        pub fn set_local_asn<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1937            self.local_asn = v.into();
1938            self
1939        }
1940    }
1941
1942    impl wkt::message::Message for BgpPeer {
1943        fn typename() -> &'static str {
1944            "type.googleapis.com/google.cloud.edgenetwork.v1.Router.BgpPeer"
1945        }
1946    }
1947
1948    /// BGP information specific to this router.
1949    #[derive(Clone, Default, PartialEq)]
1950    #[non_exhaustive]
1951    pub struct Bgp {
1952        /// Locally assigned BGP ASN.
1953        pub asn: u32,
1954
1955        /// The interval in seconds between BGP keepalive messages that are
1956        /// sent to the peer. Default is 20 with value between 20 and 60.
1957        pub keepalive_interval_in_seconds: u32,
1958
1959        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1960    }
1961
1962    impl Bgp {
1963        pub fn new() -> Self {
1964            std::default::Default::default()
1965        }
1966
1967        /// Sets the value of [asn][crate::model::router::Bgp::asn].
1968        ///
1969        /// # Example
1970        /// ```ignore,no_run
1971        /// # use google_cloud_edgenetwork_v1::model::router::Bgp;
1972        /// let x = Bgp::new().set_asn(42_u32);
1973        /// ```
1974        pub fn set_asn<T: std::convert::Into<u32>>(mut self, v: T) -> Self {
1975            self.asn = v.into();
1976            self
1977        }
1978
1979        /// Sets the value of [keepalive_interval_in_seconds][crate::model::router::Bgp::keepalive_interval_in_seconds].
1980        ///
1981        /// # Example
1982        /// ```ignore,no_run
1983        /// # use google_cloud_edgenetwork_v1::model::router::Bgp;
1984        /// let x = Bgp::new().set_keepalive_interval_in_seconds(42_u32);
1985        /// ```
1986        pub fn set_keepalive_interval_in_seconds<T: std::convert::Into<u32>>(
1987            mut self,
1988            v: T,
1989        ) -> Self {
1990            self.keepalive_interval_in_seconds = v.into();
1991            self
1992        }
1993    }
1994
1995    impl wkt::message::Message for Bgp {
1996        fn typename() -> &'static str {
1997            "type.googleapis.com/google.cloud.edgenetwork.v1.Router.Bgp"
1998        }
1999    }
2000}
2001
2002/// LinkLayerAddress contains an IP address and corresponding link-layer address.
2003#[derive(Clone, Default, PartialEq)]
2004#[non_exhaustive]
2005pub struct LinkLayerAddress {
2006    /// The MAC address of this neighbor.
2007    pub mac_address: std::string::String,
2008
2009    /// The IP address of this neighbor.
2010    pub ip_address: std::string::String,
2011
2012    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2013}
2014
2015impl LinkLayerAddress {
2016    pub fn new() -> Self {
2017        std::default::Default::default()
2018    }
2019
2020    /// Sets the value of [mac_address][crate::model::LinkLayerAddress::mac_address].
2021    ///
2022    /// # Example
2023    /// ```ignore,no_run
2024    /// # use google_cloud_edgenetwork_v1::model::LinkLayerAddress;
2025    /// let x = LinkLayerAddress::new().set_mac_address("example");
2026    /// ```
2027    pub fn set_mac_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2028        self.mac_address = v.into();
2029        self
2030    }
2031
2032    /// Sets the value of [ip_address][crate::model::LinkLayerAddress::ip_address].
2033    ///
2034    /// # Example
2035    /// ```ignore,no_run
2036    /// # use google_cloud_edgenetwork_v1::model::LinkLayerAddress;
2037    /// let x = LinkLayerAddress::new().set_ip_address("example");
2038    /// ```
2039    pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2040        self.ip_address = v.into();
2041        self
2042    }
2043}
2044
2045impl wkt::message::Message for LinkLayerAddress {
2046    fn typename() -> &'static str {
2047        "type.googleapis.com/google.cloud.edgenetwork.v1.LinkLayerAddress"
2048    }
2049}
2050
2051/// SubnetStatus contains detailed and current technical information about this
2052/// subnet resource.
2053#[derive(Clone, Default, PartialEq)]
2054#[non_exhaustive]
2055pub struct SubnetStatus {
2056    /// The name of CCFE subnet resource.
2057    pub name: std::string::String,
2058
2059    /// BVI MAC address.
2060    pub mac_address: std::string::String,
2061
2062    /// A list of LinkLayerAddress, describing the ip address and corresponding
2063    /// link-layer address of the neighbors for this subnet.
2064    pub link_layer_addresses: std::vec::Vec<crate::model::LinkLayerAddress>,
2065
2066    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2067}
2068
2069impl SubnetStatus {
2070    pub fn new() -> Self {
2071        std::default::Default::default()
2072    }
2073
2074    /// Sets the value of [name][crate::model::SubnetStatus::name].
2075    ///
2076    /// # Example
2077    /// ```ignore,no_run
2078    /// # use google_cloud_edgenetwork_v1::model::SubnetStatus;
2079    /// let x = SubnetStatus::new().set_name("example");
2080    /// ```
2081    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2082        self.name = v.into();
2083        self
2084    }
2085
2086    /// Sets the value of [mac_address][crate::model::SubnetStatus::mac_address].
2087    ///
2088    /// # Example
2089    /// ```ignore,no_run
2090    /// # use google_cloud_edgenetwork_v1::model::SubnetStatus;
2091    /// let x = SubnetStatus::new().set_mac_address("example");
2092    /// ```
2093    pub fn set_mac_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2094        self.mac_address = v.into();
2095        self
2096    }
2097
2098    /// Sets the value of [link_layer_addresses][crate::model::SubnetStatus::link_layer_addresses].
2099    ///
2100    /// # Example
2101    /// ```ignore,no_run
2102    /// # use google_cloud_edgenetwork_v1::model::SubnetStatus;
2103    /// use google_cloud_edgenetwork_v1::model::LinkLayerAddress;
2104    /// let x = SubnetStatus::new()
2105    ///     .set_link_layer_addresses([
2106    ///         LinkLayerAddress::default()/* use setters */,
2107    ///         LinkLayerAddress::default()/* use (different) setters */,
2108    ///     ]);
2109    /// ```
2110    pub fn set_link_layer_addresses<T, V>(mut self, v: T) -> Self
2111    where
2112        T: std::iter::IntoIterator<Item = V>,
2113        V: std::convert::Into<crate::model::LinkLayerAddress>,
2114    {
2115        use std::iter::Iterator;
2116        self.link_layer_addresses = v.into_iter().map(|i| i.into()).collect();
2117        self
2118    }
2119}
2120
2121impl wkt::message::Message for SubnetStatus {
2122    fn typename() -> &'static str {
2123        "type.googleapis.com/google.cloud.edgenetwork.v1.SubnetStatus"
2124    }
2125}
2126
2127/// Diagnostics information about interconnect, contains detailed and current
2128/// technical information about Google's side of the connection.
2129#[derive(Clone, Default, PartialEq)]
2130#[non_exhaustive]
2131pub struct InterconnectDiagnostics {
2132    /// The MAC address of the Interconnect's bundle interface.
2133    pub mac_address: std::string::String,
2134
2135    /// A list of LinkLayerAddress, describing the ip address and corresponding
2136    /// link-layer address of the neighbors for this interconnect.
2137    pub link_layer_addresses: std::vec::Vec<crate::model::LinkLayerAddress>,
2138
2139    /// A list of LinkStatus objects, used to describe the status for each link on
2140    /// the Interconnect.
2141    pub links: std::vec::Vec<crate::model::interconnect_diagnostics::LinkStatus>,
2142
2143    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2144}
2145
2146impl InterconnectDiagnostics {
2147    pub fn new() -> Self {
2148        std::default::Default::default()
2149    }
2150
2151    /// Sets the value of [mac_address][crate::model::InterconnectDiagnostics::mac_address].
2152    ///
2153    /// # Example
2154    /// ```ignore,no_run
2155    /// # use google_cloud_edgenetwork_v1::model::InterconnectDiagnostics;
2156    /// let x = InterconnectDiagnostics::new().set_mac_address("example");
2157    /// ```
2158    pub fn set_mac_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2159        self.mac_address = v.into();
2160        self
2161    }
2162
2163    /// Sets the value of [link_layer_addresses][crate::model::InterconnectDiagnostics::link_layer_addresses].
2164    ///
2165    /// # Example
2166    /// ```ignore,no_run
2167    /// # use google_cloud_edgenetwork_v1::model::InterconnectDiagnostics;
2168    /// use google_cloud_edgenetwork_v1::model::LinkLayerAddress;
2169    /// let x = InterconnectDiagnostics::new()
2170    ///     .set_link_layer_addresses([
2171    ///         LinkLayerAddress::default()/* use setters */,
2172    ///         LinkLayerAddress::default()/* use (different) setters */,
2173    ///     ]);
2174    /// ```
2175    pub fn set_link_layer_addresses<T, V>(mut self, v: T) -> Self
2176    where
2177        T: std::iter::IntoIterator<Item = V>,
2178        V: std::convert::Into<crate::model::LinkLayerAddress>,
2179    {
2180        use std::iter::Iterator;
2181        self.link_layer_addresses = v.into_iter().map(|i| i.into()).collect();
2182        self
2183    }
2184
2185    /// Sets the value of [links][crate::model::InterconnectDiagnostics::links].
2186    ///
2187    /// # Example
2188    /// ```ignore,no_run
2189    /// # use google_cloud_edgenetwork_v1::model::InterconnectDiagnostics;
2190    /// use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkStatus;
2191    /// let x = InterconnectDiagnostics::new()
2192    ///     .set_links([
2193    ///         LinkStatus::default()/* use setters */,
2194    ///         LinkStatus::default()/* use (different) setters */,
2195    ///     ]);
2196    /// ```
2197    pub fn set_links<T, V>(mut self, v: T) -> Self
2198    where
2199        T: std::iter::IntoIterator<Item = V>,
2200        V: std::convert::Into<crate::model::interconnect_diagnostics::LinkStatus>,
2201    {
2202        use std::iter::Iterator;
2203        self.links = v.into_iter().map(|i| i.into()).collect();
2204        self
2205    }
2206}
2207
2208impl wkt::message::Message for InterconnectDiagnostics {
2209    fn typename() -> &'static str {
2210        "type.googleapis.com/google.cloud.edgenetwork.v1.InterconnectDiagnostics"
2211    }
2212}
2213
2214/// Defines additional types related to [InterconnectDiagnostics].
2215pub mod interconnect_diagnostics {
2216    #[allow(unused_imports)]
2217    use super::*;
2218
2219    /// Describing the status for each link on the Interconnect.
2220    #[derive(Clone, Default, PartialEq)]
2221    #[non_exhaustive]
2222    pub struct LinkStatus {
2223        /// The unique ID for this link assigned during turn up by Google.
2224        pub circuit_id: std::string::String,
2225
2226        /// Describing the state of a LACP link.
2227        pub lacp_status:
2228            std::option::Option<crate::model::interconnect_diagnostics::LinkLACPStatus>,
2229
2230        /// A list of LinkLLDPStatus objects, used to describe LLDP status of each
2231        /// peer for each link on the Interconnect.
2232        pub lldp_statuses: std::vec::Vec<crate::model::interconnect_diagnostics::LinkLLDPStatus>,
2233
2234        /// Packet counts specific statistics for this link.
2235        pub packet_counts:
2236            std::option::Option<crate::model::interconnect_diagnostics::PacketCounts>,
2237
2238        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2239    }
2240
2241    impl LinkStatus {
2242        pub fn new() -> Self {
2243            std::default::Default::default()
2244        }
2245
2246        /// Sets the value of [circuit_id][crate::model::interconnect_diagnostics::LinkStatus::circuit_id].
2247        ///
2248        /// # Example
2249        /// ```ignore,no_run
2250        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkStatus;
2251        /// let x = LinkStatus::new().set_circuit_id("example");
2252        /// ```
2253        pub fn set_circuit_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2254            self.circuit_id = v.into();
2255            self
2256        }
2257
2258        /// Sets the value of [lacp_status][crate::model::interconnect_diagnostics::LinkStatus::lacp_status].
2259        ///
2260        /// # Example
2261        /// ```ignore,no_run
2262        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkStatus;
2263        /// use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLACPStatus;
2264        /// let x = LinkStatus::new().set_lacp_status(LinkLACPStatus::default()/* use setters */);
2265        /// ```
2266        pub fn set_lacp_status<T>(mut self, v: T) -> Self
2267        where
2268            T: std::convert::Into<crate::model::interconnect_diagnostics::LinkLACPStatus>,
2269        {
2270            self.lacp_status = std::option::Option::Some(v.into());
2271            self
2272        }
2273
2274        /// Sets or clears the value of [lacp_status][crate::model::interconnect_diagnostics::LinkStatus::lacp_status].
2275        ///
2276        /// # Example
2277        /// ```ignore,no_run
2278        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkStatus;
2279        /// use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLACPStatus;
2280        /// let x = LinkStatus::new().set_or_clear_lacp_status(Some(LinkLACPStatus::default()/* use setters */));
2281        /// let x = LinkStatus::new().set_or_clear_lacp_status(None::<LinkLACPStatus>);
2282        /// ```
2283        pub fn set_or_clear_lacp_status<T>(mut self, v: std::option::Option<T>) -> Self
2284        where
2285            T: std::convert::Into<crate::model::interconnect_diagnostics::LinkLACPStatus>,
2286        {
2287            self.lacp_status = v.map(|x| x.into());
2288            self
2289        }
2290
2291        /// Sets the value of [lldp_statuses][crate::model::interconnect_diagnostics::LinkStatus::lldp_statuses].
2292        ///
2293        /// # Example
2294        /// ```ignore,no_run
2295        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkStatus;
2296        /// use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLLDPStatus;
2297        /// let x = LinkStatus::new()
2298        ///     .set_lldp_statuses([
2299        ///         LinkLLDPStatus::default()/* use setters */,
2300        ///         LinkLLDPStatus::default()/* use (different) setters */,
2301        ///     ]);
2302        /// ```
2303        pub fn set_lldp_statuses<T, V>(mut self, v: T) -> Self
2304        where
2305            T: std::iter::IntoIterator<Item = V>,
2306            V: std::convert::Into<crate::model::interconnect_diagnostics::LinkLLDPStatus>,
2307        {
2308            use std::iter::Iterator;
2309            self.lldp_statuses = v.into_iter().map(|i| i.into()).collect();
2310            self
2311        }
2312
2313        /// Sets the value of [packet_counts][crate::model::interconnect_diagnostics::LinkStatus::packet_counts].
2314        ///
2315        /// # Example
2316        /// ```ignore,no_run
2317        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkStatus;
2318        /// use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::PacketCounts;
2319        /// let x = LinkStatus::new().set_packet_counts(PacketCounts::default()/* use setters */);
2320        /// ```
2321        pub fn set_packet_counts<T>(mut self, v: T) -> Self
2322        where
2323            T: std::convert::Into<crate::model::interconnect_diagnostics::PacketCounts>,
2324        {
2325            self.packet_counts = std::option::Option::Some(v.into());
2326            self
2327        }
2328
2329        /// Sets or clears the value of [packet_counts][crate::model::interconnect_diagnostics::LinkStatus::packet_counts].
2330        ///
2331        /// # Example
2332        /// ```ignore,no_run
2333        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkStatus;
2334        /// use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::PacketCounts;
2335        /// let x = LinkStatus::new().set_or_clear_packet_counts(Some(PacketCounts::default()/* use setters */));
2336        /// let x = LinkStatus::new().set_or_clear_packet_counts(None::<PacketCounts>);
2337        /// ```
2338        pub fn set_or_clear_packet_counts<T>(mut self, v: std::option::Option<T>) -> Self
2339        where
2340            T: std::convert::Into<crate::model::interconnect_diagnostics::PacketCounts>,
2341        {
2342            self.packet_counts = v.map(|x| x.into());
2343            self
2344        }
2345    }
2346
2347    impl wkt::message::Message for LinkStatus {
2348        fn typename() -> &'static str {
2349            "type.googleapis.com/google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkStatus"
2350        }
2351    }
2352
2353    /// Containing a collection of interface-related statistics objects.
2354    #[derive(Clone, Default, PartialEq)]
2355    #[non_exhaustive]
2356    pub struct PacketCounts {
2357        /// The number of packets that are delivered.
2358        pub inbound_unicast: i64,
2359
2360        /// The number of inbound packets that contained errors.
2361        pub inbound_errors: i64,
2362
2363        /// The number of inbound packets that were chosen to be discarded even
2364        /// though no errors had been detected to prevent their being deliverable.
2365        pub inbound_discards: i64,
2366
2367        /// The total number of packets that are requested be transmitted.
2368        pub outbound_unicast: i64,
2369
2370        /// The number of outbound packets that could not be transmitted because of
2371        /// errors.
2372        pub outbound_errors: i64,
2373
2374        /// The number of outbound packets that were chosen to be discarded even
2375        /// though no errors had been detected to prevent their being transmitted.
2376        pub outbound_discards: i64,
2377
2378        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2379    }
2380
2381    impl PacketCounts {
2382        pub fn new() -> Self {
2383            std::default::Default::default()
2384        }
2385
2386        /// Sets the value of [inbound_unicast][crate::model::interconnect_diagnostics::PacketCounts::inbound_unicast].
2387        ///
2388        /// # Example
2389        /// ```ignore,no_run
2390        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::PacketCounts;
2391        /// let x = PacketCounts::new().set_inbound_unicast(42);
2392        /// ```
2393        pub fn set_inbound_unicast<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2394            self.inbound_unicast = v.into();
2395            self
2396        }
2397
2398        /// Sets the value of [inbound_errors][crate::model::interconnect_diagnostics::PacketCounts::inbound_errors].
2399        ///
2400        /// # Example
2401        /// ```ignore,no_run
2402        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::PacketCounts;
2403        /// let x = PacketCounts::new().set_inbound_errors(42);
2404        /// ```
2405        pub fn set_inbound_errors<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2406            self.inbound_errors = v.into();
2407            self
2408        }
2409
2410        /// Sets the value of [inbound_discards][crate::model::interconnect_diagnostics::PacketCounts::inbound_discards].
2411        ///
2412        /// # Example
2413        /// ```ignore,no_run
2414        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::PacketCounts;
2415        /// let x = PacketCounts::new().set_inbound_discards(42);
2416        /// ```
2417        pub fn set_inbound_discards<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2418            self.inbound_discards = v.into();
2419            self
2420        }
2421
2422        /// Sets the value of [outbound_unicast][crate::model::interconnect_diagnostics::PacketCounts::outbound_unicast].
2423        ///
2424        /// # Example
2425        /// ```ignore,no_run
2426        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::PacketCounts;
2427        /// let x = PacketCounts::new().set_outbound_unicast(42);
2428        /// ```
2429        pub fn set_outbound_unicast<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2430            self.outbound_unicast = v.into();
2431            self
2432        }
2433
2434        /// Sets the value of [outbound_errors][crate::model::interconnect_diagnostics::PacketCounts::outbound_errors].
2435        ///
2436        /// # Example
2437        /// ```ignore,no_run
2438        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::PacketCounts;
2439        /// let x = PacketCounts::new().set_outbound_errors(42);
2440        /// ```
2441        pub fn set_outbound_errors<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2442            self.outbound_errors = v.into();
2443            self
2444        }
2445
2446        /// Sets the value of [outbound_discards][crate::model::interconnect_diagnostics::PacketCounts::outbound_discards].
2447        ///
2448        /// # Example
2449        /// ```ignore,no_run
2450        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::PacketCounts;
2451        /// let x = PacketCounts::new().set_outbound_discards(42);
2452        /// ```
2453        pub fn set_outbound_discards<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
2454            self.outbound_discards = v.into();
2455            self
2456        }
2457    }
2458
2459    impl wkt::message::Message for PacketCounts {
2460        fn typename() -> &'static str {
2461            "type.googleapis.com/google.cloud.edgenetwork.v1.InterconnectDiagnostics.PacketCounts"
2462        }
2463    }
2464
2465    /// Describing the status of a LACP link.
2466    #[derive(Clone, Default, PartialEq)]
2467    #[non_exhaustive]
2468    pub struct LinkLACPStatus {
2469        /// The state of a LACP link.
2470        pub state: crate::model::interconnect_diagnostics::link_lacp_status::State,
2471
2472        /// System ID of the port on Google's side of the LACP exchange.
2473        pub google_system_id: std::string::String,
2474
2475        /// System ID of the port on the neighbor's side of the LACP exchange.
2476        pub neighbor_system_id: std::string::String,
2477
2478        /// A true value indicates that the participant will allow the link to be
2479        /// used as part of the aggregate.
2480        /// A false value indicates the link should be used as an individual link.
2481        pub aggregatable: bool,
2482
2483        /// If true, the participant is collecting incoming frames on the link,
2484        /// otherwise false
2485        pub collecting: bool,
2486
2487        /// When true, the participant is distributing outgoing frames; when false,
2488        /// distribution is disabled
2489        pub distributing: bool,
2490
2491        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2492    }
2493
2494    impl LinkLACPStatus {
2495        pub fn new() -> Self {
2496            std::default::Default::default()
2497        }
2498
2499        /// Sets the value of [state][crate::model::interconnect_diagnostics::LinkLACPStatus::state].
2500        ///
2501        /// # Example
2502        /// ```ignore,no_run
2503        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLACPStatus;
2504        /// use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::link_lacp_status::State;
2505        /// let x0 = LinkLACPStatus::new().set_state(State::Active);
2506        /// let x1 = LinkLACPStatus::new().set_state(State::Detached);
2507        /// ```
2508        pub fn set_state<
2509            T: std::convert::Into<crate::model::interconnect_diagnostics::link_lacp_status::State>,
2510        >(
2511            mut self,
2512            v: T,
2513        ) -> Self {
2514            self.state = v.into();
2515            self
2516        }
2517
2518        /// Sets the value of [google_system_id][crate::model::interconnect_diagnostics::LinkLACPStatus::google_system_id].
2519        ///
2520        /// # Example
2521        /// ```ignore,no_run
2522        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLACPStatus;
2523        /// let x = LinkLACPStatus::new().set_google_system_id("example");
2524        /// ```
2525        pub fn set_google_system_id<T: std::convert::Into<std::string::String>>(
2526            mut self,
2527            v: T,
2528        ) -> Self {
2529            self.google_system_id = v.into();
2530            self
2531        }
2532
2533        /// Sets the value of [neighbor_system_id][crate::model::interconnect_diagnostics::LinkLACPStatus::neighbor_system_id].
2534        ///
2535        /// # Example
2536        /// ```ignore,no_run
2537        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLACPStatus;
2538        /// let x = LinkLACPStatus::new().set_neighbor_system_id("example");
2539        /// ```
2540        pub fn set_neighbor_system_id<T: std::convert::Into<std::string::String>>(
2541            mut self,
2542            v: T,
2543        ) -> Self {
2544            self.neighbor_system_id = v.into();
2545            self
2546        }
2547
2548        /// Sets the value of [aggregatable][crate::model::interconnect_diagnostics::LinkLACPStatus::aggregatable].
2549        ///
2550        /// # Example
2551        /// ```ignore,no_run
2552        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLACPStatus;
2553        /// let x = LinkLACPStatus::new().set_aggregatable(true);
2554        /// ```
2555        pub fn set_aggregatable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2556            self.aggregatable = v.into();
2557            self
2558        }
2559
2560        /// Sets the value of [collecting][crate::model::interconnect_diagnostics::LinkLACPStatus::collecting].
2561        ///
2562        /// # Example
2563        /// ```ignore,no_run
2564        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLACPStatus;
2565        /// let x = LinkLACPStatus::new().set_collecting(true);
2566        /// ```
2567        pub fn set_collecting<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2568            self.collecting = v.into();
2569            self
2570        }
2571
2572        /// Sets the value of [distributing][crate::model::interconnect_diagnostics::LinkLACPStatus::distributing].
2573        ///
2574        /// # Example
2575        /// ```ignore,no_run
2576        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLACPStatus;
2577        /// let x = LinkLACPStatus::new().set_distributing(true);
2578        /// ```
2579        pub fn set_distributing<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2580            self.distributing = v.into();
2581            self
2582        }
2583    }
2584
2585    impl wkt::message::Message for LinkLACPStatus {
2586        fn typename() -> &'static str {
2587            "type.googleapis.com/google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus"
2588        }
2589    }
2590
2591    /// Defines additional types related to [LinkLACPStatus].
2592    pub mod link_lacp_status {
2593        #[allow(unused_imports)]
2594        use super::*;
2595
2596        /// State enum for LACP link.
2597        ///
2598        /// # Working with unknown values
2599        ///
2600        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2601        /// additional enum variants at any time. Adding new variants is not considered
2602        /// a breaking change. Applications should write their code in anticipation of:
2603        ///
2604        /// - New values appearing in future releases of the client library, **and**
2605        /// - New values received dynamically, without application changes.
2606        ///
2607        /// Please consult the [Working with enums] section in the user guide for some
2608        /// guidelines.
2609        ///
2610        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
2611        #[derive(Clone, Debug, PartialEq)]
2612        #[non_exhaustive]
2613        pub enum State {
2614            /// The default state indicating state is in unknown state.
2615            Unknown,
2616            /// The link is configured and active within the bundle.
2617            Active,
2618            /// The link is not configured within the bundle, this means the rest of
2619            /// the object should be empty.
2620            Detached,
2621            /// If set, the enum was initialized with an unknown value.
2622            ///
2623            /// Applications can examine the value using [State::value] or
2624            /// [State::name].
2625            UnknownValue(state::UnknownValue),
2626        }
2627
2628        #[doc(hidden)]
2629        pub mod state {
2630            #[allow(unused_imports)]
2631            use super::*;
2632            #[derive(Clone, Debug, PartialEq)]
2633            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2634        }
2635
2636        impl State {
2637            /// Gets the enum value.
2638            ///
2639            /// Returns `None` if the enum contains an unknown value deserialized from
2640            /// the string representation of enums.
2641            pub fn value(&self) -> std::option::Option<i32> {
2642                match self {
2643                    Self::Unknown => std::option::Option::Some(0),
2644                    Self::Active => std::option::Option::Some(1),
2645                    Self::Detached => std::option::Option::Some(2),
2646                    Self::UnknownValue(u) => u.0.value(),
2647                }
2648            }
2649
2650            /// Gets the enum value as a string.
2651            ///
2652            /// Returns `None` if the enum contains an unknown value deserialized from
2653            /// the integer representation of enums.
2654            pub fn name(&self) -> std::option::Option<&str> {
2655                match self {
2656                    Self::Unknown => std::option::Option::Some("UNKNOWN"),
2657                    Self::Active => std::option::Option::Some("ACTIVE"),
2658                    Self::Detached => std::option::Option::Some("DETACHED"),
2659                    Self::UnknownValue(u) => u.0.name(),
2660                }
2661            }
2662        }
2663
2664        impl std::default::Default for State {
2665            fn default() -> Self {
2666                use std::convert::From;
2667                Self::from(0)
2668            }
2669        }
2670
2671        impl std::fmt::Display for State {
2672            fn fmt(
2673                &self,
2674                f: &mut std::fmt::Formatter<'_>,
2675            ) -> std::result::Result<(), std::fmt::Error> {
2676                wkt::internal::display_enum(f, self.name(), self.value())
2677            }
2678        }
2679
2680        impl std::convert::From<i32> for State {
2681            fn from(value: i32) -> Self {
2682                match value {
2683                    0 => Self::Unknown,
2684                    1 => Self::Active,
2685                    2 => Self::Detached,
2686                    _ => Self::UnknownValue(state::UnknownValue(
2687                        wkt::internal::UnknownEnumValue::Integer(value),
2688                    )),
2689                }
2690            }
2691        }
2692
2693        impl std::convert::From<&str> for State {
2694            fn from(value: &str) -> Self {
2695                use std::string::ToString;
2696                match value {
2697                    "UNKNOWN" => Self::Unknown,
2698                    "ACTIVE" => Self::Active,
2699                    "DETACHED" => Self::Detached,
2700                    _ => Self::UnknownValue(state::UnknownValue(
2701                        wkt::internal::UnknownEnumValue::String(value.to_string()),
2702                    )),
2703                }
2704            }
2705        }
2706
2707        impl serde::ser::Serialize for State {
2708            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2709            where
2710                S: serde::Serializer,
2711            {
2712                match self {
2713                    Self::Unknown => serializer.serialize_i32(0),
2714                    Self::Active => serializer.serialize_i32(1),
2715                    Self::Detached => serializer.serialize_i32(2),
2716                    Self::UnknownValue(u) => u.0.serialize(serializer),
2717                }
2718            }
2719        }
2720
2721        impl<'de> serde::de::Deserialize<'de> for State {
2722            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2723            where
2724                D: serde::Deserializer<'de>,
2725            {
2726                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
2727                    ".google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLACPStatus.State",
2728                ))
2729            }
2730        }
2731    }
2732
2733    /// Describing a LLDP link.
2734    #[derive(Clone, Default, PartialEq)]
2735    #[non_exhaustive]
2736    pub struct LinkLLDPStatus {
2737        /// The peer system's administratively assigned name.
2738        pub peer_system_name: std::string::String,
2739
2740        /// The textual description of the network entity of LLDP peer.
2741        pub peer_system_description: std::string::String,
2742
2743        /// The peer chassis component of the endpoint identifier associated with the
2744        /// transmitting LLDP agent.
2745        pub peer_chassis_id: std::string::String,
2746
2747        /// The format and source of the peer chassis identifier string.
2748        pub peer_chassis_id_type: std::string::String,
2749
2750        /// The port component of the endpoint identifier associated with the
2751        /// transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater
2752        /// port, then this TLV is optional.
2753        pub peer_port_id: std::string::String,
2754
2755        /// The format and source of the peer port identifier string.
2756        pub peer_port_id_type: std::string::String,
2757
2758        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2759    }
2760
2761    impl LinkLLDPStatus {
2762        pub fn new() -> Self {
2763            std::default::Default::default()
2764        }
2765
2766        /// Sets the value of [peer_system_name][crate::model::interconnect_diagnostics::LinkLLDPStatus::peer_system_name].
2767        ///
2768        /// # Example
2769        /// ```ignore,no_run
2770        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLLDPStatus;
2771        /// let x = LinkLLDPStatus::new().set_peer_system_name("example");
2772        /// ```
2773        pub fn set_peer_system_name<T: std::convert::Into<std::string::String>>(
2774            mut self,
2775            v: T,
2776        ) -> Self {
2777            self.peer_system_name = v.into();
2778            self
2779        }
2780
2781        /// Sets the value of [peer_system_description][crate::model::interconnect_diagnostics::LinkLLDPStatus::peer_system_description].
2782        ///
2783        /// # Example
2784        /// ```ignore,no_run
2785        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLLDPStatus;
2786        /// let x = LinkLLDPStatus::new().set_peer_system_description("example");
2787        /// ```
2788        pub fn set_peer_system_description<T: std::convert::Into<std::string::String>>(
2789            mut self,
2790            v: T,
2791        ) -> Self {
2792            self.peer_system_description = v.into();
2793            self
2794        }
2795
2796        /// Sets the value of [peer_chassis_id][crate::model::interconnect_diagnostics::LinkLLDPStatus::peer_chassis_id].
2797        ///
2798        /// # Example
2799        /// ```ignore,no_run
2800        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLLDPStatus;
2801        /// let x = LinkLLDPStatus::new().set_peer_chassis_id("example");
2802        /// ```
2803        pub fn set_peer_chassis_id<T: std::convert::Into<std::string::String>>(
2804            mut self,
2805            v: T,
2806        ) -> Self {
2807            self.peer_chassis_id = v.into();
2808            self
2809        }
2810
2811        /// Sets the value of [peer_chassis_id_type][crate::model::interconnect_diagnostics::LinkLLDPStatus::peer_chassis_id_type].
2812        ///
2813        /// # Example
2814        /// ```ignore,no_run
2815        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLLDPStatus;
2816        /// let x = LinkLLDPStatus::new().set_peer_chassis_id_type("example");
2817        /// ```
2818        pub fn set_peer_chassis_id_type<T: std::convert::Into<std::string::String>>(
2819            mut self,
2820            v: T,
2821        ) -> Self {
2822            self.peer_chassis_id_type = v.into();
2823            self
2824        }
2825
2826        /// Sets the value of [peer_port_id][crate::model::interconnect_diagnostics::LinkLLDPStatus::peer_port_id].
2827        ///
2828        /// # Example
2829        /// ```ignore,no_run
2830        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLLDPStatus;
2831        /// let x = LinkLLDPStatus::new().set_peer_port_id("example");
2832        /// ```
2833        pub fn set_peer_port_id<T: std::convert::Into<std::string::String>>(
2834            mut self,
2835            v: T,
2836        ) -> Self {
2837            self.peer_port_id = v.into();
2838            self
2839        }
2840
2841        /// Sets the value of [peer_port_id_type][crate::model::interconnect_diagnostics::LinkLLDPStatus::peer_port_id_type].
2842        ///
2843        /// # Example
2844        /// ```ignore,no_run
2845        /// # use google_cloud_edgenetwork_v1::model::interconnect_diagnostics::LinkLLDPStatus;
2846        /// let x = LinkLLDPStatus::new().set_peer_port_id_type("example");
2847        /// ```
2848        pub fn set_peer_port_id_type<T: std::convert::Into<std::string::String>>(
2849            mut self,
2850            v: T,
2851        ) -> Self {
2852            self.peer_port_id_type = v.into();
2853            self
2854        }
2855    }
2856
2857    impl wkt::message::Message for LinkLLDPStatus {
2858        fn typename() -> &'static str {
2859            "type.googleapis.com/google.cloud.edgenetwork.v1.InterconnectDiagnostics.LinkLLDPStatus"
2860        }
2861    }
2862}
2863
2864/// Describing the current status of a router.
2865#[derive(Clone, Default, PartialEq)]
2866#[non_exhaustive]
2867pub struct RouterStatus {
2868    /// The canonical name of the network to which this router belongs.
2869    pub network: std::string::String,
2870
2871    /// A list of BgpPeerStatus objects, describing all BGP peers related to this
2872    /// router.
2873    pub bgp_peer_status: std::vec::Vec<crate::model::router_status::BgpPeerStatus>,
2874
2875    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2876}
2877
2878impl RouterStatus {
2879    pub fn new() -> Self {
2880        std::default::Default::default()
2881    }
2882
2883    /// Sets the value of [network][crate::model::RouterStatus::network].
2884    ///
2885    /// # Example
2886    /// ```ignore,no_run
2887    /// # use google_cloud_edgenetwork_v1::model::RouterStatus;
2888    /// let x = RouterStatus::new().set_network("example");
2889    /// ```
2890    pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2891        self.network = v.into();
2892        self
2893    }
2894
2895    /// Sets the value of [bgp_peer_status][crate::model::RouterStatus::bgp_peer_status].
2896    ///
2897    /// # Example
2898    /// ```ignore,no_run
2899    /// # use google_cloud_edgenetwork_v1::model::RouterStatus;
2900    /// use google_cloud_edgenetwork_v1::model::router_status::BgpPeerStatus;
2901    /// let x = RouterStatus::new()
2902    ///     .set_bgp_peer_status([
2903    ///         BgpPeerStatus::default()/* use setters */,
2904    ///         BgpPeerStatus::default()/* use (different) setters */,
2905    ///     ]);
2906    /// ```
2907    pub fn set_bgp_peer_status<T, V>(mut self, v: T) -> Self
2908    where
2909        T: std::iter::IntoIterator<Item = V>,
2910        V: std::convert::Into<crate::model::router_status::BgpPeerStatus>,
2911    {
2912        use std::iter::Iterator;
2913        self.bgp_peer_status = v.into_iter().map(|i| i.into()).collect();
2914        self
2915    }
2916}
2917
2918impl wkt::message::Message for RouterStatus {
2919    fn typename() -> &'static str {
2920        "type.googleapis.com/google.cloud.edgenetwork.v1.RouterStatus"
2921    }
2922}
2923
2924/// Defines additional types related to [RouterStatus].
2925pub mod router_status {
2926    #[allow(unused_imports)]
2927    use super::*;
2928
2929    /// Status of a BGP peer.
2930    #[derive(Clone, Default, PartialEq)]
2931    #[non_exhaustive]
2932    pub struct BgpPeerStatus {
2933        /// Name of this BGP peer. Unique within the Routers resource.
2934        pub name: std::string::String,
2935
2936        /// IP address of the local BGP interface.
2937        pub ip_address: std::string::String,
2938
2939        /// IP address of the remote BGP interface.
2940        pub peer_ip_address: std::string::String,
2941
2942        /// The current status of BGP.
2943        pub status: crate::model::router_status::bgp_peer_status::BgpStatus,
2944
2945        /// BGP state as specified in RFC1771.
2946        pub state: std::string::String,
2947
2948        /// Time this session has been up.
2949        /// Format:
2950        /// 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds
2951        pub uptime: std::string::String,
2952
2953        /// Time this session has been up, in seconds.
2954        pub uptime_seconds: i64,
2955
2956        /// A collection of counts for prefixes.
2957        pub prefix_counter: std::option::Option<crate::model::router_status::PrefixCounter>,
2958
2959        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2960    }
2961
2962    impl BgpPeerStatus {
2963        pub fn new() -> Self {
2964            std::default::Default::default()
2965        }
2966
2967        /// Sets the value of [name][crate::model::router_status::BgpPeerStatus::name].
2968        ///
2969        /// # Example
2970        /// ```ignore,no_run
2971        /// # use google_cloud_edgenetwork_v1::model::router_status::BgpPeerStatus;
2972        /// let x = BgpPeerStatus::new().set_name("example");
2973        /// ```
2974        pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2975            self.name = v.into();
2976            self
2977        }
2978
2979        /// Sets the value of [ip_address][crate::model::router_status::BgpPeerStatus::ip_address].
2980        ///
2981        /// # Example
2982        /// ```ignore,no_run
2983        /// # use google_cloud_edgenetwork_v1::model::router_status::BgpPeerStatus;
2984        /// let x = BgpPeerStatus::new().set_ip_address("example");
2985        /// ```
2986        pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2987            self.ip_address = v.into();
2988            self
2989        }
2990
2991        /// Sets the value of [peer_ip_address][crate::model::router_status::BgpPeerStatus::peer_ip_address].
2992        ///
2993        /// # Example
2994        /// ```ignore,no_run
2995        /// # use google_cloud_edgenetwork_v1::model::router_status::BgpPeerStatus;
2996        /// let x = BgpPeerStatus::new().set_peer_ip_address("example");
2997        /// ```
2998        pub fn set_peer_ip_address<T: std::convert::Into<std::string::String>>(
2999            mut self,
3000            v: T,
3001        ) -> Self {
3002            self.peer_ip_address = v.into();
3003            self
3004        }
3005
3006        /// Sets the value of [status][crate::model::router_status::BgpPeerStatus::status].
3007        ///
3008        /// # Example
3009        /// ```ignore,no_run
3010        /// # use google_cloud_edgenetwork_v1::model::router_status::BgpPeerStatus;
3011        /// use google_cloud_edgenetwork_v1::model::router_status::bgp_peer_status::BgpStatus;
3012        /// let x0 = BgpPeerStatus::new().set_status(BgpStatus::Up);
3013        /// let x1 = BgpPeerStatus::new().set_status(BgpStatus::Down);
3014        /// ```
3015        pub fn set_status<
3016            T: std::convert::Into<crate::model::router_status::bgp_peer_status::BgpStatus>,
3017        >(
3018            mut self,
3019            v: T,
3020        ) -> Self {
3021            self.status = v.into();
3022            self
3023        }
3024
3025        /// Sets the value of [state][crate::model::router_status::BgpPeerStatus::state].
3026        ///
3027        /// # Example
3028        /// ```ignore,no_run
3029        /// # use google_cloud_edgenetwork_v1::model::router_status::BgpPeerStatus;
3030        /// let x = BgpPeerStatus::new().set_state("example");
3031        /// ```
3032        pub fn set_state<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3033            self.state = v.into();
3034            self
3035        }
3036
3037        /// Sets the value of [uptime][crate::model::router_status::BgpPeerStatus::uptime].
3038        ///
3039        /// # Example
3040        /// ```ignore,no_run
3041        /// # use google_cloud_edgenetwork_v1::model::router_status::BgpPeerStatus;
3042        /// let x = BgpPeerStatus::new().set_uptime("example");
3043        /// ```
3044        pub fn set_uptime<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3045            self.uptime = v.into();
3046            self
3047        }
3048
3049        /// Sets the value of [uptime_seconds][crate::model::router_status::BgpPeerStatus::uptime_seconds].
3050        ///
3051        /// # Example
3052        /// ```ignore,no_run
3053        /// # use google_cloud_edgenetwork_v1::model::router_status::BgpPeerStatus;
3054        /// let x = BgpPeerStatus::new().set_uptime_seconds(42);
3055        /// ```
3056        pub fn set_uptime_seconds<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3057            self.uptime_seconds = v.into();
3058            self
3059        }
3060
3061        /// Sets the value of [prefix_counter][crate::model::router_status::BgpPeerStatus::prefix_counter].
3062        ///
3063        /// # Example
3064        /// ```ignore,no_run
3065        /// # use google_cloud_edgenetwork_v1::model::router_status::BgpPeerStatus;
3066        /// use google_cloud_edgenetwork_v1::model::router_status::PrefixCounter;
3067        /// let x = BgpPeerStatus::new().set_prefix_counter(PrefixCounter::default()/* use setters */);
3068        /// ```
3069        pub fn set_prefix_counter<T>(mut self, v: T) -> Self
3070        where
3071            T: std::convert::Into<crate::model::router_status::PrefixCounter>,
3072        {
3073            self.prefix_counter = std::option::Option::Some(v.into());
3074            self
3075        }
3076
3077        /// Sets or clears the value of [prefix_counter][crate::model::router_status::BgpPeerStatus::prefix_counter].
3078        ///
3079        /// # Example
3080        /// ```ignore,no_run
3081        /// # use google_cloud_edgenetwork_v1::model::router_status::BgpPeerStatus;
3082        /// use google_cloud_edgenetwork_v1::model::router_status::PrefixCounter;
3083        /// let x = BgpPeerStatus::new().set_or_clear_prefix_counter(Some(PrefixCounter::default()/* use setters */));
3084        /// let x = BgpPeerStatus::new().set_or_clear_prefix_counter(None::<PrefixCounter>);
3085        /// ```
3086        pub fn set_or_clear_prefix_counter<T>(mut self, v: std::option::Option<T>) -> Self
3087        where
3088            T: std::convert::Into<crate::model::router_status::PrefixCounter>,
3089        {
3090            self.prefix_counter = v.map(|x| x.into());
3091            self
3092        }
3093    }
3094
3095    impl wkt::message::Message for BgpPeerStatus {
3096        fn typename() -> &'static str {
3097            "type.googleapis.com/google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus"
3098        }
3099    }
3100
3101    /// Defines additional types related to [BgpPeerStatus].
3102    pub mod bgp_peer_status {
3103        #[allow(unused_imports)]
3104        use super::*;
3105
3106        /// Status of the BGP peer: {UP, DOWN}
3107        ///
3108        /// # Working with unknown values
3109        ///
3110        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
3111        /// additional enum variants at any time. Adding new variants is not considered
3112        /// a breaking change. Applications should write their code in anticipation of:
3113        ///
3114        /// - New values appearing in future releases of the client library, **and**
3115        /// - New values received dynamically, without application changes.
3116        ///
3117        /// Please consult the [Working with enums] section in the user guide for some
3118        /// guidelines.
3119        ///
3120        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
3121        #[derive(Clone, Debug, PartialEq)]
3122        #[non_exhaustive]
3123        pub enum BgpStatus {
3124            /// The default status indicating BGP session is in unknown state.
3125            Unknown,
3126            /// The UP status indicating BGP session is established.
3127            Up,
3128            /// The DOWN state indicating BGP session is not established yet.
3129            Down,
3130            /// If set, the enum was initialized with an unknown value.
3131            ///
3132            /// Applications can examine the value using [BgpStatus::value] or
3133            /// [BgpStatus::name].
3134            UnknownValue(bgp_status::UnknownValue),
3135        }
3136
3137        #[doc(hidden)]
3138        pub mod bgp_status {
3139            #[allow(unused_imports)]
3140            use super::*;
3141            #[derive(Clone, Debug, PartialEq)]
3142            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
3143        }
3144
3145        impl BgpStatus {
3146            /// Gets the enum value.
3147            ///
3148            /// Returns `None` if the enum contains an unknown value deserialized from
3149            /// the string representation of enums.
3150            pub fn value(&self) -> std::option::Option<i32> {
3151                match self {
3152                    Self::Unknown => std::option::Option::Some(0),
3153                    Self::Up => std::option::Option::Some(1),
3154                    Self::Down => std::option::Option::Some(2),
3155                    Self::UnknownValue(u) => u.0.value(),
3156                }
3157            }
3158
3159            /// Gets the enum value as a string.
3160            ///
3161            /// Returns `None` if the enum contains an unknown value deserialized from
3162            /// the integer representation of enums.
3163            pub fn name(&self) -> std::option::Option<&str> {
3164                match self {
3165                    Self::Unknown => std::option::Option::Some("UNKNOWN"),
3166                    Self::Up => std::option::Option::Some("UP"),
3167                    Self::Down => std::option::Option::Some("DOWN"),
3168                    Self::UnknownValue(u) => u.0.name(),
3169                }
3170            }
3171        }
3172
3173        impl std::default::Default for BgpStatus {
3174            fn default() -> Self {
3175                use std::convert::From;
3176                Self::from(0)
3177            }
3178        }
3179
3180        impl std::fmt::Display for BgpStatus {
3181            fn fmt(
3182                &self,
3183                f: &mut std::fmt::Formatter<'_>,
3184            ) -> std::result::Result<(), std::fmt::Error> {
3185                wkt::internal::display_enum(f, self.name(), self.value())
3186            }
3187        }
3188
3189        impl std::convert::From<i32> for BgpStatus {
3190            fn from(value: i32) -> Self {
3191                match value {
3192                    0 => Self::Unknown,
3193                    1 => Self::Up,
3194                    2 => Self::Down,
3195                    _ => Self::UnknownValue(bgp_status::UnknownValue(
3196                        wkt::internal::UnknownEnumValue::Integer(value),
3197                    )),
3198                }
3199            }
3200        }
3201
3202        impl std::convert::From<&str> for BgpStatus {
3203            fn from(value: &str) -> Self {
3204                use std::string::ToString;
3205                match value {
3206                    "UNKNOWN" => Self::Unknown,
3207                    "UP" => Self::Up,
3208                    "DOWN" => Self::Down,
3209                    _ => Self::UnknownValue(bgp_status::UnknownValue(
3210                        wkt::internal::UnknownEnumValue::String(value.to_string()),
3211                    )),
3212                }
3213            }
3214        }
3215
3216        impl serde::ser::Serialize for BgpStatus {
3217            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
3218            where
3219                S: serde::Serializer,
3220            {
3221                match self {
3222                    Self::Unknown => serializer.serialize_i32(0),
3223                    Self::Up => serializer.serialize_i32(1),
3224                    Self::Down => serializer.serialize_i32(2),
3225                    Self::UnknownValue(u) => u.0.serialize(serializer),
3226                }
3227            }
3228        }
3229
3230        impl<'de> serde::de::Deserialize<'de> for BgpStatus {
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::<BgpStatus>::new(
3236                    ".google.cloud.edgenetwork.v1.RouterStatus.BgpPeerStatus.BgpStatus",
3237                ))
3238            }
3239        }
3240    }
3241
3242    /// PrefixCounter contains a collection of prefixes related counts.
3243    #[derive(Clone, Default, PartialEq)]
3244    #[non_exhaustive]
3245    pub struct PrefixCounter {
3246        /// Number of prefixes advertised.
3247        pub advertised: i64,
3248
3249        /// Number of prefixes denied.
3250        pub denied: i64,
3251
3252        /// Number of prefixes received.
3253        pub received: i64,
3254
3255        /// Number of prefixes sent.
3256        pub sent: i64,
3257
3258        /// Number of prefixes suppressed.
3259        pub suppressed: i64,
3260
3261        /// Number of prefixes withdrawn.
3262        pub withdrawn: i64,
3263
3264        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3265    }
3266
3267    impl PrefixCounter {
3268        pub fn new() -> Self {
3269            std::default::Default::default()
3270        }
3271
3272        /// Sets the value of [advertised][crate::model::router_status::PrefixCounter::advertised].
3273        ///
3274        /// # Example
3275        /// ```ignore,no_run
3276        /// # use google_cloud_edgenetwork_v1::model::router_status::PrefixCounter;
3277        /// let x = PrefixCounter::new().set_advertised(42);
3278        /// ```
3279        pub fn set_advertised<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3280            self.advertised = v.into();
3281            self
3282        }
3283
3284        /// Sets the value of [denied][crate::model::router_status::PrefixCounter::denied].
3285        ///
3286        /// # Example
3287        /// ```ignore,no_run
3288        /// # use google_cloud_edgenetwork_v1::model::router_status::PrefixCounter;
3289        /// let x = PrefixCounter::new().set_denied(42);
3290        /// ```
3291        pub fn set_denied<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3292            self.denied = v.into();
3293            self
3294        }
3295
3296        /// Sets the value of [received][crate::model::router_status::PrefixCounter::received].
3297        ///
3298        /// # Example
3299        /// ```ignore,no_run
3300        /// # use google_cloud_edgenetwork_v1::model::router_status::PrefixCounter;
3301        /// let x = PrefixCounter::new().set_received(42);
3302        /// ```
3303        pub fn set_received<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3304            self.received = v.into();
3305            self
3306        }
3307
3308        /// Sets the value of [sent][crate::model::router_status::PrefixCounter::sent].
3309        ///
3310        /// # Example
3311        /// ```ignore,no_run
3312        /// # use google_cloud_edgenetwork_v1::model::router_status::PrefixCounter;
3313        /// let x = PrefixCounter::new().set_sent(42);
3314        /// ```
3315        pub fn set_sent<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3316            self.sent = v.into();
3317            self
3318        }
3319
3320        /// Sets the value of [suppressed][crate::model::router_status::PrefixCounter::suppressed].
3321        ///
3322        /// # Example
3323        /// ```ignore,no_run
3324        /// # use google_cloud_edgenetwork_v1::model::router_status::PrefixCounter;
3325        /// let x = PrefixCounter::new().set_suppressed(42);
3326        /// ```
3327        pub fn set_suppressed<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3328            self.suppressed = v.into();
3329            self
3330        }
3331
3332        /// Sets the value of [withdrawn][crate::model::router_status::PrefixCounter::withdrawn].
3333        ///
3334        /// # Example
3335        /// ```ignore,no_run
3336        /// # use google_cloud_edgenetwork_v1::model::router_status::PrefixCounter;
3337        /// let x = PrefixCounter::new().set_withdrawn(42);
3338        /// ```
3339        pub fn set_withdrawn<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
3340            self.withdrawn = v.into();
3341            self
3342        }
3343    }
3344
3345    impl wkt::message::Message for PrefixCounter {
3346        fn typename() -> &'static str {
3347            "type.googleapis.com/google.cloud.edgenetwork.v1.RouterStatus.PrefixCounter"
3348        }
3349    }
3350}
3351
3352/// Deprecated: not implemented.
3353/// Message for requesting list of Zones
3354#[derive(Clone, Default, PartialEq)]
3355#[non_exhaustive]
3356#[deprecated]
3357pub struct ListZonesRequest {
3358    /// Required. Parent value for ListZonesRequest
3359    pub parent: std::string::String,
3360
3361    /// Requested page size. Server may return fewer items than requested.
3362    /// If unspecified, server will pick an appropriate default.
3363    pub page_size: i32,
3364
3365    /// A token identifying a page of results the server should return.
3366    pub page_token: std::string::String,
3367
3368    /// Filtering results
3369    pub filter: std::string::String,
3370
3371    /// Hint for how to order the results
3372    pub order_by: std::string::String,
3373
3374    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3375}
3376
3377impl ListZonesRequest {
3378    pub fn new() -> Self {
3379        std::default::Default::default()
3380    }
3381
3382    /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
3383    ///
3384    /// # Example
3385    /// ```ignore,no_run
3386    /// # use google_cloud_edgenetwork_v1::model::ListZonesRequest;
3387    /// let x = ListZonesRequest::new().set_parent("example");
3388    /// ```
3389    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3390        self.parent = v.into();
3391        self
3392    }
3393
3394    /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
3395    ///
3396    /// # Example
3397    /// ```ignore,no_run
3398    /// # use google_cloud_edgenetwork_v1::model::ListZonesRequest;
3399    /// let x = ListZonesRequest::new().set_page_size(42);
3400    /// ```
3401    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3402        self.page_size = v.into();
3403        self
3404    }
3405
3406    /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
3407    ///
3408    /// # Example
3409    /// ```ignore,no_run
3410    /// # use google_cloud_edgenetwork_v1::model::ListZonesRequest;
3411    /// let x = ListZonesRequest::new().set_page_token("example");
3412    /// ```
3413    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3414        self.page_token = v.into();
3415        self
3416    }
3417
3418    /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
3419    ///
3420    /// # Example
3421    /// ```ignore,no_run
3422    /// # use google_cloud_edgenetwork_v1::model::ListZonesRequest;
3423    /// let x = ListZonesRequest::new().set_filter("example");
3424    /// ```
3425    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3426        self.filter = v.into();
3427        self
3428    }
3429
3430    /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
3431    ///
3432    /// # Example
3433    /// ```ignore,no_run
3434    /// # use google_cloud_edgenetwork_v1::model::ListZonesRequest;
3435    /// let x = ListZonesRequest::new().set_order_by("example");
3436    /// ```
3437    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3438        self.order_by = v.into();
3439        self
3440    }
3441}
3442
3443impl wkt::message::Message for ListZonesRequest {
3444    fn typename() -> &'static str {
3445        "type.googleapis.com/google.cloud.edgenetwork.v1.ListZonesRequest"
3446    }
3447}
3448
3449/// Deprecated: not implemented.
3450/// Message for response to listing Zones
3451#[derive(Clone, Default, PartialEq)]
3452#[non_exhaustive]
3453#[deprecated]
3454pub struct ListZonesResponse {
3455    /// The list of Zone
3456    pub zones: std::vec::Vec<crate::model::Zone>,
3457
3458    /// A token identifying a page of results the server should return.
3459    pub next_page_token: std::string::String,
3460
3461    /// Locations that could not be reached.
3462    pub unreachable: std::vec::Vec<std::string::String>,
3463
3464    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3465}
3466
3467impl ListZonesResponse {
3468    pub fn new() -> Self {
3469        std::default::Default::default()
3470    }
3471
3472    /// Sets the value of [zones][crate::model::ListZonesResponse::zones].
3473    ///
3474    /// # Example
3475    /// ```ignore,no_run
3476    /// # use google_cloud_edgenetwork_v1::model::ListZonesResponse;
3477    /// use google_cloud_edgenetwork_v1::model::Zone;
3478    /// let x = ListZonesResponse::new()
3479    ///     .set_zones([
3480    ///         Zone::default()/* use setters */,
3481    ///         Zone::default()/* use (different) setters */,
3482    ///     ]);
3483    /// ```
3484    pub fn set_zones<T, V>(mut self, v: T) -> Self
3485    where
3486        T: std::iter::IntoIterator<Item = V>,
3487        V: std::convert::Into<crate::model::Zone>,
3488    {
3489        use std::iter::Iterator;
3490        self.zones = v.into_iter().map(|i| i.into()).collect();
3491        self
3492    }
3493
3494    /// Sets the value of [next_page_token][crate::model::ListZonesResponse::next_page_token].
3495    ///
3496    /// # Example
3497    /// ```ignore,no_run
3498    /// # use google_cloud_edgenetwork_v1::model::ListZonesResponse;
3499    /// let x = ListZonesResponse::new().set_next_page_token("example");
3500    /// ```
3501    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3502        self.next_page_token = v.into();
3503        self
3504    }
3505
3506    /// Sets the value of [unreachable][crate::model::ListZonesResponse::unreachable].
3507    ///
3508    /// # Example
3509    /// ```ignore,no_run
3510    /// # use google_cloud_edgenetwork_v1::model::ListZonesResponse;
3511    /// let x = ListZonesResponse::new().set_unreachable(["a", "b", "c"]);
3512    /// ```
3513    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3514    where
3515        T: std::iter::IntoIterator<Item = V>,
3516        V: std::convert::Into<std::string::String>,
3517    {
3518        use std::iter::Iterator;
3519        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3520        self
3521    }
3522}
3523
3524impl wkt::message::Message for ListZonesResponse {
3525    fn typename() -> &'static str {
3526        "type.googleapis.com/google.cloud.edgenetwork.v1.ListZonesResponse"
3527    }
3528}
3529
3530#[doc(hidden)]
3531impl google_cloud_gax::paginator::internal::PageableResponse for ListZonesResponse {
3532    type PageItem = crate::model::Zone;
3533
3534    fn items(self) -> std::vec::Vec<Self::PageItem> {
3535        self.zones
3536    }
3537
3538    fn next_page_token(&self) -> std::string::String {
3539        use std::clone::Clone;
3540        self.next_page_token.clone()
3541    }
3542}
3543
3544/// Deprecated: not implemented.
3545/// Message for getting a Zone
3546#[derive(Clone, Default, PartialEq)]
3547#[non_exhaustive]
3548#[deprecated]
3549pub struct GetZoneRequest {
3550    /// Required. Name of the resource
3551    pub name: std::string::String,
3552
3553    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3554}
3555
3556impl GetZoneRequest {
3557    pub fn new() -> Self {
3558        std::default::Default::default()
3559    }
3560
3561    /// Sets the value of [name][crate::model::GetZoneRequest::name].
3562    ///
3563    /// # Example
3564    /// ```ignore,no_run
3565    /// # use google_cloud_edgenetwork_v1::model::GetZoneRequest;
3566    /// let x = GetZoneRequest::new().set_name("example");
3567    /// ```
3568    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3569        self.name = v.into();
3570        self
3571    }
3572}
3573
3574impl wkt::message::Message for GetZoneRequest {
3575    fn typename() -> &'static str {
3576        "type.googleapis.com/google.cloud.edgenetwork.v1.GetZoneRequest"
3577    }
3578}
3579
3580/// Message for requesting list of Networks
3581#[derive(Clone, Default, PartialEq)]
3582#[non_exhaustive]
3583pub struct ListNetworksRequest {
3584    /// Required. Parent value for ListNetworksRequest
3585    pub parent: std::string::String,
3586
3587    /// Requested page size. Server may return fewer items than requested.
3588    /// If unspecified, server will pick an appropriate default.
3589    pub page_size: i32,
3590
3591    /// A token identifying a page of results the server should return.
3592    pub page_token: std::string::String,
3593
3594    /// Filtering results
3595    pub filter: std::string::String,
3596
3597    /// Hint for how to order the results
3598    pub order_by: std::string::String,
3599
3600    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3601}
3602
3603impl ListNetworksRequest {
3604    pub fn new() -> Self {
3605        std::default::Default::default()
3606    }
3607
3608    /// Sets the value of [parent][crate::model::ListNetworksRequest::parent].
3609    ///
3610    /// # Example
3611    /// ```ignore,no_run
3612    /// # use google_cloud_edgenetwork_v1::model::ListNetworksRequest;
3613    /// let x = ListNetworksRequest::new().set_parent("example");
3614    /// ```
3615    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3616        self.parent = v.into();
3617        self
3618    }
3619
3620    /// Sets the value of [page_size][crate::model::ListNetworksRequest::page_size].
3621    ///
3622    /// # Example
3623    /// ```ignore,no_run
3624    /// # use google_cloud_edgenetwork_v1::model::ListNetworksRequest;
3625    /// let x = ListNetworksRequest::new().set_page_size(42);
3626    /// ```
3627    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3628        self.page_size = v.into();
3629        self
3630    }
3631
3632    /// Sets the value of [page_token][crate::model::ListNetworksRequest::page_token].
3633    ///
3634    /// # Example
3635    /// ```ignore,no_run
3636    /// # use google_cloud_edgenetwork_v1::model::ListNetworksRequest;
3637    /// let x = ListNetworksRequest::new().set_page_token("example");
3638    /// ```
3639    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3640        self.page_token = v.into();
3641        self
3642    }
3643
3644    /// Sets the value of [filter][crate::model::ListNetworksRequest::filter].
3645    ///
3646    /// # Example
3647    /// ```ignore,no_run
3648    /// # use google_cloud_edgenetwork_v1::model::ListNetworksRequest;
3649    /// let x = ListNetworksRequest::new().set_filter("example");
3650    /// ```
3651    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3652        self.filter = v.into();
3653        self
3654    }
3655
3656    /// Sets the value of [order_by][crate::model::ListNetworksRequest::order_by].
3657    ///
3658    /// # Example
3659    /// ```ignore,no_run
3660    /// # use google_cloud_edgenetwork_v1::model::ListNetworksRequest;
3661    /// let x = ListNetworksRequest::new().set_order_by("example");
3662    /// ```
3663    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3664        self.order_by = v.into();
3665        self
3666    }
3667}
3668
3669impl wkt::message::Message for ListNetworksRequest {
3670    fn typename() -> &'static str {
3671        "type.googleapis.com/google.cloud.edgenetwork.v1.ListNetworksRequest"
3672    }
3673}
3674
3675/// Message for response to listing Networks
3676#[derive(Clone, Default, PartialEq)]
3677#[non_exhaustive]
3678pub struct ListNetworksResponse {
3679    /// The list of Network
3680    pub networks: std::vec::Vec<crate::model::Network>,
3681
3682    /// A token identifying a page of results the server should return.
3683    pub next_page_token: std::string::String,
3684
3685    /// Locations that could not be reached.
3686    pub unreachable: std::vec::Vec<std::string::String>,
3687
3688    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3689}
3690
3691impl ListNetworksResponse {
3692    pub fn new() -> Self {
3693        std::default::Default::default()
3694    }
3695
3696    /// Sets the value of [networks][crate::model::ListNetworksResponse::networks].
3697    ///
3698    /// # Example
3699    /// ```ignore,no_run
3700    /// # use google_cloud_edgenetwork_v1::model::ListNetworksResponse;
3701    /// use google_cloud_edgenetwork_v1::model::Network;
3702    /// let x = ListNetworksResponse::new()
3703    ///     .set_networks([
3704    ///         Network::default()/* use setters */,
3705    ///         Network::default()/* use (different) setters */,
3706    ///     ]);
3707    /// ```
3708    pub fn set_networks<T, V>(mut self, v: T) -> Self
3709    where
3710        T: std::iter::IntoIterator<Item = V>,
3711        V: std::convert::Into<crate::model::Network>,
3712    {
3713        use std::iter::Iterator;
3714        self.networks = v.into_iter().map(|i| i.into()).collect();
3715        self
3716    }
3717
3718    /// Sets the value of [next_page_token][crate::model::ListNetworksResponse::next_page_token].
3719    ///
3720    /// # Example
3721    /// ```ignore,no_run
3722    /// # use google_cloud_edgenetwork_v1::model::ListNetworksResponse;
3723    /// let x = ListNetworksResponse::new().set_next_page_token("example");
3724    /// ```
3725    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3726        self.next_page_token = v.into();
3727        self
3728    }
3729
3730    /// Sets the value of [unreachable][crate::model::ListNetworksResponse::unreachable].
3731    ///
3732    /// # Example
3733    /// ```ignore,no_run
3734    /// # use google_cloud_edgenetwork_v1::model::ListNetworksResponse;
3735    /// let x = ListNetworksResponse::new().set_unreachable(["a", "b", "c"]);
3736    /// ```
3737    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3738    where
3739        T: std::iter::IntoIterator<Item = V>,
3740        V: std::convert::Into<std::string::String>,
3741    {
3742        use std::iter::Iterator;
3743        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3744        self
3745    }
3746}
3747
3748impl wkt::message::Message for ListNetworksResponse {
3749    fn typename() -> &'static str {
3750        "type.googleapis.com/google.cloud.edgenetwork.v1.ListNetworksResponse"
3751    }
3752}
3753
3754#[doc(hidden)]
3755impl google_cloud_gax::paginator::internal::PageableResponse for ListNetworksResponse {
3756    type PageItem = crate::model::Network;
3757
3758    fn items(self) -> std::vec::Vec<Self::PageItem> {
3759        self.networks
3760    }
3761
3762    fn next_page_token(&self) -> std::string::String {
3763        use std::clone::Clone;
3764        self.next_page_token.clone()
3765    }
3766}
3767
3768/// Message for getting a Network
3769#[derive(Clone, Default, PartialEq)]
3770#[non_exhaustive]
3771pub struct GetNetworkRequest {
3772    /// Required. Name of the resource
3773    pub name: std::string::String,
3774
3775    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3776}
3777
3778impl GetNetworkRequest {
3779    pub fn new() -> Self {
3780        std::default::Default::default()
3781    }
3782
3783    /// Sets the value of [name][crate::model::GetNetworkRequest::name].
3784    ///
3785    /// # Example
3786    /// ```ignore,no_run
3787    /// # use google_cloud_edgenetwork_v1::model::GetNetworkRequest;
3788    /// let x = GetNetworkRequest::new().set_name("example");
3789    /// ```
3790    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3791        self.name = v.into();
3792        self
3793    }
3794}
3795
3796impl wkt::message::Message for GetNetworkRequest {
3797    fn typename() -> &'static str {
3798        "type.googleapis.com/google.cloud.edgenetwork.v1.GetNetworkRequest"
3799    }
3800}
3801
3802/// Message for creating a Network
3803#[derive(Clone, Default, PartialEq)]
3804#[non_exhaustive]
3805pub struct CreateNetworkRequest {
3806    /// Required. Value for parent.
3807    pub parent: std::string::String,
3808
3809    /// Required. Id of the requesting object
3810    /// If auto-generating Id server-side, remove this field and
3811    /// network_id from the method_signature of Create RPC
3812    pub network_id: std::string::String,
3813
3814    /// Required. The resource being created
3815    pub network: std::option::Option<crate::model::Network>,
3816
3817    /// Optional. An optional request ID to identify requests. Specify a unique
3818    /// request ID so that if you must retry your request, the server will know to
3819    /// ignore the request if it has already been completed. The server will
3820    /// guarantee that for at least 60 minutes since the first request.
3821    ///
3822    /// For example, consider a situation where you make an initial request and
3823    /// the request times out. If you make the request again with the same request
3824    /// ID, the server can check if original operation with the same request ID
3825    /// was received, and if so, will ignore the second request. This prevents
3826    /// clients from accidentally creating duplicate commitments.
3827    ///
3828    /// The request ID must be a valid UUID with the exception that zero UUID is
3829    /// not supported (00000000-0000-0000-0000-000000000000).
3830    pub request_id: std::string::String,
3831
3832    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3833}
3834
3835impl CreateNetworkRequest {
3836    pub fn new() -> Self {
3837        std::default::Default::default()
3838    }
3839
3840    /// Sets the value of [parent][crate::model::CreateNetworkRequest::parent].
3841    ///
3842    /// # Example
3843    /// ```ignore,no_run
3844    /// # use google_cloud_edgenetwork_v1::model::CreateNetworkRequest;
3845    /// let x = CreateNetworkRequest::new().set_parent("example");
3846    /// ```
3847    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3848        self.parent = v.into();
3849        self
3850    }
3851
3852    /// Sets the value of [network_id][crate::model::CreateNetworkRequest::network_id].
3853    ///
3854    /// # Example
3855    /// ```ignore,no_run
3856    /// # use google_cloud_edgenetwork_v1::model::CreateNetworkRequest;
3857    /// let x = CreateNetworkRequest::new().set_network_id("example");
3858    /// ```
3859    pub fn set_network_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3860        self.network_id = v.into();
3861        self
3862    }
3863
3864    /// Sets the value of [network][crate::model::CreateNetworkRequest::network].
3865    ///
3866    /// # Example
3867    /// ```ignore,no_run
3868    /// # use google_cloud_edgenetwork_v1::model::CreateNetworkRequest;
3869    /// use google_cloud_edgenetwork_v1::model::Network;
3870    /// let x = CreateNetworkRequest::new().set_network(Network::default()/* use setters */);
3871    /// ```
3872    pub fn set_network<T>(mut self, v: T) -> Self
3873    where
3874        T: std::convert::Into<crate::model::Network>,
3875    {
3876        self.network = std::option::Option::Some(v.into());
3877        self
3878    }
3879
3880    /// Sets or clears the value of [network][crate::model::CreateNetworkRequest::network].
3881    ///
3882    /// # Example
3883    /// ```ignore,no_run
3884    /// # use google_cloud_edgenetwork_v1::model::CreateNetworkRequest;
3885    /// use google_cloud_edgenetwork_v1::model::Network;
3886    /// let x = CreateNetworkRequest::new().set_or_clear_network(Some(Network::default()/* use setters */));
3887    /// let x = CreateNetworkRequest::new().set_or_clear_network(None::<Network>);
3888    /// ```
3889    pub fn set_or_clear_network<T>(mut self, v: std::option::Option<T>) -> Self
3890    where
3891        T: std::convert::Into<crate::model::Network>,
3892    {
3893        self.network = v.map(|x| x.into());
3894        self
3895    }
3896
3897    /// Sets the value of [request_id][crate::model::CreateNetworkRequest::request_id].
3898    ///
3899    /// # Example
3900    /// ```ignore,no_run
3901    /// # use google_cloud_edgenetwork_v1::model::CreateNetworkRequest;
3902    /// let x = CreateNetworkRequest::new().set_request_id("example");
3903    /// ```
3904    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3905        self.request_id = v.into();
3906        self
3907    }
3908}
3909
3910impl wkt::message::Message for CreateNetworkRequest {
3911    fn typename() -> &'static str {
3912        "type.googleapis.com/google.cloud.edgenetwork.v1.CreateNetworkRequest"
3913    }
3914}
3915
3916/// Message for deleting a Network
3917#[derive(Clone, Default, PartialEq)]
3918#[non_exhaustive]
3919pub struct DeleteNetworkRequest {
3920    /// Required. Name of the resource
3921    pub name: std::string::String,
3922
3923    /// Optional. An optional request ID to identify requests. Specify a unique
3924    /// request ID so that if you must retry your request, the server will know to
3925    /// ignore the request if it has already been completed. The server will
3926    /// guarantee that for at least 60 minutes after the first request.
3927    ///
3928    /// For example, consider a situation where you make an initial request and
3929    /// the request times out. If you make the request again with the same request
3930    /// ID, the server can check if original operation with the same request ID
3931    /// was received, and if so, will ignore the second request. This prevents
3932    /// clients from accidentally creating duplicate commitments.
3933    ///
3934    /// The request ID must be a valid UUID with the exception that zero UUID is
3935    /// not supported (00000000-0000-0000-0000-000000000000).
3936    pub request_id: std::string::String,
3937
3938    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3939}
3940
3941impl DeleteNetworkRequest {
3942    pub fn new() -> Self {
3943        std::default::Default::default()
3944    }
3945
3946    /// Sets the value of [name][crate::model::DeleteNetworkRequest::name].
3947    ///
3948    /// # Example
3949    /// ```ignore,no_run
3950    /// # use google_cloud_edgenetwork_v1::model::DeleteNetworkRequest;
3951    /// let x = DeleteNetworkRequest::new().set_name("example");
3952    /// ```
3953    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3954        self.name = v.into();
3955        self
3956    }
3957
3958    /// Sets the value of [request_id][crate::model::DeleteNetworkRequest::request_id].
3959    ///
3960    /// # Example
3961    /// ```ignore,no_run
3962    /// # use google_cloud_edgenetwork_v1::model::DeleteNetworkRequest;
3963    /// let x = DeleteNetworkRequest::new().set_request_id("example");
3964    /// ```
3965    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3966        self.request_id = v.into();
3967        self
3968    }
3969}
3970
3971impl wkt::message::Message for DeleteNetworkRequest {
3972    fn typename() -> &'static str {
3973        "type.googleapis.com/google.cloud.edgenetwork.v1.DeleteNetworkRequest"
3974    }
3975}
3976
3977/// Message for requesting list of Subnets
3978#[derive(Clone, Default, PartialEq)]
3979#[non_exhaustive]
3980pub struct ListSubnetsRequest {
3981    /// Required. Parent value for ListSubnetsRequest
3982    pub parent: std::string::String,
3983
3984    /// Requested page size. Server may return fewer items than requested.
3985    /// If unspecified, server will pick an appropriate default.
3986    pub page_size: i32,
3987
3988    /// A token identifying a page of results the server should return.
3989    pub page_token: std::string::String,
3990
3991    /// Filtering results
3992    pub filter: std::string::String,
3993
3994    /// Hint for how to order the results
3995    pub order_by: std::string::String,
3996
3997    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3998}
3999
4000impl ListSubnetsRequest {
4001    pub fn new() -> Self {
4002        std::default::Default::default()
4003    }
4004
4005    /// Sets the value of [parent][crate::model::ListSubnetsRequest::parent].
4006    ///
4007    /// # Example
4008    /// ```ignore,no_run
4009    /// # use google_cloud_edgenetwork_v1::model::ListSubnetsRequest;
4010    /// let x = ListSubnetsRequest::new().set_parent("example");
4011    /// ```
4012    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4013        self.parent = v.into();
4014        self
4015    }
4016
4017    /// Sets the value of [page_size][crate::model::ListSubnetsRequest::page_size].
4018    ///
4019    /// # Example
4020    /// ```ignore,no_run
4021    /// # use google_cloud_edgenetwork_v1::model::ListSubnetsRequest;
4022    /// let x = ListSubnetsRequest::new().set_page_size(42);
4023    /// ```
4024    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4025        self.page_size = v.into();
4026        self
4027    }
4028
4029    /// Sets the value of [page_token][crate::model::ListSubnetsRequest::page_token].
4030    ///
4031    /// # Example
4032    /// ```ignore,no_run
4033    /// # use google_cloud_edgenetwork_v1::model::ListSubnetsRequest;
4034    /// let x = ListSubnetsRequest::new().set_page_token("example");
4035    /// ```
4036    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4037        self.page_token = v.into();
4038        self
4039    }
4040
4041    /// Sets the value of [filter][crate::model::ListSubnetsRequest::filter].
4042    ///
4043    /// # Example
4044    /// ```ignore,no_run
4045    /// # use google_cloud_edgenetwork_v1::model::ListSubnetsRequest;
4046    /// let x = ListSubnetsRequest::new().set_filter("example");
4047    /// ```
4048    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4049        self.filter = v.into();
4050        self
4051    }
4052
4053    /// Sets the value of [order_by][crate::model::ListSubnetsRequest::order_by].
4054    ///
4055    /// # Example
4056    /// ```ignore,no_run
4057    /// # use google_cloud_edgenetwork_v1::model::ListSubnetsRequest;
4058    /// let x = ListSubnetsRequest::new().set_order_by("example");
4059    /// ```
4060    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4061        self.order_by = v.into();
4062        self
4063    }
4064}
4065
4066impl wkt::message::Message for ListSubnetsRequest {
4067    fn typename() -> &'static str {
4068        "type.googleapis.com/google.cloud.edgenetwork.v1.ListSubnetsRequest"
4069    }
4070}
4071
4072/// Message for response to listing Subnets
4073#[derive(Clone, Default, PartialEq)]
4074#[non_exhaustive]
4075pub struct ListSubnetsResponse {
4076    /// The list of Subnet
4077    pub subnets: std::vec::Vec<crate::model::Subnet>,
4078
4079    /// A token identifying a page of results the server should return.
4080    pub next_page_token: std::string::String,
4081
4082    /// Locations that could not be reached.
4083    pub unreachable: std::vec::Vec<std::string::String>,
4084
4085    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4086}
4087
4088impl ListSubnetsResponse {
4089    pub fn new() -> Self {
4090        std::default::Default::default()
4091    }
4092
4093    /// Sets the value of [subnets][crate::model::ListSubnetsResponse::subnets].
4094    ///
4095    /// # Example
4096    /// ```ignore,no_run
4097    /// # use google_cloud_edgenetwork_v1::model::ListSubnetsResponse;
4098    /// use google_cloud_edgenetwork_v1::model::Subnet;
4099    /// let x = ListSubnetsResponse::new()
4100    ///     .set_subnets([
4101    ///         Subnet::default()/* use setters */,
4102    ///         Subnet::default()/* use (different) setters */,
4103    ///     ]);
4104    /// ```
4105    pub fn set_subnets<T, V>(mut self, v: T) -> Self
4106    where
4107        T: std::iter::IntoIterator<Item = V>,
4108        V: std::convert::Into<crate::model::Subnet>,
4109    {
4110        use std::iter::Iterator;
4111        self.subnets = v.into_iter().map(|i| i.into()).collect();
4112        self
4113    }
4114
4115    /// Sets the value of [next_page_token][crate::model::ListSubnetsResponse::next_page_token].
4116    ///
4117    /// # Example
4118    /// ```ignore,no_run
4119    /// # use google_cloud_edgenetwork_v1::model::ListSubnetsResponse;
4120    /// let x = ListSubnetsResponse::new().set_next_page_token("example");
4121    /// ```
4122    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4123        self.next_page_token = v.into();
4124        self
4125    }
4126
4127    /// Sets the value of [unreachable][crate::model::ListSubnetsResponse::unreachable].
4128    ///
4129    /// # Example
4130    /// ```ignore,no_run
4131    /// # use google_cloud_edgenetwork_v1::model::ListSubnetsResponse;
4132    /// let x = ListSubnetsResponse::new().set_unreachable(["a", "b", "c"]);
4133    /// ```
4134    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4135    where
4136        T: std::iter::IntoIterator<Item = V>,
4137        V: std::convert::Into<std::string::String>,
4138    {
4139        use std::iter::Iterator;
4140        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4141        self
4142    }
4143}
4144
4145impl wkt::message::Message for ListSubnetsResponse {
4146    fn typename() -> &'static str {
4147        "type.googleapis.com/google.cloud.edgenetwork.v1.ListSubnetsResponse"
4148    }
4149}
4150
4151#[doc(hidden)]
4152impl google_cloud_gax::paginator::internal::PageableResponse for ListSubnetsResponse {
4153    type PageItem = crate::model::Subnet;
4154
4155    fn items(self) -> std::vec::Vec<Self::PageItem> {
4156        self.subnets
4157    }
4158
4159    fn next_page_token(&self) -> std::string::String {
4160        use std::clone::Clone;
4161        self.next_page_token.clone()
4162    }
4163}
4164
4165/// Message for getting a Subnet
4166#[derive(Clone, Default, PartialEq)]
4167#[non_exhaustive]
4168pub struct GetSubnetRequest {
4169    /// Required. Name of the resource
4170    pub name: std::string::String,
4171
4172    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4173}
4174
4175impl GetSubnetRequest {
4176    pub fn new() -> Self {
4177        std::default::Default::default()
4178    }
4179
4180    /// Sets the value of [name][crate::model::GetSubnetRequest::name].
4181    ///
4182    /// # Example
4183    /// ```ignore,no_run
4184    /// # use google_cloud_edgenetwork_v1::model::GetSubnetRequest;
4185    /// let x = GetSubnetRequest::new().set_name("example");
4186    /// ```
4187    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4188        self.name = v.into();
4189        self
4190    }
4191}
4192
4193impl wkt::message::Message for GetSubnetRequest {
4194    fn typename() -> &'static str {
4195        "type.googleapis.com/google.cloud.edgenetwork.v1.GetSubnetRequest"
4196    }
4197}
4198
4199/// Message for creating a Subnet
4200#[derive(Clone, Default, PartialEq)]
4201#[non_exhaustive]
4202pub struct CreateSubnetRequest {
4203    /// Required. Value for parent.
4204    pub parent: std::string::String,
4205
4206    /// Required. Id of the requesting object
4207    /// If auto-generating Id server-side, remove this field and
4208    /// subnet_id from the method_signature of Create RPC
4209    pub subnet_id: std::string::String,
4210
4211    /// Required. The resource being created
4212    pub subnet: std::option::Option<crate::model::Subnet>,
4213
4214    /// Optional. An optional request ID to identify requests. Specify a unique
4215    /// request ID so that if you must retry your request, the server will know to
4216    /// ignore the request if it has already been completed. The server will
4217    /// guarantee that for at least 60 minutes since the first request.
4218    ///
4219    /// For example, consider a situation where you make an initial request and
4220    /// the request times out. If you make the request again with the same request
4221    /// ID, the server can check if original operation with the same request ID
4222    /// was received, and if so, will ignore the second request. This prevents
4223    /// clients from accidentally creating duplicate commitments.
4224    ///
4225    /// The request ID must be a valid UUID with the exception that zero UUID is
4226    /// not supported (00000000-0000-0000-0000-000000000000).
4227    pub request_id: std::string::String,
4228
4229    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4230}
4231
4232impl CreateSubnetRequest {
4233    pub fn new() -> Self {
4234        std::default::Default::default()
4235    }
4236
4237    /// Sets the value of [parent][crate::model::CreateSubnetRequest::parent].
4238    ///
4239    /// # Example
4240    /// ```ignore,no_run
4241    /// # use google_cloud_edgenetwork_v1::model::CreateSubnetRequest;
4242    /// let x = CreateSubnetRequest::new().set_parent("example");
4243    /// ```
4244    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4245        self.parent = v.into();
4246        self
4247    }
4248
4249    /// Sets the value of [subnet_id][crate::model::CreateSubnetRequest::subnet_id].
4250    ///
4251    /// # Example
4252    /// ```ignore,no_run
4253    /// # use google_cloud_edgenetwork_v1::model::CreateSubnetRequest;
4254    /// let x = CreateSubnetRequest::new().set_subnet_id("example");
4255    /// ```
4256    pub fn set_subnet_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4257        self.subnet_id = v.into();
4258        self
4259    }
4260
4261    /// Sets the value of [subnet][crate::model::CreateSubnetRequest::subnet].
4262    ///
4263    /// # Example
4264    /// ```ignore,no_run
4265    /// # use google_cloud_edgenetwork_v1::model::CreateSubnetRequest;
4266    /// use google_cloud_edgenetwork_v1::model::Subnet;
4267    /// let x = CreateSubnetRequest::new().set_subnet(Subnet::default()/* use setters */);
4268    /// ```
4269    pub fn set_subnet<T>(mut self, v: T) -> Self
4270    where
4271        T: std::convert::Into<crate::model::Subnet>,
4272    {
4273        self.subnet = std::option::Option::Some(v.into());
4274        self
4275    }
4276
4277    /// Sets or clears the value of [subnet][crate::model::CreateSubnetRequest::subnet].
4278    ///
4279    /// # Example
4280    /// ```ignore,no_run
4281    /// # use google_cloud_edgenetwork_v1::model::CreateSubnetRequest;
4282    /// use google_cloud_edgenetwork_v1::model::Subnet;
4283    /// let x = CreateSubnetRequest::new().set_or_clear_subnet(Some(Subnet::default()/* use setters */));
4284    /// let x = CreateSubnetRequest::new().set_or_clear_subnet(None::<Subnet>);
4285    /// ```
4286    pub fn set_or_clear_subnet<T>(mut self, v: std::option::Option<T>) -> Self
4287    where
4288        T: std::convert::Into<crate::model::Subnet>,
4289    {
4290        self.subnet = v.map(|x| x.into());
4291        self
4292    }
4293
4294    /// Sets the value of [request_id][crate::model::CreateSubnetRequest::request_id].
4295    ///
4296    /// # Example
4297    /// ```ignore,no_run
4298    /// # use google_cloud_edgenetwork_v1::model::CreateSubnetRequest;
4299    /// let x = CreateSubnetRequest::new().set_request_id("example");
4300    /// ```
4301    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4302        self.request_id = v.into();
4303        self
4304    }
4305}
4306
4307impl wkt::message::Message for CreateSubnetRequest {
4308    fn typename() -> &'static str {
4309        "type.googleapis.com/google.cloud.edgenetwork.v1.CreateSubnetRequest"
4310    }
4311}
4312
4313/// Message for updating a Subnet
4314#[derive(Clone, Default, PartialEq)]
4315#[non_exhaustive]
4316pub struct UpdateSubnetRequest {
4317    /// Required. Field mask is used to specify the fields to be overwritten in the
4318    /// Subnet resource by the update.
4319    /// The fields specified in the update_mask are relative to the resource, not
4320    /// the full request. A field will be overwritten if it is in the mask. If the
4321    /// user does not provide a mask then all fields will be overwritten.
4322    pub update_mask: std::option::Option<wkt::FieldMask>,
4323
4324    /// Required. The resource being updated
4325    pub subnet: std::option::Option<crate::model::Subnet>,
4326
4327    /// Optional. An optional request ID to identify requests. Specify a unique
4328    /// request ID so that if you must retry your request, the server will know to
4329    /// ignore the request if it has already been completed. The server will
4330    /// guarantee that for at least 60 minutes since the first request.
4331    ///
4332    /// For example, consider a situation where you make an initial request and
4333    /// the request times out. If you make the request again with the same request
4334    /// ID, the server can check if original operation with the same request ID
4335    /// was received, and if so, will ignore the second request. This prevents
4336    /// clients from accidentally creating duplicate commitments.
4337    ///
4338    /// The request ID must be a valid UUID with the exception that zero UUID is
4339    /// not supported (00000000-0000-0000-0000-000000000000).
4340    pub request_id: std::string::String,
4341
4342    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4343}
4344
4345impl UpdateSubnetRequest {
4346    pub fn new() -> Self {
4347        std::default::Default::default()
4348    }
4349
4350    /// Sets the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
4351    ///
4352    /// # Example
4353    /// ```ignore,no_run
4354    /// # use google_cloud_edgenetwork_v1::model::UpdateSubnetRequest;
4355    /// use wkt::FieldMask;
4356    /// let x = UpdateSubnetRequest::new().set_update_mask(FieldMask::default()/* use setters */);
4357    /// ```
4358    pub fn set_update_mask<T>(mut self, v: T) -> Self
4359    where
4360        T: std::convert::Into<wkt::FieldMask>,
4361    {
4362        self.update_mask = std::option::Option::Some(v.into());
4363        self
4364    }
4365
4366    /// Sets or clears the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
4367    ///
4368    /// # Example
4369    /// ```ignore,no_run
4370    /// # use google_cloud_edgenetwork_v1::model::UpdateSubnetRequest;
4371    /// use wkt::FieldMask;
4372    /// let x = UpdateSubnetRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
4373    /// let x = UpdateSubnetRequest::new().set_or_clear_update_mask(None::<FieldMask>);
4374    /// ```
4375    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4376    where
4377        T: std::convert::Into<wkt::FieldMask>,
4378    {
4379        self.update_mask = v.map(|x| x.into());
4380        self
4381    }
4382
4383    /// Sets the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
4384    ///
4385    /// # Example
4386    /// ```ignore,no_run
4387    /// # use google_cloud_edgenetwork_v1::model::UpdateSubnetRequest;
4388    /// use google_cloud_edgenetwork_v1::model::Subnet;
4389    /// let x = UpdateSubnetRequest::new().set_subnet(Subnet::default()/* use setters */);
4390    /// ```
4391    pub fn set_subnet<T>(mut self, v: T) -> Self
4392    where
4393        T: std::convert::Into<crate::model::Subnet>,
4394    {
4395        self.subnet = std::option::Option::Some(v.into());
4396        self
4397    }
4398
4399    /// Sets or clears the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
4400    ///
4401    /// # Example
4402    /// ```ignore,no_run
4403    /// # use google_cloud_edgenetwork_v1::model::UpdateSubnetRequest;
4404    /// use google_cloud_edgenetwork_v1::model::Subnet;
4405    /// let x = UpdateSubnetRequest::new().set_or_clear_subnet(Some(Subnet::default()/* use setters */));
4406    /// let x = UpdateSubnetRequest::new().set_or_clear_subnet(None::<Subnet>);
4407    /// ```
4408    pub fn set_or_clear_subnet<T>(mut self, v: std::option::Option<T>) -> Self
4409    where
4410        T: std::convert::Into<crate::model::Subnet>,
4411    {
4412        self.subnet = v.map(|x| x.into());
4413        self
4414    }
4415
4416    /// Sets the value of [request_id][crate::model::UpdateSubnetRequest::request_id].
4417    ///
4418    /// # Example
4419    /// ```ignore,no_run
4420    /// # use google_cloud_edgenetwork_v1::model::UpdateSubnetRequest;
4421    /// let x = UpdateSubnetRequest::new().set_request_id("example");
4422    /// ```
4423    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4424        self.request_id = v.into();
4425        self
4426    }
4427}
4428
4429impl wkt::message::Message for UpdateSubnetRequest {
4430    fn typename() -> &'static str {
4431        "type.googleapis.com/google.cloud.edgenetwork.v1.UpdateSubnetRequest"
4432    }
4433}
4434
4435/// Message for deleting a Subnet
4436#[derive(Clone, Default, PartialEq)]
4437#[non_exhaustive]
4438pub struct DeleteSubnetRequest {
4439    /// Required. Name of the resource
4440    pub name: std::string::String,
4441
4442    /// Optional. An optional request ID to identify requests. Specify a unique
4443    /// request ID so that if you must retry your request, the server will know to
4444    /// ignore the request if it has already been completed. The server will
4445    /// guarantee that for at least 60 minutes after the first request.
4446    ///
4447    /// For example, consider a situation where you make an initial request and
4448    /// the request times out. If you make the request again with the same request
4449    /// ID, the server can check if original operation with the same request ID
4450    /// was received, and if so, will ignore the second request. This prevents
4451    /// clients from accidentally creating duplicate commitments.
4452    ///
4453    /// The request ID must be a valid UUID with the exception that zero UUID is
4454    /// not supported (00000000-0000-0000-0000-000000000000).
4455    pub request_id: std::string::String,
4456
4457    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4458}
4459
4460impl DeleteSubnetRequest {
4461    pub fn new() -> Self {
4462        std::default::Default::default()
4463    }
4464
4465    /// Sets the value of [name][crate::model::DeleteSubnetRequest::name].
4466    ///
4467    /// # Example
4468    /// ```ignore,no_run
4469    /// # use google_cloud_edgenetwork_v1::model::DeleteSubnetRequest;
4470    /// let x = DeleteSubnetRequest::new().set_name("example");
4471    /// ```
4472    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4473        self.name = v.into();
4474        self
4475    }
4476
4477    /// Sets the value of [request_id][crate::model::DeleteSubnetRequest::request_id].
4478    ///
4479    /// # Example
4480    /// ```ignore,no_run
4481    /// # use google_cloud_edgenetwork_v1::model::DeleteSubnetRequest;
4482    /// let x = DeleteSubnetRequest::new().set_request_id("example");
4483    /// ```
4484    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4485        self.request_id = v.into();
4486        self
4487    }
4488}
4489
4490impl wkt::message::Message for DeleteSubnetRequest {
4491    fn typename() -> &'static str {
4492        "type.googleapis.com/google.cloud.edgenetwork.v1.DeleteSubnetRequest"
4493    }
4494}
4495
4496/// Message for requesting list of Interconnects
4497#[derive(Clone, Default, PartialEq)]
4498#[non_exhaustive]
4499pub struct ListInterconnectsRequest {
4500    /// Required. Parent value for ListInterconnectsRequest
4501    pub parent: std::string::String,
4502
4503    /// Requested page size. Server may return fewer items than requested.
4504    /// If unspecified, server will pick an appropriate default.
4505    pub page_size: i32,
4506
4507    /// A token identifying a page of results the server should return.
4508    pub page_token: std::string::String,
4509
4510    /// Filtering results
4511    pub filter: std::string::String,
4512
4513    /// Hint for how to order the results
4514    pub order_by: std::string::String,
4515
4516    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4517}
4518
4519impl ListInterconnectsRequest {
4520    pub fn new() -> Self {
4521        std::default::Default::default()
4522    }
4523
4524    /// Sets the value of [parent][crate::model::ListInterconnectsRequest::parent].
4525    ///
4526    /// # Example
4527    /// ```ignore,no_run
4528    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectsRequest;
4529    /// let x = ListInterconnectsRequest::new().set_parent("example");
4530    /// ```
4531    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4532        self.parent = v.into();
4533        self
4534    }
4535
4536    /// Sets the value of [page_size][crate::model::ListInterconnectsRequest::page_size].
4537    ///
4538    /// # Example
4539    /// ```ignore,no_run
4540    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectsRequest;
4541    /// let x = ListInterconnectsRequest::new().set_page_size(42);
4542    /// ```
4543    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4544        self.page_size = v.into();
4545        self
4546    }
4547
4548    /// Sets the value of [page_token][crate::model::ListInterconnectsRequest::page_token].
4549    ///
4550    /// # Example
4551    /// ```ignore,no_run
4552    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectsRequest;
4553    /// let x = ListInterconnectsRequest::new().set_page_token("example");
4554    /// ```
4555    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4556        self.page_token = v.into();
4557        self
4558    }
4559
4560    /// Sets the value of [filter][crate::model::ListInterconnectsRequest::filter].
4561    ///
4562    /// # Example
4563    /// ```ignore,no_run
4564    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectsRequest;
4565    /// let x = ListInterconnectsRequest::new().set_filter("example");
4566    /// ```
4567    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4568        self.filter = v.into();
4569        self
4570    }
4571
4572    /// Sets the value of [order_by][crate::model::ListInterconnectsRequest::order_by].
4573    ///
4574    /// # Example
4575    /// ```ignore,no_run
4576    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectsRequest;
4577    /// let x = ListInterconnectsRequest::new().set_order_by("example");
4578    /// ```
4579    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4580        self.order_by = v.into();
4581        self
4582    }
4583}
4584
4585impl wkt::message::Message for ListInterconnectsRequest {
4586    fn typename() -> &'static str {
4587        "type.googleapis.com/google.cloud.edgenetwork.v1.ListInterconnectsRequest"
4588    }
4589}
4590
4591/// Message for response to listing Interconnects
4592#[derive(Clone, Default, PartialEq)]
4593#[non_exhaustive]
4594pub struct ListInterconnectsResponse {
4595    /// The list of Interconnect
4596    pub interconnects: std::vec::Vec<crate::model::Interconnect>,
4597
4598    /// A token identifying a page of results the server should return.
4599    pub next_page_token: std::string::String,
4600
4601    /// Locations that could not be reached.
4602    pub unreachable: std::vec::Vec<std::string::String>,
4603
4604    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4605}
4606
4607impl ListInterconnectsResponse {
4608    pub fn new() -> Self {
4609        std::default::Default::default()
4610    }
4611
4612    /// Sets the value of [interconnects][crate::model::ListInterconnectsResponse::interconnects].
4613    ///
4614    /// # Example
4615    /// ```ignore,no_run
4616    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectsResponse;
4617    /// use google_cloud_edgenetwork_v1::model::Interconnect;
4618    /// let x = ListInterconnectsResponse::new()
4619    ///     .set_interconnects([
4620    ///         Interconnect::default()/* use setters */,
4621    ///         Interconnect::default()/* use (different) setters */,
4622    ///     ]);
4623    /// ```
4624    pub fn set_interconnects<T, V>(mut self, v: T) -> Self
4625    where
4626        T: std::iter::IntoIterator<Item = V>,
4627        V: std::convert::Into<crate::model::Interconnect>,
4628    {
4629        use std::iter::Iterator;
4630        self.interconnects = v.into_iter().map(|i| i.into()).collect();
4631        self
4632    }
4633
4634    /// Sets the value of [next_page_token][crate::model::ListInterconnectsResponse::next_page_token].
4635    ///
4636    /// # Example
4637    /// ```ignore,no_run
4638    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectsResponse;
4639    /// let x = ListInterconnectsResponse::new().set_next_page_token("example");
4640    /// ```
4641    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4642        self.next_page_token = v.into();
4643        self
4644    }
4645
4646    /// Sets the value of [unreachable][crate::model::ListInterconnectsResponse::unreachable].
4647    ///
4648    /// # Example
4649    /// ```ignore,no_run
4650    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectsResponse;
4651    /// let x = ListInterconnectsResponse::new().set_unreachable(["a", "b", "c"]);
4652    /// ```
4653    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4654    where
4655        T: std::iter::IntoIterator<Item = V>,
4656        V: std::convert::Into<std::string::String>,
4657    {
4658        use std::iter::Iterator;
4659        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4660        self
4661    }
4662}
4663
4664impl wkt::message::Message for ListInterconnectsResponse {
4665    fn typename() -> &'static str {
4666        "type.googleapis.com/google.cloud.edgenetwork.v1.ListInterconnectsResponse"
4667    }
4668}
4669
4670#[doc(hidden)]
4671impl google_cloud_gax::paginator::internal::PageableResponse for ListInterconnectsResponse {
4672    type PageItem = crate::model::Interconnect;
4673
4674    fn items(self) -> std::vec::Vec<Self::PageItem> {
4675        self.interconnects
4676    }
4677
4678    fn next_page_token(&self) -> std::string::String {
4679        use std::clone::Clone;
4680        self.next_page_token.clone()
4681    }
4682}
4683
4684/// Message for getting a Interconnect
4685#[derive(Clone, Default, PartialEq)]
4686#[non_exhaustive]
4687pub struct GetInterconnectRequest {
4688    /// Required. Name of the resource
4689    pub name: std::string::String,
4690
4691    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4692}
4693
4694impl GetInterconnectRequest {
4695    pub fn new() -> Self {
4696        std::default::Default::default()
4697    }
4698
4699    /// Sets the value of [name][crate::model::GetInterconnectRequest::name].
4700    ///
4701    /// # Example
4702    /// ```ignore,no_run
4703    /// # use google_cloud_edgenetwork_v1::model::GetInterconnectRequest;
4704    /// let x = GetInterconnectRequest::new().set_name("example");
4705    /// ```
4706    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4707        self.name = v.into();
4708        self
4709    }
4710}
4711
4712impl wkt::message::Message for GetInterconnectRequest {
4713    fn typename() -> &'static str {
4714        "type.googleapis.com/google.cloud.edgenetwork.v1.GetInterconnectRequest"
4715    }
4716}
4717
4718/// Message for requesting list of InterconnectAttachments
4719#[derive(Clone, Default, PartialEq)]
4720#[non_exhaustive]
4721pub struct ListInterconnectAttachmentsRequest {
4722    /// Required. Parent value for ListInterconnectAttachmentsRequest
4723    pub parent: std::string::String,
4724
4725    /// Requested page size. Server may return fewer items than requested.
4726    /// If unspecified, server will pick an appropriate default.
4727    pub page_size: i32,
4728
4729    /// A token identifying a page of results the server should return.
4730    pub page_token: std::string::String,
4731
4732    /// Filtering results
4733    pub filter: std::string::String,
4734
4735    /// Hint for how to order the results
4736    pub order_by: std::string::String,
4737
4738    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4739}
4740
4741impl ListInterconnectAttachmentsRequest {
4742    pub fn new() -> Self {
4743        std::default::Default::default()
4744    }
4745
4746    /// Sets the value of [parent][crate::model::ListInterconnectAttachmentsRequest::parent].
4747    ///
4748    /// # Example
4749    /// ```ignore,no_run
4750    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectAttachmentsRequest;
4751    /// let x = ListInterconnectAttachmentsRequest::new().set_parent("example");
4752    /// ```
4753    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4754        self.parent = v.into();
4755        self
4756    }
4757
4758    /// Sets the value of [page_size][crate::model::ListInterconnectAttachmentsRequest::page_size].
4759    ///
4760    /// # Example
4761    /// ```ignore,no_run
4762    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectAttachmentsRequest;
4763    /// let x = ListInterconnectAttachmentsRequest::new().set_page_size(42);
4764    /// ```
4765    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4766        self.page_size = v.into();
4767        self
4768    }
4769
4770    /// Sets the value of [page_token][crate::model::ListInterconnectAttachmentsRequest::page_token].
4771    ///
4772    /// # Example
4773    /// ```ignore,no_run
4774    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectAttachmentsRequest;
4775    /// let x = ListInterconnectAttachmentsRequest::new().set_page_token("example");
4776    /// ```
4777    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4778        self.page_token = v.into();
4779        self
4780    }
4781
4782    /// Sets the value of [filter][crate::model::ListInterconnectAttachmentsRequest::filter].
4783    ///
4784    /// # Example
4785    /// ```ignore,no_run
4786    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectAttachmentsRequest;
4787    /// let x = ListInterconnectAttachmentsRequest::new().set_filter("example");
4788    /// ```
4789    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4790        self.filter = v.into();
4791        self
4792    }
4793
4794    /// Sets the value of [order_by][crate::model::ListInterconnectAttachmentsRequest::order_by].
4795    ///
4796    /// # Example
4797    /// ```ignore,no_run
4798    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectAttachmentsRequest;
4799    /// let x = ListInterconnectAttachmentsRequest::new().set_order_by("example");
4800    /// ```
4801    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4802        self.order_by = v.into();
4803        self
4804    }
4805}
4806
4807impl wkt::message::Message for ListInterconnectAttachmentsRequest {
4808    fn typename() -> &'static str {
4809        "type.googleapis.com/google.cloud.edgenetwork.v1.ListInterconnectAttachmentsRequest"
4810    }
4811}
4812
4813/// Message for response to listing InterconnectAttachments
4814#[derive(Clone, Default, PartialEq)]
4815#[non_exhaustive]
4816pub struct ListInterconnectAttachmentsResponse {
4817    /// The list of InterconnectAttachment
4818    pub interconnect_attachments: std::vec::Vec<crate::model::InterconnectAttachment>,
4819
4820    /// A token identifying a page of results the server should return.
4821    pub next_page_token: std::string::String,
4822
4823    /// Locations that could not be reached.
4824    pub unreachable: std::vec::Vec<std::string::String>,
4825
4826    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4827}
4828
4829impl ListInterconnectAttachmentsResponse {
4830    pub fn new() -> Self {
4831        std::default::Default::default()
4832    }
4833
4834    /// Sets the value of [interconnect_attachments][crate::model::ListInterconnectAttachmentsResponse::interconnect_attachments].
4835    ///
4836    /// # Example
4837    /// ```ignore,no_run
4838    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectAttachmentsResponse;
4839    /// use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
4840    /// let x = ListInterconnectAttachmentsResponse::new()
4841    ///     .set_interconnect_attachments([
4842    ///         InterconnectAttachment::default()/* use setters */,
4843    ///         InterconnectAttachment::default()/* use (different) setters */,
4844    ///     ]);
4845    /// ```
4846    pub fn set_interconnect_attachments<T, V>(mut self, v: T) -> Self
4847    where
4848        T: std::iter::IntoIterator<Item = V>,
4849        V: std::convert::Into<crate::model::InterconnectAttachment>,
4850    {
4851        use std::iter::Iterator;
4852        self.interconnect_attachments = v.into_iter().map(|i| i.into()).collect();
4853        self
4854    }
4855
4856    /// Sets the value of [next_page_token][crate::model::ListInterconnectAttachmentsResponse::next_page_token].
4857    ///
4858    /// # Example
4859    /// ```ignore,no_run
4860    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectAttachmentsResponse;
4861    /// let x = ListInterconnectAttachmentsResponse::new().set_next_page_token("example");
4862    /// ```
4863    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4864        self.next_page_token = v.into();
4865        self
4866    }
4867
4868    /// Sets the value of [unreachable][crate::model::ListInterconnectAttachmentsResponse::unreachable].
4869    ///
4870    /// # Example
4871    /// ```ignore,no_run
4872    /// # use google_cloud_edgenetwork_v1::model::ListInterconnectAttachmentsResponse;
4873    /// let x = ListInterconnectAttachmentsResponse::new().set_unreachable(["a", "b", "c"]);
4874    /// ```
4875    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4876    where
4877        T: std::iter::IntoIterator<Item = V>,
4878        V: std::convert::Into<std::string::String>,
4879    {
4880        use std::iter::Iterator;
4881        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4882        self
4883    }
4884}
4885
4886impl wkt::message::Message for ListInterconnectAttachmentsResponse {
4887    fn typename() -> &'static str {
4888        "type.googleapis.com/google.cloud.edgenetwork.v1.ListInterconnectAttachmentsResponse"
4889    }
4890}
4891
4892#[doc(hidden)]
4893impl google_cloud_gax::paginator::internal::PageableResponse
4894    for ListInterconnectAttachmentsResponse
4895{
4896    type PageItem = crate::model::InterconnectAttachment;
4897
4898    fn items(self) -> std::vec::Vec<Self::PageItem> {
4899        self.interconnect_attachments
4900    }
4901
4902    fn next_page_token(&self) -> std::string::String {
4903        use std::clone::Clone;
4904        self.next_page_token.clone()
4905    }
4906}
4907
4908/// Message for getting a InterconnectAttachment
4909#[derive(Clone, Default, PartialEq)]
4910#[non_exhaustive]
4911pub struct GetInterconnectAttachmentRequest {
4912    /// Required. Name of the resource
4913    pub name: std::string::String,
4914
4915    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4916}
4917
4918impl GetInterconnectAttachmentRequest {
4919    pub fn new() -> Self {
4920        std::default::Default::default()
4921    }
4922
4923    /// Sets the value of [name][crate::model::GetInterconnectAttachmentRequest::name].
4924    ///
4925    /// # Example
4926    /// ```ignore,no_run
4927    /// # use google_cloud_edgenetwork_v1::model::GetInterconnectAttachmentRequest;
4928    /// let x = GetInterconnectAttachmentRequest::new().set_name("example");
4929    /// ```
4930    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4931        self.name = v.into();
4932        self
4933    }
4934}
4935
4936impl wkt::message::Message for GetInterconnectAttachmentRequest {
4937    fn typename() -> &'static str {
4938        "type.googleapis.com/google.cloud.edgenetwork.v1.GetInterconnectAttachmentRequest"
4939    }
4940}
4941
4942/// Message for creating a InterconnectAttachment
4943#[derive(Clone, Default, PartialEq)]
4944#[non_exhaustive]
4945pub struct CreateInterconnectAttachmentRequest {
4946    /// Required. Value for parent.
4947    pub parent: std::string::String,
4948
4949    /// Required. Id of the requesting object
4950    /// If auto-generating Id server-side, remove this field and
4951    /// interconnect_attachment_id from the method_signature of Create RPC
4952    pub interconnect_attachment_id: std::string::String,
4953
4954    /// Required. The resource being created
4955    pub interconnect_attachment: std::option::Option<crate::model::InterconnectAttachment>,
4956
4957    /// Optional. An optional request ID to identify requests. Specify a unique
4958    /// request ID so that if you must retry your request, the server will know to
4959    /// ignore the request if it has already been completed. The server will
4960    /// guarantee that for at least 60 minutes since the first request.
4961    ///
4962    /// For example, consider a situation where you make an initial request and
4963    /// the request times out. If you make the request again with the same request
4964    /// ID, the server can check if original operation with the same request ID
4965    /// was received, and if so, will ignore the second request. This prevents
4966    /// clients from accidentally creating duplicate commitments.
4967    ///
4968    /// The request ID must be a valid UUID with the exception that zero UUID is
4969    /// not supported (00000000-0000-0000-0000-000000000000).
4970    pub request_id: std::string::String,
4971
4972    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4973}
4974
4975impl CreateInterconnectAttachmentRequest {
4976    pub fn new() -> Self {
4977        std::default::Default::default()
4978    }
4979
4980    /// Sets the value of [parent][crate::model::CreateInterconnectAttachmentRequest::parent].
4981    ///
4982    /// # Example
4983    /// ```ignore,no_run
4984    /// # use google_cloud_edgenetwork_v1::model::CreateInterconnectAttachmentRequest;
4985    /// let x = CreateInterconnectAttachmentRequest::new().set_parent("example");
4986    /// ```
4987    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4988        self.parent = v.into();
4989        self
4990    }
4991
4992    /// Sets the value of [interconnect_attachment_id][crate::model::CreateInterconnectAttachmentRequest::interconnect_attachment_id].
4993    ///
4994    /// # Example
4995    /// ```ignore,no_run
4996    /// # use google_cloud_edgenetwork_v1::model::CreateInterconnectAttachmentRequest;
4997    /// let x = CreateInterconnectAttachmentRequest::new().set_interconnect_attachment_id("example");
4998    /// ```
4999    pub fn set_interconnect_attachment_id<T: std::convert::Into<std::string::String>>(
5000        mut self,
5001        v: T,
5002    ) -> Self {
5003        self.interconnect_attachment_id = v.into();
5004        self
5005    }
5006
5007    /// Sets the value of [interconnect_attachment][crate::model::CreateInterconnectAttachmentRequest::interconnect_attachment].
5008    ///
5009    /// # Example
5010    /// ```ignore,no_run
5011    /// # use google_cloud_edgenetwork_v1::model::CreateInterconnectAttachmentRequest;
5012    /// use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
5013    /// let x = CreateInterconnectAttachmentRequest::new().set_interconnect_attachment(InterconnectAttachment::default()/* use setters */);
5014    /// ```
5015    pub fn set_interconnect_attachment<T>(mut self, v: T) -> Self
5016    where
5017        T: std::convert::Into<crate::model::InterconnectAttachment>,
5018    {
5019        self.interconnect_attachment = std::option::Option::Some(v.into());
5020        self
5021    }
5022
5023    /// Sets or clears the value of [interconnect_attachment][crate::model::CreateInterconnectAttachmentRequest::interconnect_attachment].
5024    ///
5025    /// # Example
5026    /// ```ignore,no_run
5027    /// # use google_cloud_edgenetwork_v1::model::CreateInterconnectAttachmentRequest;
5028    /// use google_cloud_edgenetwork_v1::model::InterconnectAttachment;
5029    /// let x = CreateInterconnectAttachmentRequest::new().set_or_clear_interconnect_attachment(Some(InterconnectAttachment::default()/* use setters */));
5030    /// let x = CreateInterconnectAttachmentRequest::new().set_or_clear_interconnect_attachment(None::<InterconnectAttachment>);
5031    /// ```
5032    pub fn set_or_clear_interconnect_attachment<T>(mut self, v: std::option::Option<T>) -> Self
5033    where
5034        T: std::convert::Into<crate::model::InterconnectAttachment>,
5035    {
5036        self.interconnect_attachment = v.map(|x| x.into());
5037        self
5038    }
5039
5040    /// Sets the value of [request_id][crate::model::CreateInterconnectAttachmentRequest::request_id].
5041    ///
5042    /// # Example
5043    /// ```ignore,no_run
5044    /// # use google_cloud_edgenetwork_v1::model::CreateInterconnectAttachmentRequest;
5045    /// let x = CreateInterconnectAttachmentRequest::new().set_request_id("example");
5046    /// ```
5047    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5048        self.request_id = v.into();
5049        self
5050    }
5051}
5052
5053impl wkt::message::Message for CreateInterconnectAttachmentRequest {
5054    fn typename() -> &'static str {
5055        "type.googleapis.com/google.cloud.edgenetwork.v1.CreateInterconnectAttachmentRequest"
5056    }
5057}
5058
5059/// Message for deleting a InterconnectAttachment
5060#[derive(Clone, Default, PartialEq)]
5061#[non_exhaustive]
5062pub struct DeleteInterconnectAttachmentRequest {
5063    /// Required. Name of the resource
5064    pub name: std::string::String,
5065
5066    /// Optional. An optional request ID to identify requests. Specify a unique
5067    /// request ID so that if you must retry your request, the server will know to
5068    /// ignore the request if it has already been completed. The server will
5069    /// guarantee that for at least 60 minutes after the first request.
5070    ///
5071    /// For example, consider a situation where you make an initial request and
5072    /// the request times out. If you make the request again with the same request
5073    /// ID, the server can check if original operation with the same request ID
5074    /// was received, and if so, will ignore the second request. This prevents
5075    /// clients from accidentally creating duplicate commitments.
5076    ///
5077    /// The request ID must be a valid UUID with the exception that zero UUID is
5078    /// not supported (00000000-0000-0000-0000-000000000000).
5079    pub request_id: std::string::String,
5080
5081    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5082}
5083
5084impl DeleteInterconnectAttachmentRequest {
5085    pub fn new() -> Self {
5086        std::default::Default::default()
5087    }
5088
5089    /// Sets the value of [name][crate::model::DeleteInterconnectAttachmentRequest::name].
5090    ///
5091    /// # Example
5092    /// ```ignore,no_run
5093    /// # use google_cloud_edgenetwork_v1::model::DeleteInterconnectAttachmentRequest;
5094    /// let x = DeleteInterconnectAttachmentRequest::new().set_name("example");
5095    /// ```
5096    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5097        self.name = v.into();
5098        self
5099    }
5100
5101    /// Sets the value of [request_id][crate::model::DeleteInterconnectAttachmentRequest::request_id].
5102    ///
5103    /// # Example
5104    /// ```ignore,no_run
5105    /// # use google_cloud_edgenetwork_v1::model::DeleteInterconnectAttachmentRequest;
5106    /// let x = DeleteInterconnectAttachmentRequest::new().set_request_id("example");
5107    /// ```
5108    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5109        self.request_id = v.into();
5110        self
5111    }
5112}
5113
5114impl wkt::message::Message for DeleteInterconnectAttachmentRequest {
5115    fn typename() -> &'static str {
5116        "type.googleapis.com/google.cloud.edgenetwork.v1.DeleteInterconnectAttachmentRequest"
5117    }
5118}
5119
5120/// Message for requesting list of Routers
5121#[derive(Clone, Default, PartialEq)]
5122#[non_exhaustive]
5123pub struct ListRoutersRequest {
5124    /// Required. Parent value for ListRoutersRequest
5125    pub parent: std::string::String,
5126
5127    /// Requested page size. Server may return fewer items than requested.
5128    /// If unspecified, server will pick an appropriate default.
5129    pub page_size: i32,
5130
5131    /// A token identifying a page of results the server should return.
5132    pub page_token: std::string::String,
5133
5134    /// Filtering results
5135    pub filter: std::string::String,
5136
5137    /// Hint for how to order the results
5138    pub order_by: std::string::String,
5139
5140    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5141}
5142
5143impl ListRoutersRequest {
5144    pub fn new() -> Self {
5145        std::default::Default::default()
5146    }
5147
5148    /// Sets the value of [parent][crate::model::ListRoutersRequest::parent].
5149    ///
5150    /// # Example
5151    /// ```ignore,no_run
5152    /// # use google_cloud_edgenetwork_v1::model::ListRoutersRequest;
5153    /// let x = ListRoutersRequest::new().set_parent("example");
5154    /// ```
5155    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5156        self.parent = v.into();
5157        self
5158    }
5159
5160    /// Sets the value of [page_size][crate::model::ListRoutersRequest::page_size].
5161    ///
5162    /// # Example
5163    /// ```ignore,no_run
5164    /// # use google_cloud_edgenetwork_v1::model::ListRoutersRequest;
5165    /// let x = ListRoutersRequest::new().set_page_size(42);
5166    /// ```
5167    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5168        self.page_size = v.into();
5169        self
5170    }
5171
5172    /// Sets the value of [page_token][crate::model::ListRoutersRequest::page_token].
5173    ///
5174    /// # Example
5175    /// ```ignore,no_run
5176    /// # use google_cloud_edgenetwork_v1::model::ListRoutersRequest;
5177    /// let x = ListRoutersRequest::new().set_page_token("example");
5178    /// ```
5179    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5180        self.page_token = v.into();
5181        self
5182    }
5183
5184    /// Sets the value of [filter][crate::model::ListRoutersRequest::filter].
5185    ///
5186    /// # Example
5187    /// ```ignore,no_run
5188    /// # use google_cloud_edgenetwork_v1::model::ListRoutersRequest;
5189    /// let x = ListRoutersRequest::new().set_filter("example");
5190    /// ```
5191    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5192        self.filter = v.into();
5193        self
5194    }
5195
5196    /// Sets the value of [order_by][crate::model::ListRoutersRequest::order_by].
5197    ///
5198    /// # Example
5199    /// ```ignore,no_run
5200    /// # use google_cloud_edgenetwork_v1::model::ListRoutersRequest;
5201    /// let x = ListRoutersRequest::new().set_order_by("example");
5202    /// ```
5203    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5204        self.order_by = v.into();
5205        self
5206    }
5207}
5208
5209impl wkt::message::Message for ListRoutersRequest {
5210    fn typename() -> &'static str {
5211        "type.googleapis.com/google.cloud.edgenetwork.v1.ListRoutersRequest"
5212    }
5213}
5214
5215/// Message for response to listing Routers
5216#[derive(Clone, Default, PartialEq)]
5217#[non_exhaustive]
5218pub struct ListRoutersResponse {
5219    /// The list of Router
5220    pub routers: std::vec::Vec<crate::model::Router>,
5221
5222    /// A token identifying a page of results the server should return.
5223    pub next_page_token: std::string::String,
5224
5225    /// Locations that could not be reached.
5226    pub unreachable: std::vec::Vec<std::string::String>,
5227
5228    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5229}
5230
5231impl ListRoutersResponse {
5232    pub fn new() -> Self {
5233        std::default::Default::default()
5234    }
5235
5236    /// Sets the value of [routers][crate::model::ListRoutersResponse::routers].
5237    ///
5238    /// # Example
5239    /// ```ignore,no_run
5240    /// # use google_cloud_edgenetwork_v1::model::ListRoutersResponse;
5241    /// use google_cloud_edgenetwork_v1::model::Router;
5242    /// let x = ListRoutersResponse::new()
5243    ///     .set_routers([
5244    ///         Router::default()/* use setters */,
5245    ///         Router::default()/* use (different) setters */,
5246    ///     ]);
5247    /// ```
5248    pub fn set_routers<T, V>(mut self, v: T) -> Self
5249    where
5250        T: std::iter::IntoIterator<Item = V>,
5251        V: std::convert::Into<crate::model::Router>,
5252    {
5253        use std::iter::Iterator;
5254        self.routers = v.into_iter().map(|i| i.into()).collect();
5255        self
5256    }
5257
5258    /// Sets the value of [next_page_token][crate::model::ListRoutersResponse::next_page_token].
5259    ///
5260    /// # Example
5261    /// ```ignore,no_run
5262    /// # use google_cloud_edgenetwork_v1::model::ListRoutersResponse;
5263    /// let x = ListRoutersResponse::new().set_next_page_token("example");
5264    /// ```
5265    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5266        self.next_page_token = v.into();
5267        self
5268    }
5269
5270    /// Sets the value of [unreachable][crate::model::ListRoutersResponse::unreachable].
5271    ///
5272    /// # Example
5273    /// ```ignore,no_run
5274    /// # use google_cloud_edgenetwork_v1::model::ListRoutersResponse;
5275    /// let x = ListRoutersResponse::new().set_unreachable(["a", "b", "c"]);
5276    /// ```
5277    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5278    where
5279        T: std::iter::IntoIterator<Item = V>,
5280        V: std::convert::Into<std::string::String>,
5281    {
5282        use std::iter::Iterator;
5283        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5284        self
5285    }
5286}
5287
5288impl wkt::message::Message for ListRoutersResponse {
5289    fn typename() -> &'static str {
5290        "type.googleapis.com/google.cloud.edgenetwork.v1.ListRoutersResponse"
5291    }
5292}
5293
5294#[doc(hidden)]
5295impl google_cloud_gax::paginator::internal::PageableResponse for ListRoutersResponse {
5296    type PageItem = crate::model::Router;
5297
5298    fn items(self) -> std::vec::Vec<Self::PageItem> {
5299        self.routers
5300    }
5301
5302    fn next_page_token(&self) -> std::string::String {
5303        use std::clone::Clone;
5304        self.next_page_token.clone()
5305    }
5306}
5307
5308/// Message for getting a Router
5309#[derive(Clone, Default, PartialEq)]
5310#[non_exhaustive]
5311pub struct GetRouterRequest {
5312    /// Required. Name of the resource
5313    pub name: std::string::String,
5314
5315    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5316}
5317
5318impl GetRouterRequest {
5319    pub fn new() -> Self {
5320        std::default::Default::default()
5321    }
5322
5323    /// Sets the value of [name][crate::model::GetRouterRequest::name].
5324    ///
5325    /// # Example
5326    /// ```ignore,no_run
5327    /// # use google_cloud_edgenetwork_v1::model::GetRouterRequest;
5328    /// let x = GetRouterRequest::new().set_name("example");
5329    /// ```
5330    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5331        self.name = v.into();
5332        self
5333    }
5334}
5335
5336impl wkt::message::Message for GetRouterRequest {
5337    fn typename() -> &'static str {
5338        "type.googleapis.com/google.cloud.edgenetwork.v1.GetRouterRequest"
5339    }
5340}
5341
5342/// Message for creating a Router
5343#[derive(Clone, Default, PartialEq)]
5344#[non_exhaustive]
5345pub struct CreateRouterRequest {
5346    /// Required. Value for parent.
5347    pub parent: std::string::String,
5348
5349    /// Required. Id of the requesting object
5350    /// If auto-generating Id server-side, remove this field and
5351    /// router_id from the method_signature of Create RPC
5352    pub router_id: std::string::String,
5353
5354    /// Required. The resource being created
5355    pub router: std::option::Option<crate::model::Router>,
5356
5357    /// Optional. An optional request ID to identify requests. Specify a unique
5358    /// request ID so that if you must retry your request, the server will know to
5359    /// ignore the request if it has already been completed. The server will
5360    /// guarantee that for at least 60 minutes since the first request.
5361    ///
5362    /// For example, consider a situation where you make an initial request and
5363    /// the request times out. If you make the request again with the same request
5364    /// ID, the server can check if original operation with the same request ID
5365    /// was received, and if so, will ignore the second request. This prevents
5366    /// clients from accidentally creating duplicate commitments.
5367    ///
5368    /// The request ID must be a valid UUID with the exception that zero UUID is
5369    /// not supported (00000000-0000-0000-0000-000000000000).
5370    pub request_id: std::string::String,
5371
5372    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5373}
5374
5375impl CreateRouterRequest {
5376    pub fn new() -> Self {
5377        std::default::Default::default()
5378    }
5379
5380    /// Sets the value of [parent][crate::model::CreateRouterRequest::parent].
5381    ///
5382    /// # Example
5383    /// ```ignore,no_run
5384    /// # use google_cloud_edgenetwork_v1::model::CreateRouterRequest;
5385    /// let x = CreateRouterRequest::new().set_parent("example");
5386    /// ```
5387    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5388        self.parent = v.into();
5389        self
5390    }
5391
5392    /// Sets the value of [router_id][crate::model::CreateRouterRequest::router_id].
5393    ///
5394    /// # Example
5395    /// ```ignore,no_run
5396    /// # use google_cloud_edgenetwork_v1::model::CreateRouterRequest;
5397    /// let x = CreateRouterRequest::new().set_router_id("example");
5398    /// ```
5399    pub fn set_router_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5400        self.router_id = v.into();
5401        self
5402    }
5403
5404    /// Sets the value of [router][crate::model::CreateRouterRequest::router].
5405    ///
5406    /// # Example
5407    /// ```ignore,no_run
5408    /// # use google_cloud_edgenetwork_v1::model::CreateRouterRequest;
5409    /// use google_cloud_edgenetwork_v1::model::Router;
5410    /// let x = CreateRouterRequest::new().set_router(Router::default()/* use setters */);
5411    /// ```
5412    pub fn set_router<T>(mut self, v: T) -> Self
5413    where
5414        T: std::convert::Into<crate::model::Router>,
5415    {
5416        self.router = std::option::Option::Some(v.into());
5417        self
5418    }
5419
5420    /// Sets or clears the value of [router][crate::model::CreateRouterRequest::router].
5421    ///
5422    /// # Example
5423    /// ```ignore,no_run
5424    /// # use google_cloud_edgenetwork_v1::model::CreateRouterRequest;
5425    /// use google_cloud_edgenetwork_v1::model::Router;
5426    /// let x = CreateRouterRequest::new().set_or_clear_router(Some(Router::default()/* use setters */));
5427    /// let x = CreateRouterRequest::new().set_or_clear_router(None::<Router>);
5428    /// ```
5429    pub fn set_or_clear_router<T>(mut self, v: std::option::Option<T>) -> Self
5430    where
5431        T: std::convert::Into<crate::model::Router>,
5432    {
5433        self.router = v.map(|x| x.into());
5434        self
5435    }
5436
5437    /// Sets the value of [request_id][crate::model::CreateRouterRequest::request_id].
5438    ///
5439    /// # Example
5440    /// ```ignore,no_run
5441    /// # use google_cloud_edgenetwork_v1::model::CreateRouterRequest;
5442    /// let x = CreateRouterRequest::new().set_request_id("example");
5443    /// ```
5444    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5445        self.request_id = v.into();
5446        self
5447    }
5448}
5449
5450impl wkt::message::Message for CreateRouterRequest {
5451    fn typename() -> &'static str {
5452        "type.googleapis.com/google.cloud.edgenetwork.v1.CreateRouterRequest"
5453    }
5454}
5455
5456/// Message for updating a Router
5457#[derive(Clone, Default, PartialEq)]
5458#[non_exhaustive]
5459pub struct UpdateRouterRequest {
5460    /// Required. Field mask is used to specify the fields to be overwritten in the
5461    /// Router resource by the update.
5462    /// The fields specified in the update_mask are relative to the resource, not
5463    /// the full request. A field will be overwritten if it is in the mask. If the
5464    /// user does not provide a mask then all fields will be overwritten.
5465    pub update_mask: std::option::Option<wkt::FieldMask>,
5466
5467    /// Required. The resource being updated
5468    pub router: std::option::Option<crate::model::Router>,
5469
5470    /// Optional. An optional request ID to identify requests. Specify a unique
5471    /// request ID so that if you must retry your request, the server will know to
5472    /// ignore the request if it has already been completed. The server will
5473    /// guarantee that for at least 60 minutes since the first request.
5474    ///
5475    /// For example, consider a situation where you make an initial request and
5476    /// the request times out. If you make the request again with the same request
5477    /// ID, the server can check if original operation with the same request ID
5478    /// was received, and if so, will ignore the second request. This prevents
5479    /// clients from accidentally creating duplicate commitments.
5480    ///
5481    /// The request ID must be a valid UUID with the exception that zero UUID is
5482    /// not supported (00000000-0000-0000-0000-000000000000).
5483    pub request_id: std::string::String,
5484
5485    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5486}
5487
5488impl UpdateRouterRequest {
5489    pub fn new() -> Self {
5490        std::default::Default::default()
5491    }
5492
5493    /// Sets the value of [update_mask][crate::model::UpdateRouterRequest::update_mask].
5494    ///
5495    /// # Example
5496    /// ```ignore,no_run
5497    /// # use google_cloud_edgenetwork_v1::model::UpdateRouterRequest;
5498    /// use wkt::FieldMask;
5499    /// let x = UpdateRouterRequest::new().set_update_mask(FieldMask::default()/* use setters */);
5500    /// ```
5501    pub fn set_update_mask<T>(mut self, v: T) -> Self
5502    where
5503        T: std::convert::Into<wkt::FieldMask>,
5504    {
5505        self.update_mask = std::option::Option::Some(v.into());
5506        self
5507    }
5508
5509    /// Sets or clears the value of [update_mask][crate::model::UpdateRouterRequest::update_mask].
5510    ///
5511    /// # Example
5512    /// ```ignore,no_run
5513    /// # use google_cloud_edgenetwork_v1::model::UpdateRouterRequest;
5514    /// use wkt::FieldMask;
5515    /// let x = UpdateRouterRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5516    /// let x = UpdateRouterRequest::new().set_or_clear_update_mask(None::<FieldMask>);
5517    /// ```
5518    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5519    where
5520        T: std::convert::Into<wkt::FieldMask>,
5521    {
5522        self.update_mask = v.map(|x| x.into());
5523        self
5524    }
5525
5526    /// Sets the value of [router][crate::model::UpdateRouterRequest::router].
5527    ///
5528    /// # Example
5529    /// ```ignore,no_run
5530    /// # use google_cloud_edgenetwork_v1::model::UpdateRouterRequest;
5531    /// use google_cloud_edgenetwork_v1::model::Router;
5532    /// let x = UpdateRouterRequest::new().set_router(Router::default()/* use setters */);
5533    /// ```
5534    pub fn set_router<T>(mut self, v: T) -> Self
5535    where
5536        T: std::convert::Into<crate::model::Router>,
5537    {
5538        self.router = std::option::Option::Some(v.into());
5539        self
5540    }
5541
5542    /// Sets or clears the value of [router][crate::model::UpdateRouterRequest::router].
5543    ///
5544    /// # Example
5545    /// ```ignore,no_run
5546    /// # use google_cloud_edgenetwork_v1::model::UpdateRouterRequest;
5547    /// use google_cloud_edgenetwork_v1::model::Router;
5548    /// let x = UpdateRouterRequest::new().set_or_clear_router(Some(Router::default()/* use setters */));
5549    /// let x = UpdateRouterRequest::new().set_or_clear_router(None::<Router>);
5550    /// ```
5551    pub fn set_or_clear_router<T>(mut self, v: std::option::Option<T>) -> Self
5552    where
5553        T: std::convert::Into<crate::model::Router>,
5554    {
5555        self.router = v.map(|x| x.into());
5556        self
5557    }
5558
5559    /// Sets the value of [request_id][crate::model::UpdateRouterRequest::request_id].
5560    ///
5561    /// # Example
5562    /// ```ignore,no_run
5563    /// # use google_cloud_edgenetwork_v1::model::UpdateRouterRequest;
5564    /// let x = UpdateRouterRequest::new().set_request_id("example");
5565    /// ```
5566    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5567        self.request_id = v.into();
5568        self
5569    }
5570}
5571
5572impl wkt::message::Message for UpdateRouterRequest {
5573    fn typename() -> &'static str {
5574        "type.googleapis.com/google.cloud.edgenetwork.v1.UpdateRouterRequest"
5575    }
5576}
5577
5578/// Message for deleting a Router
5579#[derive(Clone, Default, PartialEq)]
5580#[non_exhaustive]
5581pub struct DeleteRouterRequest {
5582    /// Required. Name of the resource
5583    pub name: std::string::String,
5584
5585    /// Optional. An optional request ID to identify requests. Specify a unique
5586    /// request ID so that if you must retry your request, the server will know to
5587    /// ignore the request if it has already been completed. The server will
5588    /// guarantee that for at least 60 minutes after the first request.
5589    ///
5590    /// For example, consider a situation where you make an initial request and
5591    /// the request times out. If you make the request again with the same request
5592    /// ID, the server can check if original operation with the same request ID
5593    /// was received, and if so, will ignore the second request. This prevents
5594    /// clients from accidentally creating duplicate commitments.
5595    ///
5596    /// The request ID must be a valid UUID with the exception that zero UUID is
5597    /// not supported (00000000-0000-0000-0000-000000000000).
5598    pub request_id: std::string::String,
5599
5600    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5601}
5602
5603impl DeleteRouterRequest {
5604    pub fn new() -> Self {
5605        std::default::Default::default()
5606    }
5607
5608    /// Sets the value of [name][crate::model::DeleteRouterRequest::name].
5609    ///
5610    /// # Example
5611    /// ```ignore,no_run
5612    /// # use google_cloud_edgenetwork_v1::model::DeleteRouterRequest;
5613    /// let x = DeleteRouterRequest::new().set_name("example");
5614    /// ```
5615    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5616        self.name = v.into();
5617        self
5618    }
5619
5620    /// Sets the value of [request_id][crate::model::DeleteRouterRequest::request_id].
5621    ///
5622    /// # Example
5623    /// ```ignore,no_run
5624    /// # use google_cloud_edgenetwork_v1::model::DeleteRouterRequest;
5625    /// let x = DeleteRouterRequest::new().set_request_id("example");
5626    /// ```
5627    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5628        self.request_id = v.into();
5629        self
5630    }
5631}
5632
5633impl wkt::message::Message for DeleteRouterRequest {
5634    fn typename() -> &'static str {
5635        "type.googleapis.com/google.cloud.edgenetwork.v1.DeleteRouterRequest"
5636    }
5637}
5638
5639/// Represents the metadata of the long-running operation.
5640#[derive(Clone, Default, PartialEq)]
5641#[non_exhaustive]
5642pub struct OperationMetadata {
5643    /// Output only. The time the operation was created.
5644    pub create_time: std::option::Option<wkt::Timestamp>,
5645
5646    /// Output only. The time the operation finished running.
5647    pub end_time: std::option::Option<wkt::Timestamp>,
5648
5649    /// Output only. Server-defined resource path for the target of the operation.
5650    pub target: std::string::String,
5651
5652    /// Output only. Name of the verb executed by the operation.
5653    pub verb: std::string::String,
5654
5655    /// Output only. Human-readable status of the operation, if any.
5656    pub status_message: std::string::String,
5657
5658    /// Output only. Identifies whether the user has requested cancellation
5659    /// of the operation. Operations that have been cancelled successfully
5660    /// have [Operation.error][] value with a
5661    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
5662    /// `Code.CANCELLED`.
5663    ///
5664    /// [google.rpc.Status.code]: google_cloud_rpc::model::Status::code
5665    pub requested_cancellation: bool,
5666
5667    /// Output only. API version used to start the operation.
5668    pub api_version: std::string::String,
5669
5670    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5671}
5672
5673impl OperationMetadata {
5674    pub fn new() -> Self {
5675        std::default::Default::default()
5676    }
5677
5678    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
5679    ///
5680    /// # Example
5681    /// ```ignore,no_run
5682    /// # use google_cloud_edgenetwork_v1::model::OperationMetadata;
5683    /// use wkt::Timestamp;
5684    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
5685    /// ```
5686    pub fn set_create_time<T>(mut self, v: T) -> Self
5687    where
5688        T: std::convert::Into<wkt::Timestamp>,
5689    {
5690        self.create_time = std::option::Option::Some(v.into());
5691        self
5692    }
5693
5694    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
5695    ///
5696    /// # Example
5697    /// ```ignore,no_run
5698    /// # use google_cloud_edgenetwork_v1::model::OperationMetadata;
5699    /// use wkt::Timestamp;
5700    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
5701    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
5702    /// ```
5703    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
5704    where
5705        T: std::convert::Into<wkt::Timestamp>,
5706    {
5707        self.create_time = v.map(|x| x.into());
5708        self
5709    }
5710
5711    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
5712    ///
5713    /// # Example
5714    /// ```ignore,no_run
5715    /// # use google_cloud_edgenetwork_v1::model::OperationMetadata;
5716    /// use wkt::Timestamp;
5717    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
5718    /// ```
5719    pub fn set_end_time<T>(mut self, v: T) -> Self
5720    where
5721        T: std::convert::Into<wkt::Timestamp>,
5722    {
5723        self.end_time = std::option::Option::Some(v.into());
5724        self
5725    }
5726
5727    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
5728    ///
5729    /// # Example
5730    /// ```ignore,no_run
5731    /// # use google_cloud_edgenetwork_v1::model::OperationMetadata;
5732    /// use wkt::Timestamp;
5733    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
5734    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
5735    /// ```
5736    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
5737    where
5738        T: std::convert::Into<wkt::Timestamp>,
5739    {
5740        self.end_time = v.map(|x| x.into());
5741        self
5742    }
5743
5744    /// Sets the value of [target][crate::model::OperationMetadata::target].
5745    ///
5746    /// # Example
5747    /// ```ignore,no_run
5748    /// # use google_cloud_edgenetwork_v1::model::OperationMetadata;
5749    /// let x = OperationMetadata::new().set_target("example");
5750    /// ```
5751    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5752        self.target = v.into();
5753        self
5754    }
5755
5756    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
5757    ///
5758    /// # Example
5759    /// ```ignore,no_run
5760    /// # use google_cloud_edgenetwork_v1::model::OperationMetadata;
5761    /// let x = OperationMetadata::new().set_verb("example");
5762    /// ```
5763    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5764        self.verb = v.into();
5765        self
5766    }
5767
5768    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
5769    ///
5770    /// # Example
5771    /// ```ignore,no_run
5772    /// # use google_cloud_edgenetwork_v1::model::OperationMetadata;
5773    /// let x = OperationMetadata::new().set_status_message("example");
5774    /// ```
5775    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5776        self.status_message = v.into();
5777        self
5778    }
5779
5780    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
5781    ///
5782    /// # Example
5783    /// ```ignore,no_run
5784    /// # use google_cloud_edgenetwork_v1::model::OperationMetadata;
5785    /// let x = OperationMetadata::new().set_requested_cancellation(true);
5786    /// ```
5787    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
5788        self.requested_cancellation = v.into();
5789        self
5790    }
5791
5792    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
5793    ///
5794    /// # Example
5795    /// ```ignore,no_run
5796    /// # use google_cloud_edgenetwork_v1::model::OperationMetadata;
5797    /// let x = OperationMetadata::new().set_api_version("example");
5798    /// ```
5799    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5800        self.api_version = v.into();
5801        self
5802    }
5803}
5804
5805impl wkt::message::Message for OperationMetadata {
5806    fn typename() -> &'static str {
5807        "type.googleapis.com/google.cloud.edgenetwork.v1.OperationMetadata"
5808    }
5809}
5810
5811/// Message for requesting the diagnostics of a network within a specific zone.
5812#[derive(Clone, Default, PartialEq)]
5813#[non_exhaustive]
5814pub struct DiagnoseNetworkRequest {
5815    /// Required. The name of the network resource.
5816    pub name: std::string::String,
5817
5818    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5819}
5820
5821impl DiagnoseNetworkRequest {
5822    pub fn new() -> Self {
5823        std::default::Default::default()
5824    }
5825
5826    /// Sets the value of [name][crate::model::DiagnoseNetworkRequest::name].
5827    ///
5828    /// # Example
5829    /// ```ignore,no_run
5830    /// # use google_cloud_edgenetwork_v1::model::DiagnoseNetworkRequest;
5831    /// let x = DiagnoseNetworkRequest::new().set_name("example");
5832    /// ```
5833    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5834        self.name = v.into();
5835        self
5836    }
5837}
5838
5839impl wkt::message::Message for DiagnoseNetworkRequest {
5840    fn typename() -> &'static str {
5841        "type.googleapis.com/google.cloud.edgenetwork.v1.DiagnoseNetworkRequest"
5842    }
5843}
5844
5845/// DiagnoseNetworkResponse contains the current status for a specific network.
5846#[derive(Clone, Default, PartialEq)]
5847#[non_exhaustive]
5848pub struct DiagnoseNetworkResponse {
5849    /// The time when the network status was last updated.
5850    pub update_time: std::option::Option<wkt::Timestamp>,
5851
5852    /// The network status of a specific network.
5853    pub result: std::option::Option<crate::model::diagnose_network_response::NetworkStatus>,
5854
5855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5856}
5857
5858impl DiagnoseNetworkResponse {
5859    pub fn new() -> Self {
5860        std::default::Default::default()
5861    }
5862
5863    /// Sets the value of [update_time][crate::model::DiagnoseNetworkResponse::update_time].
5864    ///
5865    /// # Example
5866    /// ```ignore,no_run
5867    /// # use google_cloud_edgenetwork_v1::model::DiagnoseNetworkResponse;
5868    /// use wkt::Timestamp;
5869    /// let x = DiagnoseNetworkResponse::new().set_update_time(Timestamp::default()/* use setters */);
5870    /// ```
5871    pub fn set_update_time<T>(mut self, v: T) -> Self
5872    where
5873        T: std::convert::Into<wkt::Timestamp>,
5874    {
5875        self.update_time = std::option::Option::Some(v.into());
5876        self
5877    }
5878
5879    /// Sets or clears the value of [update_time][crate::model::DiagnoseNetworkResponse::update_time].
5880    ///
5881    /// # Example
5882    /// ```ignore,no_run
5883    /// # use google_cloud_edgenetwork_v1::model::DiagnoseNetworkResponse;
5884    /// use wkt::Timestamp;
5885    /// let x = DiagnoseNetworkResponse::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
5886    /// let x = DiagnoseNetworkResponse::new().set_or_clear_update_time(None::<Timestamp>);
5887    /// ```
5888    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
5889    where
5890        T: std::convert::Into<wkt::Timestamp>,
5891    {
5892        self.update_time = v.map(|x| x.into());
5893        self
5894    }
5895
5896    /// Sets the value of [result][crate::model::DiagnoseNetworkResponse::result].
5897    ///
5898    /// # Example
5899    /// ```ignore,no_run
5900    /// # use google_cloud_edgenetwork_v1::model::DiagnoseNetworkResponse;
5901    /// use google_cloud_edgenetwork_v1::model::diagnose_network_response::NetworkStatus;
5902    /// let x = DiagnoseNetworkResponse::new().set_result(NetworkStatus::default()/* use setters */);
5903    /// ```
5904    pub fn set_result<T>(mut self, v: T) -> Self
5905    where
5906        T: std::convert::Into<crate::model::diagnose_network_response::NetworkStatus>,
5907    {
5908        self.result = std::option::Option::Some(v.into());
5909        self
5910    }
5911
5912    /// Sets or clears the value of [result][crate::model::DiagnoseNetworkResponse::result].
5913    ///
5914    /// # Example
5915    /// ```ignore,no_run
5916    /// # use google_cloud_edgenetwork_v1::model::DiagnoseNetworkResponse;
5917    /// use google_cloud_edgenetwork_v1::model::diagnose_network_response::NetworkStatus;
5918    /// let x = DiagnoseNetworkResponse::new().set_or_clear_result(Some(NetworkStatus::default()/* use setters */));
5919    /// let x = DiagnoseNetworkResponse::new().set_or_clear_result(None::<NetworkStatus>);
5920    /// ```
5921    pub fn set_or_clear_result<T>(mut self, v: std::option::Option<T>) -> Self
5922    where
5923        T: std::convert::Into<crate::model::diagnose_network_response::NetworkStatus>,
5924    {
5925        self.result = v.map(|x| x.into());
5926        self
5927    }
5928}
5929
5930impl wkt::message::Message for DiagnoseNetworkResponse {
5931    fn typename() -> &'static str {
5932        "type.googleapis.com/google.cloud.edgenetwork.v1.DiagnoseNetworkResponse"
5933    }
5934}
5935
5936/// Defines additional types related to [DiagnoseNetworkResponse].
5937pub mod diagnose_network_response {
5938    #[allow(unused_imports)]
5939    use super::*;
5940
5941    /// NetworkStatus has a list of status for the subnets under the current
5942    /// network.
5943    #[derive(Clone, Default, PartialEq)]
5944    #[non_exhaustive]
5945    pub struct NetworkStatus {
5946        /// A list of status for the subnets under the current network.
5947        pub subnet_status: std::vec::Vec<crate::model::SubnetStatus>,
5948
5949        /// The MACsec status of internal links.
5950        pub macsec_status_internal_links:
5951            crate::model::diagnose_network_response::network_status::MacsecStatus,
5952
5953        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5954    }
5955
5956    impl NetworkStatus {
5957        pub fn new() -> Self {
5958            std::default::Default::default()
5959        }
5960
5961        /// Sets the value of [subnet_status][crate::model::diagnose_network_response::NetworkStatus::subnet_status].
5962        ///
5963        /// # Example
5964        /// ```ignore,no_run
5965        /// # use google_cloud_edgenetwork_v1::model::diagnose_network_response::NetworkStatus;
5966        /// use google_cloud_edgenetwork_v1::model::SubnetStatus;
5967        /// let x = NetworkStatus::new()
5968        ///     .set_subnet_status([
5969        ///         SubnetStatus::default()/* use setters */,
5970        ///         SubnetStatus::default()/* use (different) setters */,
5971        ///     ]);
5972        /// ```
5973        pub fn set_subnet_status<T, V>(mut self, v: T) -> Self
5974        where
5975            T: std::iter::IntoIterator<Item = V>,
5976            V: std::convert::Into<crate::model::SubnetStatus>,
5977        {
5978            use std::iter::Iterator;
5979            self.subnet_status = v.into_iter().map(|i| i.into()).collect();
5980            self
5981        }
5982
5983        /// Sets the value of [macsec_status_internal_links][crate::model::diagnose_network_response::NetworkStatus::macsec_status_internal_links].
5984        ///
5985        /// # Example
5986        /// ```ignore,no_run
5987        /// # use google_cloud_edgenetwork_v1::model::diagnose_network_response::NetworkStatus;
5988        /// use google_cloud_edgenetwork_v1::model::diagnose_network_response::network_status::MacsecStatus;
5989        /// let x0 = NetworkStatus::new().set_macsec_status_internal_links(MacsecStatus::Secure);
5990        /// let x1 = NetworkStatus::new().set_macsec_status_internal_links(MacsecStatus::Unsecure);
5991        /// ```
5992        pub fn set_macsec_status_internal_links<
5993            T: std::convert::Into<
5994                    crate::model::diagnose_network_response::network_status::MacsecStatus,
5995                >,
5996        >(
5997            mut self,
5998            v: T,
5999        ) -> Self {
6000            self.macsec_status_internal_links = v.into();
6001            self
6002        }
6003    }
6004
6005    impl wkt::message::Message for NetworkStatus {
6006        fn typename() -> &'static str {
6007            "type.googleapis.com/google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus"
6008        }
6009    }
6010
6011    /// Defines additional types related to [NetworkStatus].
6012    pub mod network_status {
6013        #[allow(unused_imports)]
6014        use super::*;
6015
6016        /// Denotes the status of MACsec sessions for the links of a zone.
6017        ///
6018        /// # Working with unknown values
6019        ///
6020        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6021        /// additional enum variants at any time. Adding new variants is not considered
6022        /// a breaking change. Applications should write their code in anticipation of:
6023        ///
6024        /// - New values appearing in future releases of the client library, **and**
6025        /// - New values received dynamically, without application changes.
6026        ///
6027        /// Please consult the [Working with enums] section in the user guide for some
6028        /// guidelines.
6029        ///
6030        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6031        #[derive(Clone, Debug, PartialEq)]
6032        #[non_exhaustive]
6033        pub enum MacsecStatus {
6034            /// MACsec status not specified, likely due to missing metrics.
6035            Unspecified,
6036            /// All relevant links have at least one MACsec session up.
6037            Secure,
6038            /// At least one relevant link does not have any MACsec sessions up.
6039            Unsecure,
6040            /// If set, the enum was initialized with an unknown value.
6041            ///
6042            /// Applications can examine the value using [MacsecStatus::value] or
6043            /// [MacsecStatus::name].
6044            UnknownValue(macsec_status::UnknownValue),
6045        }
6046
6047        #[doc(hidden)]
6048        pub mod macsec_status {
6049            #[allow(unused_imports)]
6050            use super::*;
6051            #[derive(Clone, Debug, PartialEq)]
6052            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6053        }
6054
6055        impl MacsecStatus {
6056            /// Gets the enum value.
6057            ///
6058            /// Returns `None` if the enum contains an unknown value deserialized from
6059            /// the string representation of enums.
6060            pub fn value(&self) -> std::option::Option<i32> {
6061                match self {
6062                    Self::Unspecified => std::option::Option::Some(0),
6063                    Self::Secure => std::option::Option::Some(1),
6064                    Self::Unsecure => std::option::Option::Some(2),
6065                    Self::UnknownValue(u) => u.0.value(),
6066                }
6067            }
6068
6069            /// Gets the enum value as a string.
6070            ///
6071            /// Returns `None` if the enum contains an unknown value deserialized from
6072            /// the integer representation of enums.
6073            pub fn name(&self) -> std::option::Option<&str> {
6074                match self {
6075                    Self::Unspecified => std::option::Option::Some("MACSEC_STATUS_UNSPECIFIED"),
6076                    Self::Secure => std::option::Option::Some("SECURE"),
6077                    Self::Unsecure => std::option::Option::Some("UNSECURE"),
6078                    Self::UnknownValue(u) => u.0.name(),
6079                }
6080            }
6081        }
6082
6083        impl std::default::Default for MacsecStatus {
6084            fn default() -> Self {
6085                use std::convert::From;
6086                Self::from(0)
6087            }
6088        }
6089
6090        impl std::fmt::Display for MacsecStatus {
6091            fn fmt(
6092                &self,
6093                f: &mut std::fmt::Formatter<'_>,
6094            ) -> std::result::Result<(), std::fmt::Error> {
6095                wkt::internal::display_enum(f, self.name(), self.value())
6096            }
6097        }
6098
6099        impl std::convert::From<i32> for MacsecStatus {
6100            fn from(value: i32) -> Self {
6101                match value {
6102                    0 => Self::Unspecified,
6103                    1 => Self::Secure,
6104                    2 => Self::Unsecure,
6105                    _ => Self::UnknownValue(macsec_status::UnknownValue(
6106                        wkt::internal::UnknownEnumValue::Integer(value),
6107                    )),
6108                }
6109            }
6110        }
6111
6112        impl std::convert::From<&str> for MacsecStatus {
6113            fn from(value: &str) -> Self {
6114                use std::string::ToString;
6115                match value {
6116                    "MACSEC_STATUS_UNSPECIFIED" => Self::Unspecified,
6117                    "SECURE" => Self::Secure,
6118                    "UNSECURE" => Self::Unsecure,
6119                    _ => Self::UnknownValue(macsec_status::UnknownValue(
6120                        wkt::internal::UnknownEnumValue::String(value.to_string()),
6121                    )),
6122                }
6123            }
6124        }
6125
6126        impl serde::ser::Serialize for MacsecStatus {
6127            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6128            where
6129                S: serde::Serializer,
6130            {
6131                match self {
6132                    Self::Unspecified => serializer.serialize_i32(0),
6133                    Self::Secure => serializer.serialize_i32(1),
6134                    Self::Unsecure => serializer.serialize_i32(2),
6135                    Self::UnknownValue(u) => u.0.serialize(serializer),
6136                }
6137            }
6138        }
6139
6140        impl<'de> serde::de::Deserialize<'de> for MacsecStatus {
6141            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6142            where
6143                D: serde::Deserializer<'de>,
6144            {
6145                deserializer.deserialize_any(wkt::internal::EnumVisitor::<MacsecStatus>::new(
6146                    ".google.cloud.edgenetwork.v1.DiagnoseNetworkResponse.NetworkStatus.MacsecStatus"))
6147            }
6148        }
6149    }
6150}
6151
6152/// Message for requesting the diagnostics of an interconnect within a specific
6153/// zone.
6154#[derive(Clone, Default, PartialEq)]
6155#[non_exhaustive]
6156pub struct DiagnoseInterconnectRequest {
6157    /// Required. The name of the interconnect resource.
6158    pub name: std::string::String,
6159
6160    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6161}
6162
6163impl DiagnoseInterconnectRequest {
6164    pub fn new() -> Self {
6165        std::default::Default::default()
6166    }
6167
6168    /// Sets the value of [name][crate::model::DiagnoseInterconnectRequest::name].
6169    ///
6170    /// # Example
6171    /// ```ignore,no_run
6172    /// # use google_cloud_edgenetwork_v1::model::DiagnoseInterconnectRequest;
6173    /// let x = DiagnoseInterconnectRequest::new().set_name("example");
6174    /// ```
6175    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6176        self.name = v.into();
6177        self
6178    }
6179}
6180
6181impl wkt::message::Message for DiagnoseInterconnectRequest {
6182    fn typename() -> &'static str {
6183        "type.googleapis.com/google.cloud.edgenetwork.v1.DiagnoseInterconnectRequest"
6184    }
6185}
6186
6187/// DiagnoseInterconnectResponse contains the current diagnostics for a
6188/// specific interconnect.
6189#[derive(Clone, Default, PartialEq)]
6190#[non_exhaustive]
6191pub struct DiagnoseInterconnectResponse {
6192    /// The time when the interconnect diagnostics was last updated.
6193    pub update_time: std::option::Option<wkt::Timestamp>,
6194
6195    /// The network status of a specific interconnect.
6196    pub result: std::option::Option<crate::model::InterconnectDiagnostics>,
6197
6198    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6199}
6200
6201impl DiagnoseInterconnectResponse {
6202    pub fn new() -> Self {
6203        std::default::Default::default()
6204    }
6205
6206    /// Sets the value of [update_time][crate::model::DiagnoseInterconnectResponse::update_time].
6207    ///
6208    /// # Example
6209    /// ```ignore,no_run
6210    /// # use google_cloud_edgenetwork_v1::model::DiagnoseInterconnectResponse;
6211    /// use wkt::Timestamp;
6212    /// let x = DiagnoseInterconnectResponse::new().set_update_time(Timestamp::default()/* use setters */);
6213    /// ```
6214    pub fn set_update_time<T>(mut self, v: T) -> Self
6215    where
6216        T: std::convert::Into<wkt::Timestamp>,
6217    {
6218        self.update_time = std::option::Option::Some(v.into());
6219        self
6220    }
6221
6222    /// Sets or clears the value of [update_time][crate::model::DiagnoseInterconnectResponse::update_time].
6223    ///
6224    /// # Example
6225    /// ```ignore,no_run
6226    /// # use google_cloud_edgenetwork_v1::model::DiagnoseInterconnectResponse;
6227    /// use wkt::Timestamp;
6228    /// let x = DiagnoseInterconnectResponse::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
6229    /// let x = DiagnoseInterconnectResponse::new().set_or_clear_update_time(None::<Timestamp>);
6230    /// ```
6231    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6232    where
6233        T: std::convert::Into<wkt::Timestamp>,
6234    {
6235        self.update_time = v.map(|x| x.into());
6236        self
6237    }
6238
6239    /// Sets the value of [result][crate::model::DiagnoseInterconnectResponse::result].
6240    ///
6241    /// # Example
6242    /// ```ignore,no_run
6243    /// # use google_cloud_edgenetwork_v1::model::DiagnoseInterconnectResponse;
6244    /// use google_cloud_edgenetwork_v1::model::InterconnectDiagnostics;
6245    /// let x = DiagnoseInterconnectResponse::new().set_result(InterconnectDiagnostics::default()/* use setters */);
6246    /// ```
6247    pub fn set_result<T>(mut self, v: T) -> Self
6248    where
6249        T: std::convert::Into<crate::model::InterconnectDiagnostics>,
6250    {
6251        self.result = std::option::Option::Some(v.into());
6252        self
6253    }
6254
6255    /// Sets or clears the value of [result][crate::model::DiagnoseInterconnectResponse::result].
6256    ///
6257    /// # Example
6258    /// ```ignore,no_run
6259    /// # use google_cloud_edgenetwork_v1::model::DiagnoseInterconnectResponse;
6260    /// use google_cloud_edgenetwork_v1::model::InterconnectDiagnostics;
6261    /// let x = DiagnoseInterconnectResponse::new().set_or_clear_result(Some(InterconnectDiagnostics::default()/* use setters */));
6262    /// let x = DiagnoseInterconnectResponse::new().set_or_clear_result(None::<InterconnectDiagnostics>);
6263    /// ```
6264    pub fn set_or_clear_result<T>(mut self, v: std::option::Option<T>) -> Self
6265    where
6266        T: std::convert::Into<crate::model::InterconnectDiagnostics>,
6267    {
6268        self.result = v.map(|x| x.into());
6269        self
6270    }
6271}
6272
6273impl wkt::message::Message for DiagnoseInterconnectResponse {
6274    fn typename() -> &'static str {
6275        "type.googleapis.com/google.cloud.edgenetwork.v1.DiagnoseInterconnectResponse"
6276    }
6277}
6278
6279/// Message for requesting diagnostics of a router within a specific zone.
6280#[derive(Clone, Default, PartialEq)]
6281#[non_exhaustive]
6282pub struct DiagnoseRouterRequest {
6283    /// Required. The name of the router resource.
6284    pub name: std::string::String,
6285
6286    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6287}
6288
6289impl DiagnoseRouterRequest {
6290    pub fn new() -> Self {
6291        std::default::Default::default()
6292    }
6293
6294    /// Sets the value of [name][crate::model::DiagnoseRouterRequest::name].
6295    ///
6296    /// # Example
6297    /// ```ignore,no_run
6298    /// # use google_cloud_edgenetwork_v1::model::DiagnoseRouterRequest;
6299    /// let x = DiagnoseRouterRequest::new().set_name("example");
6300    /// ```
6301    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6302        self.name = v.into();
6303        self
6304    }
6305}
6306
6307impl wkt::message::Message for DiagnoseRouterRequest {
6308    fn typename() -> &'static str {
6309        "type.googleapis.com/google.cloud.edgenetwork.v1.DiagnoseRouterRequest"
6310    }
6311}
6312
6313/// DiagnoseRouterResponse contains the current status for a specific router.
6314#[derive(Clone, Default, PartialEq)]
6315#[non_exhaustive]
6316pub struct DiagnoseRouterResponse {
6317    /// The time when the router status was last updated.
6318    pub update_time: std::option::Option<wkt::Timestamp>,
6319
6320    /// The network status of a specific router.
6321    pub result: std::option::Option<crate::model::RouterStatus>,
6322
6323    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6324}
6325
6326impl DiagnoseRouterResponse {
6327    pub fn new() -> Self {
6328        std::default::Default::default()
6329    }
6330
6331    /// Sets the value of [update_time][crate::model::DiagnoseRouterResponse::update_time].
6332    ///
6333    /// # Example
6334    /// ```ignore,no_run
6335    /// # use google_cloud_edgenetwork_v1::model::DiagnoseRouterResponse;
6336    /// use wkt::Timestamp;
6337    /// let x = DiagnoseRouterResponse::new().set_update_time(Timestamp::default()/* use setters */);
6338    /// ```
6339    pub fn set_update_time<T>(mut self, v: T) -> Self
6340    where
6341        T: std::convert::Into<wkt::Timestamp>,
6342    {
6343        self.update_time = std::option::Option::Some(v.into());
6344        self
6345    }
6346
6347    /// Sets or clears the value of [update_time][crate::model::DiagnoseRouterResponse::update_time].
6348    ///
6349    /// # Example
6350    /// ```ignore,no_run
6351    /// # use google_cloud_edgenetwork_v1::model::DiagnoseRouterResponse;
6352    /// use wkt::Timestamp;
6353    /// let x = DiagnoseRouterResponse::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
6354    /// let x = DiagnoseRouterResponse::new().set_or_clear_update_time(None::<Timestamp>);
6355    /// ```
6356    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6357    where
6358        T: std::convert::Into<wkt::Timestamp>,
6359    {
6360        self.update_time = v.map(|x| x.into());
6361        self
6362    }
6363
6364    /// Sets the value of [result][crate::model::DiagnoseRouterResponse::result].
6365    ///
6366    /// # Example
6367    /// ```ignore,no_run
6368    /// # use google_cloud_edgenetwork_v1::model::DiagnoseRouterResponse;
6369    /// use google_cloud_edgenetwork_v1::model::RouterStatus;
6370    /// let x = DiagnoseRouterResponse::new().set_result(RouterStatus::default()/* use setters */);
6371    /// ```
6372    pub fn set_result<T>(mut self, v: T) -> Self
6373    where
6374        T: std::convert::Into<crate::model::RouterStatus>,
6375    {
6376        self.result = std::option::Option::Some(v.into());
6377        self
6378    }
6379
6380    /// Sets or clears the value of [result][crate::model::DiagnoseRouterResponse::result].
6381    ///
6382    /// # Example
6383    /// ```ignore,no_run
6384    /// # use google_cloud_edgenetwork_v1::model::DiagnoseRouterResponse;
6385    /// use google_cloud_edgenetwork_v1::model::RouterStatus;
6386    /// let x = DiagnoseRouterResponse::new().set_or_clear_result(Some(RouterStatus::default()/* use setters */));
6387    /// let x = DiagnoseRouterResponse::new().set_or_clear_result(None::<RouterStatus>);
6388    /// ```
6389    pub fn set_or_clear_result<T>(mut self, v: std::option::Option<T>) -> Self
6390    where
6391        T: std::convert::Into<crate::model::RouterStatus>,
6392    {
6393        self.result = v.map(|x| x.into());
6394        self
6395    }
6396}
6397
6398impl wkt::message::Message for DiagnoseRouterResponse {
6399    fn typename() -> &'static str {
6400        "type.googleapis.com/google.cloud.edgenetwork.v1.DiagnoseRouterResponse"
6401    }
6402}
6403
6404/// Message for initializing a specified zone
6405#[derive(Clone, Default, PartialEq)]
6406#[non_exhaustive]
6407pub struct InitializeZoneRequest {
6408    /// Required. The name of the zone resource.
6409    pub name: std::string::String,
6410
6411    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6412}
6413
6414impl InitializeZoneRequest {
6415    pub fn new() -> Self {
6416        std::default::Default::default()
6417    }
6418
6419    /// Sets the value of [name][crate::model::InitializeZoneRequest::name].
6420    ///
6421    /// # Example
6422    /// ```ignore,no_run
6423    /// # use google_cloud_edgenetwork_v1::model::InitializeZoneRequest;
6424    /// let x = InitializeZoneRequest::new().set_name("example");
6425    /// ```
6426    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6427        self.name = v.into();
6428        self
6429    }
6430}
6431
6432impl wkt::message::Message for InitializeZoneRequest {
6433    fn typename() -> &'static str {
6434        "type.googleapis.com/google.cloud.edgenetwork.v1.InitializeZoneRequest"
6435    }
6436}
6437
6438/// The response of initializing a zone
6439#[derive(Clone, Default, PartialEq)]
6440#[non_exhaustive]
6441pub struct InitializeZoneResponse {
6442    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6443}
6444
6445impl InitializeZoneResponse {
6446    pub fn new() -> Self {
6447        std::default::Default::default()
6448    }
6449}
6450
6451impl wkt::message::Message for InitializeZoneResponse {
6452    fn typename() -> &'static str {
6453        "type.googleapis.com/google.cloud.edgenetwork.v1.InitializeZoneResponse"
6454    }
6455}
6456
6457/// ResourceState describes the state the resource.
6458/// A normal lifecycle of a new resource being created would be: PENDING ->
6459/// PROVISIONING -> RUNNING. A normal lifecycle of an existing resource being
6460/// deleted would be: RUNNING -> DELETING. Any failures during processing will
6461/// result the resource to be in a SUSPENDED state.
6462///
6463/// # Working with unknown values
6464///
6465/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6466/// additional enum variants at any time. Adding new variants is not considered
6467/// a breaking change. Applications should write their code in anticipation of:
6468///
6469/// - New values appearing in future releases of the client library, **and**
6470/// - New values received dynamically, without application changes.
6471///
6472/// Please consult the [Working with enums] section in the user guide for some
6473/// guidelines.
6474///
6475/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6476#[derive(Clone, Debug, PartialEq)]
6477#[non_exhaustive]
6478pub enum ResourceState {
6479    /// Unspecified state.
6480    StateUnknown,
6481    /// The resource is being prepared to be applied to the rack.
6482    StatePending,
6483    /// The resource has started being applied to the rack.
6484    StateProvisioning,
6485    /// The resource has been pushed to the rack.
6486    StateRunning,
6487    /// The resource failed to push to the rack.
6488    StateSuspended,
6489    /// The resource is under deletion.
6490    StateDeleting,
6491    /// If set, the enum was initialized with an unknown value.
6492    ///
6493    /// Applications can examine the value using [ResourceState::value] or
6494    /// [ResourceState::name].
6495    UnknownValue(resource_state::UnknownValue),
6496}
6497
6498#[doc(hidden)]
6499pub mod resource_state {
6500    #[allow(unused_imports)]
6501    use super::*;
6502    #[derive(Clone, Debug, PartialEq)]
6503    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6504}
6505
6506impl ResourceState {
6507    /// Gets the enum value.
6508    ///
6509    /// Returns `None` if the enum contains an unknown value deserialized from
6510    /// the string representation of enums.
6511    pub fn value(&self) -> std::option::Option<i32> {
6512        match self {
6513            Self::StateUnknown => std::option::Option::Some(0),
6514            Self::StatePending => std::option::Option::Some(1),
6515            Self::StateProvisioning => std::option::Option::Some(2),
6516            Self::StateRunning => std::option::Option::Some(3),
6517            Self::StateSuspended => std::option::Option::Some(4),
6518            Self::StateDeleting => std::option::Option::Some(5),
6519            Self::UnknownValue(u) => u.0.value(),
6520        }
6521    }
6522
6523    /// Gets the enum value as a string.
6524    ///
6525    /// Returns `None` if the enum contains an unknown value deserialized from
6526    /// the integer representation of enums.
6527    pub fn name(&self) -> std::option::Option<&str> {
6528        match self {
6529            Self::StateUnknown => std::option::Option::Some("STATE_UNKNOWN"),
6530            Self::StatePending => std::option::Option::Some("STATE_PENDING"),
6531            Self::StateProvisioning => std::option::Option::Some("STATE_PROVISIONING"),
6532            Self::StateRunning => std::option::Option::Some("STATE_RUNNING"),
6533            Self::StateSuspended => std::option::Option::Some("STATE_SUSPENDED"),
6534            Self::StateDeleting => std::option::Option::Some("STATE_DELETING"),
6535            Self::UnknownValue(u) => u.0.name(),
6536        }
6537    }
6538}
6539
6540impl std::default::Default for ResourceState {
6541    fn default() -> Self {
6542        use std::convert::From;
6543        Self::from(0)
6544    }
6545}
6546
6547impl std::fmt::Display for ResourceState {
6548    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6549        wkt::internal::display_enum(f, self.name(), self.value())
6550    }
6551}
6552
6553impl std::convert::From<i32> for ResourceState {
6554    fn from(value: i32) -> Self {
6555        match value {
6556            0 => Self::StateUnknown,
6557            1 => Self::StatePending,
6558            2 => Self::StateProvisioning,
6559            3 => Self::StateRunning,
6560            4 => Self::StateSuspended,
6561            5 => Self::StateDeleting,
6562            _ => Self::UnknownValue(resource_state::UnknownValue(
6563                wkt::internal::UnknownEnumValue::Integer(value),
6564            )),
6565        }
6566    }
6567}
6568
6569impl std::convert::From<&str> for ResourceState {
6570    fn from(value: &str) -> Self {
6571        use std::string::ToString;
6572        match value {
6573            "STATE_UNKNOWN" => Self::StateUnknown,
6574            "STATE_PENDING" => Self::StatePending,
6575            "STATE_PROVISIONING" => Self::StateProvisioning,
6576            "STATE_RUNNING" => Self::StateRunning,
6577            "STATE_SUSPENDED" => Self::StateSuspended,
6578            "STATE_DELETING" => Self::StateDeleting,
6579            _ => Self::UnknownValue(resource_state::UnknownValue(
6580                wkt::internal::UnknownEnumValue::String(value.to_string()),
6581            )),
6582        }
6583    }
6584}
6585
6586impl serde::ser::Serialize for ResourceState {
6587    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6588    where
6589        S: serde::Serializer,
6590    {
6591        match self {
6592            Self::StateUnknown => serializer.serialize_i32(0),
6593            Self::StatePending => serializer.serialize_i32(1),
6594            Self::StateProvisioning => serializer.serialize_i32(2),
6595            Self::StateRunning => serializer.serialize_i32(3),
6596            Self::StateSuspended => serializer.serialize_i32(4),
6597            Self::StateDeleting => serializer.serialize_i32(5),
6598            Self::UnknownValue(u) => u.0.serialize(serializer),
6599        }
6600    }
6601}
6602
6603impl<'de> serde::de::Deserialize<'de> for ResourceState {
6604    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6605    where
6606        D: serde::Deserializer<'de>,
6607    {
6608        deserializer.deserialize_any(wkt::internal::EnumVisitor::<ResourceState>::new(
6609            ".google.cloud.edgenetwork.v1.ResourceState",
6610        ))
6611    }
6612}
6613
6614/// Defines the remote peering destination for the interface. It is required
6615/// when peering separation is enabled.
6616///
6617/// # Working with unknown values
6618///
6619/// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
6620/// additional enum variants at any time. Adding new variants is not considered
6621/// a breaking change. Applications should write their code in anticipation of:
6622///
6623/// - New values appearing in future releases of the client library, **and**
6624/// - New values received dynamically, without application changes.
6625///
6626/// Please consult the [Working with enums] section in the user guide for some
6627/// guidelines.
6628///
6629/// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
6630#[derive(Clone, Debug, PartialEq)]
6631#[non_exhaustive]
6632pub enum RemotePeeringNetworkType {
6633    /// Unspecified.
6634    Unspecified,
6635    /// Customer's trusted internal network.
6636    CustomerInternal,
6637    /// Customer's untrust network that has internet access.
6638    CustomerInternet,
6639    /// If set, the enum was initialized with an unknown value.
6640    ///
6641    /// Applications can examine the value using [RemotePeeringNetworkType::value] or
6642    /// [RemotePeeringNetworkType::name].
6643    UnknownValue(remote_peering_network_type::UnknownValue),
6644}
6645
6646#[doc(hidden)]
6647pub mod remote_peering_network_type {
6648    #[allow(unused_imports)]
6649    use super::*;
6650    #[derive(Clone, Debug, PartialEq)]
6651    pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
6652}
6653
6654impl RemotePeeringNetworkType {
6655    /// Gets the enum value.
6656    ///
6657    /// Returns `None` if the enum contains an unknown value deserialized from
6658    /// the string representation of enums.
6659    pub fn value(&self) -> std::option::Option<i32> {
6660        match self {
6661            Self::Unspecified => std::option::Option::Some(0),
6662            Self::CustomerInternal => std::option::Option::Some(1),
6663            Self::CustomerInternet => std::option::Option::Some(2),
6664            Self::UnknownValue(u) => u.0.value(),
6665        }
6666    }
6667
6668    /// Gets the enum value as a string.
6669    ///
6670    /// Returns `None` if the enum contains an unknown value deserialized from
6671    /// the integer representation of enums.
6672    pub fn name(&self) -> std::option::Option<&str> {
6673        match self {
6674            Self::Unspecified => {
6675                std::option::Option::Some("REMOTE_PEERING_NETWORK_TYPE_UNSPECIFIED")
6676            }
6677            Self::CustomerInternal => {
6678                std::option::Option::Some("REMOTE_PEERING_NETWORK_TYPE_CUSTOMER_INTERNAL")
6679            }
6680            Self::CustomerInternet => {
6681                std::option::Option::Some("REMOTE_PEERING_NETWORK_TYPE_CUSTOMER_INTERNET")
6682            }
6683            Self::UnknownValue(u) => u.0.name(),
6684        }
6685    }
6686}
6687
6688impl std::default::Default for RemotePeeringNetworkType {
6689    fn default() -> Self {
6690        use std::convert::From;
6691        Self::from(0)
6692    }
6693}
6694
6695impl std::fmt::Display for RemotePeeringNetworkType {
6696    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
6697        wkt::internal::display_enum(f, self.name(), self.value())
6698    }
6699}
6700
6701impl std::convert::From<i32> for RemotePeeringNetworkType {
6702    fn from(value: i32) -> Self {
6703        match value {
6704            0 => Self::Unspecified,
6705            1 => Self::CustomerInternal,
6706            2 => Self::CustomerInternet,
6707            _ => Self::UnknownValue(remote_peering_network_type::UnknownValue(
6708                wkt::internal::UnknownEnumValue::Integer(value),
6709            )),
6710        }
6711    }
6712}
6713
6714impl std::convert::From<&str> for RemotePeeringNetworkType {
6715    fn from(value: &str) -> Self {
6716        use std::string::ToString;
6717        match value {
6718            "REMOTE_PEERING_NETWORK_TYPE_UNSPECIFIED" => Self::Unspecified,
6719            "REMOTE_PEERING_NETWORK_TYPE_CUSTOMER_INTERNAL" => Self::CustomerInternal,
6720            "REMOTE_PEERING_NETWORK_TYPE_CUSTOMER_INTERNET" => Self::CustomerInternet,
6721            _ => Self::UnknownValue(remote_peering_network_type::UnknownValue(
6722                wkt::internal::UnknownEnumValue::String(value.to_string()),
6723            )),
6724        }
6725    }
6726}
6727
6728impl serde::ser::Serialize for RemotePeeringNetworkType {
6729    fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
6730    where
6731        S: serde::Serializer,
6732    {
6733        match self {
6734            Self::Unspecified => serializer.serialize_i32(0),
6735            Self::CustomerInternal => serializer.serialize_i32(1),
6736            Self::CustomerInternet => serializer.serialize_i32(2),
6737            Self::UnknownValue(u) => u.0.serialize(serializer),
6738        }
6739    }
6740}
6741
6742impl<'de> serde::de::Deserialize<'de> for RemotePeeringNetworkType {
6743    fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
6744    where
6745        D: serde::Deserializer<'de>,
6746    {
6747        deserializer.deserialize_any(wkt::internal::EnumVisitor::<RemotePeeringNetworkType>::new(
6748            ".google.cloud.edgenetwork.v1.RemotePeeringNetworkType",
6749        ))
6750    }
6751}