Skip to main content

google_cloud_vmwareengine_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_iam_v1;
25extern crate google_cloud_location;
26extern crate google_cloud_longrunning;
27extern crate google_cloud_lro;
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/// Request message for
40/// [VmwareEngine.ListPrivateClouds][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]
41///
42/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]: crate::client::VmwareEngine::list_private_clouds
43#[derive(Clone, Default, PartialEq)]
44#[non_exhaustive]
45pub struct ListPrivateCloudsRequest {
46    /// Required. The resource name of the private cloud to be queried for
47    /// clusters. Resource names are schemeless URIs that follow the conventions in
48    /// <https://cloud.google.com/apis/design/resource_names>.
49    /// For example:
50    /// `projects/my-project/locations/us-central1-a`
51    pub parent: std::string::String,
52
53    /// The maximum number of private clouds to return in one page.
54    /// The service may return fewer than this value.
55    /// The maximum value is coerced to 1000.
56    /// The default value of this field is 500.
57    pub page_size: i32,
58
59    /// A page token, received from a previous `ListPrivateClouds` call.
60    /// Provide this to retrieve the subsequent page.
61    ///
62    /// When paginating, all other parameters provided to `ListPrivateClouds` must
63    /// match the call that provided the page token.
64    pub page_token: std::string::String,
65
66    /// A filter expression that matches resources returned in the response.
67    /// The expression must specify the field name, a comparison operator, and the
68    /// value that you want to use for filtering. The value must be a string, a
69    /// number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or
70    /// `<`.
71    ///
72    /// For example, if you are filtering a list of private clouds, you can exclude
73    /// the ones named `example-pc` by specifying `name != "example-pc"`.
74    ///
75    /// You can also filter nested fields. For example, you could specify
76    /// `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds
77    /// only if they have a matching address in their network configuration.
78    ///
79    /// To filter on multiple expressions, provide each separate expression within
80    /// parentheses. For example:
81    ///
82    /// ```norust
83    /// (name = "example-pc")
84    /// (createTime > "2021-04-12T08:15:10.40Z")
85    /// ```
86    ///
87    /// By default, each expression is an `AND` expression. However, you can
88    /// include `AND` and `OR` expressions explicitly. For example:
89    ///
90    /// ```norust
91    /// (name = "private-cloud-1") AND
92    /// (createTime > "2021-04-12T08:15:10.40Z") OR
93    /// (name = "private-cloud-2")
94    /// ```
95    pub filter: std::string::String,
96
97    /// Sorts list results by a certain order. By default, returned results are
98    /// ordered by `name` in ascending order. You can also sort results in
99    /// descending order based on the `name` value using `orderBy="name desc"`.
100    /// Currently, only ordering by `name` is supported.
101    pub order_by: std::string::String,
102
103    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
104}
105
106impl ListPrivateCloudsRequest {
107    /// Creates a new default instance.
108    pub fn new() -> Self {
109        std::default::Default::default()
110    }
111
112    /// Sets the value of [parent][crate::model::ListPrivateCloudsRequest::parent].
113    ///
114    /// # Example
115    /// ```ignore,no_run
116    /// # use google_cloud_vmwareengine_v1::model::ListPrivateCloudsRequest;
117    /// let x = ListPrivateCloudsRequest::new().set_parent("example");
118    /// ```
119    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
120        self.parent = v.into();
121        self
122    }
123
124    /// Sets the value of [page_size][crate::model::ListPrivateCloudsRequest::page_size].
125    ///
126    /// # Example
127    /// ```ignore,no_run
128    /// # use google_cloud_vmwareengine_v1::model::ListPrivateCloudsRequest;
129    /// let x = ListPrivateCloudsRequest::new().set_page_size(42);
130    /// ```
131    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
132        self.page_size = v.into();
133        self
134    }
135
136    /// Sets the value of [page_token][crate::model::ListPrivateCloudsRequest::page_token].
137    ///
138    /// # Example
139    /// ```ignore,no_run
140    /// # use google_cloud_vmwareengine_v1::model::ListPrivateCloudsRequest;
141    /// let x = ListPrivateCloudsRequest::new().set_page_token("example");
142    /// ```
143    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
144        self.page_token = v.into();
145        self
146    }
147
148    /// Sets the value of [filter][crate::model::ListPrivateCloudsRequest::filter].
149    ///
150    /// # Example
151    /// ```ignore,no_run
152    /// # use google_cloud_vmwareengine_v1::model::ListPrivateCloudsRequest;
153    /// let x = ListPrivateCloudsRequest::new().set_filter("example");
154    /// ```
155    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
156        self.filter = v.into();
157        self
158    }
159
160    /// Sets the value of [order_by][crate::model::ListPrivateCloudsRequest::order_by].
161    ///
162    /// # Example
163    /// ```ignore,no_run
164    /// # use google_cloud_vmwareengine_v1::model::ListPrivateCloudsRequest;
165    /// let x = ListPrivateCloudsRequest::new().set_order_by("example");
166    /// ```
167    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
168        self.order_by = v.into();
169        self
170    }
171}
172
173impl wkt::message::Message for ListPrivateCloudsRequest {
174    fn typename() -> &'static str {
175        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsRequest"
176    }
177}
178
179/// Response message for
180/// [VmwareEngine.ListPrivateClouds][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]
181///
182/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]: crate::client::VmwareEngine::list_private_clouds
183#[derive(Clone, Default, PartialEq)]
184#[non_exhaustive]
185pub struct ListPrivateCloudsResponse {
186    /// A list of private clouds.
187    pub private_clouds: std::vec::Vec<crate::model::PrivateCloud>,
188
189    /// A token, which can be sent as `page_token` to retrieve the next page.
190    /// If this field is omitted, there are no subsequent pages.
191    pub next_page_token: std::string::String,
192
193    /// Locations that could not be reached when making an aggregated query using
194    /// wildcards.
195    pub unreachable: std::vec::Vec<std::string::String>,
196
197    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
198}
199
200impl ListPrivateCloudsResponse {
201    /// Creates a new default instance.
202    pub fn new() -> Self {
203        std::default::Default::default()
204    }
205
206    /// Sets the value of [private_clouds][crate::model::ListPrivateCloudsResponse::private_clouds].
207    ///
208    /// # Example
209    /// ```ignore,no_run
210    /// # use google_cloud_vmwareengine_v1::model::ListPrivateCloudsResponse;
211    /// use google_cloud_vmwareengine_v1::model::PrivateCloud;
212    /// let x = ListPrivateCloudsResponse::new()
213    ///     .set_private_clouds([
214    ///         PrivateCloud::default()/* use setters */,
215    ///         PrivateCloud::default()/* use (different) setters */,
216    ///     ]);
217    /// ```
218    pub fn set_private_clouds<T, V>(mut self, v: T) -> Self
219    where
220        T: std::iter::IntoIterator<Item = V>,
221        V: std::convert::Into<crate::model::PrivateCloud>,
222    {
223        use std::iter::Iterator;
224        self.private_clouds = v.into_iter().map(|i| i.into()).collect();
225        self
226    }
227
228    /// Sets the value of [next_page_token][crate::model::ListPrivateCloudsResponse::next_page_token].
229    ///
230    /// # Example
231    /// ```ignore,no_run
232    /// # use google_cloud_vmwareengine_v1::model::ListPrivateCloudsResponse;
233    /// let x = ListPrivateCloudsResponse::new().set_next_page_token("example");
234    /// ```
235    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
236        self.next_page_token = v.into();
237        self
238    }
239
240    /// Sets the value of [unreachable][crate::model::ListPrivateCloudsResponse::unreachable].
241    ///
242    /// # Example
243    /// ```ignore,no_run
244    /// # use google_cloud_vmwareengine_v1::model::ListPrivateCloudsResponse;
245    /// let x = ListPrivateCloudsResponse::new().set_unreachable(["a", "b", "c"]);
246    /// ```
247    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
248    where
249        T: std::iter::IntoIterator<Item = V>,
250        V: std::convert::Into<std::string::String>,
251    {
252        use std::iter::Iterator;
253        self.unreachable = v.into_iter().map(|i| i.into()).collect();
254        self
255    }
256}
257
258impl wkt::message::Message for ListPrivateCloudsResponse {
259    fn typename() -> &'static str {
260        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsResponse"
261    }
262}
263
264#[doc(hidden)]
265impl google_cloud_gax::paginator::internal::PageableResponse for ListPrivateCloudsResponse {
266    type PageItem = crate::model::PrivateCloud;
267
268    fn items(self) -> std::vec::Vec<Self::PageItem> {
269        self.private_clouds
270    }
271
272    fn next_page_token(&self) -> std::string::String {
273        use std::clone::Clone;
274        self.next_page_token.clone()
275    }
276}
277
278/// Request message for
279/// [VmwareEngine.GetPrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateCloud]
280///
281/// [google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateCloud]: crate::client::VmwareEngine::get_private_cloud
282#[derive(Clone, Default, PartialEq)]
283#[non_exhaustive]
284pub struct GetPrivateCloudRequest {
285    /// Required. The resource name of the private cloud to retrieve.
286    /// Resource names are schemeless URIs that follow the conventions in
287    /// <https://cloud.google.com/apis/design/resource_names>.
288    /// For example:
289    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
290    pub name: std::string::String,
291
292    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
293}
294
295impl GetPrivateCloudRequest {
296    /// Creates a new default instance.
297    pub fn new() -> Self {
298        std::default::Default::default()
299    }
300
301    /// Sets the value of [name][crate::model::GetPrivateCloudRequest::name].
302    ///
303    /// # Example
304    /// ```ignore,no_run
305    /// # use google_cloud_vmwareengine_v1::model::GetPrivateCloudRequest;
306    /// let x = GetPrivateCloudRequest::new().set_name("example");
307    /// ```
308    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
309        self.name = v.into();
310        self
311    }
312}
313
314impl wkt::message::Message for GetPrivateCloudRequest {
315    fn typename() -> &'static str {
316        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateCloudRequest"
317    }
318}
319
320/// Request message for
321/// [VmwareEngine.CreatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]
322///
323/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]: crate::client::VmwareEngine::create_private_cloud
324#[derive(Clone, Default, PartialEq)]
325#[non_exhaustive]
326pub struct CreatePrivateCloudRequest {
327    /// Required. The resource name of the location to create the new
328    /// private cloud in. Resource names are schemeless URIs that follow the
329    /// conventions in <https://cloud.google.com/apis/design/resource_names>.
330    /// For example:
331    /// `projects/my-project/locations/us-central1-a`
332    pub parent: std::string::String,
333
334    /// Required. The user-provided identifier of the private cloud to be created.
335    /// This identifier must be unique among each `PrivateCloud` within the parent
336    /// and becomes the final token in the name URI.
337    /// The identifier must meet the following requirements:
338    ///
339    /// * Only contains 1-63 alphanumeric characters and hyphens
340    /// * Begins with an alphabetical character
341    /// * Ends with a non-hyphen character
342    /// * Not formatted as a UUID
343    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
344    ///   (section 3.5)
345    pub private_cloud_id: std::string::String,
346
347    /// Required. The initial description of the new private cloud.
348    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
349
350    /// Optional. The request ID must be a valid UUID with the exception that zero
351    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
352    pub request_id: std::string::String,
353
354    /// Optional. True if you want the request to be validated and not executed;
355    /// false otherwise.
356    pub validate_only: bool,
357
358    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
359}
360
361impl CreatePrivateCloudRequest {
362    /// Creates a new default instance.
363    pub fn new() -> Self {
364        std::default::Default::default()
365    }
366
367    /// Sets the value of [parent][crate::model::CreatePrivateCloudRequest::parent].
368    ///
369    /// # Example
370    /// ```ignore,no_run
371    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
372    /// let x = CreatePrivateCloudRequest::new().set_parent("example");
373    /// ```
374    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
375        self.parent = v.into();
376        self
377    }
378
379    /// Sets the value of [private_cloud_id][crate::model::CreatePrivateCloudRequest::private_cloud_id].
380    ///
381    /// # Example
382    /// ```ignore,no_run
383    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
384    /// let x = CreatePrivateCloudRequest::new().set_private_cloud_id("example");
385    /// ```
386    pub fn set_private_cloud_id<T: std::convert::Into<std::string::String>>(
387        mut self,
388        v: T,
389    ) -> Self {
390        self.private_cloud_id = v.into();
391        self
392    }
393
394    /// Sets the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
395    ///
396    /// # Example
397    /// ```ignore,no_run
398    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
399    /// use google_cloud_vmwareengine_v1::model::PrivateCloud;
400    /// let x = CreatePrivateCloudRequest::new().set_private_cloud(PrivateCloud::default()/* use setters */);
401    /// ```
402    pub fn set_private_cloud<T>(mut self, v: T) -> Self
403    where
404        T: std::convert::Into<crate::model::PrivateCloud>,
405    {
406        self.private_cloud = std::option::Option::Some(v.into());
407        self
408    }
409
410    /// Sets or clears the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
411    ///
412    /// # Example
413    /// ```ignore,no_run
414    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
415    /// use google_cloud_vmwareengine_v1::model::PrivateCloud;
416    /// let x = CreatePrivateCloudRequest::new().set_or_clear_private_cloud(Some(PrivateCloud::default()/* use setters */));
417    /// let x = CreatePrivateCloudRequest::new().set_or_clear_private_cloud(None::<PrivateCloud>);
418    /// ```
419    pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
420    where
421        T: std::convert::Into<crate::model::PrivateCloud>,
422    {
423        self.private_cloud = v.map(|x| x.into());
424        self
425    }
426
427    /// Sets the value of [request_id][crate::model::CreatePrivateCloudRequest::request_id].
428    ///
429    /// # Example
430    /// ```ignore,no_run
431    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
432    /// let x = CreatePrivateCloudRequest::new().set_request_id("example");
433    /// ```
434    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
435        self.request_id = v.into();
436        self
437    }
438
439    /// Sets the value of [validate_only][crate::model::CreatePrivateCloudRequest::validate_only].
440    ///
441    /// # Example
442    /// ```ignore,no_run
443    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
444    /// let x = CreatePrivateCloudRequest::new().set_validate_only(true);
445    /// ```
446    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
447        self.validate_only = v.into();
448        self
449    }
450}
451
452impl wkt::message::Message for CreatePrivateCloudRequest {
453    fn typename() -> &'static str {
454        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateCloudRequest"
455    }
456}
457
458/// Request message for
459/// [VmwareEngine.UpdatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]
460///
461/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]: crate::client::VmwareEngine::update_private_cloud
462#[derive(Clone, Default, PartialEq)]
463#[non_exhaustive]
464pub struct UpdatePrivateCloudRequest {
465    /// Required. Private cloud description.
466    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
467
468    /// Required. Field mask is used to specify the fields to be overwritten in the
469    /// `PrivateCloud` resource by the update. The fields specified in `updateMask`
470    /// are relative to the resource, not the full request. A field will be
471    /// overwritten if it is in the mask. If the user does not provide a mask then
472    /// all fields will be overwritten.
473    pub update_mask: std::option::Option<wkt::FieldMask>,
474
475    /// Optional. The request ID must be a valid UUID with the exception that zero
476    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
477    pub request_id: std::string::String,
478
479    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
480}
481
482impl UpdatePrivateCloudRequest {
483    /// Creates a new default instance.
484    pub fn new() -> Self {
485        std::default::Default::default()
486    }
487
488    /// Sets the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
489    ///
490    /// # Example
491    /// ```ignore,no_run
492    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateCloudRequest;
493    /// use google_cloud_vmwareengine_v1::model::PrivateCloud;
494    /// let x = UpdatePrivateCloudRequest::new().set_private_cloud(PrivateCloud::default()/* use setters */);
495    /// ```
496    pub fn set_private_cloud<T>(mut self, v: T) -> Self
497    where
498        T: std::convert::Into<crate::model::PrivateCloud>,
499    {
500        self.private_cloud = std::option::Option::Some(v.into());
501        self
502    }
503
504    /// Sets or clears the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
505    ///
506    /// # Example
507    /// ```ignore,no_run
508    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateCloudRequest;
509    /// use google_cloud_vmwareengine_v1::model::PrivateCloud;
510    /// let x = UpdatePrivateCloudRequest::new().set_or_clear_private_cloud(Some(PrivateCloud::default()/* use setters */));
511    /// let x = UpdatePrivateCloudRequest::new().set_or_clear_private_cloud(None::<PrivateCloud>);
512    /// ```
513    pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
514    where
515        T: std::convert::Into<crate::model::PrivateCloud>,
516    {
517        self.private_cloud = v.map(|x| x.into());
518        self
519    }
520
521    /// Sets the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
522    ///
523    /// # Example
524    /// ```ignore,no_run
525    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateCloudRequest;
526    /// use wkt::FieldMask;
527    /// let x = UpdatePrivateCloudRequest::new().set_update_mask(FieldMask::default()/* use setters */);
528    /// ```
529    pub fn set_update_mask<T>(mut self, v: T) -> Self
530    where
531        T: std::convert::Into<wkt::FieldMask>,
532    {
533        self.update_mask = std::option::Option::Some(v.into());
534        self
535    }
536
537    /// Sets or clears the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
538    ///
539    /// # Example
540    /// ```ignore,no_run
541    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateCloudRequest;
542    /// use wkt::FieldMask;
543    /// let x = UpdatePrivateCloudRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
544    /// let x = UpdatePrivateCloudRequest::new().set_or_clear_update_mask(None::<FieldMask>);
545    /// ```
546    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
547    where
548        T: std::convert::Into<wkt::FieldMask>,
549    {
550        self.update_mask = v.map(|x| x.into());
551        self
552    }
553
554    /// Sets the value of [request_id][crate::model::UpdatePrivateCloudRequest::request_id].
555    ///
556    /// # Example
557    /// ```ignore,no_run
558    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateCloudRequest;
559    /// let x = UpdatePrivateCloudRequest::new().set_request_id("example");
560    /// ```
561    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
562        self.request_id = v.into();
563        self
564    }
565}
566
567impl wkt::message::Message for UpdatePrivateCloudRequest {
568    fn typename() -> &'static str {
569        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest"
570    }
571}
572
573/// Request message for
574/// [VmwareEngine.DeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]
575///
576/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]: crate::client::VmwareEngine::delete_private_cloud
577#[derive(Clone, Default, PartialEq)]
578#[non_exhaustive]
579pub struct DeletePrivateCloudRequest {
580    /// Required. The resource name of the private cloud to delete.
581    /// Resource names are schemeless URIs that follow the conventions in
582    /// <https://cloud.google.com/apis/design/resource_names>.
583    /// For example:
584    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
585    pub name: std::string::String,
586
587    /// Optional. The request ID must be a valid UUID with the exception that zero
588    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
589    pub request_id: std::string::String,
590
591    /// Optional. If set to true, cascade delete is enabled and all children of
592    /// this private cloud resource are also deleted. When this flag is set to
593    /// false, the private cloud will not be deleted if there are any children
594    /// other than the management cluster. The management cluster is always
595    /// deleted.
596    pub force: bool,
597
598    /// Optional. Time delay of the deletion specified in hours. The default value
599    /// is `3`. Specifying a non-zero value for this field changes the value of
600    /// `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned
601    /// deletion time. Deletion can be cancelled before `expire_time` elapses using
602    /// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud].
603    /// Specifying a value of `0` for this field instead begins the deletion
604    /// process and ceases billing immediately. During the final deletion process,
605    /// the value of `PrivateCloud.state` becomes `PURGING`.
606    ///
607    /// [google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]: crate::client::VmwareEngine::undelete_private_cloud
608    pub delay_hours: std::option::Option<i32>,
609
610    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
611}
612
613impl DeletePrivateCloudRequest {
614    /// Creates a new default instance.
615    pub fn new() -> Self {
616        std::default::Default::default()
617    }
618
619    /// Sets the value of [name][crate::model::DeletePrivateCloudRequest::name].
620    ///
621    /// # Example
622    /// ```ignore,no_run
623    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateCloudRequest;
624    /// let x = DeletePrivateCloudRequest::new().set_name("example");
625    /// ```
626    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
627        self.name = v.into();
628        self
629    }
630
631    /// Sets the value of [request_id][crate::model::DeletePrivateCloudRequest::request_id].
632    ///
633    /// # Example
634    /// ```ignore,no_run
635    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateCloudRequest;
636    /// let x = DeletePrivateCloudRequest::new().set_request_id("example");
637    /// ```
638    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
639        self.request_id = v.into();
640        self
641    }
642
643    /// Sets the value of [force][crate::model::DeletePrivateCloudRequest::force].
644    ///
645    /// # Example
646    /// ```ignore,no_run
647    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateCloudRequest;
648    /// let x = DeletePrivateCloudRequest::new().set_force(true);
649    /// ```
650    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
651        self.force = v.into();
652        self
653    }
654
655    /// Sets the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
656    ///
657    /// # Example
658    /// ```ignore,no_run
659    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateCloudRequest;
660    /// let x = DeletePrivateCloudRequest::new().set_delay_hours(42);
661    /// ```
662    pub fn set_delay_hours<T>(mut self, v: T) -> Self
663    where
664        T: std::convert::Into<i32>,
665    {
666        self.delay_hours = std::option::Option::Some(v.into());
667        self
668    }
669
670    /// Sets or clears the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
671    ///
672    /// # Example
673    /// ```ignore,no_run
674    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateCloudRequest;
675    /// let x = DeletePrivateCloudRequest::new().set_or_clear_delay_hours(Some(42));
676    /// let x = DeletePrivateCloudRequest::new().set_or_clear_delay_hours(None::<i32>);
677    /// ```
678    pub fn set_or_clear_delay_hours<T>(mut self, v: std::option::Option<T>) -> Self
679    where
680        T: std::convert::Into<i32>,
681    {
682        self.delay_hours = v.map(|x| x.into());
683        self
684    }
685}
686
687impl wkt::message::Message for DeletePrivateCloudRequest {
688    fn typename() -> &'static str {
689        "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateCloudRequest"
690    }
691}
692
693/// Request message for
694/// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]
695///
696/// [google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]: crate::client::VmwareEngine::undelete_private_cloud
697#[derive(Clone, Default, PartialEq)]
698#[non_exhaustive]
699pub struct UndeletePrivateCloudRequest {
700    /// Required. The resource name of the private cloud scheduled for deletion.
701    /// Resource names are schemeless URIs that follow the conventions in
702    /// <https://cloud.google.com/apis/design/resource_names>.
703    /// For example:
704    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
705    pub name: std::string::String,
706
707    /// Optional. The request ID must be a valid UUID with the exception that zero
708    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
709    pub request_id: std::string::String,
710
711    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
712}
713
714impl UndeletePrivateCloudRequest {
715    /// Creates a new default instance.
716    pub fn new() -> Self {
717        std::default::Default::default()
718    }
719
720    /// Sets the value of [name][crate::model::UndeletePrivateCloudRequest::name].
721    ///
722    /// # Example
723    /// ```ignore,no_run
724    /// # use google_cloud_vmwareengine_v1::model::UndeletePrivateCloudRequest;
725    /// let x = UndeletePrivateCloudRequest::new().set_name("example");
726    /// ```
727    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
728        self.name = v.into();
729        self
730    }
731
732    /// Sets the value of [request_id][crate::model::UndeletePrivateCloudRequest::request_id].
733    ///
734    /// # Example
735    /// ```ignore,no_run
736    /// # use google_cloud_vmwareengine_v1::model::UndeletePrivateCloudRequest;
737    /// let x = UndeletePrivateCloudRequest::new().set_request_id("example");
738    /// ```
739    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
740        self.request_id = v.into();
741        self
742    }
743}
744
745impl wkt::message::Message for UndeletePrivateCloudRequest {
746    fn typename() -> &'static str {
747        "type.googleapis.com/google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest"
748    }
749}
750
751/// Request message for
752/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
753///
754/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
755#[derive(Clone, Default, PartialEq)]
756#[non_exhaustive]
757pub struct ListClustersRequest {
758    /// Required. The resource name of the private cloud to query for clusters.
759    /// Resource names are schemeless URIs that follow the conventions in
760    /// <https://cloud.google.com/apis/design/resource_names>.
761    /// For example:
762    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
763    pub parent: std::string::String,
764
765    /// The maximum number of clusters to return in one page.
766    /// The service may return fewer than this value.
767    /// The maximum value is coerced to 1000.
768    /// The default value of this field is 500.
769    pub page_size: i32,
770
771    /// A page token, received from a previous `ListClusters` call.
772    /// Provide this to retrieve the subsequent page.
773    ///
774    /// When paginating, all other parameters provided to `ListClusters`
775    /// must match the call that provided the page token.
776    pub page_token: std::string::String,
777
778    /// To filter on multiple expressions, provide each separate expression within
779    /// parentheses. For example:
780    ///
781    /// ```norust
782    /// (name = "example-cluster")
783    /// (nodeCount = "3")
784    /// ```
785    ///
786    /// By default, each expression is an `AND` expression. However, you can
787    /// include `AND` and `OR` expressions explicitly. For example:
788    ///
789    /// ```norust
790    /// (name = "example-cluster-1") AND
791    /// (createTime > "2021-04-12T08:15:10.40Z") OR
792    /// (name = "example-cluster-2")
793    /// ```
794    pub filter: std::string::String,
795
796    /// Sorts list results by a certain order. By default, returned results are
797    /// ordered by `name` in ascending order. You can also sort results in
798    /// descending order based on the `name` value using `orderBy="name desc"`.
799    /// Currently, only ordering by `name` is supported.
800    pub order_by: std::string::String,
801
802    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
803}
804
805impl ListClustersRequest {
806    /// Creates a new default instance.
807    pub fn new() -> Self {
808        std::default::Default::default()
809    }
810
811    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
812    ///
813    /// # Example
814    /// ```ignore,no_run
815    /// # use google_cloud_vmwareengine_v1::model::ListClustersRequest;
816    /// let x = ListClustersRequest::new().set_parent("example");
817    /// ```
818    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
819        self.parent = v.into();
820        self
821    }
822
823    /// Sets the value of [page_size][crate::model::ListClustersRequest::page_size].
824    ///
825    /// # Example
826    /// ```ignore,no_run
827    /// # use google_cloud_vmwareengine_v1::model::ListClustersRequest;
828    /// let x = ListClustersRequest::new().set_page_size(42);
829    /// ```
830    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
831        self.page_size = v.into();
832        self
833    }
834
835    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
836    ///
837    /// # Example
838    /// ```ignore,no_run
839    /// # use google_cloud_vmwareengine_v1::model::ListClustersRequest;
840    /// let x = ListClustersRequest::new().set_page_token("example");
841    /// ```
842    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
843        self.page_token = v.into();
844        self
845    }
846
847    /// Sets the value of [filter][crate::model::ListClustersRequest::filter].
848    ///
849    /// # Example
850    /// ```ignore,no_run
851    /// # use google_cloud_vmwareengine_v1::model::ListClustersRequest;
852    /// let x = ListClustersRequest::new().set_filter("example");
853    /// ```
854    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
855        self.filter = v.into();
856        self
857    }
858
859    /// Sets the value of [order_by][crate::model::ListClustersRequest::order_by].
860    ///
861    /// # Example
862    /// ```ignore,no_run
863    /// # use google_cloud_vmwareengine_v1::model::ListClustersRequest;
864    /// let x = ListClustersRequest::new().set_order_by("example");
865    /// ```
866    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
867        self.order_by = v.into();
868        self
869    }
870}
871
872impl wkt::message::Message for ListClustersRequest {
873    fn typename() -> &'static str {
874        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersRequest"
875    }
876}
877
878/// Response message for
879/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
880///
881/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
882#[derive(Clone, Default, PartialEq)]
883#[non_exhaustive]
884pub struct ListClustersResponse {
885    /// A list of private cloud clusters.
886    pub clusters: std::vec::Vec<crate::model::Cluster>,
887
888    /// A token, which can be sent as `page_token` to retrieve the next page.
889    /// If this field is omitted, there are no subsequent pages.
890    pub next_page_token: std::string::String,
891
892    /// Locations that could not be reached when making an aggregated query using
893    /// wildcards.
894    pub unreachable: std::vec::Vec<std::string::String>,
895
896    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
897}
898
899impl ListClustersResponse {
900    /// Creates a new default instance.
901    pub fn new() -> Self {
902        std::default::Default::default()
903    }
904
905    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
906    ///
907    /// # Example
908    /// ```ignore,no_run
909    /// # use google_cloud_vmwareengine_v1::model::ListClustersResponse;
910    /// use google_cloud_vmwareengine_v1::model::Cluster;
911    /// let x = ListClustersResponse::new()
912    ///     .set_clusters([
913    ///         Cluster::default()/* use setters */,
914    ///         Cluster::default()/* use (different) setters */,
915    ///     ]);
916    /// ```
917    pub fn set_clusters<T, V>(mut self, v: T) -> Self
918    where
919        T: std::iter::IntoIterator<Item = V>,
920        V: std::convert::Into<crate::model::Cluster>,
921    {
922        use std::iter::Iterator;
923        self.clusters = v.into_iter().map(|i| i.into()).collect();
924        self
925    }
926
927    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
928    ///
929    /// # Example
930    /// ```ignore,no_run
931    /// # use google_cloud_vmwareengine_v1::model::ListClustersResponse;
932    /// let x = ListClustersResponse::new().set_next_page_token("example");
933    /// ```
934    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
935        self.next_page_token = v.into();
936        self
937    }
938
939    /// Sets the value of [unreachable][crate::model::ListClustersResponse::unreachable].
940    ///
941    /// # Example
942    /// ```ignore,no_run
943    /// # use google_cloud_vmwareengine_v1::model::ListClustersResponse;
944    /// let x = ListClustersResponse::new().set_unreachable(["a", "b", "c"]);
945    /// ```
946    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
947    where
948        T: std::iter::IntoIterator<Item = V>,
949        V: std::convert::Into<std::string::String>,
950    {
951        use std::iter::Iterator;
952        self.unreachable = v.into_iter().map(|i| i.into()).collect();
953        self
954    }
955}
956
957impl wkt::message::Message for ListClustersResponse {
958    fn typename() -> &'static str {
959        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersResponse"
960    }
961}
962
963#[doc(hidden)]
964impl google_cloud_gax::paginator::internal::PageableResponse for ListClustersResponse {
965    type PageItem = crate::model::Cluster;
966
967    fn items(self) -> std::vec::Vec<Self::PageItem> {
968        self.clusters
969    }
970
971    fn next_page_token(&self) -> std::string::String {
972        use std::clone::Clone;
973        self.next_page_token.clone()
974    }
975}
976
977/// Request message for
978/// [VmwareEngine.GetCluster][google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]
979///
980/// [google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]: crate::client::VmwareEngine::get_cluster
981#[derive(Clone, Default, PartialEq)]
982#[non_exhaustive]
983pub struct GetClusterRequest {
984    /// Required. The cluster resource name to retrieve.
985    /// Resource names are schemeless URIs that follow the conventions in
986    /// <https://cloud.google.com/apis/design/resource_names>.
987    /// For example:
988    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
989    pub name: std::string::String,
990
991    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
992}
993
994impl GetClusterRequest {
995    /// Creates a new default instance.
996    pub fn new() -> Self {
997        std::default::Default::default()
998    }
999
1000    /// Sets the value of [name][crate::model::GetClusterRequest::name].
1001    ///
1002    /// # Example
1003    /// ```ignore,no_run
1004    /// # use google_cloud_vmwareengine_v1::model::GetClusterRequest;
1005    /// let x = GetClusterRequest::new().set_name("example");
1006    /// ```
1007    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1008        self.name = v.into();
1009        self
1010    }
1011}
1012
1013impl wkt::message::Message for GetClusterRequest {
1014    fn typename() -> &'static str {
1015        "type.googleapis.com/google.cloud.vmwareengine.v1.GetClusterRequest"
1016    }
1017}
1018
1019/// Request message for
1020/// [VmwareEngine.CreateCluster][google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]
1021///
1022/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]: crate::client::VmwareEngine::create_cluster
1023#[derive(Clone, Default, PartialEq)]
1024#[non_exhaustive]
1025pub struct CreateClusterRequest {
1026    /// Required. The resource name of the private cloud to create a new cluster
1027    /// in. Resource names are schemeless URIs that follow the conventions in
1028    /// <https://cloud.google.com/apis/design/resource_names>.
1029    /// For example:
1030    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1031    pub parent: std::string::String,
1032
1033    /// Required. The user-provided identifier of the new `Cluster`.
1034    /// This identifier must be unique among clusters within the parent and becomes
1035    /// the final token in the name URI.
1036    /// The identifier must meet the following requirements:
1037    ///
1038    /// * Only contains 1-63 alphanumeric characters and hyphens
1039    /// * Begins with an alphabetical character
1040    /// * Ends with a non-hyphen character
1041    /// * Not formatted as a UUID
1042    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
1043    ///   (section 3.5)
1044    pub cluster_id: std::string::String,
1045
1046    /// Required. The initial description of the new cluster.
1047    pub cluster: std::option::Option<crate::model::Cluster>,
1048
1049    /// Optional. The request ID must be a valid UUID with the exception that zero
1050    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
1051    pub request_id: std::string::String,
1052
1053    /// Optional. True if you want the request to be validated and not executed;
1054    /// false otherwise.
1055    pub validate_only: bool,
1056
1057    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1058}
1059
1060impl CreateClusterRequest {
1061    /// Creates a new default instance.
1062    pub fn new() -> Self {
1063        std::default::Default::default()
1064    }
1065
1066    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
1067    ///
1068    /// # Example
1069    /// ```ignore,no_run
1070    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1071    /// let x = CreateClusterRequest::new().set_parent("example");
1072    /// ```
1073    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1074        self.parent = v.into();
1075        self
1076    }
1077
1078    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
1079    ///
1080    /// # Example
1081    /// ```ignore,no_run
1082    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1083    /// let x = CreateClusterRequest::new().set_cluster_id("example");
1084    /// ```
1085    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1086        self.cluster_id = v.into();
1087        self
1088    }
1089
1090    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
1091    ///
1092    /// # Example
1093    /// ```ignore,no_run
1094    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1095    /// use google_cloud_vmwareengine_v1::model::Cluster;
1096    /// let x = CreateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
1097    /// ```
1098    pub fn set_cluster<T>(mut self, v: T) -> Self
1099    where
1100        T: std::convert::Into<crate::model::Cluster>,
1101    {
1102        self.cluster = std::option::Option::Some(v.into());
1103        self
1104    }
1105
1106    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
1107    ///
1108    /// # Example
1109    /// ```ignore,no_run
1110    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1111    /// use google_cloud_vmwareengine_v1::model::Cluster;
1112    /// let x = CreateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
1113    /// let x = CreateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
1114    /// ```
1115    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1116    where
1117        T: std::convert::Into<crate::model::Cluster>,
1118    {
1119        self.cluster = v.map(|x| x.into());
1120        self
1121    }
1122
1123    /// Sets the value of [request_id][crate::model::CreateClusterRequest::request_id].
1124    ///
1125    /// # Example
1126    /// ```ignore,no_run
1127    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1128    /// let x = CreateClusterRequest::new().set_request_id("example");
1129    /// ```
1130    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1131        self.request_id = v.into();
1132        self
1133    }
1134
1135    /// Sets the value of [validate_only][crate::model::CreateClusterRequest::validate_only].
1136    ///
1137    /// # Example
1138    /// ```ignore,no_run
1139    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1140    /// let x = CreateClusterRequest::new().set_validate_only(true);
1141    /// ```
1142    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1143        self.validate_only = v.into();
1144        self
1145    }
1146}
1147
1148impl wkt::message::Message for CreateClusterRequest {
1149    fn typename() -> &'static str {
1150        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateClusterRequest"
1151    }
1152}
1153
1154/// Request message for
1155/// [VmwareEngine.UpdateCluster][google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]
1156///
1157/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]: crate::client::VmwareEngine::update_cluster
1158#[derive(Clone, Default, PartialEq)]
1159#[non_exhaustive]
1160pub struct UpdateClusterRequest {
1161    /// Required. Field mask is used to specify the fields to be overwritten in the
1162    /// `Cluster` resource by the update. The fields specified in the `updateMask`
1163    /// are relative to the resource, not the full request. A field will be
1164    /// overwritten if it is in the mask. If the user does not provide a mask then
1165    /// all fields will be overwritten.
1166    pub update_mask: std::option::Option<wkt::FieldMask>,
1167
1168    /// Required. The description of the cluster.
1169    pub cluster: std::option::Option<crate::model::Cluster>,
1170
1171    /// Optional. The request ID must be a valid UUID with the exception that
1172    /// zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1173    pub request_id: std::string::String,
1174
1175    /// Optional. True if you want the request to be validated and not executed;
1176    /// false otherwise.
1177    pub validate_only: bool,
1178
1179    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1180}
1181
1182impl UpdateClusterRequest {
1183    /// Creates a new default instance.
1184    pub fn new() -> Self {
1185        std::default::Default::default()
1186    }
1187
1188    /// Sets the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
1189    ///
1190    /// # Example
1191    /// ```ignore,no_run
1192    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1193    /// use wkt::FieldMask;
1194    /// let x = UpdateClusterRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1195    /// ```
1196    pub fn set_update_mask<T>(mut self, v: T) -> Self
1197    where
1198        T: std::convert::Into<wkt::FieldMask>,
1199    {
1200        self.update_mask = std::option::Option::Some(v.into());
1201        self
1202    }
1203
1204    /// Sets or clears the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
1205    ///
1206    /// # Example
1207    /// ```ignore,no_run
1208    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1209    /// use wkt::FieldMask;
1210    /// let x = UpdateClusterRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1211    /// let x = UpdateClusterRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1212    /// ```
1213    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1214    where
1215        T: std::convert::Into<wkt::FieldMask>,
1216    {
1217        self.update_mask = v.map(|x| x.into());
1218        self
1219    }
1220
1221    /// Sets the value of [cluster][crate::model::UpdateClusterRequest::cluster].
1222    ///
1223    /// # Example
1224    /// ```ignore,no_run
1225    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1226    /// use google_cloud_vmwareengine_v1::model::Cluster;
1227    /// let x = UpdateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
1228    /// ```
1229    pub fn set_cluster<T>(mut self, v: T) -> Self
1230    where
1231        T: std::convert::Into<crate::model::Cluster>,
1232    {
1233        self.cluster = std::option::Option::Some(v.into());
1234        self
1235    }
1236
1237    /// Sets or clears the value of [cluster][crate::model::UpdateClusterRequest::cluster].
1238    ///
1239    /// # Example
1240    /// ```ignore,no_run
1241    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1242    /// use google_cloud_vmwareengine_v1::model::Cluster;
1243    /// let x = UpdateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
1244    /// let x = UpdateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
1245    /// ```
1246    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1247    where
1248        T: std::convert::Into<crate::model::Cluster>,
1249    {
1250        self.cluster = v.map(|x| x.into());
1251        self
1252    }
1253
1254    /// Sets the value of [request_id][crate::model::UpdateClusterRequest::request_id].
1255    ///
1256    /// # Example
1257    /// ```ignore,no_run
1258    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1259    /// let x = UpdateClusterRequest::new().set_request_id("example");
1260    /// ```
1261    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1262        self.request_id = v.into();
1263        self
1264    }
1265
1266    /// Sets the value of [validate_only][crate::model::UpdateClusterRequest::validate_only].
1267    ///
1268    /// # Example
1269    /// ```ignore,no_run
1270    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1271    /// let x = UpdateClusterRequest::new().set_validate_only(true);
1272    /// ```
1273    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1274        self.validate_only = v.into();
1275        self
1276    }
1277}
1278
1279impl wkt::message::Message for UpdateClusterRequest {
1280    fn typename() -> &'static str {
1281        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateClusterRequest"
1282    }
1283}
1284
1285/// Request message for
1286/// [VmwareEngine.DeleteCluster][google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]
1287///
1288/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]: crate::client::VmwareEngine::delete_cluster
1289#[derive(Clone, Default, PartialEq)]
1290#[non_exhaustive]
1291pub struct DeleteClusterRequest {
1292    /// Required. The resource name of the cluster to delete.
1293    /// Resource names are schemeless URIs that follow the conventions in
1294    /// <https://cloud.google.com/apis/design/resource_names>.
1295    /// For example:
1296    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
1297    pub name: std::string::String,
1298
1299    /// Optional. The request ID must be a valid UUID with the exception that zero
1300    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
1301    pub request_id: std::string::String,
1302
1303    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1304}
1305
1306impl DeleteClusterRequest {
1307    /// Creates a new default instance.
1308    pub fn new() -> Self {
1309        std::default::Default::default()
1310    }
1311
1312    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
1313    ///
1314    /// # Example
1315    /// ```ignore,no_run
1316    /// # use google_cloud_vmwareengine_v1::model::DeleteClusterRequest;
1317    /// let x = DeleteClusterRequest::new().set_name("example");
1318    /// ```
1319    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1320        self.name = v.into();
1321        self
1322    }
1323
1324    /// Sets the value of [request_id][crate::model::DeleteClusterRequest::request_id].
1325    ///
1326    /// # Example
1327    /// ```ignore,no_run
1328    /// # use google_cloud_vmwareengine_v1::model::DeleteClusterRequest;
1329    /// let x = DeleteClusterRequest::new().set_request_id("example");
1330    /// ```
1331    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1332        self.request_id = v.into();
1333        self
1334    }
1335}
1336
1337impl wkt::message::Message for DeleteClusterRequest {
1338    fn typename() -> &'static str {
1339        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteClusterRequest"
1340    }
1341}
1342
1343/// Request message for
1344/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
1345///
1346/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
1347#[derive(Clone, Default, PartialEq)]
1348#[non_exhaustive]
1349pub struct ListNodesRequest {
1350    /// Required. The resource name of the cluster to be queried for nodes.
1351    /// Resource names are schemeless URIs that follow the conventions in
1352    /// <https://cloud.google.com/apis/design/resource_names>.
1353    /// For example:
1354    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
1355    pub parent: std::string::String,
1356
1357    /// The maximum number of nodes to return in one page.
1358    /// The service may return fewer than this value.
1359    /// The maximum value is coerced to 1000.
1360    /// The default value of this field is 500.
1361    pub page_size: i32,
1362
1363    /// A page token, received from a previous `ListNodes` call.
1364    /// Provide this to retrieve the subsequent page.
1365    ///
1366    /// When paginating, all other parameters provided to
1367    /// `ListNodes` must match the call that provided the page
1368    /// token.
1369    pub page_token: std::string::String,
1370
1371    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1372}
1373
1374impl ListNodesRequest {
1375    /// Creates a new default instance.
1376    pub fn new() -> Self {
1377        std::default::Default::default()
1378    }
1379
1380    /// Sets the value of [parent][crate::model::ListNodesRequest::parent].
1381    ///
1382    /// # Example
1383    /// ```ignore,no_run
1384    /// # use google_cloud_vmwareengine_v1::model::ListNodesRequest;
1385    /// let x = ListNodesRequest::new().set_parent("example");
1386    /// ```
1387    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1388        self.parent = v.into();
1389        self
1390    }
1391
1392    /// Sets the value of [page_size][crate::model::ListNodesRequest::page_size].
1393    ///
1394    /// # Example
1395    /// ```ignore,no_run
1396    /// # use google_cloud_vmwareengine_v1::model::ListNodesRequest;
1397    /// let x = ListNodesRequest::new().set_page_size(42);
1398    /// ```
1399    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1400        self.page_size = v.into();
1401        self
1402    }
1403
1404    /// Sets the value of [page_token][crate::model::ListNodesRequest::page_token].
1405    ///
1406    /// # Example
1407    /// ```ignore,no_run
1408    /// # use google_cloud_vmwareengine_v1::model::ListNodesRequest;
1409    /// let x = ListNodesRequest::new().set_page_token("example");
1410    /// ```
1411    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1412        self.page_token = v.into();
1413        self
1414    }
1415}
1416
1417impl wkt::message::Message for ListNodesRequest {
1418    fn typename() -> &'static str {
1419        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesRequest"
1420    }
1421}
1422
1423/// Response message for
1424/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
1425///
1426/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
1427#[derive(Clone, Default, PartialEq)]
1428#[non_exhaustive]
1429pub struct ListNodesResponse {
1430    /// The nodes.
1431    pub nodes: std::vec::Vec<crate::model::Node>,
1432
1433    /// A token, which can be sent as `page_token` to retrieve the next page.
1434    /// If this field is omitted, there are no subsequent pages.
1435    pub next_page_token: std::string::String,
1436
1437    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1438}
1439
1440impl ListNodesResponse {
1441    /// Creates a new default instance.
1442    pub fn new() -> Self {
1443        std::default::Default::default()
1444    }
1445
1446    /// Sets the value of [nodes][crate::model::ListNodesResponse::nodes].
1447    ///
1448    /// # Example
1449    /// ```ignore,no_run
1450    /// # use google_cloud_vmwareengine_v1::model::ListNodesResponse;
1451    /// use google_cloud_vmwareengine_v1::model::Node;
1452    /// let x = ListNodesResponse::new()
1453    ///     .set_nodes([
1454    ///         Node::default()/* use setters */,
1455    ///         Node::default()/* use (different) setters */,
1456    ///     ]);
1457    /// ```
1458    pub fn set_nodes<T, V>(mut self, v: T) -> Self
1459    where
1460        T: std::iter::IntoIterator<Item = V>,
1461        V: std::convert::Into<crate::model::Node>,
1462    {
1463        use std::iter::Iterator;
1464        self.nodes = v.into_iter().map(|i| i.into()).collect();
1465        self
1466    }
1467
1468    /// Sets the value of [next_page_token][crate::model::ListNodesResponse::next_page_token].
1469    ///
1470    /// # Example
1471    /// ```ignore,no_run
1472    /// # use google_cloud_vmwareengine_v1::model::ListNodesResponse;
1473    /// let x = ListNodesResponse::new().set_next_page_token("example");
1474    /// ```
1475    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1476        self.next_page_token = v.into();
1477        self
1478    }
1479}
1480
1481impl wkt::message::Message for ListNodesResponse {
1482    fn typename() -> &'static str {
1483        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesResponse"
1484    }
1485}
1486
1487#[doc(hidden)]
1488impl google_cloud_gax::paginator::internal::PageableResponse for ListNodesResponse {
1489    type PageItem = crate::model::Node;
1490
1491    fn items(self) -> std::vec::Vec<Self::PageItem> {
1492        self.nodes
1493    }
1494
1495    fn next_page_token(&self) -> std::string::String {
1496        use std::clone::Clone;
1497        self.next_page_token.clone()
1498    }
1499}
1500
1501/// Request message for
1502/// [VmwareEngine.GetNode][google.cloud.vmwareengine.v1.VmwareEngine.GetNode]
1503///
1504/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNode]: crate::client::VmwareEngine::get_node
1505#[derive(Clone, Default, PartialEq)]
1506#[non_exhaustive]
1507pub struct GetNodeRequest {
1508    /// Required. The resource name of the node to retrieve.
1509    /// For example:
1510    /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}`
1511    pub name: std::string::String,
1512
1513    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1514}
1515
1516impl GetNodeRequest {
1517    /// Creates a new default instance.
1518    pub fn new() -> Self {
1519        std::default::Default::default()
1520    }
1521
1522    /// Sets the value of [name][crate::model::GetNodeRequest::name].
1523    ///
1524    /// # Example
1525    /// ```ignore,no_run
1526    /// # use google_cloud_vmwareengine_v1::model::GetNodeRequest;
1527    /// let x = GetNodeRequest::new().set_name("example");
1528    /// ```
1529    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1530        self.name = v.into();
1531        self
1532    }
1533}
1534
1535impl wkt::message::Message for GetNodeRequest {
1536    fn typename() -> &'static str {
1537        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeRequest"
1538    }
1539}
1540
1541/// Request message for
1542/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1543///
1544/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1545#[derive(Clone, Default, PartialEq)]
1546#[non_exhaustive]
1547pub struct ListExternalAddressesRequest {
1548    /// Required. The resource name of the private cloud to be queried for
1549    /// external IP addresses.
1550    /// Resource names are schemeless URIs that follow the conventions in
1551    /// <https://cloud.google.com/apis/design/resource_names>.
1552    /// For example:
1553    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1554    pub parent: std::string::String,
1555
1556    /// The maximum number of external IP addresses to return in one page.
1557    /// The service may return fewer than this value.
1558    /// The maximum value is coerced to 1000.
1559    /// The default value of this field is 500.
1560    pub page_size: i32,
1561
1562    /// A page token, received from a previous `ListExternalAddresses` call.
1563    /// Provide this to retrieve the subsequent page.
1564    ///
1565    /// When paginating, all other parameters provided to
1566    /// `ListExternalAddresses` must match the call that provided the page token.
1567    pub page_token: std::string::String,
1568
1569    /// A filter expression that matches resources returned in the response.
1570    /// The expression must specify the field name, a comparison
1571    /// operator, and the value that you want to use for filtering. The value
1572    /// must be a string, a number, or a boolean. The comparison operator
1573    /// must be `=`, `!=`, `>`, or `<`.
1574    ///
1575    /// For example, if you are filtering a list of IP addresses, you can
1576    /// exclude the ones named `example-ip` by specifying
1577    /// `name != "example-ip"`.
1578    ///
1579    /// To filter on multiple expressions, provide each separate expression within
1580    /// parentheses. For example:
1581    ///
1582    /// ```norust
1583    /// (name = "example-ip")
1584    /// (createTime > "2021-04-12T08:15:10.40Z")
1585    /// ```
1586    ///
1587    /// By default, each expression is an `AND` expression. However, you
1588    /// can include `AND` and `OR` expressions explicitly.
1589    /// For example:
1590    ///
1591    /// ```norust
1592    /// (name = "example-ip-1") AND
1593    /// (createTime > "2021-04-12T08:15:10.40Z") OR
1594    /// (name = "example-ip-2")
1595    /// ```
1596    pub filter: std::string::String,
1597
1598    /// Sorts list results by a certain order. By default, returned results
1599    /// are ordered by `name` in ascending order.
1600    /// You can also sort results in descending order based on the `name` value
1601    /// using `orderBy="name desc"`.
1602    /// Currently, only ordering by `name` is supported.
1603    pub order_by: std::string::String,
1604
1605    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1606}
1607
1608impl ListExternalAddressesRequest {
1609    /// Creates a new default instance.
1610    pub fn new() -> Self {
1611        std::default::Default::default()
1612    }
1613
1614    /// Sets the value of [parent][crate::model::ListExternalAddressesRequest::parent].
1615    ///
1616    /// # Example
1617    /// ```ignore,no_run
1618    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesRequest;
1619    /// let x = ListExternalAddressesRequest::new().set_parent("example");
1620    /// ```
1621    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1622        self.parent = v.into();
1623        self
1624    }
1625
1626    /// Sets the value of [page_size][crate::model::ListExternalAddressesRequest::page_size].
1627    ///
1628    /// # Example
1629    /// ```ignore,no_run
1630    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesRequest;
1631    /// let x = ListExternalAddressesRequest::new().set_page_size(42);
1632    /// ```
1633    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1634        self.page_size = v.into();
1635        self
1636    }
1637
1638    /// Sets the value of [page_token][crate::model::ListExternalAddressesRequest::page_token].
1639    ///
1640    /// # Example
1641    /// ```ignore,no_run
1642    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesRequest;
1643    /// let x = ListExternalAddressesRequest::new().set_page_token("example");
1644    /// ```
1645    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1646        self.page_token = v.into();
1647        self
1648    }
1649
1650    /// Sets the value of [filter][crate::model::ListExternalAddressesRequest::filter].
1651    ///
1652    /// # Example
1653    /// ```ignore,no_run
1654    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesRequest;
1655    /// let x = ListExternalAddressesRequest::new().set_filter("example");
1656    /// ```
1657    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1658        self.filter = v.into();
1659        self
1660    }
1661
1662    /// Sets the value of [order_by][crate::model::ListExternalAddressesRequest::order_by].
1663    ///
1664    /// # Example
1665    /// ```ignore,no_run
1666    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesRequest;
1667    /// let x = ListExternalAddressesRequest::new().set_order_by("example");
1668    /// ```
1669    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1670        self.order_by = v.into();
1671        self
1672    }
1673}
1674
1675impl wkt::message::Message for ListExternalAddressesRequest {
1676    fn typename() -> &'static str {
1677        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesRequest"
1678    }
1679}
1680
1681/// Response message for
1682/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1683///
1684/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1685#[derive(Clone, Default, PartialEq)]
1686#[non_exhaustive]
1687pub struct ListExternalAddressesResponse {
1688    /// A list of external IP addresses.
1689    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1690
1691    /// A token, which can be sent as `page_token` to retrieve the next page.
1692    /// If this field is omitted, there are no subsequent pages.
1693    pub next_page_token: std::string::String,
1694
1695    /// Locations that could not be reached when making an aggregated query using
1696    /// wildcards.
1697    pub unreachable: std::vec::Vec<std::string::String>,
1698
1699    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1700}
1701
1702impl ListExternalAddressesResponse {
1703    /// Creates a new default instance.
1704    pub fn new() -> Self {
1705        std::default::Default::default()
1706    }
1707
1708    /// Sets the value of [external_addresses][crate::model::ListExternalAddressesResponse::external_addresses].
1709    ///
1710    /// # Example
1711    /// ```ignore,no_run
1712    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesResponse;
1713    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
1714    /// let x = ListExternalAddressesResponse::new()
1715    ///     .set_external_addresses([
1716    ///         ExternalAddress::default()/* use setters */,
1717    ///         ExternalAddress::default()/* use (different) setters */,
1718    ///     ]);
1719    /// ```
1720    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1721    where
1722        T: std::iter::IntoIterator<Item = V>,
1723        V: std::convert::Into<crate::model::ExternalAddress>,
1724    {
1725        use std::iter::Iterator;
1726        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1727        self
1728    }
1729
1730    /// Sets the value of [next_page_token][crate::model::ListExternalAddressesResponse::next_page_token].
1731    ///
1732    /// # Example
1733    /// ```ignore,no_run
1734    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesResponse;
1735    /// let x = ListExternalAddressesResponse::new().set_next_page_token("example");
1736    /// ```
1737    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1738        self.next_page_token = v.into();
1739        self
1740    }
1741
1742    /// Sets the value of [unreachable][crate::model::ListExternalAddressesResponse::unreachable].
1743    ///
1744    /// # Example
1745    /// ```ignore,no_run
1746    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesResponse;
1747    /// let x = ListExternalAddressesResponse::new().set_unreachable(["a", "b", "c"]);
1748    /// ```
1749    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1750    where
1751        T: std::iter::IntoIterator<Item = V>,
1752        V: std::convert::Into<std::string::String>,
1753    {
1754        use std::iter::Iterator;
1755        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1756        self
1757    }
1758}
1759
1760impl wkt::message::Message for ListExternalAddressesResponse {
1761    fn typename() -> &'static str {
1762        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesResponse"
1763    }
1764}
1765
1766#[doc(hidden)]
1767impl google_cloud_gax::paginator::internal::PageableResponse for ListExternalAddressesResponse {
1768    type PageItem = crate::model::ExternalAddress;
1769
1770    fn items(self) -> std::vec::Vec<Self::PageItem> {
1771        self.external_addresses
1772    }
1773
1774    fn next_page_token(&self) -> std::string::String {
1775        use std::clone::Clone;
1776        self.next_page_token.clone()
1777    }
1778}
1779
1780/// Request message for
1781/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1782///
1783/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
1784#[derive(Clone, Default, PartialEq)]
1785#[non_exhaustive]
1786pub struct FetchNetworkPolicyExternalAddressesRequest {
1787    /// Required. The resource name of the network policy to query for assigned
1788    /// external IP addresses. Resource names are schemeless URIs that follow the
1789    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
1790    /// example:
1791    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
1792    pub network_policy: std::string::String,
1793
1794    /// The maximum number of external IP addresses to return in one page.
1795    /// The service may return fewer than this value.
1796    /// The maximum value is coerced to 1000.
1797    /// The default value of this field is 500.
1798    pub page_size: i32,
1799
1800    /// A page token, received from a previous
1801    /// `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the
1802    /// subsequent page.
1803    ///
1804    /// When paginating, all parameters provided to
1805    /// `FetchNetworkPolicyExternalAddresses`, except for `page_size` and
1806    /// `page_token`, must match the call that provided the page token.
1807    pub page_token: std::string::String,
1808
1809    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1810}
1811
1812impl FetchNetworkPolicyExternalAddressesRequest {
1813    /// Creates a new default instance.
1814    pub fn new() -> Self {
1815        std::default::Default::default()
1816    }
1817
1818    /// Sets the value of [network_policy][crate::model::FetchNetworkPolicyExternalAddressesRequest::network_policy].
1819    ///
1820    /// # Example
1821    /// ```ignore,no_run
1822    /// # use google_cloud_vmwareengine_v1::model::FetchNetworkPolicyExternalAddressesRequest;
1823    /// let x = FetchNetworkPolicyExternalAddressesRequest::new().set_network_policy("example");
1824    /// ```
1825    pub fn set_network_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1826        self.network_policy = v.into();
1827        self
1828    }
1829
1830    /// Sets the value of [page_size][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_size].
1831    ///
1832    /// # Example
1833    /// ```ignore,no_run
1834    /// # use google_cloud_vmwareengine_v1::model::FetchNetworkPolicyExternalAddressesRequest;
1835    /// let x = FetchNetworkPolicyExternalAddressesRequest::new().set_page_size(42);
1836    /// ```
1837    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1838        self.page_size = v.into();
1839        self
1840    }
1841
1842    /// Sets the value of [page_token][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_token].
1843    ///
1844    /// # Example
1845    /// ```ignore,no_run
1846    /// # use google_cloud_vmwareengine_v1::model::FetchNetworkPolicyExternalAddressesRequest;
1847    /// let x = FetchNetworkPolicyExternalAddressesRequest::new().set_page_token("example");
1848    /// ```
1849    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1850        self.page_token = v.into();
1851        self
1852    }
1853}
1854
1855impl wkt::message::Message for FetchNetworkPolicyExternalAddressesRequest {
1856    fn typename() -> &'static str {
1857        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest"
1858    }
1859}
1860
1861/// Response message for
1862/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1863///
1864/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
1865#[derive(Clone, Default, PartialEq)]
1866#[non_exhaustive]
1867pub struct FetchNetworkPolicyExternalAddressesResponse {
1868    /// A list of external IP addresses assigned to VMware workload VMs within the
1869    /// scope of the given network policy.
1870    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1871
1872    /// A token, which can be sent as `page_token` to retrieve the next page.
1873    /// If this field is omitted, there are no subsequent pages.
1874    pub next_page_token: std::string::String,
1875
1876    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1877}
1878
1879impl FetchNetworkPolicyExternalAddressesResponse {
1880    /// Creates a new default instance.
1881    pub fn new() -> Self {
1882        std::default::Default::default()
1883    }
1884
1885    /// Sets the value of [external_addresses][crate::model::FetchNetworkPolicyExternalAddressesResponse::external_addresses].
1886    ///
1887    /// # Example
1888    /// ```ignore,no_run
1889    /// # use google_cloud_vmwareengine_v1::model::FetchNetworkPolicyExternalAddressesResponse;
1890    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
1891    /// let x = FetchNetworkPolicyExternalAddressesResponse::new()
1892    ///     .set_external_addresses([
1893    ///         ExternalAddress::default()/* use setters */,
1894    ///         ExternalAddress::default()/* use (different) setters */,
1895    ///     ]);
1896    /// ```
1897    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1898    where
1899        T: std::iter::IntoIterator<Item = V>,
1900        V: std::convert::Into<crate::model::ExternalAddress>,
1901    {
1902        use std::iter::Iterator;
1903        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1904        self
1905    }
1906
1907    /// Sets the value of [next_page_token][crate::model::FetchNetworkPolicyExternalAddressesResponse::next_page_token].
1908    ///
1909    /// # Example
1910    /// ```ignore,no_run
1911    /// # use google_cloud_vmwareengine_v1::model::FetchNetworkPolicyExternalAddressesResponse;
1912    /// let x = FetchNetworkPolicyExternalAddressesResponse::new().set_next_page_token("example");
1913    /// ```
1914    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1915        self.next_page_token = v.into();
1916        self
1917    }
1918}
1919
1920impl wkt::message::Message for FetchNetworkPolicyExternalAddressesResponse {
1921    fn typename() -> &'static str {
1922        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesResponse"
1923    }
1924}
1925
1926#[doc(hidden)]
1927impl google_cloud_gax::paginator::internal::PageableResponse
1928    for FetchNetworkPolicyExternalAddressesResponse
1929{
1930    type PageItem = crate::model::ExternalAddress;
1931
1932    fn items(self) -> std::vec::Vec<Self::PageItem> {
1933        self.external_addresses
1934    }
1935
1936    fn next_page_token(&self) -> std::string::String {
1937        use std::clone::Clone;
1938        self.next_page_token.clone()
1939    }
1940}
1941
1942/// Request message for
1943/// [VmwareEngine.GetExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]
1944///
1945/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]: crate::client::VmwareEngine::get_external_address
1946#[derive(Clone, Default, PartialEq)]
1947#[non_exhaustive]
1948pub struct GetExternalAddressRequest {
1949    /// Required. The resource name of the external IP address to retrieve.
1950    /// Resource names are schemeless URIs that follow the conventions in
1951    /// <https://cloud.google.com/apis/design/resource_names>.
1952    /// For example:
1953    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
1954    pub name: std::string::String,
1955
1956    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1957}
1958
1959impl GetExternalAddressRequest {
1960    /// Creates a new default instance.
1961    pub fn new() -> Self {
1962        std::default::Default::default()
1963    }
1964
1965    /// Sets the value of [name][crate::model::GetExternalAddressRequest::name].
1966    ///
1967    /// # Example
1968    /// ```ignore,no_run
1969    /// # use google_cloud_vmwareengine_v1::model::GetExternalAddressRequest;
1970    /// let x = GetExternalAddressRequest::new().set_name("example");
1971    /// ```
1972    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1973        self.name = v.into();
1974        self
1975    }
1976}
1977
1978impl wkt::message::Message for GetExternalAddressRequest {
1979    fn typename() -> &'static str {
1980        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAddressRequest"
1981    }
1982}
1983
1984/// Request message for
1985/// [VmwareEngine.CreateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]
1986///
1987/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]: crate::client::VmwareEngine::create_external_address
1988#[derive(Clone, Default, PartialEq)]
1989#[non_exhaustive]
1990pub struct CreateExternalAddressRequest {
1991    /// Required. The resource name of the private cloud
1992    /// to create a new external IP address in.
1993    /// Resource names are schemeless URIs that follow the conventions in
1994    /// <https://cloud.google.com/apis/design/resource_names>.
1995    /// For example:
1996    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1997    pub parent: std::string::String,
1998
1999    /// Required. The initial description of a new external IP address.
2000    pub external_address: std::option::Option<crate::model::ExternalAddress>,
2001
2002    /// Required. The user-provided identifier of the `ExternalAddress` to be
2003    /// created. This identifier must be unique among `ExternalAddress` resources
2004    /// within the parent and becomes the final token in the name URI. The
2005    /// identifier must meet the following requirements:
2006    ///
2007    /// * Only contains 1-63 alphanumeric characters and hyphens
2008    /// * Begins with an alphabetical character
2009    /// * Ends with a non-hyphen character
2010    /// * Not formatted as a UUID
2011    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
2012    ///   (section 3.5)
2013    pub external_address_id: std::string::String,
2014
2015    /// Optional. A request ID to identify requests. Specify a unique request ID
2016    /// so that if you must retry your request, the server will know to ignore
2017    /// the request if it has already been completed. The server guarantees that a
2018    /// request doesn't result in creation of duplicate commitments for at least 60
2019    /// minutes.
2020    ///
2021    /// For example, consider a situation where you make an initial request and the
2022    /// request times out. If you make the request again with the same request ID,
2023    /// the server can check if the original operation with the same request ID was
2024    /// received, and if so, will ignore the second request. This prevents clients
2025    /// from accidentally creating duplicate commitments.
2026    ///
2027    /// The request ID must be a valid UUID with the exception that zero UUID is
2028    /// not supported (00000000-0000-0000-0000-000000000000).
2029    pub request_id: std::string::String,
2030
2031    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2032}
2033
2034impl CreateExternalAddressRequest {
2035    /// Creates a new default instance.
2036    pub fn new() -> Self {
2037        std::default::Default::default()
2038    }
2039
2040    /// Sets the value of [parent][crate::model::CreateExternalAddressRequest::parent].
2041    ///
2042    /// # Example
2043    /// ```ignore,no_run
2044    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAddressRequest;
2045    /// let x = CreateExternalAddressRequest::new().set_parent("example");
2046    /// ```
2047    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2048        self.parent = v.into();
2049        self
2050    }
2051
2052    /// Sets the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
2053    ///
2054    /// # Example
2055    /// ```ignore,no_run
2056    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAddressRequest;
2057    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
2058    /// let x = CreateExternalAddressRequest::new().set_external_address(ExternalAddress::default()/* use setters */);
2059    /// ```
2060    pub fn set_external_address<T>(mut self, v: T) -> Self
2061    where
2062        T: std::convert::Into<crate::model::ExternalAddress>,
2063    {
2064        self.external_address = std::option::Option::Some(v.into());
2065        self
2066    }
2067
2068    /// Sets or clears the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
2069    ///
2070    /// # Example
2071    /// ```ignore,no_run
2072    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAddressRequest;
2073    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
2074    /// let x = CreateExternalAddressRequest::new().set_or_clear_external_address(Some(ExternalAddress::default()/* use setters */));
2075    /// let x = CreateExternalAddressRequest::new().set_or_clear_external_address(None::<ExternalAddress>);
2076    /// ```
2077    pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2078    where
2079        T: std::convert::Into<crate::model::ExternalAddress>,
2080    {
2081        self.external_address = v.map(|x| x.into());
2082        self
2083    }
2084
2085    /// Sets the value of [external_address_id][crate::model::CreateExternalAddressRequest::external_address_id].
2086    ///
2087    /// # Example
2088    /// ```ignore,no_run
2089    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAddressRequest;
2090    /// let x = CreateExternalAddressRequest::new().set_external_address_id("example");
2091    /// ```
2092    pub fn set_external_address_id<T: std::convert::Into<std::string::String>>(
2093        mut self,
2094        v: T,
2095    ) -> Self {
2096        self.external_address_id = v.into();
2097        self
2098    }
2099
2100    /// Sets the value of [request_id][crate::model::CreateExternalAddressRequest::request_id].
2101    ///
2102    /// # Example
2103    /// ```ignore,no_run
2104    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAddressRequest;
2105    /// let x = CreateExternalAddressRequest::new().set_request_id("example");
2106    /// ```
2107    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2108        self.request_id = v.into();
2109        self
2110    }
2111}
2112
2113impl wkt::message::Message for CreateExternalAddressRequest {
2114    fn typename() -> &'static str {
2115        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAddressRequest"
2116    }
2117}
2118
2119/// Request message for
2120/// [VmwareEngine.UpdateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]
2121///
2122/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]: crate::client::VmwareEngine::update_external_address
2123#[derive(Clone, Default, PartialEq)]
2124#[non_exhaustive]
2125pub struct UpdateExternalAddressRequest {
2126    /// Required. Field mask is used to specify the fields to be overwritten in the
2127    /// `ExternalAddress` resource by the update.
2128    /// The fields specified in the `update_mask` are relative to the resource, not
2129    /// the full request. A field will be overwritten if it is in the mask. If the
2130    /// user does not provide a mask then all fields will be overwritten.
2131    pub update_mask: std::option::Option<wkt::FieldMask>,
2132
2133    /// Required. External IP address description.
2134    pub external_address: std::option::Option<crate::model::ExternalAddress>,
2135
2136    /// Optional. A request ID to identify requests. Specify a unique request ID
2137    /// so that if you must retry your request, the server will know to ignore
2138    /// the request if it has already been completed. The server guarantees that a
2139    /// request doesn't result in creation of duplicate commitments for at least 60
2140    /// minutes.
2141    ///
2142    /// For example, consider a situation where you make an initial request and the
2143    /// request times out. If you make the request again with the same request ID,
2144    /// the server can check if the original operation with the same request ID was
2145    /// received, and if so, will ignore the second request. This prevents clients
2146    /// from accidentally creating duplicate commitments.
2147    ///
2148    /// The request ID must be a valid UUID with the exception that zero UUID is
2149    /// not supported (00000000-0000-0000-0000-000000000000).
2150    pub request_id: std::string::String,
2151
2152    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2153}
2154
2155impl UpdateExternalAddressRequest {
2156    /// Creates a new default instance.
2157    pub fn new() -> Self {
2158        std::default::Default::default()
2159    }
2160
2161    /// Sets the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
2162    ///
2163    /// # Example
2164    /// ```ignore,no_run
2165    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAddressRequest;
2166    /// use wkt::FieldMask;
2167    /// let x = UpdateExternalAddressRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2168    /// ```
2169    pub fn set_update_mask<T>(mut self, v: T) -> Self
2170    where
2171        T: std::convert::Into<wkt::FieldMask>,
2172    {
2173        self.update_mask = std::option::Option::Some(v.into());
2174        self
2175    }
2176
2177    /// Sets or clears the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
2178    ///
2179    /// # Example
2180    /// ```ignore,no_run
2181    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAddressRequest;
2182    /// use wkt::FieldMask;
2183    /// let x = UpdateExternalAddressRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2184    /// let x = UpdateExternalAddressRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2185    /// ```
2186    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2187    where
2188        T: std::convert::Into<wkt::FieldMask>,
2189    {
2190        self.update_mask = v.map(|x| x.into());
2191        self
2192    }
2193
2194    /// Sets the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
2195    ///
2196    /// # Example
2197    /// ```ignore,no_run
2198    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAddressRequest;
2199    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
2200    /// let x = UpdateExternalAddressRequest::new().set_external_address(ExternalAddress::default()/* use setters */);
2201    /// ```
2202    pub fn set_external_address<T>(mut self, v: T) -> Self
2203    where
2204        T: std::convert::Into<crate::model::ExternalAddress>,
2205    {
2206        self.external_address = std::option::Option::Some(v.into());
2207        self
2208    }
2209
2210    /// Sets or clears the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
2211    ///
2212    /// # Example
2213    /// ```ignore,no_run
2214    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAddressRequest;
2215    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
2216    /// let x = UpdateExternalAddressRequest::new().set_or_clear_external_address(Some(ExternalAddress::default()/* use setters */));
2217    /// let x = UpdateExternalAddressRequest::new().set_or_clear_external_address(None::<ExternalAddress>);
2218    /// ```
2219    pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2220    where
2221        T: std::convert::Into<crate::model::ExternalAddress>,
2222    {
2223        self.external_address = v.map(|x| x.into());
2224        self
2225    }
2226
2227    /// Sets the value of [request_id][crate::model::UpdateExternalAddressRequest::request_id].
2228    ///
2229    /// # Example
2230    /// ```ignore,no_run
2231    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAddressRequest;
2232    /// let x = UpdateExternalAddressRequest::new().set_request_id("example");
2233    /// ```
2234    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2235        self.request_id = v.into();
2236        self
2237    }
2238}
2239
2240impl wkt::message::Message for UpdateExternalAddressRequest {
2241    fn typename() -> &'static str {
2242        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAddressRequest"
2243    }
2244}
2245
2246/// Request message for
2247/// [VmwareEngine.DeleteExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]
2248///
2249/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]: crate::client::VmwareEngine::delete_external_address
2250#[derive(Clone, Default, PartialEq)]
2251#[non_exhaustive]
2252pub struct DeleteExternalAddressRequest {
2253    /// Required. The resource name of the external IP address to delete.
2254    /// Resource names are schemeless URIs that follow the conventions in
2255    /// <https://cloud.google.com/apis/design/resource_names>.
2256    /// For example:
2257    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
2258    pub name: std::string::String,
2259
2260    /// Optional. A request ID to identify requests. Specify a unique request ID
2261    /// so that if you must retry your request, the server will know to ignore
2262    /// the request if it has already been completed. The server guarantees that a
2263    /// request doesn't result in creation of duplicate commitments for at least 60
2264    /// minutes.
2265    ///
2266    /// For example, consider a situation where you make an initial request and the
2267    /// request times out. If you make the request again with the same request
2268    /// ID, the server can check if the original operation with the same request ID
2269    /// was received, and if so, will ignore the second request. This prevents
2270    /// clients from accidentally creating duplicate commitments.
2271    ///
2272    /// The request ID must be a valid UUID with the exception that zero UUID is
2273    /// not supported (00000000-0000-0000-0000-000000000000).
2274    pub request_id: std::string::String,
2275
2276    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2277}
2278
2279impl DeleteExternalAddressRequest {
2280    /// Creates a new default instance.
2281    pub fn new() -> Self {
2282        std::default::Default::default()
2283    }
2284
2285    /// Sets the value of [name][crate::model::DeleteExternalAddressRequest::name].
2286    ///
2287    /// # Example
2288    /// ```ignore,no_run
2289    /// # use google_cloud_vmwareengine_v1::model::DeleteExternalAddressRequest;
2290    /// let x = DeleteExternalAddressRequest::new().set_name("example");
2291    /// ```
2292    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2293        self.name = v.into();
2294        self
2295    }
2296
2297    /// Sets the value of [request_id][crate::model::DeleteExternalAddressRequest::request_id].
2298    ///
2299    /// # Example
2300    /// ```ignore,no_run
2301    /// # use google_cloud_vmwareengine_v1::model::DeleteExternalAddressRequest;
2302    /// let x = DeleteExternalAddressRequest::new().set_request_id("example");
2303    /// ```
2304    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2305        self.request_id = v.into();
2306        self
2307    }
2308}
2309
2310impl wkt::message::Message for DeleteExternalAddressRequest {
2311    fn typename() -> &'static str {
2312        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAddressRequest"
2313    }
2314}
2315
2316/// Request message for
2317/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
2318///
2319/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
2320#[derive(Clone, Default, PartialEq)]
2321#[non_exhaustive]
2322pub struct ListSubnetsRequest {
2323    /// Required. The resource name of the private cloud to be queried for
2324    /// subnets.
2325    /// Resource names are schemeless URIs that follow the conventions in
2326    /// <https://cloud.google.com/apis/design/resource_names>.
2327    /// For example:
2328    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
2329    pub parent: std::string::String,
2330
2331    /// The maximum number of subnets to return in one page.
2332    /// The service may return fewer than this value.
2333    /// The maximum value is coerced to 1000.
2334    /// The default value of this field is 500.
2335    pub page_size: i32,
2336
2337    /// A page token, received from a previous `ListSubnetsRequest` call.
2338    /// Provide this to retrieve the subsequent page.
2339    ///
2340    /// When paginating, all other parameters provided to
2341    /// `ListSubnetsRequest` must match the call that provided the page token.
2342    pub page_token: std::string::String,
2343
2344    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2345}
2346
2347impl ListSubnetsRequest {
2348    /// Creates a new default instance.
2349    pub fn new() -> Self {
2350        std::default::Default::default()
2351    }
2352
2353    /// Sets the value of [parent][crate::model::ListSubnetsRequest::parent].
2354    ///
2355    /// # Example
2356    /// ```ignore,no_run
2357    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsRequest;
2358    /// let x = ListSubnetsRequest::new().set_parent("example");
2359    /// ```
2360    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2361        self.parent = v.into();
2362        self
2363    }
2364
2365    /// Sets the value of [page_size][crate::model::ListSubnetsRequest::page_size].
2366    ///
2367    /// # Example
2368    /// ```ignore,no_run
2369    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsRequest;
2370    /// let x = ListSubnetsRequest::new().set_page_size(42);
2371    /// ```
2372    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2373        self.page_size = v.into();
2374        self
2375    }
2376
2377    /// Sets the value of [page_token][crate::model::ListSubnetsRequest::page_token].
2378    ///
2379    /// # Example
2380    /// ```ignore,no_run
2381    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsRequest;
2382    /// let x = ListSubnetsRequest::new().set_page_token("example");
2383    /// ```
2384    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2385        self.page_token = v.into();
2386        self
2387    }
2388}
2389
2390impl wkt::message::Message for ListSubnetsRequest {
2391    fn typename() -> &'static str {
2392        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsRequest"
2393    }
2394}
2395
2396/// Response message for
2397/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
2398///
2399/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
2400#[derive(Clone, Default, PartialEq)]
2401#[non_exhaustive]
2402pub struct ListSubnetsResponse {
2403    /// A list of subnets.
2404    pub subnets: std::vec::Vec<crate::model::Subnet>,
2405
2406    /// A token, which can be sent as `page_token` to retrieve the next page.
2407    /// If this field is omitted, there are no subsequent pages.
2408    pub next_page_token: std::string::String,
2409
2410    /// Locations that could not be reached when making an aggregated query using
2411    /// wildcards.
2412    pub unreachable: std::vec::Vec<std::string::String>,
2413
2414    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2415}
2416
2417impl ListSubnetsResponse {
2418    /// Creates a new default instance.
2419    pub fn new() -> Self {
2420        std::default::Default::default()
2421    }
2422
2423    /// Sets the value of [subnets][crate::model::ListSubnetsResponse::subnets].
2424    ///
2425    /// # Example
2426    /// ```ignore,no_run
2427    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsResponse;
2428    /// use google_cloud_vmwareengine_v1::model::Subnet;
2429    /// let x = ListSubnetsResponse::new()
2430    ///     .set_subnets([
2431    ///         Subnet::default()/* use setters */,
2432    ///         Subnet::default()/* use (different) setters */,
2433    ///     ]);
2434    /// ```
2435    pub fn set_subnets<T, V>(mut self, v: T) -> Self
2436    where
2437        T: std::iter::IntoIterator<Item = V>,
2438        V: std::convert::Into<crate::model::Subnet>,
2439    {
2440        use std::iter::Iterator;
2441        self.subnets = v.into_iter().map(|i| i.into()).collect();
2442        self
2443    }
2444
2445    /// Sets the value of [next_page_token][crate::model::ListSubnetsResponse::next_page_token].
2446    ///
2447    /// # Example
2448    /// ```ignore,no_run
2449    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsResponse;
2450    /// let x = ListSubnetsResponse::new().set_next_page_token("example");
2451    /// ```
2452    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2453        self.next_page_token = v.into();
2454        self
2455    }
2456
2457    /// Sets the value of [unreachable][crate::model::ListSubnetsResponse::unreachable].
2458    ///
2459    /// # Example
2460    /// ```ignore,no_run
2461    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsResponse;
2462    /// let x = ListSubnetsResponse::new().set_unreachable(["a", "b", "c"]);
2463    /// ```
2464    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2465    where
2466        T: std::iter::IntoIterator<Item = V>,
2467        V: std::convert::Into<std::string::String>,
2468    {
2469        use std::iter::Iterator;
2470        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2471        self
2472    }
2473}
2474
2475impl wkt::message::Message for ListSubnetsResponse {
2476    fn typename() -> &'static str {
2477        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsResponse"
2478    }
2479}
2480
2481#[doc(hidden)]
2482impl google_cloud_gax::paginator::internal::PageableResponse for ListSubnetsResponse {
2483    type PageItem = crate::model::Subnet;
2484
2485    fn items(self) -> std::vec::Vec<Self::PageItem> {
2486        self.subnets
2487    }
2488
2489    fn next_page_token(&self) -> std::string::String {
2490        use std::clone::Clone;
2491        self.next_page_token.clone()
2492    }
2493}
2494
2495/// Request message for
2496/// [VmwareEngine.GetSubnet][google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]
2497///
2498/// [google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]: crate::client::VmwareEngine::get_subnet
2499#[derive(Clone, Default, PartialEq)]
2500#[non_exhaustive]
2501pub struct GetSubnetRequest {
2502    /// Required. The resource name of the subnet to retrieve.
2503    /// Resource names are schemeless URIs that follow the conventions in
2504    /// <https://cloud.google.com/apis/design/resource_names>.
2505    /// For example:
2506    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
2507    pub name: std::string::String,
2508
2509    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2510}
2511
2512impl GetSubnetRequest {
2513    /// Creates a new default instance.
2514    pub fn new() -> Self {
2515        std::default::Default::default()
2516    }
2517
2518    /// Sets the value of [name][crate::model::GetSubnetRequest::name].
2519    ///
2520    /// # Example
2521    /// ```ignore,no_run
2522    /// # use google_cloud_vmwareengine_v1::model::GetSubnetRequest;
2523    /// let x = GetSubnetRequest::new().set_name("example");
2524    /// ```
2525    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2526        self.name = v.into();
2527        self
2528    }
2529}
2530
2531impl wkt::message::Message for GetSubnetRequest {
2532    fn typename() -> &'static str {
2533        "type.googleapis.com/google.cloud.vmwareengine.v1.GetSubnetRequest"
2534    }
2535}
2536
2537/// Request message for
2538/// [VmwareEngine.UpdateSubnet][google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]
2539///
2540/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]: crate::client::VmwareEngine::update_subnet
2541#[derive(Clone, Default, PartialEq)]
2542#[non_exhaustive]
2543pub struct UpdateSubnetRequest {
2544    /// Required. Field mask is used to specify the fields to be overwritten in the
2545    /// `Subnet` resource by the update.
2546    /// The fields specified in the `update_mask` are relative to the resource, not
2547    /// the full request. A field will be overwritten if it is in the mask. If the
2548    /// user does not provide a mask then all fields will be overwritten.
2549    pub update_mask: std::option::Option<wkt::FieldMask>,
2550
2551    /// Required. Subnet description.
2552    pub subnet: std::option::Option<crate::model::Subnet>,
2553
2554    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2555}
2556
2557impl UpdateSubnetRequest {
2558    /// Creates a new default instance.
2559    pub fn new() -> Self {
2560        std::default::Default::default()
2561    }
2562
2563    /// Sets the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
2564    ///
2565    /// # Example
2566    /// ```ignore,no_run
2567    /// # use google_cloud_vmwareengine_v1::model::UpdateSubnetRequest;
2568    /// use wkt::FieldMask;
2569    /// let x = UpdateSubnetRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2570    /// ```
2571    pub fn set_update_mask<T>(mut self, v: T) -> Self
2572    where
2573        T: std::convert::Into<wkt::FieldMask>,
2574    {
2575        self.update_mask = std::option::Option::Some(v.into());
2576        self
2577    }
2578
2579    /// Sets or clears the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
2580    ///
2581    /// # Example
2582    /// ```ignore,no_run
2583    /// # use google_cloud_vmwareengine_v1::model::UpdateSubnetRequest;
2584    /// use wkt::FieldMask;
2585    /// let x = UpdateSubnetRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2586    /// let x = UpdateSubnetRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2587    /// ```
2588    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2589    where
2590        T: std::convert::Into<wkt::FieldMask>,
2591    {
2592        self.update_mask = v.map(|x| x.into());
2593        self
2594    }
2595
2596    /// Sets the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
2597    ///
2598    /// # Example
2599    /// ```ignore,no_run
2600    /// # use google_cloud_vmwareengine_v1::model::UpdateSubnetRequest;
2601    /// use google_cloud_vmwareengine_v1::model::Subnet;
2602    /// let x = UpdateSubnetRequest::new().set_subnet(Subnet::default()/* use setters */);
2603    /// ```
2604    pub fn set_subnet<T>(mut self, v: T) -> Self
2605    where
2606        T: std::convert::Into<crate::model::Subnet>,
2607    {
2608        self.subnet = std::option::Option::Some(v.into());
2609        self
2610    }
2611
2612    /// Sets or clears the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
2613    ///
2614    /// # Example
2615    /// ```ignore,no_run
2616    /// # use google_cloud_vmwareengine_v1::model::UpdateSubnetRequest;
2617    /// use google_cloud_vmwareengine_v1::model::Subnet;
2618    /// let x = UpdateSubnetRequest::new().set_or_clear_subnet(Some(Subnet::default()/* use setters */));
2619    /// let x = UpdateSubnetRequest::new().set_or_clear_subnet(None::<Subnet>);
2620    /// ```
2621    pub fn set_or_clear_subnet<T>(mut self, v: std::option::Option<T>) -> Self
2622    where
2623        T: std::convert::Into<crate::model::Subnet>,
2624    {
2625        self.subnet = v.map(|x| x.into());
2626        self
2627    }
2628}
2629
2630impl wkt::message::Message for UpdateSubnetRequest {
2631    fn typename() -> &'static str {
2632        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateSubnetRequest"
2633    }
2634}
2635
2636/// Request message for
2637/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
2638///
2639/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
2640#[derive(Clone, Default, PartialEq)]
2641#[non_exhaustive]
2642pub struct ListExternalAccessRulesRequest {
2643    /// Required. The resource name of the network policy to query for external
2644    /// access firewall rules. Resource names are schemeless URIs that follow the
2645    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
2646    /// example:
2647    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
2648    pub parent: std::string::String,
2649
2650    /// The maximum number of external access rules to return in one page.
2651    /// The service may return fewer than this value.
2652    /// The maximum value is coerced to 1000.
2653    /// The default value of this field is 500.
2654    pub page_size: i32,
2655
2656    /// A page token, received from a previous `ListExternalAccessRulesRequest`
2657    /// call. Provide this to retrieve the subsequent page.
2658    ///
2659    /// When paginating, all other parameters provided to
2660    /// `ListExternalAccessRulesRequest` must match the call that provided the page
2661    /// token.
2662    pub page_token: std::string::String,
2663
2664    /// A filter expression that matches resources returned in the response.
2665    /// The expression must specify the field name, a comparison
2666    /// operator, and the value that you want to use for filtering. The value
2667    /// must be a string, a number, or a boolean. The comparison operator
2668    /// must be `=`, `!=`, `>`, or `<`.
2669    ///
2670    /// For example, if you are filtering a list of external access rules, you can
2671    /// exclude the ones named `example-rule` by specifying
2672    /// `name != "example-rule"`.
2673    ///
2674    /// To filter on multiple expressions, provide each separate expression within
2675    /// parentheses. For example:
2676    ///
2677    /// ```norust
2678    /// (name = "example-rule")
2679    /// (createTime > "2021-04-12T08:15:10.40Z")
2680    /// ```
2681    ///
2682    /// By default, each expression is an `AND` expression. However, you
2683    /// can include `AND` and `OR` expressions explicitly.
2684    /// For example:
2685    ///
2686    /// ```norust
2687    /// (name = "example-rule-1") AND
2688    /// (createTime > "2021-04-12T08:15:10.40Z") OR
2689    /// (name = "example-rule-2")
2690    /// ```
2691    pub filter: std::string::String,
2692
2693    /// Sorts list results by a certain order. By default, returned results
2694    /// are ordered by `name` in ascending order.
2695    /// You can also sort results in descending order based on the `name` value
2696    /// using `orderBy="name desc"`.
2697    /// Currently, only ordering by `name` is supported.
2698    pub order_by: std::string::String,
2699
2700    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2701}
2702
2703impl ListExternalAccessRulesRequest {
2704    /// Creates a new default instance.
2705    pub fn new() -> Self {
2706        std::default::Default::default()
2707    }
2708
2709    /// Sets the value of [parent][crate::model::ListExternalAccessRulesRequest::parent].
2710    ///
2711    /// # Example
2712    /// ```ignore,no_run
2713    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesRequest;
2714    /// let x = ListExternalAccessRulesRequest::new().set_parent("example");
2715    /// ```
2716    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2717        self.parent = v.into();
2718        self
2719    }
2720
2721    /// Sets the value of [page_size][crate::model::ListExternalAccessRulesRequest::page_size].
2722    ///
2723    /// # Example
2724    /// ```ignore,no_run
2725    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesRequest;
2726    /// let x = ListExternalAccessRulesRequest::new().set_page_size(42);
2727    /// ```
2728    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2729        self.page_size = v.into();
2730        self
2731    }
2732
2733    /// Sets the value of [page_token][crate::model::ListExternalAccessRulesRequest::page_token].
2734    ///
2735    /// # Example
2736    /// ```ignore,no_run
2737    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesRequest;
2738    /// let x = ListExternalAccessRulesRequest::new().set_page_token("example");
2739    /// ```
2740    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2741        self.page_token = v.into();
2742        self
2743    }
2744
2745    /// Sets the value of [filter][crate::model::ListExternalAccessRulesRequest::filter].
2746    ///
2747    /// # Example
2748    /// ```ignore,no_run
2749    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesRequest;
2750    /// let x = ListExternalAccessRulesRequest::new().set_filter("example");
2751    /// ```
2752    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2753        self.filter = v.into();
2754        self
2755    }
2756
2757    /// Sets the value of [order_by][crate::model::ListExternalAccessRulesRequest::order_by].
2758    ///
2759    /// # Example
2760    /// ```ignore,no_run
2761    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesRequest;
2762    /// let x = ListExternalAccessRulesRequest::new().set_order_by("example");
2763    /// ```
2764    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2765        self.order_by = v.into();
2766        self
2767    }
2768}
2769
2770impl wkt::message::Message for ListExternalAccessRulesRequest {
2771    fn typename() -> &'static str {
2772        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest"
2773    }
2774}
2775
2776/// Response message for
2777/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
2778///
2779/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
2780#[derive(Clone, Default, PartialEq)]
2781#[non_exhaustive]
2782pub struct ListExternalAccessRulesResponse {
2783    /// A list of external access firewall rules.
2784    pub external_access_rules: std::vec::Vec<crate::model::ExternalAccessRule>,
2785
2786    /// A token, which can be sent as `page_token` to retrieve the next page.
2787    /// If this field is omitted, there are no subsequent pages.
2788    pub next_page_token: std::string::String,
2789
2790    /// Locations that could not be reached when making an aggregated query using
2791    /// wildcards.
2792    pub unreachable: std::vec::Vec<std::string::String>,
2793
2794    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2795}
2796
2797impl ListExternalAccessRulesResponse {
2798    /// Creates a new default instance.
2799    pub fn new() -> Self {
2800        std::default::Default::default()
2801    }
2802
2803    /// Sets the value of [external_access_rules][crate::model::ListExternalAccessRulesResponse::external_access_rules].
2804    ///
2805    /// # Example
2806    /// ```ignore,no_run
2807    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesResponse;
2808    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
2809    /// let x = ListExternalAccessRulesResponse::new()
2810    ///     .set_external_access_rules([
2811    ///         ExternalAccessRule::default()/* use setters */,
2812    ///         ExternalAccessRule::default()/* use (different) setters */,
2813    ///     ]);
2814    /// ```
2815    pub fn set_external_access_rules<T, V>(mut self, v: T) -> Self
2816    where
2817        T: std::iter::IntoIterator<Item = V>,
2818        V: std::convert::Into<crate::model::ExternalAccessRule>,
2819    {
2820        use std::iter::Iterator;
2821        self.external_access_rules = v.into_iter().map(|i| i.into()).collect();
2822        self
2823    }
2824
2825    /// Sets the value of [next_page_token][crate::model::ListExternalAccessRulesResponse::next_page_token].
2826    ///
2827    /// # Example
2828    /// ```ignore,no_run
2829    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesResponse;
2830    /// let x = ListExternalAccessRulesResponse::new().set_next_page_token("example");
2831    /// ```
2832    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2833        self.next_page_token = v.into();
2834        self
2835    }
2836
2837    /// Sets the value of [unreachable][crate::model::ListExternalAccessRulesResponse::unreachable].
2838    ///
2839    /// # Example
2840    /// ```ignore,no_run
2841    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesResponse;
2842    /// let x = ListExternalAccessRulesResponse::new().set_unreachable(["a", "b", "c"]);
2843    /// ```
2844    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2845    where
2846        T: std::iter::IntoIterator<Item = V>,
2847        V: std::convert::Into<std::string::String>,
2848    {
2849        use std::iter::Iterator;
2850        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2851        self
2852    }
2853}
2854
2855impl wkt::message::Message for ListExternalAccessRulesResponse {
2856    fn typename() -> &'static str {
2857        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesResponse"
2858    }
2859}
2860
2861#[doc(hidden)]
2862impl google_cloud_gax::paginator::internal::PageableResponse for ListExternalAccessRulesResponse {
2863    type PageItem = crate::model::ExternalAccessRule;
2864
2865    fn items(self) -> std::vec::Vec<Self::PageItem> {
2866        self.external_access_rules
2867    }
2868
2869    fn next_page_token(&self) -> std::string::String {
2870        use std::clone::Clone;
2871        self.next_page_token.clone()
2872    }
2873}
2874
2875/// Request message for
2876/// [VmwareEngine.GetExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]
2877///
2878/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]: crate::client::VmwareEngine::get_external_access_rule
2879#[derive(Clone, Default, PartialEq)]
2880#[non_exhaustive]
2881pub struct GetExternalAccessRuleRequest {
2882    /// Required. The resource name of the external access firewall rule to
2883    /// retrieve. Resource names are schemeless URIs that follow the conventions in
2884    /// <https://cloud.google.com/apis/design/resource_names>.
2885    /// For example:
2886    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
2887    pub name: std::string::String,
2888
2889    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2890}
2891
2892impl GetExternalAccessRuleRequest {
2893    /// Creates a new default instance.
2894    pub fn new() -> Self {
2895        std::default::Default::default()
2896    }
2897
2898    /// Sets the value of [name][crate::model::GetExternalAccessRuleRequest::name].
2899    ///
2900    /// # Example
2901    /// ```ignore,no_run
2902    /// # use google_cloud_vmwareengine_v1::model::GetExternalAccessRuleRequest;
2903    /// let x = GetExternalAccessRuleRequest::new().set_name("example");
2904    /// ```
2905    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2906        self.name = v.into();
2907        self
2908    }
2909}
2910
2911impl wkt::message::Message for GetExternalAccessRuleRequest {
2912    fn typename() -> &'static str {
2913        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest"
2914    }
2915}
2916
2917/// Request message for
2918/// [VmwareEngine.CreateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]
2919///
2920/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]: crate::client::VmwareEngine::create_external_access_rule
2921#[derive(Clone, Default, PartialEq)]
2922#[non_exhaustive]
2923pub struct CreateExternalAccessRuleRequest {
2924    /// Required. The resource name of the network policy
2925    /// to create a new external access firewall rule in.
2926    /// Resource names are schemeless URIs that follow the conventions in
2927    /// <https://cloud.google.com/apis/design/resource_names>.
2928    /// For example:
2929    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
2930    pub parent: std::string::String,
2931
2932    /// Required. The initial description of a new external access rule.
2933    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2934
2935    /// Required. The user-provided identifier of the `ExternalAccessRule` to be
2936    /// created. This identifier must be unique among `ExternalAccessRule`
2937    /// resources within the parent and becomes the final token in the name URI.
2938    /// The identifier must meet the following requirements:
2939    ///
2940    /// * Only contains 1-63 alphanumeric characters and hyphens
2941    /// * Begins with an alphabetical character
2942    /// * Ends with a non-hyphen character
2943    /// * Not formatted as a UUID
2944    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
2945    ///   (section 3.5)
2946    pub external_access_rule_id: std::string::String,
2947
2948    /// A request ID to identify requests. Specify a unique request ID
2949    /// so that if you must retry your request, the server will know to ignore
2950    /// the request if it has already been completed. The server guarantees that a
2951    /// request doesn't result in creation of duplicate commitments for at least 60
2952    /// minutes.
2953    ///
2954    /// For example, consider a situation where you make an initial request and the
2955    /// request times out. If you make the request again with the same request ID,
2956    /// the server can check if the original operation with the same request ID was
2957    /// received, and if so, will ignore the second request. This prevents clients
2958    /// from accidentally creating duplicate commitments.
2959    ///
2960    /// The request ID must be a valid UUID with the exception that zero UUID is
2961    /// not supported (00000000-0000-0000-0000-000000000000).
2962    pub request_id: std::string::String,
2963
2964    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2965}
2966
2967impl CreateExternalAccessRuleRequest {
2968    /// Creates a new default instance.
2969    pub fn new() -> Self {
2970        std::default::Default::default()
2971    }
2972
2973    /// Sets the value of [parent][crate::model::CreateExternalAccessRuleRequest::parent].
2974    ///
2975    /// # Example
2976    /// ```ignore,no_run
2977    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAccessRuleRequest;
2978    /// let x = CreateExternalAccessRuleRequest::new().set_parent("example");
2979    /// ```
2980    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2981        self.parent = v.into();
2982        self
2983    }
2984
2985    /// Sets the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
2986    ///
2987    /// # Example
2988    /// ```ignore,no_run
2989    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAccessRuleRequest;
2990    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
2991    /// let x = CreateExternalAccessRuleRequest::new().set_external_access_rule(ExternalAccessRule::default()/* use setters */);
2992    /// ```
2993    pub fn set_external_access_rule<T>(mut self, v: T) -> Self
2994    where
2995        T: std::convert::Into<crate::model::ExternalAccessRule>,
2996    {
2997        self.external_access_rule = std::option::Option::Some(v.into());
2998        self
2999    }
3000
3001    /// Sets or clears the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
3002    ///
3003    /// # Example
3004    /// ```ignore,no_run
3005    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAccessRuleRequest;
3006    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
3007    /// let x = CreateExternalAccessRuleRequest::new().set_or_clear_external_access_rule(Some(ExternalAccessRule::default()/* use setters */));
3008    /// let x = CreateExternalAccessRuleRequest::new().set_or_clear_external_access_rule(None::<ExternalAccessRule>);
3009    /// ```
3010    pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
3011    where
3012        T: std::convert::Into<crate::model::ExternalAccessRule>,
3013    {
3014        self.external_access_rule = v.map(|x| x.into());
3015        self
3016    }
3017
3018    /// Sets the value of [external_access_rule_id][crate::model::CreateExternalAccessRuleRequest::external_access_rule_id].
3019    ///
3020    /// # Example
3021    /// ```ignore,no_run
3022    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAccessRuleRequest;
3023    /// let x = CreateExternalAccessRuleRequest::new().set_external_access_rule_id("example");
3024    /// ```
3025    pub fn set_external_access_rule_id<T: std::convert::Into<std::string::String>>(
3026        mut self,
3027        v: T,
3028    ) -> Self {
3029        self.external_access_rule_id = v.into();
3030        self
3031    }
3032
3033    /// Sets the value of [request_id][crate::model::CreateExternalAccessRuleRequest::request_id].
3034    ///
3035    /// # Example
3036    /// ```ignore,no_run
3037    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAccessRuleRequest;
3038    /// let x = CreateExternalAccessRuleRequest::new().set_request_id("example");
3039    /// ```
3040    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3041        self.request_id = v.into();
3042        self
3043    }
3044}
3045
3046impl wkt::message::Message for CreateExternalAccessRuleRequest {
3047    fn typename() -> &'static str {
3048        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest"
3049    }
3050}
3051
3052/// Request message for
3053/// [VmwareEngine.UpdateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]
3054///
3055/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]: crate::client::VmwareEngine::update_external_access_rule
3056#[derive(Clone, Default, PartialEq)]
3057#[non_exhaustive]
3058pub struct UpdateExternalAccessRuleRequest {
3059    /// Required. Field mask is used to specify the fields to be overwritten in the
3060    /// `ExternalAccessRule` resource by the update.
3061    /// The fields specified in the `update_mask` are relative to the resource, not
3062    /// the full request. A field will be overwritten if it is in the mask. If the
3063    /// user does not provide a mask then all fields will be overwritten.
3064    pub update_mask: std::option::Option<wkt::FieldMask>,
3065
3066    /// Required. Description of the external access rule.
3067    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
3068
3069    /// Optional. A request ID to identify requests. Specify a unique request ID
3070    /// so that if you must retry your request, the server will know to ignore
3071    /// the request if it has already been completed. The server guarantees that a
3072    /// request doesn't result in creation of duplicate commitments for at least 60
3073    /// minutes.
3074    ///
3075    /// For example, consider a situation where you make an initial request and the
3076    /// request times out. If you make the request again with the same request ID,
3077    /// the server can check if the original operation with the same request ID was
3078    /// received, and if so, will ignore the second request. This prevents clients
3079    /// from accidentally creating duplicate commitments.
3080    ///
3081    /// The request ID must be a valid UUID with the exception that zero UUID is
3082    /// not supported (00000000-0000-0000-0000-000000000000).
3083    pub request_id: std::string::String,
3084
3085    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3086}
3087
3088impl UpdateExternalAccessRuleRequest {
3089    /// Creates a new default instance.
3090    pub fn new() -> Self {
3091        std::default::Default::default()
3092    }
3093
3094    /// Sets the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
3095    ///
3096    /// # Example
3097    /// ```ignore,no_run
3098    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAccessRuleRequest;
3099    /// use wkt::FieldMask;
3100    /// let x = UpdateExternalAccessRuleRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3101    /// ```
3102    pub fn set_update_mask<T>(mut self, v: T) -> Self
3103    where
3104        T: std::convert::Into<wkt::FieldMask>,
3105    {
3106        self.update_mask = std::option::Option::Some(v.into());
3107        self
3108    }
3109
3110    /// Sets or clears the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
3111    ///
3112    /// # Example
3113    /// ```ignore,no_run
3114    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAccessRuleRequest;
3115    /// use wkt::FieldMask;
3116    /// let x = UpdateExternalAccessRuleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3117    /// let x = UpdateExternalAccessRuleRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3118    /// ```
3119    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3120    where
3121        T: std::convert::Into<wkt::FieldMask>,
3122    {
3123        self.update_mask = v.map(|x| x.into());
3124        self
3125    }
3126
3127    /// Sets the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
3128    ///
3129    /// # Example
3130    /// ```ignore,no_run
3131    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAccessRuleRequest;
3132    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
3133    /// let x = UpdateExternalAccessRuleRequest::new().set_external_access_rule(ExternalAccessRule::default()/* use setters */);
3134    /// ```
3135    pub fn set_external_access_rule<T>(mut self, v: T) -> Self
3136    where
3137        T: std::convert::Into<crate::model::ExternalAccessRule>,
3138    {
3139        self.external_access_rule = std::option::Option::Some(v.into());
3140        self
3141    }
3142
3143    /// Sets or clears the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
3144    ///
3145    /// # Example
3146    /// ```ignore,no_run
3147    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAccessRuleRequest;
3148    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
3149    /// let x = UpdateExternalAccessRuleRequest::new().set_or_clear_external_access_rule(Some(ExternalAccessRule::default()/* use setters */));
3150    /// let x = UpdateExternalAccessRuleRequest::new().set_or_clear_external_access_rule(None::<ExternalAccessRule>);
3151    /// ```
3152    pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
3153    where
3154        T: std::convert::Into<crate::model::ExternalAccessRule>,
3155    {
3156        self.external_access_rule = v.map(|x| x.into());
3157        self
3158    }
3159
3160    /// Sets the value of [request_id][crate::model::UpdateExternalAccessRuleRequest::request_id].
3161    ///
3162    /// # Example
3163    /// ```ignore,no_run
3164    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAccessRuleRequest;
3165    /// let x = UpdateExternalAccessRuleRequest::new().set_request_id("example");
3166    /// ```
3167    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3168        self.request_id = v.into();
3169        self
3170    }
3171}
3172
3173impl wkt::message::Message for UpdateExternalAccessRuleRequest {
3174    fn typename() -> &'static str {
3175        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest"
3176    }
3177}
3178
3179/// Request message for
3180/// [VmwareEngine.DeleteExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]
3181///
3182/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]: crate::client::VmwareEngine::delete_external_access_rule
3183#[derive(Clone, Default, PartialEq)]
3184#[non_exhaustive]
3185pub struct DeleteExternalAccessRuleRequest {
3186    /// Required. The resource name of the external access firewall rule to delete.
3187    /// Resource names are schemeless URIs that follow the conventions in
3188    /// <https://cloud.google.com/apis/design/resource_names>.
3189    /// For example:
3190    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
3191    pub name: std::string::String,
3192
3193    /// Optional. A request ID to identify requests. Specify a unique request ID
3194    /// so that if you must retry your request, the server will know to ignore
3195    /// the request if it has already been completed. The server guarantees that a
3196    /// request doesn't result in creation of duplicate commitments for at least 60
3197    /// minutes.
3198    ///
3199    /// For example, consider a situation where you make an initial request and the
3200    /// request times out. If you make the request again with the same request
3201    /// ID, the server can check if the original operation with the same request ID
3202    /// was received, and if so, will ignore the second request. This prevents
3203    /// clients from accidentally creating duplicate commitments.
3204    ///
3205    /// The request ID must be a valid UUID with the exception that zero UUID is
3206    /// not supported (00000000-0000-0000-0000-000000000000).
3207    pub request_id: std::string::String,
3208
3209    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3210}
3211
3212impl DeleteExternalAccessRuleRequest {
3213    /// Creates a new default instance.
3214    pub fn new() -> Self {
3215        std::default::Default::default()
3216    }
3217
3218    /// Sets the value of [name][crate::model::DeleteExternalAccessRuleRequest::name].
3219    ///
3220    /// # Example
3221    /// ```ignore,no_run
3222    /// # use google_cloud_vmwareengine_v1::model::DeleteExternalAccessRuleRequest;
3223    /// let x = DeleteExternalAccessRuleRequest::new().set_name("example");
3224    /// ```
3225    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3226        self.name = v.into();
3227        self
3228    }
3229
3230    /// Sets the value of [request_id][crate::model::DeleteExternalAccessRuleRequest::request_id].
3231    ///
3232    /// # Example
3233    /// ```ignore,no_run
3234    /// # use google_cloud_vmwareengine_v1::model::DeleteExternalAccessRuleRequest;
3235    /// let x = DeleteExternalAccessRuleRequest::new().set_request_id("example");
3236    /// ```
3237    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3238        self.request_id = v.into();
3239        self
3240    }
3241}
3242
3243impl wkt::message::Message for DeleteExternalAccessRuleRequest {
3244    fn typename() -> &'static str {
3245        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest"
3246    }
3247}
3248
3249/// Request message for
3250/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
3251///
3252/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
3253#[derive(Clone, Default, PartialEq)]
3254#[non_exhaustive]
3255pub struct ListLoggingServersRequest {
3256    /// Required. The resource name of the private cloud to be queried for
3257    /// logging servers.
3258    /// Resource names are schemeless URIs that follow the conventions in
3259    /// <https://cloud.google.com/apis/design/resource_names>.
3260    /// For example:
3261    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3262    pub parent: std::string::String,
3263
3264    /// The maximum number of logging servers to return in one page.
3265    /// The service may return fewer than this value.
3266    /// The maximum value is coerced to 1000.
3267    /// The default value of this field is 500.
3268    pub page_size: i32,
3269
3270    /// A page token, received from a previous `ListLoggingServersRequest` call.
3271    /// Provide this to retrieve the subsequent page.
3272    ///
3273    /// When paginating, all other parameters provided to
3274    /// `ListLoggingServersRequest` must match the call that provided the page
3275    /// token.
3276    pub page_token: std::string::String,
3277
3278    /// A filter expression that matches resources returned in the response.
3279    /// The expression must specify the field name, a comparison
3280    /// operator, and the value that you want to use for filtering. The value
3281    /// must be a string, a number, or a boolean. The comparison operator
3282    /// must be `=`, `!=`, `>`, or `<`.
3283    ///
3284    /// For example, if you are filtering a list of logging servers, you can
3285    /// exclude the ones named `example-server` by specifying
3286    /// `name != "example-server"`.
3287    ///
3288    /// To filter on multiple expressions, provide each separate expression within
3289    /// parentheses. For example:
3290    ///
3291    /// ```norust
3292    /// (name = "example-server")
3293    /// (createTime > "2021-04-12T08:15:10.40Z")
3294    /// ```
3295    ///
3296    /// By default, each expression is an `AND` expression. However, you
3297    /// can include `AND` and `OR` expressions explicitly.
3298    /// For example:
3299    ///
3300    /// ```norust
3301    /// (name = "example-server-1") AND
3302    /// (createTime > "2021-04-12T08:15:10.40Z") OR
3303    /// (name = "example-server-2")
3304    /// ```
3305    pub filter: std::string::String,
3306
3307    /// Sorts list results by a certain order. By default, returned results
3308    /// are ordered by `name` in ascending order.
3309    /// You can also sort results in descending order based on the `name` value
3310    /// using `orderBy="name desc"`.
3311    /// Currently, only ordering by `name` is supported.
3312    pub order_by: std::string::String,
3313
3314    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3315}
3316
3317impl ListLoggingServersRequest {
3318    /// Creates a new default instance.
3319    pub fn new() -> Self {
3320        std::default::Default::default()
3321    }
3322
3323    /// Sets the value of [parent][crate::model::ListLoggingServersRequest::parent].
3324    ///
3325    /// # Example
3326    /// ```ignore,no_run
3327    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersRequest;
3328    /// let x = ListLoggingServersRequest::new().set_parent("example");
3329    /// ```
3330    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3331        self.parent = v.into();
3332        self
3333    }
3334
3335    /// Sets the value of [page_size][crate::model::ListLoggingServersRequest::page_size].
3336    ///
3337    /// # Example
3338    /// ```ignore,no_run
3339    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersRequest;
3340    /// let x = ListLoggingServersRequest::new().set_page_size(42);
3341    /// ```
3342    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3343        self.page_size = v.into();
3344        self
3345    }
3346
3347    /// Sets the value of [page_token][crate::model::ListLoggingServersRequest::page_token].
3348    ///
3349    /// # Example
3350    /// ```ignore,no_run
3351    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersRequest;
3352    /// let x = ListLoggingServersRequest::new().set_page_token("example");
3353    /// ```
3354    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3355        self.page_token = v.into();
3356        self
3357    }
3358
3359    /// Sets the value of [filter][crate::model::ListLoggingServersRequest::filter].
3360    ///
3361    /// # Example
3362    /// ```ignore,no_run
3363    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersRequest;
3364    /// let x = ListLoggingServersRequest::new().set_filter("example");
3365    /// ```
3366    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3367        self.filter = v.into();
3368        self
3369    }
3370
3371    /// Sets the value of [order_by][crate::model::ListLoggingServersRequest::order_by].
3372    ///
3373    /// # Example
3374    /// ```ignore,no_run
3375    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersRequest;
3376    /// let x = ListLoggingServersRequest::new().set_order_by("example");
3377    /// ```
3378    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3379        self.order_by = v.into();
3380        self
3381    }
3382}
3383
3384impl wkt::message::Message for ListLoggingServersRequest {
3385    fn typename() -> &'static str {
3386        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersRequest"
3387    }
3388}
3389
3390/// Response message for
3391/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
3392///
3393/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
3394#[derive(Clone, Default, PartialEq)]
3395#[non_exhaustive]
3396pub struct ListLoggingServersResponse {
3397    /// A list of Logging Servers.
3398    pub logging_servers: std::vec::Vec<crate::model::LoggingServer>,
3399
3400    /// A token, which can be send as `page_token` to retrieve the next page.
3401    /// If this field is omitted, there are no subsequent pages.
3402    pub next_page_token: std::string::String,
3403
3404    /// Locations that could not be reached when making an aggregated query using
3405    /// wildcards.
3406    pub unreachable: std::vec::Vec<std::string::String>,
3407
3408    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3409}
3410
3411impl ListLoggingServersResponse {
3412    /// Creates a new default instance.
3413    pub fn new() -> Self {
3414        std::default::Default::default()
3415    }
3416
3417    /// Sets the value of [logging_servers][crate::model::ListLoggingServersResponse::logging_servers].
3418    ///
3419    /// # Example
3420    /// ```ignore,no_run
3421    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersResponse;
3422    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
3423    /// let x = ListLoggingServersResponse::new()
3424    ///     .set_logging_servers([
3425    ///         LoggingServer::default()/* use setters */,
3426    ///         LoggingServer::default()/* use (different) setters */,
3427    ///     ]);
3428    /// ```
3429    pub fn set_logging_servers<T, V>(mut self, v: T) -> Self
3430    where
3431        T: std::iter::IntoIterator<Item = V>,
3432        V: std::convert::Into<crate::model::LoggingServer>,
3433    {
3434        use std::iter::Iterator;
3435        self.logging_servers = v.into_iter().map(|i| i.into()).collect();
3436        self
3437    }
3438
3439    /// Sets the value of [next_page_token][crate::model::ListLoggingServersResponse::next_page_token].
3440    ///
3441    /// # Example
3442    /// ```ignore,no_run
3443    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersResponse;
3444    /// let x = ListLoggingServersResponse::new().set_next_page_token("example");
3445    /// ```
3446    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3447        self.next_page_token = v.into();
3448        self
3449    }
3450
3451    /// Sets the value of [unreachable][crate::model::ListLoggingServersResponse::unreachable].
3452    ///
3453    /// # Example
3454    /// ```ignore,no_run
3455    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersResponse;
3456    /// let x = ListLoggingServersResponse::new().set_unreachable(["a", "b", "c"]);
3457    /// ```
3458    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3459    where
3460        T: std::iter::IntoIterator<Item = V>,
3461        V: std::convert::Into<std::string::String>,
3462    {
3463        use std::iter::Iterator;
3464        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3465        self
3466    }
3467}
3468
3469impl wkt::message::Message for ListLoggingServersResponse {
3470    fn typename() -> &'static str {
3471        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersResponse"
3472    }
3473}
3474
3475#[doc(hidden)]
3476impl google_cloud_gax::paginator::internal::PageableResponse for ListLoggingServersResponse {
3477    type PageItem = crate::model::LoggingServer;
3478
3479    fn items(self) -> std::vec::Vec<Self::PageItem> {
3480        self.logging_servers
3481    }
3482
3483    fn next_page_token(&self) -> std::string::String {
3484        use std::clone::Clone;
3485        self.next_page_token.clone()
3486    }
3487}
3488
3489/// Request message for
3490/// [VmwareEngine.GetLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]
3491///
3492/// [google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]: crate::client::VmwareEngine::get_logging_server
3493#[derive(Clone, Default, PartialEq)]
3494#[non_exhaustive]
3495pub struct GetLoggingServerRequest {
3496    /// Required. The resource name of the Logging Server to retrieve.
3497    /// Resource names are schemeless URIs that follow the conventions in
3498    /// <https://cloud.google.com/apis/design/resource_names>.
3499    /// For example:
3500    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
3501    pub name: std::string::String,
3502
3503    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3504}
3505
3506impl GetLoggingServerRequest {
3507    /// Creates a new default instance.
3508    pub fn new() -> Self {
3509        std::default::Default::default()
3510    }
3511
3512    /// Sets the value of [name][crate::model::GetLoggingServerRequest::name].
3513    ///
3514    /// # Example
3515    /// ```ignore,no_run
3516    /// # use google_cloud_vmwareengine_v1::model::GetLoggingServerRequest;
3517    /// let x = GetLoggingServerRequest::new().set_name("example");
3518    /// ```
3519    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3520        self.name = v.into();
3521        self
3522    }
3523}
3524
3525impl wkt::message::Message for GetLoggingServerRequest {
3526    fn typename() -> &'static str {
3527        "type.googleapis.com/google.cloud.vmwareengine.v1.GetLoggingServerRequest"
3528    }
3529}
3530
3531/// Request message for
3532/// [VmwareEngine.CreateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]
3533///
3534/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]: crate::client::VmwareEngine::create_logging_server
3535#[derive(Clone, Default, PartialEq)]
3536#[non_exhaustive]
3537pub struct CreateLoggingServerRequest {
3538    /// Required. The resource name of the private cloud
3539    /// to create a new Logging Server in.
3540    /// Resource names are schemeless URIs that follow the conventions in
3541    /// <https://cloud.google.com/apis/design/resource_names>.
3542    /// For example:
3543    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3544    pub parent: std::string::String,
3545
3546    /// Required. The initial description of a new logging server.
3547    pub logging_server: std::option::Option<crate::model::LoggingServer>,
3548
3549    /// Required. The user-provided identifier of the `LoggingServer` to be
3550    /// created. This identifier must be unique among `LoggingServer` resources
3551    /// within the parent and becomes the final token in the name URI.
3552    /// The identifier must meet the following requirements:
3553    ///
3554    /// * Only contains 1-63 alphanumeric characters and hyphens
3555    /// * Begins with an alphabetical character
3556    /// * Ends with a non-hyphen character
3557    /// * Not formatted as a UUID
3558    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
3559    ///   (section 3.5)
3560    pub logging_server_id: std::string::String,
3561
3562    /// Optional. A request ID to identify requests. Specify a unique request ID
3563    /// so that if you must retry your request, the server will know to ignore
3564    /// the request if it has already been completed. The server guarantees that a
3565    /// request doesn't result in creation of duplicate commitments for at least 60
3566    /// minutes.
3567    ///
3568    /// For example, consider a situation where you make an initial request and the
3569    /// request times out. If you make the request again with the same request ID,
3570    /// the server can check if original operation with the same request ID was
3571    /// received, and if so, will ignore the second request. This prevents clients
3572    /// from accidentally creating duplicate commitments.
3573    ///
3574    /// The request ID must be a valid UUID with the exception that zero UUID is
3575    /// not supported (00000000-0000-0000-0000-000000000000).
3576    pub request_id: std::string::String,
3577
3578    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3579}
3580
3581impl CreateLoggingServerRequest {
3582    /// Creates a new default instance.
3583    pub fn new() -> Self {
3584        std::default::Default::default()
3585    }
3586
3587    /// Sets the value of [parent][crate::model::CreateLoggingServerRequest::parent].
3588    ///
3589    /// # Example
3590    /// ```ignore,no_run
3591    /// # use google_cloud_vmwareengine_v1::model::CreateLoggingServerRequest;
3592    /// let x = CreateLoggingServerRequest::new().set_parent("example");
3593    /// ```
3594    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3595        self.parent = v.into();
3596        self
3597    }
3598
3599    /// Sets the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
3600    ///
3601    /// # Example
3602    /// ```ignore,no_run
3603    /// # use google_cloud_vmwareengine_v1::model::CreateLoggingServerRequest;
3604    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
3605    /// let x = CreateLoggingServerRequest::new().set_logging_server(LoggingServer::default()/* use setters */);
3606    /// ```
3607    pub fn set_logging_server<T>(mut self, v: T) -> Self
3608    where
3609        T: std::convert::Into<crate::model::LoggingServer>,
3610    {
3611        self.logging_server = std::option::Option::Some(v.into());
3612        self
3613    }
3614
3615    /// Sets or clears the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
3616    ///
3617    /// # Example
3618    /// ```ignore,no_run
3619    /// # use google_cloud_vmwareengine_v1::model::CreateLoggingServerRequest;
3620    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
3621    /// let x = CreateLoggingServerRequest::new().set_or_clear_logging_server(Some(LoggingServer::default()/* use setters */));
3622    /// let x = CreateLoggingServerRequest::new().set_or_clear_logging_server(None::<LoggingServer>);
3623    /// ```
3624    pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3625    where
3626        T: std::convert::Into<crate::model::LoggingServer>,
3627    {
3628        self.logging_server = v.map(|x| x.into());
3629        self
3630    }
3631
3632    /// Sets the value of [logging_server_id][crate::model::CreateLoggingServerRequest::logging_server_id].
3633    ///
3634    /// # Example
3635    /// ```ignore,no_run
3636    /// # use google_cloud_vmwareengine_v1::model::CreateLoggingServerRequest;
3637    /// let x = CreateLoggingServerRequest::new().set_logging_server_id("example");
3638    /// ```
3639    pub fn set_logging_server_id<T: std::convert::Into<std::string::String>>(
3640        mut self,
3641        v: T,
3642    ) -> Self {
3643        self.logging_server_id = v.into();
3644        self
3645    }
3646
3647    /// Sets the value of [request_id][crate::model::CreateLoggingServerRequest::request_id].
3648    ///
3649    /// # Example
3650    /// ```ignore,no_run
3651    /// # use google_cloud_vmwareengine_v1::model::CreateLoggingServerRequest;
3652    /// let x = CreateLoggingServerRequest::new().set_request_id("example");
3653    /// ```
3654    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3655        self.request_id = v.into();
3656        self
3657    }
3658}
3659
3660impl wkt::message::Message for CreateLoggingServerRequest {
3661    fn typename() -> &'static str {
3662        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateLoggingServerRequest"
3663    }
3664}
3665
3666/// Request message for
3667/// [VmwareEngine.UpdateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]
3668///
3669/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]: crate::client::VmwareEngine::update_logging_server
3670#[derive(Clone, Default, PartialEq)]
3671#[non_exhaustive]
3672pub struct UpdateLoggingServerRequest {
3673    /// Required. Field mask is used to specify the fields to be overwritten in the
3674    /// `LoggingServer` resource by the update.
3675    /// The fields specified in the `update_mask` are relative to the resource, not
3676    /// the full request. A field will be overwritten if it is in the mask. If the
3677    /// user does not provide a mask then all fields will be overwritten.
3678    pub update_mask: std::option::Option<wkt::FieldMask>,
3679
3680    /// Required. Logging server description.
3681    pub logging_server: std::option::Option<crate::model::LoggingServer>,
3682
3683    /// Optional. A request ID to identify requests. Specify a unique request ID
3684    /// so that if you must retry your request, the server will know to ignore
3685    /// the request if it has already been completed. The server guarantees that a
3686    /// request doesn't result in creation of duplicate commitments for at least 60
3687    /// minutes.
3688    ///
3689    /// For example, consider a situation where you make an initial request and the
3690    /// request times out. If you make the request again with the same request ID,
3691    /// the server can check if original operation with the same request ID was
3692    /// received, and if so, will ignore the second request. This prevents clients
3693    /// from accidentally creating duplicate commitments.
3694    ///
3695    /// The request ID must be a valid UUID with the exception that zero UUID is
3696    /// not supported (00000000-0000-0000-0000-000000000000).
3697    pub request_id: std::string::String,
3698
3699    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3700}
3701
3702impl UpdateLoggingServerRequest {
3703    /// Creates a new default instance.
3704    pub fn new() -> Self {
3705        std::default::Default::default()
3706    }
3707
3708    /// Sets the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
3709    ///
3710    /// # Example
3711    /// ```ignore,no_run
3712    /// # use google_cloud_vmwareengine_v1::model::UpdateLoggingServerRequest;
3713    /// use wkt::FieldMask;
3714    /// let x = UpdateLoggingServerRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3715    /// ```
3716    pub fn set_update_mask<T>(mut self, v: T) -> Self
3717    where
3718        T: std::convert::Into<wkt::FieldMask>,
3719    {
3720        self.update_mask = std::option::Option::Some(v.into());
3721        self
3722    }
3723
3724    /// Sets or clears the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
3725    ///
3726    /// # Example
3727    /// ```ignore,no_run
3728    /// # use google_cloud_vmwareengine_v1::model::UpdateLoggingServerRequest;
3729    /// use wkt::FieldMask;
3730    /// let x = UpdateLoggingServerRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3731    /// let x = UpdateLoggingServerRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3732    /// ```
3733    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3734    where
3735        T: std::convert::Into<wkt::FieldMask>,
3736    {
3737        self.update_mask = v.map(|x| x.into());
3738        self
3739    }
3740
3741    /// Sets the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
3742    ///
3743    /// # Example
3744    /// ```ignore,no_run
3745    /// # use google_cloud_vmwareengine_v1::model::UpdateLoggingServerRequest;
3746    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
3747    /// let x = UpdateLoggingServerRequest::new().set_logging_server(LoggingServer::default()/* use setters */);
3748    /// ```
3749    pub fn set_logging_server<T>(mut self, v: T) -> Self
3750    where
3751        T: std::convert::Into<crate::model::LoggingServer>,
3752    {
3753        self.logging_server = std::option::Option::Some(v.into());
3754        self
3755    }
3756
3757    /// Sets or clears the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
3758    ///
3759    /// # Example
3760    /// ```ignore,no_run
3761    /// # use google_cloud_vmwareengine_v1::model::UpdateLoggingServerRequest;
3762    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
3763    /// let x = UpdateLoggingServerRequest::new().set_or_clear_logging_server(Some(LoggingServer::default()/* use setters */));
3764    /// let x = UpdateLoggingServerRequest::new().set_or_clear_logging_server(None::<LoggingServer>);
3765    /// ```
3766    pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3767    where
3768        T: std::convert::Into<crate::model::LoggingServer>,
3769    {
3770        self.logging_server = v.map(|x| x.into());
3771        self
3772    }
3773
3774    /// Sets the value of [request_id][crate::model::UpdateLoggingServerRequest::request_id].
3775    ///
3776    /// # Example
3777    /// ```ignore,no_run
3778    /// # use google_cloud_vmwareengine_v1::model::UpdateLoggingServerRequest;
3779    /// let x = UpdateLoggingServerRequest::new().set_request_id("example");
3780    /// ```
3781    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3782        self.request_id = v.into();
3783        self
3784    }
3785}
3786
3787impl wkt::message::Message for UpdateLoggingServerRequest {
3788    fn typename() -> &'static str {
3789        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateLoggingServerRequest"
3790    }
3791}
3792
3793/// Request message for
3794/// [VmwareEngine.DeleteLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]
3795///
3796/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]: crate::client::VmwareEngine::delete_logging_server
3797#[derive(Clone, Default, PartialEq)]
3798#[non_exhaustive]
3799pub struct DeleteLoggingServerRequest {
3800    /// Required. The resource name of the logging server to delete.
3801    /// Resource names are schemeless URIs that follow the conventions in
3802    /// <https://cloud.google.com/apis/design/resource_names>.
3803    /// For example:
3804    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
3805    pub name: std::string::String,
3806
3807    /// Optional. A request ID to identify requests. Specify a unique request ID
3808    /// so that if you must retry your request, the server will know to ignore
3809    /// the request if it has already been completed. The server guarantees that a
3810    /// request doesn't result in creation of duplicate commitments for at least 60
3811    /// minutes.
3812    ///
3813    /// For example, consider a situation where you make an initial request and the
3814    /// request times out. If you make the request again with the same request
3815    /// ID, the server can check if original operation with the same request ID
3816    /// was received, and if so, will ignore the second request. This prevents
3817    /// clients from accidentally creating duplicate commitments.
3818    ///
3819    /// The request ID must be a valid UUID with the exception that zero UUID is
3820    /// not supported (00000000-0000-0000-0000-000000000000).
3821    pub request_id: std::string::String,
3822
3823    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3824}
3825
3826impl DeleteLoggingServerRequest {
3827    /// Creates a new default instance.
3828    pub fn new() -> Self {
3829        std::default::Default::default()
3830    }
3831
3832    /// Sets the value of [name][crate::model::DeleteLoggingServerRequest::name].
3833    ///
3834    /// # Example
3835    /// ```ignore,no_run
3836    /// # use google_cloud_vmwareengine_v1::model::DeleteLoggingServerRequest;
3837    /// let x = DeleteLoggingServerRequest::new().set_name("example");
3838    /// ```
3839    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3840        self.name = v.into();
3841        self
3842    }
3843
3844    /// Sets the value of [request_id][crate::model::DeleteLoggingServerRequest::request_id].
3845    ///
3846    /// # Example
3847    /// ```ignore,no_run
3848    /// # use google_cloud_vmwareengine_v1::model::DeleteLoggingServerRequest;
3849    /// let x = DeleteLoggingServerRequest::new().set_request_id("example");
3850    /// ```
3851    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3852        self.request_id = v.into();
3853        self
3854    }
3855}
3856
3857impl wkt::message::Message for DeleteLoggingServerRequest {
3858    fn typename() -> &'static str {
3859        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteLoggingServerRequest"
3860    }
3861}
3862
3863/// Represents the metadata of the long-running operation.
3864#[derive(Clone, Default, PartialEq)]
3865#[non_exhaustive]
3866pub struct OperationMetadata {
3867    /// Output only. The time the operation was created.
3868    pub create_time: std::option::Option<wkt::Timestamp>,
3869
3870    /// Output only. The time the operation finished running.
3871    pub end_time: std::option::Option<wkt::Timestamp>,
3872
3873    /// Output only. Server-defined resource path for the target of the operation.
3874    pub target: std::string::String,
3875
3876    /// Output only. Name of the verb executed by the operation.
3877    pub verb: std::string::String,
3878
3879    /// Output only. Human-readable status of the operation, if any.
3880    pub status_message: std::string::String,
3881
3882    /// Output only. True if the user has requested cancellation
3883    /// of the operation; false otherwise.
3884    /// Operations that have successfully been cancelled
3885    /// have [Operation.error][] value with a
3886    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
3887    /// `Code.CANCELLED`.
3888    ///
3889    /// [google.rpc.Status.code]: google_cloud_rpc::model::Status::code
3890    pub requested_cancellation: bool,
3891
3892    /// Output only. API version used to start the operation.
3893    pub api_version: std::string::String,
3894
3895    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3896}
3897
3898impl OperationMetadata {
3899    /// Creates a new default instance.
3900    pub fn new() -> Self {
3901        std::default::Default::default()
3902    }
3903
3904    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
3905    ///
3906    /// # Example
3907    /// ```ignore,no_run
3908    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
3909    /// use wkt::Timestamp;
3910    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
3911    /// ```
3912    pub fn set_create_time<T>(mut self, v: T) -> Self
3913    where
3914        T: std::convert::Into<wkt::Timestamp>,
3915    {
3916        self.create_time = std::option::Option::Some(v.into());
3917        self
3918    }
3919
3920    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
3921    ///
3922    /// # Example
3923    /// ```ignore,no_run
3924    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
3925    /// use wkt::Timestamp;
3926    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
3927    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
3928    /// ```
3929    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
3930    where
3931        T: std::convert::Into<wkt::Timestamp>,
3932    {
3933        self.create_time = v.map(|x| x.into());
3934        self
3935    }
3936
3937    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
3938    ///
3939    /// # Example
3940    /// ```ignore,no_run
3941    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
3942    /// use wkt::Timestamp;
3943    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
3944    /// ```
3945    pub fn set_end_time<T>(mut self, v: T) -> Self
3946    where
3947        T: std::convert::Into<wkt::Timestamp>,
3948    {
3949        self.end_time = std::option::Option::Some(v.into());
3950        self
3951    }
3952
3953    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
3954    ///
3955    /// # Example
3956    /// ```ignore,no_run
3957    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
3958    /// use wkt::Timestamp;
3959    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
3960    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
3961    /// ```
3962    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
3963    where
3964        T: std::convert::Into<wkt::Timestamp>,
3965    {
3966        self.end_time = v.map(|x| x.into());
3967        self
3968    }
3969
3970    /// Sets the value of [target][crate::model::OperationMetadata::target].
3971    ///
3972    /// # Example
3973    /// ```ignore,no_run
3974    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
3975    /// let x = OperationMetadata::new().set_target("example");
3976    /// ```
3977    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3978        self.target = v.into();
3979        self
3980    }
3981
3982    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
3983    ///
3984    /// # Example
3985    /// ```ignore,no_run
3986    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
3987    /// let x = OperationMetadata::new().set_verb("example");
3988    /// ```
3989    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3990        self.verb = v.into();
3991        self
3992    }
3993
3994    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
3995    ///
3996    /// # Example
3997    /// ```ignore,no_run
3998    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
3999    /// let x = OperationMetadata::new().set_status_message("example");
4000    /// ```
4001    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4002        self.status_message = v.into();
4003        self
4004    }
4005
4006    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
4007    ///
4008    /// # Example
4009    /// ```ignore,no_run
4010    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
4011    /// let x = OperationMetadata::new().set_requested_cancellation(true);
4012    /// ```
4013    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4014        self.requested_cancellation = v.into();
4015        self
4016    }
4017
4018    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
4019    ///
4020    /// # Example
4021    /// ```ignore,no_run
4022    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
4023    /// let x = OperationMetadata::new().set_api_version("example");
4024    /// ```
4025    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4026        self.api_version = v.into();
4027        self
4028    }
4029}
4030
4031impl wkt::message::Message for OperationMetadata {
4032    fn typename() -> &'static str {
4033        "type.googleapis.com/google.cloud.vmwareengine.v1.OperationMetadata"
4034    }
4035}
4036
4037/// Request message for
4038/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
4039///
4040/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
4041#[derive(Clone, Default, PartialEq)]
4042#[non_exhaustive]
4043pub struct ListNodeTypesRequest {
4044    /// Required. The resource name of the location to be queried for node types.
4045    /// Resource names are schemeless URIs that follow the conventions in
4046    /// <https://cloud.google.com/apis/design/resource_names>.
4047    /// For example:
4048    /// `projects/my-project/locations/us-central1-a`
4049    pub parent: std::string::String,
4050
4051    /// The maximum number of node types to return in one page.
4052    /// The service may return fewer than this value.
4053    /// The maximum value is coerced to 1000.
4054    /// The default value of this field is 500.
4055    pub page_size: i32,
4056
4057    /// A page token, received from a previous `ListNodeTypes` call.
4058    /// Provide this to retrieve the subsequent page.
4059    ///
4060    /// When paginating, all other parameters provided to
4061    /// `ListNodeTypes` must match the call that provided the page token.
4062    pub page_token: std::string::String,
4063
4064    /// A filter expression that matches resources returned in the response.
4065    /// The expression must specify the field name, a comparison
4066    /// operator, and the value that you want to use for filtering. The value
4067    /// must be a string, a number, or a boolean. The comparison operator
4068    /// must be `=`, `!=`, `>`, or `<`.
4069    ///
4070    /// For example, if you are filtering a list of node types, you can
4071    /// exclude the ones named `standard-72` by specifying
4072    /// `name != "standard-72"`.
4073    ///
4074    /// To filter on multiple expressions, provide each separate expression within
4075    /// parentheses. For example:
4076    ///
4077    /// ```norust
4078    /// (name = "standard-72")
4079    /// (virtual_cpu_count > 2)
4080    /// ```
4081    ///
4082    /// By default, each expression is an `AND` expression. However, you
4083    /// can include `AND` and `OR` expressions explicitly.
4084    /// For example:
4085    ///
4086    /// ```norust
4087    /// (name = "standard-96") AND
4088    /// (virtual_cpu_count > 2) OR
4089    /// (name = "standard-72")
4090    /// ```
4091    pub filter: std::string::String,
4092
4093    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4094}
4095
4096impl ListNodeTypesRequest {
4097    /// Creates a new default instance.
4098    pub fn new() -> Self {
4099        std::default::Default::default()
4100    }
4101
4102    /// Sets the value of [parent][crate::model::ListNodeTypesRequest::parent].
4103    ///
4104    /// # Example
4105    /// ```ignore,no_run
4106    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesRequest;
4107    /// let x = ListNodeTypesRequest::new().set_parent("example");
4108    /// ```
4109    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4110        self.parent = v.into();
4111        self
4112    }
4113
4114    /// Sets the value of [page_size][crate::model::ListNodeTypesRequest::page_size].
4115    ///
4116    /// # Example
4117    /// ```ignore,no_run
4118    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesRequest;
4119    /// let x = ListNodeTypesRequest::new().set_page_size(42);
4120    /// ```
4121    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4122        self.page_size = v.into();
4123        self
4124    }
4125
4126    /// Sets the value of [page_token][crate::model::ListNodeTypesRequest::page_token].
4127    ///
4128    /// # Example
4129    /// ```ignore,no_run
4130    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesRequest;
4131    /// let x = ListNodeTypesRequest::new().set_page_token("example");
4132    /// ```
4133    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4134        self.page_token = v.into();
4135        self
4136    }
4137
4138    /// Sets the value of [filter][crate::model::ListNodeTypesRequest::filter].
4139    ///
4140    /// # Example
4141    /// ```ignore,no_run
4142    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesRequest;
4143    /// let x = ListNodeTypesRequest::new().set_filter("example");
4144    /// ```
4145    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4146        self.filter = v.into();
4147        self
4148    }
4149}
4150
4151impl wkt::message::Message for ListNodeTypesRequest {
4152    fn typename() -> &'static str {
4153        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesRequest"
4154    }
4155}
4156
4157/// Response message for
4158/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
4159///
4160/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
4161#[derive(Clone, Default, PartialEq)]
4162#[non_exhaustive]
4163pub struct ListNodeTypesResponse {
4164    /// A list of Node Types.
4165    pub node_types: std::vec::Vec<crate::model::NodeType>,
4166
4167    /// A token, which can be sent as `page_token` to retrieve the next page.
4168    /// If this field is omitted, there are no subsequent pages.
4169    pub next_page_token: std::string::String,
4170
4171    /// Locations that could not be reached when making an aggregated query using
4172    /// wildcards.
4173    pub unreachable: std::vec::Vec<std::string::String>,
4174
4175    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4176}
4177
4178impl ListNodeTypesResponse {
4179    /// Creates a new default instance.
4180    pub fn new() -> Self {
4181        std::default::Default::default()
4182    }
4183
4184    /// Sets the value of [node_types][crate::model::ListNodeTypesResponse::node_types].
4185    ///
4186    /// # Example
4187    /// ```ignore,no_run
4188    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesResponse;
4189    /// use google_cloud_vmwareengine_v1::model::NodeType;
4190    /// let x = ListNodeTypesResponse::new()
4191    ///     .set_node_types([
4192    ///         NodeType::default()/* use setters */,
4193    ///         NodeType::default()/* use (different) setters */,
4194    ///     ]);
4195    /// ```
4196    pub fn set_node_types<T, V>(mut self, v: T) -> Self
4197    where
4198        T: std::iter::IntoIterator<Item = V>,
4199        V: std::convert::Into<crate::model::NodeType>,
4200    {
4201        use std::iter::Iterator;
4202        self.node_types = v.into_iter().map(|i| i.into()).collect();
4203        self
4204    }
4205
4206    /// Sets the value of [next_page_token][crate::model::ListNodeTypesResponse::next_page_token].
4207    ///
4208    /// # Example
4209    /// ```ignore,no_run
4210    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesResponse;
4211    /// let x = ListNodeTypesResponse::new().set_next_page_token("example");
4212    /// ```
4213    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4214        self.next_page_token = v.into();
4215        self
4216    }
4217
4218    /// Sets the value of [unreachable][crate::model::ListNodeTypesResponse::unreachable].
4219    ///
4220    /// # Example
4221    /// ```ignore,no_run
4222    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesResponse;
4223    /// let x = ListNodeTypesResponse::new().set_unreachable(["a", "b", "c"]);
4224    /// ```
4225    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4226    where
4227        T: std::iter::IntoIterator<Item = V>,
4228        V: std::convert::Into<std::string::String>,
4229    {
4230        use std::iter::Iterator;
4231        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4232        self
4233    }
4234}
4235
4236impl wkt::message::Message for ListNodeTypesResponse {
4237    fn typename() -> &'static str {
4238        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesResponse"
4239    }
4240}
4241
4242#[doc(hidden)]
4243impl google_cloud_gax::paginator::internal::PageableResponse for ListNodeTypesResponse {
4244    type PageItem = crate::model::NodeType;
4245
4246    fn items(self) -> std::vec::Vec<Self::PageItem> {
4247        self.node_types
4248    }
4249
4250    fn next_page_token(&self) -> std::string::String {
4251        use std::clone::Clone;
4252        self.next_page_token.clone()
4253    }
4254}
4255
4256/// Request message for
4257/// [VmwareEngine.GetNodeType][google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]
4258///
4259/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]: crate::client::VmwareEngine::get_node_type
4260#[derive(Clone, Default, PartialEq)]
4261#[non_exhaustive]
4262pub struct GetNodeTypeRequest {
4263    /// Required. The resource name of the node type to retrieve.
4264    /// Resource names are schemeless URIs that follow the conventions in
4265    /// <https://cloud.google.com/apis/design/resource_names>.
4266    /// For example:
4267    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
4268    pub name: std::string::String,
4269
4270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4271}
4272
4273impl GetNodeTypeRequest {
4274    /// Creates a new default instance.
4275    pub fn new() -> Self {
4276        std::default::Default::default()
4277    }
4278
4279    /// Sets the value of [name][crate::model::GetNodeTypeRequest::name].
4280    ///
4281    /// # Example
4282    /// ```ignore,no_run
4283    /// # use google_cloud_vmwareengine_v1::model::GetNodeTypeRequest;
4284    /// let x = GetNodeTypeRequest::new().set_name("example");
4285    /// ```
4286    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4287        self.name = v.into();
4288        self
4289    }
4290}
4291
4292impl wkt::message::Message for GetNodeTypeRequest {
4293    fn typename() -> &'static str {
4294        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeTypeRequest"
4295    }
4296}
4297
4298/// Request message for
4299/// [VmwareEngine.ShowNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]
4300///
4301/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]: crate::client::VmwareEngine::show_nsx_credentials
4302#[derive(Clone, Default, PartialEq)]
4303#[non_exhaustive]
4304pub struct ShowNsxCredentialsRequest {
4305    /// Required. The resource name of the private cloud
4306    /// to be queried for credentials.
4307    /// Resource names are schemeless URIs that follow the conventions in
4308    /// <https://cloud.google.com/apis/design/resource_names>.
4309    /// For example:
4310    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
4311    pub private_cloud: std::string::String,
4312
4313    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4314}
4315
4316impl ShowNsxCredentialsRequest {
4317    /// Creates a new default instance.
4318    pub fn new() -> Self {
4319        std::default::Default::default()
4320    }
4321
4322    /// Sets the value of [private_cloud][crate::model::ShowNsxCredentialsRequest::private_cloud].
4323    ///
4324    /// # Example
4325    /// ```ignore,no_run
4326    /// # use google_cloud_vmwareengine_v1::model::ShowNsxCredentialsRequest;
4327    /// let x = ShowNsxCredentialsRequest::new().set_private_cloud("example");
4328    /// ```
4329    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4330        self.private_cloud = v.into();
4331        self
4332    }
4333}
4334
4335impl wkt::message::Message for ShowNsxCredentialsRequest {
4336    fn typename() -> &'static str {
4337        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest"
4338    }
4339}
4340
4341/// Request message for
4342/// [VmwareEngine.ShowVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]
4343///
4344/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]: crate::client::VmwareEngine::show_vcenter_credentials
4345#[derive(Clone, Default, PartialEq)]
4346#[non_exhaustive]
4347pub struct ShowVcenterCredentialsRequest {
4348    /// Required. The resource name of the private cloud
4349    /// to be queried for credentials.
4350    /// Resource names are schemeless URIs that follow the conventions in
4351    /// <https://cloud.google.com/apis/design/resource_names>.
4352    /// For example:
4353    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
4354    pub private_cloud: std::string::String,
4355
4356    /// Optional. The username of the user to be queried for credentials.
4357    /// The default value of this field is CloudOwner@gve.local.
4358    /// The provided value must be one of the following:
4359    /// CloudOwner@gve.local,
4360    /// solution-user-01@gve.local,
4361    /// solution-user-02@gve.local,
4362    /// solution-user-03@gve.local,
4363    /// solution-user-04@gve.local,
4364    /// solution-user-05@gve.local,
4365    /// zertoadmin@gve.local.
4366    pub username: std::string::String,
4367
4368    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4369}
4370
4371impl ShowVcenterCredentialsRequest {
4372    /// Creates a new default instance.
4373    pub fn new() -> Self {
4374        std::default::Default::default()
4375    }
4376
4377    /// Sets the value of [private_cloud][crate::model::ShowVcenterCredentialsRequest::private_cloud].
4378    ///
4379    /// # Example
4380    /// ```ignore,no_run
4381    /// # use google_cloud_vmwareengine_v1::model::ShowVcenterCredentialsRequest;
4382    /// let x = ShowVcenterCredentialsRequest::new().set_private_cloud("example");
4383    /// ```
4384    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4385        self.private_cloud = v.into();
4386        self
4387    }
4388
4389    /// Sets the value of [username][crate::model::ShowVcenterCredentialsRequest::username].
4390    ///
4391    /// # Example
4392    /// ```ignore,no_run
4393    /// # use google_cloud_vmwareengine_v1::model::ShowVcenterCredentialsRequest;
4394    /// let x = ShowVcenterCredentialsRequest::new().set_username("example");
4395    /// ```
4396    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4397        self.username = v.into();
4398        self
4399    }
4400}
4401
4402impl wkt::message::Message for ShowVcenterCredentialsRequest {
4403    fn typename() -> &'static str {
4404        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest"
4405    }
4406}
4407
4408/// Request message for
4409/// [VmwareEngine.ResetNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]
4410///
4411/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]: crate::client::VmwareEngine::reset_nsx_credentials
4412#[derive(Clone, Default, PartialEq)]
4413#[non_exhaustive]
4414pub struct ResetNsxCredentialsRequest {
4415    /// Required. The resource name of the private cloud
4416    /// to reset credentials for.
4417    /// Resource names are schemeless URIs that follow the conventions in
4418    /// <https://cloud.google.com/apis/design/resource_names>.
4419    /// For example:
4420    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
4421    pub private_cloud: std::string::String,
4422
4423    /// Optional. A request ID to identify requests. Specify a unique request ID
4424    /// so that if you must retry your request, the server will know to ignore
4425    /// the request if it has already been completed. The server guarantees that a
4426    /// request doesn't result in creation of duplicate commitments for at least 60
4427    /// minutes.
4428    ///
4429    /// For example, consider a situation where you make an initial request and the
4430    /// request times out. If you make the request again with the same request
4431    /// ID, the server can check if original operation with the same request ID
4432    /// was received, and if so, will ignore the second request. This prevents
4433    /// clients from accidentally creating duplicate commitments.
4434    ///
4435    /// The request ID must be a valid UUID with the exception that zero UUID is
4436    /// not supported (00000000-0000-0000-0000-000000000000).
4437    pub request_id: std::string::String,
4438
4439    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4440}
4441
4442impl ResetNsxCredentialsRequest {
4443    /// Creates a new default instance.
4444    pub fn new() -> Self {
4445        std::default::Default::default()
4446    }
4447
4448    /// Sets the value of [private_cloud][crate::model::ResetNsxCredentialsRequest::private_cloud].
4449    ///
4450    /// # Example
4451    /// ```ignore,no_run
4452    /// # use google_cloud_vmwareengine_v1::model::ResetNsxCredentialsRequest;
4453    /// let x = ResetNsxCredentialsRequest::new().set_private_cloud("example");
4454    /// ```
4455    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4456        self.private_cloud = v.into();
4457        self
4458    }
4459
4460    /// Sets the value of [request_id][crate::model::ResetNsxCredentialsRequest::request_id].
4461    ///
4462    /// # Example
4463    /// ```ignore,no_run
4464    /// # use google_cloud_vmwareengine_v1::model::ResetNsxCredentialsRequest;
4465    /// let x = ResetNsxCredentialsRequest::new().set_request_id("example");
4466    /// ```
4467    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4468        self.request_id = v.into();
4469        self
4470    }
4471}
4472
4473impl wkt::message::Message for ResetNsxCredentialsRequest {
4474    fn typename() -> &'static str {
4475        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest"
4476    }
4477}
4478
4479/// Request message for
4480/// [VmwareEngine.ResetVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]
4481///
4482/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]: crate::client::VmwareEngine::reset_vcenter_credentials
4483#[derive(Clone, Default, PartialEq)]
4484#[non_exhaustive]
4485pub struct ResetVcenterCredentialsRequest {
4486    /// Required. The resource name of the private cloud
4487    /// to reset credentials for.
4488    /// Resource names are schemeless URIs that follow the conventions in
4489    /// <https://cloud.google.com/apis/design/resource_names>.
4490    /// For example:
4491    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
4492    pub private_cloud: std::string::String,
4493
4494    /// Optional. A request ID to identify requests. Specify a unique request ID
4495    /// so that if you must retry your request, the server will know to ignore
4496    /// the request if it has already been completed. The server guarantees that a
4497    /// request doesn't result in creation of duplicate commitments for at least 60
4498    /// minutes.
4499    ///
4500    /// For example, consider a situation where you make an initial request and the
4501    /// request times out. If you make the request again with the same request
4502    /// ID, the server can check if original operation with the same request ID
4503    /// was received, and if so, will ignore the second request. This prevents
4504    /// clients from accidentally creating duplicate commitments.
4505    ///
4506    /// The request ID must be a valid UUID with the exception that zero UUID is
4507    /// not supported (00000000-0000-0000-0000-000000000000).
4508    pub request_id: std::string::String,
4509
4510    /// Optional. The username of the user to be to reset the credentials.
4511    /// The default value of this field is CloudOwner@gve.local.
4512    /// The provided value should be one of the following:
4513    /// solution-user-01@gve.local,
4514    /// solution-user-02@gve.local,
4515    /// solution-user-03@gve.local,
4516    /// solution-user-04@gve.local,
4517    /// solution-user-05@gve.local,
4518    /// zertoadmin@gve.local.
4519    pub username: std::string::String,
4520
4521    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4522}
4523
4524impl ResetVcenterCredentialsRequest {
4525    /// Creates a new default instance.
4526    pub fn new() -> Self {
4527        std::default::Default::default()
4528    }
4529
4530    /// Sets the value of [private_cloud][crate::model::ResetVcenterCredentialsRequest::private_cloud].
4531    ///
4532    /// # Example
4533    /// ```ignore,no_run
4534    /// # use google_cloud_vmwareengine_v1::model::ResetVcenterCredentialsRequest;
4535    /// let x = ResetVcenterCredentialsRequest::new().set_private_cloud("example");
4536    /// ```
4537    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4538        self.private_cloud = v.into();
4539        self
4540    }
4541
4542    /// Sets the value of [request_id][crate::model::ResetVcenterCredentialsRequest::request_id].
4543    ///
4544    /// # Example
4545    /// ```ignore,no_run
4546    /// # use google_cloud_vmwareengine_v1::model::ResetVcenterCredentialsRequest;
4547    /// let x = ResetVcenterCredentialsRequest::new().set_request_id("example");
4548    /// ```
4549    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4550        self.request_id = v.into();
4551        self
4552    }
4553
4554    /// Sets the value of [username][crate::model::ResetVcenterCredentialsRequest::username].
4555    ///
4556    /// # Example
4557    /// ```ignore,no_run
4558    /// # use google_cloud_vmwareengine_v1::model::ResetVcenterCredentialsRequest;
4559    /// let x = ResetVcenterCredentialsRequest::new().set_username("example");
4560    /// ```
4561    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4562        self.username = v.into();
4563        self
4564    }
4565}
4566
4567impl wkt::message::Message for ResetVcenterCredentialsRequest {
4568    fn typename() -> &'static str {
4569        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest"
4570    }
4571}
4572
4573/// Response message for
4574/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
4575///
4576/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
4577#[derive(Clone, Default, PartialEq)]
4578#[non_exhaustive]
4579pub struct ListHcxActivationKeysResponse {
4580    /// List of HCX activation keys.
4581    pub hcx_activation_keys: std::vec::Vec<crate::model::HcxActivationKey>,
4582
4583    /// A token, which can be sent as `page_token` to retrieve the next page.
4584    /// If this field is omitted, there are no subsequent pages.
4585    pub next_page_token: std::string::String,
4586
4587    /// Locations that could not be reached when making an aggregated query using
4588    /// wildcards.
4589    pub unreachable: std::vec::Vec<std::string::String>,
4590
4591    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4592}
4593
4594impl ListHcxActivationKeysResponse {
4595    /// Creates a new default instance.
4596    pub fn new() -> Self {
4597        std::default::Default::default()
4598    }
4599
4600    /// Sets the value of [hcx_activation_keys][crate::model::ListHcxActivationKeysResponse::hcx_activation_keys].
4601    ///
4602    /// # Example
4603    /// ```ignore,no_run
4604    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysResponse;
4605    /// use google_cloud_vmwareengine_v1::model::HcxActivationKey;
4606    /// let x = ListHcxActivationKeysResponse::new()
4607    ///     .set_hcx_activation_keys([
4608    ///         HcxActivationKey::default()/* use setters */,
4609    ///         HcxActivationKey::default()/* use (different) setters */,
4610    ///     ]);
4611    /// ```
4612    pub fn set_hcx_activation_keys<T, V>(mut self, v: T) -> Self
4613    where
4614        T: std::iter::IntoIterator<Item = V>,
4615        V: std::convert::Into<crate::model::HcxActivationKey>,
4616    {
4617        use std::iter::Iterator;
4618        self.hcx_activation_keys = v.into_iter().map(|i| i.into()).collect();
4619        self
4620    }
4621
4622    /// Sets the value of [next_page_token][crate::model::ListHcxActivationKeysResponse::next_page_token].
4623    ///
4624    /// # Example
4625    /// ```ignore,no_run
4626    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysResponse;
4627    /// let x = ListHcxActivationKeysResponse::new().set_next_page_token("example");
4628    /// ```
4629    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4630        self.next_page_token = v.into();
4631        self
4632    }
4633
4634    /// Sets the value of [unreachable][crate::model::ListHcxActivationKeysResponse::unreachable].
4635    ///
4636    /// # Example
4637    /// ```ignore,no_run
4638    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysResponse;
4639    /// let x = ListHcxActivationKeysResponse::new().set_unreachable(["a", "b", "c"]);
4640    /// ```
4641    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4642    where
4643        T: std::iter::IntoIterator<Item = V>,
4644        V: std::convert::Into<std::string::String>,
4645    {
4646        use std::iter::Iterator;
4647        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4648        self
4649    }
4650}
4651
4652impl wkt::message::Message for ListHcxActivationKeysResponse {
4653    fn typename() -> &'static str {
4654        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse"
4655    }
4656}
4657
4658#[doc(hidden)]
4659impl google_cloud_gax::paginator::internal::PageableResponse for ListHcxActivationKeysResponse {
4660    type PageItem = crate::model::HcxActivationKey;
4661
4662    fn items(self) -> std::vec::Vec<Self::PageItem> {
4663        self.hcx_activation_keys
4664    }
4665
4666    fn next_page_token(&self) -> std::string::String {
4667        use std::clone::Clone;
4668        self.next_page_token.clone()
4669    }
4670}
4671
4672/// Request message for
4673/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
4674///
4675/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
4676#[derive(Clone, Default, PartialEq)]
4677#[non_exhaustive]
4678pub struct ListHcxActivationKeysRequest {
4679    /// Required. The resource name of the private cloud
4680    /// to be queried for HCX activation keys.
4681    /// Resource names are schemeless URIs that follow the conventions in
4682    /// <https://cloud.google.com/apis/design/resource_names>.
4683    /// For example:
4684    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
4685    pub parent: std::string::String,
4686
4687    /// The maximum number of HCX activation keys to return in one page.
4688    /// The service may return fewer than this value.
4689    /// The maximum value is coerced to 1000.
4690    /// The default value of this field is 500.
4691    pub page_size: i32,
4692
4693    /// A page token, received from a previous `ListHcxActivationKeys` call.
4694    /// Provide this to retrieve the subsequent page.
4695    ///
4696    /// When paginating, all other parameters provided to
4697    /// `ListHcxActivationKeys` must match the call that provided the page
4698    /// token.
4699    pub page_token: std::string::String,
4700
4701    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4702}
4703
4704impl ListHcxActivationKeysRequest {
4705    /// Creates a new default instance.
4706    pub fn new() -> Self {
4707        std::default::Default::default()
4708    }
4709
4710    /// Sets the value of [parent][crate::model::ListHcxActivationKeysRequest::parent].
4711    ///
4712    /// # Example
4713    /// ```ignore,no_run
4714    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysRequest;
4715    /// let x = ListHcxActivationKeysRequest::new().set_parent("example");
4716    /// ```
4717    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4718        self.parent = v.into();
4719        self
4720    }
4721
4722    /// Sets the value of [page_size][crate::model::ListHcxActivationKeysRequest::page_size].
4723    ///
4724    /// # Example
4725    /// ```ignore,no_run
4726    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysRequest;
4727    /// let x = ListHcxActivationKeysRequest::new().set_page_size(42);
4728    /// ```
4729    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4730        self.page_size = v.into();
4731        self
4732    }
4733
4734    /// Sets the value of [page_token][crate::model::ListHcxActivationKeysRequest::page_token].
4735    ///
4736    /// # Example
4737    /// ```ignore,no_run
4738    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysRequest;
4739    /// let x = ListHcxActivationKeysRequest::new().set_page_token("example");
4740    /// ```
4741    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4742        self.page_token = v.into();
4743        self
4744    }
4745}
4746
4747impl wkt::message::Message for ListHcxActivationKeysRequest {
4748    fn typename() -> &'static str {
4749        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest"
4750    }
4751}
4752
4753/// Request message for [VmwareEngine.GetHcxActivationKeys][]
4754#[derive(Clone, Default, PartialEq)]
4755#[non_exhaustive]
4756pub struct GetHcxActivationKeyRequest {
4757    /// Required. The resource name of the HCX activation key to retrieve.
4758    /// Resource names are schemeless URIs that follow the conventions in
4759    /// <https://cloud.google.com/apis/design/resource_names>.
4760    /// For example:
4761    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
4762    pub name: std::string::String,
4763
4764    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4765}
4766
4767impl GetHcxActivationKeyRequest {
4768    /// Creates a new default instance.
4769    pub fn new() -> Self {
4770        std::default::Default::default()
4771    }
4772
4773    /// Sets the value of [name][crate::model::GetHcxActivationKeyRequest::name].
4774    ///
4775    /// # Example
4776    /// ```ignore,no_run
4777    /// # use google_cloud_vmwareengine_v1::model::GetHcxActivationKeyRequest;
4778    /// let x = GetHcxActivationKeyRequest::new().set_name("example");
4779    /// ```
4780    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4781        self.name = v.into();
4782        self
4783    }
4784}
4785
4786impl wkt::message::Message for GetHcxActivationKeyRequest {
4787    fn typename() -> &'static str {
4788        "type.googleapis.com/google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest"
4789    }
4790}
4791
4792/// Request message for
4793/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
4794///
4795/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
4796#[derive(Clone, Default, PartialEq)]
4797#[non_exhaustive]
4798pub struct CreateHcxActivationKeyRequest {
4799    /// Required. The resource name of the private cloud to create the key for.
4800    /// Resource names are schemeless URIs that follow the conventions in
4801    /// <https://cloud.google.com/apis/design/resource_names>.
4802    /// For example:
4803    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
4804    pub parent: std::string::String,
4805
4806    /// Required. The initial description of a new HCX activation key. When
4807    /// creating a new key, this field must be an empty object.
4808    pub hcx_activation_key: std::option::Option<crate::model::HcxActivationKey>,
4809
4810    /// Required. The user-provided identifier of the `HcxActivationKey` to be
4811    /// created. This identifier must be unique among `HcxActivationKey` resources
4812    /// within the parent and becomes the final token in the name URI.
4813    /// The identifier must meet the following requirements:
4814    ///
4815    /// * Only contains 1-63 alphanumeric characters and hyphens
4816    /// * Begins with an alphabetical character
4817    /// * Ends with a non-hyphen character
4818    /// * Not formatted as a UUID
4819    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
4820    ///   (section 3.5)
4821    pub hcx_activation_key_id: std::string::String,
4822
4823    /// A request ID to identify requests. Specify a unique request ID
4824    /// so that if you must retry your request, the server will know to ignore
4825    /// the request if it has already been completed. The server guarantees that a
4826    /// request doesn't result in creation of duplicate commitments for at least 60
4827    /// minutes.
4828    ///
4829    /// For example, consider a situation where you make an initial request and the
4830    /// request times out. If you make the request again with the same request ID,
4831    /// the server can check if original operation with the same request ID was
4832    /// received, and if so, will ignore the second request. This prevents clients
4833    /// from accidentally creating duplicate commitments.
4834    ///
4835    /// The request ID must be a valid UUID with the exception that zero UUID is
4836    /// not supported (00000000-0000-0000-0000-000000000000).
4837    pub request_id: std::string::String,
4838
4839    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4840}
4841
4842impl CreateHcxActivationKeyRequest {
4843    /// Creates a new default instance.
4844    pub fn new() -> Self {
4845        std::default::Default::default()
4846    }
4847
4848    /// Sets the value of [parent][crate::model::CreateHcxActivationKeyRequest::parent].
4849    ///
4850    /// # Example
4851    /// ```ignore,no_run
4852    /// # use google_cloud_vmwareengine_v1::model::CreateHcxActivationKeyRequest;
4853    /// let x = CreateHcxActivationKeyRequest::new().set_parent("example");
4854    /// ```
4855    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4856        self.parent = v.into();
4857        self
4858    }
4859
4860    /// Sets the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
4861    ///
4862    /// # Example
4863    /// ```ignore,no_run
4864    /// # use google_cloud_vmwareengine_v1::model::CreateHcxActivationKeyRequest;
4865    /// use google_cloud_vmwareengine_v1::model::HcxActivationKey;
4866    /// let x = CreateHcxActivationKeyRequest::new().set_hcx_activation_key(HcxActivationKey::default()/* use setters */);
4867    /// ```
4868    pub fn set_hcx_activation_key<T>(mut self, v: T) -> Self
4869    where
4870        T: std::convert::Into<crate::model::HcxActivationKey>,
4871    {
4872        self.hcx_activation_key = std::option::Option::Some(v.into());
4873        self
4874    }
4875
4876    /// Sets or clears the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
4877    ///
4878    /// # Example
4879    /// ```ignore,no_run
4880    /// # use google_cloud_vmwareengine_v1::model::CreateHcxActivationKeyRequest;
4881    /// use google_cloud_vmwareengine_v1::model::HcxActivationKey;
4882    /// let x = CreateHcxActivationKeyRequest::new().set_or_clear_hcx_activation_key(Some(HcxActivationKey::default()/* use setters */));
4883    /// let x = CreateHcxActivationKeyRequest::new().set_or_clear_hcx_activation_key(None::<HcxActivationKey>);
4884    /// ```
4885    pub fn set_or_clear_hcx_activation_key<T>(mut self, v: std::option::Option<T>) -> Self
4886    where
4887        T: std::convert::Into<crate::model::HcxActivationKey>,
4888    {
4889        self.hcx_activation_key = v.map(|x| x.into());
4890        self
4891    }
4892
4893    /// Sets the value of [hcx_activation_key_id][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key_id].
4894    ///
4895    /// # Example
4896    /// ```ignore,no_run
4897    /// # use google_cloud_vmwareengine_v1::model::CreateHcxActivationKeyRequest;
4898    /// let x = CreateHcxActivationKeyRequest::new().set_hcx_activation_key_id("example");
4899    /// ```
4900    pub fn set_hcx_activation_key_id<T: std::convert::Into<std::string::String>>(
4901        mut self,
4902        v: T,
4903    ) -> Self {
4904        self.hcx_activation_key_id = v.into();
4905        self
4906    }
4907
4908    /// Sets the value of [request_id][crate::model::CreateHcxActivationKeyRequest::request_id].
4909    ///
4910    /// # Example
4911    /// ```ignore,no_run
4912    /// # use google_cloud_vmwareengine_v1::model::CreateHcxActivationKeyRequest;
4913    /// let x = CreateHcxActivationKeyRequest::new().set_request_id("example");
4914    /// ```
4915    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4916        self.request_id = v.into();
4917        self
4918    }
4919}
4920
4921impl wkt::message::Message for CreateHcxActivationKeyRequest {
4922    fn typename() -> &'static str {
4923        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest"
4924    }
4925}
4926
4927/// Request message for
4928/// [VmwareEngine.GetDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]
4929///
4930/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]: crate::client::VmwareEngine::get_dns_forwarding
4931#[derive(Clone, Default, PartialEq)]
4932#[non_exhaustive]
4933pub struct GetDnsForwardingRequest {
4934    /// Required. The resource name of a `DnsForwarding` to retrieve.
4935    /// Resource names are schemeless URIs that follow the conventions in
4936    /// <https://cloud.google.com/apis/design/resource_names>.
4937    /// For example:
4938    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
4939    pub name: std::string::String,
4940
4941    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4942}
4943
4944impl GetDnsForwardingRequest {
4945    /// Creates a new default instance.
4946    pub fn new() -> Self {
4947        std::default::Default::default()
4948    }
4949
4950    /// Sets the value of [name][crate::model::GetDnsForwardingRequest::name].
4951    ///
4952    /// # Example
4953    /// ```ignore,no_run
4954    /// # use google_cloud_vmwareengine_v1::model::GetDnsForwardingRequest;
4955    /// let x = GetDnsForwardingRequest::new().set_name("example");
4956    /// ```
4957    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4958        self.name = v.into();
4959        self
4960    }
4961}
4962
4963impl wkt::message::Message for GetDnsForwardingRequest {
4964    fn typename() -> &'static str {
4965        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsForwardingRequest"
4966    }
4967}
4968
4969/// Request message for
4970/// [VmwareEngine.UpdateDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]
4971///
4972/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]: crate::client::VmwareEngine::update_dns_forwarding
4973#[derive(Clone, Default, PartialEq)]
4974#[non_exhaustive]
4975pub struct UpdateDnsForwardingRequest {
4976    /// Required. DnsForwarding config details.
4977    pub dns_forwarding: std::option::Option<crate::model::DnsForwarding>,
4978
4979    /// Required. Field mask is used to specify the fields to be overwritten in the
4980    /// `DnsForwarding` resource by the update.
4981    /// The fields specified in the `update_mask` are relative to the resource, not
4982    /// the full request. A field will be overwritten if it is in the mask. If the
4983    /// user does not provide a mask then all fields will be overwritten.
4984    pub update_mask: std::option::Option<wkt::FieldMask>,
4985
4986    /// Optional. A request ID to identify requests. Specify a unique request ID
4987    /// so that if you must retry your request, the server will know to ignore
4988    /// the request if it has already been completed. The server guarantees that a
4989    /// request doesn't result in creation of duplicate commitments for at least 60
4990    /// minutes.
4991    ///
4992    /// For example, consider a situation where you make an initial request and the
4993    /// request times out. If you make the request again with the same request ID,
4994    /// the server can check if original operation with the same request ID was
4995    /// received, and if so, will ignore the second request. This prevents clients
4996    /// from accidentally creating duplicate commitments.
4997    ///
4998    /// The request ID must be a valid UUID with the exception that zero UUID is
4999    /// not supported (00000000-0000-0000-0000-000000000000).
5000    pub request_id: std::string::String,
5001
5002    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5003}
5004
5005impl UpdateDnsForwardingRequest {
5006    /// Creates a new default instance.
5007    pub fn new() -> Self {
5008        std::default::Default::default()
5009    }
5010
5011    /// Sets the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
5012    ///
5013    /// # Example
5014    /// ```ignore,no_run
5015    /// # use google_cloud_vmwareengine_v1::model::UpdateDnsForwardingRequest;
5016    /// use google_cloud_vmwareengine_v1::model::DnsForwarding;
5017    /// let x = UpdateDnsForwardingRequest::new().set_dns_forwarding(DnsForwarding::default()/* use setters */);
5018    /// ```
5019    pub fn set_dns_forwarding<T>(mut self, v: T) -> Self
5020    where
5021        T: std::convert::Into<crate::model::DnsForwarding>,
5022    {
5023        self.dns_forwarding = std::option::Option::Some(v.into());
5024        self
5025    }
5026
5027    /// Sets or clears the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
5028    ///
5029    /// # Example
5030    /// ```ignore,no_run
5031    /// # use google_cloud_vmwareengine_v1::model::UpdateDnsForwardingRequest;
5032    /// use google_cloud_vmwareengine_v1::model::DnsForwarding;
5033    /// let x = UpdateDnsForwardingRequest::new().set_or_clear_dns_forwarding(Some(DnsForwarding::default()/* use setters */));
5034    /// let x = UpdateDnsForwardingRequest::new().set_or_clear_dns_forwarding(None::<DnsForwarding>);
5035    /// ```
5036    pub fn set_or_clear_dns_forwarding<T>(mut self, v: std::option::Option<T>) -> Self
5037    where
5038        T: std::convert::Into<crate::model::DnsForwarding>,
5039    {
5040        self.dns_forwarding = v.map(|x| x.into());
5041        self
5042    }
5043
5044    /// Sets the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
5045    ///
5046    /// # Example
5047    /// ```ignore,no_run
5048    /// # use google_cloud_vmwareengine_v1::model::UpdateDnsForwardingRequest;
5049    /// use wkt::FieldMask;
5050    /// let x = UpdateDnsForwardingRequest::new().set_update_mask(FieldMask::default()/* use setters */);
5051    /// ```
5052    pub fn set_update_mask<T>(mut self, v: T) -> Self
5053    where
5054        T: std::convert::Into<wkt::FieldMask>,
5055    {
5056        self.update_mask = std::option::Option::Some(v.into());
5057        self
5058    }
5059
5060    /// Sets or clears the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
5061    ///
5062    /// # Example
5063    /// ```ignore,no_run
5064    /// # use google_cloud_vmwareengine_v1::model::UpdateDnsForwardingRequest;
5065    /// use wkt::FieldMask;
5066    /// let x = UpdateDnsForwardingRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5067    /// let x = UpdateDnsForwardingRequest::new().set_or_clear_update_mask(None::<FieldMask>);
5068    /// ```
5069    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5070    where
5071        T: std::convert::Into<wkt::FieldMask>,
5072    {
5073        self.update_mask = v.map(|x| x.into());
5074        self
5075    }
5076
5077    /// Sets the value of [request_id][crate::model::UpdateDnsForwardingRequest::request_id].
5078    ///
5079    /// # Example
5080    /// ```ignore,no_run
5081    /// # use google_cloud_vmwareengine_v1::model::UpdateDnsForwardingRequest;
5082    /// let x = UpdateDnsForwardingRequest::new().set_request_id("example");
5083    /// ```
5084    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5085        self.request_id = v.into();
5086        self
5087    }
5088}
5089
5090impl wkt::message::Message for UpdateDnsForwardingRequest {
5091    fn typename() -> &'static str {
5092        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest"
5093    }
5094}
5095
5096/// Request message for
5097/// [VmwareEngine.CreateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]
5098///
5099/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]: crate::client::VmwareEngine::create_network_peering
5100#[derive(Clone, Default, PartialEq)]
5101#[non_exhaustive]
5102pub struct CreateNetworkPeeringRequest {
5103    /// Required. The resource name of the location to create the new network
5104    /// peering in. This value is always `global`, because `NetworkPeering` is a
5105    /// global resource. Resource names are schemeless URIs that follow the
5106    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
5107    /// example: `projects/my-project/locations/global`
5108    pub parent: std::string::String,
5109
5110    /// Required. The user-provided identifier of the new `NetworkPeering`.
5111    /// This identifier must be unique among `NetworkPeering` resources within the
5112    /// parent and becomes the final token in the name URI.
5113    /// The identifier must meet the following requirements:
5114    ///
5115    /// * Only contains 1-63 alphanumeric characters and hyphens
5116    /// * Begins with an alphabetical character
5117    /// * Ends with a non-hyphen character
5118    /// * Not formatted as a UUID
5119    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5120    ///   (section 3.5)
5121    pub network_peering_id: std::string::String,
5122
5123    /// Required. The initial description of the new network peering.
5124    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
5125
5126    /// Optional. A request ID to identify requests. Specify a unique request ID
5127    /// so that if you must retry your request, the server will know to ignore
5128    /// the request if it has already been completed. The server guarantees that a
5129    /// request doesn't result in creation of duplicate commitments for at least 60
5130    /// minutes.
5131    ///
5132    /// For example, consider a situation where you make an initial request and the
5133    /// request times out. If you make the request again with the same request
5134    /// ID, the server can check if original operation with the same request ID
5135    /// was received, and if so, will ignore the second request. This prevents
5136    /// clients from accidentally creating duplicate commitments.
5137    ///
5138    /// The request ID must be a valid UUID with the exception that zero UUID is
5139    /// not supported (00000000-0000-0000-0000-000000000000).
5140    pub request_id: std::string::String,
5141
5142    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5143}
5144
5145impl CreateNetworkPeeringRequest {
5146    /// Creates a new default instance.
5147    pub fn new() -> Self {
5148        std::default::Default::default()
5149    }
5150
5151    /// Sets the value of [parent][crate::model::CreateNetworkPeeringRequest::parent].
5152    ///
5153    /// # Example
5154    /// ```ignore,no_run
5155    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPeeringRequest;
5156    /// let x = CreateNetworkPeeringRequest::new().set_parent("example");
5157    /// ```
5158    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5159        self.parent = v.into();
5160        self
5161    }
5162
5163    /// Sets the value of [network_peering_id][crate::model::CreateNetworkPeeringRequest::network_peering_id].
5164    ///
5165    /// # Example
5166    /// ```ignore,no_run
5167    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPeeringRequest;
5168    /// let x = CreateNetworkPeeringRequest::new().set_network_peering_id("example");
5169    /// ```
5170    pub fn set_network_peering_id<T: std::convert::Into<std::string::String>>(
5171        mut self,
5172        v: T,
5173    ) -> Self {
5174        self.network_peering_id = v.into();
5175        self
5176    }
5177
5178    /// Sets the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
5179    ///
5180    /// # Example
5181    /// ```ignore,no_run
5182    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPeeringRequest;
5183    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
5184    /// let x = CreateNetworkPeeringRequest::new().set_network_peering(NetworkPeering::default()/* use setters */);
5185    /// ```
5186    pub fn set_network_peering<T>(mut self, v: T) -> Self
5187    where
5188        T: std::convert::Into<crate::model::NetworkPeering>,
5189    {
5190        self.network_peering = std::option::Option::Some(v.into());
5191        self
5192    }
5193
5194    /// Sets or clears the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
5195    ///
5196    /// # Example
5197    /// ```ignore,no_run
5198    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPeeringRequest;
5199    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
5200    /// let x = CreateNetworkPeeringRequest::new().set_or_clear_network_peering(Some(NetworkPeering::default()/* use setters */));
5201    /// let x = CreateNetworkPeeringRequest::new().set_or_clear_network_peering(None::<NetworkPeering>);
5202    /// ```
5203    pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
5204    where
5205        T: std::convert::Into<crate::model::NetworkPeering>,
5206    {
5207        self.network_peering = v.map(|x| x.into());
5208        self
5209    }
5210
5211    /// Sets the value of [request_id][crate::model::CreateNetworkPeeringRequest::request_id].
5212    ///
5213    /// # Example
5214    /// ```ignore,no_run
5215    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPeeringRequest;
5216    /// let x = CreateNetworkPeeringRequest::new().set_request_id("example");
5217    /// ```
5218    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5219        self.request_id = v.into();
5220        self
5221    }
5222}
5223
5224impl wkt::message::Message for CreateNetworkPeeringRequest {
5225    fn typename() -> &'static str {
5226        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest"
5227    }
5228}
5229
5230/// Request message for
5231/// [VmwareEngine.DeleteNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]
5232///
5233/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]: crate::client::VmwareEngine::delete_network_peering
5234#[derive(Clone, Default, PartialEq)]
5235#[non_exhaustive]
5236pub struct DeleteNetworkPeeringRequest {
5237    /// Required. The resource name of the network peering to be deleted.
5238    /// Resource names are schemeless URIs that follow the conventions in
5239    /// <https://cloud.google.com/apis/design/resource_names>.
5240    /// For example:
5241    /// `projects/my-project/locations/global/networkPeerings/my-peering`
5242    pub name: std::string::String,
5243
5244    /// Optional. A request ID to identify requests. Specify a unique request ID
5245    /// so that if you must retry your request, the server will know to ignore
5246    /// the request if it has already been completed. The server guarantees that a
5247    /// request doesn't result in creation of duplicate commitments for at least 60
5248    /// minutes.
5249    ///
5250    /// For example, consider a situation where you make an initial request and the
5251    /// request times out. If you make the request again with the same request
5252    /// ID, the server can check if original operation with the same request ID
5253    /// was received, and if so, will ignore the second request. This prevents
5254    /// clients from accidentally creating duplicate commitments.
5255    ///
5256    /// The request ID must be a valid UUID with the exception that zero UUID is
5257    /// not supported (00000000-0000-0000-0000-000000000000).
5258    pub request_id: std::string::String,
5259
5260    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5261}
5262
5263impl DeleteNetworkPeeringRequest {
5264    /// Creates a new default instance.
5265    pub fn new() -> Self {
5266        std::default::Default::default()
5267    }
5268
5269    /// Sets the value of [name][crate::model::DeleteNetworkPeeringRequest::name].
5270    ///
5271    /// # Example
5272    /// ```ignore,no_run
5273    /// # use google_cloud_vmwareengine_v1::model::DeleteNetworkPeeringRequest;
5274    /// let x = DeleteNetworkPeeringRequest::new().set_name("example");
5275    /// ```
5276    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5277        self.name = v.into();
5278        self
5279    }
5280
5281    /// Sets the value of [request_id][crate::model::DeleteNetworkPeeringRequest::request_id].
5282    ///
5283    /// # Example
5284    /// ```ignore,no_run
5285    /// # use google_cloud_vmwareengine_v1::model::DeleteNetworkPeeringRequest;
5286    /// let x = DeleteNetworkPeeringRequest::new().set_request_id("example");
5287    /// ```
5288    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5289        self.request_id = v.into();
5290        self
5291    }
5292}
5293
5294impl wkt::message::Message for DeleteNetworkPeeringRequest {
5295    fn typename() -> &'static str {
5296        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest"
5297    }
5298}
5299
5300/// Request message for
5301/// [VmwareEngine.GetNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]
5302///
5303/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]: crate::client::VmwareEngine::get_network_peering
5304#[derive(Clone, Default, PartialEq)]
5305#[non_exhaustive]
5306pub struct GetNetworkPeeringRequest {
5307    /// Required. The resource name of the network peering to retrieve.
5308    /// Resource names are schemeless URIs that follow the conventions in
5309    /// <https://cloud.google.com/apis/design/resource_names>.
5310    /// For example:
5311    /// `projects/my-project/locations/global/networkPeerings/my-peering`
5312    pub name: std::string::String,
5313
5314    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5315}
5316
5317impl GetNetworkPeeringRequest {
5318    /// Creates a new default instance.
5319    pub fn new() -> Self {
5320        std::default::Default::default()
5321    }
5322
5323    /// Sets the value of [name][crate::model::GetNetworkPeeringRequest::name].
5324    ///
5325    /// # Example
5326    /// ```ignore,no_run
5327    /// # use google_cloud_vmwareengine_v1::model::GetNetworkPeeringRequest;
5328    /// let x = GetNetworkPeeringRequest::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 GetNetworkPeeringRequest {
5337    fn typename() -> &'static str {
5338        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPeeringRequest"
5339    }
5340}
5341
5342/// Request message for
5343/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
5344///
5345/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
5346#[derive(Clone, Default, PartialEq)]
5347#[non_exhaustive]
5348pub struct ListNetworkPeeringsRequest {
5349    /// Required. The resource name of the location (global) to query for
5350    /// network peerings. Resource names are schemeless URIs that follow the
5351    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
5352    /// example: `projects/my-project/locations/global`
5353    pub parent: std::string::String,
5354
5355    /// The maximum number of network peerings to return in one page.
5356    /// The maximum value is coerced to 1000.
5357    /// The default value of this field is 500.
5358    pub page_size: i32,
5359
5360    /// A page token, received from a previous `ListNetworkPeerings` call.
5361    /// Provide this to retrieve the subsequent page.
5362    ///
5363    /// When paginating, all other parameters provided to
5364    /// `ListNetworkPeerings` must match the call that provided the page
5365    /// token.
5366    pub page_token: std::string::String,
5367
5368    /// A filter expression that matches resources returned in the response.
5369    /// The expression must specify the field name, a comparison
5370    /// operator, and the value that you want to use for filtering. The value
5371    /// must be a string, a number, or a boolean. The comparison operator
5372    /// must be `=`, `!=`, `>`, or `<`.
5373    ///
5374    /// For example, if you are filtering a list of network peerings, you can
5375    /// exclude the ones named `example-peering` by specifying
5376    /// `name != "example-peering"`.
5377    ///
5378    /// To filter on multiple expressions, provide each separate expression within
5379    /// parentheses. For example:
5380    ///
5381    /// ```norust
5382    /// (name = "example-peering")
5383    /// (createTime > "2021-04-12T08:15:10.40Z")
5384    /// ```
5385    ///
5386    /// By default, each expression is an `AND` expression. However, you
5387    /// can include `AND` and `OR` expressions explicitly.
5388    /// For example:
5389    ///
5390    /// ```norust
5391    /// (name = "example-peering-1") AND
5392    /// (createTime > "2021-04-12T08:15:10.40Z") OR
5393    /// (name = "example-peering-2")
5394    /// ```
5395    pub filter: std::string::String,
5396
5397    /// Sorts list results by a certain order. By default, returned results
5398    /// are ordered by `name` in ascending order.
5399    /// You can also sort results in descending order based on the `name` value
5400    /// using `orderBy="name desc"`.
5401    /// Currently, only ordering by `name` is supported.
5402    pub order_by: std::string::String,
5403
5404    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5405}
5406
5407impl ListNetworkPeeringsRequest {
5408    /// Creates a new default instance.
5409    pub fn new() -> Self {
5410        std::default::Default::default()
5411    }
5412
5413    /// Sets the value of [parent][crate::model::ListNetworkPeeringsRequest::parent].
5414    ///
5415    /// # Example
5416    /// ```ignore,no_run
5417    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsRequest;
5418    /// let x = ListNetworkPeeringsRequest::new().set_parent("example");
5419    /// ```
5420    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5421        self.parent = v.into();
5422        self
5423    }
5424
5425    /// Sets the value of [page_size][crate::model::ListNetworkPeeringsRequest::page_size].
5426    ///
5427    /// # Example
5428    /// ```ignore,no_run
5429    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsRequest;
5430    /// let x = ListNetworkPeeringsRequest::new().set_page_size(42);
5431    /// ```
5432    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5433        self.page_size = v.into();
5434        self
5435    }
5436
5437    /// Sets the value of [page_token][crate::model::ListNetworkPeeringsRequest::page_token].
5438    ///
5439    /// # Example
5440    /// ```ignore,no_run
5441    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsRequest;
5442    /// let x = ListNetworkPeeringsRequest::new().set_page_token("example");
5443    /// ```
5444    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5445        self.page_token = v.into();
5446        self
5447    }
5448
5449    /// Sets the value of [filter][crate::model::ListNetworkPeeringsRequest::filter].
5450    ///
5451    /// # Example
5452    /// ```ignore,no_run
5453    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsRequest;
5454    /// let x = ListNetworkPeeringsRequest::new().set_filter("example");
5455    /// ```
5456    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5457        self.filter = v.into();
5458        self
5459    }
5460
5461    /// Sets the value of [order_by][crate::model::ListNetworkPeeringsRequest::order_by].
5462    ///
5463    /// # Example
5464    /// ```ignore,no_run
5465    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsRequest;
5466    /// let x = ListNetworkPeeringsRequest::new().set_order_by("example");
5467    /// ```
5468    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5469        self.order_by = v.into();
5470        self
5471    }
5472}
5473
5474impl wkt::message::Message for ListNetworkPeeringsRequest {
5475    fn typename() -> &'static str {
5476        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest"
5477    }
5478}
5479
5480/// Request message for
5481/// [VmwareEngine.UpdateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]
5482///
5483/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]: crate::client::VmwareEngine::update_network_peering
5484#[derive(Clone, Default, PartialEq)]
5485#[non_exhaustive]
5486pub struct UpdateNetworkPeeringRequest {
5487    /// Required. Network peering description.
5488    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
5489
5490    /// Required. Field mask is used to specify the fields to be overwritten in the
5491    /// `NetworkPeering` resource by the update.
5492    /// The fields specified in the `update_mask` are relative to the resource, not
5493    /// the full request. A field will be overwritten if it is in the mask. If the
5494    /// user does not provide a mask then all fields will be overwritten.
5495    pub update_mask: std::option::Option<wkt::FieldMask>,
5496
5497    /// Optional. A request ID to identify requests. Specify a unique request ID
5498    /// so that if you must retry your request, the server will know to ignore
5499    /// the request if it has already been completed. The server guarantees that a
5500    /// request doesn't result in creation of duplicate commitments for at least 60
5501    /// minutes.
5502    ///
5503    /// For example, consider a situation where you make an initial request and the
5504    /// request times out. If you make the request again with the same request
5505    /// ID, the server can check if original operation with the same request ID
5506    /// was received, and if so, will ignore the second request. This prevents
5507    /// clients from accidentally creating duplicate commitments.
5508    ///
5509    /// The request ID must be a valid UUID with the exception that zero UUID is
5510    /// not supported (00000000-0000-0000-0000-000000000000).
5511    pub request_id: std::string::String,
5512
5513    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5514}
5515
5516impl UpdateNetworkPeeringRequest {
5517    /// Creates a new default instance.
5518    pub fn new() -> Self {
5519        std::default::Default::default()
5520    }
5521
5522    /// Sets the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
5523    ///
5524    /// # Example
5525    /// ```ignore,no_run
5526    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPeeringRequest;
5527    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
5528    /// let x = UpdateNetworkPeeringRequest::new().set_network_peering(NetworkPeering::default()/* use setters */);
5529    /// ```
5530    pub fn set_network_peering<T>(mut self, v: T) -> Self
5531    where
5532        T: std::convert::Into<crate::model::NetworkPeering>,
5533    {
5534        self.network_peering = std::option::Option::Some(v.into());
5535        self
5536    }
5537
5538    /// Sets or clears the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
5539    ///
5540    /// # Example
5541    /// ```ignore,no_run
5542    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPeeringRequest;
5543    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
5544    /// let x = UpdateNetworkPeeringRequest::new().set_or_clear_network_peering(Some(NetworkPeering::default()/* use setters */));
5545    /// let x = UpdateNetworkPeeringRequest::new().set_or_clear_network_peering(None::<NetworkPeering>);
5546    /// ```
5547    pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
5548    where
5549        T: std::convert::Into<crate::model::NetworkPeering>,
5550    {
5551        self.network_peering = v.map(|x| x.into());
5552        self
5553    }
5554
5555    /// Sets the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
5556    ///
5557    /// # Example
5558    /// ```ignore,no_run
5559    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPeeringRequest;
5560    /// use wkt::FieldMask;
5561    /// let x = UpdateNetworkPeeringRequest::new().set_update_mask(FieldMask::default()/* use setters */);
5562    /// ```
5563    pub fn set_update_mask<T>(mut self, v: T) -> Self
5564    where
5565        T: std::convert::Into<wkt::FieldMask>,
5566    {
5567        self.update_mask = std::option::Option::Some(v.into());
5568        self
5569    }
5570
5571    /// Sets or clears the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
5572    ///
5573    /// # Example
5574    /// ```ignore,no_run
5575    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPeeringRequest;
5576    /// use wkt::FieldMask;
5577    /// let x = UpdateNetworkPeeringRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5578    /// let x = UpdateNetworkPeeringRequest::new().set_or_clear_update_mask(None::<FieldMask>);
5579    /// ```
5580    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5581    where
5582        T: std::convert::Into<wkt::FieldMask>,
5583    {
5584        self.update_mask = v.map(|x| x.into());
5585        self
5586    }
5587
5588    /// Sets the value of [request_id][crate::model::UpdateNetworkPeeringRequest::request_id].
5589    ///
5590    /// # Example
5591    /// ```ignore,no_run
5592    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPeeringRequest;
5593    /// let x = UpdateNetworkPeeringRequest::new().set_request_id("example");
5594    /// ```
5595    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5596        self.request_id = v.into();
5597        self
5598    }
5599}
5600
5601impl wkt::message::Message for UpdateNetworkPeeringRequest {
5602    fn typename() -> &'static str {
5603        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest"
5604    }
5605}
5606
5607/// Response message for
5608/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
5609///
5610/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
5611#[derive(Clone, Default, PartialEq)]
5612#[non_exhaustive]
5613pub struct ListNetworkPeeringsResponse {
5614    /// A list of network peerings.
5615    pub network_peerings: std::vec::Vec<crate::model::NetworkPeering>,
5616
5617    /// A token, which can be sent as `page_token` to retrieve the next page.
5618    /// If this field is omitted, there are no subsequent pages.
5619    pub next_page_token: std::string::String,
5620
5621    /// Unreachable resources.
5622    pub unreachable: std::vec::Vec<std::string::String>,
5623
5624    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5625}
5626
5627impl ListNetworkPeeringsResponse {
5628    /// Creates a new default instance.
5629    pub fn new() -> Self {
5630        std::default::Default::default()
5631    }
5632
5633    /// Sets the value of [network_peerings][crate::model::ListNetworkPeeringsResponse::network_peerings].
5634    ///
5635    /// # Example
5636    /// ```ignore,no_run
5637    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsResponse;
5638    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
5639    /// let x = ListNetworkPeeringsResponse::new()
5640    ///     .set_network_peerings([
5641    ///         NetworkPeering::default()/* use setters */,
5642    ///         NetworkPeering::default()/* use (different) setters */,
5643    ///     ]);
5644    /// ```
5645    pub fn set_network_peerings<T, V>(mut self, v: T) -> Self
5646    where
5647        T: std::iter::IntoIterator<Item = V>,
5648        V: std::convert::Into<crate::model::NetworkPeering>,
5649    {
5650        use std::iter::Iterator;
5651        self.network_peerings = v.into_iter().map(|i| i.into()).collect();
5652        self
5653    }
5654
5655    /// Sets the value of [next_page_token][crate::model::ListNetworkPeeringsResponse::next_page_token].
5656    ///
5657    /// # Example
5658    /// ```ignore,no_run
5659    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsResponse;
5660    /// let x = ListNetworkPeeringsResponse::new().set_next_page_token("example");
5661    /// ```
5662    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5663        self.next_page_token = v.into();
5664        self
5665    }
5666
5667    /// Sets the value of [unreachable][crate::model::ListNetworkPeeringsResponse::unreachable].
5668    ///
5669    /// # Example
5670    /// ```ignore,no_run
5671    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsResponse;
5672    /// let x = ListNetworkPeeringsResponse::new().set_unreachable(["a", "b", "c"]);
5673    /// ```
5674    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5675    where
5676        T: std::iter::IntoIterator<Item = V>,
5677        V: std::convert::Into<std::string::String>,
5678    {
5679        use std::iter::Iterator;
5680        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5681        self
5682    }
5683}
5684
5685impl wkt::message::Message for ListNetworkPeeringsResponse {
5686    fn typename() -> &'static str {
5687        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsResponse"
5688    }
5689}
5690
5691#[doc(hidden)]
5692impl google_cloud_gax::paginator::internal::PageableResponse for ListNetworkPeeringsResponse {
5693    type PageItem = crate::model::NetworkPeering;
5694
5695    fn items(self) -> std::vec::Vec<Self::PageItem> {
5696        self.network_peerings
5697    }
5698
5699    fn next_page_token(&self) -> std::string::String {
5700        use std::clone::Clone;
5701        self.next_page_token.clone()
5702    }
5703}
5704
5705/// Request message for
5706/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
5707///
5708/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
5709#[derive(Clone, Default, PartialEq)]
5710#[non_exhaustive]
5711pub struct ListPeeringRoutesRequest {
5712    /// Required. The resource name of the network peering to retrieve peering
5713    /// routes from. Resource names are schemeless URIs that follow the conventions
5714    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
5715    /// `projects/my-project/locations/global/networkPeerings/my-peering`
5716    pub parent: std::string::String,
5717
5718    /// The maximum number of peering routes to return in one page.
5719    /// The service may return fewer than this value.
5720    /// The maximum value is coerced to 1000.
5721    /// The default value of this field is 500.
5722    pub page_size: i32,
5723
5724    /// A page token, received from a previous `ListPeeringRoutes` call.
5725    /// Provide this to retrieve the subsequent page.
5726    /// When paginating, all other parameters provided to `ListPeeringRoutes` must
5727    /// match the call that provided the page token.
5728    pub page_token: std::string::String,
5729
5730    /// A filter expression that matches resources returned in the response.
5731    /// Currently, only filtering on the `direction` field is supported. To return
5732    /// routes imported from the peer network, provide "direction=INCOMING". To
5733    /// return routes exported from the VMware Engine network, provide
5734    /// "direction=OUTGOING". Other filter expressions return an error.
5735    pub filter: std::string::String,
5736
5737    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5738}
5739
5740impl ListPeeringRoutesRequest {
5741    /// Creates a new default instance.
5742    pub fn new() -> Self {
5743        std::default::Default::default()
5744    }
5745
5746    /// Sets the value of [parent][crate::model::ListPeeringRoutesRequest::parent].
5747    ///
5748    /// # Example
5749    /// ```ignore,no_run
5750    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesRequest;
5751    /// let x = ListPeeringRoutesRequest::new().set_parent("example");
5752    /// ```
5753    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5754        self.parent = v.into();
5755        self
5756    }
5757
5758    /// Sets the value of [page_size][crate::model::ListPeeringRoutesRequest::page_size].
5759    ///
5760    /// # Example
5761    /// ```ignore,no_run
5762    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesRequest;
5763    /// let x = ListPeeringRoutesRequest::new().set_page_size(42);
5764    /// ```
5765    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5766        self.page_size = v.into();
5767        self
5768    }
5769
5770    /// Sets the value of [page_token][crate::model::ListPeeringRoutesRequest::page_token].
5771    ///
5772    /// # Example
5773    /// ```ignore,no_run
5774    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesRequest;
5775    /// let x = ListPeeringRoutesRequest::new().set_page_token("example");
5776    /// ```
5777    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5778        self.page_token = v.into();
5779        self
5780    }
5781
5782    /// Sets the value of [filter][crate::model::ListPeeringRoutesRequest::filter].
5783    ///
5784    /// # Example
5785    /// ```ignore,no_run
5786    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesRequest;
5787    /// let x = ListPeeringRoutesRequest::new().set_filter("example");
5788    /// ```
5789    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5790        self.filter = v.into();
5791        self
5792    }
5793}
5794
5795impl wkt::message::Message for ListPeeringRoutesRequest {
5796    fn typename() -> &'static str {
5797        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesRequest"
5798    }
5799}
5800
5801/// Response message for
5802/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
5803///
5804/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
5805#[derive(Clone, Default, PartialEq)]
5806#[non_exhaustive]
5807pub struct ListPeeringRoutesResponse {
5808    /// A list of peering routes.
5809    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
5810
5811    /// A token, which can be sent as `page_token` to retrieve the next page.
5812    /// If this field is omitted, there are no subsequent pages.
5813    pub next_page_token: std::string::String,
5814
5815    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5816}
5817
5818impl ListPeeringRoutesResponse {
5819    /// Creates a new default instance.
5820    pub fn new() -> Self {
5821        std::default::Default::default()
5822    }
5823
5824    /// Sets the value of [peering_routes][crate::model::ListPeeringRoutesResponse::peering_routes].
5825    ///
5826    /// # Example
5827    /// ```ignore,no_run
5828    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesResponse;
5829    /// use google_cloud_vmwareengine_v1::model::PeeringRoute;
5830    /// let x = ListPeeringRoutesResponse::new()
5831    ///     .set_peering_routes([
5832    ///         PeeringRoute::default()/* use setters */,
5833    ///         PeeringRoute::default()/* use (different) setters */,
5834    ///     ]);
5835    /// ```
5836    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
5837    where
5838        T: std::iter::IntoIterator<Item = V>,
5839        V: std::convert::Into<crate::model::PeeringRoute>,
5840    {
5841        use std::iter::Iterator;
5842        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
5843        self
5844    }
5845
5846    /// Sets the value of [next_page_token][crate::model::ListPeeringRoutesResponse::next_page_token].
5847    ///
5848    /// # Example
5849    /// ```ignore,no_run
5850    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesResponse;
5851    /// let x = ListPeeringRoutesResponse::new().set_next_page_token("example");
5852    /// ```
5853    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5854        self.next_page_token = v.into();
5855        self
5856    }
5857}
5858
5859impl wkt::message::Message for ListPeeringRoutesResponse {
5860    fn typename() -> &'static str {
5861        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesResponse"
5862    }
5863}
5864
5865#[doc(hidden)]
5866impl google_cloud_gax::paginator::internal::PageableResponse for ListPeeringRoutesResponse {
5867    type PageItem = crate::model::PeeringRoute;
5868
5869    fn items(self) -> std::vec::Vec<Self::PageItem> {
5870        self.peering_routes
5871    }
5872
5873    fn next_page_token(&self) -> std::string::String {
5874        use std::clone::Clone;
5875        self.next_page_token.clone()
5876    }
5877}
5878
5879/// Request message for
5880/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
5881///
5882/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
5883#[derive(Clone, Default, PartialEq)]
5884#[non_exhaustive]
5885pub struct ListNetworkPoliciesRequest {
5886    /// Required. The resource name of the location (region) to query for
5887    /// network policies. Resource names are schemeless URIs that follow the
5888    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
5889    /// example: `projects/my-project/locations/us-central1`
5890    pub parent: std::string::String,
5891
5892    /// The maximum number of network policies to return in one page.
5893    /// The service may return fewer than this value.
5894    /// The maximum value is coerced to 1000.
5895    /// The default value of this field is 500.
5896    pub page_size: i32,
5897
5898    /// A page token, received from a previous `ListNetworkPolicies` call.
5899    /// Provide this to retrieve the subsequent page.
5900    ///
5901    /// When paginating, all other parameters provided to
5902    /// `ListNetworkPolicies` must match the call that provided the page
5903    /// token.
5904    pub page_token: std::string::String,
5905
5906    /// A filter expression that matches resources returned in the response.
5907    /// The expression must specify the field name, a comparison
5908    /// operator, and the value that you want to use for filtering. The value
5909    /// must be a string, a number, or a boolean. The comparison operator
5910    /// must be `=`, `!=`, `>`, or `<`.
5911    ///
5912    /// For example, if you are filtering a list of network policies, you can
5913    /// exclude the ones named `example-policy` by specifying
5914    /// `name != "example-policy"`.
5915    ///
5916    /// To filter on multiple expressions, provide each separate expression within
5917    /// parentheses. For example:
5918    ///
5919    /// ```norust
5920    /// (name = "example-policy")
5921    /// (createTime > "2021-04-12T08:15:10.40Z")
5922    /// ```
5923    ///
5924    /// By default, each expression is an `AND` expression. However, you
5925    /// can include `AND` and `OR` expressions explicitly.
5926    /// For example:
5927    ///
5928    /// ```norust
5929    /// (name = "example-policy-1") AND
5930    /// (createTime > "2021-04-12T08:15:10.40Z") OR
5931    /// (name = "example-policy-2")
5932    /// ```
5933    pub filter: std::string::String,
5934
5935    /// Sorts list results by a certain order. By default, returned results
5936    /// are ordered by `name` in ascending order.
5937    /// You can also sort results in descending order based on the `name` value
5938    /// using `orderBy="name desc"`.
5939    /// Currently, only ordering by `name` is supported.
5940    pub order_by: std::string::String,
5941
5942    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5943}
5944
5945impl ListNetworkPoliciesRequest {
5946    /// Creates a new default instance.
5947    pub fn new() -> Self {
5948        std::default::Default::default()
5949    }
5950
5951    /// Sets the value of [parent][crate::model::ListNetworkPoliciesRequest::parent].
5952    ///
5953    /// # Example
5954    /// ```ignore,no_run
5955    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesRequest;
5956    /// let x = ListNetworkPoliciesRequest::new().set_parent("example");
5957    /// ```
5958    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5959        self.parent = v.into();
5960        self
5961    }
5962
5963    /// Sets the value of [page_size][crate::model::ListNetworkPoliciesRequest::page_size].
5964    ///
5965    /// # Example
5966    /// ```ignore,no_run
5967    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesRequest;
5968    /// let x = ListNetworkPoliciesRequest::new().set_page_size(42);
5969    /// ```
5970    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5971        self.page_size = v.into();
5972        self
5973    }
5974
5975    /// Sets the value of [page_token][crate::model::ListNetworkPoliciesRequest::page_token].
5976    ///
5977    /// # Example
5978    /// ```ignore,no_run
5979    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesRequest;
5980    /// let x = ListNetworkPoliciesRequest::new().set_page_token("example");
5981    /// ```
5982    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5983        self.page_token = v.into();
5984        self
5985    }
5986
5987    /// Sets the value of [filter][crate::model::ListNetworkPoliciesRequest::filter].
5988    ///
5989    /// # Example
5990    /// ```ignore,no_run
5991    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesRequest;
5992    /// let x = ListNetworkPoliciesRequest::new().set_filter("example");
5993    /// ```
5994    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5995        self.filter = v.into();
5996        self
5997    }
5998
5999    /// Sets the value of [order_by][crate::model::ListNetworkPoliciesRequest::order_by].
6000    ///
6001    /// # Example
6002    /// ```ignore,no_run
6003    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesRequest;
6004    /// let x = ListNetworkPoliciesRequest::new().set_order_by("example");
6005    /// ```
6006    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6007        self.order_by = v.into();
6008        self
6009    }
6010}
6011
6012impl wkt::message::Message for ListNetworkPoliciesRequest {
6013    fn typename() -> &'static str {
6014        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest"
6015    }
6016}
6017
6018/// Response message for
6019/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
6020///
6021/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
6022#[derive(Clone, Default, PartialEq)]
6023#[non_exhaustive]
6024pub struct ListNetworkPoliciesResponse {
6025    /// A list of network policies.
6026    pub network_policies: std::vec::Vec<crate::model::NetworkPolicy>,
6027
6028    /// A token, which can be send as `page_token` to retrieve the next page.
6029    /// If this field is omitted, there are no subsequent pages.
6030    pub next_page_token: std::string::String,
6031
6032    /// Locations that could not be reached when making an aggregated query using
6033    /// wildcards.
6034    pub unreachable: std::vec::Vec<std::string::String>,
6035
6036    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6037}
6038
6039impl ListNetworkPoliciesResponse {
6040    /// Creates a new default instance.
6041    pub fn new() -> Self {
6042        std::default::Default::default()
6043    }
6044
6045    /// Sets the value of [network_policies][crate::model::ListNetworkPoliciesResponse::network_policies].
6046    ///
6047    /// # Example
6048    /// ```ignore,no_run
6049    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesResponse;
6050    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
6051    /// let x = ListNetworkPoliciesResponse::new()
6052    ///     .set_network_policies([
6053    ///         NetworkPolicy::default()/* use setters */,
6054    ///         NetworkPolicy::default()/* use (different) setters */,
6055    ///     ]);
6056    /// ```
6057    pub fn set_network_policies<T, V>(mut self, v: T) -> Self
6058    where
6059        T: std::iter::IntoIterator<Item = V>,
6060        V: std::convert::Into<crate::model::NetworkPolicy>,
6061    {
6062        use std::iter::Iterator;
6063        self.network_policies = v.into_iter().map(|i| i.into()).collect();
6064        self
6065    }
6066
6067    /// Sets the value of [next_page_token][crate::model::ListNetworkPoliciesResponse::next_page_token].
6068    ///
6069    /// # Example
6070    /// ```ignore,no_run
6071    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesResponse;
6072    /// let x = ListNetworkPoliciesResponse::new().set_next_page_token("example");
6073    /// ```
6074    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6075        self.next_page_token = v.into();
6076        self
6077    }
6078
6079    /// Sets the value of [unreachable][crate::model::ListNetworkPoliciesResponse::unreachable].
6080    ///
6081    /// # Example
6082    /// ```ignore,no_run
6083    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesResponse;
6084    /// let x = ListNetworkPoliciesResponse::new().set_unreachable(["a", "b", "c"]);
6085    /// ```
6086    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6087    where
6088        T: std::iter::IntoIterator<Item = V>,
6089        V: std::convert::Into<std::string::String>,
6090    {
6091        use std::iter::Iterator;
6092        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6093        self
6094    }
6095}
6096
6097impl wkt::message::Message for ListNetworkPoliciesResponse {
6098    fn typename() -> &'static str {
6099        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse"
6100    }
6101}
6102
6103#[doc(hidden)]
6104impl google_cloud_gax::paginator::internal::PageableResponse for ListNetworkPoliciesResponse {
6105    type PageItem = crate::model::NetworkPolicy;
6106
6107    fn items(self) -> std::vec::Vec<Self::PageItem> {
6108        self.network_policies
6109    }
6110
6111    fn next_page_token(&self) -> std::string::String {
6112        use std::clone::Clone;
6113        self.next_page_token.clone()
6114    }
6115}
6116
6117/// Request message for
6118/// [VmwareEngine.GetNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]
6119///
6120/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]: crate::client::VmwareEngine::get_network_policy
6121#[derive(Clone, Default, PartialEq)]
6122#[non_exhaustive]
6123pub struct GetNetworkPolicyRequest {
6124    /// Required. The resource name of the network policy to retrieve.
6125    /// Resource names are schemeless URIs that follow the conventions in
6126    /// <https://cloud.google.com/apis/design/resource_names>.
6127    /// For example:
6128    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
6129    pub name: std::string::String,
6130
6131    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6132}
6133
6134impl GetNetworkPolicyRequest {
6135    /// Creates a new default instance.
6136    pub fn new() -> Self {
6137        std::default::Default::default()
6138    }
6139
6140    /// Sets the value of [name][crate::model::GetNetworkPolicyRequest::name].
6141    ///
6142    /// # Example
6143    /// ```ignore,no_run
6144    /// # use google_cloud_vmwareengine_v1::model::GetNetworkPolicyRequest;
6145    /// let x = GetNetworkPolicyRequest::new().set_name("example");
6146    /// ```
6147    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6148        self.name = v.into();
6149        self
6150    }
6151}
6152
6153impl wkt::message::Message for GetNetworkPolicyRequest {
6154    fn typename() -> &'static str {
6155        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPolicyRequest"
6156    }
6157}
6158
6159/// Request message for
6160/// [VmwareEngine.UpdateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]
6161///
6162/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]: crate::client::VmwareEngine::update_network_policy
6163#[derive(Clone, Default, PartialEq)]
6164#[non_exhaustive]
6165pub struct UpdateNetworkPolicyRequest {
6166    /// Required. Network policy description.
6167    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
6168
6169    /// Required. Field mask is used to specify the fields to be overwritten in the
6170    /// `NetworkPolicy` resource by the update.
6171    /// The fields specified in the `update_mask` are relative to the resource, not
6172    /// the full request. A field will be overwritten if it is in the mask. If the
6173    /// user does not provide a mask then all fields will be overwritten.
6174    pub update_mask: std::option::Option<wkt::FieldMask>,
6175
6176    /// Optional. A request ID to identify requests. Specify a unique request ID
6177    /// so that if you must retry your request, the server will know to ignore
6178    /// the request if it has already been completed. The server guarantees that a
6179    /// request doesn't result in creation of duplicate commitments for at least 60
6180    /// minutes.
6181    ///
6182    /// For example, consider a situation where you make an initial request and the
6183    /// request times out. If you make the request again with the same request
6184    /// ID, the server can check if original operation with the same request ID
6185    /// was received, and if so, will ignore the second request. This prevents
6186    /// clients from accidentally creating duplicate commitments.
6187    ///
6188    /// The request ID must be a valid UUID with the exception that zero UUID is
6189    /// not supported (00000000-0000-0000-0000-000000000000).
6190    pub request_id: std::string::String,
6191
6192    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6193}
6194
6195impl UpdateNetworkPolicyRequest {
6196    /// Creates a new default instance.
6197    pub fn new() -> Self {
6198        std::default::Default::default()
6199    }
6200
6201    /// Sets the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
6202    ///
6203    /// # Example
6204    /// ```ignore,no_run
6205    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPolicyRequest;
6206    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
6207    /// let x = UpdateNetworkPolicyRequest::new().set_network_policy(NetworkPolicy::default()/* use setters */);
6208    /// ```
6209    pub fn set_network_policy<T>(mut self, v: T) -> Self
6210    where
6211        T: std::convert::Into<crate::model::NetworkPolicy>,
6212    {
6213        self.network_policy = std::option::Option::Some(v.into());
6214        self
6215    }
6216
6217    /// Sets or clears the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
6218    ///
6219    /// # Example
6220    /// ```ignore,no_run
6221    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPolicyRequest;
6222    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
6223    /// let x = UpdateNetworkPolicyRequest::new().set_or_clear_network_policy(Some(NetworkPolicy::default()/* use setters */));
6224    /// let x = UpdateNetworkPolicyRequest::new().set_or_clear_network_policy(None::<NetworkPolicy>);
6225    /// ```
6226    pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
6227    where
6228        T: std::convert::Into<crate::model::NetworkPolicy>,
6229    {
6230        self.network_policy = v.map(|x| x.into());
6231        self
6232    }
6233
6234    /// Sets the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
6235    ///
6236    /// # Example
6237    /// ```ignore,no_run
6238    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPolicyRequest;
6239    /// use wkt::FieldMask;
6240    /// let x = UpdateNetworkPolicyRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6241    /// ```
6242    pub fn set_update_mask<T>(mut self, v: T) -> Self
6243    where
6244        T: std::convert::Into<wkt::FieldMask>,
6245    {
6246        self.update_mask = std::option::Option::Some(v.into());
6247        self
6248    }
6249
6250    /// Sets or clears the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
6251    ///
6252    /// # Example
6253    /// ```ignore,no_run
6254    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPolicyRequest;
6255    /// use wkt::FieldMask;
6256    /// let x = UpdateNetworkPolicyRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6257    /// let x = UpdateNetworkPolicyRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6258    /// ```
6259    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6260    where
6261        T: std::convert::Into<wkt::FieldMask>,
6262    {
6263        self.update_mask = v.map(|x| x.into());
6264        self
6265    }
6266
6267    /// Sets the value of [request_id][crate::model::UpdateNetworkPolicyRequest::request_id].
6268    ///
6269    /// # Example
6270    /// ```ignore,no_run
6271    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPolicyRequest;
6272    /// let x = UpdateNetworkPolicyRequest::new().set_request_id("example");
6273    /// ```
6274    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6275        self.request_id = v.into();
6276        self
6277    }
6278}
6279
6280impl wkt::message::Message for UpdateNetworkPolicyRequest {
6281    fn typename() -> &'static str {
6282        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest"
6283    }
6284}
6285
6286/// Request message for
6287/// [VmwareEngine.CreateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]
6288///
6289/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]: crate::client::VmwareEngine::create_network_policy
6290#[derive(Clone, Default, PartialEq)]
6291#[non_exhaustive]
6292pub struct CreateNetworkPolicyRequest {
6293    /// Required. The resource name of the location (region)
6294    /// to create the new network policy in.
6295    /// Resource names are schemeless URIs that follow the conventions in
6296    /// <https://cloud.google.com/apis/design/resource_names>.
6297    /// For example:
6298    /// `projects/my-project/locations/us-central1`
6299    pub parent: std::string::String,
6300
6301    /// Required. The user-provided identifier of the network policy to be created.
6302    /// This identifier must be unique within parent
6303    /// `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes
6304    /// the final token in the name URI.
6305    /// The identifier must meet the following requirements:
6306    ///
6307    /// * Only contains 1-63 alphanumeric characters and hyphens
6308    /// * Begins with an alphabetical character
6309    /// * Ends with a non-hyphen character
6310    /// * Not formatted as a UUID
6311    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
6312    ///   (section 3.5)
6313    pub network_policy_id: std::string::String,
6314
6315    /// Required. The network policy configuration to use in the request.
6316    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
6317
6318    /// Optional. A request ID to identify requests. Specify a unique request ID
6319    /// so that if you must retry your request, the server will know to ignore
6320    /// the request if it has already been completed. The server guarantees that a
6321    /// request doesn't result in creation of duplicate commitments for at least 60
6322    /// minutes.
6323    ///
6324    /// For example, consider a situation where you make an initial request and the
6325    /// request times out. If you make the request again with the same request
6326    /// ID, the server can check if original operation with the same request ID
6327    /// was received, and if so, will ignore the second request. This prevents
6328    /// clients from accidentally creating duplicate commitments.
6329    ///
6330    /// The request ID must be a valid UUID with the exception that zero UUID is
6331    /// not supported (00000000-0000-0000-0000-000000000000).
6332    pub request_id: std::string::String,
6333
6334    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6335}
6336
6337impl CreateNetworkPolicyRequest {
6338    /// Creates a new default instance.
6339    pub fn new() -> Self {
6340        std::default::Default::default()
6341    }
6342
6343    /// Sets the value of [parent][crate::model::CreateNetworkPolicyRequest::parent].
6344    ///
6345    /// # Example
6346    /// ```ignore,no_run
6347    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPolicyRequest;
6348    /// let x = CreateNetworkPolicyRequest::new().set_parent("example");
6349    /// ```
6350    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6351        self.parent = v.into();
6352        self
6353    }
6354
6355    /// Sets the value of [network_policy_id][crate::model::CreateNetworkPolicyRequest::network_policy_id].
6356    ///
6357    /// # Example
6358    /// ```ignore,no_run
6359    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPolicyRequest;
6360    /// let x = CreateNetworkPolicyRequest::new().set_network_policy_id("example");
6361    /// ```
6362    pub fn set_network_policy_id<T: std::convert::Into<std::string::String>>(
6363        mut self,
6364        v: T,
6365    ) -> Self {
6366        self.network_policy_id = v.into();
6367        self
6368    }
6369
6370    /// Sets the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
6371    ///
6372    /// # Example
6373    /// ```ignore,no_run
6374    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPolicyRequest;
6375    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
6376    /// let x = CreateNetworkPolicyRequest::new().set_network_policy(NetworkPolicy::default()/* use setters */);
6377    /// ```
6378    pub fn set_network_policy<T>(mut self, v: T) -> Self
6379    where
6380        T: std::convert::Into<crate::model::NetworkPolicy>,
6381    {
6382        self.network_policy = std::option::Option::Some(v.into());
6383        self
6384    }
6385
6386    /// Sets or clears the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
6387    ///
6388    /// # Example
6389    /// ```ignore,no_run
6390    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPolicyRequest;
6391    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
6392    /// let x = CreateNetworkPolicyRequest::new().set_or_clear_network_policy(Some(NetworkPolicy::default()/* use setters */));
6393    /// let x = CreateNetworkPolicyRequest::new().set_or_clear_network_policy(None::<NetworkPolicy>);
6394    /// ```
6395    pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
6396    where
6397        T: std::convert::Into<crate::model::NetworkPolicy>,
6398    {
6399        self.network_policy = v.map(|x| x.into());
6400        self
6401    }
6402
6403    /// Sets the value of [request_id][crate::model::CreateNetworkPolicyRequest::request_id].
6404    ///
6405    /// # Example
6406    /// ```ignore,no_run
6407    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPolicyRequest;
6408    /// let x = CreateNetworkPolicyRequest::new().set_request_id("example");
6409    /// ```
6410    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6411        self.request_id = v.into();
6412        self
6413    }
6414}
6415
6416impl wkt::message::Message for CreateNetworkPolicyRequest {
6417    fn typename() -> &'static str {
6418        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest"
6419    }
6420}
6421
6422/// Request message for
6423/// [VmwareEngine.DeleteNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]
6424///
6425/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]: crate::client::VmwareEngine::delete_network_policy
6426#[derive(Clone, Default, PartialEq)]
6427#[non_exhaustive]
6428pub struct DeleteNetworkPolicyRequest {
6429    /// Required. The resource name of the network policy to delete.
6430    /// Resource names are schemeless URIs that follow the conventions in
6431    /// <https://cloud.google.com/apis/design/resource_names>.
6432    /// For example:
6433    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
6434    pub name: std::string::String,
6435
6436    /// Optional. A request ID to identify requests. Specify a unique request ID
6437    /// so that if you must retry your request, the server will know to ignore
6438    /// the request if it has already been completed. The server guarantees that a
6439    /// request doesn't result in creation of duplicate commitments for at least 60
6440    /// minutes.
6441    ///
6442    /// For example, consider a situation where you make an initial request and the
6443    /// request times out. If you make the request again with the same request
6444    /// ID, the server can check if original operation with the same request ID
6445    /// was received, and if so, will ignore the second request. This prevents
6446    /// clients from accidentally creating duplicate commitments.
6447    ///
6448    /// The request ID must be a valid UUID with the exception that zero UUID is
6449    /// not supported (00000000-0000-0000-0000-000000000000).
6450    pub request_id: std::string::String,
6451
6452    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6453}
6454
6455impl DeleteNetworkPolicyRequest {
6456    /// Creates a new default instance.
6457    pub fn new() -> Self {
6458        std::default::Default::default()
6459    }
6460
6461    /// Sets the value of [name][crate::model::DeleteNetworkPolicyRequest::name].
6462    ///
6463    /// # Example
6464    /// ```ignore,no_run
6465    /// # use google_cloud_vmwareengine_v1::model::DeleteNetworkPolicyRequest;
6466    /// let x = DeleteNetworkPolicyRequest::new().set_name("example");
6467    /// ```
6468    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6469        self.name = v.into();
6470        self
6471    }
6472
6473    /// Sets the value of [request_id][crate::model::DeleteNetworkPolicyRequest::request_id].
6474    ///
6475    /// # Example
6476    /// ```ignore,no_run
6477    /// # use google_cloud_vmwareengine_v1::model::DeleteNetworkPolicyRequest;
6478    /// let x = DeleteNetworkPolicyRequest::new().set_request_id("example");
6479    /// ```
6480    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6481        self.request_id = v.into();
6482        self
6483    }
6484}
6485
6486impl wkt::message::Message for DeleteNetworkPolicyRequest {
6487    fn typename() -> &'static str {
6488        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest"
6489    }
6490}
6491
6492/// Request message for
6493/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
6494///
6495/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
6496#[derive(Clone, Default, PartialEq)]
6497#[non_exhaustive]
6498pub struct ListManagementDnsZoneBindingsRequest {
6499    /// Required. The resource name of the private cloud to be queried for
6500    /// management DNS zone bindings.
6501    /// Resource names are schemeless URIs that follow the conventions in
6502    /// <https://cloud.google.com/apis/design/resource_names>.
6503    /// For example:
6504    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
6505    pub parent: std::string::String,
6506
6507    /// The maximum number of management DNS zone bindings to return in one page.
6508    /// The service may return fewer than this value.
6509    /// The maximum value is coerced to 1000.
6510    /// The default value of this field is 500.
6511    pub page_size: i32,
6512
6513    /// A page token, received from a previous `ListManagementDnsZoneBindings`
6514    /// call. Provide this to retrieve the subsequent page.
6515    ///
6516    /// When paginating, all other parameters provided to
6517    /// `ListManagementDnsZoneBindings` must match the call that provided the page
6518    /// token.
6519    pub page_token: std::string::String,
6520
6521    /// A filter expression that matches resources returned in the response.
6522    /// The expression must specify the field name, a comparison
6523    /// operator, and the value that you want to use for filtering. The value
6524    /// must be a string, a number, or a boolean. The comparison operator
6525    /// must be `=`, `!=`, `>`, or `<`.
6526    ///
6527    /// For example, if you are filtering a list of Management DNS Zone Bindings,
6528    /// you can exclude the ones named `example-management-dns-zone-binding` by
6529    /// specifying `name != "example-management-dns-zone-binding"`.
6530    ///
6531    /// To filter on multiple expressions, provide each separate expression within
6532    /// parentheses. For example:
6533    ///
6534    /// ```norust
6535    /// (name = "example-management-dns-zone-binding")
6536    /// (createTime > "2021-04-12T08:15:10.40Z")
6537    /// ```
6538    ///
6539    /// By default, each expression is an `AND` expression. However, you
6540    /// can include `AND` and `OR` expressions explicitly.
6541    /// For example:
6542    ///
6543    /// ```norust
6544    /// (name = "example-management-dns-zone-binding-1") AND
6545    /// (createTime > "2021-04-12T08:15:10.40Z") OR
6546    /// (name = "example-management-dns-zone-binding-2")
6547    /// ```
6548    pub filter: std::string::String,
6549
6550    /// Sorts list results by a certain order. By default, returned results
6551    /// are ordered by `name` in ascending order.
6552    /// You can also sort results in descending order based on the `name` value
6553    /// using `orderBy="name desc"`.
6554    /// Currently, only ordering by `name` is supported.
6555    pub order_by: std::string::String,
6556
6557    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6558}
6559
6560impl ListManagementDnsZoneBindingsRequest {
6561    /// Creates a new default instance.
6562    pub fn new() -> Self {
6563        std::default::Default::default()
6564    }
6565
6566    /// Sets the value of [parent][crate::model::ListManagementDnsZoneBindingsRequest::parent].
6567    ///
6568    /// # Example
6569    /// ```ignore,no_run
6570    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsRequest;
6571    /// let x = ListManagementDnsZoneBindingsRequest::new().set_parent("example");
6572    /// ```
6573    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6574        self.parent = v.into();
6575        self
6576    }
6577
6578    /// Sets the value of [page_size][crate::model::ListManagementDnsZoneBindingsRequest::page_size].
6579    ///
6580    /// # Example
6581    /// ```ignore,no_run
6582    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsRequest;
6583    /// let x = ListManagementDnsZoneBindingsRequest::new().set_page_size(42);
6584    /// ```
6585    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6586        self.page_size = v.into();
6587        self
6588    }
6589
6590    /// Sets the value of [page_token][crate::model::ListManagementDnsZoneBindingsRequest::page_token].
6591    ///
6592    /// # Example
6593    /// ```ignore,no_run
6594    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsRequest;
6595    /// let x = ListManagementDnsZoneBindingsRequest::new().set_page_token("example");
6596    /// ```
6597    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6598        self.page_token = v.into();
6599        self
6600    }
6601
6602    /// Sets the value of [filter][crate::model::ListManagementDnsZoneBindingsRequest::filter].
6603    ///
6604    /// # Example
6605    /// ```ignore,no_run
6606    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsRequest;
6607    /// let x = ListManagementDnsZoneBindingsRequest::new().set_filter("example");
6608    /// ```
6609    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6610        self.filter = v.into();
6611        self
6612    }
6613
6614    /// Sets the value of [order_by][crate::model::ListManagementDnsZoneBindingsRequest::order_by].
6615    ///
6616    /// # Example
6617    /// ```ignore,no_run
6618    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsRequest;
6619    /// let x = ListManagementDnsZoneBindingsRequest::new().set_order_by("example");
6620    /// ```
6621    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6622        self.order_by = v.into();
6623        self
6624    }
6625}
6626
6627impl wkt::message::Message for ListManagementDnsZoneBindingsRequest {
6628    fn typename() -> &'static str {
6629        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest"
6630    }
6631}
6632
6633/// Response message for
6634/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
6635///
6636/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
6637#[derive(Clone, Default, PartialEq)]
6638#[non_exhaustive]
6639pub struct ListManagementDnsZoneBindingsResponse {
6640    /// A list of management DNS zone bindings.
6641    pub management_dns_zone_bindings: std::vec::Vec<crate::model::ManagementDnsZoneBinding>,
6642
6643    /// A token, which can be sent as `page_token` to retrieve the next page.
6644    /// If this field is omitted, there are no subsequent pages.
6645    pub next_page_token: std::string::String,
6646
6647    /// Locations that could not be reached when making an aggregated query using
6648    /// wildcards.
6649    pub unreachable: std::vec::Vec<std::string::String>,
6650
6651    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6652}
6653
6654impl ListManagementDnsZoneBindingsResponse {
6655    /// Creates a new default instance.
6656    pub fn new() -> Self {
6657        std::default::Default::default()
6658    }
6659
6660    /// Sets the value of [management_dns_zone_bindings][crate::model::ListManagementDnsZoneBindingsResponse::management_dns_zone_bindings].
6661    ///
6662    /// # Example
6663    /// ```ignore,no_run
6664    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsResponse;
6665    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
6666    /// let x = ListManagementDnsZoneBindingsResponse::new()
6667    ///     .set_management_dns_zone_bindings([
6668    ///         ManagementDnsZoneBinding::default()/* use setters */,
6669    ///         ManagementDnsZoneBinding::default()/* use (different) setters */,
6670    ///     ]);
6671    /// ```
6672    pub fn set_management_dns_zone_bindings<T, V>(mut self, v: T) -> Self
6673    where
6674        T: std::iter::IntoIterator<Item = V>,
6675        V: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6676    {
6677        use std::iter::Iterator;
6678        self.management_dns_zone_bindings = v.into_iter().map(|i| i.into()).collect();
6679        self
6680    }
6681
6682    /// Sets the value of [next_page_token][crate::model::ListManagementDnsZoneBindingsResponse::next_page_token].
6683    ///
6684    /// # Example
6685    /// ```ignore,no_run
6686    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsResponse;
6687    /// let x = ListManagementDnsZoneBindingsResponse::new().set_next_page_token("example");
6688    /// ```
6689    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6690        self.next_page_token = v.into();
6691        self
6692    }
6693
6694    /// Sets the value of [unreachable][crate::model::ListManagementDnsZoneBindingsResponse::unreachable].
6695    ///
6696    /// # Example
6697    /// ```ignore,no_run
6698    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsResponse;
6699    /// let x = ListManagementDnsZoneBindingsResponse::new().set_unreachable(["a", "b", "c"]);
6700    /// ```
6701    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6702    where
6703        T: std::iter::IntoIterator<Item = V>,
6704        V: std::convert::Into<std::string::String>,
6705    {
6706        use std::iter::Iterator;
6707        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6708        self
6709    }
6710}
6711
6712impl wkt::message::Message for ListManagementDnsZoneBindingsResponse {
6713    fn typename() -> &'static str {
6714        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsResponse"
6715    }
6716}
6717
6718#[doc(hidden)]
6719impl google_cloud_gax::paginator::internal::PageableResponse
6720    for ListManagementDnsZoneBindingsResponse
6721{
6722    type PageItem = crate::model::ManagementDnsZoneBinding;
6723
6724    fn items(self) -> std::vec::Vec<Self::PageItem> {
6725        self.management_dns_zone_bindings
6726    }
6727
6728    fn next_page_token(&self) -> std::string::String {
6729        use std::clone::Clone;
6730        self.next_page_token.clone()
6731    }
6732}
6733
6734/// Request message for
6735/// [VmwareEngine.GetManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]
6736///
6737/// [google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]: crate::client::VmwareEngine::get_management_dns_zone_binding
6738#[derive(Clone, Default, PartialEq)]
6739#[non_exhaustive]
6740pub struct GetManagementDnsZoneBindingRequest {
6741    /// Required. The resource name of the management DNS zone binding to
6742    /// retrieve. Resource names are schemeless URIs that follow the conventions in
6743    /// <https://cloud.google.com/apis/design/resource_names>.
6744    /// For example:
6745    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
6746    pub name: std::string::String,
6747
6748    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6749}
6750
6751impl GetManagementDnsZoneBindingRequest {
6752    /// Creates a new default instance.
6753    pub fn new() -> Self {
6754        std::default::Default::default()
6755    }
6756
6757    /// Sets the value of [name][crate::model::GetManagementDnsZoneBindingRequest::name].
6758    ///
6759    /// # Example
6760    /// ```ignore,no_run
6761    /// # use google_cloud_vmwareengine_v1::model::GetManagementDnsZoneBindingRequest;
6762    /// let x = GetManagementDnsZoneBindingRequest::new().set_name("example");
6763    /// ```
6764    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6765        self.name = v.into();
6766        self
6767    }
6768}
6769
6770impl wkt::message::Message for GetManagementDnsZoneBindingRequest {
6771    fn typename() -> &'static str {
6772        "type.googleapis.com/google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest"
6773    }
6774}
6775
6776/// Request message for [VmwareEngine.CreateManagementDnsZoneBindings][]
6777#[derive(Clone, Default, PartialEq)]
6778#[non_exhaustive]
6779pub struct CreateManagementDnsZoneBindingRequest {
6780    /// Required. The resource name of the private cloud
6781    /// to create a new management DNS zone binding for.
6782    /// Resource names are schemeless URIs that follow the conventions in
6783    /// <https://cloud.google.com/apis/design/resource_names>.
6784    /// For example:
6785    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
6786    pub parent: std::string::String,
6787
6788    /// Required. The initial values for a new management DNS zone binding.
6789    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
6790
6791    /// Required. The user-provided identifier of the `ManagementDnsZoneBinding`
6792    /// resource to be created. This identifier must be unique among
6793    /// `ManagementDnsZoneBinding` resources within the parent and becomes the
6794    /// final token in the name URI. The identifier must meet the following
6795    /// requirements:
6796    ///
6797    /// * Only contains 1-63 alphanumeric characters and hyphens
6798    /// * Begins with an alphabetical character
6799    /// * Ends with a non-hyphen character
6800    /// * Not formatted as a UUID
6801    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
6802    ///   (section 3.5)
6803    pub management_dns_zone_binding_id: std::string::String,
6804
6805    /// Optional. A request ID to identify requests. Specify a unique request ID
6806    /// so that if you must retry your request, the server will know to ignore
6807    /// the request if it has already been completed. The server guarantees that a
6808    /// request doesn't result in creation of duplicate commitments for at least 60
6809    /// minutes.
6810    ///
6811    /// For example, consider a situation where you make an initial request and the
6812    /// request times out. If you make the request again with the same request ID,
6813    /// the server can check if the original operation with the same request ID was
6814    /// received, and if so, will ignore the second request. This prevents clients
6815    /// from accidentally creating duplicate commitments.
6816    ///
6817    /// The request ID must be a valid UUID with the exception that zero UUID is
6818    /// not supported (00000000-0000-0000-0000-000000000000).
6819    pub request_id: std::string::String,
6820
6821    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6822}
6823
6824impl CreateManagementDnsZoneBindingRequest {
6825    /// Creates a new default instance.
6826    pub fn new() -> Self {
6827        std::default::Default::default()
6828    }
6829
6830    /// Sets the value of [parent][crate::model::CreateManagementDnsZoneBindingRequest::parent].
6831    ///
6832    /// # Example
6833    /// ```ignore,no_run
6834    /// # use google_cloud_vmwareengine_v1::model::CreateManagementDnsZoneBindingRequest;
6835    /// let x = CreateManagementDnsZoneBindingRequest::new().set_parent("example");
6836    /// ```
6837    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6838        self.parent = v.into();
6839        self
6840    }
6841
6842    /// Sets the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
6843    ///
6844    /// # Example
6845    /// ```ignore,no_run
6846    /// # use google_cloud_vmwareengine_v1::model::CreateManagementDnsZoneBindingRequest;
6847    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
6848    /// let x = CreateManagementDnsZoneBindingRequest::new().set_management_dns_zone_binding(ManagementDnsZoneBinding::default()/* use setters */);
6849    /// ```
6850    pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6851    where
6852        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6853    {
6854        self.management_dns_zone_binding = std::option::Option::Some(v.into());
6855        self
6856    }
6857
6858    /// Sets or clears the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
6859    ///
6860    /// # Example
6861    /// ```ignore,no_run
6862    /// # use google_cloud_vmwareengine_v1::model::CreateManagementDnsZoneBindingRequest;
6863    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
6864    /// let x = CreateManagementDnsZoneBindingRequest::new().set_or_clear_management_dns_zone_binding(Some(ManagementDnsZoneBinding::default()/* use setters */));
6865    /// let x = CreateManagementDnsZoneBindingRequest::new().set_or_clear_management_dns_zone_binding(None::<ManagementDnsZoneBinding>);
6866    /// ```
6867    pub fn set_or_clear_management_dns_zone_binding<T>(mut self, v: std::option::Option<T>) -> Self
6868    where
6869        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6870    {
6871        self.management_dns_zone_binding = v.map(|x| x.into());
6872        self
6873    }
6874
6875    /// Sets the value of [management_dns_zone_binding_id][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding_id].
6876    ///
6877    /// # Example
6878    /// ```ignore,no_run
6879    /// # use google_cloud_vmwareengine_v1::model::CreateManagementDnsZoneBindingRequest;
6880    /// let x = CreateManagementDnsZoneBindingRequest::new().set_management_dns_zone_binding_id("example");
6881    /// ```
6882    pub fn set_management_dns_zone_binding_id<T: std::convert::Into<std::string::String>>(
6883        mut self,
6884        v: T,
6885    ) -> Self {
6886        self.management_dns_zone_binding_id = v.into();
6887        self
6888    }
6889
6890    /// Sets the value of [request_id][crate::model::CreateManagementDnsZoneBindingRequest::request_id].
6891    ///
6892    /// # Example
6893    /// ```ignore,no_run
6894    /// # use google_cloud_vmwareengine_v1::model::CreateManagementDnsZoneBindingRequest;
6895    /// let x = CreateManagementDnsZoneBindingRequest::new().set_request_id("example");
6896    /// ```
6897    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6898        self.request_id = v.into();
6899        self
6900    }
6901}
6902
6903impl wkt::message::Message for CreateManagementDnsZoneBindingRequest {
6904    fn typename() -> &'static str {
6905        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest"
6906    }
6907}
6908
6909/// Request message for
6910/// [VmwareEngine.UpdateManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]
6911///
6912/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]: crate::client::VmwareEngine::update_management_dns_zone_binding
6913#[derive(Clone, Default, PartialEq)]
6914#[non_exhaustive]
6915pub struct UpdateManagementDnsZoneBindingRequest {
6916    /// Required. Field mask is used to specify the fields to be overwritten in the
6917    /// `ManagementDnsZoneBinding` resource by the update.
6918    /// The fields specified in the `update_mask` are relative to the resource, not
6919    /// the full request. A field will be overwritten if it is in the mask. If the
6920    /// user does not provide a mask then all fields will be overwritten.
6921    pub update_mask: std::option::Option<wkt::FieldMask>,
6922
6923    /// Required. New values to update the management DNS zone binding with.
6924    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
6925
6926    /// Optional. A request ID to identify requests. Specify a unique request ID
6927    /// so that if you must retry your request, the server will know to ignore
6928    /// the request if it has already been completed. The server guarantees that a
6929    /// request doesn't result in creation of duplicate commitments for at least 60
6930    /// minutes.
6931    ///
6932    /// For example, consider a situation where you make an initial request and the
6933    /// request times out. If you make the request again with the same request ID,
6934    /// the server can check if the original operation with the same request ID was
6935    /// received, and if so, will ignore the second request. This prevents clients
6936    /// from accidentally creating duplicate commitments.
6937    ///
6938    /// The request ID must be a valid UUID with the exception that zero UUID is
6939    /// not supported (00000000-0000-0000-0000-000000000000).
6940    pub request_id: std::string::String,
6941
6942    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6943}
6944
6945impl UpdateManagementDnsZoneBindingRequest {
6946    /// Creates a new default instance.
6947    pub fn new() -> Self {
6948        std::default::Default::default()
6949    }
6950
6951    /// Sets the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
6952    ///
6953    /// # Example
6954    /// ```ignore,no_run
6955    /// # use google_cloud_vmwareengine_v1::model::UpdateManagementDnsZoneBindingRequest;
6956    /// use wkt::FieldMask;
6957    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6958    /// ```
6959    pub fn set_update_mask<T>(mut self, v: T) -> Self
6960    where
6961        T: std::convert::Into<wkt::FieldMask>,
6962    {
6963        self.update_mask = std::option::Option::Some(v.into());
6964        self
6965    }
6966
6967    /// Sets or clears the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
6968    ///
6969    /// # Example
6970    /// ```ignore,no_run
6971    /// # use google_cloud_vmwareengine_v1::model::UpdateManagementDnsZoneBindingRequest;
6972    /// use wkt::FieldMask;
6973    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6974    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6975    /// ```
6976    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6977    where
6978        T: std::convert::Into<wkt::FieldMask>,
6979    {
6980        self.update_mask = v.map(|x| x.into());
6981        self
6982    }
6983
6984    /// Sets the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
6985    ///
6986    /// # Example
6987    /// ```ignore,no_run
6988    /// # use google_cloud_vmwareengine_v1::model::UpdateManagementDnsZoneBindingRequest;
6989    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
6990    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_management_dns_zone_binding(ManagementDnsZoneBinding::default()/* use setters */);
6991    /// ```
6992    pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6993    where
6994        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6995    {
6996        self.management_dns_zone_binding = std::option::Option::Some(v.into());
6997        self
6998    }
6999
7000    /// Sets or clears the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
7001    ///
7002    /// # Example
7003    /// ```ignore,no_run
7004    /// # use google_cloud_vmwareengine_v1::model::UpdateManagementDnsZoneBindingRequest;
7005    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
7006    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_or_clear_management_dns_zone_binding(Some(ManagementDnsZoneBinding::default()/* use setters */));
7007    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_or_clear_management_dns_zone_binding(None::<ManagementDnsZoneBinding>);
7008    /// ```
7009    pub fn set_or_clear_management_dns_zone_binding<T>(mut self, v: std::option::Option<T>) -> Self
7010    where
7011        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
7012    {
7013        self.management_dns_zone_binding = v.map(|x| x.into());
7014        self
7015    }
7016
7017    /// Sets the value of [request_id][crate::model::UpdateManagementDnsZoneBindingRequest::request_id].
7018    ///
7019    /// # Example
7020    /// ```ignore,no_run
7021    /// # use google_cloud_vmwareengine_v1::model::UpdateManagementDnsZoneBindingRequest;
7022    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_request_id("example");
7023    /// ```
7024    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7025        self.request_id = v.into();
7026        self
7027    }
7028}
7029
7030impl wkt::message::Message for UpdateManagementDnsZoneBindingRequest {
7031    fn typename() -> &'static str {
7032        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest"
7033    }
7034}
7035
7036/// Request message for
7037/// [VmwareEngine.DeleteManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]
7038///
7039/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]: crate::client::VmwareEngine::delete_management_dns_zone_binding
7040#[derive(Clone, Default, PartialEq)]
7041#[non_exhaustive]
7042pub struct DeleteManagementDnsZoneBindingRequest {
7043    /// Required. The resource name of the management DNS zone binding to delete.
7044    /// Resource names are schemeless URIs that follow the conventions in
7045    /// <https://cloud.google.com/apis/design/resource_names>.
7046    /// For example:
7047    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
7048    pub name: std::string::String,
7049
7050    /// Optional. A request ID to identify requests. Specify a unique request ID
7051    /// so that if you must retry your request, the server will know to ignore
7052    /// the request if it has already been completed. The server guarantees that a
7053    /// request doesn't result in creation of duplicate commitments for at least 60
7054    /// minutes.
7055    ///
7056    /// For example, consider a situation where you make an initial request and the
7057    /// request times out. If you make the request again with the same request
7058    /// ID, the server can check if the original operation with the same request ID
7059    /// was received, and if so, will ignore the second request. This prevents
7060    /// clients from accidentally creating duplicate commitments.
7061    ///
7062    /// The request ID must be a valid UUID with the exception that zero UUID is
7063    /// not supported (00000000-0000-0000-0000-000000000000).
7064    pub request_id: std::string::String,
7065
7066    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7067}
7068
7069impl DeleteManagementDnsZoneBindingRequest {
7070    /// Creates a new default instance.
7071    pub fn new() -> Self {
7072        std::default::Default::default()
7073    }
7074
7075    /// Sets the value of [name][crate::model::DeleteManagementDnsZoneBindingRequest::name].
7076    ///
7077    /// # Example
7078    /// ```ignore,no_run
7079    /// # use google_cloud_vmwareengine_v1::model::DeleteManagementDnsZoneBindingRequest;
7080    /// let x = DeleteManagementDnsZoneBindingRequest::new().set_name("example");
7081    /// ```
7082    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7083        self.name = v.into();
7084        self
7085    }
7086
7087    /// Sets the value of [request_id][crate::model::DeleteManagementDnsZoneBindingRequest::request_id].
7088    ///
7089    /// # Example
7090    /// ```ignore,no_run
7091    /// # use google_cloud_vmwareengine_v1::model::DeleteManagementDnsZoneBindingRequest;
7092    /// let x = DeleteManagementDnsZoneBindingRequest::new().set_request_id("example");
7093    /// ```
7094    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7095        self.request_id = v.into();
7096        self
7097    }
7098}
7099
7100impl wkt::message::Message for DeleteManagementDnsZoneBindingRequest {
7101    fn typename() -> &'static str {
7102        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest"
7103    }
7104}
7105
7106/// Request message for [VmwareEngine.RepairManagementDnsZoneBindings][]
7107#[derive(Clone, Default, PartialEq)]
7108#[non_exhaustive]
7109pub struct RepairManagementDnsZoneBindingRequest {
7110    /// Required. The resource name of the management DNS zone binding to repair.
7111    /// Resource names are schemeless URIs that follow the conventions in
7112    /// <https://cloud.google.com/apis/design/resource_names>.
7113    /// For example:
7114    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
7115    pub name: std::string::String,
7116
7117    /// Optional. A request ID to identify requests. Specify a unique request ID
7118    /// so that if you must retry your request, the server will know to ignore
7119    /// the request if it has already been completed. The server guarantees that a
7120    /// request doesn't result in creation of duplicate commitments for at least 60
7121    /// minutes.
7122    ///
7123    /// For example, consider a situation where you make an initial request and the
7124    /// request times out. If you make the request again with the same request ID,
7125    /// the server can check if the original operation with the same request ID was
7126    /// received, and if so, will ignore the second request. This prevents clients
7127    /// from accidentally creating duplicate commitments.
7128    ///
7129    /// The request ID must be a valid UUID with the exception that zero UUID is
7130    /// not supported (00000000-0000-0000-0000-000000000000).
7131    pub request_id: std::string::String,
7132
7133    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7134}
7135
7136impl RepairManagementDnsZoneBindingRequest {
7137    /// Creates a new default instance.
7138    pub fn new() -> Self {
7139        std::default::Default::default()
7140    }
7141
7142    /// Sets the value of [name][crate::model::RepairManagementDnsZoneBindingRequest::name].
7143    ///
7144    /// # Example
7145    /// ```ignore,no_run
7146    /// # use google_cloud_vmwareengine_v1::model::RepairManagementDnsZoneBindingRequest;
7147    /// let x = RepairManagementDnsZoneBindingRequest::new().set_name("example");
7148    /// ```
7149    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7150        self.name = v.into();
7151        self
7152    }
7153
7154    /// Sets the value of [request_id][crate::model::RepairManagementDnsZoneBindingRequest::request_id].
7155    ///
7156    /// # Example
7157    /// ```ignore,no_run
7158    /// # use google_cloud_vmwareengine_v1::model::RepairManagementDnsZoneBindingRequest;
7159    /// let x = RepairManagementDnsZoneBindingRequest::new().set_request_id("example");
7160    /// ```
7161    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7162        self.request_id = v.into();
7163        self
7164    }
7165}
7166
7167impl wkt::message::Message for RepairManagementDnsZoneBindingRequest {
7168    fn typename() -> &'static str {
7169        "type.googleapis.com/google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest"
7170    }
7171}
7172
7173/// Request message for
7174/// [VmwareEngine.CreateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]
7175///
7176/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]: crate::client::VmwareEngine::create_vmware_engine_network
7177#[derive(Clone, Default, PartialEq)]
7178#[non_exhaustive]
7179pub struct CreateVmwareEngineNetworkRequest {
7180    /// Required. The resource name of the location to create the new VMware Engine
7181    /// network in. A VMware Engine network of type
7182    /// `LEGACY` is a regional resource, and a VMware
7183    /// Engine network of type `STANDARD` is a global resource.
7184    /// Resource names are schemeless URIs that follow the conventions in
7185    /// <https://cloud.google.com/apis/design/resource_names>. For example:
7186    /// `projects/my-project/locations/global`
7187    pub parent: std::string::String,
7188
7189    /// Required. The user-provided identifier of the new VMware Engine network.
7190    /// This identifier must be unique among VMware Engine network resources
7191    /// within the parent and becomes the final token in the name URI. The
7192    /// identifier must meet the following requirements:
7193    ///
7194    /// * For networks of type LEGACY, adheres to the format:
7195    ///   `{region-id}-default`. Replace `{region-id}` with the region where you want
7196    ///   to create the VMware Engine network. For example, "us-central1-default".
7197    /// * Only contains 1-63 alphanumeric characters and hyphens
7198    /// * Begins with an alphabetical character
7199    /// * Ends with a non-hyphen character
7200    /// * Not formatted as a UUID
7201    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
7202    ///   (section 3.5)
7203    pub vmware_engine_network_id: std::string::String,
7204
7205    /// Required. The initial description of the new VMware Engine network.
7206    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
7207
7208    /// Optional. A request ID to identify requests. Specify a unique request ID
7209    /// so that if you must retry your request, the server will know to ignore
7210    /// the request if it has already been completed. The server guarantees that a
7211    /// request doesn't result in creation of duplicate commitments for at least 60
7212    /// minutes.
7213    ///
7214    /// For example, consider a situation where you make an initial request and the
7215    /// request times out. If you make the request again with the same request
7216    /// ID, the server can check if original operation with the same request ID
7217    /// was received, and if so, will ignore the second request. This prevents
7218    /// clients from accidentally creating duplicate commitments.
7219    ///
7220    /// The request ID must be a valid UUID with the exception that zero UUID is
7221    /// not supported (00000000-0000-0000-0000-000000000000).
7222    pub request_id: std::string::String,
7223
7224    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7225}
7226
7227impl CreateVmwareEngineNetworkRequest {
7228    /// Creates a new default instance.
7229    pub fn new() -> Self {
7230        std::default::Default::default()
7231    }
7232
7233    /// Sets the value of [parent][crate::model::CreateVmwareEngineNetworkRequest::parent].
7234    ///
7235    /// # Example
7236    /// ```ignore,no_run
7237    /// # use google_cloud_vmwareengine_v1::model::CreateVmwareEngineNetworkRequest;
7238    /// let x = CreateVmwareEngineNetworkRequest::new().set_parent("example");
7239    /// ```
7240    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7241        self.parent = v.into();
7242        self
7243    }
7244
7245    /// Sets the value of [vmware_engine_network_id][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network_id].
7246    ///
7247    /// # Example
7248    /// ```ignore,no_run
7249    /// # use google_cloud_vmwareengine_v1::model::CreateVmwareEngineNetworkRequest;
7250    /// let x = CreateVmwareEngineNetworkRequest::new().set_vmware_engine_network_id("example");
7251    /// ```
7252    pub fn set_vmware_engine_network_id<T: std::convert::Into<std::string::String>>(
7253        mut self,
7254        v: T,
7255    ) -> Self {
7256        self.vmware_engine_network_id = v.into();
7257        self
7258    }
7259
7260    /// Sets the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
7261    ///
7262    /// # Example
7263    /// ```ignore,no_run
7264    /// # use google_cloud_vmwareengine_v1::model::CreateVmwareEngineNetworkRequest;
7265    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
7266    /// let x = CreateVmwareEngineNetworkRequest::new().set_vmware_engine_network(VmwareEngineNetwork::default()/* use setters */);
7267    /// ```
7268    pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7269    where
7270        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7271    {
7272        self.vmware_engine_network = std::option::Option::Some(v.into());
7273        self
7274    }
7275
7276    /// Sets or clears the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
7277    ///
7278    /// # Example
7279    /// ```ignore,no_run
7280    /// # use google_cloud_vmwareengine_v1::model::CreateVmwareEngineNetworkRequest;
7281    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
7282    /// let x = CreateVmwareEngineNetworkRequest::new().set_or_clear_vmware_engine_network(Some(VmwareEngineNetwork::default()/* use setters */));
7283    /// let x = CreateVmwareEngineNetworkRequest::new().set_or_clear_vmware_engine_network(None::<VmwareEngineNetwork>);
7284    /// ```
7285    pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7286    where
7287        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7288    {
7289        self.vmware_engine_network = v.map(|x| x.into());
7290        self
7291    }
7292
7293    /// Sets the value of [request_id][crate::model::CreateVmwareEngineNetworkRequest::request_id].
7294    ///
7295    /// # Example
7296    /// ```ignore,no_run
7297    /// # use google_cloud_vmwareengine_v1::model::CreateVmwareEngineNetworkRequest;
7298    /// let x = CreateVmwareEngineNetworkRequest::new().set_request_id("example");
7299    /// ```
7300    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7301        self.request_id = v.into();
7302        self
7303    }
7304}
7305
7306impl wkt::message::Message for CreateVmwareEngineNetworkRequest {
7307    fn typename() -> &'static str {
7308        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest"
7309    }
7310}
7311
7312/// Request message for
7313/// [VmwareEngine.UpdateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]
7314///
7315/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]: crate::client::VmwareEngine::update_vmware_engine_network
7316#[derive(Clone, Default, PartialEq)]
7317#[non_exhaustive]
7318pub struct UpdateVmwareEngineNetworkRequest {
7319    /// Required. VMware Engine network description.
7320    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
7321
7322    /// Required. Field mask is used to specify the fields to be overwritten in the
7323    /// VMware Engine network resource by the update.
7324    /// The fields specified in the `update_mask` are relative to the resource, not
7325    /// the full request. A field will be overwritten if it is in the mask. If the
7326    /// user does not provide a mask then all fields will be overwritten. Only the
7327    /// following fields can be updated: `description`.
7328    pub update_mask: std::option::Option<wkt::FieldMask>,
7329
7330    /// Optional. A request ID to identify requests. Specify a unique request ID
7331    /// so that if you must retry your request, the server will know to ignore
7332    /// the request if it has already been completed. The server guarantees that a
7333    /// request doesn't result in creation of duplicate commitments for at least 60
7334    /// minutes.
7335    ///
7336    /// For example, consider a situation where you make an initial request and the
7337    /// request times out. If you make the request again with the same request
7338    /// ID, the server can check if original operation with the same request ID
7339    /// was received, and if so, will ignore the second request. This prevents
7340    /// clients from accidentally creating duplicate commitments.
7341    ///
7342    /// The request ID must be a valid UUID with the exception that zero UUID is
7343    /// not supported (00000000-0000-0000-0000-000000000000).
7344    pub request_id: std::string::String,
7345
7346    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7347}
7348
7349impl UpdateVmwareEngineNetworkRequest {
7350    /// Creates a new default instance.
7351    pub fn new() -> Self {
7352        std::default::Default::default()
7353    }
7354
7355    /// Sets the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
7356    ///
7357    /// # Example
7358    /// ```ignore,no_run
7359    /// # use google_cloud_vmwareengine_v1::model::UpdateVmwareEngineNetworkRequest;
7360    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
7361    /// let x = UpdateVmwareEngineNetworkRequest::new().set_vmware_engine_network(VmwareEngineNetwork::default()/* use setters */);
7362    /// ```
7363    pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7364    where
7365        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7366    {
7367        self.vmware_engine_network = std::option::Option::Some(v.into());
7368        self
7369    }
7370
7371    /// Sets or clears the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
7372    ///
7373    /// # Example
7374    /// ```ignore,no_run
7375    /// # use google_cloud_vmwareengine_v1::model::UpdateVmwareEngineNetworkRequest;
7376    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
7377    /// let x = UpdateVmwareEngineNetworkRequest::new().set_or_clear_vmware_engine_network(Some(VmwareEngineNetwork::default()/* use setters */));
7378    /// let x = UpdateVmwareEngineNetworkRequest::new().set_or_clear_vmware_engine_network(None::<VmwareEngineNetwork>);
7379    /// ```
7380    pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7381    where
7382        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7383    {
7384        self.vmware_engine_network = v.map(|x| x.into());
7385        self
7386    }
7387
7388    /// Sets the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
7389    ///
7390    /// # Example
7391    /// ```ignore,no_run
7392    /// # use google_cloud_vmwareengine_v1::model::UpdateVmwareEngineNetworkRequest;
7393    /// use wkt::FieldMask;
7394    /// let x = UpdateVmwareEngineNetworkRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7395    /// ```
7396    pub fn set_update_mask<T>(mut self, v: T) -> Self
7397    where
7398        T: std::convert::Into<wkt::FieldMask>,
7399    {
7400        self.update_mask = std::option::Option::Some(v.into());
7401        self
7402    }
7403
7404    /// Sets or clears the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
7405    ///
7406    /// # Example
7407    /// ```ignore,no_run
7408    /// # use google_cloud_vmwareengine_v1::model::UpdateVmwareEngineNetworkRequest;
7409    /// use wkt::FieldMask;
7410    /// let x = UpdateVmwareEngineNetworkRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7411    /// let x = UpdateVmwareEngineNetworkRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7412    /// ```
7413    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7414    where
7415        T: std::convert::Into<wkt::FieldMask>,
7416    {
7417        self.update_mask = v.map(|x| x.into());
7418        self
7419    }
7420
7421    /// Sets the value of [request_id][crate::model::UpdateVmwareEngineNetworkRequest::request_id].
7422    ///
7423    /// # Example
7424    /// ```ignore,no_run
7425    /// # use google_cloud_vmwareengine_v1::model::UpdateVmwareEngineNetworkRequest;
7426    /// let x = UpdateVmwareEngineNetworkRequest::new().set_request_id("example");
7427    /// ```
7428    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7429        self.request_id = v.into();
7430        self
7431    }
7432}
7433
7434impl wkt::message::Message for UpdateVmwareEngineNetworkRequest {
7435    fn typename() -> &'static str {
7436        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest"
7437    }
7438}
7439
7440/// Request message for
7441/// [VmwareEngine.DeleteVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]
7442///
7443/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]: crate::client::VmwareEngine::delete_vmware_engine_network
7444#[derive(Clone, Default, PartialEq)]
7445#[non_exhaustive]
7446pub struct DeleteVmwareEngineNetworkRequest {
7447    /// Required. The resource name of the VMware Engine network to be deleted.
7448    /// Resource names are schemeless URIs that follow the conventions in
7449    /// <https://cloud.google.com/apis/design/resource_names>.
7450    /// For example:
7451    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
7452    pub name: std::string::String,
7453
7454    /// Optional. A request ID to identify requests. Specify a unique request ID
7455    /// so that if you must retry your request, the server will know to ignore
7456    /// the request if it has already been completed. The server guarantees that a
7457    /// request doesn't result in creation of duplicate commitments for at least 60
7458    /// minutes.
7459    ///
7460    /// For example, consider a situation where you make an initial request and the
7461    /// request times out. If you make the request again with the same request
7462    /// ID, the server can check if original operation with the same request ID
7463    /// was received, and if so, will ignore the second request. This prevents
7464    /// clients from accidentally creating duplicate commitments.
7465    ///
7466    /// The request ID must be a valid UUID with the exception that zero UUID is
7467    /// not supported (00000000-0000-0000-0000-000000000000).
7468    pub request_id: std::string::String,
7469
7470    /// Optional. Checksum used to ensure that the user-provided value is up to
7471    /// date before the server processes the request. The server compares provided
7472    /// checksum with the current checksum of the resource. If the user-provided
7473    /// value is out of date, this request returns an `ABORTED` error.
7474    pub etag: std::string::String,
7475
7476    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7477}
7478
7479impl DeleteVmwareEngineNetworkRequest {
7480    /// Creates a new default instance.
7481    pub fn new() -> Self {
7482        std::default::Default::default()
7483    }
7484
7485    /// Sets the value of [name][crate::model::DeleteVmwareEngineNetworkRequest::name].
7486    ///
7487    /// # Example
7488    /// ```ignore,no_run
7489    /// # use google_cloud_vmwareengine_v1::model::DeleteVmwareEngineNetworkRequest;
7490    /// let x = DeleteVmwareEngineNetworkRequest::new().set_name("example");
7491    /// ```
7492    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7493        self.name = v.into();
7494        self
7495    }
7496
7497    /// Sets the value of [request_id][crate::model::DeleteVmwareEngineNetworkRequest::request_id].
7498    ///
7499    /// # Example
7500    /// ```ignore,no_run
7501    /// # use google_cloud_vmwareengine_v1::model::DeleteVmwareEngineNetworkRequest;
7502    /// let x = DeleteVmwareEngineNetworkRequest::new().set_request_id("example");
7503    /// ```
7504    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7505        self.request_id = v.into();
7506        self
7507    }
7508
7509    /// Sets the value of [etag][crate::model::DeleteVmwareEngineNetworkRequest::etag].
7510    ///
7511    /// # Example
7512    /// ```ignore,no_run
7513    /// # use google_cloud_vmwareengine_v1::model::DeleteVmwareEngineNetworkRequest;
7514    /// let x = DeleteVmwareEngineNetworkRequest::new().set_etag("example");
7515    /// ```
7516    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7517        self.etag = v.into();
7518        self
7519    }
7520}
7521
7522impl wkt::message::Message for DeleteVmwareEngineNetworkRequest {
7523    fn typename() -> &'static str {
7524        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest"
7525    }
7526}
7527
7528/// Request message for
7529/// [VmwareEngine.GetVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]
7530///
7531/// [google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]: crate::client::VmwareEngine::get_vmware_engine_network
7532#[derive(Clone, Default, PartialEq)]
7533#[non_exhaustive]
7534pub struct GetVmwareEngineNetworkRequest {
7535    /// Required. The resource name of the VMware Engine network to retrieve.
7536    /// Resource names are schemeless URIs that follow the conventions in
7537    /// <https://cloud.google.com/apis/design/resource_names>.
7538    /// For example:
7539    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
7540    pub name: std::string::String,
7541
7542    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7543}
7544
7545impl GetVmwareEngineNetworkRequest {
7546    /// Creates a new default instance.
7547    pub fn new() -> Self {
7548        std::default::Default::default()
7549    }
7550
7551    /// Sets the value of [name][crate::model::GetVmwareEngineNetworkRequest::name].
7552    ///
7553    /// # Example
7554    /// ```ignore,no_run
7555    /// # use google_cloud_vmwareengine_v1::model::GetVmwareEngineNetworkRequest;
7556    /// let x = GetVmwareEngineNetworkRequest::new().set_name("example");
7557    /// ```
7558    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7559        self.name = v.into();
7560        self
7561    }
7562}
7563
7564impl wkt::message::Message for GetVmwareEngineNetworkRequest {
7565    fn typename() -> &'static str {
7566        "type.googleapis.com/google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest"
7567    }
7568}
7569
7570/// Request message for
7571/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
7572///
7573/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
7574#[derive(Clone, Default, PartialEq)]
7575#[non_exhaustive]
7576pub struct ListVmwareEngineNetworksRequest {
7577    /// Required. The resource name of the location to query for
7578    /// VMware Engine networks. Resource names are schemeless URIs that follow the
7579    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
7580    /// example: `projects/my-project/locations/global`
7581    pub parent: std::string::String,
7582
7583    /// The maximum number of results to return in one page.
7584    /// The maximum value is coerced to 1000.
7585    /// The default value of this field is 500.
7586    pub page_size: i32,
7587
7588    /// A page token, received from a previous `ListVmwareEngineNetworks` call.
7589    /// Provide this to retrieve the subsequent page.
7590    ///
7591    /// When paginating, all other parameters provided to
7592    /// `ListVmwareEngineNetworks` must match the call that provided the page
7593    /// token.
7594    pub page_token: std::string::String,
7595
7596    /// A filter expression that matches resources returned in the response.
7597    /// The expression must specify the field name, a comparison
7598    /// operator, and the value that you want to use for filtering. The value
7599    /// must be a string, a number, or a boolean. The comparison operator
7600    /// must be `=`, `!=`, `>`, or `<`.
7601    ///
7602    /// For example, if you are filtering a list of network peerings, you can
7603    /// exclude the ones named `example-network` by specifying
7604    /// `name != "example-network"`.
7605    ///
7606    /// To filter on multiple expressions, provide each separate expression within
7607    /// parentheses. For example:
7608    ///
7609    /// ```norust
7610    /// (name = "example-network")
7611    /// (createTime > "2021-04-12T08:15:10.40Z")
7612    /// ```
7613    ///
7614    /// By default, each expression is an `AND` expression. However, you
7615    /// can include `AND` and `OR` expressions explicitly.
7616    /// For example:
7617    ///
7618    /// ```norust
7619    /// (name = "example-network-1") AND
7620    /// (createTime > "2021-04-12T08:15:10.40Z") OR
7621    /// (name = "example-network-2")
7622    /// ```
7623    pub filter: std::string::String,
7624
7625    /// Sorts list results by a certain order. By default, returned results
7626    /// are ordered by `name` in ascending order.
7627    /// You can also sort results in descending order based on the `name` value
7628    /// using `orderBy="name desc"`.
7629    /// Currently, only ordering by `name` is supported.
7630    pub order_by: std::string::String,
7631
7632    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7633}
7634
7635impl ListVmwareEngineNetworksRequest {
7636    /// Creates a new default instance.
7637    pub fn new() -> Self {
7638        std::default::Default::default()
7639    }
7640
7641    /// Sets the value of [parent][crate::model::ListVmwareEngineNetworksRequest::parent].
7642    ///
7643    /// # Example
7644    /// ```ignore,no_run
7645    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksRequest;
7646    /// let x = ListVmwareEngineNetworksRequest::new().set_parent("example");
7647    /// ```
7648    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7649        self.parent = v.into();
7650        self
7651    }
7652
7653    /// Sets the value of [page_size][crate::model::ListVmwareEngineNetworksRequest::page_size].
7654    ///
7655    /// # Example
7656    /// ```ignore,no_run
7657    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksRequest;
7658    /// let x = ListVmwareEngineNetworksRequest::new().set_page_size(42);
7659    /// ```
7660    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7661        self.page_size = v.into();
7662        self
7663    }
7664
7665    /// Sets the value of [page_token][crate::model::ListVmwareEngineNetworksRequest::page_token].
7666    ///
7667    /// # Example
7668    /// ```ignore,no_run
7669    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksRequest;
7670    /// let x = ListVmwareEngineNetworksRequest::new().set_page_token("example");
7671    /// ```
7672    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7673        self.page_token = v.into();
7674        self
7675    }
7676
7677    /// Sets the value of [filter][crate::model::ListVmwareEngineNetworksRequest::filter].
7678    ///
7679    /// # Example
7680    /// ```ignore,no_run
7681    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksRequest;
7682    /// let x = ListVmwareEngineNetworksRequest::new().set_filter("example");
7683    /// ```
7684    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7685        self.filter = v.into();
7686        self
7687    }
7688
7689    /// Sets the value of [order_by][crate::model::ListVmwareEngineNetworksRequest::order_by].
7690    ///
7691    /// # Example
7692    /// ```ignore,no_run
7693    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksRequest;
7694    /// let x = ListVmwareEngineNetworksRequest::new().set_order_by("example");
7695    /// ```
7696    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7697        self.order_by = v.into();
7698        self
7699    }
7700}
7701
7702impl wkt::message::Message for ListVmwareEngineNetworksRequest {
7703    fn typename() -> &'static str {
7704        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest"
7705    }
7706}
7707
7708/// Response message for
7709/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
7710///
7711/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
7712#[derive(Clone, Default, PartialEq)]
7713#[non_exhaustive]
7714pub struct ListVmwareEngineNetworksResponse {
7715    /// A list of VMware Engine networks.
7716    pub vmware_engine_networks: std::vec::Vec<crate::model::VmwareEngineNetwork>,
7717
7718    /// A token, which can be sent as `page_token` to retrieve the next page.
7719    /// If this field is omitted, there are no subsequent pages.
7720    pub next_page_token: std::string::String,
7721
7722    /// Unreachable resources.
7723    pub unreachable: std::vec::Vec<std::string::String>,
7724
7725    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7726}
7727
7728impl ListVmwareEngineNetworksResponse {
7729    /// Creates a new default instance.
7730    pub fn new() -> Self {
7731        std::default::Default::default()
7732    }
7733
7734    /// Sets the value of [vmware_engine_networks][crate::model::ListVmwareEngineNetworksResponse::vmware_engine_networks].
7735    ///
7736    /// # Example
7737    /// ```ignore,no_run
7738    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksResponse;
7739    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
7740    /// let x = ListVmwareEngineNetworksResponse::new()
7741    ///     .set_vmware_engine_networks([
7742    ///         VmwareEngineNetwork::default()/* use setters */,
7743    ///         VmwareEngineNetwork::default()/* use (different) setters */,
7744    ///     ]);
7745    /// ```
7746    pub fn set_vmware_engine_networks<T, V>(mut self, v: T) -> Self
7747    where
7748        T: std::iter::IntoIterator<Item = V>,
7749        V: std::convert::Into<crate::model::VmwareEngineNetwork>,
7750    {
7751        use std::iter::Iterator;
7752        self.vmware_engine_networks = v.into_iter().map(|i| i.into()).collect();
7753        self
7754    }
7755
7756    /// Sets the value of [next_page_token][crate::model::ListVmwareEngineNetworksResponse::next_page_token].
7757    ///
7758    /// # Example
7759    /// ```ignore,no_run
7760    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksResponse;
7761    /// let x = ListVmwareEngineNetworksResponse::new().set_next_page_token("example");
7762    /// ```
7763    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7764        self.next_page_token = v.into();
7765        self
7766    }
7767
7768    /// Sets the value of [unreachable][crate::model::ListVmwareEngineNetworksResponse::unreachable].
7769    ///
7770    /// # Example
7771    /// ```ignore,no_run
7772    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksResponse;
7773    /// let x = ListVmwareEngineNetworksResponse::new().set_unreachable(["a", "b", "c"]);
7774    /// ```
7775    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7776    where
7777        T: std::iter::IntoIterator<Item = V>,
7778        V: std::convert::Into<std::string::String>,
7779    {
7780        use std::iter::Iterator;
7781        self.unreachable = v.into_iter().map(|i| i.into()).collect();
7782        self
7783    }
7784}
7785
7786impl wkt::message::Message for ListVmwareEngineNetworksResponse {
7787    fn typename() -> &'static str {
7788        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse"
7789    }
7790}
7791
7792#[doc(hidden)]
7793impl google_cloud_gax::paginator::internal::PageableResponse for ListVmwareEngineNetworksResponse {
7794    type PageItem = crate::model::VmwareEngineNetwork;
7795
7796    fn items(self) -> std::vec::Vec<Self::PageItem> {
7797        self.vmware_engine_networks
7798    }
7799
7800    fn next_page_token(&self) -> std::string::String {
7801        use std::clone::Clone;
7802        self.next_page_token.clone()
7803    }
7804}
7805
7806/// Request message for
7807/// [VmwareEngine.CreatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]
7808///
7809/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]: crate::client::VmwareEngine::create_private_connection
7810#[derive(Clone, Default, PartialEq)]
7811#[non_exhaustive]
7812pub struct CreatePrivateConnectionRequest {
7813    /// Required. The resource name of the location to create the new private
7814    /// connection in. Private connection is a regional resource.
7815    /// Resource names are schemeless URIs that follow the conventions in
7816    /// <https://cloud.google.com/apis/design/resource_names>. For example:
7817    /// `projects/my-project/locations/us-central1`
7818    pub parent: std::string::String,
7819
7820    /// Required. The user-provided identifier of the new private connection.
7821    /// This identifier must be unique among private connection resources
7822    /// within the parent and becomes the final token in the name URI. The
7823    /// identifier must meet the following requirements:
7824    ///
7825    /// * Only contains 1-63 alphanumeric characters and hyphens
7826    /// * Begins with an alphabetical character
7827    /// * Ends with a non-hyphen character
7828    /// * Not formatted as a UUID
7829    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
7830    ///   (section 3.5)
7831    pub private_connection_id: std::string::String,
7832
7833    /// Required. The initial description of the new private connection.
7834    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
7835
7836    /// Optional. A request ID to identify requests. Specify a unique request ID
7837    /// so that if you must retry your request, the server will know to ignore
7838    /// the request if it has already been completed. The server guarantees that a
7839    /// request doesn't result in creation of duplicate commitments for at least 60
7840    /// minutes.
7841    ///
7842    /// For example, consider a situation where you make an initial request and the
7843    /// request times out. If you make the request again with the same request
7844    /// ID, the server can check if original operation with the same request ID
7845    /// was received, and if so, will ignore the second request. This prevents
7846    /// clients from accidentally creating duplicate commitments.
7847    ///
7848    /// The request ID must be a valid UUID with the exception that zero UUID is
7849    /// not supported (00000000-0000-0000-0000-000000000000).
7850    pub request_id: std::string::String,
7851
7852    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7853}
7854
7855impl CreatePrivateConnectionRequest {
7856    /// Creates a new default instance.
7857    pub fn new() -> Self {
7858        std::default::Default::default()
7859    }
7860
7861    /// Sets the value of [parent][crate::model::CreatePrivateConnectionRequest::parent].
7862    ///
7863    /// # Example
7864    /// ```ignore,no_run
7865    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateConnectionRequest;
7866    /// let x = CreatePrivateConnectionRequest::new().set_parent("example");
7867    /// ```
7868    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7869        self.parent = v.into();
7870        self
7871    }
7872
7873    /// Sets the value of [private_connection_id][crate::model::CreatePrivateConnectionRequest::private_connection_id].
7874    ///
7875    /// # Example
7876    /// ```ignore,no_run
7877    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateConnectionRequest;
7878    /// let x = CreatePrivateConnectionRequest::new().set_private_connection_id("example");
7879    /// ```
7880    pub fn set_private_connection_id<T: std::convert::Into<std::string::String>>(
7881        mut self,
7882        v: T,
7883    ) -> Self {
7884        self.private_connection_id = v.into();
7885        self
7886    }
7887
7888    /// Sets the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
7889    ///
7890    /// # Example
7891    /// ```ignore,no_run
7892    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateConnectionRequest;
7893    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
7894    /// let x = CreatePrivateConnectionRequest::new().set_private_connection(PrivateConnection::default()/* use setters */);
7895    /// ```
7896    pub fn set_private_connection<T>(mut self, v: T) -> Self
7897    where
7898        T: std::convert::Into<crate::model::PrivateConnection>,
7899    {
7900        self.private_connection = std::option::Option::Some(v.into());
7901        self
7902    }
7903
7904    /// Sets or clears the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
7905    ///
7906    /// # Example
7907    /// ```ignore,no_run
7908    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateConnectionRequest;
7909    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
7910    /// let x = CreatePrivateConnectionRequest::new().set_or_clear_private_connection(Some(PrivateConnection::default()/* use setters */));
7911    /// let x = CreatePrivateConnectionRequest::new().set_or_clear_private_connection(None::<PrivateConnection>);
7912    /// ```
7913    pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
7914    where
7915        T: std::convert::Into<crate::model::PrivateConnection>,
7916    {
7917        self.private_connection = v.map(|x| x.into());
7918        self
7919    }
7920
7921    /// Sets the value of [request_id][crate::model::CreatePrivateConnectionRequest::request_id].
7922    ///
7923    /// # Example
7924    /// ```ignore,no_run
7925    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateConnectionRequest;
7926    /// let x = CreatePrivateConnectionRequest::new().set_request_id("example");
7927    /// ```
7928    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7929        self.request_id = v.into();
7930        self
7931    }
7932}
7933
7934impl wkt::message::Message for CreatePrivateConnectionRequest {
7935    fn typename() -> &'static str {
7936        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest"
7937    }
7938}
7939
7940/// Request message for
7941/// [VmwareEngine.GetPrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]
7942///
7943/// [google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]: crate::client::VmwareEngine::get_private_connection
7944#[derive(Clone, Default, PartialEq)]
7945#[non_exhaustive]
7946pub struct GetPrivateConnectionRequest {
7947    /// Required. The resource name of the private connection to retrieve.
7948    /// Resource names are schemeless URIs that follow the conventions in
7949    /// <https://cloud.google.com/apis/design/resource_names>.
7950    /// For example:
7951    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
7952    pub name: std::string::String,
7953
7954    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7955}
7956
7957impl GetPrivateConnectionRequest {
7958    /// Creates a new default instance.
7959    pub fn new() -> Self {
7960        std::default::Default::default()
7961    }
7962
7963    /// Sets the value of [name][crate::model::GetPrivateConnectionRequest::name].
7964    ///
7965    /// # Example
7966    /// ```ignore,no_run
7967    /// # use google_cloud_vmwareengine_v1::model::GetPrivateConnectionRequest;
7968    /// let x = GetPrivateConnectionRequest::new().set_name("example");
7969    /// ```
7970    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7971        self.name = v.into();
7972        self
7973    }
7974}
7975
7976impl wkt::message::Message for GetPrivateConnectionRequest {
7977    fn typename() -> &'static str {
7978        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateConnectionRequest"
7979    }
7980}
7981
7982/// Request message for
7983/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
7984///
7985/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
7986#[derive(Clone, Default, PartialEq)]
7987#[non_exhaustive]
7988pub struct ListPrivateConnectionsRequest {
7989    /// Required. The resource name of the location to query for
7990    /// private connections. Resource names are schemeless URIs that follow the
7991    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
7992    /// example: `projects/my-project/locations/us-central1`
7993    pub parent: std::string::String,
7994
7995    /// The maximum number of private connections to return in one page.
7996    /// The maximum value is coerced to 1000.
7997    /// The default value of this field is 500.
7998    pub page_size: i32,
7999
8000    /// A page token, received from a previous `ListPrivateConnections` call.
8001    /// Provide this to retrieve the subsequent page.
8002    ///
8003    /// When paginating, all other parameters provided to
8004    /// `ListPrivateConnections` must match the call that provided the page
8005    /// token.
8006    pub page_token: std::string::String,
8007
8008    /// A filter expression that matches resources returned in the response.
8009    /// The expression must specify the field name, a comparison
8010    /// operator, and the value that you want to use for filtering. The value
8011    /// must be a string, a number, or a boolean. The comparison operator
8012    /// must be `=`, `!=`, `>`, or `<`.
8013    ///
8014    /// For example, if you are filtering a list of private connections, you can
8015    /// exclude the ones named `example-connection` by specifying
8016    /// `name != "example-connection"`.
8017    ///
8018    /// To filter on multiple expressions, provide each separate expression within
8019    /// parentheses. For example:
8020    ///
8021    /// ```norust
8022    /// (name = "example-connection")
8023    /// (createTime > "2022-09-22T08:15:10.40Z")
8024    /// ```
8025    ///
8026    /// By default, each expression is an `AND` expression. However, you
8027    /// can include `AND` and `OR` expressions explicitly.
8028    /// For example:
8029    ///
8030    /// ```norust
8031    /// (name = "example-connection-1") AND
8032    /// (createTime > "2021-04-12T08:15:10.40Z") OR
8033    /// (name = "example-connection-2")
8034    /// ```
8035    pub filter: std::string::String,
8036
8037    /// Sorts list results by a certain order. By default, returned results
8038    /// are ordered by `name` in ascending order.
8039    /// You can also sort results in descending order based on the `name` value
8040    /// using `orderBy="name desc"`.
8041    /// Currently, only ordering by `name` is supported.
8042    pub order_by: std::string::String,
8043
8044    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8045}
8046
8047impl ListPrivateConnectionsRequest {
8048    /// Creates a new default instance.
8049    pub fn new() -> Self {
8050        std::default::Default::default()
8051    }
8052
8053    /// Sets the value of [parent][crate::model::ListPrivateConnectionsRequest::parent].
8054    ///
8055    /// # Example
8056    /// ```ignore,no_run
8057    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsRequest;
8058    /// let x = ListPrivateConnectionsRequest::new().set_parent("example");
8059    /// ```
8060    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8061        self.parent = v.into();
8062        self
8063    }
8064
8065    /// Sets the value of [page_size][crate::model::ListPrivateConnectionsRequest::page_size].
8066    ///
8067    /// # Example
8068    /// ```ignore,no_run
8069    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsRequest;
8070    /// let x = ListPrivateConnectionsRequest::new().set_page_size(42);
8071    /// ```
8072    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8073        self.page_size = v.into();
8074        self
8075    }
8076
8077    /// Sets the value of [page_token][crate::model::ListPrivateConnectionsRequest::page_token].
8078    ///
8079    /// # Example
8080    /// ```ignore,no_run
8081    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsRequest;
8082    /// let x = ListPrivateConnectionsRequest::new().set_page_token("example");
8083    /// ```
8084    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8085        self.page_token = v.into();
8086        self
8087    }
8088
8089    /// Sets the value of [filter][crate::model::ListPrivateConnectionsRequest::filter].
8090    ///
8091    /// # Example
8092    /// ```ignore,no_run
8093    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsRequest;
8094    /// let x = ListPrivateConnectionsRequest::new().set_filter("example");
8095    /// ```
8096    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8097        self.filter = v.into();
8098        self
8099    }
8100
8101    /// Sets the value of [order_by][crate::model::ListPrivateConnectionsRequest::order_by].
8102    ///
8103    /// # Example
8104    /// ```ignore,no_run
8105    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsRequest;
8106    /// let x = ListPrivateConnectionsRequest::new().set_order_by("example");
8107    /// ```
8108    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8109        self.order_by = v.into();
8110        self
8111    }
8112}
8113
8114impl wkt::message::Message for ListPrivateConnectionsRequest {
8115    fn typename() -> &'static str {
8116        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest"
8117    }
8118}
8119
8120/// Response message for
8121/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
8122///
8123/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
8124#[derive(Clone, Default, PartialEq)]
8125#[non_exhaustive]
8126pub struct ListPrivateConnectionsResponse {
8127    /// A list of private connections.
8128    pub private_connections: std::vec::Vec<crate::model::PrivateConnection>,
8129
8130    /// A token, which can be sent as `page_token` to retrieve the next page.
8131    /// If this field is omitted, there are no subsequent pages.
8132    pub next_page_token: std::string::String,
8133
8134    /// Unreachable resources.
8135    pub unreachable: std::vec::Vec<std::string::String>,
8136
8137    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8138}
8139
8140impl ListPrivateConnectionsResponse {
8141    /// Creates a new default instance.
8142    pub fn new() -> Self {
8143        std::default::Default::default()
8144    }
8145
8146    /// Sets the value of [private_connections][crate::model::ListPrivateConnectionsResponse::private_connections].
8147    ///
8148    /// # Example
8149    /// ```ignore,no_run
8150    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsResponse;
8151    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
8152    /// let x = ListPrivateConnectionsResponse::new()
8153    ///     .set_private_connections([
8154    ///         PrivateConnection::default()/* use setters */,
8155    ///         PrivateConnection::default()/* use (different) setters */,
8156    ///     ]);
8157    /// ```
8158    pub fn set_private_connections<T, V>(mut self, v: T) -> Self
8159    where
8160        T: std::iter::IntoIterator<Item = V>,
8161        V: std::convert::Into<crate::model::PrivateConnection>,
8162    {
8163        use std::iter::Iterator;
8164        self.private_connections = v.into_iter().map(|i| i.into()).collect();
8165        self
8166    }
8167
8168    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionsResponse::next_page_token].
8169    ///
8170    /// # Example
8171    /// ```ignore,no_run
8172    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsResponse;
8173    /// let x = ListPrivateConnectionsResponse::new().set_next_page_token("example");
8174    /// ```
8175    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8176        self.next_page_token = v.into();
8177        self
8178    }
8179
8180    /// Sets the value of [unreachable][crate::model::ListPrivateConnectionsResponse::unreachable].
8181    ///
8182    /// # Example
8183    /// ```ignore,no_run
8184    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsResponse;
8185    /// let x = ListPrivateConnectionsResponse::new().set_unreachable(["a", "b", "c"]);
8186    /// ```
8187    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
8188    where
8189        T: std::iter::IntoIterator<Item = V>,
8190        V: std::convert::Into<std::string::String>,
8191    {
8192        use std::iter::Iterator;
8193        self.unreachable = v.into_iter().map(|i| i.into()).collect();
8194        self
8195    }
8196}
8197
8198impl wkt::message::Message for ListPrivateConnectionsResponse {
8199    fn typename() -> &'static str {
8200        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsResponse"
8201    }
8202}
8203
8204#[doc(hidden)]
8205impl google_cloud_gax::paginator::internal::PageableResponse for ListPrivateConnectionsResponse {
8206    type PageItem = crate::model::PrivateConnection;
8207
8208    fn items(self) -> std::vec::Vec<Self::PageItem> {
8209        self.private_connections
8210    }
8211
8212    fn next_page_token(&self) -> std::string::String {
8213        use std::clone::Clone;
8214        self.next_page_token.clone()
8215    }
8216}
8217
8218/// Request message for
8219/// [VmwareEngine.UpdatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]
8220///
8221/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]: crate::client::VmwareEngine::update_private_connection
8222#[derive(Clone, Default, PartialEq)]
8223#[non_exhaustive]
8224pub struct UpdatePrivateConnectionRequest {
8225    /// Required. Private connection description.
8226    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
8227
8228    /// Required. Field mask is used to specify the fields to be overwritten in the
8229    /// `PrivateConnection` resource by the update.
8230    /// The fields specified in the `update_mask` are relative to the resource, not
8231    /// the full request. A field will be overwritten if it is in the mask. If the
8232    /// user does not provide a mask then all fields will be overwritten.
8233    pub update_mask: std::option::Option<wkt::FieldMask>,
8234
8235    /// Optional. A request ID to identify requests. Specify a unique request ID
8236    /// so that if you must retry your request, the server will know to ignore
8237    /// the request if it has already been completed. The server guarantees that a
8238    /// request doesn't result in creation of duplicate commitments for at least 60
8239    /// minutes.
8240    ///
8241    /// For example, consider a situation where you make an initial request and the
8242    /// request times out. If you make the request again with the same request
8243    /// ID, the server can check if original operation with the same request ID
8244    /// was received, and if so, will ignore the second request. This prevents
8245    /// clients from accidentally creating duplicate commitments.
8246    ///
8247    /// The request ID must be a valid UUID with the exception that zero UUID is
8248    /// not supported (00000000-0000-0000-0000-000000000000).
8249    pub request_id: std::string::String,
8250
8251    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8252}
8253
8254impl UpdatePrivateConnectionRequest {
8255    /// Creates a new default instance.
8256    pub fn new() -> Self {
8257        std::default::Default::default()
8258    }
8259
8260    /// Sets the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
8261    ///
8262    /// # Example
8263    /// ```ignore,no_run
8264    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateConnectionRequest;
8265    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
8266    /// let x = UpdatePrivateConnectionRequest::new().set_private_connection(PrivateConnection::default()/* use setters */);
8267    /// ```
8268    pub fn set_private_connection<T>(mut self, v: T) -> Self
8269    where
8270        T: std::convert::Into<crate::model::PrivateConnection>,
8271    {
8272        self.private_connection = std::option::Option::Some(v.into());
8273        self
8274    }
8275
8276    /// Sets or clears the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
8277    ///
8278    /// # Example
8279    /// ```ignore,no_run
8280    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateConnectionRequest;
8281    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
8282    /// let x = UpdatePrivateConnectionRequest::new().set_or_clear_private_connection(Some(PrivateConnection::default()/* use setters */));
8283    /// let x = UpdatePrivateConnectionRequest::new().set_or_clear_private_connection(None::<PrivateConnection>);
8284    /// ```
8285    pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
8286    where
8287        T: std::convert::Into<crate::model::PrivateConnection>,
8288    {
8289        self.private_connection = v.map(|x| x.into());
8290        self
8291    }
8292
8293    /// Sets the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
8294    ///
8295    /// # Example
8296    /// ```ignore,no_run
8297    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateConnectionRequest;
8298    /// use wkt::FieldMask;
8299    /// let x = UpdatePrivateConnectionRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8300    /// ```
8301    pub fn set_update_mask<T>(mut self, v: T) -> Self
8302    where
8303        T: std::convert::Into<wkt::FieldMask>,
8304    {
8305        self.update_mask = std::option::Option::Some(v.into());
8306        self
8307    }
8308
8309    /// Sets or clears the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
8310    ///
8311    /// # Example
8312    /// ```ignore,no_run
8313    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateConnectionRequest;
8314    /// use wkt::FieldMask;
8315    /// let x = UpdatePrivateConnectionRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8316    /// let x = UpdatePrivateConnectionRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8317    /// ```
8318    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8319    where
8320        T: std::convert::Into<wkt::FieldMask>,
8321    {
8322        self.update_mask = v.map(|x| x.into());
8323        self
8324    }
8325
8326    /// Sets the value of [request_id][crate::model::UpdatePrivateConnectionRequest::request_id].
8327    ///
8328    /// # Example
8329    /// ```ignore,no_run
8330    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateConnectionRequest;
8331    /// let x = UpdatePrivateConnectionRequest::new().set_request_id("example");
8332    /// ```
8333    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8334        self.request_id = v.into();
8335        self
8336    }
8337}
8338
8339impl wkt::message::Message for UpdatePrivateConnectionRequest {
8340    fn typename() -> &'static str {
8341        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest"
8342    }
8343}
8344
8345/// Request message for
8346/// [VmwareEngine.DeletePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]
8347///
8348/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]: crate::client::VmwareEngine::delete_private_connection
8349#[derive(Clone, Default, PartialEq)]
8350#[non_exhaustive]
8351pub struct DeletePrivateConnectionRequest {
8352    /// Required. The resource name of the private connection to be deleted.
8353    /// Resource names are schemeless URIs that follow the conventions in
8354    /// <https://cloud.google.com/apis/design/resource_names>.
8355    /// For example:
8356    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
8357    pub name: std::string::String,
8358
8359    /// Optional. A request ID to identify requests. Specify a unique request ID
8360    /// so that if you must retry your request, the server will know to ignore
8361    /// the request if it has already been completed. The server guarantees that a
8362    /// request doesn't result in creation of duplicate commitments for at least 60
8363    /// minutes.
8364    ///
8365    /// For example, consider a situation where you make an initial request and the
8366    /// request times out. If you make the request again with the same request
8367    /// ID, the server can check if original operation with the same request ID
8368    /// was received, and if so, will ignore the second request. This prevents
8369    /// clients from accidentally creating duplicate commitments.
8370    ///
8371    /// The request ID must be a valid UUID with the exception that zero UUID is
8372    /// not supported (00000000-0000-0000-0000-000000000000).
8373    pub request_id: std::string::String,
8374
8375    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8376}
8377
8378impl DeletePrivateConnectionRequest {
8379    /// Creates a new default instance.
8380    pub fn new() -> Self {
8381        std::default::Default::default()
8382    }
8383
8384    /// Sets the value of [name][crate::model::DeletePrivateConnectionRequest::name].
8385    ///
8386    /// # Example
8387    /// ```ignore,no_run
8388    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateConnectionRequest;
8389    /// let x = DeletePrivateConnectionRequest::new().set_name("example");
8390    /// ```
8391    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8392        self.name = v.into();
8393        self
8394    }
8395
8396    /// Sets the value of [request_id][crate::model::DeletePrivateConnectionRequest::request_id].
8397    ///
8398    /// # Example
8399    /// ```ignore,no_run
8400    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateConnectionRequest;
8401    /// let x = DeletePrivateConnectionRequest::new().set_request_id("example");
8402    /// ```
8403    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8404        self.request_id = v.into();
8405        self
8406    }
8407}
8408
8409impl wkt::message::Message for DeletePrivateConnectionRequest {
8410    fn typename() -> &'static str {
8411        "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest"
8412    }
8413}
8414
8415/// Request message for
8416/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
8417///
8418/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
8419#[derive(Clone, Default, PartialEq)]
8420#[non_exhaustive]
8421pub struct ListPrivateConnectionPeeringRoutesRequest {
8422    /// Required. The resource name of the private connection to retrieve peering
8423    /// routes from. Resource names are schemeless URIs that follow the conventions
8424    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
8425    /// `projects/my-project/locations/us-west1/privateConnections/my-connection`
8426    pub parent: std::string::String,
8427
8428    /// The maximum number of peering routes to return in one page.
8429    /// The service may return fewer than this value.
8430    /// The maximum value is coerced to 1000.
8431    /// The default value of this field is 500.
8432    pub page_size: i32,
8433
8434    /// A page token, received from a previous `ListPrivateConnectionPeeringRoutes`
8435    /// call. Provide this to retrieve the subsequent page. When paginating, all
8436    /// other parameters provided to `ListPrivateConnectionPeeringRoutes` must
8437    /// match the call that provided the page token.
8438    pub page_token: std::string::String,
8439
8440    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8441}
8442
8443impl ListPrivateConnectionPeeringRoutesRequest {
8444    /// Creates a new default instance.
8445    pub fn new() -> Self {
8446        std::default::Default::default()
8447    }
8448
8449    /// Sets the value of [parent][crate::model::ListPrivateConnectionPeeringRoutesRequest::parent].
8450    ///
8451    /// # Example
8452    /// ```ignore,no_run
8453    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionPeeringRoutesRequest;
8454    /// let x = ListPrivateConnectionPeeringRoutesRequest::new().set_parent("example");
8455    /// ```
8456    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8457        self.parent = v.into();
8458        self
8459    }
8460
8461    /// Sets the value of [page_size][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_size].
8462    ///
8463    /// # Example
8464    /// ```ignore,no_run
8465    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionPeeringRoutesRequest;
8466    /// let x = ListPrivateConnectionPeeringRoutesRequest::new().set_page_size(42);
8467    /// ```
8468    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8469        self.page_size = v.into();
8470        self
8471    }
8472
8473    /// Sets the value of [page_token][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_token].
8474    ///
8475    /// # Example
8476    /// ```ignore,no_run
8477    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionPeeringRoutesRequest;
8478    /// let x = ListPrivateConnectionPeeringRoutesRequest::new().set_page_token("example");
8479    /// ```
8480    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8481        self.page_token = v.into();
8482        self
8483    }
8484}
8485
8486impl wkt::message::Message for ListPrivateConnectionPeeringRoutesRequest {
8487    fn typename() -> &'static str {
8488        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest"
8489    }
8490}
8491
8492/// Response message for
8493/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
8494///
8495/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
8496#[derive(Clone, Default, PartialEq)]
8497#[non_exhaustive]
8498pub struct ListPrivateConnectionPeeringRoutesResponse {
8499    /// A list of peering routes.
8500    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
8501
8502    /// A token, which can be sent as `page_token` to retrieve the next page.
8503    /// If this field is omitted, there are no subsequent pages.
8504    pub next_page_token: std::string::String,
8505
8506    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8507}
8508
8509impl ListPrivateConnectionPeeringRoutesResponse {
8510    /// Creates a new default instance.
8511    pub fn new() -> Self {
8512        std::default::Default::default()
8513    }
8514
8515    /// Sets the value of [peering_routes][crate::model::ListPrivateConnectionPeeringRoutesResponse::peering_routes].
8516    ///
8517    /// # Example
8518    /// ```ignore,no_run
8519    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionPeeringRoutesResponse;
8520    /// use google_cloud_vmwareengine_v1::model::PeeringRoute;
8521    /// let x = ListPrivateConnectionPeeringRoutesResponse::new()
8522    ///     .set_peering_routes([
8523    ///         PeeringRoute::default()/* use setters */,
8524    ///         PeeringRoute::default()/* use (different) setters */,
8525    ///     ]);
8526    /// ```
8527    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
8528    where
8529        T: std::iter::IntoIterator<Item = V>,
8530        V: std::convert::Into<crate::model::PeeringRoute>,
8531    {
8532        use std::iter::Iterator;
8533        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
8534        self
8535    }
8536
8537    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionPeeringRoutesResponse::next_page_token].
8538    ///
8539    /// # Example
8540    /// ```ignore,no_run
8541    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionPeeringRoutesResponse;
8542    /// let x = ListPrivateConnectionPeeringRoutesResponse::new().set_next_page_token("example");
8543    /// ```
8544    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8545        self.next_page_token = v.into();
8546        self
8547    }
8548}
8549
8550impl wkt::message::Message for ListPrivateConnectionPeeringRoutesResponse {
8551    fn typename() -> &'static str {
8552        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesResponse"
8553    }
8554}
8555
8556#[doc(hidden)]
8557impl google_cloud_gax::paginator::internal::PageableResponse
8558    for ListPrivateConnectionPeeringRoutesResponse
8559{
8560    type PageItem = crate::model::PeeringRoute;
8561
8562    fn items(self) -> std::vec::Vec<Self::PageItem> {
8563        self.peering_routes
8564    }
8565
8566    fn next_page_token(&self) -> std::string::String {
8567        use std::clone::Clone;
8568        self.next_page_token.clone()
8569    }
8570}
8571
8572/// Request message for
8573/// [VmwareEngine.GrantDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]
8574///
8575/// [google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]: crate::client::VmwareEngine::grant_dns_bind_permission
8576#[derive(Clone, Default, PartialEq)]
8577#[non_exhaustive]
8578pub struct GrantDnsBindPermissionRequest {
8579    /// Required. The name of the resource which stores the users/service accounts
8580    /// having the permission to bind to the corresponding intranet VPC of the
8581    /// consumer project. DnsBindPermission is a global resource. Resource names
8582    /// are schemeless URIs that follow the conventions in
8583    /// <https://cloud.google.com/apis/design/resource_names>. For example:
8584    /// `projects/my-project/locations/global/dnsBindPermission`
8585    pub name: std::string::String,
8586
8587    /// Required. The consumer provided user/service account which needs to be
8588    /// granted permission to bind with the intranet VPC corresponding to the
8589    /// consumer project.
8590    pub principal: std::option::Option<crate::model::Principal>,
8591
8592    /// Optional. A request ID to identify requests. Specify a unique request ID
8593    /// so that if you must retry your request, the server will know to ignore
8594    /// the request if it has already been completed. The server guarantees that a
8595    /// request doesn't result in creation of duplicate commitments for at least 60
8596    /// minutes.
8597    ///
8598    /// For example, consider a situation where you make an initial request and the
8599    /// request times out. If you make the request again with the same request
8600    /// ID, the server can check if original operation with the same request ID
8601    /// was received, and if so, will ignore the second request. This prevents
8602    /// clients from accidentally creating duplicate commitments.
8603    ///
8604    /// The request ID must be a valid UUID with the exception that zero UUID is
8605    /// not supported (00000000-0000-0000-0000-000000000000).
8606    pub request_id: std::string::String,
8607
8608    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8609}
8610
8611impl GrantDnsBindPermissionRequest {
8612    /// Creates a new default instance.
8613    pub fn new() -> Self {
8614        std::default::Default::default()
8615    }
8616
8617    /// Sets the value of [name][crate::model::GrantDnsBindPermissionRequest::name].
8618    ///
8619    /// # Example
8620    /// ```ignore,no_run
8621    /// # use google_cloud_vmwareengine_v1::model::GrantDnsBindPermissionRequest;
8622    /// let x = GrantDnsBindPermissionRequest::new().set_name("example");
8623    /// ```
8624    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8625        self.name = v.into();
8626        self
8627    }
8628
8629    /// Sets the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
8630    ///
8631    /// # Example
8632    /// ```ignore,no_run
8633    /// # use google_cloud_vmwareengine_v1::model::GrantDnsBindPermissionRequest;
8634    /// use google_cloud_vmwareengine_v1::model::Principal;
8635    /// let x = GrantDnsBindPermissionRequest::new().set_principal(Principal::default()/* use setters */);
8636    /// ```
8637    pub fn set_principal<T>(mut self, v: T) -> Self
8638    where
8639        T: std::convert::Into<crate::model::Principal>,
8640    {
8641        self.principal = std::option::Option::Some(v.into());
8642        self
8643    }
8644
8645    /// Sets or clears the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
8646    ///
8647    /// # Example
8648    /// ```ignore,no_run
8649    /// # use google_cloud_vmwareengine_v1::model::GrantDnsBindPermissionRequest;
8650    /// use google_cloud_vmwareengine_v1::model::Principal;
8651    /// let x = GrantDnsBindPermissionRequest::new().set_or_clear_principal(Some(Principal::default()/* use setters */));
8652    /// let x = GrantDnsBindPermissionRequest::new().set_or_clear_principal(None::<Principal>);
8653    /// ```
8654    pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8655    where
8656        T: std::convert::Into<crate::model::Principal>,
8657    {
8658        self.principal = v.map(|x| x.into());
8659        self
8660    }
8661
8662    /// Sets the value of [request_id][crate::model::GrantDnsBindPermissionRequest::request_id].
8663    ///
8664    /// # Example
8665    /// ```ignore,no_run
8666    /// # use google_cloud_vmwareengine_v1::model::GrantDnsBindPermissionRequest;
8667    /// let x = GrantDnsBindPermissionRequest::new().set_request_id("example");
8668    /// ```
8669    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8670        self.request_id = v.into();
8671        self
8672    }
8673}
8674
8675impl wkt::message::Message for GrantDnsBindPermissionRequest {
8676    fn typename() -> &'static str {
8677        "type.googleapis.com/google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest"
8678    }
8679}
8680
8681/// Request message for
8682/// [VmwareEngine.RevokeDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]
8683///
8684/// [google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]: crate::client::VmwareEngine::revoke_dns_bind_permission
8685#[derive(Clone, Default, PartialEq)]
8686#[non_exhaustive]
8687pub struct RevokeDnsBindPermissionRequest {
8688    /// Required. The name of the resource which stores the users/service accounts
8689    /// having the permission to bind to the corresponding intranet VPC of the
8690    /// consumer project. DnsBindPermission is a global resource. Resource names
8691    /// are schemeless URIs that follow the conventions in
8692    /// <https://cloud.google.com/apis/design/resource_names>. For example:
8693    /// `projects/my-project/locations/global/dnsBindPermission`
8694    pub name: std::string::String,
8695
8696    /// Required. The consumer provided user/service account which needs to be
8697    /// granted permission to bind with the intranet VPC corresponding to the
8698    /// consumer project.
8699    pub principal: std::option::Option<crate::model::Principal>,
8700
8701    /// Optional. A request ID to identify requests. Specify a unique request ID
8702    /// so that if you must retry your request, the server will know to ignore
8703    /// the request if it has already been completed. The server guarantees that a
8704    /// request doesn't result in creation of duplicate commitments for at least 60
8705    /// minutes.
8706    ///
8707    /// For example, consider a situation where you make an initial request and the
8708    /// request times out. If you make the request again with the same request
8709    /// ID, the server can check if original operation with the same request ID
8710    /// was received, and if so, will ignore the second request. This prevents
8711    /// clients from accidentally creating duplicate commitments.
8712    ///
8713    /// The request ID must be a valid UUID with the exception that zero UUID is
8714    /// not supported (00000000-0000-0000-0000-000000000000).
8715    pub request_id: std::string::String,
8716
8717    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8718}
8719
8720impl RevokeDnsBindPermissionRequest {
8721    /// Creates a new default instance.
8722    pub fn new() -> Self {
8723        std::default::Default::default()
8724    }
8725
8726    /// Sets the value of [name][crate::model::RevokeDnsBindPermissionRequest::name].
8727    ///
8728    /// # Example
8729    /// ```ignore,no_run
8730    /// # use google_cloud_vmwareengine_v1::model::RevokeDnsBindPermissionRequest;
8731    /// let x = RevokeDnsBindPermissionRequest::new().set_name("example");
8732    /// ```
8733    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8734        self.name = v.into();
8735        self
8736    }
8737
8738    /// Sets the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
8739    ///
8740    /// # Example
8741    /// ```ignore,no_run
8742    /// # use google_cloud_vmwareengine_v1::model::RevokeDnsBindPermissionRequest;
8743    /// use google_cloud_vmwareengine_v1::model::Principal;
8744    /// let x = RevokeDnsBindPermissionRequest::new().set_principal(Principal::default()/* use setters */);
8745    /// ```
8746    pub fn set_principal<T>(mut self, v: T) -> Self
8747    where
8748        T: std::convert::Into<crate::model::Principal>,
8749    {
8750        self.principal = std::option::Option::Some(v.into());
8751        self
8752    }
8753
8754    /// Sets or clears the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
8755    ///
8756    /// # Example
8757    /// ```ignore,no_run
8758    /// # use google_cloud_vmwareengine_v1::model::RevokeDnsBindPermissionRequest;
8759    /// use google_cloud_vmwareengine_v1::model::Principal;
8760    /// let x = RevokeDnsBindPermissionRequest::new().set_or_clear_principal(Some(Principal::default()/* use setters */));
8761    /// let x = RevokeDnsBindPermissionRequest::new().set_or_clear_principal(None::<Principal>);
8762    /// ```
8763    pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8764    where
8765        T: std::convert::Into<crate::model::Principal>,
8766    {
8767        self.principal = v.map(|x| x.into());
8768        self
8769    }
8770
8771    /// Sets the value of [request_id][crate::model::RevokeDnsBindPermissionRequest::request_id].
8772    ///
8773    /// # Example
8774    /// ```ignore,no_run
8775    /// # use google_cloud_vmwareengine_v1::model::RevokeDnsBindPermissionRequest;
8776    /// let x = RevokeDnsBindPermissionRequest::new().set_request_id("example");
8777    /// ```
8778    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8779        self.request_id = v.into();
8780        self
8781    }
8782}
8783
8784impl wkt::message::Message for RevokeDnsBindPermissionRequest {
8785    fn typename() -> &'static str {
8786        "type.googleapis.com/google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest"
8787    }
8788}
8789
8790/// Request message for
8791/// [VmwareEngine.GetDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]
8792///
8793/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]: crate::client::VmwareEngine::get_dns_bind_permission
8794#[derive(Clone, Default, PartialEq)]
8795#[non_exhaustive]
8796pub struct GetDnsBindPermissionRequest {
8797    /// Required. The name of the resource which stores the users/service accounts
8798    /// having the permission to bind to the corresponding intranet VPC of the
8799    /// consumer project. DnsBindPermission is a global resource. Resource names
8800    /// are schemeless URIs that follow the conventions in
8801    /// <https://cloud.google.com/apis/design/resource_names>. For example:
8802    /// `projects/my-project/locations/global/dnsBindPermission`
8803    pub name: std::string::String,
8804
8805    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8806}
8807
8808impl GetDnsBindPermissionRequest {
8809    /// Creates a new default instance.
8810    pub fn new() -> Self {
8811        std::default::Default::default()
8812    }
8813
8814    /// Sets the value of [name][crate::model::GetDnsBindPermissionRequest::name].
8815    ///
8816    /// # Example
8817    /// ```ignore,no_run
8818    /// # use google_cloud_vmwareengine_v1::model::GetDnsBindPermissionRequest;
8819    /// let x = GetDnsBindPermissionRequest::new().set_name("example");
8820    /// ```
8821    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8822        self.name = v.into();
8823        self
8824    }
8825}
8826
8827impl wkt::message::Message for GetDnsBindPermissionRequest {
8828    fn typename() -> &'static str {
8829        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest"
8830    }
8831}
8832
8833/// Network configuration in the consumer project
8834/// with which the peering has to be done.
8835#[derive(Clone, Default, PartialEq)]
8836#[non_exhaustive]
8837pub struct NetworkConfig {
8838    /// Required. Management CIDR used by VMware management appliances.
8839    pub management_cidr: std::string::String,
8840
8841    /// Optional. The relative resource name of the VMware Engine network attached
8842    /// to the private cloud. Specify the name in the following form:
8843    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
8844    /// where `{project}` can either be a project number or a project ID.
8845    pub vmware_engine_network: std::string::String,
8846
8847    /// Output only. The canonical name of the VMware Engine network in the form:
8848    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
8849    pub vmware_engine_network_canonical: std::string::String,
8850
8851    /// Output only. The IP address layout version of the management IP address
8852    /// range. Possible versions include:
8853    ///
8854    /// * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address
8855    ///   layout used by some existing private clouds. This is no longer supported
8856    ///   for new private clouds as it does not support all features.
8857    /// * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address
8858    ///   layout used by all newly created private clouds. This version supports all
8859    ///   current features.
8860    pub management_ip_address_layout_version: i32,
8861
8862    /// Output only. DNS Server IP of the Private Cloud.
8863    /// All DNS queries can be forwarded to this address for name resolution of
8864    /// Private Cloud's management entities like vCenter, NSX-T Manager and
8865    /// ESXi hosts.
8866    pub dns_server_ip: std::string::String,
8867
8868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8869}
8870
8871impl NetworkConfig {
8872    /// Creates a new default instance.
8873    pub fn new() -> Self {
8874        std::default::Default::default()
8875    }
8876
8877    /// Sets the value of [management_cidr][crate::model::NetworkConfig::management_cidr].
8878    ///
8879    /// # Example
8880    /// ```ignore,no_run
8881    /// # use google_cloud_vmwareengine_v1::model::NetworkConfig;
8882    /// let x = NetworkConfig::new().set_management_cidr("example");
8883    /// ```
8884    pub fn set_management_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8885        self.management_cidr = v.into();
8886        self
8887    }
8888
8889    /// Sets the value of [vmware_engine_network][crate::model::NetworkConfig::vmware_engine_network].
8890    ///
8891    /// # Example
8892    /// ```ignore,no_run
8893    /// # use google_cloud_vmwareengine_v1::model::NetworkConfig;
8894    /// let x = NetworkConfig::new().set_vmware_engine_network("example");
8895    /// ```
8896    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
8897        mut self,
8898        v: T,
8899    ) -> Self {
8900        self.vmware_engine_network = v.into();
8901        self
8902    }
8903
8904    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkConfig::vmware_engine_network_canonical].
8905    ///
8906    /// # Example
8907    /// ```ignore,no_run
8908    /// # use google_cloud_vmwareengine_v1::model::NetworkConfig;
8909    /// let x = NetworkConfig::new().set_vmware_engine_network_canonical("example");
8910    /// ```
8911    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
8912        mut self,
8913        v: T,
8914    ) -> Self {
8915        self.vmware_engine_network_canonical = v.into();
8916        self
8917    }
8918
8919    /// Sets the value of [management_ip_address_layout_version][crate::model::NetworkConfig::management_ip_address_layout_version].
8920    ///
8921    /// # Example
8922    /// ```ignore,no_run
8923    /// # use google_cloud_vmwareengine_v1::model::NetworkConfig;
8924    /// let x = NetworkConfig::new().set_management_ip_address_layout_version(42);
8925    /// ```
8926    pub fn set_management_ip_address_layout_version<T: std::convert::Into<i32>>(
8927        mut self,
8928        v: T,
8929    ) -> Self {
8930        self.management_ip_address_layout_version = v.into();
8931        self
8932    }
8933
8934    /// Sets the value of [dns_server_ip][crate::model::NetworkConfig::dns_server_ip].
8935    ///
8936    /// # Example
8937    /// ```ignore,no_run
8938    /// # use google_cloud_vmwareengine_v1::model::NetworkConfig;
8939    /// let x = NetworkConfig::new().set_dns_server_ip("example");
8940    /// ```
8941    pub fn set_dns_server_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8942        self.dns_server_ip = v.into();
8943        self
8944    }
8945}
8946
8947impl wkt::message::Message for NetworkConfig {
8948    fn typename() -> &'static str {
8949        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkConfig"
8950    }
8951}
8952
8953/// Information about the type and number of nodes associated with the cluster.
8954#[derive(Clone, Default, PartialEq)]
8955#[non_exhaustive]
8956pub struct NodeTypeConfig {
8957    /// Required. The number of nodes of this type in the cluster
8958    pub node_count: i32,
8959
8960    /// Optional. Customized number of cores available to each node of the type.
8961    /// This number must always be one of `nodeType.availableCustomCoreCounts`.
8962    /// If zero is provided max value from `nodeType.availableCustomCoreCounts`
8963    /// will be used.
8964    pub custom_core_count: i32,
8965
8966    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8967}
8968
8969impl NodeTypeConfig {
8970    /// Creates a new default instance.
8971    pub fn new() -> Self {
8972        std::default::Default::default()
8973    }
8974
8975    /// Sets the value of [node_count][crate::model::NodeTypeConfig::node_count].
8976    ///
8977    /// # Example
8978    /// ```ignore,no_run
8979    /// # use google_cloud_vmwareengine_v1::model::NodeTypeConfig;
8980    /// let x = NodeTypeConfig::new().set_node_count(42);
8981    /// ```
8982    pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8983        self.node_count = v.into();
8984        self
8985    }
8986
8987    /// Sets the value of [custom_core_count][crate::model::NodeTypeConfig::custom_core_count].
8988    ///
8989    /// # Example
8990    /// ```ignore,no_run
8991    /// # use google_cloud_vmwareengine_v1::model::NodeTypeConfig;
8992    /// let x = NodeTypeConfig::new().set_custom_core_count(42);
8993    /// ```
8994    pub fn set_custom_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8995        self.custom_core_count = v.into();
8996        self
8997    }
8998}
8999
9000impl wkt::message::Message for NodeTypeConfig {
9001    fn typename() -> &'static str {
9002        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeTypeConfig"
9003    }
9004}
9005
9006/// Configuration of a stretched cluster.
9007#[derive(Clone, Default, PartialEq)]
9008#[non_exhaustive]
9009pub struct StretchedClusterConfig {
9010    /// Required. Zone that will remain operational when connection between the two
9011    /// zones is lost. Specify the resource name of a zone that belongs to the
9012    /// region of the private cloud. For example:
9013    /// `projects/{project}/locations/europe-west3-a` where `{project}` can either
9014    /// be a project number or a project ID.
9015    pub preferred_location: std::string::String,
9016
9017    /// Required. Additional zone for a higher level of availability and load
9018    /// balancing. Specify the resource name of a zone that belongs to the region
9019    /// of the private cloud. For example:
9020    /// `projects/{project}/locations/europe-west3-b` where `{project}` can either
9021    /// be a project number or a project ID.
9022    pub secondary_location: std::string::String,
9023
9024    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9025}
9026
9027impl StretchedClusterConfig {
9028    /// Creates a new default instance.
9029    pub fn new() -> Self {
9030        std::default::Default::default()
9031    }
9032
9033    /// Sets the value of [preferred_location][crate::model::StretchedClusterConfig::preferred_location].
9034    ///
9035    /// # Example
9036    /// ```ignore,no_run
9037    /// # use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
9038    /// let x = StretchedClusterConfig::new().set_preferred_location("example");
9039    /// ```
9040    pub fn set_preferred_location<T: std::convert::Into<std::string::String>>(
9041        mut self,
9042        v: T,
9043    ) -> Self {
9044        self.preferred_location = v.into();
9045        self
9046    }
9047
9048    /// Sets the value of [secondary_location][crate::model::StretchedClusterConfig::secondary_location].
9049    ///
9050    /// # Example
9051    /// ```ignore,no_run
9052    /// # use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
9053    /// let x = StretchedClusterConfig::new().set_secondary_location("example");
9054    /// ```
9055    pub fn set_secondary_location<T: std::convert::Into<std::string::String>>(
9056        mut self,
9057        v: T,
9058    ) -> Self {
9059        self.secondary_location = v.into();
9060        self
9061    }
9062}
9063
9064impl wkt::message::Message for StretchedClusterConfig {
9065    fn typename() -> &'static str {
9066        "type.googleapis.com/google.cloud.vmwareengine.v1.StretchedClusterConfig"
9067    }
9068}
9069
9070/// Represents a private cloud resource. Private clouds of type `STANDARD` and
9071/// `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are
9072/// regional.
9073#[derive(Clone, Default, PartialEq)]
9074#[non_exhaustive]
9075pub struct PrivateCloud {
9076    /// Output only. The resource name of this private cloud.
9077    /// Resource names are schemeless URIs that follow the conventions in
9078    /// <https://cloud.google.com/apis/design/resource_names>.
9079    /// For example:
9080    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
9081    pub name: std::string::String,
9082
9083    /// Output only. Creation time of this resource.
9084    pub create_time: std::option::Option<wkt::Timestamp>,
9085
9086    /// Output only. Last update time of this resource.
9087    pub update_time: std::option::Option<wkt::Timestamp>,
9088
9089    /// Output only. Time when the resource was scheduled for deletion.
9090    pub delete_time: std::option::Option<wkt::Timestamp>,
9091
9092    /// Output only. Time when the resource will be irreversibly deleted.
9093    pub expire_time: std::option::Option<wkt::Timestamp>,
9094
9095    /// Output only. State of the resource. New values may be added to this enum
9096    /// when appropriate.
9097    pub state: crate::model::private_cloud::State,
9098
9099    /// Required. Network configuration of the private cloud.
9100    pub network_config: std::option::Option<crate::model::NetworkConfig>,
9101
9102    /// Required. Input only. The management cluster for this private cloud.
9103    /// This field is required during creation of the private cloud to provide
9104    /// details for the default cluster.
9105    ///
9106    /// The following fields can't be changed after private cloud creation:
9107    /// `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`.
9108    pub management_cluster: std::option::Option<crate::model::private_cloud::ManagementCluster>,
9109
9110    /// User-provided description for this private cloud.
9111    pub description: std::string::String,
9112
9113    /// Output only. HCX appliance.
9114    pub hcx: std::option::Option<crate::model::Hcx>,
9115
9116    /// Output only. NSX appliance.
9117    pub nsx: std::option::Option<crate::model::Nsx>,
9118
9119    /// Output only. Vcenter appliance.
9120    pub vcenter: std::option::Option<crate::model::Vcenter>,
9121
9122    /// Output only. System-generated unique identifier for the resource.
9123    pub uid: std::string::String,
9124
9125    /// Optional. Type of the private cloud. Defaults to STANDARD.
9126    pub r#type: crate::model::private_cloud::Type,
9127
9128    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9129}
9130
9131impl PrivateCloud {
9132    /// Creates a new default instance.
9133    pub fn new() -> Self {
9134        std::default::Default::default()
9135    }
9136
9137    /// Sets the value of [name][crate::model::PrivateCloud::name].
9138    ///
9139    /// # Example
9140    /// ```ignore,no_run
9141    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9142    /// let x = PrivateCloud::new().set_name("example");
9143    /// ```
9144    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9145        self.name = v.into();
9146        self
9147    }
9148
9149    /// Sets the value of [create_time][crate::model::PrivateCloud::create_time].
9150    ///
9151    /// # Example
9152    /// ```ignore,no_run
9153    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9154    /// use wkt::Timestamp;
9155    /// let x = PrivateCloud::new().set_create_time(Timestamp::default()/* use setters */);
9156    /// ```
9157    pub fn set_create_time<T>(mut self, v: T) -> Self
9158    where
9159        T: std::convert::Into<wkt::Timestamp>,
9160    {
9161        self.create_time = std::option::Option::Some(v.into());
9162        self
9163    }
9164
9165    /// Sets or clears the value of [create_time][crate::model::PrivateCloud::create_time].
9166    ///
9167    /// # Example
9168    /// ```ignore,no_run
9169    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9170    /// use wkt::Timestamp;
9171    /// let x = PrivateCloud::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9172    /// let x = PrivateCloud::new().set_or_clear_create_time(None::<Timestamp>);
9173    /// ```
9174    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9175    where
9176        T: std::convert::Into<wkt::Timestamp>,
9177    {
9178        self.create_time = v.map(|x| x.into());
9179        self
9180    }
9181
9182    /// Sets the value of [update_time][crate::model::PrivateCloud::update_time].
9183    ///
9184    /// # Example
9185    /// ```ignore,no_run
9186    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9187    /// use wkt::Timestamp;
9188    /// let x = PrivateCloud::new().set_update_time(Timestamp::default()/* use setters */);
9189    /// ```
9190    pub fn set_update_time<T>(mut self, v: T) -> Self
9191    where
9192        T: std::convert::Into<wkt::Timestamp>,
9193    {
9194        self.update_time = std::option::Option::Some(v.into());
9195        self
9196    }
9197
9198    /// Sets or clears the value of [update_time][crate::model::PrivateCloud::update_time].
9199    ///
9200    /// # Example
9201    /// ```ignore,no_run
9202    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9203    /// use wkt::Timestamp;
9204    /// let x = PrivateCloud::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9205    /// let x = PrivateCloud::new().set_or_clear_update_time(None::<Timestamp>);
9206    /// ```
9207    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9208    where
9209        T: std::convert::Into<wkt::Timestamp>,
9210    {
9211        self.update_time = v.map(|x| x.into());
9212        self
9213    }
9214
9215    /// Sets the value of [delete_time][crate::model::PrivateCloud::delete_time].
9216    ///
9217    /// # Example
9218    /// ```ignore,no_run
9219    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9220    /// use wkt::Timestamp;
9221    /// let x = PrivateCloud::new().set_delete_time(Timestamp::default()/* use setters */);
9222    /// ```
9223    pub fn set_delete_time<T>(mut self, v: T) -> Self
9224    where
9225        T: std::convert::Into<wkt::Timestamp>,
9226    {
9227        self.delete_time = std::option::Option::Some(v.into());
9228        self
9229    }
9230
9231    /// Sets or clears the value of [delete_time][crate::model::PrivateCloud::delete_time].
9232    ///
9233    /// # Example
9234    /// ```ignore,no_run
9235    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9236    /// use wkt::Timestamp;
9237    /// let x = PrivateCloud::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
9238    /// let x = PrivateCloud::new().set_or_clear_delete_time(None::<Timestamp>);
9239    /// ```
9240    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
9241    where
9242        T: std::convert::Into<wkt::Timestamp>,
9243    {
9244        self.delete_time = v.map(|x| x.into());
9245        self
9246    }
9247
9248    /// Sets the value of [expire_time][crate::model::PrivateCloud::expire_time].
9249    ///
9250    /// # Example
9251    /// ```ignore,no_run
9252    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9253    /// use wkt::Timestamp;
9254    /// let x = PrivateCloud::new().set_expire_time(Timestamp::default()/* use setters */);
9255    /// ```
9256    pub fn set_expire_time<T>(mut self, v: T) -> Self
9257    where
9258        T: std::convert::Into<wkt::Timestamp>,
9259    {
9260        self.expire_time = std::option::Option::Some(v.into());
9261        self
9262    }
9263
9264    /// Sets or clears the value of [expire_time][crate::model::PrivateCloud::expire_time].
9265    ///
9266    /// # Example
9267    /// ```ignore,no_run
9268    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9269    /// use wkt::Timestamp;
9270    /// let x = PrivateCloud::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
9271    /// let x = PrivateCloud::new().set_or_clear_expire_time(None::<Timestamp>);
9272    /// ```
9273    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
9274    where
9275        T: std::convert::Into<wkt::Timestamp>,
9276    {
9277        self.expire_time = v.map(|x| x.into());
9278        self
9279    }
9280
9281    /// Sets the value of [state][crate::model::PrivateCloud::state].
9282    ///
9283    /// # Example
9284    /// ```ignore,no_run
9285    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9286    /// use google_cloud_vmwareengine_v1::model::private_cloud::State;
9287    /// let x0 = PrivateCloud::new().set_state(State::Active);
9288    /// let x1 = PrivateCloud::new().set_state(State::Creating);
9289    /// let x2 = PrivateCloud::new().set_state(State::Updating);
9290    /// ```
9291    pub fn set_state<T: std::convert::Into<crate::model::private_cloud::State>>(
9292        mut self,
9293        v: T,
9294    ) -> Self {
9295        self.state = v.into();
9296        self
9297    }
9298
9299    /// Sets the value of [network_config][crate::model::PrivateCloud::network_config].
9300    ///
9301    /// # Example
9302    /// ```ignore,no_run
9303    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9304    /// use google_cloud_vmwareengine_v1::model::NetworkConfig;
9305    /// let x = PrivateCloud::new().set_network_config(NetworkConfig::default()/* use setters */);
9306    /// ```
9307    pub fn set_network_config<T>(mut self, v: T) -> Self
9308    where
9309        T: std::convert::Into<crate::model::NetworkConfig>,
9310    {
9311        self.network_config = std::option::Option::Some(v.into());
9312        self
9313    }
9314
9315    /// Sets or clears the value of [network_config][crate::model::PrivateCloud::network_config].
9316    ///
9317    /// # Example
9318    /// ```ignore,no_run
9319    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9320    /// use google_cloud_vmwareengine_v1::model::NetworkConfig;
9321    /// let x = PrivateCloud::new().set_or_clear_network_config(Some(NetworkConfig::default()/* use setters */));
9322    /// let x = PrivateCloud::new().set_or_clear_network_config(None::<NetworkConfig>);
9323    /// ```
9324    pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
9325    where
9326        T: std::convert::Into<crate::model::NetworkConfig>,
9327    {
9328        self.network_config = v.map(|x| x.into());
9329        self
9330    }
9331
9332    /// Sets the value of [management_cluster][crate::model::PrivateCloud::management_cluster].
9333    ///
9334    /// # Example
9335    /// ```ignore,no_run
9336    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9337    /// use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9338    /// let x = PrivateCloud::new().set_management_cluster(ManagementCluster::default()/* use setters */);
9339    /// ```
9340    pub fn set_management_cluster<T>(mut self, v: T) -> Self
9341    where
9342        T: std::convert::Into<crate::model::private_cloud::ManagementCluster>,
9343    {
9344        self.management_cluster = std::option::Option::Some(v.into());
9345        self
9346    }
9347
9348    /// Sets or clears the value of [management_cluster][crate::model::PrivateCloud::management_cluster].
9349    ///
9350    /// # Example
9351    /// ```ignore,no_run
9352    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9353    /// use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9354    /// let x = PrivateCloud::new().set_or_clear_management_cluster(Some(ManagementCluster::default()/* use setters */));
9355    /// let x = PrivateCloud::new().set_or_clear_management_cluster(None::<ManagementCluster>);
9356    /// ```
9357    pub fn set_or_clear_management_cluster<T>(mut self, v: std::option::Option<T>) -> Self
9358    where
9359        T: std::convert::Into<crate::model::private_cloud::ManagementCluster>,
9360    {
9361        self.management_cluster = v.map(|x| x.into());
9362        self
9363    }
9364
9365    /// Sets the value of [description][crate::model::PrivateCloud::description].
9366    ///
9367    /// # Example
9368    /// ```ignore,no_run
9369    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9370    /// let x = PrivateCloud::new().set_description("example");
9371    /// ```
9372    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9373        self.description = v.into();
9374        self
9375    }
9376
9377    /// Sets the value of [hcx][crate::model::PrivateCloud::hcx].
9378    ///
9379    /// # Example
9380    /// ```ignore,no_run
9381    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9382    /// use google_cloud_vmwareengine_v1::model::Hcx;
9383    /// let x = PrivateCloud::new().set_hcx(Hcx::default()/* use setters */);
9384    /// ```
9385    pub fn set_hcx<T>(mut self, v: T) -> Self
9386    where
9387        T: std::convert::Into<crate::model::Hcx>,
9388    {
9389        self.hcx = std::option::Option::Some(v.into());
9390        self
9391    }
9392
9393    /// Sets or clears the value of [hcx][crate::model::PrivateCloud::hcx].
9394    ///
9395    /// # Example
9396    /// ```ignore,no_run
9397    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9398    /// use google_cloud_vmwareengine_v1::model::Hcx;
9399    /// let x = PrivateCloud::new().set_or_clear_hcx(Some(Hcx::default()/* use setters */));
9400    /// let x = PrivateCloud::new().set_or_clear_hcx(None::<Hcx>);
9401    /// ```
9402    pub fn set_or_clear_hcx<T>(mut self, v: std::option::Option<T>) -> Self
9403    where
9404        T: std::convert::Into<crate::model::Hcx>,
9405    {
9406        self.hcx = v.map(|x| x.into());
9407        self
9408    }
9409
9410    /// Sets the value of [nsx][crate::model::PrivateCloud::nsx].
9411    ///
9412    /// # Example
9413    /// ```ignore,no_run
9414    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9415    /// use google_cloud_vmwareengine_v1::model::Nsx;
9416    /// let x = PrivateCloud::new().set_nsx(Nsx::default()/* use setters */);
9417    /// ```
9418    pub fn set_nsx<T>(mut self, v: T) -> Self
9419    where
9420        T: std::convert::Into<crate::model::Nsx>,
9421    {
9422        self.nsx = std::option::Option::Some(v.into());
9423        self
9424    }
9425
9426    /// Sets or clears the value of [nsx][crate::model::PrivateCloud::nsx].
9427    ///
9428    /// # Example
9429    /// ```ignore,no_run
9430    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9431    /// use google_cloud_vmwareengine_v1::model::Nsx;
9432    /// let x = PrivateCloud::new().set_or_clear_nsx(Some(Nsx::default()/* use setters */));
9433    /// let x = PrivateCloud::new().set_or_clear_nsx(None::<Nsx>);
9434    /// ```
9435    pub fn set_or_clear_nsx<T>(mut self, v: std::option::Option<T>) -> Self
9436    where
9437        T: std::convert::Into<crate::model::Nsx>,
9438    {
9439        self.nsx = v.map(|x| x.into());
9440        self
9441    }
9442
9443    /// Sets the value of [vcenter][crate::model::PrivateCloud::vcenter].
9444    ///
9445    /// # Example
9446    /// ```ignore,no_run
9447    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9448    /// use google_cloud_vmwareengine_v1::model::Vcenter;
9449    /// let x = PrivateCloud::new().set_vcenter(Vcenter::default()/* use setters */);
9450    /// ```
9451    pub fn set_vcenter<T>(mut self, v: T) -> Self
9452    where
9453        T: std::convert::Into<crate::model::Vcenter>,
9454    {
9455        self.vcenter = std::option::Option::Some(v.into());
9456        self
9457    }
9458
9459    /// Sets or clears the value of [vcenter][crate::model::PrivateCloud::vcenter].
9460    ///
9461    /// # Example
9462    /// ```ignore,no_run
9463    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9464    /// use google_cloud_vmwareengine_v1::model::Vcenter;
9465    /// let x = PrivateCloud::new().set_or_clear_vcenter(Some(Vcenter::default()/* use setters */));
9466    /// let x = PrivateCloud::new().set_or_clear_vcenter(None::<Vcenter>);
9467    /// ```
9468    pub fn set_or_clear_vcenter<T>(mut self, v: std::option::Option<T>) -> Self
9469    where
9470        T: std::convert::Into<crate::model::Vcenter>,
9471    {
9472        self.vcenter = v.map(|x| x.into());
9473        self
9474    }
9475
9476    /// Sets the value of [uid][crate::model::PrivateCloud::uid].
9477    ///
9478    /// # Example
9479    /// ```ignore,no_run
9480    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9481    /// let x = PrivateCloud::new().set_uid("example");
9482    /// ```
9483    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9484        self.uid = v.into();
9485        self
9486    }
9487
9488    /// Sets the value of [r#type][crate::model::PrivateCloud::type].
9489    ///
9490    /// # Example
9491    /// ```ignore,no_run
9492    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9493    /// use google_cloud_vmwareengine_v1::model::private_cloud::Type;
9494    /// let x0 = PrivateCloud::new().set_type(Type::TimeLimited);
9495    /// let x1 = PrivateCloud::new().set_type(Type::Stretched);
9496    /// ```
9497    pub fn set_type<T: std::convert::Into<crate::model::private_cloud::Type>>(
9498        mut self,
9499        v: T,
9500    ) -> Self {
9501        self.r#type = v.into();
9502        self
9503    }
9504}
9505
9506impl wkt::message::Message for PrivateCloud {
9507    fn typename() -> &'static str {
9508        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud"
9509    }
9510}
9511
9512/// Defines additional types related to [PrivateCloud].
9513pub mod private_cloud {
9514    #[allow(unused_imports)]
9515    use super::*;
9516
9517    /// Management cluster configuration.
9518    #[derive(Clone, Default, PartialEq)]
9519    #[non_exhaustive]
9520    pub struct ManagementCluster {
9521        /// Required. The user-provided identifier of the new `Cluster`.
9522        /// The identifier must meet the following requirements:
9523        ///
9524        /// * Only contains 1-63 alphanumeric characters and hyphens
9525        /// * Begins with an alphabetical character
9526        /// * Ends with a non-hyphen character
9527        /// * Not formatted as a UUID
9528        /// * Complies with [RFC
9529        ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
9530        pub cluster_id: std::string::String,
9531
9532        /// Required. The map of cluster node types in this cluster, where the key is
9533        /// canonical identifier of the node type (corresponds to the `NodeType`).
9534        pub node_type_configs:
9535            std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
9536
9537        /// Optional. Configuration of a stretched cluster. Required for STRETCHED
9538        /// private clouds.
9539        pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
9540
9541        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9542    }
9543
9544    impl ManagementCluster {
9545        /// Creates a new default instance.
9546        pub fn new() -> Self {
9547            std::default::Default::default()
9548        }
9549
9550        /// Sets the value of [cluster_id][crate::model::private_cloud::ManagementCluster::cluster_id].
9551        ///
9552        /// # Example
9553        /// ```ignore,no_run
9554        /// # use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9555        /// let x = ManagementCluster::new().set_cluster_id("example");
9556        /// ```
9557        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9558            self.cluster_id = v.into();
9559            self
9560        }
9561
9562        /// Sets the value of [node_type_configs][crate::model::private_cloud::ManagementCluster::node_type_configs].
9563        ///
9564        /// # Example
9565        /// ```ignore,no_run
9566        /// # use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9567        /// use google_cloud_vmwareengine_v1::model::NodeTypeConfig;
9568        /// let x = ManagementCluster::new().set_node_type_configs([
9569        ///     ("key0", NodeTypeConfig::default()/* use setters */),
9570        ///     ("key1", NodeTypeConfig::default()/* use (different) setters */),
9571        /// ]);
9572        /// ```
9573        pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
9574        where
9575            T: std::iter::IntoIterator<Item = (K, V)>,
9576            K: std::convert::Into<std::string::String>,
9577            V: std::convert::Into<crate::model::NodeTypeConfig>,
9578        {
9579            use std::iter::Iterator;
9580            self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9581            self
9582        }
9583
9584        /// Sets the value of [stretched_cluster_config][crate::model::private_cloud::ManagementCluster::stretched_cluster_config].
9585        ///
9586        /// # Example
9587        /// ```ignore,no_run
9588        /// # use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9589        /// use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
9590        /// let x = ManagementCluster::new().set_stretched_cluster_config(StretchedClusterConfig::default()/* use setters */);
9591        /// ```
9592        pub fn set_stretched_cluster_config<T>(mut self, v: T) -> Self
9593        where
9594            T: std::convert::Into<crate::model::StretchedClusterConfig>,
9595        {
9596            self.stretched_cluster_config = std::option::Option::Some(v.into());
9597            self
9598        }
9599
9600        /// Sets or clears the value of [stretched_cluster_config][crate::model::private_cloud::ManagementCluster::stretched_cluster_config].
9601        ///
9602        /// # Example
9603        /// ```ignore,no_run
9604        /// # use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9605        /// use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
9606        /// let x = ManagementCluster::new().set_or_clear_stretched_cluster_config(Some(StretchedClusterConfig::default()/* use setters */));
9607        /// let x = ManagementCluster::new().set_or_clear_stretched_cluster_config(None::<StretchedClusterConfig>);
9608        /// ```
9609        pub fn set_or_clear_stretched_cluster_config<T>(mut self, v: std::option::Option<T>) -> Self
9610        where
9611            T: std::convert::Into<crate::model::StretchedClusterConfig>,
9612        {
9613            self.stretched_cluster_config = v.map(|x| x.into());
9614            self
9615        }
9616    }
9617
9618    impl wkt::message::Message for ManagementCluster {
9619        fn typename() -> &'static str {
9620            "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster"
9621        }
9622    }
9623
9624    /// Enum State defines possible states of private clouds.
9625    ///
9626    /// # Working with unknown values
9627    ///
9628    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9629    /// additional enum variants at any time. Adding new variants is not considered
9630    /// a breaking change. Applications should write their code in anticipation of:
9631    ///
9632    /// - New values appearing in future releases of the client library, **and**
9633    /// - New values received dynamically, without application changes.
9634    ///
9635    /// Please consult the [Working with enums] section in the user guide for some
9636    /// guidelines.
9637    ///
9638    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9639    #[derive(Clone, Debug, PartialEq)]
9640    #[non_exhaustive]
9641    pub enum State {
9642        /// The default value. This value should never be used.
9643        Unspecified,
9644        /// The private cloud is ready.
9645        Active,
9646        /// The private cloud is being created.
9647        Creating,
9648        /// The private cloud is being updated.
9649        Updating,
9650        /// The private cloud is in failed state.
9651        Failed,
9652        /// The private cloud is scheduled for deletion. The deletion process can be
9653        /// cancelled by using the corresponding undelete method.
9654        Deleted,
9655        /// The private cloud is irreversibly deleted and is being removed from the
9656        /// system.
9657        Purging,
9658        /// If set, the enum was initialized with an unknown value.
9659        ///
9660        /// Applications can examine the value using [State::value] or
9661        /// [State::name].
9662        UnknownValue(state::UnknownValue),
9663    }
9664
9665    #[doc(hidden)]
9666    pub mod state {
9667        #[allow(unused_imports)]
9668        use super::*;
9669        #[derive(Clone, Debug, PartialEq)]
9670        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9671    }
9672
9673    impl State {
9674        /// Gets the enum value.
9675        ///
9676        /// Returns `None` if the enum contains an unknown value deserialized from
9677        /// the string representation of enums.
9678        pub fn value(&self) -> std::option::Option<i32> {
9679            match self {
9680                Self::Unspecified => std::option::Option::Some(0),
9681                Self::Active => std::option::Option::Some(1),
9682                Self::Creating => std::option::Option::Some(2),
9683                Self::Updating => std::option::Option::Some(3),
9684                Self::Failed => std::option::Option::Some(5),
9685                Self::Deleted => std::option::Option::Some(6),
9686                Self::Purging => std::option::Option::Some(7),
9687                Self::UnknownValue(u) => u.0.value(),
9688            }
9689        }
9690
9691        /// Gets the enum value as a string.
9692        ///
9693        /// Returns `None` if the enum contains an unknown value deserialized from
9694        /// the integer representation of enums.
9695        pub fn name(&self) -> std::option::Option<&str> {
9696            match self {
9697                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
9698                Self::Active => std::option::Option::Some("ACTIVE"),
9699                Self::Creating => std::option::Option::Some("CREATING"),
9700                Self::Updating => std::option::Option::Some("UPDATING"),
9701                Self::Failed => std::option::Option::Some("FAILED"),
9702                Self::Deleted => std::option::Option::Some("DELETED"),
9703                Self::Purging => std::option::Option::Some("PURGING"),
9704                Self::UnknownValue(u) => u.0.name(),
9705            }
9706        }
9707    }
9708
9709    impl std::default::Default for State {
9710        fn default() -> Self {
9711            use std::convert::From;
9712            Self::from(0)
9713        }
9714    }
9715
9716    impl std::fmt::Display for State {
9717        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9718            wkt::internal::display_enum(f, self.name(), self.value())
9719        }
9720    }
9721
9722    impl std::convert::From<i32> for State {
9723        fn from(value: i32) -> Self {
9724            match value {
9725                0 => Self::Unspecified,
9726                1 => Self::Active,
9727                2 => Self::Creating,
9728                3 => Self::Updating,
9729                5 => Self::Failed,
9730                6 => Self::Deleted,
9731                7 => Self::Purging,
9732                _ => Self::UnknownValue(state::UnknownValue(
9733                    wkt::internal::UnknownEnumValue::Integer(value),
9734                )),
9735            }
9736        }
9737    }
9738
9739    impl std::convert::From<&str> for State {
9740        fn from(value: &str) -> Self {
9741            use std::string::ToString;
9742            match value {
9743                "STATE_UNSPECIFIED" => Self::Unspecified,
9744                "ACTIVE" => Self::Active,
9745                "CREATING" => Self::Creating,
9746                "UPDATING" => Self::Updating,
9747                "FAILED" => Self::Failed,
9748                "DELETED" => Self::Deleted,
9749                "PURGING" => Self::Purging,
9750                _ => Self::UnknownValue(state::UnknownValue(
9751                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9752                )),
9753            }
9754        }
9755    }
9756
9757    impl serde::ser::Serialize for State {
9758        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9759        where
9760            S: serde::Serializer,
9761        {
9762            match self {
9763                Self::Unspecified => serializer.serialize_i32(0),
9764                Self::Active => serializer.serialize_i32(1),
9765                Self::Creating => serializer.serialize_i32(2),
9766                Self::Updating => serializer.serialize_i32(3),
9767                Self::Failed => serializer.serialize_i32(5),
9768                Self::Deleted => serializer.serialize_i32(6),
9769                Self::Purging => serializer.serialize_i32(7),
9770                Self::UnknownValue(u) => u.0.serialize(serializer),
9771            }
9772        }
9773    }
9774
9775    impl<'de> serde::de::Deserialize<'de> for State {
9776        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9777        where
9778            D: serde::Deserializer<'de>,
9779        {
9780            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9781                ".google.cloud.vmwareengine.v1.PrivateCloud.State",
9782            ))
9783        }
9784    }
9785
9786    /// Enum Type defines private cloud type.
9787    ///
9788    /// # Working with unknown values
9789    ///
9790    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9791    /// additional enum variants at any time. Adding new variants is not considered
9792    /// a breaking change. Applications should write their code in anticipation of:
9793    ///
9794    /// - New values appearing in future releases of the client library, **and**
9795    /// - New values received dynamically, without application changes.
9796    ///
9797    /// Please consult the [Working with enums] section in the user guide for some
9798    /// guidelines.
9799    ///
9800    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9801    #[derive(Clone, Debug, PartialEq)]
9802    #[non_exhaustive]
9803    pub enum Type {
9804        /// Standard private is a zonal resource, with 3+ nodes. Default type.
9805        Standard,
9806        /// Time limited private cloud is a zonal resource, can have only 1 node and
9807        /// has limited life span. Will be deleted after defined period of time,
9808        /// can be converted into standard private cloud by expanding it up to 3
9809        /// or more nodes.
9810        TimeLimited,
9811        /// Stretched private cloud is a regional resource with redundancy,
9812        /// with a minimum of 6 nodes, nodes count has to be even.
9813        Stretched,
9814        /// If set, the enum was initialized with an unknown value.
9815        ///
9816        /// Applications can examine the value using [Type::value] or
9817        /// [Type::name].
9818        UnknownValue(r#type::UnknownValue),
9819    }
9820
9821    #[doc(hidden)]
9822    pub mod r#type {
9823        #[allow(unused_imports)]
9824        use super::*;
9825        #[derive(Clone, Debug, PartialEq)]
9826        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9827    }
9828
9829    impl Type {
9830        /// Gets the enum value.
9831        ///
9832        /// Returns `None` if the enum contains an unknown value deserialized from
9833        /// the string representation of enums.
9834        pub fn value(&self) -> std::option::Option<i32> {
9835            match self {
9836                Self::Standard => std::option::Option::Some(0),
9837                Self::TimeLimited => std::option::Option::Some(1),
9838                Self::Stretched => std::option::Option::Some(2),
9839                Self::UnknownValue(u) => u.0.value(),
9840            }
9841        }
9842
9843        /// Gets the enum value as a string.
9844        ///
9845        /// Returns `None` if the enum contains an unknown value deserialized from
9846        /// the integer representation of enums.
9847        pub fn name(&self) -> std::option::Option<&str> {
9848            match self {
9849                Self::Standard => std::option::Option::Some("STANDARD"),
9850                Self::TimeLimited => std::option::Option::Some("TIME_LIMITED"),
9851                Self::Stretched => std::option::Option::Some("STRETCHED"),
9852                Self::UnknownValue(u) => u.0.name(),
9853            }
9854        }
9855    }
9856
9857    impl std::default::Default for Type {
9858        fn default() -> Self {
9859            use std::convert::From;
9860            Self::from(0)
9861        }
9862    }
9863
9864    impl std::fmt::Display for Type {
9865        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9866            wkt::internal::display_enum(f, self.name(), self.value())
9867        }
9868    }
9869
9870    impl std::convert::From<i32> for Type {
9871        fn from(value: i32) -> Self {
9872            match value {
9873                0 => Self::Standard,
9874                1 => Self::TimeLimited,
9875                2 => Self::Stretched,
9876                _ => Self::UnknownValue(r#type::UnknownValue(
9877                    wkt::internal::UnknownEnumValue::Integer(value),
9878                )),
9879            }
9880        }
9881    }
9882
9883    impl std::convert::From<&str> for Type {
9884        fn from(value: &str) -> Self {
9885            use std::string::ToString;
9886            match value {
9887                "STANDARD" => Self::Standard,
9888                "TIME_LIMITED" => Self::TimeLimited,
9889                "STRETCHED" => Self::Stretched,
9890                _ => Self::UnknownValue(r#type::UnknownValue(
9891                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9892                )),
9893            }
9894        }
9895    }
9896
9897    impl serde::ser::Serialize for Type {
9898        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9899        where
9900            S: serde::Serializer,
9901        {
9902            match self {
9903                Self::Standard => serializer.serialize_i32(0),
9904                Self::TimeLimited => serializer.serialize_i32(1),
9905                Self::Stretched => serializer.serialize_i32(2),
9906                Self::UnknownValue(u) => u.0.serialize(serializer),
9907            }
9908        }
9909    }
9910
9911    impl<'de> serde::de::Deserialize<'de> for Type {
9912        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9913        where
9914            D: serde::Deserializer<'de>,
9915        {
9916            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
9917                ".google.cloud.vmwareengine.v1.PrivateCloud.Type",
9918            ))
9919        }
9920    }
9921}
9922
9923/// A cluster in a private cloud.
9924#[derive(Clone, Default, PartialEq)]
9925#[non_exhaustive]
9926pub struct Cluster {
9927    /// Output only. The resource name of this cluster.
9928    /// Resource names are schemeless URIs that follow the conventions in
9929    /// <https://cloud.google.com/apis/design/resource_names>.
9930    /// For example:
9931    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
9932    pub name: std::string::String,
9933
9934    /// Output only. Creation time of this resource.
9935    pub create_time: std::option::Option<wkt::Timestamp>,
9936
9937    /// Output only. Last update time of this resource.
9938    pub update_time: std::option::Option<wkt::Timestamp>,
9939
9940    /// Output only. State of the resource.
9941    pub state: crate::model::cluster::State,
9942
9943    /// Output only. True if the cluster is a management cluster; false otherwise.
9944    /// There can only be one management cluster in a private cloud
9945    /// and it has to be the first one.
9946    pub management: bool,
9947
9948    /// Optional. Configuration of the autoscaling applied to this cluster.
9949    pub autoscaling_settings: std::option::Option<crate::model::AutoscalingSettings>,
9950
9951    /// Output only. System-generated unique identifier for the resource.
9952    pub uid: std::string::String,
9953
9954    /// Required. The map of cluster node types in this cluster, where the key is
9955    /// canonical identifier of the node type (corresponds to the `NodeType`).
9956    pub node_type_configs:
9957        std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
9958
9959    /// Optional. Configuration of a stretched cluster. Required for clusters that
9960    /// belong to a STRETCHED private cloud.
9961    pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
9962
9963    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9964}
9965
9966impl Cluster {
9967    /// Creates a new default instance.
9968    pub fn new() -> Self {
9969        std::default::Default::default()
9970    }
9971
9972    /// Sets the value of [name][crate::model::Cluster::name].
9973    ///
9974    /// # Example
9975    /// ```ignore,no_run
9976    /// # use google_cloud_vmwareengine_v1::model::Cluster;
9977    /// let x = Cluster::new().set_name("example");
9978    /// ```
9979    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9980        self.name = v.into();
9981        self
9982    }
9983
9984    /// Sets the value of [create_time][crate::model::Cluster::create_time].
9985    ///
9986    /// # Example
9987    /// ```ignore,no_run
9988    /// # use google_cloud_vmwareengine_v1::model::Cluster;
9989    /// use wkt::Timestamp;
9990    /// let x = Cluster::new().set_create_time(Timestamp::default()/* use setters */);
9991    /// ```
9992    pub fn set_create_time<T>(mut self, v: T) -> Self
9993    where
9994        T: std::convert::Into<wkt::Timestamp>,
9995    {
9996        self.create_time = std::option::Option::Some(v.into());
9997        self
9998    }
9999
10000    /// Sets or clears the value of [create_time][crate::model::Cluster::create_time].
10001    ///
10002    /// # Example
10003    /// ```ignore,no_run
10004    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10005    /// use wkt::Timestamp;
10006    /// let x = Cluster::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
10007    /// let x = Cluster::new().set_or_clear_create_time(None::<Timestamp>);
10008    /// ```
10009    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10010    where
10011        T: std::convert::Into<wkt::Timestamp>,
10012    {
10013        self.create_time = v.map(|x| x.into());
10014        self
10015    }
10016
10017    /// Sets the value of [update_time][crate::model::Cluster::update_time].
10018    ///
10019    /// # Example
10020    /// ```ignore,no_run
10021    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10022    /// use wkt::Timestamp;
10023    /// let x = Cluster::new().set_update_time(Timestamp::default()/* use setters */);
10024    /// ```
10025    pub fn set_update_time<T>(mut self, v: T) -> Self
10026    where
10027        T: std::convert::Into<wkt::Timestamp>,
10028    {
10029        self.update_time = std::option::Option::Some(v.into());
10030        self
10031    }
10032
10033    /// Sets or clears the value of [update_time][crate::model::Cluster::update_time].
10034    ///
10035    /// # Example
10036    /// ```ignore,no_run
10037    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10038    /// use wkt::Timestamp;
10039    /// let x = Cluster::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
10040    /// let x = Cluster::new().set_or_clear_update_time(None::<Timestamp>);
10041    /// ```
10042    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
10043    where
10044        T: std::convert::Into<wkt::Timestamp>,
10045    {
10046        self.update_time = v.map(|x| x.into());
10047        self
10048    }
10049
10050    /// Sets the value of [state][crate::model::Cluster::state].
10051    ///
10052    /// # Example
10053    /// ```ignore,no_run
10054    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10055    /// use google_cloud_vmwareengine_v1::model::cluster::State;
10056    /// let x0 = Cluster::new().set_state(State::Active);
10057    /// let x1 = Cluster::new().set_state(State::Creating);
10058    /// let x2 = Cluster::new().set_state(State::Updating);
10059    /// ```
10060    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
10061        self.state = v.into();
10062        self
10063    }
10064
10065    /// Sets the value of [management][crate::model::Cluster::management].
10066    ///
10067    /// # Example
10068    /// ```ignore,no_run
10069    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10070    /// let x = Cluster::new().set_management(true);
10071    /// ```
10072    pub fn set_management<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10073        self.management = v.into();
10074        self
10075    }
10076
10077    /// Sets the value of [autoscaling_settings][crate::model::Cluster::autoscaling_settings].
10078    ///
10079    /// # Example
10080    /// ```ignore,no_run
10081    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10082    /// use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
10083    /// let x = Cluster::new().set_autoscaling_settings(AutoscalingSettings::default()/* use setters */);
10084    /// ```
10085    pub fn set_autoscaling_settings<T>(mut self, v: T) -> Self
10086    where
10087        T: std::convert::Into<crate::model::AutoscalingSettings>,
10088    {
10089        self.autoscaling_settings = std::option::Option::Some(v.into());
10090        self
10091    }
10092
10093    /// Sets or clears the value of [autoscaling_settings][crate::model::Cluster::autoscaling_settings].
10094    ///
10095    /// # Example
10096    /// ```ignore,no_run
10097    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10098    /// use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
10099    /// let x = Cluster::new().set_or_clear_autoscaling_settings(Some(AutoscalingSettings::default()/* use setters */));
10100    /// let x = Cluster::new().set_or_clear_autoscaling_settings(None::<AutoscalingSettings>);
10101    /// ```
10102    pub fn set_or_clear_autoscaling_settings<T>(mut self, v: std::option::Option<T>) -> Self
10103    where
10104        T: std::convert::Into<crate::model::AutoscalingSettings>,
10105    {
10106        self.autoscaling_settings = v.map(|x| x.into());
10107        self
10108    }
10109
10110    /// Sets the value of [uid][crate::model::Cluster::uid].
10111    ///
10112    /// # Example
10113    /// ```ignore,no_run
10114    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10115    /// let x = Cluster::new().set_uid("example");
10116    /// ```
10117    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10118        self.uid = v.into();
10119        self
10120    }
10121
10122    /// Sets the value of [node_type_configs][crate::model::Cluster::node_type_configs].
10123    ///
10124    /// # Example
10125    /// ```ignore,no_run
10126    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10127    /// use google_cloud_vmwareengine_v1::model::NodeTypeConfig;
10128    /// let x = Cluster::new().set_node_type_configs([
10129    ///     ("key0", NodeTypeConfig::default()/* use setters */),
10130    ///     ("key1", NodeTypeConfig::default()/* use (different) setters */),
10131    /// ]);
10132    /// ```
10133    pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
10134    where
10135        T: std::iter::IntoIterator<Item = (K, V)>,
10136        K: std::convert::Into<std::string::String>,
10137        V: std::convert::Into<crate::model::NodeTypeConfig>,
10138    {
10139        use std::iter::Iterator;
10140        self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
10141        self
10142    }
10143
10144    /// Sets the value of [stretched_cluster_config][crate::model::Cluster::stretched_cluster_config].
10145    ///
10146    /// # Example
10147    /// ```ignore,no_run
10148    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10149    /// use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
10150    /// let x = Cluster::new().set_stretched_cluster_config(StretchedClusterConfig::default()/* use setters */);
10151    /// ```
10152    pub fn set_stretched_cluster_config<T>(mut self, v: T) -> Self
10153    where
10154        T: std::convert::Into<crate::model::StretchedClusterConfig>,
10155    {
10156        self.stretched_cluster_config = std::option::Option::Some(v.into());
10157        self
10158    }
10159
10160    /// Sets or clears the value of [stretched_cluster_config][crate::model::Cluster::stretched_cluster_config].
10161    ///
10162    /// # Example
10163    /// ```ignore,no_run
10164    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10165    /// use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
10166    /// let x = Cluster::new().set_or_clear_stretched_cluster_config(Some(StretchedClusterConfig::default()/* use setters */));
10167    /// let x = Cluster::new().set_or_clear_stretched_cluster_config(None::<StretchedClusterConfig>);
10168    /// ```
10169    pub fn set_or_clear_stretched_cluster_config<T>(mut self, v: std::option::Option<T>) -> Self
10170    where
10171        T: std::convert::Into<crate::model::StretchedClusterConfig>,
10172    {
10173        self.stretched_cluster_config = v.map(|x| x.into());
10174        self
10175    }
10176}
10177
10178impl wkt::message::Message for Cluster {
10179    fn typename() -> &'static str {
10180        "type.googleapis.com/google.cloud.vmwareengine.v1.Cluster"
10181    }
10182}
10183
10184/// Defines additional types related to [Cluster].
10185pub mod cluster {
10186    #[allow(unused_imports)]
10187    use super::*;
10188
10189    /// Enum State defines possible states of private cloud clusters.
10190    ///
10191    /// # Working with unknown values
10192    ///
10193    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10194    /// additional enum variants at any time. Adding new variants is not considered
10195    /// a breaking change. Applications should write their code in anticipation of:
10196    ///
10197    /// - New values appearing in future releases of the client library, **and**
10198    /// - New values received dynamically, without application changes.
10199    ///
10200    /// Please consult the [Working with enums] section in the user guide for some
10201    /// guidelines.
10202    ///
10203    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10204    #[derive(Clone, Debug, PartialEq)]
10205    #[non_exhaustive]
10206    pub enum State {
10207        /// The default value. This value should never be used.
10208        Unspecified,
10209        /// The Cluster is operational and can be used by the user.
10210        Active,
10211        /// The Cluster is being deployed.
10212        Creating,
10213        /// Adding or removing of a node to the cluster, any other cluster specific
10214        /// updates.
10215        Updating,
10216        /// The Cluster is being deleted.
10217        Deleting,
10218        /// The Cluster is undergoing maintenance, for example: a failed node is
10219        /// getting replaced.
10220        Repairing,
10221        /// If set, the enum was initialized with an unknown value.
10222        ///
10223        /// Applications can examine the value using [State::value] or
10224        /// [State::name].
10225        UnknownValue(state::UnknownValue),
10226    }
10227
10228    #[doc(hidden)]
10229    pub mod state {
10230        #[allow(unused_imports)]
10231        use super::*;
10232        #[derive(Clone, Debug, PartialEq)]
10233        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10234    }
10235
10236    impl State {
10237        /// Gets the enum value.
10238        ///
10239        /// Returns `None` if the enum contains an unknown value deserialized from
10240        /// the string representation of enums.
10241        pub fn value(&self) -> std::option::Option<i32> {
10242            match self {
10243                Self::Unspecified => std::option::Option::Some(0),
10244                Self::Active => std::option::Option::Some(1),
10245                Self::Creating => std::option::Option::Some(2),
10246                Self::Updating => std::option::Option::Some(3),
10247                Self::Deleting => std::option::Option::Some(4),
10248                Self::Repairing => std::option::Option::Some(5),
10249                Self::UnknownValue(u) => u.0.value(),
10250            }
10251        }
10252
10253        /// Gets the enum value as a string.
10254        ///
10255        /// Returns `None` if the enum contains an unknown value deserialized from
10256        /// the integer representation of enums.
10257        pub fn name(&self) -> std::option::Option<&str> {
10258            match self {
10259                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10260                Self::Active => std::option::Option::Some("ACTIVE"),
10261                Self::Creating => std::option::Option::Some("CREATING"),
10262                Self::Updating => std::option::Option::Some("UPDATING"),
10263                Self::Deleting => std::option::Option::Some("DELETING"),
10264                Self::Repairing => std::option::Option::Some("REPAIRING"),
10265                Self::UnknownValue(u) => u.0.name(),
10266            }
10267        }
10268    }
10269
10270    impl std::default::Default for State {
10271        fn default() -> Self {
10272            use std::convert::From;
10273            Self::from(0)
10274        }
10275    }
10276
10277    impl std::fmt::Display for State {
10278        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10279            wkt::internal::display_enum(f, self.name(), self.value())
10280        }
10281    }
10282
10283    impl std::convert::From<i32> for State {
10284        fn from(value: i32) -> Self {
10285            match value {
10286                0 => Self::Unspecified,
10287                1 => Self::Active,
10288                2 => Self::Creating,
10289                3 => Self::Updating,
10290                4 => Self::Deleting,
10291                5 => Self::Repairing,
10292                _ => Self::UnknownValue(state::UnknownValue(
10293                    wkt::internal::UnknownEnumValue::Integer(value),
10294                )),
10295            }
10296        }
10297    }
10298
10299    impl std::convert::From<&str> for State {
10300        fn from(value: &str) -> Self {
10301            use std::string::ToString;
10302            match value {
10303                "STATE_UNSPECIFIED" => Self::Unspecified,
10304                "ACTIVE" => Self::Active,
10305                "CREATING" => Self::Creating,
10306                "UPDATING" => Self::Updating,
10307                "DELETING" => Self::Deleting,
10308                "REPAIRING" => Self::Repairing,
10309                _ => Self::UnknownValue(state::UnknownValue(
10310                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10311                )),
10312            }
10313        }
10314    }
10315
10316    impl serde::ser::Serialize for State {
10317        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10318        where
10319            S: serde::Serializer,
10320        {
10321            match self {
10322                Self::Unspecified => serializer.serialize_i32(0),
10323                Self::Active => serializer.serialize_i32(1),
10324                Self::Creating => serializer.serialize_i32(2),
10325                Self::Updating => serializer.serialize_i32(3),
10326                Self::Deleting => serializer.serialize_i32(4),
10327                Self::Repairing => serializer.serialize_i32(5),
10328                Self::UnknownValue(u) => u.0.serialize(serializer),
10329            }
10330        }
10331    }
10332
10333    impl<'de> serde::de::Deserialize<'de> for State {
10334        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10335        where
10336            D: serde::Deserializer<'de>,
10337        {
10338            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10339                ".google.cloud.vmwareengine.v1.Cluster.State",
10340            ))
10341        }
10342    }
10343}
10344
10345/// Node in a cluster.
10346#[derive(Clone, Default, PartialEq)]
10347#[non_exhaustive]
10348pub struct Node {
10349    /// Output only. The resource name of this node.
10350    /// Resource names are schemeless URIs that follow the conventions in
10351    /// <https://cloud.google.com/apis/design/resource_names>.
10352    /// For example:
10353    /// projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node
10354    pub name: std::string::String,
10355
10356    /// Output only. Fully qualified domain name of the node.
10357    pub fqdn: std::string::String,
10358
10359    /// Output only. Internal IP address of the node.
10360    pub internal_ip: std::string::String,
10361
10362    /// Output only. The canonical identifier of the node type (corresponds to the
10363    /// `NodeType`).
10364    /// For example: standard-72.
10365    pub node_type_id: std::string::String,
10366
10367    /// Output only. The version number of the VMware ESXi
10368    /// management component in this cluster.
10369    pub version: std::string::String,
10370
10371    /// Output only. Customized number of cores
10372    pub custom_core_count: i64,
10373
10374    /// Output only. The state of the appliance.
10375    pub state: crate::model::node::State,
10376
10377    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10378}
10379
10380impl Node {
10381    /// Creates a new default instance.
10382    pub fn new() -> Self {
10383        std::default::Default::default()
10384    }
10385
10386    /// Sets the value of [name][crate::model::Node::name].
10387    ///
10388    /// # Example
10389    /// ```ignore,no_run
10390    /// # use google_cloud_vmwareengine_v1::model::Node;
10391    /// let x = Node::new().set_name("example");
10392    /// ```
10393    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10394        self.name = v.into();
10395        self
10396    }
10397
10398    /// Sets the value of [fqdn][crate::model::Node::fqdn].
10399    ///
10400    /// # Example
10401    /// ```ignore,no_run
10402    /// # use google_cloud_vmwareengine_v1::model::Node;
10403    /// let x = Node::new().set_fqdn("example");
10404    /// ```
10405    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10406        self.fqdn = v.into();
10407        self
10408    }
10409
10410    /// Sets the value of [internal_ip][crate::model::Node::internal_ip].
10411    ///
10412    /// # Example
10413    /// ```ignore,no_run
10414    /// # use google_cloud_vmwareengine_v1::model::Node;
10415    /// let x = Node::new().set_internal_ip("example");
10416    /// ```
10417    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10418        self.internal_ip = v.into();
10419        self
10420    }
10421
10422    /// Sets the value of [node_type_id][crate::model::Node::node_type_id].
10423    ///
10424    /// # Example
10425    /// ```ignore,no_run
10426    /// # use google_cloud_vmwareengine_v1::model::Node;
10427    /// let x = Node::new().set_node_type_id("example");
10428    /// ```
10429    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10430        self.node_type_id = v.into();
10431        self
10432    }
10433
10434    /// Sets the value of [version][crate::model::Node::version].
10435    ///
10436    /// # Example
10437    /// ```ignore,no_run
10438    /// # use google_cloud_vmwareengine_v1::model::Node;
10439    /// let x = Node::new().set_version("example");
10440    /// ```
10441    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10442        self.version = v.into();
10443        self
10444    }
10445
10446    /// Sets the value of [custom_core_count][crate::model::Node::custom_core_count].
10447    ///
10448    /// # Example
10449    /// ```ignore,no_run
10450    /// # use google_cloud_vmwareengine_v1::model::Node;
10451    /// let x = Node::new().set_custom_core_count(42);
10452    /// ```
10453    pub fn set_custom_core_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10454        self.custom_core_count = v.into();
10455        self
10456    }
10457
10458    /// Sets the value of [state][crate::model::Node::state].
10459    ///
10460    /// # Example
10461    /// ```ignore,no_run
10462    /// # use google_cloud_vmwareengine_v1::model::Node;
10463    /// use google_cloud_vmwareengine_v1::model::node::State;
10464    /// let x0 = Node::new().set_state(State::Active);
10465    /// let x1 = Node::new().set_state(State::Creating);
10466    /// let x2 = Node::new().set_state(State::Failed);
10467    /// ```
10468    pub fn set_state<T: std::convert::Into<crate::model::node::State>>(mut self, v: T) -> Self {
10469        self.state = v.into();
10470        self
10471    }
10472}
10473
10474impl wkt::message::Message for Node {
10475    fn typename() -> &'static str {
10476        "type.googleapis.com/google.cloud.vmwareengine.v1.Node"
10477    }
10478}
10479
10480/// Defines additional types related to [Node].
10481pub mod node {
10482    #[allow(unused_imports)]
10483    use super::*;
10484
10485    /// Enum State defines possible states of a node in a cluster.
10486    ///
10487    /// # Working with unknown values
10488    ///
10489    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10490    /// additional enum variants at any time. Adding new variants is not considered
10491    /// a breaking change. Applications should write their code in anticipation of:
10492    ///
10493    /// - New values appearing in future releases of the client library, **and**
10494    /// - New values received dynamically, without application changes.
10495    ///
10496    /// Please consult the [Working with enums] section in the user guide for some
10497    /// guidelines.
10498    ///
10499    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10500    #[derive(Clone, Debug, PartialEq)]
10501    #[non_exhaustive]
10502    pub enum State {
10503        /// The default value. This value should never be used.
10504        Unspecified,
10505        /// Node is operational and can be used by the user.
10506        Active,
10507        /// Node is being provisioned.
10508        Creating,
10509        /// Node is in a failed state.
10510        Failed,
10511        /// Node is undergoing maintenance, e.g.: during private cloud upgrade.
10512        Upgrading,
10513        /// If set, the enum was initialized with an unknown value.
10514        ///
10515        /// Applications can examine the value using [State::value] or
10516        /// [State::name].
10517        UnknownValue(state::UnknownValue),
10518    }
10519
10520    #[doc(hidden)]
10521    pub mod state {
10522        #[allow(unused_imports)]
10523        use super::*;
10524        #[derive(Clone, Debug, PartialEq)]
10525        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10526    }
10527
10528    impl State {
10529        /// Gets the enum value.
10530        ///
10531        /// Returns `None` if the enum contains an unknown value deserialized from
10532        /// the string representation of enums.
10533        pub fn value(&self) -> std::option::Option<i32> {
10534            match self {
10535                Self::Unspecified => std::option::Option::Some(0),
10536                Self::Active => std::option::Option::Some(1),
10537                Self::Creating => std::option::Option::Some(2),
10538                Self::Failed => std::option::Option::Some(3),
10539                Self::Upgrading => std::option::Option::Some(4),
10540                Self::UnknownValue(u) => u.0.value(),
10541            }
10542        }
10543
10544        /// Gets the enum value as a string.
10545        ///
10546        /// Returns `None` if the enum contains an unknown value deserialized from
10547        /// the integer representation of enums.
10548        pub fn name(&self) -> std::option::Option<&str> {
10549            match self {
10550                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10551                Self::Active => std::option::Option::Some("ACTIVE"),
10552                Self::Creating => std::option::Option::Some("CREATING"),
10553                Self::Failed => std::option::Option::Some("FAILED"),
10554                Self::Upgrading => std::option::Option::Some("UPGRADING"),
10555                Self::UnknownValue(u) => u.0.name(),
10556            }
10557        }
10558    }
10559
10560    impl std::default::Default for State {
10561        fn default() -> Self {
10562            use std::convert::From;
10563            Self::from(0)
10564        }
10565    }
10566
10567    impl std::fmt::Display for State {
10568        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10569            wkt::internal::display_enum(f, self.name(), self.value())
10570        }
10571    }
10572
10573    impl std::convert::From<i32> for State {
10574        fn from(value: i32) -> Self {
10575            match value {
10576                0 => Self::Unspecified,
10577                1 => Self::Active,
10578                2 => Self::Creating,
10579                3 => Self::Failed,
10580                4 => Self::Upgrading,
10581                _ => Self::UnknownValue(state::UnknownValue(
10582                    wkt::internal::UnknownEnumValue::Integer(value),
10583                )),
10584            }
10585        }
10586    }
10587
10588    impl std::convert::From<&str> for State {
10589        fn from(value: &str) -> Self {
10590            use std::string::ToString;
10591            match value {
10592                "STATE_UNSPECIFIED" => Self::Unspecified,
10593                "ACTIVE" => Self::Active,
10594                "CREATING" => Self::Creating,
10595                "FAILED" => Self::Failed,
10596                "UPGRADING" => Self::Upgrading,
10597                _ => Self::UnknownValue(state::UnknownValue(
10598                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10599                )),
10600            }
10601        }
10602    }
10603
10604    impl serde::ser::Serialize for State {
10605        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10606        where
10607            S: serde::Serializer,
10608        {
10609            match self {
10610                Self::Unspecified => serializer.serialize_i32(0),
10611                Self::Active => serializer.serialize_i32(1),
10612                Self::Creating => serializer.serialize_i32(2),
10613                Self::Failed => serializer.serialize_i32(3),
10614                Self::Upgrading => serializer.serialize_i32(4),
10615                Self::UnknownValue(u) => u.0.serialize(serializer),
10616            }
10617        }
10618    }
10619
10620    impl<'de> serde::de::Deserialize<'de> for State {
10621        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10622        where
10623            D: serde::Deserializer<'de>,
10624        {
10625            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10626                ".google.cloud.vmwareengine.v1.Node.State",
10627            ))
10628        }
10629    }
10630}
10631
10632/// Represents an allocated external IP address and its corresponding internal IP
10633/// address in a private cloud.
10634#[derive(Clone, Default, PartialEq)]
10635#[non_exhaustive]
10636pub struct ExternalAddress {
10637    /// Output only. The resource name of this external IP address.
10638    /// Resource names are schemeless URIs that follow the conventions in
10639    /// <https://cloud.google.com/apis/design/resource_names>.
10640    /// For example:
10641    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`
10642    pub name: std::string::String,
10643
10644    /// Output only. Creation time of this resource.
10645    pub create_time: std::option::Option<wkt::Timestamp>,
10646
10647    /// Output only. Last update time of this resource.
10648    pub update_time: std::option::Option<wkt::Timestamp>,
10649
10650    /// The internal IP address of a workload VM.
10651    pub internal_ip: std::string::String,
10652
10653    /// Output only. The external IP address of a workload VM.
10654    pub external_ip: std::string::String,
10655
10656    /// Output only. The state of the resource.
10657    pub state: crate::model::external_address::State,
10658
10659    /// Output only. System-generated unique identifier for the resource.
10660    pub uid: std::string::String,
10661
10662    /// User-provided description for this resource.
10663    pub description: std::string::String,
10664
10665    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10666}
10667
10668impl ExternalAddress {
10669    /// Creates a new default instance.
10670    pub fn new() -> Self {
10671        std::default::Default::default()
10672    }
10673
10674    /// Sets the value of [name][crate::model::ExternalAddress::name].
10675    ///
10676    /// # Example
10677    /// ```ignore,no_run
10678    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10679    /// let x = ExternalAddress::new().set_name("example");
10680    /// ```
10681    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10682        self.name = v.into();
10683        self
10684    }
10685
10686    /// Sets the value of [create_time][crate::model::ExternalAddress::create_time].
10687    ///
10688    /// # Example
10689    /// ```ignore,no_run
10690    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10691    /// use wkt::Timestamp;
10692    /// let x = ExternalAddress::new().set_create_time(Timestamp::default()/* use setters */);
10693    /// ```
10694    pub fn set_create_time<T>(mut self, v: T) -> Self
10695    where
10696        T: std::convert::Into<wkt::Timestamp>,
10697    {
10698        self.create_time = std::option::Option::Some(v.into());
10699        self
10700    }
10701
10702    /// Sets or clears the value of [create_time][crate::model::ExternalAddress::create_time].
10703    ///
10704    /// # Example
10705    /// ```ignore,no_run
10706    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10707    /// use wkt::Timestamp;
10708    /// let x = ExternalAddress::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
10709    /// let x = ExternalAddress::new().set_or_clear_create_time(None::<Timestamp>);
10710    /// ```
10711    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10712    where
10713        T: std::convert::Into<wkt::Timestamp>,
10714    {
10715        self.create_time = v.map(|x| x.into());
10716        self
10717    }
10718
10719    /// Sets the value of [update_time][crate::model::ExternalAddress::update_time].
10720    ///
10721    /// # Example
10722    /// ```ignore,no_run
10723    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10724    /// use wkt::Timestamp;
10725    /// let x = ExternalAddress::new().set_update_time(Timestamp::default()/* use setters */);
10726    /// ```
10727    pub fn set_update_time<T>(mut self, v: T) -> Self
10728    where
10729        T: std::convert::Into<wkt::Timestamp>,
10730    {
10731        self.update_time = std::option::Option::Some(v.into());
10732        self
10733    }
10734
10735    /// Sets or clears the value of [update_time][crate::model::ExternalAddress::update_time].
10736    ///
10737    /// # Example
10738    /// ```ignore,no_run
10739    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10740    /// use wkt::Timestamp;
10741    /// let x = ExternalAddress::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
10742    /// let x = ExternalAddress::new().set_or_clear_update_time(None::<Timestamp>);
10743    /// ```
10744    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
10745    where
10746        T: std::convert::Into<wkt::Timestamp>,
10747    {
10748        self.update_time = v.map(|x| x.into());
10749        self
10750    }
10751
10752    /// Sets the value of [internal_ip][crate::model::ExternalAddress::internal_ip].
10753    ///
10754    /// # Example
10755    /// ```ignore,no_run
10756    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10757    /// let x = ExternalAddress::new().set_internal_ip("example");
10758    /// ```
10759    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10760        self.internal_ip = v.into();
10761        self
10762    }
10763
10764    /// Sets the value of [external_ip][crate::model::ExternalAddress::external_ip].
10765    ///
10766    /// # Example
10767    /// ```ignore,no_run
10768    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10769    /// let x = ExternalAddress::new().set_external_ip("example");
10770    /// ```
10771    pub fn set_external_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10772        self.external_ip = v.into();
10773        self
10774    }
10775
10776    /// Sets the value of [state][crate::model::ExternalAddress::state].
10777    ///
10778    /// # Example
10779    /// ```ignore,no_run
10780    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10781    /// use google_cloud_vmwareengine_v1::model::external_address::State;
10782    /// let x0 = ExternalAddress::new().set_state(State::Active);
10783    /// let x1 = ExternalAddress::new().set_state(State::Creating);
10784    /// let x2 = ExternalAddress::new().set_state(State::Updating);
10785    /// ```
10786    pub fn set_state<T: std::convert::Into<crate::model::external_address::State>>(
10787        mut self,
10788        v: T,
10789    ) -> Self {
10790        self.state = v.into();
10791        self
10792    }
10793
10794    /// Sets the value of [uid][crate::model::ExternalAddress::uid].
10795    ///
10796    /// # Example
10797    /// ```ignore,no_run
10798    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10799    /// let x = ExternalAddress::new().set_uid("example");
10800    /// ```
10801    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10802        self.uid = v.into();
10803        self
10804    }
10805
10806    /// Sets the value of [description][crate::model::ExternalAddress::description].
10807    ///
10808    /// # Example
10809    /// ```ignore,no_run
10810    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10811    /// let x = ExternalAddress::new().set_description("example");
10812    /// ```
10813    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10814        self.description = v.into();
10815        self
10816    }
10817}
10818
10819impl wkt::message::Message for ExternalAddress {
10820    fn typename() -> &'static str {
10821        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAddress"
10822    }
10823}
10824
10825/// Defines additional types related to [ExternalAddress].
10826pub mod external_address {
10827    #[allow(unused_imports)]
10828    use super::*;
10829
10830    /// Enum State defines possible states of external addresses.
10831    ///
10832    /// # Working with unknown values
10833    ///
10834    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10835    /// additional enum variants at any time. Adding new variants is not considered
10836    /// a breaking change. Applications should write their code in anticipation of:
10837    ///
10838    /// - New values appearing in future releases of the client library, **and**
10839    /// - New values received dynamically, without application changes.
10840    ///
10841    /// Please consult the [Working with enums] section in the user guide for some
10842    /// guidelines.
10843    ///
10844    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10845    #[derive(Clone, Debug, PartialEq)]
10846    #[non_exhaustive]
10847    pub enum State {
10848        /// The default value. This value should never be used.
10849        Unspecified,
10850        /// The address is ready.
10851        Active,
10852        /// The address is being created.
10853        Creating,
10854        /// The address is being updated.
10855        Updating,
10856        /// The address is being deleted.
10857        Deleting,
10858        /// If set, the enum was initialized with an unknown value.
10859        ///
10860        /// Applications can examine the value using [State::value] or
10861        /// [State::name].
10862        UnknownValue(state::UnknownValue),
10863    }
10864
10865    #[doc(hidden)]
10866    pub mod state {
10867        #[allow(unused_imports)]
10868        use super::*;
10869        #[derive(Clone, Debug, PartialEq)]
10870        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10871    }
10872
10873    impl State {
10874        /// Gets the enum value.
10875        ///
10876        /// Returns `None` if the enum contains an unknown value deserialized from
10877        /// the string representation of enums.
10878        pub fn value(&self) -> std::option::Option<i32> {
10879            match self {
10880                Self::Unspecified => std::option::Option::Some(0),
10881                Self::Active => std::option::Option::Some(1),
10882                Self::Creating => std::option::Option::Some(2),
10883                Self::Updating => std::option::Option::Some(3),
10884                Self::Deleting => std::option::Option::Some(4),
10885                Self::UnknownValue(u) => u.0.value(),
10886            }
10887        }
10888
10889        /// Gets the enum value as a string.
10890        ///
10891        /// Returns `None` if the enum contains an unknown value deserialized from
10892        /// the integer representation of enums.
10893        pub fn name(&self) -> std::option::Option<&str> {
10894            match self {
10895                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10896                Self::Active => std::option::Option::Some("ACTIVE"),
10897                Self::Creating => std::option::Option::Some("CREATING"),
10898                Self::Updating => std::option::Option::Some("UPDATING"),
10899                Self::Deleting => std::option::Option::Some("DELETING"),
10900                Self::UnknownValue(u) => u.0.name(),
10901            }
10902        }
10903    }
10904
10905    impl std::default::Default for State {
10906        fn default() -> Self {
10907            use std::convert::From;
10908            Self::from(0)
10909        }
10910    }
10911
10912    impl std::fmt::Display for State {
10913        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10914            wkt::internal::display_enum(f, self.name(), self.value())
10915        }
10916    }
10917
10918    impl std::convert::From<i32> for State {
10919        fn from(value: i32) -> Self {
10920            match value {
10921                0 => Self::Unspecified,
10922                1 => Self::Active,
10923                2 => Self::Creating,
10924                3 => Self::Updating,
10925                4 => Self::Deleting,
10926                _ => Self::UnknownValue(state::UnknownValue(
10927                    wkt::internal::UnknownEnumValue::Integer(value),
10928                )),
10929            }
10930        }
10931    }
10932
10933    impl std::convert::From<&str> for State {
10934        fn from(value: &str) -> Self {
10935            use std::string::ToString;
10936            match value {
10937                "STATE_UNSPECIFIED" => Self::Unspecified,
10938                "ACTIVE" => Self::Active,
10939                "CREATING" => Self::Creating,
10940                "UPDATING" => Self::Updating,
10941                "DELETING" => Self::Deleting,
10942                _ => Self::UnknownValue(state::UnknownValue(
10943                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10944                )),
10945            }
10946        }
10947    }
10948
10949    impl serde::ser::Serialize for State {
10950        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10951        where
10952            S: serde::Serializer,
10953        {
10954            match self {
10955                Self::Unspecified => serializer.serialize_i32(0),
10956                Self::Active => serializer.serialize_i32(1),
10957                Self::Creating => serializer.serialize_i32(2),
10958                Self::Updating => serializer.serialize_i32(3),
10959                Self::Deleting => serializer.serialize_i32(4),
10960                Self::UnknownValue(u) => u.0.serialize(serializer),
10961            }
10962        }
10963    }
10964
10965    impl<'de> serde::de::Deserialize<'de> for State {
10966        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10967        where
10968            D: serde::Deserializer<'de>,
10969        {
10970            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10971                ".google.cloud.vmwareengine.v1.ExternalAddress.State",
10972            ))
10973        }
10974    }
10975}
10976
10977/// Subnet in a private cloud. Either `management` subnets (such as vMotion) that
10978/// are read-only, or `userDefined`, which can also be updated.
10979#[derive(Clone, Default, PartialEq)]
10980#[non_exhaustive]
10981pub struct Subnet {
10982    /// Output only. The resource name of this subnet.
10983    /// Resource names are schemeless URIs that follow the conventions in
10984    /// <https://cloud.google.com/apis/design/resource_names>.
10985    /// For example:
10986    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
10987    pub name: std::string::String,
10988
10989    /// The IP address range of the subnet in CIDR format '10.0.0.0/24'.
10990    pub ip_cidr_range: std::string::String,
10991
10992    /// The IP address of the gateway of this subnet.
10993    /// Must fall within the IP prefix defined above.
10994    pub gateway_ip: std::string::String,
10995
10996    /// Output only. The type of the subnet. For example "management" or
10997    /// "userDefined".
10998    pub r#type: std::string::String,
10999
11000    /// Output only. The state of the resource.
11001    pub state: crate::model::subnet::State,
11002
11003    /// Output only. VLAN ID of the VLAN on which the subnet is configured
11004    pub vlan_id: i32,
11005
11006    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11007}
11008
11009impl Subnet {
11010    /// Creates a new default instance.
11011    pub fn new() -> Self {
11012        std::default::Default::default()
11013    }
11014
11015    /// Sets the value of [name][crate::model::Subnet::name].
11016    ///
11017    /// # Example
11018    /// ```ignore,no_run
11019    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11020    /// let x = Subnet::new().set_name("example");
11021    /// ```
11022    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11023        self.name = v.into();
11024        self
11025    }
11026
11027    /// Sets the value of [ip_cidr_range][crate::model::Subnet::ip_cidr_range].
11028    ///
11029    /// # Example
11030    /// ```ignore,no_run
11031    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11032    /// let x = Subnet::new().set_ip_cidr_range("example");
11033    /// ```
11034    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11035        self.ip_cidr_range = v.into();
11036        self
11037    }
11038
11039    /// Sets the value of [gateway_ip][crate::model::Subnet::gateway_ip].
11040    ///
11041    /// # Example
11042    /// ```ignore,no_run
11043    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11044    /// let x = Subnet::new().set_gateway_ip("example");
11045    /// ```
11046    pub fn set_gateway_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11047        self.gateway_ip = v.into();
11048        self
11049    }
11050
11051    /// Sets the value of [r#type][crate::model::Subnet::type].
11052    ///
11053    /// # Example
11054    /// ```ignore,no_run
11055    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11056    /// let x = Subnet::new().set_type("example");
11057    /// ```
11058    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11059        self.r#type = v.into();
11060        self
11061    }
11062
11063    /// Sets the value of [state][crate::model::Subnet::state].
11064    ///
11065    /// # Example
11066    /// ```ignore,no_run
11067    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11068    /// use google_cloud_vmwareengine_v1::model::subnet::State;
11069    /// let x0 = Subnet::new().set_state(State::Active);
11070    /// let x1 = Subnet::new().set_state(State::Creating);
11071    /// let x2 = Subnet::new().set_state(State::Updating);
11072    /// ```
11073    pub fn set_state<T: std::convert::Into<crate::model::subnet::State>>(mut self, v: T) -> Self {
11074        self.state = v.into();
11075        self
11076    }
11077
11078    /// Sets the value of [vlan_id][crate::model::Subnet::vlan_id].
11079    ///
11080    /// # Example
11081    /// ```ignore,no_run
11082    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11083    /// let x = Subnet::new().set_vlan_id(42);
11084    /// ```
11085    pub fn set_vlan_id<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11086        self.vlan_id = v.into();
11087        self
11088    }
11089}
11090
11091impl wkt::message::Message for Subnet {
11092    fn typename() -> &'static str {
11093        "type.googleapis.com/google.cloud.vmwareengine.v1.Subnet"
11094    }
11095}
11096
11097/// Defines additional types related to [Subnet].
11098pub mod subnet {
11099    #[allow(unused_imports)]
11100    use super::*;
11101
11102    /// Defines possible states of subnets.
11103    ///
11104    /// # Working with unknown values
11105    ///
11106    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11107    /// additional enum variants at any time. Adding new variants is not considered
11108    /// a breaking change. Applications should write their code in anticipation of:
11109    ///
11110    /// - New values appearing in future releases of the client library, **and**
11111    /// - New values received dynamically, without application changes.
11112    ///
11113    /// Please consult the [Working with enums] section in the user guide for some
11114    /// guidelines.
11115    ///
11116    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11117    #[derive(Clone, Debug, PartialEq)]
11118    #[non_exhaustive]
11119    pub enum State {
11120        /// The default value. This value should never be used.
11121        Unspecified,
11122        /// The subnet is ready.
11123        Active,
11124        /// The subnet is being created.
11125        Creating,
11126        /// The subnet is being updated.
11127        Updating,
11128        /// The subnet is being deleted.
11129        Deleting,
11130        /// Changes requested in the last operation are being propagated.
11131        Reconciling,
11132        /// Last operation on the subnet did not succeed. Subnet's payload is
11133        /// reverted back to its most recent working state.
11134        Failed,
11135        /// If set, the enum was initialized with an unknown value.
11136        ///
11137        /// Applications can examine the value using [State::value] or
11138        /// [State::name].
11139        UnknownValue(state::UnknownValue),
11140    }
11141
11142    #[doc(hidden)]
11143    pub mod state {
11144        #[allow(unused_imports)]
11145        use super::*;
11146        #[derive(Clone, Debug, PartialEq)]
11147        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11148    }
11149
11150    impl State {
11151        /// Gets the enum value.
11152        ///
11153        /// Returns `None` if the enum contains an unknown value deserialized from
11154        /// the string representation of enums.
11155        pub fn value(&self) -> std::option::Option<i32> {
11156            match self {
11157                Self::Unspecified => std::option::Option::Some(0),
11158                Self::Active => std::option::Option::Some(1),
11159                Self::Creating => std::option::Option::Some(2),
11160                Self::Updating => std::option::Option::Some(3),
11161                Self::Deleting => std::option::Option::Some(4),
11162                Self::Reconciling => std::option::Option::Some(5),
11163                Self::Failed => std::option::Option::Some(6),
11164                Self::UnknownValue(u) => u.0.value(),
11165            }
11166        }
11167
11168        /// Gets the enum value as a string.
11169        ///
11170        /// Returns `None` if the enum contains an unknown value deserialized from
11171        /// the integer representation of enums.
11172        pub fn name(&self) -> std::option::Option<&str> {
11173            match self {
11174                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11175                Self::Active => std::option::Option::Some("ACTIVE"),
11176                Self::Creating => std::option::Option::Some("CREATING"),
11177                Self::Updating => std::option::Option::Some("UPDATING"),
11178                Self::Deleting => std::option::Option::Some("DELETING"),
11179                Self::Reconciling => std::option::Option::Some("RECONCILING"),
11180                Self::Failed => std::option::Option::Some("FAILED"),
11181                Self::UnknownValue(u) => u.0.name(),
11182            }
11183        }
11184    }
11185
11186    impl std::default::Default for State {
11187        fn default() -> Self {
11188            use std::convert::From;
11189            Self::from(0)
11190        }
11191    }
11192
11193    impl std::fmt::Display for State {
11194        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11195            wkt::internal::display_enum(f, self.name(), self.value())
11196        }
11197    }
11198
11199    impl std::convert::From<i32> for State {
11200        fn from(value: i32) -> Self {
11201            match value {
11202                0 => Self::Unspecified,
11203                1 => Self::Active,
11204                2 => Self::Creating,
11205                3 => Self::Updating,
11206                4 => Self::Deleting,
11207                5 => Self::Reconciling,
11208                6 => Self::Failed,
11209                _ => Self::UnknownValue(state::UnknownValue(
11210                    wkt::internal::UnknownEnumValue::Integer(value),
11211                )),
11212            }
11213        }
11214    }
11215
11216    impl std::convert::From<&str> for State {
11217        fn from(value: &str) -> Self {
11218            use std::string::ToString;
11219            match value {
11220                "STATE_UNSPECIFIED" => Self::Unspecified,
11221                "ACTIVE" => Self::Active,
11222                "CREATING" => Self::Creating,
11223                "UPDATING" => Self::Updating,
11224                "DELETING" => Self::Deleting,
11225                "RECONCILING" => Self::Reconciling,
11226                "FAILED" => Self::Failed,
11227                _ => Self::UnknownValue(state::UnknownValue(
11228                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11229                )),
11230            }
11231        }
11232    }
11233
11234    impl serde::ser::Serialize for State {
11235        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11236        where
11237            S: serde::Serializer,
11238        {
11239            match self {
11240                Self::Unspecified => serializer.serialize_i32(0),
11241                Self::Active => serializer.serialize_i32(1),
11242                Self::Creating => serializer.serialize_i32(2),
11243                Self::Updating => serializer.serialize_i32(3),
11244                Self::Deleting => serializer.serialize_i32(4),
11245                Self::Reconciling => serializer.serialize_i32(5),
11246                Self::Failed => serializer.serialize_i32(6),
11247                Self::UnknownValue(u) => u.0.serialize(serializer),
11248            }
11249        }
11250    }
11251
11252    impl<'de> serde::de::Deserialize<'de> for State {
11253        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11254        where
11255            D: serde::Deserializer<'de>,
11256        {
11257            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11258                ".google.cloud.vmwareengine.v1.Subnet.State",
11259            ))
11260        }
11261    }
11262}
11263
11264/// External access firewall rules for filtering incoming traffic destined to
11265/// `ExternalAddress` resources.
11266#[derive(Clone, Default, PartialEq)]
11267#[non_exhaustive]
11268pub struct ExternalAccessRule {
11269    /// Output only. The resource name of this external access rule.
11270    /// Resource names are schemeless URIs that follow the conventions in
11271    /// <https://cloud.google.com/apis/design/resource_names>.
11272    /// For example:
11273    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
11274    pub name: std::string::String,
11275
11276    /// Output only. Creation time of this resource.
11277    pub create_time: std::option::Option<wkt::Timestamp>,
11278
11279    /// Output only. Last update time of this resource.
11280    pub update_time: std::option::Option<wkt::Timestamp>,
11281
11282    /// User-provided description for this external access rule.
11283    pub description: std::string::String,
11284
11285    /// External access rule priority, which determines the external access rule to
11286    /// use when multiple rules apply. If multiple rules have the same priority,
11287    /// their ordering is non-deterministic. If specific ordering is required,
11288    /// assign unique priorities to enforce such ordering. The external access rule
11289    /// priority is an integer from 100 to 4096, both inclusive. Lower integers
11290    /// indicate higher precedence. For example, a rule with priority `100` has
11291    /// higher precedence than a rule with priority `101`.
11292    pub priority: i32,
11293
11294    /// The action that the external access rule performs.
11295    pub action: crate::model::external_access_rule::Action,
11296
11297    /// The IP protocol to which the external access rule applies. This value can
11298    /// be one of the following three protocol strings (not case-sensitive):
11299    /// `tcp`, `udp`, or `icmp`.
11300    pub ip_protocol: std::string::String,
11301
11302    /// If source ranges are specified, the external access rule applies only to
11303    /// traffic that has a source IP address in these ranges. These ranges can
11304    /// either be expressed in the CIDR format or as an IP address. As only inbound
11305    /// rules are supported, `ExternalAddress` resources cannot be the source IP
11306    /// addresses of an external access rule. To match all source addresses,
11307    /// specify `0.0.0.0/0`.
11308    pub source_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
11309
11310    /// A list of source ports to which the external access rule applies. This
11311    /// field is only applicable for the UDP or TCP protocol.
11312    /// Each entry must be either an integer or a range. For example: `["22"]`,
11313    /// `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify
11314    /// `["0-65535"]`.
11315    pub source_ports: std::vec::Vec<std::string::String>,
11316
11317    /// If destination ranges are specified, the external access rule applies only
11318    /// to the traffic that has a destination IP address in these ranges. The
11319    /// specified IP addresses must have reserved external IP addresses in the
11320    /// scope of the parent network policy. To match all external IP addresses in
11321    /// the scope of the parent network policy, specify `0.0.0.0/0`. To match a
11322    /// specific external IP address, specify it using the
11323    /// `IpRange.external_address` property.
11324    pub destination_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
11325
11326    /// A list of destination ports to which the external access rule applies. This
11327    /// field is only applicable for the UDP or TCP protocol.
11328    /// Each entry must be either an integer or a range. For example: `["22"]`,
11329    /// `["80","443"]`, or `["12345-12349"]`. To match all destination ports,
11330    /// specify `["0-65535"]`.
11331    pub destination_ports: std::vec::Vec<std::string::String>,
11332
11333    /// Output only. The state of the resource.
11334    pub state: crate::model::external_access_rule::State,
11335
11336    /// Output only. System-generated unique identifier for the resource.
11337    pub uid: std::string::String,
11338
11339    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11340}
11341
11342impl ExternalAccessRule {
11343    /// Creates a new default instance.
11344    pub fn new() -> Self {
11345        std::default::Default::default()
11346    }
11347
11348    /// Sets the value of [name][crate::model::ExternalAccessRule::name].
11349    ///
11350    /// # Example
11351    /// ```ignore,no_run
11352    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11353    /// let x = ExternalAccessRule::new().set_name("example");
11354    /// ```
11355    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11356        self.name = v.into();
11357        self
11358    }
11359
11360    /// Sets the value of [create_time][crate::model::ExternalAccessRule::create_time].
11361    ///
11362    /// # Example
11363    /// ```ignore,no_run
11364    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11365    /// use wkt::Timestamp;
11366    /// let x = ExternalAccessRule::new().set_create_time(Timestamp::default()/* use setters */);
11367    /// ```
11368    pub fn set_create_time<T>(mut self, v: T) -> Self
11369    where
11370        T: std::convert::Into<wkt::Timestamp>,
11371    {
11372        self.create_time = std::option::Option::Some(v.into());
11373        self
11374    }
11375
11376    /// Sets or clears the value of [create_time][crate::model::ExternalAccessRule::create_time].
11377    ///
11378    /// # Example
11379    /// ```ignore,no_run
11380    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11381    /// use wkt::Timestamp;
11382    /// let x = ExternalAccessRule::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
11383    /// let x = ExternalAccessRule::new().set_or_clear_create_time(None::<Timestamp>);
11384    /// ```
11385    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11386    where
11387        T: std::convert::Into<wkt::Timestamp>,
11388    {
11389        self.create_time = v.map(|x| x.into());
11390        self
11391    }
11392
11393    /// Sets the value of [update_time][crate::model::ExternalAccessRule::update_time].
11394    ///
11395    /// # Example
11396    /// ```ignore,no_run
11397    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11398    /// use wkt::Timestamp;
11399    /// let x = ExternalAccessRule::new().set_update_time(Timestamp::default()/* use setters */);
11400    /// ```
11401    pub fn set_update_time<T>(mut self, v: T) -> Self
11402    where
11403        T: std::convert::Into<wkt::Timestamp>,
11404    {
11405        self.update_time = std::option::Option::Some(v.into());
11406        self
11407    }
11408
11409    /// Sets or clears the value of [update_time][crate::model::ExternalAccessRule::update_time].
11410    ///
11411    /// # Example
11412    /// ```ignore,no_run
11413    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11414    /// use wkt::Timestamp;
11415    /// let x = ExternalAccessRule::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11416    /// let x = ExternalAccessRule::new().set_or_clear_update_time(None::<Timestamp>);
11417    /// ```
11418    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11419    where
11420        T: std::convert::Into<wkt::Timestamp>,
11421    {
11422        self.update_time = v.map(|x| x.into());
11423        self
11424    }
11425
11426    /// Sets the value of [description][crate::model::ExternalAccessRule::description].
11427    ///
11428    /// # Example
11429    /// ```ignore,no_run
11430    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11431    /// let x = ExternalAccessRule::new().set_description("example");
11432    /// ```
11433    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11434        self.description = v.into();
11435        self
11436    }
11437
11438    /// Sets the value of [priority][crate::model::ExternalAccessRule::priority].
11439    ///
11440    /// # Example
11441    /// ```ignore,no_run
11442    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11443    /// let x = ExternalAccessRule::new().set_priority(42);
11444    /// ```
11445    pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11446        self.priority = v.into();
11447        self
11448    }
11449
11450    /// Sets the value of [action][crate::model::ExternalAccessRule::action].
11451    ///
11452    /// # Example
11453    /// ```ignore,no_run
11454    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11455    /// use google_cloud_vmwareengine_v1::model::external_access_rule::Action;
11456    /// let x0 = ExternalAccessRule::new().set_action(Action::Allow);
11457    /// let x1 = ExternalAccessRule::new().set_action(Action::Deny);
11458    /// ```
11459    pub fn set_action<T: std::convert::Into<crate::model::external_access_rule::Action>>(
11460        mut self,
11461        v: T,
11462    ) -> Self {
11463        self.action = v.into();
11464        self
11465    }
11466
11467    /// Sets the value of [ip_protocol][crate::model::ExternalAccessRule::ip_protocol].
11468    ///
11469    /// # Example
11470    /// ```ignore,no_run
11471    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11472    /// let x = ExternalAccessRule::new().set_ip_protocol("example");
11473    /// ```
11474    pub fn set_ip_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11475        self.ip_protocol = v.into();
11476        self
11477    }
11478
11479    /// Sets the value of [source_ip_ranges][crate::model::ExternalAccessRule::source_ip_ranges].
11480    ///
11481    /// # Example
11482    /// ```ignore,no_run
11483    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11484    /// use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11485    /// let x = ExternalAccessRule::new()
11486    ///     .set_source_ip_ranges([
11487    ///         IpRange::default()/* use setters */,
11488    ///         IpRange::default()/* use (different) setters */,
11489    ///     ]);
11490    /// ```
11491    pub fn set_source_ip_ranges<T, V>(mut self, v: T) -> Self
11492    where
11493        T: std::iter::IntoIterator<Item = V>,
11494        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
11495    {
11496        use std::iter::Iterator;
11497        self.source_ip_ranges = v.into_iter().map(|i| i.into()).collect();
11498        self
11499    }
11500
11501    /// Sets the value of [source_ports][crate::model::ExternalAccessRule::source_ports].
11502    ///
11503    /// # Example
11504    /// ```ignore,no_run
11505    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11506    /// let x = ExternalAccessRule::new().set_source_ports(["a", "b", "c"]);
11507    /// ```
11508    pub fn set_source_ports<T, V>(mut self, v: T) -> Self
11509    where
11510        T: std::iter::IntoIterator<Item = V>,
11511        V: std::convert::Into<std::string::String>,
11512    {
11513        use std::iter::Iterator;
11514        self.source_ports = v.into_iter().map(|i| i.into()).collect();
11515        self
11516    }
11517
11518    /// Sets the value of [destination_ip_ranges][crate::model::ExternalAccessRule::destination_ip_ranges].
11519    ///
11520    /// # Example
11521    /// ```ignore,no_run
11522    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11523    /// use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11524    /// let x = ExternalAccessRule::new()
11525    ///     .set_destination_ip_ranges([
11526    ///         IpRange::default()/* use setters */,
11527    ///         IpRange::default()/* use (different) setters */,
11528    ///     ]);
11529    /// ```
11530    pub fn set_destination_ip_ranges<T, V>(mut self, v: T) -> Self
11531    where
11532        T: std::iter::IntoIterator<Item = V>,
11533        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
11534    {
11535        use std::iter::Iterator;
11536        self.destination_ip_ranges = v.into_iter().map(|i| i.into()).collect();
11537        self
11538    }
11539
11540    /// Sets the value of [destination_ports][crate::model::ExternalAccessRule::destination_ports].
11541    ///
11542    /// # Example
11543    /// ```ignore,no_run
11544    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11545    /// let x = ExternalAccessRule::new().set_destination_ports(["a", "b", "c"]);
11546    /// ```
11547    pub fn set_destination_ports<T, V>(mut self, v: T) -> Self
11548    where
11549        T: std::iter::IntoIterator<Item = V>,
11550        V: std::convert::Into<std::string::String>,
11551    {
11552        use std::iter::Iterator;
11553        self.destination_ports = v.into_iter().map(|i| i.into()).collect();
11554        self
11555    }
11556
11557    /// Sets the value of [state][crate::model::ExternalAccessRule::state].
11558    ///
11559    /// # Example
11560    /// ```ignore,no_run
11561    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11562    /// use google_cloud_vmwareengine_v1::model::external_access_rule::State;
11563    /// let x0 = ExternalAccessRule::new().set_state(State::Active);
11564    /// let x1 = ExternalAccessRule::new().set_state(State::Creating);
11565    /// let x2 = ExternalAccessRule::new().set_state(State::Updating);
11566    /// ```
11567    pub fn set_state<T: std::convert::Into<crate::model::external_access_rule::State>>(
11568        mut self,
11569        v: T,
11570    ) -> Self {
11571        self.state = v.into();
11572        self
11573    }
11574
11575    /// Sets the value of [uid][crate::model::ExternalAccessRule::uid].
11576    ///
11577    /// # Example
11578    /// ```ignore,no_run
11579    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11580    /// let x = ExternalAccessRule::new().set_uid("example");
11581    /// ```
11582    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11583        self.uid = v.into();
11584        self
11585    }
11586}
11587
11588impl wkt::message::Message for ExternalAccessRule {
11589    fn typename() -> &'static str {
11590        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule"
11591    }
11592}
11593
11594/// Defines additional types related to [ExternalAccessRule].
11595pub mod external_access_rule {
11596    #[allow(unused_imports)]
11597    use super::*;
11598
11599    /// An IP range provided in any one of the supported formats.
11600    #[derive(Clone, Default, PartialEq)]
11601    #[non_exhaustive]
11602    pub struct IpRange {
11603        #[allow(missing_docs)]
11604        pub ip_range: std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
11605
11606        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11607    }
11608
11609    impl IpRange {
11610        /// Creates a new default instance.
11611        pub fn new() -> Self {
11612            std::default::Default::default()
11613        }
11614
11615        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range].
11616        ///
11617        /// Note that all the setters affecting `ip_range` are mutually
11618        /// exclusive.
11619        ///
11620        /// # Example
11621        /// ```ignore,no_run
11622        /// # use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11623        /// use google_cloud_vmwareengine_v1::model::external_access_rule::ip_range::IpRange as IpRangeOneOf;
11624        /// let x = IpRange::new().set_ip_range(Some(IpRangeOneOf::IpAddress("example".to_string())));
11625        /// ```
11626        pub fn set_ip_range<
11627            T: std::convert::Into<
11628                    std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
11629                >,
11630        >(
11631            mut self,
11632            v: T,
11633        ) -> Self {
11634            self.ip_range = v.into();
11635            self
11636        }
11637
11638        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11639        /// if it holds a `IpAddress`, `None` if the field is not set or
11640        /// holds a different branch.
11641        pub fn ip_address(&self) -> std::option::Option<&std::string::String> {
11642            #[allow(unreachable_patterns)]
11643            self.ip_range.as_ref().and_then(|v| match v {
11644                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v) => {
11645                    std::option::Option::Some(v)
11646                }
11647                _ => std::option::Option::None,
11648            })
11649        }
11650
11651        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11652        /// to hold a `IpAddress`.
11653        ///
11654        /// Note that all the setters affecting `ip_range` are
11655        /// mutually exclusive.
11656        ///
11657        /// # Example
11658        /// ```ignore,no_run
11659        /// # use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11660        /// let x = IpRange::new().set_ip_address("example");
11661        /// assert!(x.ip_address().is_some());
11662        /// assert!(x.ip_address_range().is_none());
11663        /// assert!(x.external_address().is_none());
11664        /// ```
11665        pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11666            self.ip_range = std::option::Option::Some(
11667                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v.into()),
11668            );
11669            self
11670        }
11671
11672        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11673        /// if it holds a `IpAddressRange`, `None` if the field is not set or
11674        /// holds a different branch.
11675        pub fn ip_address_range(&self) -> std::option::Option<&std::string::String> {
11676            #[allow(unreachable_patterns)]
11677            self.ip_range.as_ref().and_then(|v| match v {
11678                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v) => {
11679                    std::option::Option::Some(v)
11680                }
11681                _ => std::option::Option::None,
11682            })
11683        }
11684
11685        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11686        /// to hold a `IpAddressRange`.
11687        ///
11688        /// Note that all the setters affecting `ip_range` are
11689        /// mutually exclusive.
11690        ///
11691        /// # Example
11692        /// ```ignore,no_run
11693        /// # use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11694        /// let x = IpRange::new().set_ip_address_range("example");
11695        /// assert!(x.ip_address_range().is_some());
11696        /// assert!(x.ip_address().is_none());
11697        /// assert!(x.external_address().is_none());
11698        /// ```
11699        pub fn set_ip_address_range<T: std::convert::Into<std::string::String>>(
11700            mut self,
11701            v: T,
11702        ) -> Self {
11703            self.ip_range = std::option::Option::Some(
11704                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v.into()),
11705            );
11706            self
11707        }
11708
11709        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11710        /// if it holds a `ExternalAddress`, `None` if the field is not set or
11711        /// holds a different branch.
11712        pub fn external_address(&self) -> std::option::Option<&std::string::String> {
11713            #[allow(unreachable_patterns)]
11714            self.ip_range.as_ref().and_then(|v| match v {
11715                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v) => {
11716                    std::option::Option::Some(v)
11717                }
11718                _ => std::option::Option::None,
11719            })
11720        }
11721
11722        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11723        /// to hold a `ExternalAddress`.
11724        ///
11725        /// Note that all the setters affecting `ip_range` are
11726        /// mutually exclusive.
11727        ///
11728        /// # Example
11729        /// ```ignore,no_run
11730        /// # use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11731        /// let x = IpRange::new().set_external_address("example");
11732        /// assert!(x.external_address().is_some());
11733        /// assert!(x.ip_address().is_none());
11734        /// assert!(x.ip_address_range().is_none());
11735        /// ```
11736        pub fn set_external_address<T: std::convert::Into<std::string::String>>(
11737            mut self,
11738            v: T,
11739        ) -> Self {
11740            self.ip_range = std::option::Option::Some(
11741                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v.into()),
11742            );
11743            self
11744        }
11745    }
11746
11747    impl wkt::message::Message for IpRange {
11748        fn typename() -> &'static str {
11749            "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange"
11750        }
11751    }
11752
11753    /// Defines additional types related to [IpRange].
11754    pub mod ip_range {
11755        #[allow(unused_imports)]
11756        use super::*;
11757
11758        #[allow(missing_docs)]
11759        #[derive(Clone, Debug, PartialEq)]
11760        #[non_exhaustive]
11761        pub enum IpRange {
11762            /// A single IP address. For example: `10.0.0.5`.
11763            IpAddress(std::string::String),
11764            /// An IP address range in the CIDR format. For example: `10.0.0.0/24`.
11765            IpAddressRange(std::string::String),
11766            /// The name of an `ExternalAddress` resource. The external address must
11767            /// have been reserved in the scope of this external access rule's parent
11768            /// network policy.  Provide the external address name in the form of
11769            /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`.
11770            /// For example:
11771            /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`.
11772            ExternalAddress(std::string::String),
11773        }
11774    }
11775
11776    /// Action determines whether the external access rule permits or blocks
11777    /// traffic, subject to the other components of the rule matching the traffic.
11778    ///
11779    /// # Working with unknown values
11780    ///
11781    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11782    /// additional enum variants at any time. Adding new variants is not considered
11783    /// a breaking change. Applications should write their code in anticipation of:
11784    ///
11785    /// - New values appearing in future releases of the client library, **and**
11786    /// - New values received dynamically, without application changes.
11787    ///
11788    /// Please consult the [Working with enums] section in the user guide for some
11789    /// guidelines.
11790    ///
11791    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11792    #[derive(Clone, Debug, PartialEq)]
11793    #[non_exhaustive]
11794    pub enum Action {
11795        /// Defaults to allow.
11796        Unspecified,
11797        /// Allows connections that match the other specified components.
11798        Allow,
11799        /// Blocks connections that match the other specified components.
11800        Deny,
11801        /// If set, the enum was initialized with an unknown value.
11802        ///
11803        /// Applications can examine the value using [Action::value] or
11804        /// [Action::name].
11805        UnknownValue(action::UnknownValue),
11806    }
11807
11808    #[doc(hidden)]
11809    pub mod action {
11810        #[allow(unused_imports)]
11811        use super::*;
11812        #[derive(Clone, Debug, PartialEq)]
11813        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11814    }
11815
11816    impl Action {
11817        /// Gets the enum value.
11818        ///
11819        /// Returns `None` if the enum contains an unknown value deserialized from
11820        /// the string representation of enums.
11821        pub fn value(&self) -> std::option::Option<i32> {
11822            match self {
11823                Self::Unspecified => std::option::Option::Some(0),
11824                Self::Allow => std::option::Option::Some(1),
11825                Self::Deny => std::option::Option::Some(2),
11826                Self::UnknownValue(u) => u.0.value(),
11827            }
11828        }
11829
11830        /// Gets the enum value as a string.
11831        ///
11832        /// Returns `None` if the enum contains an unknown value deserialized from
11833        /// the integer representation of enums.
11834        pub fn name(&self) -> std::option::Option<&str> {
11835            match self {
11836                Self::Unspecified => std::option::Option::Some("ACTION_UNSPECIFIED"),
11837                Self::Allow => std::option::Option::Some("ALLOW"),
11838                Self::Deny => std::option::Option::Some("DENY"),
11839                Self::UnknownValue(u) => u.0.name(),
11840            }
11841        }
11842    }
11843
11844    impl std::default::Default for Action {
11845        fn default() -> Self {
11846            use std::convert::From;
11847            Self::from(0)
11848        }
11849    }
11850
11851    impl std::fmt::Display for Action {
11852        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11853            wkt::internal::display_enum(f, self.name(), self.value())
11854        }
11855    }
11856
11857    impl std::convert::From<i32> for Action {
11858        fn from(value: i32) -> Self {
11859            match value {
11860                0 => Self::Unspecified,
11861                1 => Self::Allow,
11862                2 => Self::Deny,
11863                _ => Self::UnknownValue(action::UnknownValue(
11864                    wkt::internal::UnknownEnumValue::Integer(value),
11865                )),
11866            }
11867        }
11868    }
11869
11870    impl std::convert::From<&str> for Action {
11871        fn from(value: &str) -> Self {
11872            use std::string::ToString;
11873            match value {
11874                "ACTION_UNSPECIFIED" => Self::Unspecified,
11875                "ALLOW" => Self::Allow,
11876                "DENY" => Self::Deny,
11877                _ => Self::UnknownValue(action::UnknownValue(
11878                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11879                )),
11880            }
11881        }
11882    }
11883
11884    impl serde::ser::Serialize for Action {
11885        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11886        where
11887            S: serde::Serializer,
11888        {
11889            match self {
11890                Self::Unspecified => serializer.serialize_i32(0),
11891                Self::Allow => serializer.serialize_i32(1),
11892                Self::Deny => serializer.serialize_i32(2),
11893                Self::UnknownValue(u) => u.0.serialize(serializer),
11894            }
11895        }
11896    }
11897
11898    impl<'de> serde::de::Deserialize<'de> for Action {
11899        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11900        where
11901            D: serde::Deserializer<'de>,
11902        {
11903            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
11904                ".google.cloud.vmwareengine.v1.ExternalAccessRule.Action",
11905            ))
11906        }
11907    }
11908
11909    /// Defines possible states of external access firewall rules.
11910    ///
11911    /// # Working with unknown values
11912    ///
11913    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11914    /// additional enum variants at any time. Adding new variants is not considered
11915    /// a breaking change. Applications should write their code in anticipation of:
11916    ///
11917    /// - New values appearing in future releases of the client library, **and**
11918    /// - New values received dynamically, without application changes.
11919    ///
11920    /// Please consult the [Working with enums] section in the user guide for some
11921    /// guidelines.
11922    ///
11923    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11924    #[derive(Clone, Debug, PartialEq)]
11925    #[non_exhaustive]
11926    pub enum State {
11927        /// The default value. This value is used if the state is omitted.
11928        Unspecified,
11929        /// The rule is ready.
11930        Active,
11931        /// The rule is being created.
11932        Creating,
11933        /// The rule is being updated.
11934        Updating,
11935        /// The rule is being deleted.
11936        Deleting,
11937        /// If set, the enum was initialized with an unknown value.
11938        ///
11939        /// Applications can examine the value using [State::value] or
11940        /// [State::name].
11941        UnknownValue(state::UnknownValue),
11942    }
11943
11944    #[doc(hidden)]
11945    pub mod state {
11946        #[allow(unused_imports)]
11947        use super::*;
11948        #[derive(Clone, Debug, PartialEq)]
11949        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11950    }
11951
11952    impl State {
11953        /// Gets the enum value.
11954        ///
11955        /// Returns `None` if the enum contains an unknown value deserialized from
11956        /// the string representation of enums.
11957        pub fn value(&self) -> std::option::Option<i32> {
11958            match self {
11959                Self::Unspecified => std::option::Option::Some(0),
11960                Self::Active => std::option::Option::Some(1),
11961                Self::Creating => std::option::Option::Some(2),
11962                Self::Updating => std::option::Option::Some(3),
11963                Self::Deleting => std::option::Option::Some(4),
11964                Self::UnknownValue(u) => u.0.value(),
11965            }
11966        }
11967
11968        /// Gets the enum value as a string.
11969        ///
11970        /// Returns `None` if the enum contains an unknown value deserialized from
11971        /// the integer representation of enums.
11972        pub fn name(&self) -> std::option::Option<&str> {
11973            match self {
11974                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11975                Self::Active => std::option::Option::Some("ACTIVE"),
11976                Self::Creating => std::option::Option::Some("CREATING"),
11977                Self::Updating => std::option::Option::Some("UPDATING"),
11978                Self::Deleting => std::option::Option::Some("DELETING"),
11979                Self::UnknownValue(u) => u.0.name(),
11980            }
11981        }
11982    }
11983
11984    impl std::default::Default for State {
11985        fn default() -> Self {
11986            use std::convert::From;
11987            Self::from(0)
11988        }
11989    }
11990
11991    impl std::fmt::Display for State {
11992        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11993            wkt::internal::display_enum(f, self.name(), self.value())
11994        }
11995    }
11996
11997    impl std::convert::From<i32> for State {
11998        fn from(value: i32) -> Self {
11999            match value {
12000                0 => Self::Unspecified,
12001                1 => Self::Active,
12002                2 => Self::Creating,
12003                3 => Self::Updating,
12004                4 => Self::Deleting,
12005                _ => Self::UnknownValue(state::UnknownValue(
12006                    wkt::internal::UnknownEnumValue::Integer(value),
12007                )),
12008            }
12009        }
12010    }
12011
12012    impl std::convert::From<&str> for State {
12013        fn from(value: &str) -> Self {
12014            use std::string::ToString;
12015            match value {
12016                "STATE_UNSPECIFIED" => Self::Unspecified,
12017                "ACTIVE" => Self::Active,
12018                "CREATING" => Self::Creating,
12019                "UPDATING" => Self::Updating,
12020                "DELETING" => Self::Deleting,
12021                _ => Self::UnknownValue(state::UnknownValue(
12022                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12023                )),
12024            }
12025        }
12026    }
12027
12028    impl serde::ser::Serialize for State {
12029        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12030        where
12031            S: serde::Serializer,
12032        {
12033            match self {
12034                Self::Unspecified => serializer.serialize_i32(0),
12035                Self::Active => serializer.serialize_i32(1),
12036                Self::Creating => serializer.serialize_i32(2),
12037                Self::Updating => serializer.serialize_i32(3),
12038                Self::Deleting => serializer.serialize_i32(4),
12039                Self::UnknownValue(u) => u.0.serialize(serializer),
12040            }
12041        }
12042    }
12043
12044    impl<'de> serde::de::Deserialize<'de> for State {
12045        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12046        where
12047            D: serde::Deserializer<'de>,
12048        {
12049            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
12050                ".google.cloud.vmwareengine.v1.ExternalAccessRule.State",
12051            ))
12052        }
12053    }
12054}
12055
12056/// Logging server to receive vCenter or ESXi logs.
12057#[derive(Clone, Default, PartialEq)]
12058#[non_exhaustive]
12059pub struct LoggingServer {
12060    /// Output only. The resource name of this logging server.
12061    /// Resource names are schemeless URIs that follow the conventions in
12062    /// <https://cloud.google.com/apis/design/resource_names>.
12063    /// For example:
12064    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
12065    pub name: std::string::String,
12066
12067    /// Output only. Creation time of this resource.
12068    pub create_time: std::option::Option<wkt::Timestamp>,
12069
12070    /// Output only. Last update time of this resource.
12071    pub update_time: std::option::Option<wkt::Timestamp>,
12072
12073    /// Required. Fully-qualified domain name (FQDN) or IP Address of the logging
12074    /// server.
12075    pub hostname: std::string::String,
12076
12077    /// Required. Port number at which the logging server receives logs.
12078    pub port: i32,
12079
12080    /// Required. Protocol used by vCenter to send logs to a logging server.
12081    pub protocol: crate::model::logging_server::Protocol,
12082
12083    /// Required. The type of component that produces logs that will be forwarded
12084    /// to this logging server.
12085    pub source_type: crate::model::logging_server::SourceType,
12086
12087    /// Output only. System-generated unique identifier for the resource.
12088    pub uid: std::string::String,
12089
12090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12091}
12092
12093impl LoggingServer {
12094    /// Creates a new default instance.
12095    pub fn new() -> Self {
12096        std::default::Default::default()
12097    }
12098
12099    /// Sets the value of [name][crate::model::LoggingServer::name].
12100    ///
12101    /// # Example
12102    /// ```ignore,no_run
12103    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12104    /// let x = LoggingServer::new().set_name("example");
12105    /// ```
12106    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12107        self.name = v.into();
12108        self
12109    }
12110
12111    /// Sets the value of [create_time][crate::model::LoggingServer::create_time].
12112    ///
12113    /// # Example
12114    /// ```ignore,no_run
12115    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12116    /// use wkt::Timestamp;
12117    /// let x = LoggingServer::new().set_create_time(Timestamp::default()/* use setters */);
12118    /// ```
12119    pub fn set_create_time<T>(mut self, v: T) -> Self
12120    where
12121        T: std::convert::Into<wkt::Timestamp>,
12122    {
12123        self.create_time = std::option::Option::Some(v.into());
12124        self
12125    }
12126
12127    /// Sets or clears the value of [create_time][crate::model::LoggingServer::create_time].
12128    ///
12129    /// # Example
12130    /// ```ignore,no_run
12131    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12132    /// use wkt::Timestamp;
12133    /// let x = LoggingServer::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
12134    /// let x = LoggingServer::new().set_or_clear_create_time(None::<Timestamp>);
12135    /// ```
12136    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
12137    where
12138        T: std::convert::Into<wkt::Timestamp>,
12139    {
12140        self.create_time = v.map(|x| x.into());
12141        self
12142    }
12143
12144    /// Sets the value of [update_time][crate::model::LoggingServer::update_time].
12145    ///
12146    /// # Example
12147    /// ```ignore,no_run
12148    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12149    /// use wkt::Timestamp;
12150    /// let x = LoggingServer::new().set_update_time(Timestamp::default()/* use setters */);
12151    /// ```
12152    pub fn set_update_time<T>(mut self, v: T) -> Self
12153    where
12154        T: std::convert::Into<wkt::Timestamp>,
12155    {
12156        self.update_time = std::option::Option::Some(v.into());
12157        self
12158    }
12159
12160    /// Sets or clears the value of [update_time][crate::model::LoggingServer::update_time].
12161    ///
12162    /// # Example
12163    /// ```ignore,no_run
12164    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12165    /// use wkt::Timestamp;
12166    /// let x = LoggingServer::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
12167    /// let x = LoggingServer::new().set_or_clear_update_time(None::<Timestamp>);
12168    /// ```
12169    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
12170    where
12171        T: std::convert::Into<wkt::Timestamp>,
12172    {
12173        self.update_time = v.map(|x| x.into());
12174        self
12175    }
12176
12177    /// Sets the value of [hostname][crate::model::LoggingServer::hostname].
12178    ///
12179    /// # Example
12180    /// ```ignore,no_run
12181    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12182    /// let x = LoggingServer::new().set_hostname("example");
12183    /// ```
12184    pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12185        self.hostname = v.into();
12186        self
12187    }
12188
12189    /// Sets the value of [port][crate::model::LoggingServer::port].
12190    ///
12191    /// # Example
12192    /// ```ignore,no_run
12193    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12194    /// let x = LoggingServer::new().set_port(42);
12195    /// ```
12196    pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12197        self.port = v.into();
12198        self
12199    }
12200
12201    /// Sets the value of [protocol][crate::model::LoggingServer::protocol].
12202    ///
12203    /// # Example
12204    /// ```ignore,no_run
12205    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12206    /// use google_cloud_vmwareengine_v1::model::logging_server::Protocol;
12207    /// let x0 = LoggingServer::new().set_protocol(Protocol::Udp);
12208    /// let x1 = LoggingServer::new().set_protocol(Protocol::Tcp);
12209    /// let x2 = LoggingServer::new().set_protocol(Protocol::Tls);
12210    /// ```
12211    pub fn set_protocol<T: std::convert::Into<crate::model::logging_server::Protocol>>(
12212        mut self,
12213        v: T,
12214    ) -> Self {
12215        self.protocol = v.into();
12216        self
12217    }
12218
12219    /// Sets the value of [source_type][crate::model::LoggingServer::source_type].
12220    ///
12221    /// # Example
12222    /// ```ignore,no_run
12223    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12224    /// use google_cloud_vmwareengine_v1::model::logging_server::SourceType;
12225    /// let x0 = LoggingServer::new().set_source_type(SourceType::Esxi);
12226    /// let x1 = LoggingServer::new().set_source_type(SourceType::Vcsa);
12227    /// ```
12228    pub fn set_source_type<T: std::convert::Into<crate::model::logging_server::SourceType>>(
12229        mut self,
12230        v: T,
12231    ) -> Self {
12232        self.source_type = v.into();
12233        self
12234    }
12235
12236    /// Sets the value of [uid][crate::model::LoggingServer::uid].
12237    ///
12238    /// # Example
12239    /// ```ignore,no_run
12240    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12241    /// let x = LoggingServer::new().set_uid("example");
12242    /// ```
12243    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12244        self.uid = v.into();
12245        self
12246    }
12247}
12248
12249impl wkt::message::Message for LoggingServer {
12250    fn typename() -> &'static str {
12251        "type.googleapis.com/google.cloud.vmwareengine.v1.LoggingServer"
12252    }
12253}
12254
12255/// Defines additional types related to [LoggingServer].
12256pub mod logging_server {
12257    #[allow(unused_imports)]
12258    use super::*;
12259
12260    /// Defines possible protocols used to send logs to
12261    /// a logging server.
12262    ///
12263    /// # Working with unknown values
12264    ///
12265    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12266    /// additional enum variants at any time. Adding new variants is not considered
12267    /// a breaking change. Applications should write their code in anticipation of:
12268    ///
12269    /// - New values appearing in future releases of the client library, **and**
12270    /// - New values received dynamically, without application changes.
12271    ///
12272    /// Please consult the [Working with enums] section in the user guide for some
12273    /// guidelines.
12274    ///
12275    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12276    #[derive(Clone, Debug, PartialEq)]
12277    #[non_exhaustive]
12278    pub enum Protocol {
12279        /// Unspecified communications protocol. This is the default value.
12280        Unspecified,
12281        /// UDP
12282        Udp,
12283        /// TCP
12284        Tcp,
12285        /// TLS
12286        Tls,
12287        /// SSL
12288        Ssl,
12289        /// RELP
12290        Relp,
12291        /// If set, the enum was initialized with an unknown value.
12292        ///
12293        /// Applications can examine the value using [Protocol::value] or
12294        /// [Protocol::name].
12295        UnknownValue(protocol::UnknownValue),
12296    }
12297
12298    #[doc(hidden)]
12299    pub mod protocol {
12300        #[allow(unused_imports)]
12301        use super::*;
12302        #[derive(Clone, Debug, PartialEq)]
12303        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12304    }
12305
12306    impl Protocol {
12307        /// Gets the enum value.
12308        ///
12309        /// Returns `None` if the enum contains an unknown value deserialized from
12310        /// the string representation of enums.
12311        pub fn value(&self) -> std::option::Option<i32> {
12312            match self {
12313                Self::Unspecified => std::option::Option::Some(0),
12314                Self::Udp => std::option::Option::Some(1),
12315                Self::Tcp => std::option::Option::Some(2),
12316                Self::Tls => std::option::Option::Some(3),
12317                Self::Ssl => std::option::Option::Some(4),
12318                Self::Relp => std::option::Option::Some(5),
12319                Self::UnknownValue(u) => u.0.value(),
12320            }
12321        }
12322
12323        /// Gets the enum value as a string.
12324        ///
12325        /// Returns `None` if the enum contains an unknown value deserialized from
12326        /// the integer representation of enums.
12327        pub fn name(&self) -> std::option::Option<&str> {
12328            match self {
12329                Self::Unspecified => std::option::Option::Some("PROTOCOL_UNSPECIFIED"),
12330                Self::Udp => std::option::Option::Some("UDP"),
12331                Self::Tcp => std::option::Option::Some("TCP"),
12332                Self::Tls => std::option::Option::Some("TLS"),
12333                Self::Ssl => std::option::Option::Some("SSL"),
12334                Self::Relp => std::option::Option::Some("RELP"),
12335                Self::UnknownValue(u) => u.0.name(),
12336            }
12337        }
12338    }
12339
12340    impl std::default::Default for Protocol {
12341        fn default() -> Self {
12342            use std::convert::From;
12343            Self::from(0)
12344        }
12345    }
12346
12347    impl std::fmt::Display for Protocol {
12348        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12349            wkt::internal::display_enum(f, self.name(), self.value())
12350        }
12351    }
12352
12353    impl std::convert::From<i32> for Protocol {
12354        fn from(value: i32) -> Self {
12355            match value {
12356                0 => Self::Unspecified,
12357                1 => Self::Udp,
12358                2 => Self::Tcp,
12359                3 => Self::Tls,
12360                4 => Self::Ssl,
12361                5 => Self::Relp,
12362                _ => Self::UnknownValue(protocol::UnknownValue(
12363                    wkt::internal::UnknownEnumValue::Integer(value),
12364                )),
12365            }
12366        }
12367    }
12368
12369    impl std::convert::From<&str> for Protocol {
12370        fn from(value: &str) -> Self {
12371            use std::string::ToString;
12372            match value {
12373                "PROTOCOL_UNSPECIFIED" => Self::Unspecified,
12374                "UDP" => Self::Udp,
12375                "TCP" => Self::Tcp,
12376                "TLS" => Self::Tls,
12377                "SSL" => Self::Ssl,
12378                "RELP" => Self::Relp,
12379                _ => Self::UnknownValue(protocol::UnknownValue(
12380                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12381                )),
12382            }
12383        }
12384    }
12385
12386    impl serde::ser::Serialize for Protocol {
12387        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12388        where
12389            S: serde::Serializer,
12390        {
12391            match self {
12392                Self::Unspecified => serializer.serialize_i32(0),
12393                Self::Udp => serializer.serialize_i32(1),
12394                Self::Tcp => serializer.serialize_i32(2),
12395                Self::Tls => serializer.serialize_i32(3),
12396                Self::Ssl => serializer.serialize_i32(4),
12397                Self::Relp => serializer.serialize_i32(5),
12398                Self::UnknownValue(u) => u.0.serialize(serializer),
12399            }
12400        }
12401    }
12402
12403    impl<'de> serde::de::Deserialize<'de> for Protocol {
12404        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12405        where
12406            D: serde::Deserializer<'de>,
12407        {
12408            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Protocol>::new(
12409                ".google.cloud.vmwareengine.v1.LoggingServer.Protocol",
12410            ))
12411        }
12412    }
12413
12414    /// Defines possible types of component that produces logs.
12415    ///
12416    /// # Working with unknown values
12417    ///
12418    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12419    /// additional enum variants at any time. Adding new variants is not considered
12420    /// a breaking change. Applications should write their code in anticipation of:
12421    ///
12422    /// - New values appearing in future releases of the client library, **and**
12423    /// - New values received dynamically, without application changes.
12424    ///
12425    /// Please consult the [Working with enums] section in the user guide for some
12426    /// guidelines.
12427    ///
12428    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12429    #[derive(Clone, Debug, PartialEq)]
12430    #[non_exhaustive]
12431    pub enum SourceType {
12432        /// The default value. This value should never be used.
12433        Unspecified,
12434        /// Logs produced by ESXI hosts
12435        Esxi,
12436        /// Logs produced by vCenter server
12437        Vcsa,
12438        /// If set, the enum was initialized with an unknown value.
12439        ///
12440        /// Applications can examine the value using [SourceType::value] or
12441        /// [SourceType::name].
12442        UnknownValue(source_type::UnknownValue),
12443    }
12444
12445    #[doc(hidden)]
12446    pub mod source_type {
12447        #[allow(unused_imports)]
12448        use super::*;
12449        #[derive(Clone, Debug, PartialEq)]
12450        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12451    }
12452
12453    impl SourceType {
12454        /// Gets the enum value.
12455        ///
12456        /// Returns `None` if the enum contains an unknown value deserialized from
12457        /// the string representation of enums.
12458        pub fn value(&self) -> std::option::Option<i32> {
12459            match self {
12460                Self::Unspecified => std::option::Option::Some(0),
12461                Self::Esxi => std::option::Option::Some(1),
12462                Self::Vcsa => std::option::Option::Some(2),
12463                Self::UnknownValue(u) => u.0.value(),
12464            }
12465        }
12466
12467        /// Gets the enum value as a string.
12468        ///
12469        /// Returns `None` if the enum contains an unknown value deserialized from
12470        /// the integer representation of enums.
12471        pub fn name(&self) -> std::option::Option<&str> {
12472            match self {
12473                Self::Unspecified => std::option::Option::Some("SOURCE_TYPE_UNSPECIFIED"),
12474                Self::Esxi => std::option::Option::Some("ESXI"),
12475                Self::Vcsa => std::option::Option::Some("VCSA"),
12476                Self::UnknownValue(u) => u.0.name(),
12477            }
12478        }
12479    }
12480
12481    impl std::default::Default for SourceType {
12482        fn default() -> Self {
12483            use std::convert::From;
12484            Self::from(0)
12485        }
12486    }
12487
12488    impl std::fmt::Display for SourceType {
12489        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12490            wkt::internal::display_enum(f, self.name(), self.value())
12491        }
12492    }
12493
12494    impl std::convert::From<i32> for SourceType {
12495        fn from(value: i32) -> Self {
12496            match value {
12497                0 => Self::Unspecified,
12498                1 => Self::Esxi,
12499                2 => Self::Vcsa,
12500                _ => Self::UnknownValue(source_type::UnknownValue(
12501                    wkt::internal::UnknownEnumValue::Integer(value),
12502                )),
12503            }
12504        }
12505    }
12506
12507    impl std::convert::From<&str> for SourceType {
12508        fn from(value: &str) -> Self {
12509            use std::string::ToString;
12510            match value {
12511                "SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
12512                "ESXI" => Self::Esxi,
12513                "VCSA" => Self::Vcsa,
12514                _ => Self::UnknownValue(source_type::UnknownValue(
12515                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12516                )),
12517            }
12518        }
12519    }
12520
12521    impl serde::ser::Serialize for SourceType {
12522        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12523        where
12524            S: serde::Serializer,
12525        {
12526            match self {
12527                Self::Unspecified => serializer.serialize_i32(0),
12528                Self::Esxi => serializer.serialize_i32(1),
12529                Self::Vcsa => serializer.serialize_i32(2),
12530                Self::UnknownValue(u) => u.0.serialize(serializer),
12531            }
12532        }
12533    }
12534
12535    impl<'de> serde::de::Deserialize<'de> for SourceType {
12536        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12537        where
12538            D: serde::Deserializer<'de>,
12539        {
12540            deserializer.deserialize_any(wkt::internal::EnumVisitor::<SourceType>::new(
12541                ".google.cloud.vmwareengine.v1.LoggingServer.SourceType",
12542            ))
12543        }
12544    }
12545}
12546
12547/// Describes node type.
12548#[derive(Clone, Default, PartialEq)]
12549#[non_exhaustive]
12550pub struct NodeType {
12551    /// Output only. The resource name of this node type.
12552    /// Resource names are schemeless URIs that follow the conventions in
12553    /// <https://cloud.google.com/apis/design/resource_names>.
12554    /// For example:
12555    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
12556    pub name: std::string::String,
12557
12558    /// Output only. The canonical identifier of the node type
12559    /// (corresponds to the `NodeType`). For example: standard-72.
12560    pub node_type_id: std::string::String,
12561
12562    /// Output only. The friendly name for this node type.
12563    /// For example: ve1-standard-72
12564    pub display_name: std::string::String,
12565
12566    /// Output only. The total number of virtual CPUs in a single node.
12567    pub virtual_cpu_count: i32,
12568
12569    /// Output only. The total number of CPU cores in a single node.
12570    pub total_core_count: i32,
12571
12572    /// Output only. The amount of physical memory available, defined in GB.
12573    pub memory_gb: i32,
12574
12575    /// Output only. The amount of storage available, defined in GB.
12576    pub disk_size_gb: i32,
12577
12578    /// Output only. List of possible values of custom core count.
12579    pub available_custom_core_counts: std::vec::Vec<i32>,
12580
12581    /// Output only. The type of the resource.
12582    pub kind: crate::model::node_type::Kind,
12583
12584    /// Output only. Families of the node type.
12585    /// For node types to be in the same cluster
12586    /// they must share at least one element in the `families`.
12587    pub families: std::vec::Vec<std::string::String>,
12588
12589    /// Output only. Capabilities of this node type.
12590    pub capabilities: std::vec::Vec<crate::model::node_type::Capability>,
12591
12592    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12593}
12594
12595impl NodeType {
12596    /// Creates a new default instance.
12597    pub fn new() -> Self {
12598        std::default::Default::default()
12599    }
12600
12601    /// Sets the value of [name][crate::model::NodeType::name].
12602    ///
12603    /// # Example
12604    /// ```ignore,no_run
12605    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12606    /// let x = NodeType::new().set_name("example");
12607    /// ```
12608    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12609        self.name = v.into();
12610        self
12611    }
12612
12613    /// Sets the value of [node_type_id][crate::model::NodeType::node_type_id].
12614    ///
12615    /// # Example
12616    /// ```ignore,no_run
12617    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12618    /// let x = NodeType::new().set_node_type_id("example");
12619    /// ```
12620    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12621        self.node_type_id = v.into();
12622        self
12623    }
12624
12625    /// Sets the value of [display_name][crate::model::NodeType::display_name].
12626    ///
12627    /// # Example
12628    /// ```ignore,no_run
12629    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12630    /// let x = NodeType::new().set_display_name("example");
12631    /// ```
12632    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12633        self.display_name = v.into();
12634        self
12635    }
12636
12637    /// Sets the value of [virtual_cpu_count][crate::model::NodeType::virtual_cpu_count].
12638    ///
12639    /// # Example
12640    /// ```ignore,no_run
12641    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12642    /// let x = NodeType::new().set_virtual_cpu_count(42);
12643    /// ```
12644    pub fn set_virtual_cpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12645        self.virtual_cpu_count = v.into();
12646        self
12647    }
12648
12649    /// Sets the value of [total_core_count][crate::model::NodeType::total_core_count].
12650    ///
12651    /// # Example
12652    /// ```ignore,no_run
12653    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12654    /// let x = NodeType::new().set_total_core_count(42);
12655    /// ```
12656    pub fn set_total_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12657        self.total_core_count = v.into();
12658        self
12659    }
12660
12661    /// Sets the value of [memory_gb][crate::model::NodeType::memory_gb].
12662    ///
12663    /// # Example
12664    /// ```ignore,no_run
12665    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12666    /// let x = NodeType::new().set_memory_gb(42);
12667    /// ```
12668    pub fn set_memory_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12669        self.memory_gb = v.into();
12670        self
12671    }
12672
12673    /// Sets the value of [disk_size_gb][crate::model::NodeType::disk_size_gb].
12674    ///
12675    /// # Example
12676    /// ```ignore,no_run
12677    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12678    /// let x = NodeType::new().set_disk_size_gb(42);
12679    /// ```
12680    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12681        self.disk_size_gb = v.into();
12682        self
12683    }
12684
12685    /// Sets the value of [available_custom_core_counts][crate::model::NodeType::available_custom_core_counts].
12686    ///
12687    /// # Example
12688    /// ```ignore,no_run
12689    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12690    /// let x = NodeType::new().set_available_custom_core_counts([1, 2, 3]);
12691    /// ```
12692    pub fn set_available_custom_core_counts<T, V>(mut self, v: T) -> Self
12693    where
12694        T: std::iter::IntoIterator<Item = V>,
12695        V: std::convert::Into<i32>,
12696    {
12697        use std::iter::Iterator;
12698        self.available_custom_core_counts = v.into_iter().map(|i| i.into()).collect();
12699        self
12700    }
12701
12702    /// Sets the value of [kind][crate::model::NodeType::kind].
12703    ///
12704    /// # Example
12705    /// ```ignore,no_run
12706    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12707    /// use google_cloud_vmwareengine_v1::model::node_type::Kind;
12708    /// let x0 = NodeType::new().set_kind(Kind::Standard);
12709    /// let x1 = NodeType::new().set_kind(Kind::StorageOnly);
12710    /// ```
12711    pub fn set_kind<T: std::convert::Into<crate::model::node_type::Kind>>(mut self, v: T) -> Self {
12712        self.kind = v.into();
12713        self
12714    }
12715
12716    /// Sets the value of [families][crate::model::NodeType::families].
12717    ///
12718    /// # Example
12719    /// ```ignore,no_run
12720    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12721    /// let x = NodeType::new().set_families(["a", "b", "c"]);
12722    /// ```
12723    pub fn set_families<T, V>(mut self, v: T) -> Self
12724    where
12725        T: std::iter::IntoIterator<Item = V>,
12726        V: std::convert::Into<std::string::String>,
12727    {
12728        use std::iter::Iterator;
12729        self.families = v.into_iter().map(|i| i.into()).collect();
12730        self
12731    }
12732
12733    /// Sets the value of [capabilities][crate::model::NodeType::capabilities].
12734    ///
12735    /// # Example
12736    /// ```ignore,no_run
12737    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12738    /// use google_cloud_vmwareengine_v1::model::node_type::Capability;
12739    /// let x = NodeType::new().set_capabilities([
12740    ///     Capability::StretchedClusters,
12741    /// ]);
12742    /// ```
12743    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
12744    where
12745        T: std::iter::IntoIterator<Item = V>,
12746        V: std::convert::Into<crate::model::node_type::Capability>,
12747    {
12748        use std::iter::Iterator;
12749        self.capabilities = v.into_iter().map(|i| i.into()).collect();
12750        self
12751    }
12752}
12753
12754impl wkt::message::Message for NodeType {
12755    fn typename() -> &'static str {
12756        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeType"
12757    }
12758}
12759
12760/// Defines additional types related to [NodeType].
12761pub mod node_type {
12762    #[allow(unused_imports)]
12763    use super::*;
12764
12765    /// Enum Kind defines possible types of a NodeType.
12766    ///
12767    /// # Working with unknown values
12768    ///
12769    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12770    /// additional enum variants at any time. Adding new variants is not considered
12771    /// a breaking change. Applications should write their code in anticipation of:
12772    ///
12773    /// - New values appearing in future releases of the client library, **and**
12774    /// - New values received dynamically, without application changes.
12775    ///
12776    /// Please consult the [Working with enums] section in the user guide for some
12777    /// guidelines.
12778    ///
12779    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12780    #[derive(Clone, Debug, PartialEq)]
12781    #[non_exhaustive]
12782    pub enum Kind {
12783        /// The default value. This value should never be used.
12784        Unspecified,
12785        /// Standard HCI node.
12786        Standard,
12787        /// Storage only Node.
12788        StorageOnly,
12789        /// If set, the enum was initialized with an unknown value.
12790        ///
12791        /// Applications can examine the value using [Kind::value] or
12792        /// [Kind::name].
12793        UnknownValue(kind::UnknownValue),
12794    }
12795
12796    #[doc(hidden)]
12797    pub mod kind {
12798        #[allow(unused_imports)]
12799        use super::*;
12800        #[derive(Clone, Debug, PartialEq)]
12801        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12802    }
12803
12804    impl Kind {
12805        /// Gets the enum value.
12806        ///
12807        /// Returns `None` if the enum contains an unknown value deserialized from
12808        /// the string representation of enums.
12809        pub fn value(&self) -> std::option::Option<i32> {
12810            match self {
12811                Self::Unspecified => std::option::Option::Some(0),
12812                Self::Standard => std::option::Option::Some(1),
12813                Self::StorageOnly => std::option::Option::Some(2),
12814                Self::UnknownValue(u) => u.0.value(),
12815            }
12816        }
12817
12818        /// Gets the enum value as a string.
12819        ///
12820        /// Returns `None` if the enum contains an unknown value deserialized from
12821        /// the integer representation of enums.
12822        pub fn name(&self) -> std::option::Option<&str> {
12823            match self {
12824                Self::Unspecified => std::option::Option::Some("KIND_UNSPECIFIED"),
12825                Self::Standard => std::option::Option::Some("STANDARD"),
12826                Self::StorageOnly => std::option::Option::Some("STORAGE_ONLY"),
12827                Self::UnknownValue(u) => u.0.name(),
12828            }
12829        }
12830    }
12831
12832    impl std::default::Default for Kind {
12833        fn default() -> Self {
12834            use std::convert::From;
12835            Self::from(0)
12836        }
12837    }
12838
12839    impl std::fmt::Display for Kind {
12840        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12841            wkt::internal::display_enum(f, self.name(), self.value())
12842        }
12843    }
12844
12845    impl std::convert::From<i32> for Kind {
12846        fn from(value: i32) -> Self {
12847            match value {
12848                0 => Self::Unspecified,
12849                1 => Self::Standard,
12850                2 => Self::StorageOnly,
12851                _ => Self::UnknownValue(kind::UnknownValue(
12852                    wkt::internal::UnknownEnumValue::Integer(value),
12853                )),
12854            }
12855        }
12856    }
12857
12858    impl std::convert::From<&str> for Kind {
12859        fn from(value: &str) -> Self {
12860            use std::string::ToString;
12861            match value {
12862                "KIND_UNSPECIFIED" => Self::Unspecified,
12863                "STANDARD" => Self::Standard,
12864                "STORAGE_ONLY" => Self::StorageOnly,
12865                _ => Self::UnknownValue(kind::UnknownValue(
12866                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12867                )),
12868            }
12869        }
12870    }
12871
12872    impl serde::ser::Serialize for Kind {
12873        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12874        where
12875            S: serde::Serializer,
12876        {
12877            match self {
12878                Self::Unspecified => serializer.serialize_i32(0),
12879                Self::Standard => serializer.serialize_i32(1),
12880                Self::StorageOnly => serializer.serialize_i32(2),
12881                Self::UnknownValue(u) => u.0.serialize(serializer),
12882            }
12883        }
12884    }
12885
12886    impl<'de> serde::de::Deserialize<'de> for Kind {
12887        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12888        where
12889            D: serde::Deserializer<'de>,
12890        {
12891            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Kind>::new(
12892                ".google.cloud.vmwareengine.v1.NodeType.Kind",
12893            ))
12894        }
12895    }
12896
12897    /// Capability of a node type.
12898    ///
12899    /// # Working with unknown values
12900    ///
12901    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12902    /// additional enum variants at any time. Adding new variants is not considered
12903    /// a breaking change. Applications should write their code in anticipation of:
12904    ///
12905    /// - New values appearing in future releases of the client library, **and**
12906    /// - New values received dynamically, without application changes.
12907    ///
12908    /// Please consult the [Working with enums] section in the user guide for some
12909    /// guidelines.
12910    ///
12911    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12912    #[derive(Clone, Debug, PartialEq)]
12913    #[non_exhaustive]
12914    pub enum Capability {
12915        /// The default value. This value is used if the capability is omitted or
12916        /// unknown.
12917        Unspecified,
12918        /// This node type supports stretch clusters.
12919        StretchedClusters,
12920        /// If set, the enum was initialized with an unknown value.
12921        ///
12922        /// Applications can examine the value using [Capability::value] or
12923        /// [Capability::name].
12924        UnknownValue(capability::UnknownValue),
12925    }
12926
12927    #[doc(hidden)]
12928    pub mod capability {
12929        #[allow(unused_imports)]
12930        use super::*;
12931        #[derive(Clone, Debug, PartialEq)]
12932        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12933    }
12934
12935    impl Capability {
12936        /// Gets the enum value.
12937        ///
12938        /// Returns `None` if the enum contains an unknown value deserialized from
12939        /// the string representation of enums.
12940        pub fn value(&self) -> std::option::Option<i32> {
12941            match self {
12942                Self::Unspecified => std::option::Option::Some(0),
12943                Self::StretchedClusters => std::option::Option::Some(1),
12944                Self::UnknownValue(u) => u.0.value(),
12945            }
12946        }
12947
12948        /// Gets the enum value as a string.
12949        ///
12950        /// Returns `None` if the enum contains an unknown value deserialized from
12951        /// the integer representation of enums.
12952        pub fn name(&self) -> std::option::Option<&str> {
12953            match self {
12954                Self::Unspecified => std::option::Option::Some("CAPABILITY_UNSPECIFIED"),
12955                Self::StretchedClusters => std::option::Option::Some("STRETCHED_CLUSTERS"),
12956                Self::UnknownValue(u) => u.0.name(),
12957            }
12958        }
12959    }
12960
12961    impl std::default::Default for Capability {
12962        fn default() -> Self {
12963            use std::convert::From;
12964            Self::from(0)
12965        }
12966    }
12967
12968    impl std::fmt::Display for Capability {
12969        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12970            wkt::internal::display_enum(f, self.name(), self.value())
12971        }
12972    }
12973
12974    impl std::convert::From<i32> for Capability {
12975        fn from(value: i32) -> Self {
12976            match value {
12977                0 => Self::Unspecified,
12978                1 => Self::StretchedClusters,
12979                _ => Self::UnknownValue(capability::UnknownValue(
12980                    wkt::internal::UnknownEnumValue::Integer(value),
12981                )),
12982            }
12983        }
12984    }
12985
12986    impl std::convert::From<&str> for Capability {
12987        fn from(value: &str) -> Self {
12988            use std::string::ToString;
12989            match value {
12990                "CAPABILITY_UNSPECIFIED" => Self::Unspecified,
12991                "STRETCHED_CLUSTERS" => Self::StretchedClusters,
12992                _ => Self::UnknownValue(capability::UnknownValue(
12993                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12994                )),
12995            }
12996        }
12997    }
12998
12999    impl serde::ser::Serialize for Capability {
13000        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13001        where
13002            S: serde::Serializer,
13003        {
13004            match self {
13005                Self::Unspecified => serializer.serialize_i32(0),
13006                Self::StretchedClusters => serializer.serialize_i32(1),
13007                Self::UnknownValue(u) => u.0.serialize(serializer),
13008            }
13009        }
13010    }
13011
13012    impl<'de> serde::de::Deserialize<'de> for Capability {
13013        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13014        where
13015            D: serde::Deserializer<'de>,
13016        {
13017            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Capability>::new(
13018                ".google.cloud.vmwareengine.v1.NodeType.Capability",
13019            ))
13020        }
13021    }
13022}
13023
13024/// Credentials for a private cloud.
13025#[derive(Clone, Default, PartialEq)]
13026#[non_exhaustive]
13027pub struct Credentials {
13028    /// Initial username.
13029    pub username: std::string::String,
13030
13031    /// Initial password.
13032    pub password: std::string::String,
13033
13034    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13035}
13036
13037impl Credentials {
13038    /// Creates a new default instance.
13039    pub fn new() -> Self {
13040        std::default::Default::default()
13041    }
13042
13043    /// Sets the value of [username][crate::model::Credentials::username].
13044    ///
13045    /// # Example
13046    /// ```ignore,no_run
13047    /// # use google_cloud_vmwareengine_v1::model::Credentials;
13048    /// let x = Credentials::new().set_username("example");
13049    /// ```
13050    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13051        self.username = v.into();
13052        self
13053    }
13054
13055    /// Sets the value of [password][crate::model::Credentials::password].
13056    ///
13057    /// # Example
13058    /// ```ignore,no_run
13059    /// # use google_cloud_vmwareengine_v1::model::Credentials;
13060    /// let x = Credentials::new().set_password("example");
13061    /// ```
13062    pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13063        self.password = v.into();
13064        self
13065    }
13066}
13067
13068impl wkt::message::Message for Credentials {
13069    fn typename() -> &'static str {
13070        "type.googleapis.com/google.cloud.vmwareengine.v1.Credentials"
13071    }
13072}
13073
13074/// HCX activation key. A default key is created during
13075/// private cloud provisioning, but this behavior is subject to change
13076/// and you should always verify active keys.
13077/// Use
13078/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
13079/// to retrieve existing keys and
13080/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
13081/// to create new ones.
13082///
13083/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
13084/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
13085#[derive(Clone, Default, PartialEq)]
13086#[non_exhaustive]
13087pub struct HcxActivationKey {
13088    /// Output only. The resource name of this HcxActivationKey.
13089    /// Resource names are schemeless URIs that follow the conventions in
13090    /// <https://cloud.google.com/apis/design/resource_names>.
13091    /// For example:
13092    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
13093    pub name: std::string::String,
13094
13095    /// Output only. Creation time of HCX activation key.
13096    pub create_time: std::option::Option<wkt::Timestamp>,
13097
13098    /// Output only. State of HCX activation key.
13099    pub state: crate::model::hcx_activation_key::State,
13100
13101    /// Output only. HCX activation key.
13102    pub activation_key: std::string::String,
13103
13104    /// Output only. System-generated unique identifier for the resource.
13105    pub uid: std::string::String,
13106
13107    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13108}
13109
13110impl HcxActivationKey {
13111    /// Creates a new default instance.
13112    pub fn new() -> Self {
13113        std::default::Default::default()
13114    }
13115
13116    /// Sets the value of [name][crate::model::HcxActivationKey::name].
13117    ///
13118    /// # Example
13119    /// ```ignore,no_run
13120    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13121    /// let x = HcxActivationKey::new().set_name("example");
13122    /// ```
13123    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13124        self.name = v.into();
13125        self
13126    }
13127
13128    /// Sets the value of [create_time][crate::model::HcxActivationKey::create_time].
13129    ///
13130    /// # Example
13131    /// ```ignore,no_run
13132    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13133    /// use wkt::Timestamp;
13134    /// let x = HcxActivationKey::new().set_create_time(Timestamp::default()/* use setters */);
13135    /// ```
13136    pub fn set_create_time<T>(mut self, v: T) -> Self
13137    where
13138        T: std::convert::Into<wkt::Timestamp>,
13139    {
13140        self.create_time = std::option::Option::Some(v.into());
13141        self
13142    }
13143
13144    /// Sets or clears the value of [create_time][crate::model::HcxActivationKey::create_time].
13145    ///
13146    /// # Example
13147    /// ```ignore,no_run
13148    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13149    /// use wkt::Timestamp;
13150    /// let x = HcxActivationKey::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
13151    /// let x = HcxActivationKey::new().set_or_clear_create_time(None::<Timestamp>);
13152    /// ```
13153    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
13154    where
13155        T: std::convert::Into<wkt::Timestamp>,
13156    {
13157        self.create_time = v.map(|x| x.into());
13158        self
13159    }
13160
13161    /// Sets the value of [state][crate::model::HcxActivationKey::state].
13162    ///
13163    /// # Example
13164    /// ```ignore,no_run
13165    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13166    /// use google_cloud_vmwareengine_v1::model::hcx_activation_key::State;
13167    /// let x0 = HcxActivationKey::new().set_state(State::Available);
13168    /// let x1 = HcxActivationKey::new().set_state(State::Consumed);
13169    /// let x2 = HcxActivationKey::new().set_state(State::Creating);
13170    /// ```
13171    pub fn set_state<T: std::convert::Into<crate::model::hcx_activation_key::State>>(
13172        mut self,
13173        v: T,
13174    ) -> Self {
13175        self.state = v.into();
13176        self
13177    }
13178
13179    /// Sets the value of [activation_key][crate::model::HcxActivationKey::activation_key].
13180    ///
13181    /// # Example
13182    /// ```ignore,no_run
13183    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13184    /// let x = HcxActivationKey::new().set_activation_key("example");
13185    /// ```
13186    pub fn set_activation_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13187        self.activation_key = v.into();
13188        self
13189    }
13190
13191    /// Sets the value of [uid][crate::model::HcxActivationKey::uid].
13192    ///
13193    /// # Example
13194    /// ```ignore,no_run
13195    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13196    /// let x = HcxActivationKey::new().set_uid("example");
13197    /// ```
13198    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13199        self.uid = v.into();
13200        self
13201    }
13202}
13203
13204impl wkt::message::Message for HcxActivationKey {
13205    fn typename() -> &'static str {
13206        "type.googleapis.com/google.cloud.vmwareengine.v1.HcxActivationKey"
13207    }
13208}
13209
13210/// Defines additional types related to [HcxActivationKey].
13211pub mod hcx_activation_key {
13212    #[allow(unused_imports)]
13213    use super::*;
13214
13215    /// State of HCX activation key
13216    ///
13217    /// # Working with unknown values
13218    ///
13219    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13220    /// additional enum variants at any time. Adding new variants is not considered
13221    /// a breaking change. Applications should write their code in anticipation of:
13222    ///
13223    /// - New values appearing in future releases of the client library, **and**
13224    /// - New values received dynamically, without application changes.
13225    ///
13226    /// Please consult the [Working with enums] section in the user guide for some
13227    /// guidelines.
13228    ///
13229    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13230    #[derive(Clone, Debug, PartialEq)]
13231    #[non_exhaustive]
13232    pub enum State {
13233        /// Unspecified state.
13234        Unspecified,
13235        /// State of a newly generated activation key.
13236        Available,
13237        /// State of key when it has been used to activate HCX appliance.
13238        Consumed,
13239        /// State of key when it is being created.
13240        Creating,
13241        /// If set, the enum was initialized with an unknown value.
13242        ///
13243        /// Applications can examine the value using [State::value] or
13244        /// [State::name].
13245        UnknownValue(state::UnknownValue),
13246    }
13247
13248    #[doc(hidden)]
13249    pub mod state {
13250        #[allow(unused_imports)]
13251        use super::*;
13252        #[derive(Clone, Debug, PartialEq)]
13253        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13254    }
13255
13256    impl State {
13257        /// Gets the enum value.
13258        ///
13259        /// Returns `None` if the enum contains an unknown value deserialized from
13260        /// the string representation of enums.
13261        pub fn value(&self) -> std::option::Option<i32> {
13262            match self {
13263                Self::Unspecified => std::option::Option::Some(0),
13264                Self::Available => std::option::Option::Some(1),
13265                Self::Consumed => std::option::Option::Some(2),
13266                Self::Creating => std::option::Option::Some(3),
13267                Self::UnknownValue(u) => u.0.value(),
13268            }
13269        }
13270
13271        /// Gets the enum value as a string.
13272        ///
13273        /// Returns `None` if the enum contains an unknown value deserialized from
13274        /// the integer representation of enums.
13275        pub fn name(&self) -> std::option::Option<&str> {
13276            match self {
13277                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13278                Self::Available => std::option::Option::Some("AVAILABLE"),
13279                Self::Consumed => std::option::Option::Some("CONSUMED"),
13280                Self::Creating => std::option::Option::Some("CREATING"),
13281                Self::UnknownValue(u) => u.0.name(),
13282            }
13283        }
13284    }
13285
13286    impl std::default::Default for State {
13287        fn default() -> Self {
13288            use std::convert::From;
13289            Self::from(0)
13290        }
13291    }
13292
13293    impl std::fmt::Display for State {
13294        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13295            wkt::internal::display_enum(f, self.name(), self.value())
13296        }
13297    }
13298
13299    impl std::convert::From<i32> for State {
13300        fn from(value: i32) -> Self {
13301            match value {
13302                0 => Self::Unspecified,
13303                1 => Self::Available,
13304                2 => Self::Consumed,
13305                3 => Self::Creating,
13306                _ => Self::UnknownValue(state::UnknownValue(
13307                    wkt::internal::UnknownEnumValue::Integer(value),
13308                )),
13309            }
13310        }
13311    }
13312
13313    impl std::convert::From<&str> for State {
13314        fn from(value: &str) -> Self {
13315            use std::string::ToString;
13316            match value {
13317                "STATE_UNSPECIFIED" => Self::Unspecified,
13318                "AVAILABLE" => Self::Available,
13319                "CONSUMED" => Self::Consumed,
13320                "CREATING" => Self::Creating,
13321                _ => Self::UnknownValue(state::UnknownValue(
13322                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13323                )),
13324            }
13325        }
13326    }
13327
13328    impl serde::ser::Serialize for State {
13329        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13330        where
13331            S: serde::Serializer,
13332        {
13333            match self {
13334                Self::Unspecified => serializer.serialize_i32(0),
13335                Self::Available => serializer.serialize_i32(1),
13336                Self::Consumed => serializer.serialize_i32(2),
13337                Self::Creating => serializer.serialize_i32(3),
13338                Self::UnknownValue(u) => u.0.serialize(serializer),
13339            }
13340        }
13341    }
13342
13343    impl<'de> serde::de::Deserialize<'de> for State {
13344        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13345        where
13346            D: serde::Deserializer<'de>,
13347        {
13348            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13349                ".google.cloud.vmwareengine.v1.HcxActivationKey.State",
13350            ))
13351        }
13352    }
13353}
13354
13355/// Details about a HCX Cloud Manager appliance.
13356#[derive(Clone, Default, PartialEq)]
13357#[non_exhaustive]
13358pub struct Hcx {
13359    /// Internal IP address of the appliance.
13360    pub internal_ip: std::string::String,
13361
13362    /// Version of the appliance.
13363    pub version: std::string::String,
13364
13365    /// Output only. The state of the appliance.
13366    pub state: crate::model::hcx::State,
13367
13368    /// Fully qualified domain name of the appliance.
13369    pub fqdn: std::string::String,
13370
13371    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13372}
13373
13374impl Hcx {
13375    /// Creates a new default instance.
13376    pub fn new() -> Self {
13377        std::default::Default::default()
13378    }
13379
13380    /// Sets the value of [internal_ip][crate::model::Hcx::internal_ip].
13381    ///
13382    /// # Example
13383    /// ```ignore,no_run
13384    /// # use google_cloud_vmwareengine_v1::model::Hcx;
13385    /// let x = Hcx::new().set_internal_ip("example");
13386    /// ```
13387    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13388        self.internal_ip = v.into();
13389        self
13390    }
13391
13392    /// Sets the value of [version][crate::model::Hcx::version].
13393    ///
13394    /// # Example
13395    /// ```ignore,no_run
13396    /// # use google_cloud_vmwareengine_v1::model::Hcx;
13397    /// let x = Hcx::new().set_version("example");
13398    /// ```
13399    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13400        self.version = v.into();
13401        self
13402    }
13403
13404    /// Sets the value of [state][crate::model::Hcx::state].
13405    ///
13406    /// # Example
13407    /// ```ignore,no_run
13408    /// # use google_cloud_vmwareengine_v1::model::Hcx;
13409    /// use google_cloud_vmwareengine_v1::model::hcx::State;
13410    /// let x0 = Hcx::new().set_state(State::Active);
13411    /// let x1 = Hcx::new().set_state(State::Creating);
13412    /// let x2 = Hcx::new().set_state(State::Activating);
13413    /// ```
13414    pub fn set_state<T: std::convert::Into<crate::model::hcx::State>>(mut self, v: T) -> Self {
13415        self.state = v.into();
13416        self
13417    }
13418
13419    /// Sets the value of [fqdn][crate::model::Hcx::fqdn].
13420    ///
13421    /// # Example
13422    /// ```ignore,no_run
13423    /// # use google_cloud_vmwareengine_v1::model::Hcx;
13424    /// let x = Hcx::new().set_fqdn("example");
13425    /// ```
13426    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13427        self.fqdn = v.into();
13428        self
13429    }
13430}
13431
13432impl wkt::message::Message for Hcx {
13433    fn typename() -> &'static str {
13434        "type.googleapis.com/google.cloud.vmwareengine.v1.Hcx"
13435    }
13436}
13437
13438/// Defines additional types related to [Hcx].
13439pub mod hcx {
13440    #[allow(unused_imports)]
13441    use super::*;
13442
13443    /// State of the appliance
13444    ///
13445    /// # Working with unknown values
13446    ///
13447    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13448    /// additional enum variants at any time. Adding new variants is not considered
13449    /// a breaking change. Applications should write their code in anticipation of:
13450    ///
13451    /// - New values appearing in future releases of the client library, **and**
13452    /// - New values received dynamically, without application changes.
13453    ///
13454    /// Please consult the [Working with enums] section in the user guide for some
13455    /// guidelines.
13456    ///
13457    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13458    #[derive(Clone, Debug, PartialEq)]
13459    #[non_exhaustive]
13460    pub enum State {
13461        /// Unspecified appliance state. This is the default value.
13462        Unspecified,
13463        /// The appliance is operational and can be used.
13464        Active,
13465        /// The appliance is being deployed.
13466        Creating,
13467        /// The appliance is being activated.
13468        Activating,
13469        /// If set, the enum was initialized with an unknown value.
13470        ///
13471        /// Applications can examine the value using [State::value] or
13472        /// [State::name].
13473        UnknownValue(state::UnknownValue),
13474    }
13475
13476    #[doc(hidden)]
13477    pub mod state {
13478        #[allow(unused_imports)]
13479        use super::*;
13480        #[derive(Clone, Debug, PartialEq)]
13481        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13482    }
13483
13484    impl State {
13485        /// Gets the enum value.
13486        ///
13487        /// Returns `None` if the enum contains an unknown value deserialized from
13488        /// the string representation of enums.
13489        pub fn value(&self) -> std::option::Option<i32> {
13490            match self {
13491                Self::Unspecified => std::option::Option::Some(0),
13492                Self::Active => std::option::Option::Some(1),
13493                Self::Creating => std::option::Option::Some(2),
13494                Self::Activating => std::option::Option::Some(3),
13495                Self::UnknownValue(u) => u.0.value(),
13496            }
13497        }
13498
13499        /// Gets the enum value as a string.
13500        ///
13501        /// Returns `None` if the enum contains an unknown value deserialized from
13502        /// the integer representation of enums.
13503        pub fn name(&self) -> std::option::Option<&str> {
13504            match self {
13505                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13506                Self::Active => std::option::Option::Some("ACTIVE"),
13507                Self::Creating => std::option::Option::Some("CREATING"),
13508                Self::Activating => std::option::Option::Some("ACTIVATING"),
13509                Self::UnknownValue(u) => u.0.name(),
13510            }
13511        }
13512    }
13513
13514    impl std::default::Default for State {
13515        fn default() -> Self {
13516            use std::convert::From;
13517            Self::from(0)
13518        }
13519    }
13520
13521    impl std::fmt::Display for State {
13522        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13523            wkt::internal::display_enum(f, self.name(), self.value())
13524        }
13525    }
13526
13527    impl std::convert::From<i32> for State {
13528        fn from(value: i32) -> Self {
13529            match value {
13530                0 => Self::Unspecified,
13531                1 => Self::Active,
13532                2 => Self::Creating,
13533                3 => Self::Activating,
13534                _ => Self::UnknownValue(state::UnknownValue(
13535                    wkt::internal::UnknownEnumValue::Integer(value),
13536                )),
13537            }
13538        }
13539    }
13540
13541    impl std::convert::From<&str> for State {
13542        fn from(value: &str) -> Self {
13543            use std::string::ToString;
13544            match value {
13545                "STATE_UNSPECIFIED" => Self::Unspecified,
13546                "ACTIVE" => Self::Active,
13547                "CREATING" => Self::Creating,
13548                "ACTIVATING" => Self::Activating,
13549                _ => Self::UnknownValue(state::UnknownValue(
13550                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13551                )),
13552            }
13553        }
13554    }
13555
13556    impl serde::ser::Serialize for State {
13557        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13558        where
13559            S: serde::Serializer,
13560        {
13561            match self {
13562                Self::Unspecified => serializer.serialize_i32(0),
13563                Self::Active => serializer.serialize_i32(1),
13564                Self::Creating => serializer.serialize_i32(2),
13565                Self::Activating => serializer.serialize_i32(3),
13566                Self::UnknownValue(u) => u.0.serialize(serializer),
13567            }
13568        }
13569    }
13570
13571    impl<'de> serde::de::Deserialize<'de> for State {
13572        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13573        where
13574            D: serde::Deserializer<'de>,
13575        {
13576            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13577                ".google.cloud.vmwareengine.v1.Hcx.State",
13578            ))
13579        }
13580    }
13581}
13582
13583/// Details about a NSX Manager appliance.
13584#[derive(Clone, Default, PartialEq)]
13585#[non_exhaustive]
13586pub struct Nsx {
13587    /// Internal IP address of the appliance.
13588    pub internal_ip: std::string::String,
13589
13590    /// Version of the appliance.
13591    pub version: std::string::String,
13592
13593    /// Output only. The state of the appliance.
13594    pub state: crate::model::nsx::State,
13595
13596    /// Fully qualified domain name of the appliance.
13597    pub fqdn: std::string::String,
13598
13599    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13600}
13601
13602impl Nsx {
13603    /// Creates a new default instance.
13604    pub fn new() -> Self {
13605        std::default::Default::default()
13606    }
13607
13608    /// Sets the value of [internal_ip][crate::model::Nsx::internal_ip].
13609    ///
13610    /// # Example
13611    /// ```ignore,no_run
13612    /// # use google_cloud_vmwareengine_v1::model::Nsx;
13613    /// let x = Nsx::new().set_internal_ip("example");
13614    /// ```
13615    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13616        self.internal_ip = v.into();
13617        self
13618    }
13619
13620    /// Sets the value of [version][crate::model::Nsx::version].
13621    ///
13622    /// # Example
13623    /// ```ignore,no_run
13624    /// # use google_cloud_vmwareengine_v1::model::Nsx;
13625    /// let x = Nsx::new().set_version("example");
13626    /// ```
13627    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13628        self.version = v.into();
13629        self
13630    }
13631
13632    /// Sets the value of [state][crate::model::Nsx::state].
13633    ///
13634    /// # Example
13635    /// ```ignore,no_run
13636    /// # use google_cloud_vmwareengine_v1::model::Nsx;
13637    /// use google_cloud_vmwareengine_v1::model::nsx::State;
13638    /// let x0 = Nsx::new().set_state(State::Active);
13639    /// let x1 = Nsx::new().set_state(State::Creating);
13640    /// ```
13641    pub fn set_state<T: std::convert::Into<crate::model::nsx::State>>(mut self, v: T) -> Self {
13642        self.state = v.into();
13643        self
13644    }
13645
13646    /// Sets the value of [fqdn][crate::model::Nsx::fqdn].
13647    ///
13648    /// # Example
13649    /// ```ignore,no_run
13650    /// # use google_cloud_vmwareengine_v1::model::Nsx;
13651    /// let x = Nsx::new().set_fqdn("example");
13652    /// ```
13653    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13654        self.fqdn = v.into();
13655        self
13656    }
13657}
13658
13659impl wkt::message::Message for Nsx {
13660    fn typename() -> &'static str {
13661        "type.googleapis.com/google.cloud.vmwareengine.v1.Nsx"
13662    }
13663}
13664
13665/// Defines additional types related to [Nsx].
13666pub mod nsx {
13667    #[allow(unused_imports)]
13668    use super::*;
13669
13670    /// State of the appliance
13671    ///
13672    /// # Working with unknown values
13673    ///
13674    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13675    /// additional enum variants at any time. Adding new variants is not considered
13676    /// a breaking change. Applications should write their code in anticipation of:
13677    ///
13678    /// - New values appearing in future releases of the client library, **and**
13679    /// - New values received dynamically, without application changes.
13680    ///
13681    /// Please consult the [Working with enums] section in the user guide for some
13682    /// guidelines.
13683    ///
13684    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13685    #[derive(Clone, Debug, PartialEq)]
13686    #[non_exhaustive]
13687    pub enum State {
13688        /// Unspecified appliance state. This is the default value.
13689        Unspecified,
13690        /// The appliance is operational and can be used.
13691        Active,
13692        /// The appliance is being deployed.
13693        Creating,
13694        /// If set, the enum was initialized with an unknown value.
13695        ///
13696        /// Applications can examine the value using [State::value] or
13697        /// [State::name].
13698        UnknownValue(state::UnknownValue),
13699    }
13700
13701    #[doc(hidden)]
13702    pub mod state {
13703        #[allow(unused_imports)]
13704        use super::*;
13705        #[derive(Clone, Debug, PartialEq)]
13706        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13707    }
13708
13709    impl State {
13710        /// Gets the enum value.
13711        ///
13712        /// Returns `None` if the enum contains an unknown value deserialized from
13713        /// the string representation of enums.
13714        pub fn value(&self) -> std::option::Option<i32> {
13715            match self {
13716                Self::Unspecified => std::option::Option::Some(0),
13717                Self::Active => std::option::Option::Some(1),
13718                Self::Creating => std::option::Option::Some(2),
13719                Self::UnknownValue(u) => u.0.value(),
13720            }
13721        }
13722
13723        /// Gets the enum value as a string.
13724        ///
13725        /// Returns `None` if the enum contains an unknown value deserialized from
13726        /// the integer representation of enums.
13727        pub fn name(&self) -> std::option::Option<&str> {
13728            match self {
13729                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13730                Self::Active => std::option::Option::Some("ACTIVE"),
13731                Self::Creating => std::option::Option::Some("CREATING"),
13732                Self::UnknownValue(u) => u.0.name(),
13733            }
13734        }
13735    }
13736
13737    impl std::default::Default for State {
13738        fn default() -> Self {
13739            use std::convert::From;
13740            Self::from(0)
13741        }
13742    }
13743
13744    impl std::fmt::Display for State {
13745        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13746            wkt::internal::display_enum(f, self.name(), self.value())
13747        }
13748    }
13749
13750    impl std::convert::From<i32> for State {
13751        fn from(value: i32) -> Self {
13752            match value {
13753                0 => Self::Unspecified,
13754                1 => Self::Active,
13755                2 => Self::Creating,
13756                _ => Self::UnknownValue(state::UnknownValue(
13757                    wkt::internal::UnknownEnumValue::Integer(value),
13758                )),
13759            }
13760        }
13761    }
13762
13763    impl std::convert::From<&str> for State {
13764        fn from(value: &str) -> Self {
13765            use std::string::ToString;
13766            match value {
13767                "STATE_UNSPECIFIED" => Self::Unspecified,
13768                "ACTIVE" => Self::Active,
13769                "CREATING" => Self::Creating,
13770                _ => Self::UnknownValue(state::UnknownValue(
13771                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13772                )),
13773            }
13774        }
13775    }
13776
13777    impl serde::ser::Serialize for State {
13778        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13779        where
13780            S: serde::Serializer,
13781        {
13782            match self {
13783                Self::Unspecified => serializer.serialize_i32(0),
13784                Self::Active => serializer.serialize_i32(1),
13785                Self::Creating => serializer.serialize_i32(2),
13786                Self::UnknownValue(u) => u.0.serialize(serializer),
13787            }
13788        }
13789    }
13790
13791    impl<'de> serde::de::Deserialize<'de> for State {
13792        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13793        where
13794            D: serde::Deserializer<'de>,
13795        {
13796            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13797                ".google.cloud.vmwareengine.v1.Nsx.State",
13798            ))
13799        }
13800    }
13801}
13802
13803/// Details about a vCenter Server management appliance.
13804#[derive(Clone, Default, PartialEq)]
13805#[non_exhaustive]
13806pub struct Vcenter {
13807    /// Internal IP address of the appliance.
13808    pub internal_ip: std::string::String,
13809
13810    /// Version of the appliance.
13811    pub version: std::string::String,
13812
13813    /// Output only. The state of the appliance.
13814    pub state: crate::model::vcenter::State,
13815
13816    /// Fully qualified domain name of the appliance.
13817    pub fqdn: std::string::String,
13818
13819    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13820}
13821
13822impl Vcenter {
13823    /// Creates a new default instance.
13824    pub fn new() -> Self {
13825        std::default::Default::default()
13826    }
13827
13828    /// Sets the value of [internal_ip][crate::model::Vcenter::internal_ip].
13829    ///
13830    /// # Example
13831    /// ```ignore,no_run
13832    /// # use google_cloud_vmwareengine_v1::model::Vcenter;
13833    /// let x = Vcenter::new().set_internal_ip("example");
13834    /// ```
13835    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13836        self.internal_ip = v.into();
13837        self
13838    }
13839
13840    /// Sets the value of [version][crate::model::Vcenter::version].
13841    ///
13842    /// # Example
13843    /// ```ignore,no_run
13844    /// # use google_cloud_vmwareengine_v1::model::Vcenter;
13845    /// let x = Vcenter::new().set_version("example");
13846    /// ```
13847    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13848        self.version = v.into();
13849        self
13850    }
13851
13852    /// Sets the value of [state][crate::model::Vcenter::state].
13853    ///
13854    /// # Example
13855    /// ```ignore,no_run
13856    /// # use google_cloud_vmwareengine_v1::model::Vcenter;
13857    /// use google_cloud_vmwareengine_v1::model::vcenter::State;
13858    /// let x0 = Vcenter::new().set_state(State::Active);
13859    /// let x1 = Vcenter::new().set_state(State::Creating);
13860    /// ```
13861    pub fn set_state<T: std::convert::Into<crate::model::vcenter::State>>(mut self, v: T) -> Self {
13862        self.state = v.into();
13863        self
13864    }
13865
13866    /// Sets the value of [fqdn][crate::model::Vcenter::fqdn].
13867    ///
13868    /// # Example
13869    /// ```ignore,no_run
13870    /// # use google_cloud_vmwareengine_v1::model::Vcenter;
13871    /// let x = Vcenter::new().set_fqdn("example");
13872    /// ```
13873    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13874        self.fqdn = v.into();
13875        self
13876    }
13877}
13878
13879impl wkt::message::Message for Vcenter {
13880    fn typename() -> &'static str {
13881        "type.googleapis.com/google.cloud.vmwareengine.v1.Vcenter"
13882    }
13883}
13884
13885/// Defines additional types related to [Vcenter].
13886pub mod vcenter {
13887    #[allow(unused_imports)]
13888    use super::*;
13889
13890    /// State of the appliance
13891    ///
13892    /// # Working with unknown values
13893    ///
13894    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13895    /// additional enum variants at any time. Adding new variants is not considered
13896    /// a breaking change. Applications should write their code in anticipation of:
13897    ///
13898    /// - New values appearing in future releases of the client library, **and**
13899    /// - New values received dynamically, without application changes.
13900    ///
13901    /// Please consult the [Working with enums] section in the user guide for some
13902    /// guidelines.
13903    ///
13904    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13905    #[derive(Clone, Debug, PartialEq)]
13906    #[non_exhaustive]
13907    pub enum State {
13908        /// Unspecified appliance state. This is the default value.
13909        Unspecified,
13910        /// The appliance is operational and can be used.
13911        Active,
13912        /// The appliance is being deployed.
13913        Creating,
13914        /// If set, the enum was initialized with an unknown value.
13915        ///
13916        /// Applications can examine the value using [State::value] or
13917        /// [State::name].
13918        UnknownValue(state::UnknownValue),
13919    }
13920
13921    #[doc(hidden)]
13922    pub mod state {
13923        #[allow(unused_imports)]
13924        use super::*;
13925        #[derive(Clone, Debug, PartialEq)]
13926        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13927    }
13928
13929    impl State {
13930        /// Gets the enum value.
13931        ///
13932        /// Returns `None` if the enum contains an unknown value deserialized from
13933        /// the string representation of enums.
13934        pub fn value(&self) -> std::option::Option<i32> {
13935            match self {
13936                Self::Unspecified => std::option::Option::Some(0),
13937                Self::Active => std::option::Option::Some(1),
13938                Self::Creating => std::option::Option::Some(2),
13939                Self::UnknownValue(u) => u.0.value(),
13940            }
13941        }
13942
13943        /// Gets the enum value as a string.
13944        ///
13945        /// Returns `None` if the enum contains an unknown value deserialized from
13946        /// the integer representation of enums.
13947        pub fn name(&self) -> std::option::Option<&str> {
13948            match self {
13949                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13950                Self::Active => std::option::Option::Some("ACTIVE"),
13951                Self::Creating => std::option::Option::Some("CREATING"),
13952                Self::UnknownValue(u) => u.0.name(),
13953            }
13954        }
13955    }
13956
13957    impl std::default::Default for State {
13958        fn default() -> Self {
13959            use std::convert::From;
13960            Self::from(0)
13961        }
13962    }
13963
13964    impl std::fmt::Display for State {
13965        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13966            wkt::internal::display_enum(f, self.name(), self.value())
13967        }
13968    }
13969
13970    impl std::convert::From<i32> for State {
13971        fn from(value: i32) -> Self {
13972            match value {
13973                0 => Self::Unspecified,
13974                1 => Self::Active,
13975                2 => Self::Creating,
13976                _ => Self::UnknownValue(state::UnknownValue(
13977                    wkt::internal::UnknownEnumValue::Integer(value),
13978                )),
13979            }
13980        }
13981    }
13982
13983    impl std::convert::From<&str> for State {
13984        fn from(value: &str) -> Self {
13985            use std::string::ToString;
13986            match value {
13987                "STATE_UNSPECIFIED" => Self::Unspecified,
13988                "ACTIVE" => Self::Active,
13989                "CREATING" => Self::Creating,
13990                _ => Self::UnknownValue(state::UnknownValue(
13991                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13992                )),
13993            }
13994        }
13995    }
13996
13997    impl serde::ser::Serialize for State {
13998        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13999        where
14000            S: serde::Serializer,
14001        {
14002            match self {
14003                Self::Unspecified => serializer.serialize_i32(0),
14004                Self::Active => serializer.serialize_i32(1),
14005                Self::Creating => serializer.serialize_i32(2),
14006                Self::UnknownValue(u) => u.0.serialize(serializer),
14007            }
14008        }
14009    }
14010
14011    impl<'de> serde::de::Deserialize<'de> for State {
14012        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14013        where
14014            D: serde::Deserializer<'de>,
14015        {
14016            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14017                ".google.cloud.vmwareengine.v1.Vcenter.State",
14018            ))
14019        }
14020    }
14021}
14022
14023/// Autoscaling settings define the rules used by VMware Engine to
14024/// automatically scale-out and scale-in the clusters in a private cloud.
14025#[derive(Clone, Default, PartialEq)]
14026#[non_exhaustive]
14027pub struct AutoscalingSettings {
14028    /// Required. The map with autoscaling policies applied to the cluster.
14029    /// The key is the identifier of the policy.
14030    /// It must meet the following requirements:
14031    ///
14032    /// * Only contains 1-63 alphanumeric characters and hyphens
14033    /// * Begins with an alphabetical character
14034    /// * Ends with a non-hyphen character
14035    /// * Not formatted as a UUID
14036    /// * Complies with [RFC
14037    ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
14038    ///
14039    /// Currently there map must contain only one element
14040    /// that describes the autoscaling policy for compute nodes.
14041    pub autoscaling_policies: std::collections::HashMap<
14042        std::string::String,
14043        crate::model::autoscaling_settings::AutoscalingPolicy,
14044    >,
14045
14046    /// Optional. Minimum number of nodes of any type in a cluster.
14047    /// If not specified the default limits apply.
14048    pub min_cluster_node_count: i32,
14049
14050    /// Optional. Maximum number of nodes of any type in a cluster.
14051    /// If not specified the default limits apply.
14052    pub max_cluster_node_count: i32,
14053
14054    /// Optional. The minimum duration between consecutive autoscale operations.
14055    /// It starts once addition or removal of nodes is fully completed.
14056    /// Defaults to 30 minutes if not specified. Cool down period must be in whole
14057    /// minutes (for example, 30, 31, 50, 180 minutes).
14058    pub cool_down_period: std::option::Option<wkt::Duration>,
14059
14060    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14061}
14062
14063impl AutoscalingSettings {
14064    /// Creates a new default instance.
14065    pub fn new() -> Self {
14066        std::default::Default::default()
14067    }
14068
14069    /// Sets the value of [autoscaling_policies][crate::model::AutoscalingSettings::autoscaling_policies].
14070    ///
14071    /// # Example
14072    /// ```ignore,no_run
14073    /// # use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
14074    /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14075    /// let x = AutoscalingSettings::new().set_autoscaling_policies([
14076    ///     ("key0", AutoscalingPolicy::default()/* use setters */),
14077    ///     ("key1", AutoscalingPolicy::default()/* use (different) setters */),
14078    /// ]);
14079    /// ```
14080    pub fn set_autoscaling_policies<T, K, V>(mut self, v: T) -> Self
14081    where
14082        T: std::iter::IntoIterator<Item = (K, V)>,
14083        K: std::convert::Into<std::string::String>,
14084        V: std::convert::Into<crate::model::autoscaling_settings::AutoscalingPolicy>,
14085    {
14086        use std::iter::Iterator;
14087        self.autoscaling_policies = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14088        self
14089    }
14090
14091    /// Sets the value of [min_cluster_node_count][crate::model::AutoscalingSettings::min_cluster_node_count].
14092    ///
14093    /// # Example
14094    /// ```ignore,no_run
14095    /// # use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
14096    /// let x = AutoscalingSettings::new().set_min_cluster_node_count(42);
14097    /// ```
14098    pub fn set_min_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14099        self.min_cluster_node_count = v.into();
14100        self
14101    }
14102
14103    /// Sets the value of [max_cluster_node_count][crate::model::AutoscalingSettings::max_cluster_node_count].
14104    ///
14105    /// # Example
14106    /// ```ignore,no_run
14107    /// # use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
14108    /// let x = AutoscalingSettings::new().set_max_cluster_node_count(42);
14109    /// ```
14110    pub fn set_max_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14111        self.max_cluster_node_count = v.into();
14112        self
14113    }
14114
14115    /// Sets the value of [cool_down_period][crate::model::AutoscalingSettings::cool_down_period].
14116    ///
14117    /// # Example
14118    /// ```ignore,no_run
14119    /// # use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
14120    /// use wkt::Duration;
14121    /// let x = AutoscalingSettings::new().set_cool_down_period(Duration::default()/* use setters */);
14122    /// ```
14123    pub fn set_cool_down_period<T>(mut self, v: T) -> Self
14124    where
14125        T: std::convert::Into<wkt::Duration>,
14126    {
14127        self.cool_down_period = std::option::Option::Some(v.into());
14128        self
14129    }
14130
14131    /// Sets or clears the value of [cool_down_period][crate::model::AutoscalingSettings::cool_down_period].
14132    ///
14133    /// # Example
14134    /// ```ignore,no_run
14135    /// # use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
14136    /// use wkt::Duration;
14137    /// let x = AutoscalingSettings::new().set_or_clear_cool_down_period(Some(Duration::default()/* use setters */));
14138    /// let x = AutoscalingSettings::new().set_or_clear_cool_down_period(None::<Duration>);
14139    /// ```
14140    pub fn set_or_clear_cool_down_period<T>(mut self, v: std::option::Option<T>) -> Self
14141    where
14142        T: std::convert::Into<wkt::Duration>,
14143    {
14144        self.cool_down_period = v.map(|x| x.into());
14145        self
14146    }
14147}
14148
14149impl wkt::message::Message for AutoscalingSettings {
14150    fn typename() -> &'static str {
14151        "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings"
14152    }
14153}
14154
14155/// Defines additional types related to [AutoscalingSettings].
14156pub mod autoscaling_settings {
14157    #[allow(unused_imports)]
14158    use super::*;
14159
14160    /// Thresholds define the utilization of resources triggering
14161    /// scale-out and scale-in operations.
14162    #[derive(Clone, Default, PartialEq)]
14163    #[non_exhaustive]
14164    pub struct Thresholds {
14165        /// Required. The utilization triggering the scale-out operation in percent.
14166        pub scale_out: i32,
14167
14168        /// Required. The utilization triggering the scale-in operation in percent.
14169        pub scale_in: i32,
14170
14171        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14172    }
14173
14174    impl Thresholds {
14175        /// Creates a new default instance.
14176        pub fn new() -> Self {
14177            std::default::Default::default()
14178        }
14179
14180        /// Sets the value of [scale_out][crate::model::autoscaling_settings::Thresholds::scale_out].
14181        ///
14182        /// # Example
14183        /// ```ignore,no_run
14184        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14185        /// let x = Thresholds::new().set_scale_out(42);
14186        /// ```
14187        pub fn set_scale_out<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14188            self.scale_out = v.into();
14189            self
14190        }
14191
14192        /// Sets the value of [scale_in][crate::model::autoscaling_settings::Thresholds::scale_in].
14193        ///
14194        /// # Example
14195        /// ```ignore,no_run
14196        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14197        /// let x = Thresholds::new().set_scale_in(42);
14198        /// ```
14199        pub fn set_scale_in<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14200            self.scale_in = v.into();
14201            self
14202        }
14203    }
14204
14205    impl wkt::message::Message for Thresholds {
14206        fn typename() -> &'static str {
14207            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds"
14208        }
14209    }
14210
14211    /// Autoscaling policy describes the behavior of the autoscaling
14212    /// with respect to the resource utilization.
14213    /// The scale-out operation is initiated if the utilization
14214    /// exceeds ANY of the respective thresholds.
14215    /// The scale-in operation is initiated if the utilization
14216    /// is below ALL of the respective thresholds.
14217    #[derive(Clone, Default, PartialEq)]
14218    #[non_exhaustive]
14219    pub struct AutoscalingPolicy {
14220        /// Required. The canonical identifier of the node type to add or remove.
14221        /// Corresponds to the `NodeType`.
14222        pub node_type_id: std::string::String,
14223
14224        /// Required. Number of nodes to add to a cluster during a scale-out
14225        /// operation. Must be divisible by 2 for stretched clusters. During a
14226        /// scale-in operation only one node (or 2 for stretched clusters) are
14227        /// removed in a single iteration.
14228        pub scale_out_size: i32,
14229
14230        /// Optional. Utilization thresholds pertaining to CPU utilization.
14231        pub cpu_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
14232
14233        /// Optional. Utilization thresholds pertaining to amount of granted memory.
14234        pub granted_memory_thresholds:
14235            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
14236
14237        /// Optional. Utilization thresholds pertaining to amount of consumed memory.
14238        pub consumed_memory_thresholds:
14239            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
14240
14241        /// Optional. Utilization thresholds pertaining to amount of consumed
14242        /// storage.
14243        pub storage_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
14244
14245        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14246    }
14247
14248    impl AutoscalingPolicy {
14249        /// Creates a new default instance.
14250        pub fn new() -> Self {
14251            std::default::Default::default()
14252        }
14253
14254        /// Sets the value of [node_type_id][crate::model::autoscaling_settings::AutoscalingPolicy::node_type_id].
14255        ///
14256        /// # Example
14257        /// ```ignore,no_run
14258        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14259        /// let x = AutoscalingPolicy::new().set_node_type_id("example");
14260        /// ```
14261        pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(
14262            mut self,
14263            v: T,
14264        ) -> Self {
14265            self.node_type_id = v.into();
14266            self
14267        }
14268
14269        /// Sets the value of [scale_out_size][crate::model::autoscaling_settings::AutoscalingPolicy::scale_out_size].
14270        ///
14271        /// # Example
14272        /// ```ignore,no_run
14273        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14274        /// let x = AutoscalingPolicy::new().set_scale_out_size(42);
14275        /// ```
14276        pub fn set_scale_out_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14277            self.scale_out_size = v.into();
14278            self
14279        }
14280
14281        /// Sets the value of [cpu_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::cpu_thresholds].
14282        ///
14283        /// # Example
14284        /// ```ignore,no_run
14285        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14286        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14287        /// let x = AutoscalingPolicy::new().set_cpu_thresholds(Thresholds::default()/* use setters */);
14288        /// ```
14289        pub fn set_cpu_thresholds<T>(mut self, v: T) -> Self
14290        where
14291            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14292        {
14293            self.cpu_thresholds = std::option::Option::Some(v.into());
14294            self
14295        }
14296
14297        /// Sets or clears the value of [cpu_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::cpu_thresholds].
14298        ///
14299        /// # Example
14300        /// ```ignore,no_run
14301        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14302        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14303        /// let x = AutoscalingPolicy::new().set_or_clear_cpu_thresholds(Some(Thresholds::default()/* use setters */));
14304        /// let x = AutoscalingPolicy::new().set_or_clear_cpu_thresholds(None::<Thresholds>);
14305        /// ```
14306        pub fn set_or_clear_cpu_thresholds<T>(mut self, v: std::option::Option<T>) -> Self
14307        where
14308            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14309        {
14310            self.cpu_thresholds = v.map(|x| x.into());
14311            self
14312        }
14313
14314        /// Sets the value of [granted_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::granted_memory_thresholds].
14315        ///
14316        /// # Example
14317        /// ```ignore,no_run
14318        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14319        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14320        /// let x = AutoscalingPolicy::new().set_granted_memory_thresholds(Thresholds::default()/* use setters */);
14321        /// ```
14322        pub fn set_granted_memory_thresholds<T>(mut self, v: T) -> Self
14323        where
14324            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14325        {
14326            self.granted_memory_thresholds = std::option::Option::Some(v.into());
14327            self
14328        }
14329
14330        /// Sets or clears the value of [granted_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::granted_memory_thresholds].
14331        ///
14332        /// # Example
14333        /// ```ignore,no_run
14334        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14335        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14336        /// let x = AutoscalingPolicy::new().set_or_clear_granted_memory_thresholds(Some(Thresholds::default()/* use setters */));
14337        /// let x = AutoscalingPolicy::new().set_or_clear_granted_memory_thresholds(None::<Thresholds>);
14338        /// ```
14339        pub fn set_or_clear_granted_memory_thresholds<T>(
14340            mut self,
14341            v: std::option::Option<T>,
14342        ) -> Self
14343        where
14344            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14345        {
14346            self.granted_memory_thresholds = v.map(|x| x.into());
14347            self
14348        }
14349
14350        /// Sets the value of [consumed_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::consumed_memory_thresholds].
14351        ///
14352        /// # Example
14353        /// ```ignore,no_run
14354        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14355        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14356        /// let x = AutoscalingPolicy::new().set_consumed_memory_thresholds(Thresholds::default()/* use setters */);
14357        /// ```
14358        pub fn set_consumed_memory_thresholds<T>(mut self, v: T) -> Self
14359        where
14360            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14361        {
14362            self.consumed_memory_thresholds = std::option::Option::Some(v.into());
14363            self
14364        }
14365
14366        /// Sets or clears the value of [consumed_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::consumed_memory_thresholds].
14367        ///
14368        /// # Example
14369        /// ```ignore,no_run
14370        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14371        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14372        /// let x = AutoscalingPolicy::new().set_or_clear_consumed_memory_thresholds(Some(Thresholds::default()/* use setters */));
14373        /// let x = AutoscalingPolicy::new().set_or_clear_consumed_memory_thresholds(None::<Thresholds>);
14374        /// ```
14375        pub fn set_or_clear_consumed_memory_thresholds<T>(
14376            mut self,
14377            v: std::option::Option<T>,
14378        ) -> Self
14379        where
14380            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14381        {
14382            self.consumed_memory_thresholds = v.map(|x| x.into());
14383            self
14384        }
14385
14386        /// Sets the value of [storage_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::storage_thresholds].
14387        ///
14388        /// # Example
14389        /// ```ignore,no_run
14390        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14391        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14392        /// let x = AutoscalingPolicy::new().set_storage_thresholds(Thresholds::default()/* use setters */);
14393        /// ```
14394        pub fn set_storage_thresholds<T>(mut self, v: T) -> Self
14395        where
14396            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14397        {
14398            self.storage_thresholds = std::option::Option::Some(v.into());
14399            self
14400        }
14401
14402        /// Sets or clears the value of [storage_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::storage_thresholds].
14403        ///
14404        /// # Example
14405        /// ```ignore,no_run
14406        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14407        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14408        /// let x = AutoscalingPolicy::new().set_or_clear_storage_thresholds(Some(Thresholds::default()/* use setters */));
14409        /// let x = AutoscalingPolicy::new().set_or_clear_storage_thresholds(None::<Thresholds>);
14410        /// ```
14411        pub fn set_or_clear_storage_thresholds<T>(mut self, v: std::option::Option<T>) -> Self
14412        where
14413            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14414        {
14415            self.storage_thresholds = v.map(|x| x.into());
14416            self
14417        }
14418    }
14419
14420    impl wkt::message::Message for AutoscalingPolicy {
14421        fn typename() -> &'static str {
14422            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.AutoscalingPolicy"
14423        }
14424    }
14425}
14426
14427/// DNS forwarding config.
14428/// This config defines a list of domain to name server mappings,
14429/// and is attached to the private cloud for custom domain resolution.
14430#[derive(Clone, Default, PartialEq)]
14431#[non_exhaustive]
14432pub struct DnsForwarding {
14433    /// Output only. The resource name of this DNS profile.
14434    /// Resource names are schemeless URIs that follow the conventions in
14435    /// <https://cloud.google.com/apis/design/resource_names>.
14436    /// For example:
14437    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
14438    pub name: std::string::String,
14439
14440    /// Output only. Creation time of this resource.
14441    pub create_time: std::option::Option<wkt::Timestamp>,
14442
14443    /// Output only. Last update time of this resource.
14444    pub update_time: std::option::Option<wkt::Timestamp>,
14445
14446    /// Required. List of domain mappings to configure
14447    pub forwarding_rules: std::vec::Vec<crate::model::dns_forwarding::ForwardingRule>,
14448
14449    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14450}
14451
14452impl DnsForwarding {
14453    /// Creates a new default instance.
14454    pub fn new() -> Self {
14455        std::default::Default::default()
14456    }
14457
14458    /// Sets the value of [name][crate::model::DnsForwarding::name].
14459    ///
14460    /// # Example
14461    /// ```ignore,no_run
14462    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14463    /// let x = DnsForwarding::new().set_name("example");
14464    /// ```
14465    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14466        self.name = v.into();
14467        self
14468    }
14469
14470    /// Sets the value of [create_time][crate::model::DnsForwarding::create_time].
14471    ///
14472    /// # Example
14473    /// ```ignore,no_run
14474    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14475    /// use wkt::Timestamp;
14476    /// let x = DnsForwarding::new().set_create_time(Timestamp::default()/* use setters */);
14477    /// ```
14478    pub fn set_create_time<T>(mut self, v: T) -> Self
14479    where
14480        T: std::convert::Into<wkt::Timestamp>,
14481    {
14482        self.create_time = std::option::Option::Some(v.into());
14483        self
14484    }
14485
14486    /// Sets or clears the value of [create_time][crate::model::DnsForwarding::create_time].
14487    ///
14488    /// # Example
14489    /// ```ignore,no_run
14490    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14491    /// use wkt::Timestamp;
14492    /// let x = DnsForwarding::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14493    /// let x = DnsForwarding::new().set_or_clear_create_time(None::<Timestamp>);
14494    /// ```
14495    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14496    where
14497        T: std::convert::Into<wkt::Timestamp>,
14498    {
14499        self.create_time = v.map(|x| x.into());
14500        self
14501    }
14502
14503    /// Sets the value of [update_time][crate::model::DnsForwarding::update_time].
14504    ///
14505    /// # Example
14506    /// ```ignore,no_run
14507    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14508    /// use wkt::Timestamp;
14509    /// let x = DnsForwarding::new().set_update_time(Timestamp::default()/* use setters */);
14510    /// ```
14511    pub fn set_update_time<T>(mut self, v: T) -> Self
14512    where
14513        T: std::convert::Into<wkt::Timestamp>,
14514    {
14515        self.update_time = std::option::Option::Some(v.into());
14516        self
14517    }
14518
14519    /// Sets or clears the value of [update_time][crate::model::DnsForwarding::update_time].
14520    ///
14521    /// # Example
14522    /// ```ignore,no_run
14523    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14524    /// use wkt::Timestamp;
14525    /// let x = DnsForwarding::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
14526    /// let x = DnsForwarding::new().set_or_clear_update_time(None::<Timestamp>);
14527    /// ```
14528    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14529    where
14530        T: std::convert::Into<wkt::Timestamp>,
14531    {
14532        self.update_time = v.map(|x| x.into());
14533        self
14534    }
14535
14536    /// Sets the value of [forwarding_rules][crate::model::DnsForwarding::forwarding_rules].
14537    ///
14538    /// # Example
14539    /// ```ignore,no_run
14540    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14541    /// use google_cloud_vmwareengine_v1::model::dns_forwarding::ForwardingRule;
14542    /// let x = DnsForwarding::new()
14543    ///     .set_forwarding_rules([
14544    ///         ForwardingRule::default()/* use setters */,
14545    ///         ForwardingRule::default()/* use (different) setters */,
14546    ///     ]);
14547    /// ```
14548    pub fn set_forwarding_rules<T, V>(mut self, v: T) -> Self
14549    where
14550        T: std::iter::IntoIterator<Item = V>,
14551        V: std::convert::Into<crate::model::dns_forwarding::ForwardingRule>,
14552    {
14553        use std::iter::Iterator;
14554        self.forwarding_rules = v.into_iter().map(|i| i.into()).collect();
14555        self
14556    }
14557}
14558
14559impl wkt::message::Message for DnsForwarding {
14560    fn typename() -> &'static str {
14561        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding"
14562    }
14563}
14564
14565/// Defines additional types related to [DnsForwarding].
14566pub mod dns_forwarding {
14567    #[allow(unused_imports)]
14568    use super::*;
14569
14570    /// A forwarding rule is a mapping of a `domain` to `name_servers`.
14571    /// This mapping allows VMware Engine to resolve domains for attached private
14572    /// clouds by forwarding DNS requests for a given domain to the specified
14573    /// nameservers.
14574    #[derive(Clone, Default, PartialEq)]
14575    #[non_exhaustive]
14576    pub struct ForwardingRule {
14577        /// Required. Domain used to resolve a `name_servers` list.
14578        pub domain: std::string::String,
14579
14580        /// Required. List of DNS servers to use for domain resolution
14581        pub name_servers: std::vec::Vec<std::string::String>,
14582
14583        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14584    }
14585
14586    impl ForwardingRule {
14587        /// Creates a new default instance.
14588        pub fn new() -> Self {
14589            std::default::Default::default()
14590        }
14591
14592        /// Sets the value of [domain][crate::model::dns_forwarding::ForwardingRule::domain].
14593        ///
14594        /// # Example
14595        /// ```ignore,no_run
14596        /// # use google_cloud_vmwareengine_v1::model::dns_forwarding::ForwardingRule;
14597        /// let x = ForwardingRule::new().set_domain("example");
14598        /// ```
14599        pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14600            self.domain = v.into();
14601            self
14602        }
14603
14604        /// Sets the value of [name_servers][crate::model::dns_forwarding::ForwardingRule::name_servers].
14605        ///
14606        /// # Example
14607        /// ```ignore,no_run
14608        /// # use google_cloud_vmwareengine_v1::model::dns_forwarding::ForwardingRule;
14609        /// let x = ForwardingRule::new().set_name_servers(["a", "b", "c"]);
14610        /// ```
14611        pub fn set_name_servers<T, V>(mut self, v: T) -> Self
14612        where
14613            T: std::iter::IntoIterator<Item = V>,
14614            V: std::convert::Into<std::string::String>,
14615        {
14616            use std::iter::Iterator;
14617            self.name_servers = v.into_iter().map(|i| i.into()).collect();
14618            self
14619        }
14620    }
14621
14622    impl wkt::message::Message for ForwardingRule {
14623        fn typename() -> &'static str {
14624            "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule"
14625        }
14626    }
14627}
14628
14629/// Details of a network peering.
14630#[derive(Clone, Default, PartialEq)]
14631#[non_exhaustive]
14632pub struct NetworkPeering {
14633    /// Output only. The resource name of the network peering. NetworkPeering is a
14634    /// global resource and location can only be global. Resource names are
14635    /// scheme-less URIs that follow the conventions in
14636    /// <https://cloud.google.com/apis/design/resource_names>.
14637    /// For example:
14638    /// `projects/my-project/locations/global/networkPeerings/my-peering`
14639    pub name: std::string::String,
14640
14641    /// Output only. Creation time of this resource.
14642    pub create_time: std::option::Option<wkt::Timestamp>,
14643
14644    /// Output only. Last update time of this resource.
14645    pub update_time: std::option::Option<wkt::Timestamp>,
14646
14647    /// Required. The relative resource name of the network to peer with
14648    /// a standard VMware Engine network. The provided network can be a
14649    /// consumer VPC network or another standard VMware Engine network. If the
14650    /// `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form:
14651    /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
14652    /// Otherwise specify the name in the form:
14653    /// `projects/{project}/global/networks/{network_id}`, where
14654    /// `{project}` can either be a project number or a project ID.
14655    pub peer_network: std::string::String,
14656
14657    /// Optional. True if custom routes are exported to the peered network;
14658    /// false otherwise. The default value is true.
14659    pub export_custom_routes: std::option::Option<bool>,
14660
14661    /// Optional. True if custom routes are imported from the peered network;
14662    /// false otherwise. The default value is true.
14663    pub import_custom_routes: std::option::Option<bool>,
14664
14665    /// Optional. True if full mesh connectivity is created and managed
14666    /// automatically between peered networks; false otherwise. Currently this
14667    /// field is always true because Google Compute Engine automatically creates
14668    /// and manages subnetwork routes between two VPC networks when peering state
14669    /// is 'ACTIVE'.
14670    pub exchange_subnet_routes: std::option::Option<bool>,
14671
14672    /// Optional. True if all subnet routes with a public IP address range are
14673    /// exported; false otherwise. The default value is true. IPv4 special-use
14674    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
14675    /// exported to peers and are not controlled by this field.
14676    pub export_custom_routes_with_public_ip: std::option::Option<bool>,
14677
14678    /// Optional. True if all subnet routes with public IP address range are
14679    /// imported; false otherwise. The default value is true. IPv4 special-use
14680    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
14681    /// imported to peers and are not controlled by this field.
14682    pub import_custom_routes_with_public_ip: std::option::Option<bool>,
14683
14684    /// Output only. State of the network peering. This field
14685    /// has a value of 'ACTIVE' when there's a matching configuration in the peer
14686    /// network. New values may be added to this enum when appropriate.
14687    pub state: crate::model::network_peering::State,
14688
14689    /// Output only. Output Only. Details about the current state of the network
14690    /// peering.
14691    pub state_details: std::string::String,
14692
14693    /// Optional. Maximum transmission unit (MTU) in bytes.
14694    /// The default value is `1500`. If a value of `0` is provided for this field,
14695    /// VMware Engine uses the default value instead.
14696    pub peer_mtu: i32,
14697
14698    /// Required. The type of the network to peer with the VMware Engine network.
14699    pub peer_network_type: crate::model::network_peering::PeerNetworkType,
14700
14701    /// Output only. System-generated unique identifier for the resource.
14702    pub uid: std::string::String,
14703
14704    /// Required. The relative resource name of the VMware Engine network.
14705    /// Specify the name in the following form:
14706    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
14707    /// where `{project}` can either be a project number or a project ID.
14708    pub vmware_engine_network: std::string::String,
14709
14710    /// Optional. User-provided description for this network peering.
14711    pub description: std::string::String,
14712
14713    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14714}
14715
14716impl NetworkPeering {
14717    /// Creates a new default instance.
14718    pub fn new() -> Self {
14719        std::default::Default::default()
14720    }
14721
14722    /// Sets the value of [name][crate::model::NetworkPeering::name].
14723    ///
14724    /// # Example
14725    /// ```ignore,no_run
14726    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14727    /// let x = NetworkPeering::new().set_name("example");
14728    /// ```
14729    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14730        self.name = v.into();
14731        self
14732    }
14733
14734    /// Sets the value of [create_time][crate::model::NetworkPeering::create_time].
14735    ///
14736    /// # Example
14737    /// ```ignore,no_run
14738    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14739    /// use wkt::Timestamp;
14740    /// let x = NetworkPeering::new().set_create_time(Timestamp::default()/* use setters */);
14741    /// ```
14742    pub fn set_create_time<T>(mut self, v: T) -> Self
14743    where
14744        T: std::convert::Into<wkt::Timestamp>,
14745    {
14746        self.create_time = std::option::Option::Some(v.into());
14747        self
14748    }
14749
14750    /// Sets or clears the value of [create_time][crate::model::NetworkPeering::create_time].
14751    ///
14752    /// # Example
14753    /// ```ignore,no_run
14754    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14755    /// use wkt::Timestamp;
14756    /// let x = NetworkPeering::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14757    /// let x = NetworkPeering::new().set_or_clear_create_time(None::<Timestamp>);
14758    /// ```
14759    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14760    where
14761        T: std::convert::Into<wkt::Timestamp>,
14762    {
14763        self.create_time = v.map(|x| x.into());
14764        self
14765    }
14766
14767    /// Sets the value of [update_time][crate::model::NetworkPeering::update_time].
14768    ///
14769    /// # Example
14770    /// ```ignore,no_run
14771    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14772    /// use wkt::Timestamp;
14773    /// let x = NetworkPeering::new().set_update_time(Timestamp::default()/* use setters */);
14774    /// ```
14775    pub fn set_update_time<T>(mut self, v: T) -> Self
14776    where
14777        T: std::convert::Into<wkt::Timestamp>,
14778    {
14779        self.update_time = std::option::Option::Some(v.into());
14780        self
14781    }
14782
14783    /// Sets or clears the value of [update_time][crate::model::NetworkPeering::update_time].
14784    ///
14785    /// # Example
14786    /// ```ignore,no_run
14787    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14788    /// use wkt::Timestamp;
14789    /// let x = NetworkPeering::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
14790    /// let x = NetworkPeering::new().set_or_clear_update_time(None::<Timestamp>);
14791    /// ```
14792    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14793    where
14794        T: std::convert::Into<wkt::Timestamp>,
14795    {
14796        self.update_time = v.map(|x| x.into());
14797        self
14798    }
14799
14800    /// Sets the value of [peer_network][crate::model::NetworkPeering::peer_network].
14801    ///
14802    /// # Example
14803    /// ```ignore,no_run
14804    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14805    /// let x = NetworkPeering::new().set_peer_network("example");
14806    /// ```
14807    pub fn set_peer_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14808        self.peer_network = v.into();
14809        self
14810    }
14811
14812    /// Sets the value of [export_custom_routes][crate::model::NetworkPeering::export_custom_routes].
14813    ///
14814    /// # Example
14815    /// ```ignore,no_run
14816    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14817    /// let x = NetworkPeering::new().set_export_custom_routes(true);
14818    /// ```
14819    pub fn set_export_custom_routes<T>(mut self, v: T) -> Self
14820    where
14821        T: std::convert::Into<bool>,
14822    {
14823        self.export_custom_routes = std::option::Option::Some(v.into());
14824        self
14825    }
14826
14827    /// Sets or clears the value of [export_custom_routes][crate::model::NetworkPeering::export_custom_routes].
14828    ///
14829    /// # Example
14830    /// ```ignore,no_run
14831    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14832    /// let x = NetworkPeering::new().set_or_clear_export_custom_routes(Some(false));
14833    /// let x = NetworkPeering::new().set_or_clear_export_custom_routes(None::<bool>);
14834    /// ```
14835    pub fn set_or_clear_export_custom_routes<T>(mut self, v: std::option::Option<T>) -> Self
14836    where
14837        T: std::convert::Into<bool>,
14838    {
14839        self.export_custom_routes = v.map(|x| x.into());
14840        self
14841    }
14842
14843    /// Sets the value of [import_custom_routes][crate::model::NetworkPeering::import_custom_routes].
14844    ///
14845    /// # Example
14846    /// ```ignore,no_run
14847    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14848    /// let x = NetworkPeering::new().set_import_custom_routes(true);
14849    /// ```
14850    pub fn set_import_custom_routes<T>(mut self, v: T) -> Self
14851    where
14852        T: std::convert::Into<bool>,
14853    {
14854        self.import_custom_routes = std::option::Option::Some(v.into());
14855        self
14856    }
14857
14858    /// Sets or clears the value of [import_custom_routes][crate::model::NetworkPeering::import_custom_routes].
14859    ///
14860    /// # Example
14861    /// ```ignore,no_run
14862    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14863    /// let x = NetworkPeering::new().set_or_clear_import_custom_routes(Some(false));
14864    /// let x = NetworkPeering::new().set_or_clear_import_custom_routes(None::<bool>);
14865    /// ```
14866    pub fn set_or_clear_import_custom_routes<T>(mut self, v: std::option::Option<T>) -> Self
14867    where
14868        T: std::convert::Into<bool>,
14869    {
14870        self.import_custom_routes = v.map(|x| x.into());
14871        self
14872    }
14873
14874    /// Sets the value of [exchange_subnet_routes][crate::model::NetworkPeering::exchange_subnet_routes].
14875    ///
14876    /// # Example
14877    /// ```ignore,no_run
14878    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14879    /// let x = NetworkPeering::new().set_exchange_subnet_routes(true);
14880    /// ```
14881    pub fn set_exchange_subnet_routes<T>(mut self, v: T) -> Self
14882    where
14883        T: std::convert::Into<bool>,
14884    {
14885        self.exchange_subnet_routes = std::option::Option::Some(v.into());
14886        self
14887    }
14888
14889    /// Sets or clears the value of [exchange_subnet_routes][crate::model::NetworkPeering::exchange_subnet_routes].
14890    ///
14891    /// # Example
14892    /// ```ignore,no_run
14893    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14894    /// let x = NetworkPeering::new().set_or_clear_exchange_subnet_routes(Some(false));
14895    /// let x = NetworkPeering::new().set_or_clear_exchange_subnet_routes(None::<bool>);
14896    /// ```
14897    pub fn set_or_clear_exchange_subnet_routes<T>(mut self, v: std::option::Option<T>) -> Self
14898    where
14899        T: std::convert::Into<bool>,
14900    {
14901        self.exchange_subnet_routes = v.map(|x| x.into());
14902        self
14903    }
14904
14905    /// Sets the value of [export_custom_routes_with_public_ip][crate::model::NetworkPeering::export_custom_routes_with_public_ip].
14906    ///
14907    /// # Example
14908    /// ```ignore,no_run
14909    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14910    /// let x = NetworkPeering::new().set_export_custom_routes_with_public_ip(true);
14911    /// ```
14912    pub fn set_export_custom_routes_with_public_ip<T>(mut self, v: T) -> Self
14913    where
14914        T: std::convert::Into<bool>,
14915    {
14916        self.export_custom_routes_with_public_ip = std::option::Option::Some(v.into());
14917        self
14918    }
14919
14920    /// Sets or clears the value of [export_custom_routes_with_public_ip][crate::model::NetworkPeering::export_custom_routes_with_public_ip].
14921    ///
14922    /// # Example
14923    /// ```ignore,no_run
14924    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14925    /// let x = NetworkPeering::new().set_or_clear_export_custom_routes_with_public_ip(Some(false));
14926    /// let x = NetworkPeering::new().set_or_clear_export_custom_routes_with_public_ip(None::<bool>);
14927    /// ```
14928    pub fn set_or_clear_export_custom_routes_with_public_ip<T>(
14929        mut self,
14930        v: std::option::Option<T>,
14931    ) -> Self
14932    where
14933        T: std::convert::Into<bool>,
14934    {
14935        self.export_custom_routes_with_public_ip = v.map(|x| x.into());
14936        self
14937    }
14938
14939    /// Sets the value of [import_custom_routes_with_public_ip][crate::model::NetworkPeering::import_custom_routes_with_public_ip].
14940    ///
14941    /// # Example
14942    /// ```ignore,no_run
14943    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14944    /// let x = NetworkPeering::new().set_import_custom_routes_with_public_ip(true);
14945    /// ```
14946    pub fn set_import_custom_routes_with_public_ip<T>(mut self, v: T) -> Self
14947    where
14948        T: std::convert::Into<bool>,
14949    {
14950        self.import_custom_routes_with_public_ip = std::option::Option::Some(v.into());
14951        self
14952    }
14953
14954    /// Sets or clears the value of [import_custom_routes_with_public_ip][crate::model::NetworkPeering::import_custom_routes_with_public_ip].
14955    ///
14956    /// # Example
14957    /// ```ignore,no_run
14958    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14959    /// let x = NetworkPeering::new().set_or_clear_import_custom_routes_with_public_ip(Some(false));
14960    /// let x = NetworkPeering::new().set_or_clear_import_custom_routes_with_public_ip(None::<bool>);
14961    /// ```
14962    pub fn set_or_clear_import_custom_routes_with_public_ip<T>(
14963        mut self,
14964        v: std::option::Option<T>,
14965    ) -> Self
14966    where
14967        T: std::convert::Into<bool>,
14968    {
14969        self.import_custom_routes_with_public_ip = v.map(|x| x.into());
14970        self
14971    }
14972
14973    /// Sets the value of [state][crate::model::NetworkPeering::state].
14974    ///
14975    /// # Example
14976    /// ```ignore,no_run
14977    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14978    /// use google_cloud_vmwareengine_v1::model::network_peering::State;
14979    /// let x0 = NetworkPeering::new().set_state(State::Inactive);
14980    /// let x1 = NetworkPeering::new().set_state(State::Active);
14981    /// let x2 = NetworkPeering::new().set_state(State::Creating);
14982    /// ```
14983    pub fn set_state<T: std::convert::Into<crate::model::network_peering::State>>(
14984        mut self,
14985        v: T,
14986    ) -> Self {
14987        self.state = v.into();
14988        self
14989    }
14990
14991    /// Sets the value of [state_details][crate::model::NetworkPeering::state_details].
14992    ///
14993    /// # Example
14994    /// ```ignore,no_run
14995    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14996    /// let x = NetworkPeering::new().set_state_details("example");
14997    /// ```
14998    pub fn set_state_details<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14999        self.state_details = v.into();
15000        self
15001    }
15002
15003    /// Sets the value of [peer_mtu][crate::model::NetworkPeering::peer_mtu].
15004    ///
15005    /// # Example
15006    /// ```ignore,no_run
15007    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15008    /// let x = NetworkPeering::new().set_peer_mtu(42);
15009    /// ```
15010    pub fn set_peer_mtu<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15011        self.peer_mtu = v.into();
15012        self
15013    }
15014
15015    /// Sets the value of [peer_network_type][crate::model::NetworkPeering::peer_network_type].
15016    ///
15017    /// # Example
15018    /// ```ignore,no_run
15019    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15020    /// use google_cloud_vmwareengine_v1::model::network_peering::PeerNetworkType;
15021    /// let x0 = NetworkPeering::new().set_peer_network_type(PeerNetworkType::Standard);
15022    /// let x1 = NetworkPeering::new().set_peer_network_type(PeerNetworkType::VmwareEngineNetwork);
15023    /// let x2 = NetworkPeering::new().set_peer_network_type(PeerNetworkType::PrivateServicesAccess);
15024    /// ```
15025    pub fn set_peer_network_type<
15026        T: std::convert::Into<crate::model::network_peering::PeerNetworkType>,
15027    >(
15028        mut self,
15029        v: T,
15030    ) -> Self {
15031        self.peer_network_type = v.into();
15032        self
15033    }
15034
15035    /// Sets the value of [uid][crate::model::NetworkPeering::uid].
15036    ///
15037    /// # Example
15038    /// ```ignore,no_run
15039    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15040    /// let x = NetworkPeering::new().set_uid("example");
15041    /// ```
15042    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15043        self.uid = v.into();
15044        self
15045    }
15046
15047    /// Sets the value of [vmware_engine_network][crate::model::NetworkPeering::vmware_engine_network].
15048    ///
15049    /// # Example
15050    /// ```ignore,no_run
15051    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15052    /// let x = NetworkPeering::new().set_vmware_engine_network("example");
15053    /// ```
15054    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
15055        mut self,
15056        v: T,
15057    ) -> Self {
15058        self.vmware_engine_network = v.into();
15059        self
15060    }
15061
15062    /// Sets the value of [description][crate::model::NetworkPeering::description].
15063    ///
15064    /// # Example
15065    /// ```ignore,no_run
15066    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15067    /// let x = NetworkPeering::new().set_description("example");
15068    /// ```
15069    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15070        self.description = v.into();
15071        self
15072    }
15073}
15074
15075impl wkt::message::Message for NetworkPeering {
15076    fn typename() -> &'static str {
15077        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPeering"
15078    }
15079}
15080
15081/// Defines additional types related to [NetworkPeering].
15082pub mod network_peering {
15083    #[allow(unused_imports)]
15084    use super::*;
15085
15086    /// Possible states of a network peering.
15087    ///
15088    /// # Working with unknown values
15089    ///
15090    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15091    /// additional enum variants at any time. Adding new variants is not considered
15092    /// a breaking change. Applications should write their code in anticipation of:
15093    ///
15094    /// - New values appearing in future releases of the client library, **and**
15095    /// - New values received dynamically, without application changes.
15096    ///
15097    /// Please consult the [Working with enums] section in the user guide for some
15098    /// guidelines.
15099    ///
15100    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15101    #[derive(Clone, Debug, PartialEq)]
15102    #[non_exhaustive]
15103    pub enum State {
15104        /// Unspecified network peering state. This is the default value.
15105        Unspecified,
15106        /// The peering is not active.
15107        Inactive,
15108        /// The peering is active.
15109        Active,
15110        /// The peering is being created.
15111        Creating,
15112        /// The peering is being deleted.
15113        Deleting,
15114        /// If set, the enum was initialized with an unknown value.
15115        ///
15116        /// Applications can examine the value using [State::value] or
15117        /// [State::name].
15118        UnknownValue(state::UnknownValue),
15119    }
15120
15121    #[doc(hidden)]
15122    pub mod state {
15123        #[allow(unused_imports)]
15124        use super::*;
15125        #[derive(Clone, Debug, PartialEq)]
15126        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15127    }
15128
15129    impl State {
15130        /// Gets the enum value.
15131        ///
15132        /// Returns `None` if the enum contains an unknown value deserialized from
15133        /// the string representation of enums.
15134        pub fn value(&self) -> std::option::Option<i32> {
15135            match self {
15136                Self::Unspecified => std::option::Option::Some(0),
15137                Self::Inactive => std::option::Option::Some(1),
15138                Self::Active => std::option::Option::Some(2),
15139                Self::Creating => std::option::Option::Some(3),
15140                Self::Deleting => std::option::Option::Some(4),
15141                Self::UnknownValue(u) => u.0.value(),
15142            }
15143        }
15144
15145        /// Gets the enum value as a string.
15146        ///
15147        /// Returns `None` if the enum contains an unknown value deserialized from
15148        /// the integer representation of enums.
15149        pub fn name(&self) -> std::option::Option<&str> {
15150            match self {
15151                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
15152                Self::Inactive => std::option::Option::Some("INACTIVE"),
15153                Self::Active => std::option::Option::Some("ACTIVE"),
15154                Self::Creating => std::option::Option::Some("CREATING"),
15155                Self::Deleting => std::option::Option::Some("DELETING"),
15156                Self::UnknownValue(u) => u.0.name(),
15157            }
15158        }
15159    }
15160
15161    impl std::default::Default for State {
15162        fn default() -> Self {
15163            use std::convert::From;
15164            Self::from(0)
15165        }
15166    }
15167
15168    impl std::fmt::Display for State {
15169        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15170            wkt::internal::display_enum(f, self.name(), self.value())
15171        }
15172    }
15173
15174    impl std::convert::From<i32> for State {
15175        fn from(value: i32) -> Self {
15176            match value {
15177                0 => Self::Unspecified,
15178                1 => Self::Inactive,
15179                2 => Self::Active,
15180                3 => Self::Creating,
15181                4 => Self::Deleting,
15182                _ => Self::UnknownValue(state::UnknownValue(
15183                    wkt::internal::UnknownEnumValue::Integer(value),
15184                )),
15185            }
15186        }
15187    }
15188
15189    impl std::convert::From<&str> for State {
15190        fn from(value: &str) -> Self {
15191            use std::string::ToString;
15192            match value {
15193                "STATE_UNSPECIFIED" => Self::Unspecified,
15194                "INACTIVE" => Self::Inactive,
15195                "ACTIVE" => Self::Active,
15196                "CREATING" => Self::Creating,
15197                "DELETING" => Self::Deleting,
15198                _ => Self::UnknownValue(state::UnknownValue(
15199                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15200                )),
15201            }
15202        }
15203    }
15204
15205    impl serde::ser::Serialize for State {
15206        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15207        where
15208            S: serde::Serializer,
15209        {
15210            match self {
15211                Self::Unspecified => serializer.serialize_i32(0),
15212                Self::Inactive => serializer.serialize_i32(1),
15213                Self::Active => serializer.serialize_i32(2),
15214                Self::Creating => serializer.serialize_i32(3),
15215                Self::Deleting => serializer.serialize_i32(4),
15216                Self::UnknownValue(u) => u.0.serialize(serializer),
15217            }
15218        }
15219    }
15220
15221    impl<'de> serde::de::Deserialize<'de> for State {
15222        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15223        where
15224            D: serde::Deserializer<'de>,
15225        {
15226            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
15227                ".google.cloud.vmwareengine.v1.NetworkPeering.State",
15228            ))
15229        }
15230    }
15231
15232    /// Type or purpose of the network peering connection.
15233    ///
15234    /// # Working with unknown values
15235    ///
15236    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15237    /// additional enum variants at any time. Adding new variants is not considered
15238    /// a breaking change. Applications should write their code in anticipation of:
15239    ///
15240    /// - New values appearing in future releases of the client library, **and**
15241    /// - New values received dynamically, without application changes.
15242    ///
15243    /// Please consult the [Working with enums] section in the user guide for some
15244    /// guidelines.
15245    ///
15246    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15247    #[derive(Clone, Debug, PartialEq)]
15248    #[non_exhaustive]
15249    pub enum PeerNetworkType {
15250        /// Unspecified
15251        Unspecified,
15252        /// Peering connection used for connecting to another VPC network established
15253        /// by the same user. For example, a peering connection to another VPC
15254        /// network in the same project or to an on-premises network.
15255        Standard,
15256        /// Peering connection used for connecting to another VMware Engine network.
15257        VmwareEngineNetwork,
15258        /// Peering connection used for establishing [private services
15259        /// access](https://cloud.google.com/vpc/docs/private-services-access).
15260        PrivateServicesAccess,
15261        /// Peering connection used for connecting to NetApp Cloud Volumes.
15262        NetappCloudVolumes,
15263        /// Peering connection used for connecting to third-party services. Most
15264        /// third-party services require manual setup of reverse peering on the VPC
15265        /// network associated with the third-party service.
15266        ThirdPartyService,
15267        /// Peering connection used for connecting to Dell PowerScale Filers
15268        DellPowerscale,
15269        /// Peering connection used for connecting to Google Cloud NetApp Volumes.
15270        GoogleCloudNetappVolumes,
15271        /// If set, the enum was initialized with an unknown value.
15272        ///
15273        /// Applications can examine the value using [PeerNetworkType::value] or
15274        /// [PeerNetworkType::name].
15275        UnknownValue(peer_network_type::UnknownValue),
15276    }
15277
15278    #[doc(hidden)]
15279    pub mod peer_network_type {
15280        #[allow(unused_imports)]
15281        use super::*;
15282        #[derive(Clone, Debug, PartialEq)]
15283        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15284    }
15285
15286    impl PeerNetworkType {
15287        /// Gets the enum value.
15288        ///
15289        /// Returns `None` if the enum contains an unknown value deserialized from
15290        /// the string representation of enums.
15291        pub fn value(&self) -> std::option::Option<i32> {
15292            match self {
15293                Self::Unspecified => std::option::Option::Some(0),
15294                Self::Standard => std::option::Option::Some(1),
15295                Self::VmwareEngineNetwork => std::option::Option::Some(2),
15296                Self::PrivateServicesAccess => std::option::Option::Some(3),
15297                Self::NetappCloudVolumes => std::option::Option::Some(4),
15298                Self::ThirdPartyService => std::option::Option::Some(5),
15299                Self::DellPowerscale => std::option::Option::Some(6),
15300                Self::GoogleCloudNetappVolumes => std::option::Option::Some(7),
15301                Self::UnknownValue(u) => u.0.value(),
15302            }
15303        }
15304
15305        /// Gets the enum value as a string.
15306        ///
15307        /// Returns `None` if the enum contains an unknown value deserialized from
15308        /// the integer representation of enums.
15309        pub fn name(&self) -> std::option::Option<&str> {
15310            match self {
15311                Self::Unspecified => std::option::Option::Some("PEER_NETWORK_TYPE_UNSPECIFIED"),
15312                Self::Standard => std::option::Option::Some("STANDARD"),
15313                Self::VmwareEngineNetwork => std::option::Option::Some("VMWARE_ENGINE_NETWORK"),
15314                Self::PrivateServicesAccess => std::option::Option::Some("PRIVATE_SERVICES_ACCESS"),
15315                Self::NetappCloudVolumes => std::option::Option::Some("NETAPP_CLOUD_VOLUMES"),
15316                Self::ThirdPartyService => std::option::Option::Some("THIRD_PARTY_SERVICE"),
15317                Self::DellPowerscale => std::option::Option::Some("DELL_POWERSCALE"),
15318                Self::GoogleCloudNetappVolumes => {
15319                    std::option::Option::Some("GOOGLE_CLOUD_NETAPP_VOLUMES")
15320                }
15321                Self::UnknownValue(u) => u.0.name(),
15322            }
15323        }
15324    }
15325
15326    impl std::default::Default for PeerNetworkType {
15327        fn default() -> Self {
15328            use std::convert::From;
15329            Self::from(0)
15330        }
15331    }
15332
15333    impl std::fmt::Display for PeerNetworkType {
15334        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15335            wkt::internal::display_enum(f, self.name(), self.value())
15336        }
15337    }
15338
15339    impl std::convert::From<i32> for PeerNetworkType {
15340        fn from(value: i32) -> Self {
15341            match value {
15342                0 => Self::Unspecified,
15343                1 => Self::Standard,
15344                2 => Self::VmwareEngineNetwork,
15345                3 => Self::PrivateServicesAccess,
15346                4 => Self::NetappCloudVolumes,
15347                5 => Self::ThirdPartyService,
15348                6 => Self::DellPowerscale,
15349                7 => Self::GoogleCloudNetappVolumes,
15350                _ => Self::UnknownValue(peer_network_type::UnknownValue(
15351                    wkt::internal::UnknownEnumValue::Integer(value),
15352                )),
15353            }
15354        }
15355    }
15356
15357    impl std::convert::From<&str> for PeerNetworkType {
15358        fn from(value: &str) -> Self {
15359            use std::string::ToString;
15360            match value {
15361                "PEER_NETWORK_TYPE_UNSPECIFIED" => Self::Unspecified,
15362                "STANDARD" => Self::Standard,
15363                "VMWARE_ENGINE_NETWORK" => Self::VmwareEngineNetwork,
15364                "PRIVATE_SERVICES_ACCESS" => Self::PrivateServicesAccess,
15365                "NETAPP_CLOUD_VOLUMES" => Self::NetappCloudVolumes,
15366                "THIRD_PARTY_SERVICE" => Self::ThirdPartyService,
15367                "DELL_POWERSCALE" => Self::DellPowerscale,
15368                "GOOGLE_CLOUD_NETAPP_VOLUMES" => Self::GoogleCloudNetappVolumes,
15369                _ => Self::UnknownValue(peer_network_type::UnknownValue(
15370                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15371                )),
15372            }
15373        }
15374    }
15375
15376    impl serde::ser::Serialize for PeerNetworkType {
15377        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15378        where
15379            S: serde::Serializer,
15380        {
15381            match self {
15382                Self::Unspecified => serializer.serialize_i32(0),
15383                Self::Standard => serializer.serialize_i32(1),
15384                Self::VmwareEngineNetwork => serializer.serialize_i32(2),
15385                Self::PrivateServicesAccess => serializer.serialize_i32(3),
15386                Self::NetappCloudVolumes => serializer.serialize_i32(4),
15387                Self::ThirdPartyService => serializer.serialize_i32(5),
15388                Self::DellPowerscale => serializer.serialize_i32(6),
15389                Self::GoogleCloudNetappVolumes => serializer.serialize_i32(7),
15390                Self::UnknownValue(u) => u.0.serialize(serializer),
15391            }
15392        }
15393    }
15394
15395    impl<'de> serde::de::Deserialize<'de> for PeerNetworkType {
15396        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15397        where
15398            D: serde::Deserializer<'de>,
15399        {
15400            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PeerNetworkType>::new(
15401                ".google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType",
15402            ))
15403        }
15404    }
15405}
15406
15407/// Exchanged network peering route.
15408#[derive(Clone, Default, PartialEq)]
15409#[non_exhaustive]
15410pub struct PeeringRoute {
15411    /// Output only. Destination range of the peering route in CIDR notation.
15412    pub dest_range: std::string::String,
15413
15414    /// Output only. Type of the route in the peer VPC network.
15415    pub r#type: crate::model::peering_route::Type,
15416
15417    /// Output only. Region containing the next hop of the peering route. This
15418    /// field only applies to dynamic routes in the peer VPC network.
15419    pub next_hop_region: std::string::String,
15420
15421    /// Output only. The priority of the peering route.
15422    pub priority: i64,
15423
15424    /// Output only. True if the peering route has been imported from a peered
15425    /// VPC network; false otherwise. The import happens if the field
15426    /// `NetworkPeering.importCustomRoutes` is true for this network,
15427    /// `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and
15428    /// the import does not result in a route conflict.
15429    pub imported: bool,
15430
15431    /// Output only. Direction of the routes exchanged with the peer network, from
15432    /// the VMware Engine network perspective:
15433    ///
15434    /// * Routes of direction `INCOMING` are imported from the peer network.
15435    /// * Routes of direction `OUTGOING` are exported from the intranet VPC network
15436    ///   of the VMware Engine network.
15437    pub direction: crate::model::peering_route::Direction,
15438
15439    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15440}
15441
15442impl PeeringRoute {
15443    /// Creates a new default instance.
15444    pub fn new() -> Self {
15445        std::default::Default::default()
15446    }
15447
15448    /// Sets the value of [dest_range][crate::model::PeeringRoute::dest_range].
15449    ///
15450    /// # Example
15451    /// ```ignore,no_run
15452    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15453    /// let x = PeeringRoute::new().set_dest_range("example");
15454    /// ```
15455    pub fn set_dest_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15456        self.dest_range = v.into();
15457        self
15458    }
15459
15460    /// Sets the value of [r#type][crate::model::PeeringRoute::type].
15461    ///
15462    /// # Example
15463    /// ```ignore,no_run
15464    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15465    /// use google_cloud_vmwareengine_v1::model::peering_route::Type;
15466    /// let x0 = PeeringRoute::new().set_type(Type::DynamicPeeringRoute);
15467    /// let x1 = PeeringRoute::new().set_type(Type::StaticPeeringRoute);
15468    /// let x2 = PeeringRoute::new().set_type(Type::SubnetPeeringRoute);
15469    /// ```
15470    pub fn set_type<T: std::convert::Into<crate::model::peering_route::Type>>(
15471        mut self,
15472        v: T,
15473    ) -> Self {
15474        self.r#type = v.into();
15475        self
15476    }
15477
15478    /// Sets the value of [next_hop_region][crate::model::PeeringRoute::next_hop_region].
15479    ///
15480    /// # Example
15481    /// ```ignore,no_run
15482    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15483    /// let x = PeeringRoute::new().set_next_hop_region("example");
15484    /// ```
15485    pub fn set_next_hop_region<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15486        self.next_hop_region = v.into();
15487        self
15488    }
15489
15490    /// Sets the value of [priority][crate::model::PeeringRoute::priority].
15491    ///
15492    /// # Example
15493    /// ```ignore,no_run
15494    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15495    /// let x = PeeringRoute::new().set_priority(42);
15496    /// ```
15497    pub fn set_priority<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15498        self.priority = v.into();
15499        self
15500    }
15501
15502    /// Sets the value of [imported][crate::model::PeeringRoute::imported].
15503    ///
15504    /// # Example
15505    /// ```ignore,no_run
15506    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15507    /// let x = PeeringRoute::new().set_imported(true);
15508    /// ```
15509    pub fn set_imported<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15510        self.imported = v.into();
15511        self
15512    }
15513
15514    /// Sets the value of [direction][crate::model::PeeringRoute::direction].
15515    ///
15516    /// # Example
15517    /// ```ignore,no_run
15518    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15519    /// use google_cloud_vmwareengine_v1::model::peering_route::Direction;
15520    /// let x0 = PeeringRoute::new().set_direction(Direction::Incoming);
15521    /// let x1 = PeeringRoute::new().set_direction(Direction::Outgoing);
15522    /// ```
15523    pub fn set_direction<T: std::convert::Into<crate::model::peering_route::Direction>>(
15524        mut self,
15525        v: T,
15526    ) -> Self {
15527        self.direction = v.into();
15528        self
15529    }
15530}
15531
15532impl wkt::message::Message for PeeringRoute {
15533    fn typename() -> &'static str {
15534        "type.googleapis.com/google.cloud.vmwareengine.v1.PeeringRoute"
15535    }
15536}
15537
15538/// Defines additional types related to [PeeringRoute].
15539pub mod peering_route {
15540    #[allow(unused_imports)]
15541    use super::*;
15542
15543    /// The type of the peering route.
15544    ///
15545    /// # Working with unknown values
15546    ///
15547    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15548    /// additional enum variants at any time. Adding new variants is not considered
15549    /// a breaking change. Applications should write their code in anticipation of:
15550    ///
15551    /// - New values appearing in future releases of the client library, **and**
15552    /// - New values received dynamically, without application changes.
15553    ///
15554    /// Please consult the [Working with enums] section in the user guide for some
15555    /// guidelines.
15556    ///
15557    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15558    #[derive(Clone, Debug, PartialEq)]
15559    #[non_exhaustive]
15560    pub enum Type {
15561        /// Unspecified peering route type. This is the default value.
15562        Unspecified,
15563        /// Dynamic routes in the peer network.
15564        DynamicPeeringRoute,
15565        /// Static routes in the peer network.
15566        StaticPeeringRoute,
15567        /// Created, updated, and removed automatically by Google Cloud when subnets
15568        /// are created, modified, or deleted in the peer network.
15569        SubnetPeeringRoute,
15570        /// If set, the enum was initialized with an unknown value.
15571        ///
15572        /// Applications can examine the value using [Type::value] or
15573        /// [Type::name].
15574        UnknownValue(r#type::UnknownValue),
15575    }
15576
15577    #[doc(hidden)]
15578    pub mod r#type {
15579        #[allow(unused_imports)]
15580        use super::*;
15581        #[derive(Clone, Debug, PartialEq)]
15582        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15583    }
15584
15585    impl Type {
15586        /// Gets the enum value.
15587        ///
15588        /// Returns `None` if the enum contains an unknown value deserialized from
15589        /// the string representation of enums.
15590        pub fn value(&self) -> std::option::Option<i32> {
15591            match self {
15592                Self::Unspecified => std::option::Option::Some(0),
15593                Self::DynamicPeeringRoute => std::option::Option::Some(1),
15594                Self::StaticPeeringRoute => std::option::Option::Some(2),
15595                Self::SubnetPeeringRoute => std::option::Option::Some(3),
15596                Self::UnknownValue(u) => u.0.value(),
15597            }
15598        }
15599
15600        /// Gets the enum value as a string.
15601        ///
15602        /// Returns `None` if the enum contains an unknown value deserialized from
15603        /// the integer representation of enums.
15604        pub fn name(&self) -> std::option::Option<&str> {
15605            match self {
15606                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
15607                Self::DynamicPeeringRoute => std::option::Option::Some("DYNAMIC_PEERING_ROUTE"),
15608                Self::StaticPeeringRoute => std::option::Option::Some("STATIC_PEERING_ROUTE"),
15609                Self::SubnetPeeringRoute => std::option::Option::Some("SUBNET_PEERING_ROUTE"),
15610                Self::UnknownValue(u) => u.0.name(),
15611            }
15612        }
15613    }
15614
15615    impl std::default::Default for Type {
15616        fn default() -> Self {
15617            use std::convert::From;
15618            Self::from(0)
15619        }
15620    }
15621
15622    impl std::fmt::Display for Type {
15623        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15624            wkt::internal::display_enum(f, self.name(), self.value())
15625        }
15626    }
15627
15628    impl std::convert::From<i32> for Type {
15629        fn from(value: i32) -> Self {
15630            match value {
15631                0 => Self::Unspecified,
15632                1 => Self::DynamicPeeringRoute,
15633                2 => Self::StaticPeeringRoute,
15634                3 => Self::SubnetPeeringRoute,
15635                _ => Self::UnknownValue(r#type::UnknownValue(
15636                    wkt::internal::UnknownEnumValue::Integer(value),
15637                )),
15638            }
15639        }
15640    }
15641
15642    impl std::convert::From<&str> for Type {
15643        fn from(value: &str) -> Self {
15644            use std::string::ToString;
15645            match value {
15646                "TYPE_UNSPECIFIED" => Self::Unspecified,
15647                "DYNAMIC_PEERING_ROUTE" => Self::DynamicPeeringRoute,
15648                "STATIC_PEERING_ROUTE" => Self::StaticPeeringRoute,
15649                "SUBNET_PEERING_ROUTE" => Self::SubnetPeeringRoute,
15650                _ => Self::UnknownValue(r#type::UnknownValue(
15651                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15652                )),
15653            }
15654        }
15655    }
15656
15657    impl serde::ser::Serialize for Type {
15658        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15659        where
15660            S: serde::Serializer,
15661        {
15662            match self {
15663                Self::Unspecified => serializer.serialize_i32(0),
15664                Self::DynamicPeeringRoute => serializer.serialize_i32(1),
15665                Self::StaticPeeringRoute => serializer.serialize_i32(2),
15666                Self::SubnetPeeringRoute => serializer.serialize_i32(3),
15667                Self::UnknownValue(u) => u.0.serialize(serializer),
15668            }
15669        }
15670    }
15671
15672    impl<'de> serde::de::Deserialize<'de> for Type {
15673        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15674        where
15675            D: serde::Deserializer<'de>,
15676        {
15677            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
15678                ".google.cloud.vmwareengine.v1.PeeringRoute.Type",
15679            ))
15680        }
15681    }
15682
15683    /// The direction of the exchanged routes.
15684    ///
15685    /// # Working with unknown values
15686    ///
15687    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15688    /// additional enum variants at any time. Adding new variants is not considered
15689    /// a breaking change. Applications should write their code in anticipation of:
15690    ///
15691    /// - New values appearing in future releases of the client library, **and**
15692    /// - New values received dynamically, without application changes.
15693    ///
15694    /// Please consult the [Working with enums] section in the user guide for some
15695    /// guidelines.
15696    ///
15697    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15698    #[derive(Clone, Debug, PartialEq)]
15699    #[non_exhaustive]
15700    pub enum Direction {
15701        /// Unspecified exchanged routes direction. This is default.
15702        Unspecified,
15703        /// Routes imported from the peer network.
15704        Incoming,
15705        /// Routes exported to the peer network.
15706        Outgoing,
15707        /// If set, the enum was initialized with an unknown value.
15708        ///
15709        /// Applications can examine the value using [Direction::value] or
15710        /// [Direction::name].
15711        UnknownValue(direction::UnknownValue),
15712    }
15713
15714    #[doc(hidden)]
15715    pub mod direction {
15716        #[allow(unused_imports)]
15717        use super::*;
15718        #[derive(Clone, Debug, PartialEq)]
15719        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15720    }
15721
15722    impl Direction {
15723        /// Gets the enum value.
15724        ///
15725        /// Returns `None` if the enum contains an unknown value deserialized from
15726        /// the string representation of enums.
15727        pub fn value(&self) -> std::option::Option<i32> {
15728            match self {
15729                Self::Unspecified => std::option::Option::Some(0),
15730                Self::Incoming => std::option::Option::Some(1),
15731                Self::Outgoing => std::option::Option::Some(2),
15732                Self::UnknownValue(u) => u.0.value(),
15733            }
15734        }
15735
15736        /// Gets the enum value as a string.
15737        ///
15738        /// Returns `None` if the enum contains an unknown value deserialized from
15739        /// the integer representation of enums.
15740        pub fn name(&self) -> std::option::Option<&str> {
15741            match self {
15742                Self::Unspecified => std::option::Option::Some("DIRECTION_UNSPECIFIED"),
15743                Self::Incoming => std::option::Option::Some("INCOMING"),
15744                Self::Outgoing => std::option::Option::Some("OUTGOING"),
15745                Self::UnknownValue(u) => u.0.name(),
15746            }
15747        }
15748    }
15749
15750    impl std::default::Default for Direction {
15751        fn default() -> Self {
15752            use std::convert::From;
15753            Self::from(0)
15754        }
15755    }
15756
15757    impl std::fmt::Display for Direction {
15758        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15759            wkt::internal::display_enum(f, self.name(), self.value())
15760        }
15761    }
15762
15763    impl std::convert::From<i32> for Direction {
15764        fn from(value: i32) -> Self {
15765            match value {
15766                0 => Self::Unspecified,
15767                1 => Self::Incoming,
15768                2 => Self::Outgoing,
15769                _ => Self::UnknownValue(direction::UnknownValue(
15770                    wkt::internal::UnknownEnumValue::Integer(value),
15771                )),
15772            }
15773        }
15774    }
15775
15776    impl std::convert::From<&str> for Direction {
15777        fn from(value: &str) -> Self {
15778            use std::string::ToString;
15779            match value {
15780                "DIRECTION_UNSPECIFIED" => Self::Unspecified,
15781                "INCOMING" => Self::Incoming,
15782                "OUTGOING" => Self::Outgoing,
15783                _ => Self::UnknownValue(direction::UnknownValue(
15784                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15785                )),
15786            }
15787        }
15788    }
15789
15790    impl serde::ser::Serialize for Direction {
15791        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15792        where
15793            S: serde::Serializer,
15794        {
15795            match self {
15796                Self::Unspecified => serializer.serialize_i32(0),
15797                Self::Incoming => serializer.serialize_i32(1),
15798                Self::Outgoing => serializer.serialize_i32(2),
15799                Self::UnknownValue(u) => u.0.serialize(serializer),
15800            }
15801        }
15802    }
15803
15804    impl<'de> serde::de::Deserialize<'de> for Direction {
15805        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15806        where
15807            D: serde::Deserializer<'de>,
15808        {
15809            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Direction>::new(
15810                ".google.cloud.vmwareengine.v1.PeeringRoute.Direction",
15811            ))
15812        }
15813    }
15814}
15815
15816/// Represents a network policy resource. Network policies are regional
15817/// resources. You can use a network policy to enable or disable internet access
15818/// and external IP access. Network policies are associated with a VMware Engine
15819/// network, which might span across regions. For a given region, a network
15820/// policy applies to all private clouds in the VMware Engine network associated
15821/// with the policy.
15822#[derive(Clone, Default, PartialEq)]
15823#[non_exhaustive]
15824pub struct NetworkPolicy {
15825    /// Output only. The resource name of this network policy.
15826    /// Resource names are schemeless URIs that follow the conventions in
15827    /// <https://cloud.google.com/apis/design/resource_names>.
15828    /// For example:
15829    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
15830    pub name: std::string::String,
15831
15832    /// Output only. Creation time of this resource.
15833    pub create_time: std::option::Option<wkt::Timestamp>,
15834
15835    /// Output only. Last update time of this resource.
15836    pub update_time: std::option::Option<wkt::Timestamp>,
15837
15838    /// Network service that allows VMware workloads to access the internet.
15839    pub internet_access: std::option::Option<crate::model::network_policy::NetworkService>,
15840
15841    /// Network service that allows External IP addresses to be assigned to VMware
15842    /// workloads. This service can only be enabled when `internet_access` is also
15843    /// enabled.
15844    pub external_ip: std::option::Option<crate::model::network_policy::NetworkService>,
15845
15846    /// Required. IP address range in CIDR notation used to create internet access
15847    /// and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is
15848    /// required. The range cannot overlap with any prefixes either in the consumer
15849    /// VPC network or in use by the private clouds attached to that VPC network.
15850    pub edge_services_cidr: std::string::String,
15851
15852    /// Output only. System-generated unique identifier for the resource.
15853    pub uid: std::string::String,
15854
15855    /// Optional. The relative resource name of the VMware Engine network.
15856    /// Specify the name in the following form:
15857    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
15858    /// where `{project}` can either be a project number or a project ID.
15859    pub vmware_engine_network: std::string::String,
15860
15861    /// Optional. User-provided description for this network policy.
15862    pub description: std::string::String,
15863
15864    /// Output only. The canonical name of the VMware Engine network in the form:
15865    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
15866    pub vmware_engine_network_canonical: std::string::String,
15867
15868    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15869}
15870
15871impl NetworkPolicy {
15872    /// Creates a new default instance.
15873    pub fn new() -> Self {
15874        std::default::Default::default()
15875    }
15876
15877    /// Sets the value of [name][crate::model::NetworkPolicy::name].
15878    ///
15879    /// # Example
15880    /// ```ignore,no_run
15881    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
15882    /// let x = NetworkPolicy::new().set_name("example");
15883    /// ```
15884    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15885        self.name = v.into();
15886        self
15887    }
15888
15889    /// Sets the value of [create_time][crate::model::NetworkPolicy::create_time].
15890    ///
15891    /// # Example
15892    /// ```ignore,no_run
15893    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
15894    /// use wkt::Timestamp;
15895    /// let x = NetworkPolicy::new().set_create_time(Timestamp::default()/* use setters */);
15896    /// ```
15897    pub fn set_create_time<T>(mut self, v: T) -> Self
15898    where
15899        T: std::convert::Into<wkt::Timestamp>,
15900    {
15901        self.create_time = std::option::Option::Some(v.into());
15902        self
15903    }
15904
15905    /// Sets or clears the value of [create_time][crate::model::NetworkPolicy::create_time].
15906    ///
15907    /// # Example
15908    /// ```ignore,no_run
15909    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
15910    /// use wkt::Timestamp;
15911    /// let x = NetworkPolicy::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
15912    /// let x = NetworkPolicy::new().set_or_clear_create_time(None::<Timestamp>);
15913    /// ```
15914    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
15915    where
15916        T: std::convert::Into<wkt::Timestamp>,
15917    {
15918        self.create_time = v.map(|x| x.into());
15919        self
15920    }
15921
15922    /// Sets the value of [update_time][crate::model::NetworkPolicy::update_time].
15923    ///
15924    /// # Example
15925    /// ```ignore,no_run
15926    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
15927    /// use wkt::Timestamp;
15928    /// let x = NetworkPolicy::new().set_update_time(Timestamp::default()/* use setters */);
15929    /// ```
15930    pub fn set_update_time<T>(mut self, v: T) -> Self
15931    where
15932        T: std::convert::Into<wkt::Timestamp>,
15933    {
15934        self.update_time = std::option::Option::Some(v.into());
15935        self
15936    }
15937
15938    /// Sets or clears the value of [update_time][crate::model::NetworkPolicy::update_time].
15939    ///
15940    /// # Example
15941    /// ```ignore,no_run
15942    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
15943    /// use wkt::Timestamp;
15944    /// let x = NetworkPolicy::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
15945    /// let x = NetworkPolicy::new().set_or_clear_update_time(None::<Timestamp>);
15946    /// ```
15947    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
15948    where
15949        T: std::convert::Into<wkt::Timestamp>,
15950    {
15951        self.update_time = v.map(|x| x.into());
15952        self
15953    }
15954
15955    /// Sets the value of [internet_access][crate::model::NetworkPolicy::internet_access].
15956    ///
15957    /// # Example
15958    /// ```ignore,no_run
15959    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
15960    /// use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
15961    /// let x = NetworkPolicy::new().set_internet_access(NetworkService::default()/* use setters */);
15962    /// ```
15963    pub fn set_internet_access<T>(mut self, v: T) -> Self
15964    where
15965        T: std::convert::Into<crate::model::network_policy::NetworkService>,
15966    {
15967        self.internet_access = std::option::Option::Some(v.into());
15968        self
15969    }
15970
15971    /// Sets or clears the value of [internet_access][crate::model::NetworkPolicy::internet_access].
15972    ///
15973    /// # Example
15974    /// ```ignore,no_run
15975    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
15976    /// use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
15977    /// let x = NetworkPolicy::new().set_or_clear_internet_access(Some(NetworkService::default()/* use setters */));
15978    /// let x = NetworkPolicy::new().set_or_clear_internet_access(None::<NetworkService>);
15979    /// ```
15980    pub fn set_or_clear_internet_access<T>(mut self, v: std::option::Option<T>) -> Self
15981    where
15982        T: std::convert::Into<crate::model::network_policy::NetworkService>,
15983    {
15984        self.internet_access = v.map(|x| x.into());
15985        self
15986    }
15987
15988    /// Sets the value of [external_ip][crate::model::NetworkPolicy::external_ip].
15989    ///
15990    /// # Example
15991    /// ```ignore,no_run
15992    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
15993    /// use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
15994    /// let x = NetworkPolicy::new().set_external_ip(NetworkService::default()/* use setters */);
15995    /// ```
15996    pub fn set_external_ip<T>(mut self, v: T) -> Self
15997    where
15998        T: std::convert::Into<crate::model::network_policy::NetworkService>,
15999    {
16000        self.external_ip = std::option::Option::Some(v.into());
16001        self
16002    }
16003
16004    /// Sets or clears the value of [external_ip][crate::model::NetworkPolicy::external_ip].
16005    ///
16006    /// # Example
16007    /// ```ignore,no_run
16008    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16009    /// use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
16010    /// let x = NetworkPolicy::new().set_or_clear_external_ip(Some(NetworkService::default()/* use setters */));
16011    /// let x = NetworkPolicy::new().set_or_clear_external_ip(None::<NetworkService>);
16012    /// ```
16013    pub fn set_or_clear_external_ip<T>(mut self, v: std::option::Option<T>) -> Self
16014    where
16015        T: std::convert::Into<crate::model::network_policy::NetworkService>,
16016    {
16017        self.external_ip = v.map(|x| x.into());
16018        self
16019    }
16020
16021    /// Sets the value of [edge_services_cidr][crate::model::NetworkPolicy::edge_services_cidr].
16022    ///
16023    /// # Example
16024    /// ```ignore,no_run
16025    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16026    /// let x = NetworkPolicy::new().set_edge_services_cidr("example");
16027    /// ```
16028    pub fn set_edge_services_cidr<T: std::convert::Into<std::string::String>>(
16029        mut self,
16030        v: T,
16031    ) -> Self {
16032        self.edge_services_cidr = v.into();
16033        self
16034    }
16035
16036    /// Sets the value of [uid][crate::model::NetworkPolicy::uid].
16037    ///
16038    /// # Example
16039    /// ```ignore,no_run
16040    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16041    /// let x = NetworkPolicy::new().set_uid("example");
16042    /// ```
16043    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16044        self.uid = v.into();
16045        self
16046    }
16047
16048    /// Sets the value of [vmware_engine_network][crate::model::NetworkPolicy::vmware_engine_network].
16049    ///
16050    /// # Example
16051    /// ```ignore,no_run
16052    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16053    /// let x = NetworkPolicy::new().set_vmware_engine_network("example");
16054    /// ```
16055    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
16056        mut self,
16057        v: T,
16058    ) -> Self {
16059        self.vmware_engine_network = v.into();
16060        self
16061    }
16062
16063    /// Sets the value of [description][crate::model::NetworkPolicy::description].
16064    ///
16065    /// # Example
16066    /// ```ignore,no_run
16067    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16068    /// let x = NetworkPolicy::new().set_description("example");
16069    /// ```
16070    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16071        self.description = v.into();
16072        self
16073    }
16074
16075    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkPolicy::vmware_engine_network_canonical].
16076    ///
16077    /// # Example
16078    /// ```ignore,no_run
16079    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16080    /// let x = NetworkPolicy::new().set_vmware_engine_network_canonical("example");
16081    /// ```
16082    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
16083        mut self,
16084        v: T,
16085    ) -> Self {
16086        self.vmware_engine_network_canonical = v.into();
16087        self
16088    }
16089}
16090
16091impl wkt::message::Message for NetworkPolicy {
16092    fn typename() -> &'static str {
16093        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy"
16094    }
16095}
16096
16097/// Defines additional types related to [NetworkPolicy].
16098pub mod network_policy {
16099    #[allow(unused_imports)]
16100    use super::*;
16101
16102    /// Represents a network service that is managed by a `NetworkPolicy` resource.
16103    /// A network service provides a way to control an aspect of external access to
16104    /// VMware workloads. For example, whether the VMware workloads in the
16105    /// private clouds governed by a network policy can access or be accessed from
16106    /// the internet.
16107    #[derive(Clone, Default, PartialEq)]
16108    #[non_exhaustive]
16109    pub struct NetworkService {
16110        /// True if the service is enabled; false otherwise.
16111        pub enabled: bool,
16112
16113        /// Output only. State of the service. New values may be added to this enum
16114        /// when appropriate.
16115        pub state: crate::model::network_policy::network_service::State,
16116
16117        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16118    }
16119
16120    impl NetworkService {
16121        /// Creates a new default instance.
16122        pub fn new() -> Self {
16123            std::default::Default::default()
16124        }
16125
16126        /// Sets the value of [enabled][crate::model::network_policy::NetworkService::enabled].
16127        ///
16128        /// # Example
16129        /// ```ignore,no_run
16130        /// # use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
16131        /// let x = NetworkService::new().set_enabled(true);
16132        /// ```
16133        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16134            self.enabled = v.into();
16135            self
16136        }
16137
16138        /// Sets the value of [state][crate::model::network_policy::NetworkService::state].
16139        ///
16140        /// # Example
16141        /// ```ignore,no_run
16142        /// # use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
16143        /// use google_cloud_vmwareengine_v1::model::network_policy::network_service::State;
16144        /// let x0 = NetworkService::new().set_state(State::Unprovisioned);
16145        /// let x1 = NetworkService::new().set_state(State::Reconciling);
16146        /// let x2 = NetworkService::new().set_state(State::Active);
16147        /// ```
16148        pub fn set_state<
16149            T: std::convert::Into<crate::model::network_policy::network_service::State>,
16150        >(
16151            mut self,
16152            v: T,
16153        ) -> Self {
16154            self.state = v.into();
16155            self
16156        }
16157    }
16158
16159    impl wkt::message::Message for NetworkService {
16160        fn typename() -> &'static str {
16161            "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService"
16162        }
16163    }
16164
16165    /// Defines additional types related to [NetworkService].
16166    pub mod network_service {
16167        #[allow(unused_imports)]
16168        use super::*;
16169
16170        /// Enum State defines possible states of a network policy controlled
16171        /// service.
16172        ///
16173        /// # Working with unknown values
16174        ///
16175        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16176        /// additional enum variants at any time. Adding new variants is not considered
16177        /// a breaking change. Applications should write their code in anticipation of:
16178        ///
16179        /// - New values appearing in future releases of the client library, **and**
16180        /// - New values received dynamically, without application changes.
16181        ///
16182        /// Please consult the [Working with enums] section in the user guide for some
16183        /// guidelines.
16184        ///
16185        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
16186        #[derive(Clone, Debug, PartialEq)]
16187        #[non_exhaustive]
16188        pub enum State {
16189            /// Unspecified service state. This is the default value.
16190            Unspecified,
16191            /// Service is not provisioned.
16192            Unprovisioned,
16193            /// Service is in the process of being provisioned/deprovisioned.
16194            Reconciling,
16195            /// Service is active.
16196            Active,
16197            /// If set, the enum was initialized with an unknown value.
16198            ///
16199            /// Applications can examine the value using [State::value] or
16200            /// [State::name].
16201            UnknownValue(state::UnknownValue),
16202        }
16203
16204        #[doc(hidden)]
16205        pub mod state {
16206            #[allow(unused_imports)]
16207            use super::*;
16208            #[derive(Clone, Debug, PartialEq)]
16209            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16210        }
16211
16212        impl State {
16213            /// Gets the enum value.
16214            ///
16215            /// Returns `None` if the enum contains an unknown value deserialized from
16216            /// the string representation of enums.
16217            pub fn value(&self) -> std::option::Option<i32> {
16218                match self {
16219                    Self::Unspecified => std::option::Option::Some(0),
16220                    Self::Unprovisioned => std::option::Option::Some(1),
16221                    Self::Reconciling => std::option::Option::Some(2),
16222                    Self::Active => std::option::Option::Some(3),
16223                    Self::UnknownValue(u) => u.0.value(),
16224                }
16225            }
16226
16227            /// Gets the enum value as a string.
16228            ///
16229            /// Returns `None` if the enum contains an unknown value deserialized from
16230            /// the integer representation of enums.
16231            pub fn name(&self) -> std::option::Option<&str> {
16232                match self {
16233                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
16234                    Self::Unprovisioned => std::option::Option::Some("UNPROVISIONED"),
16235                    Self::Reconciling => std::option::Option::Some("RECONCILING"),
16236                    Self::Active => std::option::Option::Some("ACTIVE"),
16237                    Self::UnknownValue(u) => u.0.name(),
16238                }
16239            }
16240        }
16241
16242        impl std::default::Default for State {
16243            fn default() -> Self {
16244                use std::convert::From;
16245                Self::from(0)
16246            }
16247        }
16248
16249        impl std::fmt::Display for State {
16250            fn fmt(
16251                &self,
16252                f: &mut std::fmt::Formatter<'_>,
16253            ) -> std::result::Result<(), std::fmt::Error> {
16254                wkt::internal::display_enum(f, self.name(), self.value())
16255            }
16256        }
16257
16258        impl std::convert::From<i32> for State {
16259            fn from(value: i32) -> Self {
16260                match value {
16261                    0 => Self::Unspecified,
16262                    1 => Self::Unprovisioned,
16263                    2 => Self::Reconciling,
16264                    3 => Self::Active,
16265                    _ => Self::UnknownValue(state::UnknownValue(
16266                        wkt::internal::UnknownEnumValue::Integer(value),
16267                    )),
16268                }
16269            }
16270        }
16271
16272        impl std::convert::From<&str> for State {
16273            fn from(value: &str) -> Self {
16274                use std::string::ToString;
16275                match value {
16276                    "STATE_UNSPECIFIED" => Self::Unspecified,
16277                    "UNPROVISIONED" => Self::Unprovisioned,
16278                    "RECONCILING" => Self::Reconciling,
16279                    "ACTIVE" => Self::Active,
16280                    _ => Self::UnknownValue(state::UnknownValue(
16281                        wkt::internal::UnknownEnumValue::String(value.to_string()),
16282                    )),
16283                }
16284            }
16285        }
16286
16287        impl serde::ser::Serialize for State {
16288            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16289            where
16290                S: serde::Serializer,
16291            {
16292                match self {
16293                    Self::Unspecified => serializer.serialize_i32(0),
16294                    Self::Unprovisioned => serializer.serialize_i32(1),
16295                    Self::Reconciling => serializer.serialize_i32(2),
16296                    Self::Active => serializer.serialize_i32(3),
16297                    Self::UnknownValue(u) => u.0.serialize(serializer),
16298                }
16299            }
16300        }
16301
16302        impl<'de> serde::de::Deserialize<'de> for State {
16303            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16304            where
16305                D: serde::Deserializer<'de>,
16306            {
16307                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
16308                    ".google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State",
16309                ))
16310            }
16311        }
16312    }
16313}
16314
16315/// Represents a binding between a network and the management DNS zone.
16316/// A management DNS zone is the Cloud DNS cross-project binding zone that
16317/// VMware Engine creates for each private cloud. It contains FQDNs and
16318/// corresponding IP addresses for the private cloud's ESXi hosts and management
16319/// VM appliances like vCenter and NSX Manager.
16320#[derive(Clone, Default, PartialEq)]
16321#[non_exhaustive]
16322pub struct ManagementDnsZoneBinding {
16323    /// Output only. The resource name of this binding.
16324    /// Resource names are schemeless URIs that follow the conventions in
16325    /// <https://cloud.google.com/apis/design/resource_names>.
16326    /// For example:
16327    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
16328    pub name: std::string::String,
16329
16330    /// Output only. Creation time of this resource.
16331    pub create_time: std::option::Option<wkt::Timestamp>,
16332
16333    /// Output only. Last update time of this resource.
16334    pub update_time: std::option::Option<wkt::Timestamp>,
16335
16336    /// Output only. The state of the resource.
16337    pub state: crate::model::management_dns_zone_binding::State,
16338
16339    /// User-provided description for this resource.
16340    pub description: std::string::String,
16341
16342    /// Output only. System-generated unique identifier for the resource.
16343    pub uid: std::string::String,
16344
16345    /// Required. The relative resource name of the network to bind to the
16346    /// management DNS zone. This network can be a consumer VPC network or a
16347    /// VMware engine network.
16348    pub bind_network: std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
16349
16350    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16351}
16352
16353impl ManagementDnsZoneBinding {
16354    /// Creates a new default instance.
16355    pub fn new() -> Self {
16356        std::default::Default::default()
16357    }
16358
16359    /// Sets the value of [name][crate::model::ManagementDnsZoneBinding::name].
16360    ///
16361    /// # Example
16362    /// ```ignore,no_run
16363    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16364    /// let x = ManagementDnsZoneBinding::new().set_name("example");
16365    /// ```
16366    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16367        self.name = v.into();
16368        self
16369    }
16370
16371    /// Sets the value of [create_time][crate::model::ManagementDnsZoneBinding::create_time].
16372    ///
16373    /// # Example
16374    /// ```ignore,no_run
16375    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16376    /// use wkt::Timestamp;
16377    /// let x = ManagementDnsZoneBinding::new().set_create_time(Timestamp::default()/* use setters */);
16378    /// ```
16379    pub fn set_create_time<T>(mut self, v: T) -> Self
16380    where
16381        T: std::convert::Into<wkt::Timestamp>,
16382    {
16383        self.create_time = std::option::Option::Some(v.into());
16384        self
16385    }
16386
16387    /// Sets or clears the value of [create_time][crate::model::ManagementDnsZoneBinding::create_time].
16388    ///
16389    /// # Example
16390    /// ```ignore,no_run
16391    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16392    /// use wkt::Timestamp;
16393    /// let x = ManagementDnsZoneBinding::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
16394    /// let x = ManagementDnsZoneBinding::new().set_or_clear_create_time(None::<Timestamp>);
16395    /// ```
16396    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16397    where
16398        T: std::convert::Into<wkt::Timestamp>,
16399    {
16400        self.create_time = v.map(|x| x.into());
16401        self
16402    }
16403
16404    /// Sets the value of [update_time][crate::model::ManagementDnsZoneBinding::update_time].
16405    ///
16406    /// # Example
16407    /// ```ignore,no_run
16408    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16409    /// use wkt::Timestamp;
16410    /// let x = ManagementDnsZoneBinding::new().set_update_time(Timestamp::default()/* use setters */);
16411    /// ```
16412    pub fn set_update_time<T>(mut self, v: T) -> Self
16413    where
16414        T: std::convert::Into<wkt::Timestamp>,
16415    {
16416        self.update_time = std::option::Option::Some(v.into());
16417        self
16418    }
16419
16420    /// Sets or clears the value of [update_time][crate::model::ManagementDnsZoneBinding::update_time].
16421    ///
16422    /// # Example
16423    /// ```ignore,no_run
16424    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16425    /// use wkt::Timestamp;
16426    /// let x = ManagementDnsZoneBinding::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
16427    /// let x = ManagementDnsZoneBinding::new().set_or_clear_update_time(None::<Timestamp>);
16428    /// ```
16429    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
16430    where
16431        T: std::convert::Into<wkt::Timestamp>,
16432    {
16433        self.update_time = v.map(|x| x.into());
16434        self
16435    }
16436
16437    /// Sets the value of [state][crate::model::ManagementDnsZoneBinding::state].
16438    ///
16439    /// # Example
16440    /// ```ignore,no_run
16441    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16442    /// use google_cloud_vmwareengine_v1::model::management_dns_zone_binding::State;
16443    /// let x0 = ManagementDnsZoneBinding::new().set_state(State::Active);
16444    /// let x1 = ManagementDnsZoneBinding::new().set_state(State::Creating);
16445    /// let x2 = ManagementDnsZoneBinding::new().set_state(State::Updating);
16446    /// ```
16447    pub fn set_state<T: std::convert::Into<crate::model::management_dns_zone_binding::State>>(
16448        mut self,
16449        v: T,
16450    ) -> Self {
16451        self.state = v.into();
16452        self
16453    }
16454
16455    /// Sets the value of [description][crate::model::ManagementDnsZoneBinding::description].
16456    ///
16457    /// # Example
16458    /// ```ignore,no_run
16459    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16460    /// let x = ManagementDnsZoneBinding::new().set_description("example");
16461    /// ```
16462    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16463        self.description = v.into();
16464        self
16465    }
16466
16467    /// Sets the value of [uid][crate::model::ManagementDnsZoneBinding::uid].
16468    ///
16469    /// # Example
16470    /// ```ignore,no_run
16471    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16472    /// let x = ManagementDnsZoneBinding::new().set_uid("example");
16473    /// ```
16474    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16475        self.uid = v.into();
16476        self
16477    }
16478
16479    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network].
16480    ///
16481    /// Note that all the setters affecting `bind_network` are mutually
16482    /// exclusive.
16483    ///
16484    /// # Example
16485    /// ```ignore,no_run
16486    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16487    /// use google_cloud_vmwareengine_v1::model::management_dns_zone_binding::BindNetwork;
16488    /// let x = ManagementDnsZoneBinding::new().set_bind_network(Some(BindNetwork::VpcNetwork("example".to_string())));
16489    /// ```
16490    pub fn set_bind_network<
16491        T: std::convert::Into<
16492                std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
16493            >,
16494    >(
16495        mut self,
16496        v: T,
16497    ) -> Self {
16498        self.bind_network = v.into();
16499        self
16500    }
16501
16502    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
16503    /// if it holds a `VpcNetwork`, `None` if the field is not set or
16504    /// holds a different branch.
16505    pub fn vpc_network(&self) -> std::option::Option<&std::string::String> {
16506        #[allow(unreachable_patterns)]
16507        self.bind_network.as_ref().and_then(|v| match v {
16508            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v) => {
16509                std::option::Option::Some(v)
16510            }
16511            _ => std::option::Option::None,
16512        })
16513    }
16514
16515    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
16516    /// to hold a `VpcNetwork`.
16517    ///
16518    /// Note that all the setters affecting `bind_network` are
16519    /// mutually exclusive.
16520    ///
16521    /// # Example
16522    /// ```ignore,no_run
16523    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16524    /// let x = ManagementDnsZoneBinding::new().set_vpc_network("example");
16525    /// assert!(x.vpc_network().is_some());
16526    /// assert!(x.vmware_engine_network().is_none());
16527    /// ```
16528    pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16529        self.bind_network = std::option::Option::Some(
16530            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v.into()),
16531        );
16532        self
16533    }
16534
16535    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
16536    /// if it holds a `VmwareEngineNetwork`, `None` if the field is not set or
16537    /// holds a different branch.
16538    pub fn vmware_engine_network(&self) -> std::option::Option<&std::string::String> {
16539        #[allow(unreachable_patterns)]
16540        self.bind_network.as_ref().and_then(|v| match v {
16541            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v) => {
16542                std::option::Option::Some(v)
16543            }
16544            _ => std::option::Option::None,
16545        })
16546    }
16547
16548    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
16549    /// to hold a `VmwareEngineNetwork`.
16550    ///
16551    /// Note that all the setters affecting `bind_network` are
16552    /// mutually exclusive.
16553    ///
16554    /// # Example
16555    /// ```ignore,no_run
16556    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16557    /// let x = ManagementDnsZoneBinding::new().set_vmware_engine_network("example");
16558    /// assert!(x.vmware_engine_network().is_some());
16559    /// assert!(x.vpc_network().is_none());
16560    /// ```
16561    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
16562        mut self,
16563        v: T,
16564    ) -> Self {
16565        self.bind_network = std::option::Option::Some(
16566            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v.into()),
16567        );
16568        self
16569    }
16570}
16571
16572impl wkt::message::Message for ManagementDnsZoneBinding {
16573    fn typename() -> &'static str {
16574        "type.googleapis.com/google.cloud.vmwareengine.v1.ManagementDnsZoneBinding"
16575    }
16576}
16577
16578/// Defines additional types related to [ManagementDnsZoneBinding].
16579pub mod management_dns_zone_binding {
16580    #[allow(unused_imports)]
16581    use super::*;
16582
16583    /// Enum State defines possible states of binding between the consumer VPC
16584    /// network and the management DNS zone.
16585    ///
16586    /// # Working with unknown values
16587    ///
16588    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16589    /// additional enum variants at any time. Adding new variants is not considered
16590    /// a breaking change. Applications should write their code in anticipation of:
16591    ///
16592    /// - New values appearing in future releases of the client library, **and**
16593    /// - New values received dynamically, without application changes.
16594    ///
16595    /// Please consult the [Working with enums] section in the user guide for some
16596    /// guidelines.
16597    ///
16598    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
16599    #[derive(Clone, Debug, PartialEq)]
16600    #[non_exhaustive]
16601    pub enum State {
16602        /// The default value. This value should never be used.
16603        Unspecified,
16604        /// The binding is ready.
16605        Active,
16606        /// The binding is being created.
16607        Creating,
16608        /// The binding is being updated.
16609        Updating,
16610        /// The binding is being deleted.
16611        Deleting,
16612        /// The binding has failed.
16613        Failed,
16614        /// If set, the enum was initialized with an unknown value.
16615        ///
16616        /// Applications can examine the value using [State::value] or
16617        /// [State::name].
16618        UnknownValue(state::UnknownValue),
16619    }
16620
16621    #[doc(hidden)]
16622    pub mod state {
16623        #[allow(unused_imports)]
16624        use super::*;
16625        #[derive(Clone, Debug, PartialEq)]
16626        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16627    }
16628
16629    impl State {
16630        /// Gets the enum value.
16631        ///
16632        /// Returns `None` if the enum contains an unknown value deserialized from
16633        /// the string representation of enums.
16634        pub fn value(&self) -> std::option::Option<i32> {
16635            match self {
16636                Self::Unspecified => std::option::Option::Some(0),
16637                Self::Active => std::option::Option::Some(1),
16638                Self::Creating => std::option::Option::Some(2),
16639                Self::Updating => std::option::Option::Some(3),
16640                Self::Deleting => std::option::Option::Some(4),
16641                Self::Failed => std::option::Option::Some(5),
16642                Self::UnknownValue(u) => u.0.value(),
16643            }
16644        }
16645
16646        /// Gets the enum value as a string.
16647        ///
16648        /// Returns `None` if the enum contains an unknown value deserialized from
16649        /// the integer representation of enums.
16650        pub fn name(&self) -> std::option::Option<&str> {
16651            match self {
16652                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
16653                Self::Active => std::option::Option::Some("ACTIVE"),
16654                Self::Creating => std::option::Option::Some("CREATING"),
16655                Self::Updating => std::option::Option::Some("UPDATING"),
16656                Self::Deleting => std::option::Option::Some("DELETING"),
16657                Self::Failed => std::option::Option::Some("FAILED"),
16658                Self::UnknownValue(u) => u.0.name(),
16659            }
16660        }
16661    }
16662
16663    impl std::default::Default for State {
16664        fn default() -> Self {
16665            use std::convert::From;
16666            Self::from(0)
16667        }
16668    }
16669
16670    impl std::fmt::Display for State {
16671        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16672            wkt::internal::display_enum(f, self.name(), self.value())
16673        }
16674    }
16675
16676    impl std::convert::From<i32> for State {
16677        fn from(value: i32) -> Self {
16678            match value {
16679                0 => Self::Unspecified,
16680                1 => Self::Active,
16681                2 => Self::Creating,
16682                3 => Self::Updating,
16683                4 => Self::Deleting,
16684                5 => Self::Failed,
16685                _ => Self::UnknownValue(state::UnknownValue(
16686                    wkt::internal::UnknownEnumValue::Integer(value),
16687                )),
16688            }
16689        }
16690    }
16691
16692    impl std::convert::From<&str> for State {
16693        fn from(value: &str) -> Self {
16694            use std::string::ToString;
16695            match value {
16696                "STATE_UNSPECIFIED" => Self::Unspecified,
16697                "ACTIVE" => Self::Active,
16698                "CREATING" => Self::Creating,
16699                "UPDATING" => Self::Updating,
16700                "DELETING" => Self::Deleting,
16701                "FAILED" => Self::Failed,
16702                _ => Self::UnknownValue(state::UnknownValue(
16703                    wkt::internal::UnknownEnumValue::String(value.to_string()),
16704                )),
16705            }
16706        }
16707    }
16708
16709    impl serde::ser::Serialize for State {
16710        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16711        where
16712            S: serde::Serializer,
16713        {
16714            match self {
16715                Self::Unspecified => serializer.serialize_i32(0),
16716                Self::Active => serializer.serialize_i32(1),
16717                Self::Creating => serializer.serialize_i32(2),
16718                Self::Updating => serializer.serialize_i32(3),
16719                Self::Deleting => serializer.serialize_i32(4),
16720                Self::Failed => serializer.serialize_i32(5),
16721                Self::UnknownValue(u) => u.0.serialize(serializer),
16722            }
16723        }
16724    }
16725
16726    impl<'de> serde::de::Deserialize<'de> for State {
16727        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16728        where
16729            D: serde::Deserializer<'de>,
16730        {
16731            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
16732                ".google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State",
16733            ))
16734        }
16735    }
16736
16737    /// Required. The relative resource name of the network to bind to the
16738    /// management DNS zone. This network can be a consumer VPC network or a
16739    /// VMware engine network.
16740    #[derive(Clone, Debug, PartialEq)]
16741    #[non_exhaustive]
16742    pub enum BindNetwork {
16743        /// Network to bind is a standard consumer VPC.
16744        /// Specify the name in the following form for consumer
16745        /// VPC network: `projects/{project}/global/networks/{network_id}`.
16746        /// `{project}` can either be a project number or a project ID.
16747        VpcNetwork(std::string::String),
16748        /// Network to bind is a VMware Engine network.
16749        /// Specify the name in the following form for VMware engine network:
16750        /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
16751        /// `{project}` can either be a project number or a project ID.
16752        VmwareEngineNetwork(std::string::String),
16753    }
16754}
16755
16756/// VMware Engine network resource that provides connectivity for VMware Engine
16757/// private clouds.
16758#[derive(Clone, Default, PartialEq)]
16759#[non_exhaustive]
16760pub struct VmwareEngineNetwork {
16761    /// Output only. The resource name of the VMware Engine network.
16762    /// Resource names are schemeless URIs that follow the conventions in
16763    /// <https://cloud.google.com/apis/design/resource_names>.
16764    /// For example:
16765    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
16766    pub name: std::string::String,
16767
16768    /// Output only. Creation time of this resource.
16769    pub create_time: std::option::Option<wkt::Timestamp>,
16770
16771    /// Output only. Last update time of this resource.
16772    pub update_time: std::option::Option<wkt::Timestamp>,
16773
16774    /// User-provided description for this VMware Engine network.
16775    pub description: std::string::String,
16776
16777    /// Output only. VMware Engine service VPC networks that provide connectivity
16778    /// from a private cloud to customer projects, the internet, and other Google
16779    /// Cloud services.
16780    pub vpc_networks: std::vec::Vec<crate::model::vmware_engine_network::VpcNetwork>,
16781
16782    /// Output only. State of the VMware Engine network.
16783    pub state: crate::model::vmware_engine_network::State,
16784
16785    /// Required. VMware Engine network type.
16786    pub r#type: crate::model::vmware_engine_network::Type,
16787
16788    /// Output only. System-generated unique identifier for the resource.
16789    pub uid: std::string::String,
16790
16791    /// Checksum that may be sent on update and delete requests to ensure that the
16792    /// user-provided value is up to date before the server processes a request.
16793    /// The server computes checksums based on the value of other fields in the
16794    /// request.
16795    pub etag: std::string::String,
16796
16797    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16798}
16799
16800impl VmwareEngineNetwork {
16801    /// Creates a new default instance.
16802    pub fn new() -> Self {
16803        std::default::Default::default()
16804    }
16805
16806    /// Sets the value of [name][crate::model::VmwareEngineNetwork::name].
16807    ///
16808    /// # Example
16809    /// ```ignore,no_run
16810    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
16811    /// let x = VmwareEngineNetwork::new().set_name("example");
16812    /// ```
16813    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16814        self.name = v.into();
16815        self
16816    }
16817
16818    /// Sets the value of [create_time][crate::model::VmwareEngineNetwork::create_time].
16819    ///
16820    /// # Example
16821    /// ```ignore,no_run
16822    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
16823    /// use wkt::Timestamp;
16824    /// let x = VmwareEngineNetwork::new().set_create_time(Timestamp::default()/* use setters */);
16825    /// ```
16826    pub fn set_create_time<T>(mut self, v: T) -> Self
16827    where
16828        T: std::convert::Into<wkt::Timestamp>,
16829    {
16830        self.create_time = std::option::Option::Some(v.into());
16831        self
16832    }
16833
16834    /// Sets or clears the value of [create_time][crate::model::VmwareEngineNetwork::create_time].
16835    ///
16836    /// # Example
16837    /// ```ignore,no_run
16838    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
16839    /// use wkt::Timestamp;
16840    /// let x = VmwareEngineNetwork::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
16841    /// let x = VmwareEngineNetwork::new().set_or_clear_create_time(None::<Timestamp>);
16842    /// ```
16843    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16844    where
16845        T: std::convert::Into<wkt::Timestamp>,
16846    {
16847        self.create_time = v.map(|x| x.into());
16848        self
16849    }
16850
16851    /// Sets the value of [update_time][crate::model::VmwareEngineNetwork::update_time].
16852    ///
16853    /// # Example
16854    /// ```ignore,no_run
16855    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
16856    /// use wkt::Timestamp;
16857    /// let x = VmwareEngineNetwork::new().set_update_time(Timestamp::default()/* use setters */);
16858    /// ```
16859    pub fn set_update_time<T>(mut self, v: T) -> Self
16860    where
16861        T: std::convert::Into<wkt::Timestamp>,
16862    {
16863        self.update_time = std::option::Option::Some(v.into());
16864        self
16865    }
16866
16867    /// Sets or clears the value of [update_time][crate::model::VmwareEngineNetwork::update_time].
16868    ///
16869    /// # Example
16870    /// ```ignore,no_run
16871    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
16872    /// use wkt::Timestamp;
16873    /// let x = VmwareEngineNetwork::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
16874    /// let x = VmwareEngineNetwork::new().set_or_clear_update_time(None::<Timestamp>);
16875    /// ```
16876    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
16877    where
16878        T: std::convert::Into<wkt::Timestamp>,
16879    {
16880        self.update_time = v.map(|x| x.into());
16881        self
16882    }
16883
16884    /// Sets the value of [description][crate::model::VmwareEngineNetwork::description].
16885    ///
16886    /// # Example
16887    /// ```ignore,no_run
16888    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
16889    /// let x = VmwareEngineNetwork::new().set_description("example");
16890    /// ```
16891    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16892        self.description = v.into();
16893        self
16894    }
16895
16896    /// Sets the value of [vpc_networks][crate::model::VmwareEngineNetwork::vpc_networks].
16897    ///
16898    /// # Example
16899    /// ```ignore,no_run
16900    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
16901    /// use google_cloud_vmwareengine_v1::model::vmware_engine_network::VpcNetwork;
16902    /// let x = VmwareEngineNetwork::new()
16903    ///     .set_vpc_networks([
16904    ///         VpcNetwork::default()/* use setters */,
16905    ///         VpcNetwork::default()/* use (different) setters */,
16906    ///     ]);
16907    /// ```
16908    pub fn set_vpc_networks<T, V>(mut self, v: T) -> Self
16909    where
16910        T: std::iter::IntoIterator<Item = V>,
16911        V: std::convert::Into<crate::model::vmware_engine_network::VpcNetwork>,
16912    {
16913        use std::iter::Iterator;
16914        self.vpc_networks = v.into_iter().map(|i| i.into()).collect();
16915        self
16916    }
16917
16918    /// Sets the value of [state][crate::model::VmwareEngineNetwork::state].
16919    ///
16920    /// # Example
16921    /// ```ignore,no_run
16922    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
16923    /// use google_cloud_vmwareengine_v1::model::vmware_engine_network::State;
16924    /// let x0 = VmwareEngineNetwork::new().set_state(State::Creating);
16925    /// let x1 = VmwareEngineNetwork::new().set_state(State::Active);
16926    /// let x2 = VmwareEngineNetwork::new().set_state(State::Updating);
16927    /// ```
16928    pub fn set_state<T: std::convert::Into<crate::model::vmware_engine_network::State>>(
16929        mut self,
16930        v: T,
16931    ) -> Self {
16932        self.state = v.into();
16933        self
16934    }
16935
16936    /// Sets the value of [r#type][crate::model::VmwareEngineNetwork::type].
16937    ///
16938    /// # Example
16939    /// ```ignore,no_run
16940    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
16941    /// use google_cloud_vmwareengine_v1::model::vmware_engine_network::Type;
16942    /// let x0 = VmwareEngineNetwork::new().set_type(Type::Legacy);
16943    /// let x1 = VmwareEngineNetwork::new().set_type(Type::Standard);
16944    /// ```
16945    pub fn set_type<T: std::convert::Into<crate::model::vmware_engine_network::Type>>(
16946        mut self,
16947        v: T,
16948    ) -> Self {
16949        self.r#type = v.into();
16950        self
16951    }
16952
16953    /// Sets the value of [uid][crate::model::VmwareEngineNetwork::uid].
16954    ///
16955    /// # Example
16956    /// ```ignore,no_run
16957    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
16958    /// let x = VmwareEngineNetwork::new().set_uid("example");
16959    /// ```
16960    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16961        self.uid = v.into();
16962        self
16963    }
16964
16965    /// Sets the value of [etag][crate::model::VmwareEngineNetwork::etag].
16966    ///
16967    /// # Example
16968    /// ```ignore,no_run
16969    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
16970    /// let x = VmwareEngineNetwork::new().set_etag("example");
16971    /// ```
16972    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16973        self.etag = v.into();
16974        self
16975    }
16976}
16977
16978impl wkt::message::Message for VmwareEngineNetwork {
16979    fn typename() -> &'static str {
16980        "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork"
16981    }
16982}
16983
16984/// Defines additional types related to [VmwareEngineNetwork].
16985pub mod vmware_engine_network {
16986    #[allow(unused_imports)]
16987    use super::*;
16988
16989    /// Represents a VMware Engine VPC network that is managed by a
16990    /// VMware Engine network resource.
16991    #[derive(Clone, Default, PartialEq)]
16992    #[non_exhaustive]
16993    pub struct VpcNetwork {
16994        /// Output only. Type of VPC network (INTRANET, INTERNET, or
16995        /// GOOGLE_CLOUD)
16996        pub r#type: crate::model::vmware_engine_network::vpc_network::Type,
16997
16998        /// Output only. The relative resource name of the service VPC network this
16999        /// VMware Engine network is attached to. For example:
17000        /// `projects/123123/global/networks/my-network`
17001        pub network: std::string::String,
17002
17003        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17004    }
17005
17006    impl VpcNetwork {
17007        /// Creates a new default instance.
17008        pub fn new() -> Self {
17009            std::default::Default::default()
17010        }
17011
17012        /// Sets the value of [r#type][crate::model::vmware_engine_network::VpcNetwork::type].
17013        ///
17014        /// # Example
17015        /// ```ignore,no_run
17016        /// # use google_cloud_vmwareengine_v1::model::vmware_engine_network::VpcNetwork;
17017        /// use google_cloud_vmwareengine_v1::model::vmware_engine_network::vpc_network::Type;
17018        /// let x0 = VpcNetwork::new().set_type(Type::Intranet);
17019        /// let x1 = VpcNetwork::new().set_type(Type::Internet);
17020        /// let x2 = VpcNetwork::new().set_type(Type::GoogleCloud);
17021        /// ```
17022        pub fn set_type<
17023            T: std::convert::Into<crate::model::vmware_engine_network::vpc_network::Type>,
17024        >(
17025            mut self,
17026            v: T,
17027        ) -> Self {
17028            self.r#type = v.into();
17029            self
17030        }
17031
17032        /// Sets the value of [network][crate::model::vmware_engine_network::VpcNetwork::network].
17033        ///
17034        /// # Example
17035        /// ```ignore,no_run
17036        /// # use google_cloud_vmwareengine_v1::model::vmware_engine_network::VpcNetwork;
17037        /// let x = VpcNetwork::new().set_network("example");
17038        /// ```
17039        pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17040            self.network = v.into();
17041            self
17042        }
17043    }
17044
17045    impl wkt::message::Message for VpcNetwork {
17046        fn typename() -> &'static str {
17047            "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork"
17048        }
17049    }
17050
17051    /// Defines additional types related to [VpcNetwork].
17052    pub mod vpc_network {
17053        #[allow(unused_imports)]
17054        use super::*;
17055
17056        /// Enum Type defines possible types of a VMware Engine network controlled
17057        /// service.
17058        ///
17059        /// # Working with unknown values
17060        ///
17061        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17062        /// additional enum variants at any time. Adding new variants is not considered
17063        /// a breaking change. Applications should write their code in anticipation of:
17064        ///
17065        /// - New values appearing in future releases of the client library, **and**
17066        /// - New values received dynamically, without application changes.
17067        ///
17068        /// Please consult the [Working with enums] section in the user guide for some
17069        /// guidelines.
17070        ///
17071        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17072        #[derive(Clone, Debug, PartialEq)]
17073        #[non_exhaustive]
17074        pub enum Type {
17075            /// The default value. This value should never be used.
17076            Unspecified,
17077            /// VPC network that will be peered with a consumer VPC network or the
17078            /// intranet VPC of another VMware Engine network. Access a private cloud
17079            /// through Compute Engine VMs on a peered VPC network or an on-premises
17080            /// resource connected to a peered consumer VPC network.
17081            Intranet,
17082            /// VPC network used for internet access to and from a private cloud.
17083            Internet,
17084            /// VPC network used for access to Google Cloud services like
17085            /// Cloud Storage.
17086            GoogleCloud,
17087            /// If set, the enum was initialized with an unknown value.
17088            ///
17089            /// Applications can examine the value using [Type::value] or
17090            /// [Type::name].
17091            UnknownValue(r#type::UnknownValue),
17092        }
17093
17094        #[doc(hidden)]
17095        pub mod r#type {
17096            #[allow(unused_imports)]
17097            use super::*;
17098            #[derive(Clone, Debug, PartialEq)]
17099            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17100        }
17101
17102        impl Type {
17103            /// Gets the enum value.
17104            ///
17105            /// Returns `None` if the enum contains an unknown value deserialized from
17106            /// the string representation of enums.
17107            pub fn value(&self) -> std::option::Option<i32> {
17108                match self {
17109                    Self::Unspecified => std::option::Option::Some(0),
17110                    Self::Intranet => std::option::Option::Some(1),
17111                    Self::Internet => std::option::Option::Some(2),
17112                    Self::GoogleCloud => std::option::Option::Some(3),
17113                    Self::UnknownValue(u) => u.0.value(),
17114                }
17115            }
17116
17117            /// Gets the enum value as a string.
17118            ///
17119            /// Returns `None` if the enum contains an unknown value deserialized from
17120            /// the integer representation of enums.
17121            pub fn name(&self) -> std::option::Option<&str> {
17122                match self {
17123                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
17124                    Self::Intranet => std::option::Option::Some("INTRANET"),
17125                    Self::Internet => std::option::Option::Some("INTERNET"),
17126                    Self::GoogleCloud => std::option::Option::Some("GOOGLE_CLOUD"),
17127                    Self::UnknownValue(u) => u.0.name(),
17128                }
17129            }
17130        }
17131
17132        impl std::default::Default for Type {
17133            fn default() -> Self {
17134                use std::convert::From;
17135                Self::from(0)
17136            }
17137        }
17138
17139        impl std::fmt::Display for Type {
17140            fn fmt(
17141                &self,
17142                f: &mut std::fmt::Formatter<'_>,
17143            ) -> std::result::Result<(), std::fmt::Error> {
17144                wkt::internal::display_enum(f, self.name(), self.value())
17145            }
17146        }
17147
17148        impl std::convert::From<i32> for Type {
17149            fn from(value: i32) -> Self {
17150                match value {
17151                    0 => Self::Unspecified,
17152                    1 => Self::Intranet,
17153                    2 => Self::Internet,
17154                    3 => Self::GoogleCloud,
17155                    _ => Self::UnknownValue(r#type::UnknownValue(
17156                        wkt::internal::UnknownEnumValue::Integer(value),
17157                    )),
17158                }
17159            }
17160        }
17161
17162        impl std::convert::From<&str> for Type {
17163            fn from(value: &str) -> Self {
17164                use std::string::ToString;
17165                match value {
17166                    "TYPE_UNSPECIFIED" => Self::Unspecified,
17167                    "INTRANET" => Self::Intranet,
17168                    "INTERNET" => Self::Internet,
17169                    "GOOGLE_CLOUD" => Self::GoogleCloud,
17170                    _ => Self::UnknownValue(r#type::UnknownValue(
17171                        wkt::internal::UnknownEnumValue::String(value.to_string()),
17172                    )),
17173                }
17174            }
17175        }
17176
17177        impl serde::ser::Serialize for Type {
17178            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17179            where
17180                S: serde::Serializer,
17181            {
17182                match self {
17183                    Self::Unspecified => serializer.serialize_i32(0),
17184                    Self::Intranet => serializer.serialize_i32(1),
17185                    Self::Internet => serializer.serialize_i32(2),
17186                    Self::GoogleCloud => serializer.serialize_i32(3),
17187                    Self::UnknownValue(u) => u.0.serialize(serializer),
17188                }
17189            }
17190        }
17191
17192        impl<'de> serde::de::Deserialize<'de> for Type {
17193            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17194            where
17195                D: serde::Deserializer<'de>,
17196            {
17197                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
17198                    ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type",
17199                ))
17200            }
17201        }
17202    }
17203
17204    /// Enum State defines possible states of VMware Engine network.
17205    ///
17206    /// # Working with unknown values
17207    ///
17208    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17209    /// additional enum variants at any time. Adding new variants is not considered
17210    /// a breaking change. Applications should write their code in anticipation of:
17211    ///
17212    /// - New values appearing in future releases of the client library, **and**
17213    /// - New values received dynamically, without application changes.
17214    ///
17215    /// Please consult the [Working with enums] section in the user guide for some
17216    /// guidelines.
17217    ///
17218    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17219    #[derive(Clone, Debug, PartialEq)]
17220    #[non_exhaustive]
17221    pub enum State {
17222        /// The default value. This value is used if the state is omitted.
17223        Unspecified,
17224        /// The VMware Engine network is being created.
17225        Creating,
17226        /// The VMware Engine network is ready.
17227        Active,
17228        /// The VMware Engine network is being updated.
17229        Updating,
17230        /// The VMware Engine network is being deleted.
17231        Deleting,
17232        /// If set, the enum was initialized with an unknown value.
17233        ///
17234        /// Applications can examine the value using [State::value] or
17235        /// [State::name].
17236        UnknownValue(state::UnknownValue),
17237    }
17238
17239    #[doc(hidden)]
17240    pub mod state {
17241        #[allow(unused_imports)]
17242        use super::*;
17243        #[derive(Clone, Debug, PartialEq)]
17244        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17245    }
17246
17247    impl State {
17248        /// Gets the enum value.
17249        ///
17250        /// Returns `None` if the enum contains an unknown value deserialized from
17251        /// the string representation of enums.
17252        pub fn value(&self) -> std::option::Option<i32> {
17253            match self {
17254                Self::Unspecified => std::option::Option::Some(0),
17255                Self::Creating => std::option::Option::Some(1),
17256                Self::Active => std::option::Option::Some(2),
17257                Self::Updating => std::option::Option::Some(3),
17258                Self::Deleting => std::option::Option::Some(4),
17259                Self::UnknownValue(u) => u.0.value(),
17260            }
17261        }
17262
17263        /// Gets the enum value as a string.
17264        ///
17265        /// Returns `None` if the enum contains an unknown value deserialized from
17266        /// the integer representation of enums.
17267        pub fn name(&self) -> std::option::Option<&str> {
17268            match self {
17269                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
17270                Self::Creating => std::option::Option::Some("CREATING"),
17271                Self::Active => std::option::Option::Some("ACTIVE"),
17272                Self::Updating => std::option::Option::Some("UPDATING"),
17273                Self::Deleting => std::option::Option::Some("DELETING"),
17274                Self::UnknownValue(u) => u.0.name(),
17275            }
17276        }
17277    }
17278
17279    impl std::default::Default for State {
17280        fn default() -> Self {
17281            use std::convert::From;
17282            Self::from(0)
17283        }
17284    }
17285
17286    impl std::fmt::Display for State {
17287        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17288            wkt::internal::display_enum(f, self.name(), self.value())
17289        }
17290    }
17291
17292    impl std::convert::From<i32> for State {
17293        fn from(value: i32) -> Self {
17294            match value {
17295                0 => Self::Unspecified,
17296                1 => Self::Creating,
17297                2 => Self::Active,
17298                3 => Self::Updating,
17299                4 => Self::Deleting,
17300                _ => Self::UnknownValue(state::UnknownValue(
17301                    wkt::internal::UnknownEnumValue::Integer(value),
17302                )),
17303            }
17304        }
17305    }
17306
17307    impl std::convert::From<&str> for State {
17308        fn from(value: &str) -> Self {
17309            use std::string::ToString;
17310            match value {
17311                "STATE_UNSPECIFIED" => Self::Unspecified,
17312                "CREATING" => Self::Creating,
17313                "ACTIVE" => Self::Active,
17314                "UPDATING" => Self::Updating,
17315                "DELETING" => Self::Deleting,
17316                _ => Self::UnknownValue(state::UnknownValue(
17317                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17318                )),
17319            }
17320        }
17321    }
17322
17323    impl serde::ser::Serialize for State {
17324        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17325        where
17326            S: serde::Serializer,
17327        {
17328            match self {
17329                Self::Unspecified => serializer.serialize_i32(0),
17330                Self::Creating => serializer.serialize_i32(1),
17331                Self::Active => serializer.serialize_i32(2),
17332                Self::Updating => serializer.serialize_i32(3),
17333                Self::Deleting => serializer.serialize_i32(4),
17334                Self::UnknownValue(u) => u.0.serialize(serializer),
17335            }
17336        }
17337    }
17338
17339    impl<'de> serde::de::Deserialize<'de> for State {
17340        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17341        where
17342            D: serde::Deserializer<'de>,
17343        {
17344            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
17345                ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.State",
17346            ))
17347        }
17348    }
17349
17350    /// Enum Type defines possible types of VMware Engine network.
17351    ///
17352    /// # Working with unknown values
17353    ///
17354    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17355    /// additional enum variants at any time. Adding new variants is not considered
17356    /// a breaking change. Applications should write their code in anticipation of:
17357    ///
17358    /// - New values appearing in future releases of the client library, **and**
17359    /// - New values received dynamically, without application changes.
17360    ///
17361    /// Please consult the [Working with enums] section in the user guide for some
17362    /// guidelines.
17363    ///
17364    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17365    #[derive(Clone, Debug, PartialEq)]
17366    #[non_exhaustive]
17367    pub enum Type {
17368        /// The default value. This value should never be used.
17369        Unspecified,
17370        /// Network type used by private clouds created in projects without a network
17371        /// of type `STANDARD`. This network type is no longer used for new VMware
17372        /// Engine private cloud deployments.
17373        Legacy,
17374        /// Standard network type used for private cloud connectivity.
17375        Standard,
17376        /// If set, the enum was initialized with an unknown value.
17377        ///
17378        /// Applications can examine the value using [Type::value] or
17379        /// [Type::name].
17380        UnknownValue(r#type::UnknownValue),
17381    }
17382
17383    #[doc(hidden)]
17384    pub mod r#type {
17385        #[allow(unused_imports)]
17386        use super::*;
17387        #[derive(Clone, Debug, PartialEq)]
17388        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17389    }
17390
17391    impl Type {
17392        /// Gets the enum value.
17393        ///
17394        /// Returns `None` if the enum contains an unknown value deserialized from
17395        /// the string representation of enums.
17396        pub fn value(&self) -> std::option::Option<i32> {
17397            match self {
17398                Self::Unspecified => std::option::Option::Some(0),
17399                Self::Legacy => std::option::Option::Some(1),
17400                Self::Standard => std::option::Option::Some(2),
17401                Self::UnknownValue(u) => u.0.value(),
17402            }
17403        }
17404
17405        /// Gets the enum value as a string.
17406        ///
17407        /// Returns `None` if the enum contains an unknown value deserialized from
17408        /// the integer representation of enums.
17409        pub fn name(&self) -> std::option::Option<&str> {
17410            match self {
17411                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
17412                Self::Legacy => std::option::Option::Some("LEGACY"),
17413                Self::Standard => std::option::Option::Some("STANDARD"),
17414                Self::UnknownValue(u) => u.0.name(),
17415            }
17416        }
17417    }
17418
17419    impl std::default::Default for Type {
17420        fn default() -> Self {
17421            use std::convert::From;
17422            Self::from(0)
17423        }
17424    }
17425
17426    impl std::fmt::Display for Type {
17427        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17428            wkt::internal::display_enum(f, self.name(), self.value())
17429        }
17430    }
17431
17432    impl std::convert::From<i32> for Type {
17433        fn from(value: i32) -> Self {
17434            match value {
17435                0 => Self::Unspecified,
17436                1 => Self::Legacy,
17437                2 => Self::Standard,
17438                _ => Self::UnknownValue(r#type::UnknownValue(
17439                    wkt::internal::UnknownEnumValue::Integer(value),
17440                )),
17441            }
17442        }
17443    }
17444
17445    impl std::convert::From<&str> for Type {
17446        fn from(value: &str) -> Self {
17447            use std::string::ToString;
17448            match value {
17449                "TYPE_UNSPECIFIED" => Self::Unspecified,
17450                "LEGACY" => Self::Legacy,
17451                "STANDARD" => Self::Standard,
17452                _ => Self::UnknownValue(r#type::UnknownValue(
17453                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17454                )),
17455            }
17456        }
17457    }
17458
17459    impl serde::ser::Serialize for Type {
17460        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17461        where
17462            S: serde::Serializer,
17463        {
17464            match self {
17465                Self::Unspecified => serializer.serialize_i32(0),
17466                Self::Legacy => serializer.serialize_i32(1),
17467                Self::Standard => serializer.serialize_i32(2),
17468                Self::UnknownValue(u) => u.0.serialize(serializer),
17469            }
17470        }
17471    }
17472
17473    impl<'de> serde::de::Deserialize<'de> for Type {
17474        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17475        where
17476            D: serde::Deserializer<'de>,
17477        {
17478            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
17479                ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type",
17480            ))
17481        }
17482    }
17483}
17484
17485/// Private connection resource that provides connectivity for VMware Engine
17486/// private clouds.
17487#[derive(Clone, Default, PartialEq)]
17488#[non_exhaustive]
17489pub struct PrivateConnection {
17490    /// Output only. The resource name of the private connection.
17491    /// Resource names are schemeless URIs that follow the conventions in
17492    /// <https://cloud.google.com/apis/design/resource_names>.
17493    /// For example:
17494    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
17495    pub name: std::string::String,
17496
17497    /// Output only. Creation time of this resource.
17498    pub create_time: std::option::Option<wkt::Timestamp>,
17499
17500    /// Output only. Last update time of this resource.
17501    pub update_time: std::option::Option<wkt::Timestamp>,
17502
17503    /// Optional. User-provided description for this private connection.
17504    pub description: std::string::String,
17505
17506    /// Output only. State of the private connection.
17507    pub state: crate::model::private_connection::State,
17508
17509    /// Required. The relative resource name of Legacy VMware Engine network.
17510    /// Specify the name in the following form:
17511    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
17512    /// where `{project}`, `{location}` will be same as specified in private
17513    /// connection resource name and `{vmware_engine_network_id}` will be in the
17514    /// form of `{location}`-default e.g.
17515    /// projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default.
17516    pub vmware_engine_network: std::string::String,
17517
17518    /// Output only. The canonical name of the VMware Engine network in the form:
17519    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
17520    pub vmware_engine_network_canonical: std::string::String,
17521
17522    /// Required. Private connection type.
17523    pub r#type: crate::model::private_connection::Type,
17524
17525    /// Output only. VPC network peering id between given network VPC and
17526    /// VMwareEngineNetwork.
17527    pub peering_id: std::string::String,
17528
17529    /// Optional. Routing Mode.
17530    /// Default value is set to GLOBAL.
17531    /// For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or
17532    /// REGIONAL, for other types only GLOBAL is supported.
17533    pub routing_mode: crate::model::private_connection::RoutingMode,
17534
17535    /// Output only. System-generated unique identifier for the resource.
17536    pub uid: std::string::String,
17537
17538    /// Required. Service network to create private connection.
17539    /// Specify the name in the following form:
17540    /// `projects/{project}/global/networks/{network_id}`
17541    /// For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking
17542    /// VPC, e.g. projects/project-tp/global/networks/servicenetworking.
17543    /// For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC,
17544    /// e.g. projects/project-tp/global/networks/netapp-tenant-vpc.
17545    /// For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g.
17546    /// projects/project-tp/global/networks/dell-tenant-vpc.
17547    /// For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or
17548    /// any other producer VPC to which the VMware Engine Network needs to be
17549    /// connected, e.g. projects/project/global/networks/vpc.
17550    pub service_network: std::string::String,
17551
17552    /// Output only. Peering state between service network and VMware Engine
17553    /// network.
17554    pub peering_state: crate::model::private_connection::PeeringState,
17555
17556    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17557}
17558
17559impl PrivateConnection {
17560    /// Creates a new default instance.
17561    pub fn new() -> Self {
17562        std::default::Default::default()
17563    }
17564
17565    /// Sets the value of [name][crate::model::PrivateConnection::name].
17566    ///
17567    /// # Example
17568    /// ```ignore,no_run
17569    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17570    /// let x = PrivateConnection::new().set_name("example");
17571    /// ```
17572    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17573        self.name = v.into();
17574        self
17575    }
17576
17577    /// Sets the value of [create_time][crate::model::PrivateConnection::create_time].
17578    ///
17579    /// # Example
17580    /// ```ignore,no_run
17581    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17582    /// use wkt::Timestamp;
17583    /// let x = PrivateConnection::new().set_create_time(Timestamp::default()/* use setters */);
17584    /// ```
17585    pub fn set_create_time<T>(mut self, v: T) -> Self
17586    where
17587        T: std::convert::Into<wkt::Timestamp>,
17588    {
17589        self.create_time = std::option::Option::Some(v.into());
17590        self
17591    }
17592
17593    /// Sets or clears the value of [create_time][crate::model::PrivateConnection::create_time].
17594    ///
17595    /// # Example
17596    /// ```ignore,no_run
17597    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17598    /// use wkt::Timestamp;
17599    /// let x = PrivateConnection::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
17600    /// let x = PrivateConnection::new().set_or_clear_create_time(None::<Timestamp>);
17601    /// ```
17602    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17603    where
17604        T: std::convert::Into<wkt::Timestamp>,
17605    {
17606        self.create_time = v.map(|x| x.into());
17607        self
17608    }
17609
17610    /// Sets the value of [update_time][crate::model::PrivateConnection::update_time].
17611    ///
17612    /// # Example
17613    /// ```ignore,no_run
17614    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17615    /// use wkt::Timestamp;
17616    /// let x = PrivateConnection::new().set_update_time(Timestamp::default()/* use setters */);
17617    /// ```
17618    pub fn set_update_time<T>(mut self, v: T) -> Self
17619    where
17620        T: std::convert::Into<wkt::Timestamp>,
17621    {
17622        self.update_time = std::option::Option::Some(v.into());
17623        self
17624    }
17625
17626    /// Sets or clears the value of [update_time][crate::model::PrivateConnection::update_time].
17627    ///
17628    /// # Example
17629    /// ```ignore,no_run
17630    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17631    /// use wkt::Timestamp;
17632    /// let x = PrivateConnection::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
17633    /// let x = PrivateConnection::new().set_or_clear_update_time(None::<Timestamp>);
17634    /// ```
17635    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
17636    where
17637        T: std::convert::Into<wkt::Timestamp>,
17638    {
17639        self.update_time = v.map(|x| x.into());
17640        self
17641    }
17642
17643    /// Sets the value of [description][crate::model::PrivateConnection::description].
17644    ///
17645    /// # Example
17646    /// ```ignore,no_run
17647    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17648    /// let x = PrivateConnection::new().set_description("example");
17649    /// ```
17650    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17651        self.description = v.into();
17652        self
17653    }
17654
17655    /// Sets the value of [state][crate::model::PrivateConnection::state].
17656    ///
17657    /// # Example
17658    /// ```ignore,no_run
17659    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17660    /// use google_cloud_vmwareengine_v1::model::private_connection::State;
17661    /// let x0 = PrivateConnection::new().set_state(State::Creating);
17662    /// let x1 = PrivateConnection::new().set_state(State::Active);
17663    /// let x2 = PrivateConnection::new().set_state(State::Updating);
17664    /// ```
17665    pub fn set_state<T: std::convert::Into<crate::model::private_connection::State>>(
17666        mut self,
17667        v: T,
17668    ) -> Self {
17669        self.state = v.into();
17670        self
17671    }
17672
17673    /// Sets the value of [vmware_engine_network][crate::model::PrivateConnection::vmware_engine_network].
17674    ///
17675    /// # Example
17676    /// ```ignore,no_run
17677    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17678    /// let x = PrivateConnection::new().set_vmware_engine_network("example");
17679    /// ```
17680    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
17681        mut self,
17682        v: T,
17683    ) -> Self {
17684        self.vmware_engine_network = v.into();
17685        self
17686    }
17687
17688    /// Sets the value of [vmware_engine_network_canonical][crate::model::PrivateConnection::vmware_engine_network_canonical].
17689    ///
17690    /// # Example
17691    /// ```ignore,no_run
17692    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17693    /// let x = PrivateConnection::new().set_vmware_engine_network_canonical("example");
17694    /// ```
17695    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
17696        mut self,
17697        v: T,
17698    ) -> Self {
17699        self.vmware_engine_network_canonical = v.into();
17700        self
17701    }
17702
17703    /// Sets the value of [r#type][crate::model::PrivateConnection::type].
17704    ///
17705    /// # Example
17706    /// ```ignore,no_run
17707    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17708    /// use google_cloud_vmwareengine_v1::model::private_connection::Type;
17709    /// let x0 = PrivateConnection::new().set_type(Type::PrivateServiceAccess);
17710    /// let x1 = PrivateConnection::new().set_type(Type::NetappCloudVolumes);
17711    /// let x2 = PrivateConnection::new().set_type(Type::DellPowerscale);
17712    /// ```
17713    pub fn set_type<T: std::convert::Into<crate::model::private_connection::Type>>(
17714        mut self,
17715        v: T,
17716    ) -> Self {
17717        self.r#type = v.into();
17718        self
17719    }
17720
17721    /// Sets the value of [peering_id][crate::model::PrivateConnection::peering_id].
17722    ///
17723    /// # Example
17724    /// ```ignore,no_run
17725    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17726    /// let x = PrivateConnection::new().set_peering_id("example");
17727    /// ```
17728    pub fn set_peering_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17729        self.peering_id = v.into();
17730        self
17731    }
17732
17733    /// Sets the value of [routing_mode][crate::model::PrivateConnection::routing_mode].
17734    ///
17735    /// # Example
17736    /// ```ignore,no_run
17737    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17738    /// use google_cloud_vmwareengine_v1::model::private_connection::RoutingMode;
17739    /// let x0 = PrivateConnection::new().set_routing_mode(RoutingMode::Global);
17740    /// let x1 = PrivateConnection::new().set_routing_mode(RoutingMode::Regional);
17741    /// ```
17742    pub fn set_routing_mode<
17743        T: std::convert::Into<crate::model::private_connection::RoutingMode>,
17744    >(
17745        mut self,
17746        v: T,
17747    ) -> Self {
17748        self.routing_mode = v.into();
17749        self
17750    }
17751
17752    /// Sets the value of [uid][crate::model::PrivateConnection::uid].
17753    ///
17754    /// # Example
17755    /// ```ignore,no_run
17756    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17757    /// let x = PrivateConnection::new().set_uid("example");
17758    /// ```
17759    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17760        self.uid = v.into();
17761        self
17762    }
17763
17764    /// Sets the value of [service_network][crate::model::PrivateConnection::service_network].
17765    ///
17766    /// # Example
17767    /// ```ignore,no_run
17768    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17769    /// let x = PrivateConnection::new().set_service_network("example");
17770    /// ```
17771    pub fn set_service_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17772        self.service_network = v.into();
17773        self
17774    }
17775
17776    /// Sets the value of [peering_state][crate::model::PrivateConnection::peering_state].
17777    ///
17778    /// # Example
17779    /// ```ignore,no_run
17780    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17781    /// use google_cloud_vmwareengine_v1::model::private_connection::PeeringState;
17782    /// let x0 = PrivateConnection::new().set_peering_state(PeeringState::PeeringActive);
17783    /// let x1 = PrivateConnection::new().set_peering_state(PeeringState::PeeringInactive);
17784    /// ```
17785    pub fn set_peering_state<
17786        T: std::convert::Into<crate::model::private_connection::PeeringState>,
17787    >(
17788        mut self,
17789        v: T,
17790    ) -> Self {
17791        self.peering_state = v.into();
17792        self
17793    }
17794}
17795
17796impl wkt::message::Message for PrivateConnection {
17797    fn typename() -> &'static str {
17798        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateConnection"
17799    }
17800}
17801
17802/// Defines additional types related to [PrivateConnection].
17803pub mod private_connection {
17804    #[allow(unused_imports)]
17805    use super::*;
17806
17807    /// Enum State defines possible states of private connection.
17808    ///
17809    /// # Working with unknown values
17810    ///
17811    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17812    /// additional enum variants at any time. Adding new variants is not considered
17813    /// a breaking change. Applications should write their code in anticipation of:
17814    ///
17815    /// - New values appearing in future releases of the client library, **and**
17816    /// - New values received dynamically, without application changes.
17817    ///
17818    /// Please consult the [Working with enums] section in the user guide for some
17819    /// guidelines.
17820    ///
17821    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17822    #[derive(Clone, Debug, PartialEq)]
17823    #[non_exhaustive]
17824    pub enum State {
17825        /// The default value. This value is used if the state is omitted.
17826        Unspecified,
17827        /// The private connection is being created.
17828        Creating,
17829        /// The private connection is ready.
17830        Active,
17831        /// The private connection is being updated.
17832        Updating,
17833        /// The private connection is being deleted.
17834        Deleting,
17835        /// The private connection is not provisioned, since no private cloud is
17836        /// present for which this private connection is needed.
17837        Unprovisioned,
17838        /// The private connection is in failed state.
17839        Failed,
17840        /// If set, the enum was initialized with an unknown value.
17841        ///
17842        /// Applications can examine the value using [State::value] or
17843        /// [State::name].
17844        UnknownValue(state::UnknownValue),
17845    }
17846
17847    #[doc(hidden)]
17848    pub mod state {
17849        #[allow(unused_imports)]
17850        use super::*;
17851        #[derive(Clone, Debug, PartialEq)]
17852        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17853    }
17854
17855    impl State {
17856        /// Gets the enum value.
17857        ///
17858        /// Returns `None` if the enum contains an unknown value deserialized from
17859        /// the string representation of enums.
17860        pub fn value(&self) -> std::option::Option<i32> {
17861            match self {
17862                Self::Unspecified => std::option::Option::Some(0),
17863                Self::Creating => std::option::Option::Some(1),
17864                Self::Active => std::option::Option::Some(2),
17865                Self::Updating => std::option::Option::Some(3),
17866                Self::Deleting => std::option::Option::Some(4),
17867                Self::Unprovisioned => std::option::Option::Some(5),
17868                Self::Failed => std::option::Option::Some(6),
17869                Self::UnknownValue(u) => u.0.value(),
17870            }
17871        }
17872
17873        /// Gets the enum value as a string.
17874        ///
17875        /// Returns `None` if the enum contains an unknown value deserialized from
17876        /// the integer representation of enums.
17877        pub fn name(&self) -> std::option::Option<&str> {
17878            match self {
17879                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
17880                Self::Creating => std::option::Option::Some("CREATING"),
17881                Self::Active => std::option::Option::Some("ACTIVE"),
17882                Self::Updating => std::option::Option::Some("UPDATING"),
17883                Self::Deleting => std::option::Option::Some("DELETING"),
17884                Self::Unprovisioned => std::option::Option::Some("UNPROVISIONED"),
17885                Self::Failed => std::option::Option::Some("FAILED"),
17886                Self::UnknownValue(u) => u.0.name(),
17887            }
17888        }
17889    }
17890
17891    impl std::default::Default for State {
17892        fn default() -> Self {
17893            use std::convert::From;
17894            Self::from(0)
17895        }
17896    }
17897
17898    impl std::fmt::Display for State {
17899        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17900            wkt::internal::display_enum(f, self.name(), self.value())
17901        }
17902    }
17903
17904    impl std::convert::From<i32> for State {
17905        fn from(value: i32) -> Self {
17906            match value {
17907                0 => Self::Unspecified,
17908                1 => Self::Creating,
17909                2 => Self::Active,
17910                3 => Self::Updating,
17911                4 => Self::Deleting,
17912                5 => Self::Unprovisioned,
17913                6 => Self::Failed,
17914                _ => Self::UnknownValue(state::UnknownValue(
17915                    wkt::internal::UnknownEnumValue::Integer(value),
17916                )),
17917            }
17918        }
17919    }
17920
17921    impl std::convert::From<&str> for State {
17922        fn from(value: &str) -> Self {
17923            use std::string::ToString;
17924            match value {
17925                "STATE_UNSPECIFIED" => Self::Unspecified,
17926                "CREATING" => Self::Creating,
17927                "ACTIVE" => Self::Active,
17928                "UPDATING" => Self::Updating,
17929                "DELETING" => Self::Deleting,
17930                "UNPROVISIONED" => Self::Unprovisioned,
17931                "FAILED" => Self::Failed,
17932                _ => Self::UnknownValue(state::UnknownValue(
17933                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17934                )),
17935            }
17936        }
17937    }
17938
17939    impl serde::ser::Serialize for State {
17940        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17941        where
17942            S: serde::Serializer,
17943        {
17944            match self {
17945                Self::Unspecified => serializer.serialize_i32(0),
17946                Self::Creating => serializer.serialize_i32(1),
17947                Self::Active => serializer.serialize_i32(2),
17948                Self::Updating => serializer.serialize_i32(3),
17949                Self::Deleting => serializer.serialize_i32(4),
17950                Self::Unprovisioned => serializer.serialize_i32(5),
17951                Self::Failed => serializer.serialize_i32(6),
17952                Self::UnknownValue(u) => u.0.serialize(serializer),
17953            }
17954        }
17955    }
17956
17957    impl<'de> serde::de::Deserialize<'de> for State {
17958        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17959        where
17960            D: serde::Deserializer<'de>,
17961        {
17962            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
17963                ".google.cloud.vmwareengine.v1.PrivateConnection.State",
17964            ))
17965        }
17966    }
17967
17968    /// Enum Type defines possible types of private connection.
17969    ///
17970    /// # Working with unknown values
17971    ///
17972    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17973    /// additional enum variants at any time. Adding new variants is not considered
17974    /// a breaking change. Applications should write their code in anticipation of:
17975    ///
17976    /// - New values appearing in future releases of the client library, **and**
17977    /// - New values received dynamically, without application changes.
17978    ///
17979    /// Please consult the [Working with enums] section in the user guide for some
17980    /// guidelines.
17981    ///
17982    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17983    #[derive(Clone, Debug, PartialEq)]
17984    #[non_exhaustive]
17985    pub enum Type {
17986        /// The default value. This value should never be used.
17987        Unspecified,
17988        /// Connection used for establishing [private services
17989        /// access](https://cloud.google.com/vpc/docs/private-services-access).
17990        PrivateServiceAccess,
17991        /// Connection used for connecting to NetApp Cloud Volumes.
17992        NetappCloudVolumes,
17993        /// Connection used for connecting to Dell PowerScale.
17994        DellPowerscale,
17995        /// Connection used for connecting to third-party services.
17996        ThirdPartyService,
17997        /// If set, the enum was initialized with an unknown value.
17998        ///
17999        /// Applications can examine the value using [Type::value] or
18000        /// [Type::name].
18001        UnknownValue(r#type::UnknownValue),
18002    }
18003
18004    #[doc(hidden)]
18005    pub mod r#type {
18006        #[allow(unused_imports)]
18007        use super::*;
18008        #[derive(Clone, Debug, PartialEq)]
18009        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18010    }
18011
18012    impl Type {
18013        /// Gets the enum value.
18014        ///
18015        /// Returns `None` if the enum contains an unknown value deserialized from
18016        /// the string representation of enums.
18017        pub fn value(&self) -> std::option::Option<i32> {
18018            match self {
18019                Self::Unspecified => std::option::Option::Some(0),
18020                Self::PrivateServiceAccess => std::option::Option::Some(1),
18021                Self::NetappCloudVolumes => std::option::Option::Some(2),
18022                Self::DellPowerscale => std::option::Option::Some(3),
18023                Self::ThirdPartyService => std::option::Option::Some(4),
18024                Self::UnknownValue(u) => u.0.value(),
18025            }
18026        }
18027
18028        /// Gets the enum value as a string.
18029        ///
18030        /// Returns `None` if the enum contains an unknown value deserialized from
18031        /// the integer representation of enums.
18032        pub fn name(&self) -> std::option::Option<&str> {
18033            match self {
18034                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
18035                Self::PrivateServiceAccess => std::option::Option::Some("PRIVATE_SERVICE_ACCESS"),
18036                Self::NetappCloudVolumes => std::option::Option::Some("NETAPP_CLOUD_VOLUMES"),
18037                Self::DellPowerscale => std::option::Option::Some("DELL_POWERSCALE"),
18038                Self::ThirdPartyService => std::option::Option::Some("THIRD_PARTY_SERVICE"),
18039                Self::UnknownValue(u) => u.0.name(),
18040            }
18041        }
18042    }
18043
18044    impl std::default::Default for Type {
18045        fn default() -> Self {
18046            use std::convert::From;
18047            Self::from(0)
18048        }
18049    }
18050
18051    impl std::fmt::Display for Type {
18052        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18053            wkt::internal::display_enum(f, self.name(), self.value())
18054        }
18055    }
18056
18057    impl std::convert::From<i32> for Type {
18058        fn from(value: i32) -> Self {
18059            match value {
18060                0 => Self::Unspecified,
18061                1 => Self::PrivateServiceAccess,
18062                2 => Self::NetappCloudVolumes,
18063                3 => Self::DellPowerscale,
18064                4 => Self::ThirdPartyService,
18065                _ => Self::UnknownValue(r#type::UnknownValue(
18066                    wkt::internal::UnknownEnumValue::Integer(value),
18067                )),
18068            }
18069        }
18070    }
18071
18072    impl std::convert::From<&str> for Type {
18073        fn from(value: &str) -> Self {
18074            use std::string::ToString;
18075            match value {
18076                "TYPE_UNSPECIFIED" => Self::Unspecified,
18077                "PRIVATE_SERVICE_ACCESS" => Self::PrivateServiceAccess,
18078                "NETAPP_CLOUD_VOLUMES" => Self::NetappCloudVolumes,
18079                "DELL_POWERSCALE" => Self::DellPowerscale,
18080                "THIRD_PARTY_SERVICE" => Self::ThirdPartyService,
18081                _ => Self::UnknownValue(r#type::UnknownValue(
18082                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18083                )),
18084            }
18085        }
18086    }
18087
18088    impl serde::ser::Serialize for Type {
18089        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18090        where
18091            S: serde::Serializer,
18092        {
18093            match self {
18094                Self::Unspecified => serializer.serialize_i32(0),
18095                Self::PrivateServiceAccess => serializer.serialize_i32(1),
18096                Self::NetappCloudVolumes => serializer.serialize_i32(2),
18097                Self::DellPowerscale => serializer.serialize_i32(3),
18098                Self::ThirdPartyService => serializer.serialize_i32(4),
18099                Self::UnknownValue(u) => u.0.serialize(serializer),
18100            }
18101        }
18102    }
18103
18104    impl<'de> serde::de::Deserialize<'de> for Type {
18105        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18106        where
18107            D: serde::Deserializer<'de>,
18108        {
18109            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
18110                ".google.cloud.vmwareengine.v1.PrivateConnection.Type",
18111            ))
18112        }
18113    }
18114
18115    /// Possible types for RoutingMode
18116    ///
18117    /// # Working with unknown values
18118    ///
18119    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18120    /// additional enum variants at any time. Adding new variants is not considered
18121    /// a breaking change. Applications should write their code in anticipation of:
18122    ///
18123    /// - New values appearing in future releases of the client library, **and**
18124    /// - New values received dynamically, without application changes.
18125    ///
18126    /// Please consult the [Working with enums] section in the user guide for some
18127    /// guidelines.
18128    ///
18129    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18130    #[derive(Clone, Debug, PartialEq)]
18131    #[non_exhaustive]
18132    pub enum RoutingMode {
18133        /// The default value. This value should never be used.
18134        Unspecified,
18135        /// Global Routing Mode
18136        Global,
18137        /// Regional Routing Mode
18138        Regional,
18139        /// If set, the enum was initialized with an unknown value.
18140        ///
18141        /// Applications can examine the value using [RoutingMode::value] or
18142        /// [RoutingMode::name].
18143        UnknownValue(routing_mode::UnknownValue),
18144    }
18145
18146    #[doc(hidden)]
18147    pub mod routing_mode {
18148        #[allow(unused_imports)]
18149        use super::*;
18150        #[derive(Clone, Debug, PartialEq)]
18151        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18152    }
18153
18154    impl RoutingMode {
18155        /// Gets the enum value.
18156        ///
18157        /// Returns `None` if the enum contains an unknown value deserialized from
18158        /// the string representation of enums.
18159        pub fn value(&self) -> std::option::Option<i32> {
18160            match self {
18161                Self::Unspecified => std::option::Option::Some(0),
18162                Self::Global => std::option::Option::Some(1),
18163                Self::Regional => std::option::Option::Some(2),
18164                Self::UnknownValue(u) => u.0.value(),
18165            }
18166        }
18167
18168        /// Gets the enum value as a string.
18169        ///
18170        /// Returns `None` if the enum contains an unknown value deserialized from
18171        /// the integer representation of enums.
18172        pub fn name(&self) -> std::option::Option<&str> {
18173            match self {
18174                Self::Unspecified => std::option::Option::Some("ROUTING_MODE_UNSPECIFIED"),
18175                Self::Global => std::option::Option::Some("GLOBAL"),
18176                Self::Regional => std::option::Option::Some("REGIONAL"),
18177                Self::UnknownValue(u) => u.0.name(),
18178            }
18179        }
18180    }
18181
18182    impl std::default::Default for RoutingMode {
18183        fn default() -> Self {
18184            use std::convert::From;
18185            Self::from(0)
18186        }
18187    }
18188
18189    impl std::fmt::Display for RoutingMode {
18190        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18191            wkt::internal::display_enum(f, self.name(), self.value())
18192        }
18193    }
18194
18195    impl std::convert::From<i32> for RoutingMode {
18196        fn from(value: i32) -> Self {
18197            match value {
18198                0 => Self::Unspecified,
18199                1 => Self::Global,
18200                2 => Self::Regional,
18201                _ => Self::UnknownValue(routing_mode::UnknownValue(
18202                    wkt::internal::UnknownEnumValue::Integer(value),
18203                )),
18204            }
18205        }
18206    }
18207
18208    impl std::convert::From<&str> for RoutingMode {
18209        fn from(value: &str) -> Self {
18210            use std::string::ToString;
18211            match value {
18212                "ROUTING_MODE_UNSPECIFIED" => Self::Unspecified,
18213                "GLOBAL" => Self::Global,
18214                "REGIONAL" => Self::Regional,
18215                _ => Self::UnknownValue(routing_mode::UnknownValue(
18216                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18217                )),
18218            }
18219        }
18220    }
18221
18222    impl serde::ser::Serialize for RoutingMode {
18223        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18224        where
18225            S: serde::Serializer,
18226        {
18227            match self {
18228                Self::Unspecified => serializer.serialize_i32(0),
18229                Self::Global => serializer.serialize_i32(1),
18230                Self::Regional => serializer.serialize_i32(2),
18231                Self::UnknownValue(u) => u.0.serialize(serializer),
18232            }
18233        }
18234    }
18235
18236    impl<'de> serde::de::Deserialize<'de> for RoutingMode {
18237        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18238        where
18239            D: serde::Deserializer<'de>,
18240        {
18241            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RoutingMode>::new(
18242                ".google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode",
18243            ))
18244        }
18245    }
18246
18247    /// Enum PeeringState defines the possible states of peering between service
18248    /// network and the vpc network peered to service network
18249    ///
18250    /// # Working with unknown values
18251    ///
18252    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18253    /// additional enum variants at any time. Adding new variants is not considered
18254    /// a breaking change. Applications should write their code in anticipation of:
18255    ///
18256    /// - New values appearing in future releases of the client library, **and**
18257    /// - New values received dynamically, without application changes.
18258    ///
18259    /// Please consult the [Working with enums] section in the user guide for some
18260    /// guidelines.
18261    ///
18262    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18263    #[derive(Clone, Debug, PartialEq)]
18264    #[non_exhaustive]
18265    pub enum PeeringState {
18266        /// The default value. This value is used if the peering state is omitted or
18267        /// unknown.
18268        Unspecified,
18269        /// The peering is in active state.
18270        PeeringActive,
18271        /// The peering is in inactive state.
18272        PeeringInactive,
18273        /// If set, the enum was initialized with an unknown value.
18274        ///
18275        /// Applications can examine the value using [PeeringState::value] or
18276        /// [PeeringState::name].
18277        UnknownValue(peering_state::UnknownValue),
18278    }
18279
18280    #[doc(hidden)]
18281    pub mod peering_state {
18282        #[allow(unused_imports)]
18283        use super::*;
18284        #[derive(Clone, Debug, PartialEq)]
18285        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18286    }
18287
18288    impl PeeringState {
18289        /// Gets the enum value.
18290        ///
18291        /// Returns `None` if the enum contains an unknown value deserialized from
18292        /// the string representation of enums.
18293        pub fn value(&self) -> std::option::Option<i32> {
18294            match self {
18295                Self::Unspecified => std::option::Option::Some(0),
18296                Self::PeeringActive => std::option::Option::Some(1),
18297                Self::PeeringInactive => std::option::Option::Some(2),
18298                Self::UnknownValue(u) => u.0.value(),
18299            }
18300        }
18301
18302        /// Gets the enum value as a string.
18303        ///
18304        /// Returns `None` if the enum contains an unknown value deserialized from
18305        /// the integer representation of enums.
18306        pub fn name(&self) -> std::option::Option<&str> {
18307            match self {
18308                Self::Unspecified => std::option::Option::Some("PEERING_STATE_UNSPECIFIED"),
18309                Self::PeeringActive => std::option::Option::Some("PEERING_ACTIVE"),
18310                Self::PeeringInactive => std::option::Option::Some("PEERING_INACTIVE"),
18311                Self::UnknownValue(u) => u.0.name(),
18312            }
18313        }
18314    }
18315
18316    impl std::default::Default for PeeringState {
18317        fn default() -> Self {
18318            use std::convert::From;
18319            Self::from(0)
18320        }
18321    }
18322
18323    impl std::fmt::Display for PeeringState {
18324        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18325            wkt::internal::display_enum(f, self.name(), self.value())
18326        }
18327    }
18328
18329    impl std::convert::From<i32> for PeeringState {
18330        fn from(value: i32) -> Self {
18331            match value {
18332                0 => Self::Unspecified,
18333                1 => Self::PeeringActive,
18334                2 => Self::PeeringInactive,
18335                _ => Self::UnknownValue(peering_state::UnknownValue(
18336                    wkt::internal::UnknownEnumValue::Integer(value),
18337                )),
18338            }
18339        }
18340    }
18341
18342    impl std::convert::From<&str> for PeeringState {
18343        fn from(value: &str) -> Self {
18344            use std::string::ToString;
18345            match value {
18346                "PEERING_STATE_UNSPECIFIED" => Self::Unspecified,
18347                "PEERING_ACTIVE" => Self::PeeringActive,
18348                "PEERING_INACTIVE" => Self::PeeringInactive,
18349                _ => Self::UnknownValue(peering_state::UnknownValue(
18350                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18351                )),
18352            }
18353        }
18354    }
18355
18356    impl serde::ser::Serialize for PeeringState {
18357        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18358        where
18359            S: serde::Serializer,
18360        {
18361            match self {
18362                Self::Unspecified => serializer.serialize_i32(0),
18363                Self::PeeringActive => serializer.serialize_i32(1),
18364                Self::PeeringInactive => serializer.serialize_i32(2),
18365                Self::UnknownValue(u) => u.0.serialize(serializer),
18366            }
18367        }
18368    }
18369
18370    impl<'de> serde::de::Deserialize<'de> for PeeringState {
18371        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18372        where
18373            D: serde::Deserializer<'de>,
18374        {
18375            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PeeringState>::new(
18376                ".google.cloud.vmwareengine.v1.PrivateConnection.PeeringState",
18377            ))
18378        }
18379    }
18380}
18381
18382/// VmwareEngine specific metadata for the given
18383/// [google.cloud.location.Location][google.cloud.location.Location]. It is
18384/// returned as a content of the `google.cloud.location.Location.metadata` field.
18385///
18386/// [google.cloud.location.Location]: google_cloud_location::model::Location
18387#[derive(Clone, Default, PartialEq)]
18388#[non_exhaustive]
18389pub struct LocationMetadata {
18390    /// Output only. Capabilities of this location.
18391    pub capabilities: std::vec::Vec<crate::model::location_metadata::Capability>,
18392
18393    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18394}
18395
18396impl LocationMetadata {
18397    /// Creates a new default instance.
18398    pub fn new() -> Self {
18399        std::default::Default::default()
18400    }
18401
18402    /// Sets the value of [capabilities][crate::model::LocationMetadata::capabilities].
18403    ///
18404    /// # Example
18405    /// ```ignore,no_run
18406    /// # use google_cloud_vmwareengine_v1::model::LocationMetadata;
18407    /// use google_cloud_vmwareengine_v1::model::location_metadata::Capability;
18408    /// let x = LocationMetadata::new().set_capabilities([
18409    ///     Capability::StretchedClusters,
18410    /// ]);
18411    /// ```
18412    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
18413    where
18414        T: std::iter::IntoIterator<Item = V>,
18415        V: std::convert::Into<crate::model::location_metadata::Capability>,
18416    {
18417        use std::iter::Iterator;
18418        self.capabilities = v.into_iter().map(|i| i.into()).collect();
18419        self
18420    }
18421}
18422
18423impl wkt::message::Message for LocationMetadata {
18424    fn typename() -> &'static str {
18425        "type.googleapis.com/google.cloud.vmwareengine.v1.LocationMetadata"
18426    }
18427}
18428
18429/// Defines additional types related to [LocationMetadata].
18430pub mod location_metadata {
18431    #[allow(unused_imports)]
18432    use super::*;
18433
18434    /// Capability of a location.
18435    ///
18436    /// # Working with unknown values
18437    ///
18438    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18439    /// additional enum variants at any time. Adding new variants is not considered
18440    /// a breaking change. Applications should write their code in anticipation of:
18441    ///
18442    /// - New values appearing in future releases of the client library, **and**
18443    /// - New values received dynamically, without application changes.
18444    ///
18445    /// Please consult the [Working with enums] section in the user guide for some
18446    /// guidelines.
18447    ///
18448    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18449    #[derive(Clone, Debug, PartialEq)]
18450    #[non_exhaustive]
18451    pub enum Capability {
18452        /// The default value. This value is used if the capability is omitted or
18453        /// unknown.
18454        Unspecified,
18455        /// Stretch clusters are supported in this location.
18456        StretchedClusters,
18457        /// If set, the enum was initialized with an unknown value.
18458        ///
18459        /// Applications can examine the value using [Capability::value] or
18460        /// [Capability::name].
18461        UnknownValue(capability::UnknownValue),
18462    }
18463
18464    #[doc(hidden)]
18465    pub mod capability {
18466        #[allow(unused_imports)]
18467        use super::*;
18468        #[derive(Clone, Debug, PartialEq)]
18469        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18470    }
18471
18472    impl Capability {
18473        /// Gets the enum value.
18474        ///
18475        /// Returns `None` if the enum contains an unknown value deserialized from
18476        /// the string representation of enums.
18477        pub fn value(&self) -> std::option::Option<i32> {
18478            match self {
18479                Self::Unspecified => std::option::Option::Some(0),
18480                Self::StretchedClusters => std::option::Option::Some(1),
18481                Self::UnknownValue(u) => u.0.value(),
18482            }
18483        }
18484
18485        /// Gets the enum value as a string.
18486        ///
18487        /// Returns `None` if the enum contains an unknown value deserialized from
18488        /// the integer representation of enums.
18489        pub fn name(&self) -> std::option::Option<&str> {
18490            match self {
18491                Self::Unspecified => std::option::Option::Some("CAPABILITY_UNSPECIFIED"),
18492                Self::StretchedClusters => std::option::Option::Some("STRETCHED_CLUSTERS"),
18493                Self::UnknownValue(u) => u.0.name(),
18494            }
18495        }
18496    }
18497
18498    impl std::default::Default for Capability {
18499        fn default() -> Self {
18500            use std::convert::From;
18501            Self::from(0)
18502        }
18503    }
18504
18505    impl std::fmt::Display for Capability {
18506        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18507            wkt::internal::display_enum(f, self.name(), self.value())
18508        }
18509    }
18510
18511    impl std::convert::From<i32> for Capability {
18512        fn from(value: i32) -> Self {
18513            match value {
18514                0 => Self::Unspecified,
18515                1 => Self::StretchedClusters,
18516                _ => Self::UnknownValue(capability::UnknownValue(
18517                    wkt::internal::UnknownEnumValue::Integer(value),
18518                )),
18519            }
18520        }
18521    }
18522
18523    impl std::convert::From<&str> for Capability {
18524        fn from(value: &str) -> Self {
18525            use std::string::ToString;
18526            match value {
18527                "CAPABILITY_UNSPECIFIED" => Self::Unspecified,
18528                "STRETCHED_CLUSTERS" => Self::StretchedClusters,
18529                _ => Self::UnknownValue(capability::UnknownValue(
18530                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18531                )),
18532            }
18533        }
18534    }
18535
18536    impl serde::ser::Serialize for Capability {
18537        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18538        where
18539            S: serde::Serializer,
18540        {
18541            match self {
18542                Self::Unspecified => serializer.serialize_i32(0),
18543                Self::StretchedClusters => serializer.serialize_i32(1),
18544                Self::UnknownValue(u) => u.0.serialize(serializer),
18545            }
18546        }
18547    }
18548
18549    impl<'de> serde::de::Deserialize<'de> for Capability {
18550        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18551        where
18552            D: serde::Deserializer<'de>,
18553        {
18554            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Capability>::new(
18555                ".google.cloud.vmwareengine.v1.LocationMetadata.Capability",
18556            ))
18557        }
18558    }
18559}
18560
18561/// DnsBindPermission resource that contains the accounts having the consumer DNS
18562/// bind permission on the corresponding intranet VPC of the consumer project.
18563#[derive(Clone, Default, PartialEq)]
18564#[non_exhaustive]
18565pub struct DnsBindPermission {
18566    /// Required. Output only. The name of the resource which stores the
18567    /// users/service accounts having the permission to bind to the corresponding
18568    /// intranet VPC of the consumer project. DnsBindPermission is a global
18569    /// resource and location can only be global. Resource names are schemeless
18570    /// URIs that follow the conventions in
18571    /// <https://cloud.google.com/apis/design/resource_names>. For example:
18572    /// `projects/my-project/locations/global/dnsBindPermission`
18573    pub name: std::string::String,
18574
18575    /// Output only. Users/Service accounts which have access for binding on the
18576    /// intranet VPC project corresponding to the consumer project.
18577    pub principals: std::vec::Vec<crate::model::Principal>,
18578
18579    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18580}
18581
18582impl DnsBindPermission {
18583    /// Creates a new default instance.
18584    pub fn new() -> Self {
18585        std::default::Default::default()
18586    }
18587
18588    /// Sets the value of [name][crate::model::DnsBindPermission::name].
18589    ///
18590    /// # Example
18591    /// ```ignore,no_run
18592    /// # use google_cloud_vmwareengine_v1::model::DnsBindPermission;
18593    /// let x = DnsBindPermission::new().set_name("example");
18594    /// ```
18595    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18596        self.name = v.into();
18597        self
18598    }
18599
18600    /// Sets the value of [principals][crate::model::DnsBindPermission::principals].
18601    ///
18602    /// # Example
18603    /// ```ignore,no_run
18604    /// # use google_cloud_vmwareengine_v1::model::DnsBindPermission;
18605    /// use google_cloud_vmwareengine_v1::model::Principal;
18606    /// let x = DnsBindPermission::new()
18607    ///     .set_principals([
18608    ///         Principal::default()/* use setters */,
18609    ///         Principal::default()/* use (different) setters */,
18610    ///     ]);
18611    /// ```
18612    pub fn set_principals<T, V>(mut self, v: T) -> Self
18613    where
18614        T: std::iter::IntoIterator<Item = V>,
18615        V: std::convert::Into<crate::model::Principal>,
18616    {
18617        use std::iter::Iterator;
18618        self.principals = v.into_iter().map(|i| i.into()).collect();
18619        self
18620    }
18621}
18622
18623impl wkt::message::Message for DnsBindPermission {
18624    fn typename() -> &'static str {
18625        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsBindPermission"
18626    }
18627}
18628
18629/// Users/Service accounts which have access for DNS binding on the intranet
18630/// VPC corresponding to the consumer project.
18631#[derive(Clone, Default, PartialEq)]
18632#[non_exhaustive]
18633pub struct Principal {
18634    /// The consumer provided user/service account which needs to be
18635    /// granted permission to DNS bind with the intranet VPC corresponding to the
18636    /// consumer project.
18637    pub principal: std::option::Option<crate::model::principal::Principal>,
18638
18639    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18640}
18641
18642impl Principal {
18643    /// Creates a new default instance.
18644    pub fn new() -> Self {
18645        std::default::Default::default()
18646    }
18647
18648    /// Sets the value of [principal][crate::model::Principal::principal].
18649    ///
18650    /// Note that all the setters affecting `principal` are mutually
18651    /// exclusive.
18652    ///
18653    /// # Example
18654    /// ```ignore,no_run
18655    /// # use google_cloud_vmwareengine_v1::model::Principal;
18656    /// use google_cloud_vmwareengine_v1::model::principal::Principal as PrincipalOneOf;
18657    /// let x = Principal::new().set_principal(Some(PrincipalOneOf::User("example".to_string())));
18658    /// ```
18659    pub fn set_principal<
18660        T: std::convert::Into<std::option::Option<crate::model::principal::Principal>>,
18661    >(
18662        mut self,
18663        v: T,
18664    ) -> Self {
18665        self.principal = v.into();
18666        self
18667    }
18668
18669    /// The value of [principal][crate::model::Principal::principal]
18670    /// if it holds a `User`, `None` if the field is not set or
18671    /// holds a different branch.
18672    pub fn user(&self) -> std::option::Option<&std::string::String> {
18673        #[allow(unreachable_patterns)]
18674        self.principal.as_ref().and_then(|v| match v {
18675            crate::model::principal::Principal::User(v) => std::option::Option::Some(v),
18676            _ => std::option::Option::None,
18677        })
18678    }
18679
18680    /// Sets the value of [principal][crate::model::Principal::principal]
18681    /// to hold a `User`.
18682    ///
18683    /// Note that all the setters affecting `principal` are
18684    /// mutually exclusive.
18685    ///
18686    /// # Example
18687    /// ```ignore,no_run
18688    /// # use google_cloud_vmwareengine_v1::model::Principal;
18689    /// let x = Principal::new().set_user("example");
18690    /// assert!(x.user().is_some());
18691    /// assert!(x.service_account().is_none());
18692    /// ```
18693    pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18694        self.principal =
18695            std::option::Option::Some(crate::model::principal::Principal::User(v.into()));
18696        self
18697    }
18698
18699    /// The value of [principal][crate::model::Principal::principal]
18700    /// if it holds a `ServiceAccount`, `None` if the field is not set or
18701    /// holds a different branch.
18702    pub fn service_account(&self) -> std::option::Option<&std::string::String> {
18703        #[allow(unreachable_patterns)]
18704        self.principal.as_ref().and_then(|v| match v {
18705            crate::model::principal::Principal::ServiceAccount(v) => std::option::Option::Some(v),
18706            _ => std::option::Option::None,
18707        })
18708    }
18709
18710    /// Sets the value of [principal][crate::model::Principal::principal]
18711    /// to hold a `ServiceAccount`.
18712    ///
18713    /// Note that all the setters affecting `principal` are
18714    /// mutually exclusive.
18715    ///
18716    /// # Example
18717    /// ```ignore,no_run
18718    /// # use google_cloud_vmwareengine_v1::model::Principal;
18719    /// let x = Principal::new().set_service_account("example");
18720    /// assert!(x.service_account().is_some());
18721    /// assert!(x.user().is_none());
18722    /// ```
18723    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18724        self.principal =
18725            std::option::Option::Some(crate::model::principal::Principal::ServiceAccount(v.into()));
18726        self
18727    }
18728}
18729
18730impl wkt::message::Message for Principal {
18731    fn typename() -> &'static str {
18732        "type.googleapis.com/google.cloud.vmwareengine.v1.Principal"
18733    }
18734}
18735
18736/// Defines additional types related to [Principal].
18737pub mod principal {
18738    #[allow(unused_imports)]
18739    use super::*;
18740
18741    /// The consumer provided user/service account which needs to be
18742    /// granted permission to DNS bind with the intranet VPC corresponding to the
18743    /// consumer project.
18744    #[derive(Clone, Debug, PartialEq)]
18745    #[non_exhaustive]
18746    pub enum Principal {
18747        /// The user who needs to be granted permission.
18748        User(std::string::String),
18749        /// The service account which needs to be granted the permission.
18750        ServiceAccount(std::string::String),
18751    }
18752}