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 project_id = "project_id";
307    /// # let location_id = "location_id";
308    /// # let private_cloud_id = "private_cloud_id";
309    /// let x = GetPrivateCloudRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
310    /// ```
311    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
312        self.name = v.into();
313        self
314    }
315}
316
317impl wkt::message::Message for GetPrivateCloudRequest {
318    fn typename() -> &'static str {
319        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateCloudRequest"
320    }
321}
322
323/// Request message for
324/// [VmwareEngine.CreatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]
325///
326/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]: crate::client::VmwareEngine::create_private_cloud
327#[derive(Clone, Default, PartialEq)]
328#[non_exhaustive]
329pub struct CreatePrivateCloudRequest {
330    /// Required. The resource name of the location to create the new
331    /// private cloud in. Resource names are schemeless URIs that follow the
332    /// conventions in <https://cloud.google.com/apis/design/resource_names>.
333    /// For example:
334    /// `projects/my-project/locations/us-central1-a`
335    pub parent: std::string::String,
336
337    /// Required. The user-provided identifier of the private cloud to be created.
338    /// This identifier must be unique among each `PrivateCloud` within the parent
339    /// and becomes the final token in the name URI.
340    /// The identifier must meet the following requirements:
341    ///
342    /// * Only contains 1-63 alphanumeric characters and hyphens
343    /// * Begins with an alphabetical character
344    /// * Ends with a non-hyphen character
345    /// * Not formatted as a UUID
346    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
347    ///   (section 3.5)
348    pub private_cloud_id: std::string::String,
349
350    /// Required. The initial description of the new private cloud.
351    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
352
353    /// Optional. The request ID must be a valid UUID with the exception that zero
354    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
355    pub request_id: std::string::String,
356
357    /// Optional. True if you want the request to be validated and not executed;
358    /// false otherwise.
359    pub validate_only: bool,
360
361    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
362}
363
364impl CreatePrivateCloudRequest {
365    /// Creates a new default instance.
366    pub fn new() -> Self {
367        std::default::Default::default()
368    }
369
370    /// Sets the value of [parent][crate::model::CreatePrivateCloudRequest::parent].
371    ///
372    /// # Example
373    /// ```ignore,no_run
374    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
375    /// let x = CreatePrivateCloudRequest::new().set_parent("example");
376    /// ```
377    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
378        self.parent = v.into();
379        self
380    }
381
382    /// Sets the value of [private_cloud_id][crate::model::CreatePrivateCloudRequest::private_cloud_id].
383    ///
384    /// # Example
385    /// ```ignore,no_run
386    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
387    /// let x = CreatePrivateCloudRequest::new().set_private_cloud_id("example");
388    /// ```
389    pub fn set_private_cloud_id<T: std::convert::Into<std::string::String>>(
390        mut self,
391        v: T,
392    ) -> Self {
393        self.private_cloud_id = v.into();
394        self
395    }
396
397    /// Sets the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
398    ///
399    /// # Example
400    /// ```ignore,no_run
401    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
402    /// use google_cloud_vmwareengine_v1::model::PrivateCloud;
403    /// let x = CreatePrivateCloudRequest::new().set_private_cloud(PrivateCloud::default()/* use setters */);
404    /// ```
405    pub fn set_private_cloud<T>(mut self, v: T) -> Self
406    where
407        T: std::convert::Into<crate::model::PrivateCloud>,
408    {
409        self.private_cloud = std::option::Option::Some(v.into());
410        self
411    }
412
413    /// Sets or clears the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
414    ///
415    /// # Example
416    /// ```ignore,no_run
417    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
418    /// use google_cloud_vmwareengine_v1::model::PrivateCloud;
419    /// let x = CreatePrivateCloudRequest::new().set_or_clear_private_cloud(Some(PrivateCloud::default()/* use setters */));
420    /// let x = CreatePrivateCloudRequest::new().set_or_clear_private_cloud(None::<PrivateCloud>);
421    /// ```
422    pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
423    where
424        T: std::convert::Into<crate::model::PrivateCloud>,
425    {
426        self.private_cloud = v.map(|x| x.into());
427        self
428    }
429
430    /// Sets the value of [request_id][crate::model::CreatePrivateCloudRequest::request_id].
431    ///
432    /// # Example
433    /// ```ignore,no_run
434    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
435    /// let x = CreatePrivateCloudRequest::new().set_request_id("example");
436    /// ```
437    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
438        self.request_id = v.into();
439        self
440    }
441
442    /// Sets the value of [validate_only][crate::model::CreatePrivateCloudRequest::validate_only].
443    ///
444    /// # Example
445    /// ```ignore,no_run
446    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateCloudRequest;
447    /// let x = CreatePrivateCloudRequest::new().set_validate_only(true);
448    /// ```
449    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
450        self.validate_only = v.into();
451        self
452    }
453}
454
455impl wkt::message::Message for CreatePrivateCloudRequest {
456    fn typename() -> &'static str {
457        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateCloudRequest"
458    }
459}
460
461/// Request message for
462/// [VmwareEngine.UpdatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]
463///
464/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]: crate::client::VmwareEngine::update_private_cloud
465#[derive(Clone, Default, PartialEq)]
466#[non_exhaustive]
467pub struct UpdatePrivateCloudRequest {
468    /// Required. Private cloud description.
469    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
470
471    /// Required. Field mask is used to specify the fields to be overwritten in the
472    /// `PrivateCloud` resource by the update. The fields specified in `updateMask`
473    /// are relative to the resource, not the full request. A field will be
474    /// overwritten if it is in the mask. If the user does not provide a mask then
475    /// all fields will be overwritten.
476    pub update_mask: std::option::Option<wkt::FieldMask>,
477
478    /// Optional. The request ID must be a valid UUID with the exception that zero
479    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
480    pub request_id: std::string::String,
481
482    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
483}
484
485impl UpdatePrivateCloudRequest {
486    /// Creates a new default instance.
487    pub fn new() -> Self {
488        std::default::Default::default()
489    }
490
491    /// Sets the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
492    ///
493    /// # Example
494    /// ```ignore,no_run
495    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateCloudRequest;
496    /// use google_cloud_vmwareengine_v1::model::PrivateCloud;
497    /// let x = UpdatePrivateCloudRequest::new().set_private_cloud(PrivateCloud::default()/* use setters */);
498    /// ```
499    pub fn set_private_cloud<T>(mut self, v: T) -> Self
500    where
501        T: std::convert::Into<crate::model::PrivateCloud>,
502    {
503        self.private_cloud = std::option::Option::Some(v.into());
504        self
505    }
506
507    /// Sets or clears the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
508    ///
509    /// # Example
510    /// ```ignore,no_run
511    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateCloudRequest;
512    /// use google_cloud_vmwareengine_v1::model::PrivateCloud;
513    /// let x = UpdatePrivateCloudRequest::new().set_or_clear_private_cloud(Some(PrivateCloud::default()/* use setters */));
514    /// let x = UpdatePrivateCloudRequest::new().set_or_clear_private_cloud(None::<PrivateCloud>);
515    /// ```
516    pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
517    where
518        T: std::convert::Into<crate::model::PrivateCloud>,
519    {
520        self.private_cloud = v.map(|x| x.into());
521        self
522    }
523
524    /// Sets the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
525    ///
526    /// # Example
527    /// ```ignore,no_run
528    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateCloudRequest;
529    /// use wkt::FieldMask;
530    /// let x = UpdatePrivateCloudRequest::new().set_update_mask(FieldMask::default()/* use setters */);
531    /// ```
532    pub fn set_update_mask<T>(mut self, v: T) -> Self
533    where
534        T: std::convert::Into<wkt::FieldMask>,
535    {
536        self.update_mask = std::option::Option::Some(v.into());
537        self
538    }
539
540    /// Sets or clears the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
541    ///
542    /// # Example
543    /// ```ignore,no_run
544    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateCloudRequest;
545    /// use wkt::FieldMask;
546    /// let x = UpdatePrivateCloudRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
547    /// let x = UpdatePrivateCloudRequest::new().set_or_clear_update_mask(None::<FieldMask>);
548    /// ```
549    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
550    where
551        T: std::convert::Into<wkt::FieldMask>,
552    {
553        self.update_mask = v.map(|x| x.into());
554        self
555    }
556
557    /// Sets the value of [request_id][crate::model::UpdatePrivateCloudRequest::request_id].
558    ///
559    /// # Example
560    /// ```ignore,no_run
561    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateCloudRequest;
562    /// let x = UpdatePrivateCloudRequest::new().set_request_id("example");
563    /// ```
564    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
565        self.request_id = v.into();
566        self
567    }
568}
569
570impl wkt::message::Message for UpdatePrivateCloudRequest {
571    fn typename() -> &'static str {
572        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest"
573    }
574}
575
576/// Request message for
577/// [VmwareEngine.DeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]
578///
579/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]: crate::client::VmwareEngine::delete_private_cloud
580#[derive(Clone, Default, PartialEq)]
581#[non_exhaustive]
582pub struct DeletePrivateCloudRequest {
583    /// Required. The resource name of the private cloud to delete.
584    /// Resource names are schemeless URIs that follow the conventions in
585    /// <https://cloud.google.com/apis/design/resource_names>.
586    /// For example:
587    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
588    pub name: std::string::String,
589
590    /// Optional. The request ID must be a valid UUID with the exception that zero
591    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
592    pub request_id: std::string::String,
593
594    /// Optional. If set to true, cascade delete is enabled and all children of
595    /// this private cloud resource are also deleted. When this flag is set to
596    /// false, the private cloud will not be deleted if there are any children
597    /// other than the management cluster. The management cluster is always
598    /// deleted.
599    pub force: bool,
600
601    /// Optional. Time delay of the deletion specified in hours. The default value
602    /// is `3`. Specifying a non-zero value for this field changes the value of
603    /// `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned
604    /// deletion time. Deletion can be cancelled before `expire_time` elapses using
605    /// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud].
606    /// Specifying a value of `0` for this field instead begins the deletion
607    /// process and ceases billing immediately. During the final deletion process,
608    /// the value of `PrivateCloud.state` becomes `PURGING`.
609    ///
610    /// [google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]: crate::client::VmwareEngine::undelete_private_cloud
611    pub delay_hours: std::option::Option<i32>,
612
613    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
614}
615
616impl DeletePrivateCloudRequest {
617    /// Creates a new default instance.
618    pub fn new() -> Self {
619        std::default::Default::default()
620    }
621
622    /// Sets the value of [name][crate::model::DeletePrivateCloudRequest::name].
623    ///
624    /// # Example
625    /// ```ignore,no_run
626    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateCloudRequest;
627    /// # let project_id = "project_id";
628    /// # let location_id = "location_id";
629    /// # let private_cloud_id = "private_cloud_id";
630    /// let x = DeletePrivateCloudRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
631    /// ```
632    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
633        self.name = v.into();
634        self
635    }
636
637    /// Sets the value of [request_id][crate::model::DeletePrivateCloudRequest::request_id].
638    ///
639    /// # Example
640    /// ```ignore,no_run
641    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateCloudRequest;
642    /// let x = DeletePrivateCloudRequest::new().set_request_id("example");
643    /// ```
644    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
645        self.request_id = v.into();
646        self
647    }
648
649    /// Sets the value of [force][crate::model::DeletePrivateCloudRequest::force].
650    ///
651    /// # Example
652    /// ```ignore,no_run
653    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateCloudRequest;
654    /// let x = DeletePrivateCloudRequest::new().set_force(true);
655    /// ```
656    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
657        self.force = v.into();
658        self
659    }
660
661    /// Sets the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
662    ///
663    /// # Example
664    /// ```ignore,no_run
665    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateCloudRequest;
666    /// let x = DeletePrivateCloudRequest::new().set_delay_hours(42);
667    /// ```
668    pub fn set_delay_hours<T>(mut self, v: T) -> Self
669    where
670        T: std::convert::Into<i32>,
671    {
672        self.delay_hours = std::option::Option::Some(v.into());
673        self
674    }
675
676    /// Sets or clears the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
677    ///
678    /// # Example
679    /// ```ignore,no_run
680    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateCloudRequest;
681    /// let x = DeletePrivateCloudRequest::new().set_or_clear_delay_hours(Some(42));
682    /// let x = DeletePrivateCloudRequest::new().set_or_clear_delay_hours(None::<i32>);
683    /// ```
684    pub fn set_or_clear_delay_hours<T>(mut self, v: std::option::Option<T>) -> Self
685    where
686        T: std::convert::Into<i32>,
687    {
688        self.delay_hours = v.map(|x| x.into());
689        self
690    }
691}
692
693impl wkt::message::Message for DeletePrivateCloudRequest {
694    fn typename() -> &'static str {
695        "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateCloudRequest"
696    }
697}
698
699/// Request message for
700/// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]
701///
702/// [google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]: crate::client::VmwareEngine::undelete_private_cloud
703#[derive(Clone, Default, PartialEq)]
704#[non_exhaustive]
705pub struct UndeletePrivateCloudRequest {
706    /// Required. The resource name of the private cloud scheduled for deletion.
707    /// Resource names are schemeless URIs that follow the conventions in
708    /// <https://cloud.google.com/apis/design/resource_names>.
709    /// For example:
710    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
711    pub name: std::string::String,
712
713    /// Optional. The request ID must be a valid UUID with the exception that zero
714    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
715    pub request_id: std::string::String,
716
717    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
718}
719
720impl UndeletePrivateCloudRequest {
721    /// Creates a new default instance.
722    pub fn new() -> Self {
723        std::default::Default::default()
724    }
725
726    /// Sets the value of [name][crate::model::UndeletePrivateCloudRequest::name].
727    ///
728    /// # Example
729    /// ```ignore,no_run
730    /// # use google_cloud_vmwareengine_v1::model::UndeletePrivateCloudRequest;
731    /// # let project_id = "project_id";
732    /// # let location_id = "location_id";
733    /// # let private_cloud_id = "private_cloud_id";
734    /// let x = UndeletePrivateCloudRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
735    /// ```
736    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
737        self.name = v.into();
738        self
739    }
740
741    /// Sets the value of [request_id][crate::model::UndeletePrivateCloudRequest::request_id].
742    ///
743    /// # Example
744    /// ```ignore,no_run
745    /// # use google_cloud_vmwareengine_v1::model::UndeletePrivateCloudRequest;
746    /// let x = UndeletePrivateCloudRequest::new().set_request_id("example");
747    /// ```
748    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
749        self.request_id = v.into();
750        self
751    }
752}
753
754impl wkt::message::Message for UndeletePrivateCloudRequest {
755    fn typename() -> &'static str {
756        "type.googleapis.com/google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest"
757    }
758}
759
760/// Request message for
761/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
762///
763/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
764#[derive(Clone, Default, PartialEq)]
765#[non_exhaustive]
766pub struct ListClustersRequest {
767    /// Required. The resource name of the private cloud to query for clusters.
768    /// Resource names are schemeless URIs that follow the conventions in
769    /// <https://cloud.google.com/apis/design/resource_names>.
770    /// For example:
771    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
772    pub parent: std::string::String,
773
774    /// The maximum number of clusters to return in one page.
775    /// The service may return fewer than this value.
776    /// The maximum value is coerced to 1000.
777    /// The default value of this field is 500.
778    pub page_size: i32,
779
780    /// A page token, received from a previous `ListClusters` call.
781    /// Provide this to retrieve the subsequent page.
782    ///
783    /// When paginating, all other parameters provided to `ListClusters`
784    /// must match the call that provided the page token.
785    pub page_token: std::string::String,
786
787    /// To filter on multiple expressions, provide each separate expression within
788    /// parentheses. For example:
789    ///
790    /// ```norust
791    /// (name = "example-cluster")
792    /// (nodeCount = "3")
793    /// ```
794    ///
795    /// By default, each expression is an `AND` expression. However, you can
796    /// include `AND` and `OR` expressions explicitly. For example:
797    ///
798    /// ```norust
799    /// (name = "example-cluster-1") AND
800    /// (createTime > "2021-04-12T08:15:10.40Z") OR
801    /// (name = "example-cluster-2")
802    /// ```
803    pub filter: std::string::String,
804
805    /// Sorts list results by a certain order. By default, returned results are
806    /// ordered by `name` in ascending order. You can also sort results in
807    /// descending order based on the `name` value using `orderBy="name desc"`.
808    /// Currently, only ordering by `name` is supported.
809    pub order_by: std::string::String,
810
811    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
812}
813
814impl ListClustersRequest {
815    /// Creates a new default instance.
816    pub fn new() -> Self {
817        std::default::Default::default()
818    }
819
820    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
821    ///
822    /// # Example
823    /// ```ignore,no_run
824    /// # use google_cloud_vmwareengine_v1::model::ListClustersRequest;
825    /// # let project_id = "project_id";
826    /// # let location_id = "location_id";
827    /// # let private_cloud_id = "private_cloud_id";
828    /// let x = ListClustersRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
829    /// ```
830    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
831        self.parent = v.into();
832        self
833    }
834
835    /// Sets the value of [page_size][crate::model::ListClustersRequest::page_size].
836    ///
837    /// # Example
838    /// ```ignore,no_run
839    /// # use google_cloud_vmwareengine_v1::model::ListClustersRequest;
840    /// let x = ListClustersRequest::new().set_page_size(42);
841    /// ```
842    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
843        self.page_size = v.into();
844        self
845    }
846
847    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
848    ///
849    /// # Example
850    /// ```ignore,no_run
851    /// # use google_cloud_vmwareengine_v1::model::ListClustersRequest;
852    /// let x = ListClustersRequest::new().set_page_token("example");
853    /// ```
854    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
855        self.page_token = v.into();
856        self
857    }
858
859    /// Sets the value of [filter][crate::model::ListClustersRequest::filter].
860    ///
861    /// # Example
862    /// ```ignore,no_run
863    /// # use google_cloud_vmwareengine_v1::model::ListClustersRequest;
864    /// let x = ListClustersRequest::new().set_filter("example");
865    /// ```
866    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
867        self.filter = v.into();
868        self
869    }
870
871    /// Sets the value of [order_by][crate::model::ListClustersRequest::order_by].
872    ///
873    /// # Example
874    /// ```ignore,no_run
875    /// # use google_cloud_vmwareengine_v1::model::ListClustersRequest;
876    /// let x = ListClustersRequest::new().set_order_by("example");
877    /// ```
878    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
879        self.order_by = v.into();
880        self
881    }
882}
883
884impl wkt::message::Message for ListClustersRequest {
885    fn typename() -> &'static str {
886        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersRequest"
887    }
888}
889
890/// Response message for
891/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
892///
893/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
894#[derive(Clone, Default, PartialEq)]
895#[non_exhaustive]
896pub struct ListClustersResponse {
897    /// A list of private cloud clusters.
898    pub clusters: std::vec::Vec<crate::model::Cluster>,
899
900    /// A token, which can be sent as `page_token` to retrieve the next page.
901    /// If this field is omitted, there are no subsequent pages.
902    pub next_page_token: std::string::String,
903
904    /// Locations that could not be reached when making an aggregated query using
905    /// wildcards.
906    pub unreachable: std::vec::Vec<std::string::String>,
907
908    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
909}
910
911impl ListClustersResponse {
912    /// Creates a new default instance.
913    pub fn new() -> Self {
914        std::default::Default::default()
915    }
916
917    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
918    ///
919    /// # Example
920    /// ```ignore,no_run
921    /// # use google_cloud_vmwareengine_v1::model::ListClustersResponse;
922    /// use google_cloud_vmwareengine_v1::model::Cluster;
923    /// let x = ListClustersResponse::new()
924    ///     .set_clusters([
925    ///         Cluster::default()/* use setters */,
926    ///         Cluster::default()/* use (different) setters */,
927    ///     ]);
928    /// ```
929    pub fn set_clusters<T, V>(mut self, v: T) -> Self
930    where
931        T: std::iter::IntoIterator<Item = V>,
932        V: std::convert::Into<crate::model::Cluster>,
933    {
934        use std::iter::Iterator;
935        self.clusters = v.into_iter().map(|i| i.into()).collect();
936        self
937    }
938
939    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
940    ///
941    /// # Example
942    /// ```ignore,no_run
943    /// # use google_cloud_vmwareengine_v1::model::ListClustersResponse;
944    /// let x = ListClustersResponse::new().set_next_page_token("example");
945    /// ```
946    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
947        self.next_page_token = v.into();
948        self
949    }
950
951    /// Sets the value of [unreachable][crate::model::ListClustersResponse::unreachable].
952    ///
953    /// # Example
954    /// ```ignore,no_run
955    /// # use google_cloud_vmwareengine_v1::model::ListClustersResponse;
956    /// let x = ListClustersResponse::new().set_unreachable(["a", "b", "c"]);
957    /// ```
958    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
959    where
960        T: std::iter::IntoIterator<Item = V>,
961        V: std::convert::Into<std::string::String>,
962    {
963        use std::iter::Iterator;
964        self.unreachable = v.into_iter().map(|i| i.into()).collect();
965        self
966    }
967}
968
969impl wkt::message::Message for ListClustersResponse {
970    fn typename() -> &'static str {
971        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersResponse"
972    }
973}
974
975#[doc(hidden)]
976impl google_cloud_gax::paginator::internal::PageableResponse for ListClustersResponse {
977    type PageItem = crate::model::Cluster;
978
979    fn items(self) -> std::vec::Vec<Self::PageItem> {
980        self.clusters
981    }
982
983    fn next_page_token(&self) -> std::string::String {
984        use std::clone::Clone;
985        self.next_page_token.clone()
986    }
987}
988
989/// Request message for
990/// [VmwareEngine.GetCluster][google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]
991///
992/// [google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]: crate::client::VmwareEngine::get_cluster
993#[derive(Clone, Default, PartialEq)]
994#[non_exhaustive]
995pub struct GetClusterRequest {
996    /// Required. The cluster resource name to retrieve.
997    /// Resource names are schemeless URIs that follow the conventions in
998    /// <https://cloud.google.com/apis/design/resource_names>.
999    /// For example:
1000    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
1001    pub name: std::string::String,
1002
1003    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1004}
1005
1006impl GetClusterRequest {
1007    /// Creates a new default instance.
1008    pub fn new() -> Self {
1009        std::default::Default::default()
1010    }
1011
1012    /// Sets the value of [name][crate::model::GetClusterRequest::name].
1013    ///
1014    /// # Example
1015    /// ```ignore,no_run
1016    /// # use google_cloud_vmwareengine_v1::model::GetClusterRequest;
1017    /// # let project_id = "project_id";
1018    /// # let location_id = "location_id";
1019    /// # let private_cloud_id = "private_cloud_id";
1020    /// # let cluster_id = "cluster_id";
1021    /// let x = GetClusterRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/clusters/{cluster_id}"));
1022    /// ```
1023    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1024        self.name = v.into();
1025        self
1026    }
1027}
1028
1029impl wkt::message::Message for GetClusterRequest {
1030    fn typename() -> &'static str {
1031        "type.googleapis.com/google.cloud.vmwareengine.v1.GetClusterRequest"
1032    }
1033}
1034
1035/// Request message for
1036/// [VmwareEngine.CreateCluster][google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]
1037///
1038/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]: crate::client::VmwareEngine::create_cluster
1039#[derive(Clone, Default, PartialEq)]
1040#[non_exhaustive]
1041pub struct CreateClusterRequest {
1042    /// Required. The resource name of the private cloud to create a new cluster
1043    /// in. Resource names are schemeless URIs that follow the conventions in
1044    /// <https://cloud.google.com/apis/design/resource_names>.
1045    /// For example:
1046    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1047    pub parent: std::string::String,
1048
1049    /// Required. The user-provided identifier of the new `Cluster`.
1050    /// This identifier must be unique among clusters within the parent and becomes
1051    /// the final token in the name URI.
1052    /// The identifier must meet the following requirements:
1053    ///
1054    /// * Only contains 1-63 alphanumeric characters and hyphens
1055    /// * Begins with an alphabetical character
1056    /// * Ends with a non-hyphen character
1057    /// * Not formatted as a UUID
1058    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
1059    ///   (section 3.5)
1060    pub cluster_id: std::string::String,
1061
1062    /// Required. The initial description of the new cluster.
1063    pub cluster: std::option::Option<crate::model::Cluster>,
1064
1065    /// Optional. The request ID must be a valid UUID with the exception that zero
1066    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
1067    pub request_id: std::string::String,
1068
1069    /// Optional. True if you want the request to be validated and not executed;
1070    /// false otherwise.
1071    pub validate_only: bool,
1072
1073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1074}
1075
1076impl CreateClusterRequest {
1077    /// Creates a new default instance.
1078    pub fn new() -> Self {
1079        std::default::Default::default()
1080    }
1081
1082    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
1083    ///
1084    /// # Example
1085    /// ```ignore,no_run
1086    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1087    /// # let project_id = "project_id";
1088    /// # let location_id = "location_id";
1089    /// # let private_cloud_id = "private_cloud_id";
1090    /// let x = CreateClusterRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
1091    /// ```
1092    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1093        self.parent = v.into();
1094        self
1095    }
1096
1097    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
1098    ///
1099    /// # Example
1100    /// ```ignore,no_run
1101    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1102    /// let x = CreateClusterRequest::new().set_cluster_id("example");
1103    /// ```
1104    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1105        self.cluster_id = v.into();
1106        self
1107    }
1108
1109    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
1110    ///
1111    /// # Example
1112    /// ```ignore,no_run
1113    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1114    /// use google_cloud_vmwareengine_v1::model::Cluster;
1115    /// let x = CreateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
1116    /// ```
1117    pub fn set_cluster<T>(mut self, v: T) -> Self
1118    where
1119        T: std::convert::Into<crate::model::Cluster>,
1120    {
1121        self.cluster = std::option::Option::Some(v.into());
1122        self
1123    }
1124
1125    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
1126    ///
1127    /// # Example
1128    /// ```ignore,no_run
1129    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1130    /// use google_cloud_vmwareengine_v1::model::Cluster;
1131    /// let x = CreateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
1132    /// let x = CreateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
1133    /// ```
1134    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1135    where
1136        T: std::convert::Into<crate::model::Cluster>,
1137    {
1138        self.cluster = v.map(|x| x.into());
1139        self
1140    }
1141
1142    /// Sets the value of [request_id][crate::model::CreateClusterRequest::request_id].
1143    ///
1144    /// # Example
1145    /// ```ignore,no_run
1146    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1147    /// let x = CreateClusterRequest::new().set_request_id("example");
1148    /// ```
1149    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1150        self.request_id = v.into();
1151        self
1152    }
1153
1154    /// Sets the value of [validate_only][crate::model::CreateClusterRequest::validate_only].
1155    ///
1156    /// # Example
1157    /// ```ignore,no_run
1158    /// # use google_cloud_vmwareengine_v1::model::CreateClusterRequest;
1159    /// let x = CreateClusterRequest::new().set_validate_only(true);
1160    /// ```
1161    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1162        self.validate_only = v.into();
1163        self
1164    }
1165}
1166
1167impl wkt::message::Message for CreateClusterRequest {
1168    fn typename() -> &'static str {
1169        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateClusterRequest"
1170    }
1171}
1172
1173/// Request message for
1174/// [VmwareEngine.UpdateCluster][google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]
1175///
1176/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]: crate::client::VmwareEngine::update_cluster
1177#[derive(Clone, Default, PartialEq)]
1178#[non_exhaustive]
1179pub struct UpdateClusterRequest {
1180    /// Required. Field mask is used to specify the fields to be overwritten in the
1181    /// `Cluster` resource by the update. The fields specified in the `updateMask`
1182    /// are relative to the resource, not the full request. A field will be
1183    /// overwritten if it is in the mask. If the user does not provide a mask then
1184    /// all fields will be overwritten.
1185    pub update_mask: std::option::Option<wkt::FieldMask>,
1186
1187    /// Required. The description of the cluster.
1188    pub cluster: std::option::Option<crate::model::Cluster>,
1189
1190    /// Optional. The request ID must be a valid UUID with the exception that
1191    /// zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1192    pub request_id: std::string::String,
1193
1194    /// Optional. True if you want the request to be validated and not executed;
1195    /// false otherwise.
1196    pub validate_only: bool,
1197
1198    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1199}
1200
1201impl UpdateClusterRequest {
1202    /// Creates a new default instance.
1203    pub fn new() -> Self {
1204        std::default::Default::default()
1205    }
1206
1207    /// Sets the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
1208    ///
1209    /// # Example
1210    /// ```ignore,no_run
1211    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1212    /// use wkt::FieldMask;
1213    /// let x = UpdateClusterRequest::new().set_update_mask(FieldMask::default()/* use setters */);
1214    /// ```
1215    pub fn set_update_mask<T>(mut self, v: T) -> Self
1216    where
1217        T: std::convert::Into<wkt::FieldMask>,
1218    {
1219        self.update_mask = std::option::Option::Some(v.into());
1220        self
1221    }
1222
1223    /// Sets or clears the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
1224    ///
1225    /// # Example
1226    /// ```ignore,no_run
1227    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1228    /// use wkt::FieldMask;
1229    /// let x = UpdateClusterRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
1230    /// let x = UpdateClusterRequest::new().set_or_clear_update_mask(None::<FieldMask>);
1231    /// ```
1232    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1233    where
1234        T: std::convert::Into<wkt::FieldMask>,
1235    {
1236        self.update_mask = v.map(|x| x.into());
1237        self
1238    }
1239
1240    /// Sets the value of [cluster][crate::model::UpdateClusterRequest::cluster].
1241    ///
1242    /// # Example
1243    /// ```ignore,no_run
1244    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1245    /// use google_cloud_vmwareengine_v1::model::Cluster;
1246    /// let x = UpdateClusterRequest::new().set_cluster(Cluster::default()/* use setters */);
1247    /// ```
1248    pub fn set_cluster<T>(mut self, v: T) -> Self
1249    where
1250        T: std::convert::Into<crate::model::Cluster>,
1251    {
1252        self.cluster = std::option::Option::Some(v.into());
1253        self
1254    }
1255
1256    /// Sets or clears the value of [cluster][crate::model::UpdateClusterRequest::cluster].
1257    ///
1258    /// # Example
1259    /// ```ignore,no_run
1260    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1261    /// use google_cloud_vmwareengine_v1::model::Cluster;
1262    /// let x = UpdateClusterRequest::new().set_or_clear_cluster(Some(Cluster::default()/* use setters */));
1263    /// let x = UpdateClusterRequest::new().set_or_clear_cluster(None::<Cluster>);
1264    /// ```
1265    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1266    where
1267        T: std::convert::Into<crate::model::Cluster>,
1268    {
1269        self.cluster = v.map(|x| x.into());
1270        self
1271    }
1272
1273    /// Sets the value of [request_id][crate::model::UpdateClusterRequest::request_id].
1274    ///
1275    /// # Example
1276    /// ```ignore,no_run
1277    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1278    /// let x = UpdateClusterRequest::new().set_request_id("example");
1279    /// ```
1280    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1281        self.request_id = v.into();
1282        self
1283    }
1284
1285    /// Sets the value of [validate_only][crate::model::UpdateClusterRequest::validate_only].
1286    ///
1287    /// # Example
1288    /// ```ignore,no_run
1289    /// # use google_cloud_vmwareengine_v1::model::UpdateClusterRequest;
1290    /// let x = UpdateClusterRequest::new().set_validate_only(true);
1291    /// ```
1292    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
1293        self.validate_only = v.into();
1294        self
1295    }
1296}
1297
1298impl wkt::message::Message for UpdateClusterRequest {
1299    fn typename() -> &'static str {
1300        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateClusterRequest"
1301    }
1302}
1303
1304/// Request message for
1305/// [VmwareEngine.DeleteCluster][google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]
1306///
1307/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]: crate::client::VmwareEngine::delete_cluster
1308#[derive(Clone, Default, PartialEq)]
1309#[non_exhaustive]
1310pub struct DeleteClusterRequest {
1311    /// Required. The resource name of the cluster to delete.
1312    /// Resource names are schemeless URIs that follow the conventions in
1313    /// <https://cloud.google.com/apis/design/resource_names>.
1314    /// For example:
1315    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
1316    pub name: std::string::String,
1317
1318    /// Optional. The request ID must be a valid UUID with the exception that zero
1319    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
1320    pub request_id: std::string::String,
1321
1322    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1323}
1324
1325impl DeleteClusterRequest {
1326    /// Creates a new default instance.
1327    pub fn new() -> Self {
1328        std::default::Default::default()
1329    }
1330
1331    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
1332    ///
1333    /// # Example
1334    /// ```ignore,no_run
1335    /// # use google_cloud_vmwareengine_v1::model::DeleteClusterRequest;
1336    /// # let project_id = "project_id";
1337    /// # let location_id = "location_id";
1338    /// # let private_cloud_id = "private_cloud_id";
1339    /// # let cluster_id = "cluster_id";
1340    /// let x = DeleteClusterRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/clusters/{cluster_id}"));
1341    /// ```
1342    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1343        self.name = v.into();
1344        self
1345    }
1346
1347    /// Sets the value of [request_id][crate::model::DeleteClusterRequest::request_id].
1348    ///
1349    /// # Example
1350    /// ```ignore,no_run
1351    /// # use google_cloud_vmwareengine_v1::model::DeleteClusterRequest;
1352    /// let x = DeleteClusterRequest::new().set_request_id("example");
1353    /// ```
1354    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1355        self.request_id = v.into();
1356        self
1357    }
1358}
1359
1360impl wkt::message::Message for DeleteClusterRequest {
1361    fn typename() -> &'static str {
1362        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteClusterRequest"
1363    }
1364}
1365
1366/// Request message for
1367/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
1368///
1369/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
1370#[derive(Clone, Default, PartialEq)]
1371#[non_exhaustive]
1372pub struct ListNodesRequest {
1373    /// Required. The resource name of the cluster to be queried for nodes.
1374    /// Resource names are schemeless URIs that follow the conventions in
1375    /// <https://cloud.google.com/apis/design/resource_names>.
1376    /// For example:
1377    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
1378    pub parent: std::string::String,
1379
1380    /// The maximum number of nodes to return in one page.
1381    /// The service may return fewer than this value.
1382    /// The maximum value is coerced to 1000.
1383    /// The default value of this field is 500.
1384    pub page_size: i32,
1385
1386    /// A page token, received from a previous `ListNodes` call.
1387    /// Provide this to retrieve the subsequent page.
1388    ///
1389    /// When paginating, all other parameters provided to
1390    /// `ListNodes` must match the call that provided the page
1391    /// token.
1392    pub page_token: std::string::String,
1393
1394    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1395}
1396
1397impl ListNodesRequest {
1398    /// Creates a new default instance.
1399    pub fn new() -> Self {
1400        std::default::Default::default()
1401    }
1402
1403    /// Sets the value of [parent][crate::model::ListNodesRequest::parent].
1404    ///
1405    /// # Example
1406    /// ```ignore,no_run
1407    /// # use google_cloud_vmwareengine_v1::model::ListNodesRequest;
1408    /// # let project_id = "project_id";
1409    /// # let location_id = "location_id";
1410    /// # let private_cloud_id = "private_cloud_id";
1411    /// # let cluster_id = "cluster_id";
1412    /// let x = ListNodesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/clusters/{cluster_id}"));
1413    /// ```
1414    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1415        self.parent = v.into();
1416        self
1417    }
1418
1419    /// Sets the value of [page_size][crate::model::ListNodesRequest::page_size].
1420    ///
1421    /// # Example
1422    /// ```ignore,no_run
1423    /// # use google_cloud_vmwareengine_v1::model::ListNodesRequest;
1424    /// let x = ListNodesRequest::new().set_page_size(42);
1425    /// ```
1426    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1427        self.page_size = v.into();
1428        self
1429    }
1430
1431    /// Sets the value of [page_token][crate::model::ListNodesRequest::page_token].
1432    ///
1433    /// # Example
1434    /// ```ignore,no_run
1435    /// # use google_cloud_vmwareengine_v1::model::ListNodesRequest;
1436    /// let x = ListNodesRequest::new().set_page_token("example");
1437    /// ```
1438    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1439        self.page_token = v.into();
1440        self
1441    }
1442}
1443
1444impl wkt::message::Message for ListNodesRequest {
1445    fn typename() -> &'static str {
1446        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesRequest"
1447    }
1448}
1449
1450/// Response message for
1451/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
1452///
1453/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
1454#[derive(Clone, Default, PartialEq)]
1455#[non_exhaustive]
1456pub struct ListNodesResponse {
1457    /// The nodes.
1458    pub nodes: std::vec::Vec<crate::model::Node>,
1459
1460    /// A token, which can be sent as `page_token` to retrieve the next page.
1461    /// If this field is omitted, there are no subsequent pages.
1462    pub next_page_token: std::string::String,
1463
1464    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1465}
1466
1467impl ListNodesResponse {
1468    /// Creates a new default instance.
1469    pub fn new() -> Self {
1470        std::default::Default::default()
1471    }
1472
1473    /// Sets the value of [nodes][crate::model::ListNodesResponse::nodes].
1474    ///
1475    /// # Example
1476    /// ```ignore,no_run
1477    /// # use google_cloud_vmwareengine_v1::model::ListNodesResponse;
1478    /// use google_cloud_vmwareengine_v1::model::Node;
1479    /// let x = ListNodesResponse::new()
1480    ///     .set_nodes([
1481    ///         Node::default()/* use setters */,
1482    ///         Node::default()/* use (different) setters */,
1483    ///     ]);
1484    /// ```
1485    pub fn set_nodes<T, V>(mut self, v: T) -> Self
1486    where
1487        T: std::iter::IntoIterator<Item = V>,
1488        V: std::convert::Into<crate::model::Node>,
1489    {
1490        use std::iter::Iterator;
1491        self.nodes = v.into_iter().map(|i| i.into()).collect();
1492        self
1493    }
1494
1495    /// Sets the value of [next_page_token][crate::model::ListNodesResponse::next_page_token].
1496    ///
1497    /// # Example
1498    /// ```ignore,no_run
1499    /// # use google_cloud_vmwareengine_v1::model::ListNodesResponse;
1500    /// let x = ListNodesResponse::new().set_next_page_token("example");
1501    /// ```
1502    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1503        self.next_page_token = v.into();
1504        self
1505    }
1506}
1507
1508impl wkt::message::Message for ListNodesResponse {
1509    fn typename() -> &'static str {
1510        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesResponse"
1511    }
1512}
1513
1514#[doc(hidden)]
1515impl google_cloud_gax::paginator::internal::PageableResponse for ListNodesResponse {
1516    type PageItem = crate::model::Node;
1517
1518    fn items(self) -> std::vec::Vec<Self::PageItem> {
1519        self.nodes
1520    }
1521
1522    fn next_page_token(&self) -> std::string::String {
1523        use std::clone::Clone;
1524        self.next_page_token.clone()
1525    }
1526}
1527
1528/// Request message for
1529/// [VmwareEngine.GetNode][google.cloud.vmwareengine.v1.VmwareEngine.GetNode]
1530///
1531/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNode]: crate::client::VmwareEngine::get_node
1532#[derive(Clone, Default, PartialEq)]
1533#[non_exhaustive]
1534pub struct GetNodeRequest {
1535    /// Required. The resource name of the node to retrieve.
1536    /// For example:
1537    /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}`
1538    pub name: std::string::String,
1539
1540    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1541}
1542
1543impl GetNodeRequest {
1544    /// Creates a new default instance.
1545    pub fn new() -> Self {
1546        std::default::Default::default()
1547    }
1548
1549    /// Sets the value of [name][crate::model::GetNodeRequest::name].
1550    ///
1551    /// # Example
1552    /// ```ignore,no_run
1553    /// # use google_cloud_vmwareengine_v1::model::GetNodeRequest;
1554    /// # let project_id = "project_id";
1555    /// # let location_id = "location_id";
1556    /// # let private_cloud_id = "private_cloud_id";
1557    /// # let cluster_id = "cluster_id";
1558    /// # let node_id = "node_id";
1559    /// let x = GetNodeRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/clusters/{cluster_id}/nodes/{node_id}"));
1560    /// ```
1561    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1562        self.name = v.into();
1563        self
1564    }
1565}
1566
1567impl wkt::message::Message for GetNodeRequest {
1568    fn typename() -> &'static str {
1569        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeRequest"
1570    }
1571}
1572
1573/// Request message for
1574/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1575///
1576/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1577#[derive(Clone, Default, PartialEq)]
1578#[non_exhaustive]
1579pub struct ListExternalAddressesRequest {
1580    /// Required. The resource name of the private cloud to be queried for
1581    /// external IP addresses.
1582    /// Resource names are schemeless URIs that follow the conventions in
1583    /// <https://cloud.google.com/apis/design/resource_names>.
1584    /// For example:
1585    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1586    pub parent: std::string::String,
1587
1588    /// The maximum number of external IP addresses to return in one page.
1589    /// The service may return fewer than this value.
1590    /// The maximum value is coerced to 1000.
1591    /// The default value of this field is 500.
1592    pub page_size: i32,
1593
1594    /// A page token, received from a previous `ListExternalAddresses` call.
1595    /// Provide this to retrieve the subsequent page.
1596    ///
1597    /// When paginating, all other parameters provided to
1598    /// `ListExternalAddresses` must match the call that provided the page token.
1599    pub page_token: std::string::String,
1600
1601    /// A filter expression that matches resources returned in the response.
1602    /// The expression must specify the field name, a comparison
1603    /// operator, and the value that you want to use for filtering. The value
1604    /// must be a string, a number, or a boolean. The comparison operator
1605    /// must be `=`, `!=`, `>`, or `<`.
1606    ///
1607    /// For example, if you are filtering a list of IP addresses, you can
1608    /// exclude the ones named `example-ip` by specifying
1609    /// `name != "example-ip"`.
1610    ///
1611    /// To filter on multiple expressions, provide each separate expression within
1612    /// parentheses. For example:
1613    ///
1614    /// ```norust
1615    /// (name = "example-ip")
1616    /// (createTime > "2021-04-12T08:15:10.40Z")
1617    /// ```
1618    ///
1619    /// By default, each expression is an `AND` expression. However, you
1620    /// can include `AND` and `OR` expressions explicitly.
1621    /// For example:
1622    ///
1623    /// ```norust
1624    /// (name = "example-ip-1") AND
1625    /// (createTime > "2021-04-12T08:15:10.40Z") OR
1626    /// (name = "example-ip-2")
1627    /// ```
1628    pub filter: std::string::String,
1629
1630    /// Sorts list results by a certain order. By default, returned results
1631    /// are ordered by `name` in ascending order.
1632    /// You can also sort results in descending order based on the `name` value
1633    /// using `orderBy="name desc"`.
1634    /// Currently, only ordering by `name` is supported.
1635    pub order_by: std::string::String,
1636
1637    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1638}
1639
1640impl ListExternalAddressesRequest {
1641    /// Creates a new default instance.
1642    pub fn new() -> Self {
1643        std::default::Default::default()
1644    }
1645
1646    /// Sets the value of [parent][crate::model::ListExternalAddressesRequest::parent].
1647    ///
1648    /// # Example
1649    /// ```ignore,no_run
1650    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesRequest;
1651    /// # let project_id = "project_id";
1652    /// # let location_id = "location_id";
1653    /// # let private_cloud_id = "private_cloud_id";
1654    /// let x = ListExternalAddressesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
1655    /// ```
1656    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1657        self.parent = v.into();
1658        self
1659    }
1660
1661    /// Sets the value of [page_size][crate::model::ListExternalAddressesRequest::page_size].
1662    ///
1663    /// # Example
1664    /// ```ignore,no_run
1665    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesRequest;
1666    /// let x = ListExternalAddressesRequest::new().set_page_size(42);
1667    /// ```
1668    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1669        self.page_size = v.into();
1670        self
1671    }
1672
1673    /// Sets the value of [page_token][crate::model::ListExternalAddressesRequest::page_token].
1674    ///
1675    /// # Example
1676    /// ```ignore,no_run
1677    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesRequest;
1678    /// let x = ListExternalAddressesRequest::new().set_page_token("example");
1679    /// ```
1680    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1681        self.page_token = v.into();
1682        self
1683    }
1684
1685    /// Sets the value of [filter][crate::model::ListExternalAddressesRequest::filter].
1686    ///
1687    /// # Example
1688    /// ```ignore,no_run
1689    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesRequest;
1690    /// let x = ListExternalAddressesRequest::new().set_filter("example");
1691    /// ```
1692    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1693        self.filter = v.into();
1694        self
1695    }
1696
1697    /// Sets the value of [order_by][crate::model::ListExternalAddressesRequest::order_by].
1698    ///
1699    /// # Example
1700    /// ```ignore,no_run
1701    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesRequest;
1702    /// let x = ListExternalAddressesRequest::new().set_order_by("example");
1703    /// ```
1704    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1705        self.order_by = v.into();
1706        self
1707    }
1708}
1709
1710impl wkt::message::Message for ListExternalAddressesRequest {
1711    fn typename() -> &'static str {
1712        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesRequest"
1713    }
1714}
1715
1716/// Response message for
1717/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1718///
1719/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1720#[derive(Clone, Default, PartialEq)]
1721#[non_exhaustive]
1722pub struct ListExternalAddressesResponse {
1723    /// A list of external IP addresses.
1724    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1725
1726    /// A token, which can be sent as `page_token` to retrieve the next page.
1727    /// If this field is omitted, there are no subsequent pages.
1728    pub next_page_token: std::string::String,
1729
1730    /// Locations that could not be reached when making an aggregated query using
1731    /// wildcards.
1732    pub unreachable: std::vec::Vec<std::string::String>,
1733
1734    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1735}
1736
1737impl ListExternalAddressesResponse {
1738    /// Creates a new default instance.
1739    pub fn new() -> Self {
1740        std::default::Default::default()
1741    }
1742
1743    /// Sets the value of [external_addresses][crate::model::ListExternalAddressesResponse::external_addresses].
1744    ///
1745    /// # Example
1746    /// ```ignore,no_run
1747    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesResponse;
1748    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
1749    /// let x = ListExternalAddressesResponse::new()
1750    ///     .set_external_addresses([
1751    ///         ExternalAddress::default()/* use setters */,
1752    ///         ExternalAddress::default()/* use (different) setters */,
1753    ///     ]);
1754    /// ```
1755    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1756    where
1757        T: std::iter::IntoIterator<Item = V>,
1758        V: std::convert::Into<crate::model::ExternalAddress>,
1759    {
1760        use std::iter::Iterator;
1761        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1762        self
1763    }
1764
1765    /// Sets the value of [next_page_token][crate::model::ListExternalAddressesResponse::next_page_token].
1766    ///
1767    /// # Example
1768    /// ```ignore,no_run
1769    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesResponse;
1770    /// let x = ListExternalAddressesResponse::new().set_next_page_token("example");
1771    /// ```
1772    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1773        self.next_page_token = v.into();
1774        self
1775    }
1776
1777    /// Sets the value of [unreachable][crate::model::ListExternalAddressesResponse::unreachable].
1778    ///
1779    /// # Example
1780    /// ```ignore,no_run
1781    /// # use google_cloud_vmwareengine_v1::model::ListExternalAddressesResponse;
1782    /// let x = ListExternalAddressesResponse::new().set_unreachable(["a", "b", "c"]);
1783    /// ```
1784    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1785    where
1786        T: std::iter::IntoIterator<Item = V>,
1787        V: std::convert::Into<std::string::String>,
1788    {
1789        use std::iter::Iterator;
1790        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1791        self
1792    }
1793}
1794
1795impl wkt::message::Message for ListExternalAddressesResponse {
1796    fn typename() -> &'static str {
1797        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesResponse"
1798    }
1799}
1800
1801#[doc(hidden)]
1802impl google_cloud_gax::paginator::internal::PageableResponse for ListExternalAddressesResponse {
1803    type PageItem = crate::model::ExternalAddress;
1804
1805    fn items(self) -> std::vec::Vec<Self::PageItem> {
1806        self.external_addresses
1807    }
1808
1809    fn next_page_token(&self) -> std::string::String {
1810        use std::clone::Clone;
1811        self.next_page_token.clone()
1812    }
1813}
1814
1815/// Request message for
1816/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1817///
1818/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
1819#[derive(Clone, Default, PartialEq)]
1820#[non_exhaustive]
1821pub struct FetchNetworkPolicyExternalAddressesRequest {
1822    /// Required. The resource name of the network policy to query for assigned
1823    /// external IP addresses. Resource names are schemeless URIs that follow the
1824    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
1825    /// example:
1826    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
1827    pub network_policy: std::string::String,
1828
1829    /// The maximum number of external IP addresses to return in one page.
1830    /// The service may return fewer than this value.
1831    /// The maximum value is coerced to 1000.
1832    /// The default value of this field is 500.
1833    pub page_size: i32,
1834
1835    /// A page token, received from a previous
1836    /// `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the
1837    /// subsequent page.
1838    ///
1839    /// When paginating, all parameters provided to
1840    /// `FetchNetworkPolicyExternalAddresses`, except for `page_size` and
1841    /// `page_token`, must match the call that provided the page token.
1842    pub page_token: std::string::String,
1843
1844    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1845}
1846
1847impl FetchNetworkPolicyExternalAddressesRequest {
1848    /// Creates a new default instance.
1849    pub fn new() -> Self {
1850        std::default::Default::default()
1851    }
1852
1853    /// Sets the value of [network_policy][crate::model::FetchNetworkPolicyExternalAddressesRequest::network_policy].
1854    ///
1855    /// # Example
1856    /// ```ignore,no_run
1857    /// # use google_cloud_vmwareengine_v1::model::FetchNetworkPolicyExternalAddressesRequest;
1858    /// # let project_id = "project_id";
1859    /// # let location_id = "location_id";
1860    /// # let network_policy_id = "network_policy_id";
1861    /// let x = FetchNetworkPolicyExternalAddressesRequest::new().set_network_policy(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}"));
1862    /// ```
1863    pub fn set_network_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1864        self.network_policy = v.into();
1865        self
1866    }
1867
1868    /// Sets the value of [page_size][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_size].
1869    ///
1870    /// # Example
1871    /// ```ignore,no_run
1872    /// # use google_cloud_vmwareengine_v1::model::FetchNetworkPolicyExternalAddressesRequest;
1873    /// let x = FetchNetworkPolicyExternalAddressesRequest::new().set_page_size(42);
1874    /// ```
1875    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1876        self.page_size = v.into();
1877        self
1878    }
1879
1880    /// Sets the value of [page_token][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_token].
1881    ///
1882    /// # Example
1883    /// ```ignore,no_run
1884    /// # use google_cloud_vmwareengine_v1::model::FetchNetworkPolicyExternalAddressesRequest;
1885    /// let x = FetchNetworkPolicyExternalAddressesRequest::new().set_page_token("example");
1886    /// ```
1887    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1888        self.page_token = v.into();
1889        self
1890    }
1891}
1892
1893impl wkt::message::Message for FetchNetworkPolicyExternalAddressesRequest {
1894    fn typename() -> &'static str {
1895        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest"
1896    }
1897}
1898
1899/// Response message for
1900/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1901///
1902/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
1903#[derive(Clone, Default, PartialEq)]
1904#[non_exhaustive]
1905pub struct FetchNetworkPolicyExternalAddressesResponse {
1906    /// A list of external IP addresses assigned to VMware workload VMs within the
1907    /// scope of the given network policy.
1908    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1909
1910    /// A token, which can be sent as `page_token` to retrieve the next page.
1911    /// If this field is omitted, there are no subsequent pages.
1912    pub next_page_token: std::string::String,
1913
1914    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1915}
1916
1917impl FetchNetworkPolicyExternalAddressesResponse {
1918    /// Creates a new default instance.
1919    pub fn new() -> Self {
1920        std::default::Default::default()
1921    }
1922
1923    /// Sets the value of [external_addresses][crate::model::FetchNetworkPolicyExternalAddressesResponse::external_addresses].
1924    ///
1925    /// # Example
1926    /// ```ignore,no_run
1927    /// # use google_cloud_vmwareengine_v1::model::FetchNetworkPolicyExternalAddressesResponse;
1928    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
1929    /// let x = FetchNetworkPolicyExternalAddressesResponse::new()
1930    ///     .set_external_addresses([
1931    ///         ExternalAddress::default()/* use setters */,
1932    ///         ExternalAddress::default()/* use (different) setters */,
1933    ///     ]);
1934    /// ```
1935    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1936    where
1937        T: std::iter::IntoIterator<Item = V>,
1938        V: std::convert::Into<crate::model::ExternalAddress>,
1939    {
1940        use std::iter::Iterator;
1941        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1942        self
1943    }
1944
1945    /// Sets the value of [next_page_token][crate::model::FetchNetworkPolicyExternalAddressesResponse::next_page_token].
1946    ///
1947    /// # Example
1948    /// ```ignore,no_run
1949    /// # use google_cloud_vmwareengine_v1::model::FetchNetworkPolicyExternalAddressesResponse;
1950    /// let x = FetchNetworkPolicyExternalAddressesResponse::new().set_next_page_token("example");
1951    /// ```
1952    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1953        self.next_page_token = v.into();
1954        self
1955    }
1956}
1957
1958impl wkt::message::Message for FetchNetworkPolicyExternalAddressesResponse {
1959    fn typename() -> &'static str {
1960        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesResponse"
1961    }
1962}
1963
1964#[doc(hidden)]
1965impl google_cloud_gax::paginator::internal::PageableResponse
1966    for FetchNetworkPolicyExternalAddressesResponse
1967{
1968    type PageItem = crate::model::ExternalAddress;
1969
1970    fn items(self) -> std::vec::Vec<Self::PageItem> {
1971        self.external_addresses
1972    }
1973
1974    fn next_page_token(&self) -> std::string::String {
1975        use std::clone::Clone;
1976        self.next_page_token.clone()
1977    }
1978}
1979
1980/// Request message for
1981/// [VmwareEngine.GetExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]
1982///
1983/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]: crate::client::VmwareEngine::get_external_address
1984#[derive(Clone, Default, PartialEq)]
1985#[non_exhaustive]
1986pub struct GetExternalAddressRequest {
1987    /// Required. The resource name of the external IP address to retrieve.
1988    /// Resource names are schemeless URIs that follow the conventions in
1989    /// <https://cloud.google.com/apis/design/resource_names>.
1990    /// For example:
1991    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
1992    pub name: std::string::String,
1993
1994    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1995}
1996
1997impl GetExternalAddressRequest {
1998    /// Creates a new default instance.
1999    pub fn new() -> Self {
2000        std::default::Default::default()
2001    }
2002
2003    /// Sets the value of [name][crate::model::GetExternalAddressRequest::name].
2004    ///
2005    /// # Example
2006    /// ```ignore,no_run
2007    /// # use google_cloud_vmwareengine_v1::model::GetExternalAddressRequest;
2008    /// # let project_id = "project_id";
2009    /// # let location_id = "location_id";
2010    /// # let private_cloud_id = "private_cloud_id";
2011    /// # let external_address_id = "external_address_id";
2012    /// let x = GetExternalAddressRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/externalAddresses/{external_address_id}"));
2013    /// ```
2014    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2015        self.name = v.into();
2016        self
2017    }
2018}
2019
2020impl wkt::message::Message for GetExternalAddressRequest {
2021    fn typename() -> &'static str {
2022        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAddressRequest"
2023    }
2024}
2025
2026/// Request message for
2027/// [VmwareEngine.CreateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]
2028///
2029/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]: crate::client::VmwareEngine::create_external_address
2030#[derive(Clone, Default, PartialEq)]
2031#[non_exhaustive]
2032pub struct CreateExternalAddressRequest {
2033    /// Required. The resource name of the private cloud
2034    /// to create a new external IP address in.
2035    /// Resource names are schemeless URIs that follow the conventions in
2036    /// <https://cloud.google.com/apis/design/resource_names>.
2037    /// For example:
2038    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
2039    pub parent: std::string::String,
2040
2041    /// Required. The initial description of a new external IP address.
2042    pub external_address: std::option::Option<crate::model::ExternalAddress>,
2043
2044    /// Required. The user-provided identifier of the `ExternalAddress` to be
2045    /// created. This identifier must be unique among `ExternalAddress` resources
2046    /// within the parent and becomes the final token in the name URI. The
2047    /// identifier must meet the following requirements:
2048    ///
2049    /// * Only contains 1-63 alphanumeric characters and hyphens
2050    /// * Begins with an alphabetical character
2051    /// * Ends with a non-hyphen character
2052    /// * Not formatted as a UUID
2053    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
2054    ///   (section 3.5)
2055    pub external_address_id: std::string::String,
2056
2057    /// Optional. A request ID to identify requests. Specify a unique request ID
2058    /// so that if you must retry your request, the server will know to ignore
2059    /// the request if it has already been completed. The server guarantees that a
2060    /// request doesn't result in creation of duplicate commitments for at least 60
2061    /// minutes.
2062    ///
2063    /// For example, consider a situation where you make an initial request and the
2064    /// request times out. If you make the request again with the same request ID,
2065    /// the server can check if the original operation with the same request ID was
2066    /// received, and if so, will ignore the second request. This prevents clients
2067    /// from accidentally creating duplicate commitments.
2068    ///
2069    /// The request ID must be a valid UUID with the exception that zero UUID is
2070    /// not supported (00000000-0000-0000-0000-000000000000).
2071    pub request_id: std::string::String,
2072
2073    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2074}
2075
2076impl CreateExternalAddressRequest {
2077    /// Creates a new default instance.
2078    pub fn new() -> Self {
2079        std::default::Default::default()
2080    }
2081
2082    /// Sets the value of [parent][crate::model::CreateExternalAddressRequest::parent].
2083    ///
2084    /// # Example
2085    /// ```ignore,no_run
2086    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAddressRequest;
2087    /// # let project_id = "project_id";
2088    /// # let location_id = "location_id";
2089    /// # let private_cloud_id = "private_cloud_id";
2090    /// let x = CreateExternalAddressRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
2091    /// ```
2092    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2093        self.parent = v.into();
2094        self
2095    }
2096
2097    /// Sets the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
2098    ///
2099    /// # Example
2100    /// ```ignore,no_run
2101    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAddressRequest;
2102    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
2103    /// let x = CreateExternalAddressRequest::new().set_external_address(ExternalAddress::default()/* use setters */);
2104    /// ```
2105    pub fn set_external_address<T>(mut self, v: T) -> Self
2106    where
2107        T: std::convert::Into<crate::model::ExternalAddress>,
2108    {
2109        self.external_address = std::option::Option::Some(v.into());
2110        self
2111    }
2112
2113    /// Sets or clears the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
2114    ///
2115    /// # Example
2116    /// ```ignore,no_run
2117    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAddressRequest;
2118    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
2119    /// let x = CreateExternalAddressRequest::new().set_or_clear_external_address(Some(ExternalAddress::default()/* use setters */));
2120    /// let x = CreateExternalAddressRequest::new().set_or_clear_external_address(None::<ExternalAddress>);
2121    /// ```
2122    pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2123    where
2124        T: std::convert::Into<crate::model::ExternalAddress>,
2125    {
2126        self.external_address = v.map(|x| x.into());
2127        self
2128    }
2129
2130    /// Sets the value of [external_address_id][crate::model::CreateExternalAddressRequest::external_address_id].
2131    ///
2132    /// # Example
2133    /// ```ignore,no_run
2134    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAddressRequest;
2135    /// let x = CreateExternalAddressRequest::new().set_external_address_id("example");
2136    /// ```
2137    pub fn set_external_address_id<T: std::convert::Into<std::string::String>>(
2138        mut self,
2139        v: T,
2140    ) -> Self {
2141        self.external_address_id = v.into();
2142        self
2143    }
2144
2145    /// Sets the value of [request_id][crate::model::CreateExternalAddressRequest::request_id].
2146    ///
2147    /// # Example
2148    /// ```ignore,no_run
2149    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAddressRequest;
2150    /// let x = CreateExternalAddressRequest::new().set_request_id("example");
2151    /// ```
2152    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2153        self.request_id = v.into();
2154        self
2155    }
2156}
2157
2158impl wkt::message::Message for CreateExternalAddressRequest {
2159    fn typename() -> &'static str {
2160        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAddressRequest"
2161    }
2162}
2163
2164/// Request message for
2165/// [VmwareEngine.UpdateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]
2166///
2167/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]: crate::client::VmwareEngine::update_external_address
2168#[derive(Clone, Default, PartialEq)]
2169#[non_exhaustive]
2170pub struct UpdateExternalAddressRequest {
2171    /// Required. Field mask is used to specify the fields to be overwritten in the
2172    /// `ExternalAddress` resource by the update.
2173    /// The fields specified in the `update_mask` are relative to the resource, not
2174    /// the full request. A field will be overwritten if it is in the mask. If the
2175    /// user does not provide a mask then all fields will be overwritten.
2176    pub update_mask: std::option::Option<wkt::FieldMask>,
2177
2178    /// Required. External IP address description.
2179    pub external_address: std::option::Option<crate::model::ExternalAddress>,
2180
2181    /// Optional. A request ID to identify requests. Specify a unique request ID
2182    /// so that if you must retry your request, the server will know to ignore
2183    /// the request if it has already been completed. The server guarantees that a
2184    /// request doesn't result in creation of duplicate commitments for at least 60
2185    /// minutes.
2186    ///
2187    /// For example, consider a situation where you make an initial request and the
2188    /// request times out. If you make the request again with the same request ID,
2189    /// the server can check if the original operation with the same request ID was
2190    /// received, and if so, will ignore the second request. This prevents clients
2191    /// from accidentally creating duplicate commitments.
2192    ///
2193    /// The request ID must be a valid UUID with the exception that zero UUID is
2194    /// not supported (00000000-0000-0000-0000-000000000000).
2195    pub request_id: std::string::String,
2196
2197    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2198}
2199
2200impl UpdateExternalAddressRequest {
2201    /// Creates a new default instance.
2202    pub fn new() -> Self {
2203        std::default::Default::default()
2204    }
2205
2206    /// Sets the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
2207    ///
2208    /// # Example
2209    /// ```ignore,no_run
2210    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAddressRequest;
2211    /// use wkt::FieldMask;
2212    /// let x = UpdateExternalAddressRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2213    /// ```
2214    pub fn set_update_mask<T>(mut self, v: T) -> Self
2215    where
2216        T: std::convert::Into<wkt::FieldMask>,
2217    {
2218        self.update_mask = std::option::Option::Some(v.into());
2219        self
2220    }
2221
2222    /// Sets or clears the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
2223    ///
2224    /// # Example
2225    /// ```ignore,no_run
2226    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAddressRequest;
2227    /// use wkt::FieldMask;
2228    /// let x = UpdateExternalAddressRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2229    /// let x = UpdateExternalAddressRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2230    /// ```
2231    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2232    where
2233        T: std::convert::Into<wkt::FieldMask>,
2234    {
2235        self.update_mask = v.map(|x| x.into());
2236        self
2237    }
2238
2239    /// Sets the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
2240    ///
2241    /// # Example
2242    /// ```ignore,no_run
2243    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAddressRequest;
2244    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
2245    /// let x = UpdateExternalAddressRequest::new().set_external_address(ExternalAddress::default()/* use setters */);
2246    /// ```
2247    pub fn set_external_address<T>(mut self, v: T) -> Self
2248    where
2249        T: std::convert::Into<crate::model::ExternalAddress>,
2250    {
2251        self.external_address = std::option::Option::Some(v.into());
2252        self
2253    }
2254
2255    /// Sets or clears the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
2256    ///
2257    /// # Example
2258    /// ```ignore,no_run
2259    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAddressRequest;
2260    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
2261    /// let x = UpdateExternalAddressRequest::new().set_or_clear_external_address(Some(ExternalAddress::default()/* use setters */));
2262    /// let x = UpdateExternalAddressRequest::new().set_or_clear_external_address(None::<ExternalAddress>);
2263    /// ```
2264    pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2265    where
2266        T: std::convert::Into<crate::model::ExternalAddress>,
2267    {
2268        self.external_address = v.map(|x| x.into());
2269        self
2270    }
2271
2272    /// Sets the value of [request_id][crate::model::UpdateExternalAddressRequest::request_id].
2273    ///
2274    /// # Example
2275    /// ```ignore,no_run
2276    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAddressRequest;
2277    /// let x = UpdateExternalAddressRequest::new().set_request_id("example");
2278    /// ```
2279    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2280        self.request_id = v.into();
2281        self
2282    }
2283}
2284
2285impl wkt::message::Message for UpdateExternalAddressRequest {
2286    fn typename() -> &'static str {
2287        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAddressRequest"
2288    }
2289}
2290
2291/// Request message for
2292/// [VmwareEngine.DeleteExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]
2293///
2294/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]: crate::client::VmwareEngine::delete_external_address
2295#[derive(Clone, Default, PartialEq)]
2296#[non_exhaustive]
2297pub struct DeleteExternalAddressRequest {
2298    /// Required. The resource name of the external IP address to delete.
2299    /// Resource names are schemeless URIs that follow the conventions in
2300    /// <https://cloud.google.com/apis/design/resource_names>.
2301    /// For example:
2302    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
2303    pub name: std::string::String,
2304
2305    /// Optional. A request ID to identify requests. Specify a unique request ID
2306    /// so that if you must retry your request, the server will know to ignore
2307    /// the request if it has already been completed. The server guarantees that a
2308    /// request doesn't result in creation of duplicate commitments for at least 60
2309    /// minutes.
2310    ///
2311    /// For example, consider a situation where you make an initial request and the
2312    /// request times out. If you make the request again with the same request
2313    /// ID, the server can check if the original operation with the same request ID
2314    /// was received, and if so, will ignore the second request. This prevents
2315    /// clients from accidentally creating duplicate commitments.
2316    ///
2317    /// The request ID must be a valid UUID with the exception that zero UUID is
2318    /// not supported (00000000-0000-0000-0000-000000000000).
2319    pub request_id: std::string::String,
2320
2321    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2322}
2323
2324impl DeleteExternalAddressRequest {
2325    /// Creates a new default instance.
2326    pub fn new() -> Self {
2327        std::default::Default::default()
2328    }
2329
2330    /// Sets the value of [name][crate::model::DeleteExternalAddressRequest::name].
2331    ///
2332    /// # Example
2333    /// ```ignore,no_run
2334    /// # use google_cloud_vmwareengine_v1::model::DeleteExternalAddressRequest;
2335    /// # let project_id = "project_id";
2336    /// # let location_id = "location_id";
2337    /// # let private_cloud_id = "private_cloud_id";
2338    /// # let external_address_id = "external_address_id";
2339    /// let x = DeleteExternalAddressRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/externalAddresses/{external_address_id}"));
2340    /// ```
2341    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2342        self.name = v.into();
2343        self
2344    }
2345
2346    /// Sets the value of [request_id][crate::model::DeleteExternalAddressRequest::request_id].
2347    ///
2348    /// # Example
2349    /// ```ignore,no_run
2350    /// # use google_cloud_vmwareengine_v1::model::DeleteExternalAddressRequest;
2351    /// let x = DeleteExternalAddressRequest::new().set_request_id("example");
2352    /// ```
2353    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2354        self.request_id = v.into();
2355        self
2356    }
2357}
2358
2359impl wkt::message::Message for DeleteExternalAddressRequest {
2360    fn typename() -> &'static str {
2361        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAddressRequest"
2362    }
2363}
2364
2365/// Request message for
2366/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
2367///
2368/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
2369#[derive(Clone, Default, PartialEq)]
2370#[non_exhaustive]
2371pub struct ListSubnetsRequest {
2372    /// Required. The resource name of the private cloud to be queried for
2373    /// subnets.
2374    /// Resource names are schemeless URIs that follow the conventions in
2375    /// <https://cloud.google.com/apis/design/resource_names>.
2376    /// For example:
2377    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
2378    pub parent: std::string::String,
2379
2380    /// The maximum number of subnets to return in one page.
2381    /// The service may return fewer than this value.
2382    /// The maximum value is coerced to 1000.
2383    /// The default value of this field is 500.
2384    pub page_size: i32,
2385
2386    /// A page token, received from a previous `ListSubnetsRequest` call.
2387    /// Provide this to retrieve the subsequent page.
2388    ///
2389    /// When paginating, all other parameters provided to
2390    /// `ListSubnetsRequest` must match the call that provided the page token.
2391    pub page_token: std::string::String,
2392
2393    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2394}
2395
2396impl ListSubnetsRequest {
2397    /// Creates a new default instance.
2398    pub fn new() -> Self {
2399        std::default::Default::default()
2400    }
2401
2402    /// Sets the value of [parent][crate::model::ListSubnetsRequest::parent].
2403    ///
2404    /// # Example
2405    /// ```ignore,no_run
2406    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsRequest;
2407    /// # let project_id = "project_id";
2408    /// # let location_id = "location_id";
2409    /// # let private_cloud_id = "private_cloud_id";
2410    /// let x = ListSubnetsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
2411    /// ```
2412    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2413        self.parent = v.into();
2414        self
2415    }
2416
2417    /// Sets the value of [page_size][crate::model::ListSubnetsRequest::page_size].
2418    ///
2419    /// # Example
2420    /// ```ignore,no_run
2421    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsRequest;
2422    /// let x = ListSubnetsRequest::new().set_page_size(42);
2423    /// ```
2424    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2425        self.page_size = v.into();
2426        self
2427    }
2428
2429    /// Sets the value of [page_token][crate::model::ListSubnetsRequest::page_token].
2430    ///
2431    /// # Example
2432    /// ```ignore,no_run
2433    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsRequest;
2434    /// let x = ListSubnetsRequest::new().set_page_token("example");
2435    /// ```
2436    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2437        self.page_token = v.into();
2438        self
2439    }
2440}
2441
2442impl wkt::message::Message for ListSubnetsRequest {
2443    fn typename() -> &'static str {
2444        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsRequest"
2445    }
2446}
2447
2448/// Response message for
2449/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
2450///
2451/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
2452#[derive(Clone, Default, PartialEq)]
2453#[non_exhaustive]
2454pub struct ListSubnetsResponse {
2455    /// A list of subnets.
2456    pub subnets: std::vec::Vec<crate::model::Subnet>,
2457
2458    /// A token, which can be sent as `page_token` to retrieve the next page.
2459    /// If this field is omitted, there are no subsequent pages.
2460    pub next_page_token: std::string::String,
2461
2462    /// Locations that could not be reached when making an aggregated query using
2463    /// wildcards.
2464    pub unreachable: std::vec::Vec<std::string::String>,
2465
2466    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2467}
2468
2469impl ListSubnetsResponse {
2470    /// Creates a new default instance.
2471    pub fn new() -> Self {
2472        std::default::Default::default()
2473    }
2474
2475    /// Sets the value of [subnets][crate::model::ListSubnetsResponse::subnets].
2476    ///
2477    /// # Example
2478    /// ```ignore,no_run
2479    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsResponse;
2480    /// use google_cloud_vmwareengine_v1::model::Subnet;
2481    /// let x = ListSubnetsResponse::new()
2482    ///     .set_subnets([
2483    ///         Subnet::default()/* use setters */,
2484    ///         Subnet::default()/* use (different) setters */,
2485    ///     ]);
2486    /// ```
2487    pub fn set_subnets<T, V>(mut self, v: T) -> Self
2488    where
2489        T: std::iter::IntoIterator<Item = V>,
2490        V: std::convert::Into<crate::model::Subnet>,
2491    {
2492        use std::iter::Iterator;
2493        self.subnets = v.into_iter().map(|i| i.into()).collect();
2494        self
2495    }
2496
2497    /// Sets the value of [next_page_token][crate::model::ListSubnetsResponse::next_page_token].
2498    ///
2499    /// # Example
2500    /// ```ignore,no_run
2501    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsResponse;
2502    /// let x = ListSubnetsResponse::new().set_next_page_token("example");
2503    /// ```
2504    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2505        self.next_page_token = v.into();
2506        self
2507    }
2508
2509    /// Sets the value of [unreachable][crate::model::ListSubnetsResponse::unreachable].
2510    ///
2511    /// # Example
2512    /// ```ignore,no_run
2513    /// # use google_cloud_vmwareengine_v1::model::ListSubnetsResponse;
2514    /// let x = ListSubnetsResponse::new().set_unreachable(["a", "b", "c"]);
2515    /// ```
2516    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2517    where
2518        T: std::iter::IntoIterator<Item = V>,
2519        V: std::convert::Into<std::string::String>,
2520    {
2521        use std::iter::Iterator;
2522        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2523        self
2524    }
2525}
2526
2527impl wkt::message::Message for ListSubnetsResponse {
2528    fn typename() -> &'static str {
2529        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsResponse"
2530    }
2531}
2532
2533#[doc(hidden)]
2534impl google_cloud_gax::paginator::internal::PageableResponse for ListSubnetsResponse {
2535    type PageItem = crate::model::Subnet;
2536
2537    fn items(self) -> std::vec::Vec<Self::PageItem> {
2538        self.subnets
2539    }
2540
2541    fn next_page_token(&self) -> std::string::String {
2542        use std::clone::Clone;
2543        self.next_page_token.clone()
2544    }
2545}
2546
2547/// Request message for
2548/// [VmwareEngine.GetSubnet][google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]
2549///
2550/// [google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]: crate::client::VmwareEngine::get_subnet
2551#[derive(Clone, Default, PartialEq)]
2552#[non_exhaustive]
2553pub struct GetSubnetRequest {
2554    /// Required. The resource name of the subnet to retrieve.
2555    /// Resource names are schemeless URIs that follow the conventions in
2556    /// <https://cloud.google.com/apis/design/resource_names>.
2557    /// For example:
2558    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
2559    pub name: std::string::String,
2560
2561    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2562}
2563
2564impl GetSubnetRequest {
2565    /// Creates a new default instance.
2566    pub fn new() -> Self {
2567        std::default::Default::default()
2568    }
2569
2570    /// Sets the value of [name][crate::model::GetSubnetRequest::name].
2571    ///
2572    /// # Example
2573    /// ```ignore,no_run
2574    /// # use google_cloud_vmwareengine_v1::model::GetSubnetRequest;
2575    /// # let project_id = "project_id";
2576    /// # let location_id = "location_id";
2577    /// # let private_cloud_id = "private_cloud_id";
2578    /// # let subnet_id = "subnet_id";
2579    /// let x = GetSubnetRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/subnets/{subnet_id}"));
2580    /// ```
2581    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2582        self.name = v.into();
2583        self
2584    }
2585}
2586
2587impl wkt::message::Message for GetSubnetRequest {
2588    fn typename() -> &'static str {
2589        "type.googleapis.com/google.cloud.vmwareengine.v1.GetSubnetRequest"
2590    }
2591}
2592
2593/// Request message for
2594/// [VmwareEngine.UpdateSubnet][google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]
2595///
2596/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]: crate::client::VmwareEngine::update_subnet
2597#[derive(Clone, Default, PartialEq)]
2598#[non_exhaustive]
2599pub struct UpdateSubnetRequest {
2600    /// Required. Field mask is used to specify the fields to be overwritten in the
2601    /// `Subnet` resource by the update.
2602    /// The fields specified in the `update_mask` are relative to the resource, not
2603    /// the full request. A field will be overwritten if it is in the mask. If the
2604    /// user does not provide a mask then all fields will be overwritten.
2605    pub update_mask: std::option::Option<wkt::FieldMask>,
2606
2607    /// Required. Subnet description.
2608    pub subnet: std::option::Option<crate::model::Subnet>,
2609
2610    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2611}
2612
2613impl UpdateSubnetRequest {
2614    /// Creates a new default instance.
2615    pub fn new() -> Self {
2616        std::default::Default::default()
2617    }
2618
2619    /// Sets the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
2620    ///
2621    /// # Example
2622    /// ```ignore,no_run
2623    /// # use google_cloud_vmwareengine_v1::model::UpdateSubnetRequest;
2624    /// use wkt::FieldMask;
2625    /// let x = UpdateSubnetRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2626    /// ```
2627    pub fn set_update_mask<T>(mut self, v: T) -> Self
2628    where
2629        T: std::convert::Into<wkt::FieldMask>,
2630    {
2631        self.update_mask = std::option::Option::Some(v.into());
2632        self
2633    }
2634
2635    /// Sets or clears the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
2636    ///
2637    /// # Example
2638    /// ```ignore,no_run
2639    /// # use google_cloud_vmwareengine_v1::model::UpdateSubnetRequest;
2640    /// use wkt::FieldMask;
2641    /// let x = UpdateSubnetRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2642    /// let x = UpdateSubnetRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2643    /// ```
2644    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2645    where
2646        T: std::convert::Into<wkt::FieldMask>,
2647    {
2648        self.update_mask = v.map(|x| x.into());
2649        self
2650    }
2651
2652    /// Sets the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
2653    ///
2654    /// # Example
2655    /// ```ignore,no_run
2656    /// # use google_cloud_vmwareengine_v1::model::UpdateSubnetRequest;
2657    /// use google_cloud_vmwareengine_v1::model::Subnet;
2658    /// let x = UpdateSubnetRequest::new().set_subnet(Subnet::default()/* use setters */);
2659    /// ```
2660    pub fn set_subnet<T>(mut self, v: T) -> Self
2661    where
2662        T: std::convert::Into<crate::model::Subnet>,
2663    {
2664        self.subnet = std::option::Option::Some(v.into());
2665        self
2666    }
2667
2668    /// Sets or clears the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
2669    ///
2670    /// # Example
2671    /// ```ignore,no_run
2672    /// # use google_cloud_vmwareengine_v1::model::UpdateSubnetRequest;
2673    /// use google_cloud_vmwareengine_v1::model::Subnet;
2674    /// let x = UpdateSubnetRequest::new().set_or_clear_subnet(Some(Subnet::default()/* use setters */));
2675    /// let x = UpdateSubnetRequest::new().set_or_clear_subnet(None::<Subnet>);
2676    /// ```
2677    pub fn set_or_clear_subnet<T>(mut self, v: std::option::Option<T>) -> Self
2678    where
2679        T: std::convert::Into<crate::model::Subnet>,
2680    {
2681        self.subnet = v.map(|x| x.into());
2682        self
2683    }
2684}
2685
2686impl wkt::message::Message for UpdateSubnetRequest {
2687    fn typename() -> &'static str {
2688        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateSubnetRequest"
2689    }
2690}
2691
2692/// Request message for
2693/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
2694///
2695/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
2696#[derive(Clone, Default, PartialEq)]
2697#[non_exhaustive]
2698pub struct ListExternalAccessRulesRequest {
2699    /// Required. The resource name of the network policy to query for external
2700    /// access firewall rules. Resource names are schemeless URIs that follow the
2701    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
2702    /// example:
2703    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
2704    pub parent: std::string::String,
2705
2706    /// The maximum number of external access rules to return in one page.
2707    /// The service may return fewer than this value.
2708    /// The maximum value is coerced to 1000.
2709    /// The default value of this field is 500.
2710    pub page_size: i32,
2711
2712    /// A page token, received from a previous `ListExternalAccessRulesRequest`
2713    /// call. Provide this to retrieve the subsequent page.
2714    ///
2715    /// When paginating, all other parameters provided to
2716    /// `ListExternalAccessRulesRequest` must match the call that provided the page
2717    /// token.
2718    pub page_token: std::string::String,
2719
2720    /// A filter expression that matches resources returned in the response.
2721    /// The expression must specify the field name, a comparison
2722    /// operator, and the value that you want to use for filtering. The value
2723    /// must be a string, a number, or a boolean. The comparison operator
2724    /// must be `=`, `!=`, `>`, or `<`.
2725    ///
2726    /// For example, if you are filtering a list of external access rules, you can
2727    /// exclude the ones named `example-rule` by specifying
2728    /// `name != "example-rule"`.
2729    ///
2730    /// To filter on multiple expressions, provide each separate expression within
2731    /// parentheses. For example:
2732    ///
2733    /// ```norust
2734    /// (name = "example-rule")
2735    /// (createTime > "2021-04-12T08:15:10.40Z")
2736    /// ```
2737    ///
2738    /// By default, each expression is an `AND` expression. However, you
2739    /// can include `AND` and `OR` expressions explicitly.
2740    /// For example:
2741    ///
2742    /// ```norust
2743    /// (name = "example-rule-1") AND
2744    /// (createTime > "2021-04-12T08:15:10.40Z") OR
2745    /// (name = "example-rule-2")
2746    /// ```
2747    pub filter: std::string::String,
2748
2749    /// Sorts list results by a certain order. By default, returned results
2750    /// are ordered by `name` in ascending order.
2751    /// You can also sort results in descending order based on the `name` value
2752    /// using `orderBy="name desc"`.
2753    /// Currently, only ordering by `name` is supported.
2754    pub order_by: std::string::String,
2755
2756    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2757}
2758
2759impl ListExternalAccessRulesRequest {
2760    /// Creates a new default instance.
2761    pub fn new() -> Self {
2762        std::default::Default::default()
2763    }
2764
2765    /// Sets the value of [parent][crate::model::ListExternalAccessRulesRequest::parent].
2766    ///
2767    /// # Example
2768    /// ```ignore,no_run
2769    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesRequest;
2770    /// # let project_id = "project_id";
2771    /// # let location_id = "location_id";
2772    /// # let network_policy_id = "network_policy_id";
2773    /// let x = ListExternalAccessRulesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}"));
2774    /// ```
2775    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2776        self.parent = v.into();
2777        self
2778    }
2779
2780    /// Sets the value of [page_size][crate::model::ListExternalAccessRulesRequest::page_size].
2781    ///
2782    /// # Example
2783    /// ```ignore,no_run
2784    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesRequest;
2785    /// let x = ListExternalAccessRulesRequest::new().set_page_size(42);
2786    /// ```
2787    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2788        self.page_size = v.into();
2789        self
2790    }
2791
2792    /// Sets the value of [page_token][crate::model::ListExternalAccessRulesRequest::page_token].
2793    ///
2794    /// # Example
2795    /// ```ignore,no_run
2796    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesRequest;
2797    /// let x = ListExternalAccessRulesRequest::new().set_page_token("example");
2798    /// ```
2799    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2800        self.page_token = v.into();
2801        self
2802    }
2803
2804    /// Sets the value of [filter][crate::model::ListExternalAccessRulesRequest::filter].
2805    ///
2806    /// # Example
2807    /// ```ignore,no_run
2808    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesRequest;
2809    /// let x = ListExternalAccessRulesRequest::new().set_filter("example");
2810    /// ```
2811    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2812        self.filter = v.into();
2813        self
2814    }
2815
2816    /// Sets the value of [order_by][crate::model::ListExternalAccessRulesRequest::order_by].
2817    ///
2818    /// # Example
2819    /// ```ignore,no_run
2820    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesRequest;
2821    /// let x = ListExternalAccessRulesRequest::new().set_order_by("example");
2822    /// ```
2823    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2824        self.order_by = v.into();
2825        self
2826    }
2827}
2828
2829impl wkt::message::Message for ListExternalAccessRulesRequest {
2830    fn typename() -> &'static str {
2831        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest"
2832    }
2833}
2834
2835/// Response message for
2836/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
2837///
2838/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
2839#[derive(Clone, Default, PartialEq)]
2840#[non_exhaustive]
2841pub struct ListExternalAccessRulesResponse {
2842    /// A list of external access firewall rules.
2843    pub external_access_rules: std::vec::Vec<crate::model::ExternalAccessRule>,
2844
2845    /// A token, which can be sent as `page_token` to retrieve the next page.
2846    /// If this field is omitted, there are no subsequent pages.
2847    pub next_page_token: std::string::String,
2848
2849    /// Locations that could not be reached when making an aggregated query using
2850    /// wildcards.
2851    pub unreachable: std::vec::Vec<std::string::String>,
2852
2853    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2854}
2855
2856impl ListExternalAccessRulesResponse {
2857    /// Creates a new default instance.
2858    pub fn new() -> Self {
2859        std::default::Default::default()
2860    }
2861
2862    /// Sets the value of [external_access_rules][crate::model::ListExternalAccessRulesResponse::external_access_rules].
2863    ///
2864    /// # Example
2865    /// ```ignore,no_run
2866    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesResponse;
2867    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
2868    /// let x = ListExternalAccessRulesResponse::new()
2869    ///     .set_external_access_rules([
2870    ///         ExternalAccessRule::default()/* use setters */,
2871    ///         ExternalAccessRule::default()/* use (different) setters */,
2872    ///     ]);
2873    /// ```
2874    pub fn set_external_access_rules<T, V>(mut self, v: T) -> Self
2875    where
2876        T: std::iter::IntoIterator<Item = V>,
2877        V: std::convert::Into<crate::model::ExternalAccessRule>,
2878    {
2879        use std::iter::Iterator;
2880        self.external_access_rules = v.into_iter().map(|i| i.into()).collect();
2881        self
2882    }
2883
2884    /// Sets the value of [next_page_token][crate::model::ListExternalAccessRulesResponse::next_page_token].
2885    ///
2886    /// # Example
2887    /// ```ignore,no_run
2888    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesResponse;
2889    /// let x = ListExternalAccessRulesResponse::new().set_next_page_token("example");
2890    /// ```
2891    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2892        self.next_page_token = v.into();
2893        self
2894    }
2895
2896    /// Sets the value of [unreachable][crate::model::ListExternalAccessRulesResponse::unreachable].
2897    ///
2898    /// # Example
2899    /// ```ignore,no_run
2900    /// # use google_cloud_vmwareengine_v1::model::ListExternalAccessRulesResponse;
2901    /// let x = ListExternalAccessRulesResponse::new().set_unreachable(["a", "b", "c"]);
2902    /// ```
2903    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2904    where
2905        T: std::iter::IntoIterator<Item = V>,
2906        V: std::convert::Into<std::string::String>,
2907    {
2908        use std::iter::Iterator;
2909        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2910        self
2911    }
2912}
2913
2914impl wkt::message::Message for ListExternalAccessRulesResponse {
2915    fn typename() -> &'static str {
2916        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesResponse"
2917    }
2918}
2919
2920#[doc(hidden)]
2921impl google_cloud_gax::paginator::internal::PageableResponse for ListExternalAccessRulesResponse {
2922    type PageItem = crate::model::ExternalAccessRule;
2923
2924    fn items(self) -> std::vec::Vec<Self::PageItem> {
2925        self.external_access_rules
2926    }
2927
2928    fn next_page_token(&self) -> std::string::String {
2929        use std::clone::Clone;
2930        self.next_page_token.clone()
2931    }
2932}
2933
2934/// Request message for
2935/// [VmwareEngine.GetExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]
2936///
2937/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]: crate::client::VmwareEngine::get_external_access_rule
2938#[derive(Clone, Default, PartialEq)]
2939#[non_exhaustive]
2940pub struct GetExternalAccessRuleRequest {
2941    /// Required. The resource name of the external access firewall rule to
2942    /// retrieve. Resource names are schemeless URIs that follow the conventions in
2943    /// <https://cloud.google.com/apis/design/resource_names>.
2944    /// For example:
2945    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
2946    pub name: std::string::String,
2947
2948    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2949}
2950
2951impl GetExternalAccessRuleRequest {
2952    /// Creates a new default instance.
2953    pub fn new() -> Self {
2954        std::default::Default::default()
2955    }
2956
2957    /// Sets the value of [name][crate::model::GetExternalAccessRuleRequest::name].
2958    ///
2959    /// # Example
2960    /// ```ignore,no_run
2961    /// # use google_cloud_vmwareengine_v1::model::GetExternalAccessRuleRequest;
2962    /// # let project_id = "project_id";
2963    /// # let location_id = "location_id";
2964    /// # let network_policy_id = "network_policy_id";
2965    /// # let external_access_rule_id = "external_access_rule_id";
2966    /// let x = GetExternalAccessRuleRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}/externalAccessRules/{external_access_rule_id}"));
2967    /// ```
2968    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2969        self.name = v.into();
2970        self
2971    }
2972}
2973
2974impl wkt::message::Message for GetExternalAccessRuleRequest {
2975    fn typename() -> &'static str {
2976        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest"
2977    }
2978}
2979
2980/// Request message for
2981/// [VmwareEngine.CreateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]
2982///
2983/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]: crate::client::VmwareEngine::create_external_access_rule
2984#[derive(Clone, Default, PartialEq)]
2985#[non_exhaustive]
2986pub struct CreateExternalAccessRuleRequest {
2987    /// Required. The resource name of the network policy
2988    /// to create a new external access firewall rule in.
2989    /// Resource names are schemeless URIs that follow the conventions in
2990    /// <https://cloud.google.com/apis/design/resource_names>.
2991    /// For example:
2992    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
2993    pub parent: std::string::String,
2994
2995    /// Required. The initial description of a new external access rule.
2996    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2997
2998    /// Required. The user-provided identifier of the `ExternalAccessRule` to be
2999    /// created. This identifier must be unique among `ExternalAccessRule`
3000    /// resources within the parent and becomes the final token in the name URI.
3001    /// The identifier must meet the following requirements:
3002    ///
3003    /// * Only contains 1-63 alphanumeric characters and hyphens
3004    /// * Begins with an alphabetical character
3005    /// * Ends with a non-hyphen character
3006    /// * Not formatted as a UUID
3007    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
3008    ///   (section 3.5)
3009    pub external_access_rule_id: std::string::String,
3010
3011    /// A request ID to identify requests. Specify a unique request ID
3012    /// so that if you must retry your request, the server will know to ignore
3013    /// the request if it has already been completed. The server guarantees that a
3014    /// request doesn't result in creation of duplicate commitments for at least 60
3015    /// minutes.
3016    ///
3017    /// For example, consider a situation where you make an initial request and the
3018    /// request times out. If you make the request again with the same request ID,
3019    /// the server can check if the original operation with the same request ID was
3020    /// received, and if so, will ignore the second request. This prevents clients
3021    /// from accidentally creating duplicate commitments.
3022    ///
3023    /// The request ID must be a valid UUID with the exception that zero UUID is
3024    /// not supported (00000000-0000-0000-0000-000000000000).
3025    pub request_id: std::string::String,
3026
3027    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3028}
3029
3030impl CreateExternalAccessRuleRequest {
3031    /// Creates a new default instance.
3032    pub fn new() -> Self {
3033        std::default::Default::default()
3034    }
3035
3036    /// Sets the value of [parent][crate::model::CreateExternalAccessRuleRequest::parent].
3037    ///
3038    /// # Example
3039    /// ```ignore,no_run
3040    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAccessRuleRequest;
3041    /// # let project_id = "project_id";
3042    /// # let location_id = "location_id";
3043    /// # let network_policy_id = "network_policy_id";
3044    /// let x = CreateExternalAccessRuleRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}"));
3045    /// ```
3046    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3047        self.parent = v.into();
3048        self
3049    }
3050
3051    /// Sets the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
3052    ///
3053    /// # Example
3054    /// ```ignore,no_run
3055    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAccessRuleRequest;
3056    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
3057    /// let x = CreateExternalAccessRuleRequest::new().set_external_access_rule(ExternalAccessRule::default()/* use setters */);
3058    /// ```
3059    pub fn set_external_access_rule<T>(mut self, v: T) -> Self
3060    where
3061        T: std::convert::Into<crate::model::ExternalAccessRule>,
3062    {
3063        self.external_access_rule = std::option::Option::Some(v.into());
3064        self
3065    }
3066
3067    /// Sets or clears the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
3068    ///
3069    /// # Example
3070    /// ```ignore,no_run
3071    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAccessRuleRequest;
3072    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
3073    /// let x = CreateExternalAccessRuleRequest::new().set_or_clear_external_access_rule(Some(ExternalAccessRule::default()/* use setters */));
3074    /// let x = CreateExternalAccessRuleRequest::new().set_or_clear_external_access_rule(None::<ExternalAccessRule>);
3075    /// ```
3076    pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
3077    where
3078        T: std::convert::Into<crate::model::ExternalAccessRule>,
3079    {
3080        self.external_access_rule = v.map(|x| x.into());
3081        self
3082    }
3083
3084    /// Sets the value of [external_access_rule_id][crate::model::CreateExternalAccessRuleRequest::external_access_rule_id].
3085    ///
3086    /// # Example
3087    /// ```ignore,no_run
3088    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAccessRuleRequest;
3089    /// let x = CreateExternalAccessRuleRequest::new().set_external_access_rule_id("example");
3090    /// ```
3091    pub fn set_external_access_rule_id<T: std::convert::Into<std::string::String>>(
3092        mut self,
3093        v: T,
3094    ) -> Self {
3095        self.external_access_rule_id = v.into();
3096        self
3097    }
3098
3099    /// Sets the value of [request_id][crate::model::CreateExternalAccessRuleRequest::request_id].
3100    ///
3101    /// # Example
3102    /// ```ignore,no_run
3103    /// # use google_cloud_vmwareengine_v1::model::CreateExternalAccessRuleRequest;
3104    /// let x = CreateExternalAccessRuleRequest::new().set_request_id("example");
3105    /// ```
3106    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3107        self.request_id = v.into();
3108        self
3109    }
3110}
3111
3112impl wkt::message::Message for CreateExternalAccessRuleRequest {
3113    fn typename() -> &'static str {
3114        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest"
3115    }
3116}
3117
3118/// Request message for
3119/// [VmwareEngine.UpdateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]
3120///
3121/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]: crate::client::VmwareEngine::update_external_access_rule
3122#[derive(Clone, Default, PartialEq)]
3123#[non_exhaustive]
3124pub struct UpdateExternalAccessRuleRequest {
3125    /// Required. Field mask is used to specify the fields to be overwritten in the
3126    /// `ExternalAccessRule` resource by the update.
3127    /// The fields specified in the `update_mask` are relative to the resource, not
3128    /// the full request. A field will be overwritten if it is in the mask. If the
3129    /// user does not provide a mask then all fields will be overwritten.
3130    pub update_mask: std::option::Option<wkt::FieldMask>,
3131
3132    /// Required. Description of the external access rule.
3133    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
3134
3135    /// Optional. A request ID to identify requests. Specify a unique request ID
3136    /// so that if you must retry your request, the server will know to ignore
3137    /// the request if it has already been completed. The server guarantees that a
3138    /// request doesn't result in creation of duplicate commitments for at least 60
3139    /// minutes.
3140    ///
3141    /// For example, consider a situation where you make an initial request and the
3142    /// request times out. If you make the request again with the same request ID,
3143    /// the server can check if the original operation with the same request ID was
3144    /// received, and if so, will ignore the second request. This prevents clients
3145    /// from accidentally creating duplicate commitments.
3146    ///
3147    /// The request ID must be a valid UUID with the exception that zero UUID is
3148    /// not supported (00000000-0000-0000-0000-000000000000).
3149    pub request_id: std::string::String,
3150
3151    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3152}
3153
3154impl UpdateExternalAccessRuleRequest {
3155    /// Creates a new default instance.
3156    pub fn new() -> Self {
3157        std::default::Default::default()
3158    }
3159
3160    /// Sets the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
3161    ///
3162    /// # Example
3163    /// ```ignore,no_run
3164    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAccessRuleRequest;
3165    /// use wkt::FieldMask;
3166    /// let x = UpdateExternalAccessRuleRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3167    /// ```
3168    pub fn set_update_mask<T>(mut self, v: T) -> Self
3169    where
3170        T: std::convert::Into<wkt::FieldMask>,
3171    {
3172        self.update_mask = std::option::Option::Some(v.into());
3173        self
3174    }
3175
3176    /// Sets or clears the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
3177    ///
3178    /// # Example
3179    /// ```ignore,no_run
3180    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAccessRuleRequest;
3181    /// use wkt::FieldMask;
3182    /// let x = UpdateExternalAccessRuleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3183    /// let x = UpdateExternalAccessRuleRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3184    /// ```
3185    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3186    where
3187        T: std::convert::Into<wkt::FieldMask>,
3188    {
3189        self.update_mask = v.map(|x| x.into());
3190        self
3191    }
3192
3193    /// Sets the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
3194    ///
3195    /// # Example
3196    /// ```ignore,no_run
3197    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAccessRuleRequest;
3198    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
3199    /// let x = UpdateExternalAccessRuleRequest::new().set_external_access_rule(ExternalAccessRule::default()/* use setters */);
3200    /// ```
3201    pub fn set_external_access_rule<T>(mut self, v: T) -> Self
3202    where
3203        T: std::convert::Into<crate::model::ExternalAccessRule>,
3204    {
3205        self.external_access_rule = std::option::Option::Some(v.into());
3206        self
3207    }
3208
3209    /// Sets or clears the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
3210    ///
3211    /// # Example
3212    /// ```ignore,no_run
3213    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAccessRuleRequest;
3214    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
3215    /// let x = UpdateExternalAccessRuleRequest::new().set_or_clear_external_access_rule(Some(ExternalAccessRule::default()/* use setters */));
3216    /// let x = UpdateExternalAccessRuleRequest::new().set_or_clear_external_access_rule(None::<ExternalAccessRule>);
3217    /// ```
3218    pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
3219    where
3220        T: std::convert::Into<crate::model::ExternalAccessRule>,
3221    {
3222        self.external_access_rule = v.map(|x| x.into());
3223        self
3224    }
3225
3226    /// Sets the value of [request_id][crate::model::UpdateExternalAccessRuleRequest::request_id].
3227    ///
3228    /// # Example
3229    /// ```ignore,no_run
3230    /// # use google_cloud_vmwareengine_v1::model::UpdateExternalAccessRuleRequest;
3231    /// let x = UpdateExternalAccessRuleRequest::new().set_request_id("example");
3232    /// ```
3233    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3234        self.request_id = v.into();
3235        self
3236    }
3237}
3238
3239impl wkt::message::Message for UpdateExternalAccessRuleRequest {
3240    fn typename() -> &'static str {
3241        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest"
3242    }
3243}
3244
3245/// Request message for
3246/// [VmwareEngine.DeleteExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]
3247///
3248/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]: crate::client::VmwareEngine::delete_external_access_rule
3249#[derive(Clone, Default, PartialEq)]
3250#[non_exhaustive]
3251pub struct DeleteExternalAccessRuleRequest {
3252    /// Required. The resource name of the external access firewall rule to delete.
3253    /// Resource names are schemeless URIs that follow the conventions in
3254    /// <https://cloud.google.com/apis/design/resource_names>.
3255    /// For example:
3256    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
3257    pub name: std::string::String,
3258
3259    /// Optional. A request ID to identify requests. Specify a unique request ID
3260    /// so that if you must retry your request, the server will know to ignore
3261    /// the request if it has already been completed. The server guarantees that a
3262    /// request doesn't result in creation of duplicate commitments for at least 60
3263    /// minutes.
3264    ///
3265    /// For example, consider a situation where you make an initial request and the
3266    /// request times out. If you make the request again with the same request
3267    /// ID, the server can check if the original operation with the same request ID
3268    /// was received, and if so, will ignore the second request. This prevents
3269    /// clients from accidentally creating duplicate commitments.
3270    ///
3271    /// The request ID must be a valid UUID with the exception that zero UUID is
3272    /// not supported (00000000-0000-0000-0000-000000000000).
3273    pub request_id: std::string::String,
3274
3275    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3276}
3277
3278impl DeleteExternalAccessRuleRequest {
3279    /// Creates a new default instance.
3280    pub fn new() -> Self {
3281        std::default::Default::default()
3282    }
3283
3284    /// Sets the value of [name][crate::model::DeleteExternalAccessRuleRequest::name].
3285    ///
3286    /// # Example
3287    /// ```ignore,no_run
3288    /// # use google_cloud_vmwareengine_v1::model::DeleteExternalAccessRuleRequest;
3289    /// # let project_id = "project_id";
3290    /// # let location_id = "location_id";
3291    /// # let network_policy_id = "network_policy_id";
3292    /// # let external_access_rule_id = "external_access_rule_id";
3293    /// let x = DeleteExternalAccessRuleRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}/externalAccessRules/{external_access_rule_id}"));
3294    /// ```
3295    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3296        self.name = v.into();
3297        self
3298    }
3299
3300    /// Sets the value of [request_id][crate::model::DeleteExternalAccessRuleRequest::request_id].
3301    ///
3302    /// # Example
3303    /// ```ignore,no_run
3304    /// # use google_cloud_vmwareengine_v1::model::DeleteExternalAccessRuleRequest;
3305    /// let x = DeleteExternalAccessRuleRequest::new().set_request_id("example");
3306    /// ```
3307    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3308        self.request_id = v.into();
3309        self
3310    }
3311}
3312
3313impl wkt::message::Message for DeleteExternalAccessRuleRequest {
3314    fn typename() -> &'static str {
3315        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest"
3316    }
3317}
3318
3319/// Request message for
3320/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
3321///
3322/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
3323#[derive(Clone, Default, PartialEq)]
3324#[non_exhaustive]
3325pub struct ListLoggingServersRequest {
3326    /// Required. The resource name of the private cloud to be queried for
3327    /// logging servers.
3328    /// Resource names are schemeless URIs that follow the conventions in
3329    /// <https://cloud.google.com/apis/design/resource_names>.
3330    /// For example:
3331    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3332    pub parent: std::string::String,
3333
3334    /// The maximum number of logging servers to return in one page.
3335    /// The service may return fewer than this value.
3336    /// The maximum value is coerced to 1000.
3337    /// The default value of this field is 500.
3338    pub page_size: i32,
3339
3340    /// A page token, received from a previous `ListLoggingServersRequest` call.
3341    /// Provide this to retrieve the subsequent page.
3342    ///
3343    /// When paginating, all other parameters provided to
3344    /// `ListLoggingServersRequest` must match the call that provided the page
3345    /// token.
3346    pub page_token: std::string::String,
3347
3348    /// A filter expression that matches resources returned in the response.
3349    /// The expression must specify the field name, a comparison
3350    /// operator, and the value that you want to use for filtering. The value
3351    /// must be a string, a number, or a boolean. The comparison operator
3352    /// must be `=`, `!=`, `>`, or `<`.
3353    ///
3354    /// For example, if you are filtering a list of logging servers, you can
3355    /// exclude the ones named `example-server` by specifying
3356    /// `name != "example-server"`.
3357    ///
3358    /// To filter on multiple expressions, provide each separate expression within
3359    /// parentheses. For example:
3360    ///
3361    /// ```norust
3362    /// (name = "example-server")
3363    /// (createTime > "2021-04-12T08:15:10.40Z")
3364    /// ```
3365    ///
3366    /// By default, each expression is an `AND` expression. However, you
3367    /// can include `AND` and `OR` expressions explicitly.
3368    /// For example:
3369    ///
3370    /// ```norust
3371    /// (name = "example-server-1") AND
3372    /// (createTime > "2021-04-12T08:15:10.40Z") OR
3373    /// (name = "example-server-2")
3374    /// ```
3375    pub filter: std::string::String,
3376
3377    /// Sorts list results by a certain order. By default, returned results
3378    /// are ordered by `name` in ascending order.
3379    /// You can also sort results in descending order based on the `name` value
3380    /// using `orderBy="name desc"`.
3381    /// Currently, only ordering by `name` is supported.
3382    pub order_by: std::string::String,
3383
3384    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3385}
3386
3387impl ListLoggingServersRequest {
3388    /// Creates a new default instance.
3389    pub fn new() -> Self {
3390        std::default::Default::default()
3391    }
3392
3393    /// Sets the value of [parent][crate::model::ListLoggingServersRequest::parent].
3394    ///
3395    /// # Example
3396    /// ```ignore,no_run
3397    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersRequest;
3398    /// # let project_id = "project_id";
3399    /// # let location_id = "location_id";
3400    /// # let private_cloud_id = "private_cloud_id";
3401    /// let x = ListLoggingServersRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
3402    /// ```
3403    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3404        self.parent = v.into();
3405        self
3406    }
3407
3408    /// Sets the value of [page_size][crate::model::ListLoggingServersRequest::page_size].
3409    ///
3410    /// # Example
3411    /// ```ignore,no_run
3412    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersRequest;
3413    /// let x = ListLoggingServersRequest::new().set_page_size(42);
3414    /// ```
3415    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3416        self.page_size = v.into();
3417        self
3418    }
3419
3420    /// Sets the value of [page_token][crate::model::ListLoggingServersRequest::page_token].
3421    ///
3422    /// # Example
3423    /// ```ignore,no_run
3424    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersRequest;
3425    /// let x = ListLoggingServersRequest::new().set_page_token("example");
3426    /// ```
3427    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3428        self.page_token = v.into();
3429        self
3430    }
3431
3432    /// Sets the value of [filter][crate::model::ListLoggingServersRequest::filter].
3433    ///
3434    /// # Example
3435    /// ```ignore,no_run
3436    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersRequest;
3437    /// let x = ListLoggingServersRequest::new().set_filter("example");
3438    /// ```
3439    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3440        self.filter = v.into();
3441        self
3442    }
3443
3444    /// Sets the value of [order_by][crate::model::ListLoggingServersRequest::order_by].
3445    ///
3446    /// # Example
3447    /// ```ignore,no_run
3448    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersRequest;
3449    /// let x = ListLoggingServersRequest::new().set_order_by("example");
3450    /// ```
3451    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3452        self.order_by = v.into();
3453        self
3454    }
3455}
3456
3457impl wkt::message::Message for ListLoggingServersRequest {
3458    fn typename() -> &'static str {
3459        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersRequest"
3460    }
3461}
3462
3463/// Response message for
3464/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
3465///
3466/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
3467#[derive(Clone, Default, PartialEq)]
3468#[non_exhaustive]
3469pub struct ListLoggingServersResponse {
3470    /// A list of Logging Servers.
3471    pub logging_servers: std::vec::Vec<crate::model::LoggingServer>,
3472
3473    /// A token, which can be send as `page_token` to retrieve the next page.
3474    /// If this field is omitted, there are no subsequent pages.
3475    pub next_page_token: std::string::String,
3476
3477    /// Locations that could not be reached when making an aggregated query using
3478    /// wildcards.
3479    pub unreachable: std::vec::Vec<std::string::String>,
3480
3481    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3482}
3483
3484impl ListLoggingServersResponse {
3485    /// Creates a new default instance.
3486    pub fn new() -> Self {
3487        std::default::Default::default()
3488    }
3489
3490    /// Sets the value of [logging_servers][crate::model::ListLoggingServersResponse::logging_servers].
3491    ///
3492    /// # Example
3493    /// ```ignore,no_run
3494    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersResponse;
3495    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
3496    /// let x = ListLoggingServersResponse::new()
3497    ///     .set_logging_servers([
3498    ///         LoggingServer::default()/* use setters */,
3499    ///         LoggingServer::default()/* use (different) setters */,
3500    ///     ]);
3501    /// ```
3502    pub fn set_logging_servers<T, V>(mut self, v: T) -> Self
3503    where
3504        T: std::iter::IntoIterator<Item = V>,
3505        V: std::convert::Into<crate::model::LoggingServer>,
3506    {
3507        use std::iter::Iterator;
3508        self.logging_servers = v.into_iter().map(|i| i.into()).collect();
3509        self
3510    }
3511
3512    /// Sets the value of [next_page_token][crate::model::ListLoggingServersResponse::next_page_token].
3513    ///
3514    /// # Example
3515    /// ```ignore,no_run
3516    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersResponse;
3517    /// let x = ListLoggingServersResponse::new().set_next_page_token("example");
3518    /// ```
3519    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3520        self.next_page_token = v.into();
3521        self
3522    }
3523
3524    /// Sets the value of [unreachable][crate::model::ListLoggingServersResponse::unreachable].
3525    ///
3526    /// # Example
3527    /// ```ignore,no_run
3528    /// # use google_cloud_vmwareengine_v1::model::ListLoggingServersResponse;
3529    /// let x = ListLoggingServersResponse::new().set_unreachable(["a", "b", "c"]);
3530    /// ```
3531    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3532    where
3533        T: std::iter::IntoIterator<Item = V>,
3534        V: std::convert::Into<std::string::String>,
3535    {
3536        use std::iter::Iterator;
3537        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3538        self
3539    }
3540}
3541
3542impl wkt::message::Message for ListLoggingServersResponse {
3543    fn typename() -> &'static str {
3544        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersResponse"
3545    }
3546}
3547
3548#[doc(hidden)]
3549impl google_cloud_gax::paginator::internal::PageableResponse for ListLoggingServersResponse {
3550    type PageItem = crate::model::LoggingServer;
3551
3552    fn items(self) -> std::vec::Vec<Self::PageItem> {
3553        self.logging_servers
3554    }
3555
3556    fn next_page_token(&self) -> std::string::String {
3557        use std::clone::Clone;
3558        self.next_page_token.clone()
3559    }
3560}
3561
3562/// Request message for
3563/// [VmwareEngine.GetLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]
3564///
3565/// [google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]: crate::client::VmwareEngine::get_logging_server
3566#[derive(Clone, Default, PartialEq)]
3567#[non_exhaustive]
3568pub struct GetLoggingServerRequest {
3569    /// Required. The resource name of the Logging Server to retrieve.
3570    /// Resource names are schemeless URIs that follow the conventions in
3571    /// <https://cloud.google.com/apis/design/resource_names>.
3572    /// For example:
3573    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
3574    pub name: std::string::String,
3575
3576    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3577}
3578
3579impl GetLoggingServerRequest {
3580    /// Creates a new default instance.
3581    pub fn new() -> Self {
3582        std::default::Default::default()
3583    }
3584
3585    /// Sets the value of [name][crate::model::GetLoggingServerRequest::name].
3586    ///
3587    /// # Example
3588    /// ```ignore,no_run
3589    /// # use google_cloud_vmwareengine_v1::model::GetLoggingServerRequest;
3590    /// # let project_id = "project_id";
3591    /// # let location_id = "location_id";
3592    /// # let private_cloud_id = "private_cloud_id";
3593    /// # let logging_server_id = "logging_server_id";
3594    /// let x = GetLoggingServerRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/loggingServers/{logging_server_id}"));
3595    /// ```
3596    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3597        self.name = v.into();
3598        self
3599    }
3600}
3601
3602impl wkt::message::Message for GetLoggingServerRequest {
3603    fn typename() -> &'static str {
3604        "type.googleapis.com/google.cloud.vmwareengine.v1.GetLoggingServerRequest"
3605    }
3606}
3607
3608/// Request message for
3609/// [VmwareEngine.CreateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]
3610///
3611/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]: crate::client::VmwareEngine::create_logging_server
3612#[derive(Clone, Default, PartialEq)]
3613#[non_exhaustive]
3614pub struct CreateLoggingServerRequest {
3615    /// Required. The resource name of the private cloud
3616    /// to create a new Logging Server in.
3617    /// Resource names are schemeless URIs that follow the conventions in
3618    /// <https://cloud.google.com/apis/design/resource_names>.
3619    /// For example:
3620    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3621    pub parent: std::string::String,
3622
3623    /// Required. The initial description of a new logging server.
3624    pub logging_server: std::option::Option<crate::model::LoggingServer>,
3625
3626    /// Required. The user-provided identifier of the `LoggingServer` to be
3627    /// created. This identifier must be unique among `LoggingServer` resources
3628    /// within the parent and becomes the final token in the name URI.
3629    /// The identifier must meet the following requirements:
3630    ///
3631    /// * Only contains 1-63 alphanumeric characters and hyphens
3632    /// * Begins with an alphabetical character
3633    /// * Ends with a non-hyphen character
3634    /// * Not formatted as a UUID
3635    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
3636    ///   (section 3.5)
3637    pub logging_server_id: std::string::String,
3638
3639    /// Optional. A request ID to identify requests. Specify a unique request ID
3640    /// so that if you must retry your request, the server will know to ignore
3641    /// the request if it has already been completed. The server guarantees that a
3642    /// request doesn't result in creation of duplicate commitments for at least 60
3643    /// minutes.
3644    ///
3645    /// For example, consider a situation where you make an initial request and the
3646    /// request times out. If you make the request again with the same request ID,
3647    /// the server can check if original operation with the same request ID was
3648    /// received, and if so, will ignore the second request. This prevents clients
3649    /// from accidentally creating duplicate commitments.
3650    ///
3651    /// The request ID must be a valid UUID with the exception that zero UUID is
3652    /// not supported (00000000-0000-0000-0000-000000000000).
3653    pub request_id: std::string::String,
3654
3655    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3656}
3657
3658impl CreateLoggingServerRequest {
3659    /// Creates a new default instance.
3660    pub fn new() -> Self {
3661        std::default::Default::default()
3662    }
3663
3664    /// Sets the value of [parent][crate::model::CreateLoggingServerRequest::parent].
3665    ///
3666    /// # Example
3667    /// ```ignore,no_run
3668    /// # use google_cloud_vmwareengine_v1::model::CreateLoggingServerRequest;
3669    /// # let project_id = "project_id";
3670    /// # let location_id = "location_id";
3671    /// # let private_cloud_id = "private_cloud_id";
3672    /// let x = CreateLoggingServerRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
3673    /// ```
3674    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3675        self.parent = v.into();
3676        self
3677    }
3678
3679    /// Sets the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
3680    ///
3681    /// # Example
3682    /// ```ignore,no_run
3683    /// # use google_cloud_vmwareengine_v1::model::CreateLoggingServerRequest;
3684    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
3685    /// let x = CreateLoggingServerRequest::new().set_logging_server(LoggingServer::default()/* use setters */);
3686    /// ```
3687    pub fn set_logging_server<T>(mut self, v: T) -> Self
3688    where
3689        T: std::convert::Into<crate::model::LoggingServer>,
3690    {
3691        self.logging_server = std::option::Option::Some(v.into());
3692        self
3693    }
3694
3695    /// Sets or clears the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
3696    ///
3697    /// # Example
3698    /// ```ignore,no_run
3699    /// # use google_cloud_vmwareengine_v1::model::CreateLoggingServerRequest;
3700    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
3701    /// let x = CreateLoggingServerRequest::new().set_or_clear_logging_server(Some(LoggingServer::default()/* use setters */));
3702    /// let x = CreateLoggingServerRequest::new().set_or_clear_logging_server(None::<LoggingServer>);
3703    /// ```
3704    pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3705    where
3706        T: std::convert::Into<crate::model::LoggingServer>,
3707    {
3708        self.logging_server = v.map(|x| x.into());
3709        self
3710    }
3711
3712    /// Sets the value of [logging_server_id][crate::model::CreateLoggingServerRequest::logging_server_id].
3713    ///
3714    /// # Example
3715    /// ```ignore,no_run
3716    /// # use google_cloud_vmwareengine_v1::model::CreateLoggingServerRequest;
3717    /// let x = CreateLoggingServerRequest::new().set_logging_server_id("example");
3718    /// ```
3719    pub fn set_logging_server_id<T: std::convert::Into<std::string::String>>(
3720        mut self,
3721        v: T,
3722    ) -> Self {
3723        self.logging_server_id = v.into();
3724        self
3725    }
3726
3727    /// Sets the value of [request_id][crate::model::CreateLoggingServerRequest::request_id].
3728    ///
3729    /// # Example
3730    /// ```ignore,no_run
3731    /// # use google_cloud_vmwareengine_v1::model::CreateLoggingServerRequest;
3732    /// let x = CreateLoggingServerRequest::new().set_request_id("example");
3733    /// ```
3734    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3735        self.request_id = v.into();
3736        self
3737    }
3738}
3739
3740impl wkt::message::Message for CreateLoggingServerRequest {
3741    fn typename() -> &'static str {
3742        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateLoggingServerRequest"
3743    }
3744}
3745
3746/// Request message for
3747/// [VmwareEngine.UpdateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]
3748///
3749/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]: crate::client::VmwareEngine::update_logging_server
3750#[derive(Clone, Default, PartialEq)]
3751#[non_exhaustive]
3752pub struct UpdateLoggingServerRequest {
3753    /// Required. Field mask is used to specify the fields to be overwritten in the
3754    /// `LoggingServer` resource by the update.
3755    /// The fields specified in the `update_mask` are relative to the resource, not
3756    /// the full request. A field will be overwritten if it is in the mask. If the
3757    /// user does not provide a mask then all fields will be overwritten.
3758    pub update_mask: std::option::Option<wkt::FieldMask>,
3759
3760    /// Required. Logging server description.
3761    pub logging_server: std::option::Option<crate::model::LoggingServer>,
3762
3763    /// Optional. A request ID to identify requests. Specify a unique request ID
3764    /// so that if you must retry your request, the server will know to ignore
3765    /// the request if it has already been completed. The server guarantees that a
3766    /// request doesn't result in creation of duplicate commitments for at least 60
3767    /// minutes.
3768    ///
3769    /// For example, consider a situation where you make an initial request and the
3770    /// request times out. If you make the request again with the same request ID,
3771    /// the server can check if original operation with the same request ID was
3772    /// received, and if so, will ignore the second request. This prevents clients
3773    /// from accidentally creating duplicate commitments.
3774    ///
3775    /// The request ID must be a valid UUID with the exception that zero UUID is
3776    /// not supported (00000000-0000-0000-0000-000000000000).
3777    pub request_id: std::string::String,
3778
3779    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3780}
3781
3782impl UpdateLoggingServerRequest {
3783    /// Creates a new default instance.
3784    pub fn new() -> Self {
3785        std::default::Default::default()
3786    }
3787
3788    /// Sets the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
3789    ///
3790    /// # Example
3791    /// ```ignore,no_run
3792    /// # use google_cloud_vmwareengine_v1::model::UpdateLoggingServerRequest;
3793    /// use wkt::FieldMask;
3794    /// let x = UpdateLoggingServerRequest::new().set_update_mask(FieldMask::default()/* use setters */);
3795    /// ```
3796    pub fn set_update_mask<T>(mut self, v: T) -> Self
3797    where
3798        T: std::convert::Into<wkt::FieldMask>,
3799    {
3800        self.update_mask = std::option::Option::Some(v.into());
3801        self
3802    }
3803
3804    /// Sets or clears the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
3805    ///
3806    /// # Example
3807    /// ```ignore,no_run
3808    /// # use google_cloud_vmwareengine_v1::model::UpdateLoggingServerRequest;
3809    /// use wkt::FieldMask;
3810    /// let x = UpdateLoggingServerRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
3811    /// let x = UpdateLoggingServerRequest::new().set_or_clear_update_mask(None::<FieldMask>);
3812    /// ```
3813    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3814    where
3815        T: std::convert::Into<wkt::FieldMask>,
3816    {
3817        self.update_mask = v.map(|x| x.into());
3818        self
3819    }
3820
3821    /// Sets the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
3822    ///
3823    /// # Example
3824    /// ```ignore,no_run
3825    /// # use google_cloud_vmwareengine_v1::model::UpdateLoggingServerRequest;
3826    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
3827    /// let x = UpdateLoggingServerRequest::new().set_logging_server(LoggingServer::default()/* use setters */);
3828    /// ```
3829    pub fn set_logging_server<T>(mut self, v: T) -> Self
3830    where
3831        T: std::convert::Into<crate::model::LoggingServer>,
3832    {
3833        self.logging_server = std::option::Option::Some(v.into());
3834        self
3835    }
3836
3837    /// Sets or clears the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
3838    ///
3839    /// # Example
3840    /// ```ignore,no_run
3841    /// # use google_cloud_vmwareengine_v1::model::UpdateLoggingServerRequest;
3842    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
3843    /// let x = UpdateLoggingServerRequest::new().set_or_clear_logging_server(Some(LoggingServer::default()/* use setters */));
3844    /// let x = UpdateLoggingServerRequest::new().set_or_clear_logging_server(None::<LoggingServer>);
3845    /// ```
3846    pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3847    where
3848        T: std::convert::Into<crate::model::LoggingServer>,
3849    {
3850        self.logging_server = v.map(|x| x.into());
3851        self
3852    }
3853
3854    /// Sets the value of [request_id][crate::model::UpdateLoggingServerRequest::request_id].
3855    ///
3856    /// # Example
3857    /// ```ignore,no_run
3858    /// # use google_cloud_vmwareengine_v1::model::UpdateLoggingServerRequest;
3859    /// let x = UpdateLoggingServerRequest::new().set_request_id("example");
3860    /// ```
3861    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3862        self.request_id = v.into();
3863        self
3864    }
3865}
3866
3867impl wkt::message::Message for UpdateLoggingServerRequest {
3868    fn typename() -> &'static str {
3869        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateLoggingServerRequest"
3870    }
3871}
3872
3873/// Request message for
3874/// [VmwareEngine.DeleteLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]
3875///
3876/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]: crate::client::VmwareEngine::delete_logging_server
3877#[derive(Clone, Default, PartialEq)]
3878#[non_exhaustive]
3879pub struct DeleteLoggingServerRequest {
3880    /// Required. The resource name of the logging server to delete.
3881    /// Resource names are schemeless URIs that follow the conventions in
3882    /// <https://cloud.google.com/apis/design/resource_names>.
3883    /// For example:
3884    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
3885    pub name: std::string::String,
3886
3887    /// Optional. A request ID to identify requests. Specify a unique request ID
3888    /// so that if you must retry your request, the server will know to ignore
3889    /// the request if it has already been completed. The server guarantees that a
3890    /// request doesn't result in creation of duplicate commitments for at least 60
3891    /// minutes.
3892    ///
3893    /// For example, consider a situation where you make an initial request and the
3894    /// request times out. If you make the request again with the same request
3895    /// ID, the server can check if original operation with the same request ID
3896    /// was received, and if so, will ignore the second request. This prevents
3897    /// clients from accidentally creating duplicate commitments.
3898    ///
3899    /// The request ID must be a valid UUID with the exception that zero UUID is
3900    /// not supported (00000000-0000-0000-0000-000000000000).
3901    pub request_id: std::string::String,
3902
3903    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3904}
3905
3906impl DeleteLoggingServerRequest {
3907    /// Creates a new default instance.
3908    pub fn new() -> Self {
3909        std::default::Default::default()
3910    }
3911
3912    /// Sets the value of [name][crate::model::DeleteLoggingServerRequest::name].
3913    ///
3914    /// # Example
3915    /// ```ignore,no_run
3916    /// # use google_cloud_vmwareengine_v1::model::DeleteLoggingServerRequest;
3917    /// # let project_id = "project_id";
3918    /// # let location_id = "location_id";
3919    /// # let private_cloud_id = "private_cloud_id";
3920    /// # let logging_server_id = "logging_server_id";
3921    /// let x = DeleteLoggingServerRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/loggingServers/{logging_server_id}"));
3922    /// ```
3923    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3924        self.name = v.into();
3925        self
3926    }
3927
3928    /// Sets the value of [request_id][crate::model::DeleteLoggingServerRequest::request_id].
3929    ///
3930    /// # Example
3931    /// ```ignore,no_run
3932    /// # use google_cloud_vmwareengine_v1::model::DeleteLoggingServerRequest;
3933    /// let x = DeleteLoggingServerRequest::new().set_request_id("example");
3934    /// ```
3935    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3936        self.request_id = v.into();
3937        self
3938    }
3939}
3940
3941impl wkt::message::Message for DeleteLoggingServerRequest {
3942    fn typename() -> &'static str {
3943        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteLoggingServerRequest"
3944    }
3945}
3946
3947/// Represents the metadata of the long-running operation.
3948#[derive(Clone, Default, PartialEq)]
3949#[non_exhaustive]
3950pub struct OperationMetadata {
3951    /// Output only. The time the operation was created.
3952    pub create_time: std::option::Option<wkt::Timestamp>,
3953
3954    /// Output only. The time the operation finished running.
3955    pub end_time: std::option::Option<wkt::Timestamp>,
3956
3957    /// Output only. Server-defined resource path for the target of the operation.
3958    pub target: std::string::String,
3959
3960    /// Output only. Name of the verb executed by the operation.
3961    pub verb: std::string::String,
3962
3963    /// Output only. Human-readable status of the operation, if any.
3964    pub status_message: std::string::String,
3965
3966    /// Output only. True if the user has requested cancellation
3967    /// of the operation; false otherwise.
3968    /// Operations that have successfully been cancelled
3969    /// have [Operation.error][] value with a
3970    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
3971    /// `Code.CANCELLED`.
3972    pub requested_cancellation: bool,
3973
3974    /// Output only. API version used to start the operation.
3975    pub api_version: std::string::String,
3976
3977    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3978}
3979
3980impl OperationMetadata {
3981    /// Creates a new default instance.
3982    pub fn new() -> Self {
3983        std::default::Default::default()
3984    }
3985
3986    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
3987    ///
3988    /// # Example
3989    /// ```ignore,no_run
3990    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
3991    /// use wkt::Timestamp;
3992    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
3993    /// ```
3994    pub fn set_create_time<T>(mut self, v: T) -> Self
3995    where
3996        T: std::convert::Into<wkt::Timestamp>,
3997    {
3998        self.create_time = std::option::Option::Some(v.into());
3999        self
4000    }
4001
4002    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
4003    ///
4004    /// # Example
4005    /// ```ignore,no_run
4006    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
4007    /// use wkt::Timestamp;
4008    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
4009    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
4010    /// ```
4011    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
4012    where
4013        T: std::convert::Into<wkt::Timestamp>,
4014    {
4015        self.create_time = v.map(|x| x.into());
4016        self
4017    }
4018
4019    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
4020    ///
4021    /// # Example
4022    /// ```ignore,no_run
4023    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
4024    /// use wkt::Timestamp;
4025    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
4026    /// ```
4027    pub fn set_end_time<T>(mut self, v: T) -> Self
4028    where
4029        T: std::convert::Into<wkt::Timestamp>,
4030    {
4031        self.end_time = std::option::Option::Some(v.into());
4032        self
4033    }
4034
4035    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
4036    ///
4037    /// # Example
4038    /// ```ignore,no_run
4039    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
4040    /// use wkt::Timestamp;
4041    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
4042    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
4043    /// ```
4044    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
4045    where
4046        T: std::convert::Into<wkt::Timestamp>,
4047    {
4048        self.end_time = v.map(|x| x.into());
4049        self
4050    }
4051
4052    /// Sets the value of [target][crate::model::OperationMetadata::target].
4053    ///
4054    /// # Example
4055    /// ```ignore,no_run
4056    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
4057    /// let x = OperationMetadata::new().set_target("example");
4058    /// ```
4059    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4060        self.target = v.into();
4061        self
4062    }
4063
4064    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
4065    ///
4066    /// # Example
4067    /// ```ignore,no_run
4068    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
4069    /// let x = OperationMetadata::new().set_verb("example");
4070    /// ```
4071    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4072        self.verb = v.into();
4073        self
4074    }
4075
4076    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
4077    ///
4078    /// # Example
4079    /// ```ignore,no_run
4080    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
4081    /// let x = OperationMetadata::new().set_status_message("example");
4082    /// ```
4083    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4084        self.status_message = v.into();
4085        self
4086    }
4087
4088    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
4089    ///
4090    /// # Example
4091    /// ```ignore,no_run
4092    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
4093    /// let x = OperationMetadata::new().set_requested_cancellation(true);
4094    /// ```
4095    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
4096        self.requested_cancellation = v.into();
4097        self
4098    }
4099
4100    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
4101    ///
4102    /// # Example
4103    /// ```ignore,no_run
4104    /// # use google_cloud_vmwareengine_v1::model::OperationMetadata;
4105    /// let x = OperationMetadata::new().set_api_version("example");
4106    /// ```
4107    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4108        self.api_version = v.into();
4109        self
4110    }
4111}
4112
4113impl wkt::message::Message for OperationMetadata {
4114    fn typename() -> &'static str {
4115        "type.googleapis.com/google.cloud.vmwareengine.v1.OperationMetadata"
4116    }
4117}
4118
4119/// Request message for
4120/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
4121///
4122/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
4123#[derive(Clone, Default, PartialEq)]
4124#[non_exhaustive]
4125pub struct ListNodeTypesRequest {
4126    /// Required. The resource name of the location to be queried for node types.
4127    /// Resource names are schemeless URIs that follow the conventions in
4128    /// <https://cloud.google.com/apis/design/resource_names>.
4129    /// For example:
4130    /// `projects/my-project/locations/us-central1-a`
4131    pub parent: std::string::String,
4132
4133    /// The maximum number of node types to return in one page.
4134    /// The service may return fewer than this value.
4135    /// The maximum value is coerced to 1000.
4136    /// The default value of this field is 500.
4137    pub page_size: i32,
4138
4139    /// A page token, received from a previous `ListNodeTypes` call.
4140    /// Provide this to retrieve the subsequent page.
4141    ///
4142    /// When paginating, all other parameters provided to
4143    /// `ListNodeTypes` must match the call that provided the page token.
4144    pub page_token: std::string::String,
4145
4146    /// A filter expression that matches resources returned in the response.
4147    /// The expression must specify the field name, a comparison
4148    /// operator, and the value that you want to use for filtering. The value
4149    /// must be a string, a number, or a boolean. The comparison operator
4150    /// must be `=`, `!=`, `>`, or `<`.
4151    ///
4152    /// For example, if you are filtering a list of node types, you can
4153    /// exclude the ones named `standard-72` by specifying
4154    /// `name != "standard-72"`.
4155    ///
4156    /// To filter on multiple expressions, provide each separate expression within
4157    /// parentheses. For example:
4158    ///
4159    /// ```norust
4160    /// (name = "standard-72")
4161    /// (virtual_cpu_count > 2)
4162    /// ```
4163    ///
4164    /// By default, each expression is an `AND` expression. However, you
4165    /// can include `AND` and `OR` expressions explicitly.
4166    /// For example:
4167    ///
4168    /// ```norust
4169    /// (name = "standard-96") AND
4170    /// (virtual_cpu_count > 2) OR
4171    /// (name = "standard-72")
4172    /// ```
4173    pub filter: std::string::String,
4174
4175    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4176}
4177
4178impl ListNodeTypesRequest {
4179    /// Creates a new default instance.
4180    pub fn new() -> Self {
4181        std::default::Default::default()
4182    }
4183
4184    /// Sets the value of [parent][crate::model::ListNodeTypesRequest::parent].
4185    ///
4186    /// # Example
4187    /// ```ignore,no_run
4188    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesRequest;
4189    /// let x = ListNodeTypesRequest::new().set_parent("example");
4190    /// ```
4191    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4192        self.parent = v.into();
4193        self
4194    }
4195
4196    /// Sets the value of [page_size][crate::model::ListNodeTypesRequest::page_size].
4197    ///
4198    /// # Example
4199    /// ```ignore,no_run
4200    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesRequest;
4201    /// let x = ListNodeTypesRequest::new().set_page_size(42);
4202    /// ```
4203    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4204        self.page_size = v.into();
4205        self
4206    }
4207
4208    /// Sets the value of [page_token][crate::model::ListNodeTypesRequest::page_token].
4209    ///
4210    /// # Example
4211    /// ```ignore,no_run
4212    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesRequest;
4213    /// let x = ListNodeTypesRequest::new().set_page_token("example");
4214    /// ```
4215    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4216        self.page_token = v.into();
4217        self
4218    }
4219
4220    /// Sets the value of [filter][crate::model::ListNodeTypesRequest::filter].
4221    ///
4222    /// # Example
4223    /// ```ignore,no_run
4224    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesRequest;
4225    /// let x = ListNodeTypesRequest::new().set_filter("example");
4226    /// ```
4227    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4228        self.filter = v.into();
4229        self
4230    }
4231}
4232
4233impl wkt::message::Message for ListNodeTypesRequest {
4234    fn typename() -> &'static str {
4235        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesRequest"
4236    }
4237}
4238
4239/// Response message for
4240/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
4241///
4242/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
4243#[derive(Clone, Default, PartialEq)]
4244#[non_exhaustive]
4245pub struct ListNodeTypesResponse {
4246    /// A list of Node Types.
4247    pub node_types: std::vec::Vec<crate::model::NodeType>,
4248
4249    /// A token, which can be sent as `page_token` to retrieve the next page.
4250    /// If this field is omitted, there are no subsequent pages.
4251    pub next_page_token: std::string::String,
4252
4253    /// Locations that could not be reached when making an aggregated query using
4254    /// wildcards.
4255    pub unreachable: std::vec::Vec<std::string::String>,
4256
4257    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4258}
4259
4260impl ListNodeTypesResponse {
4261    /// Creates a new default instance.
4262    pub fn new() -> Self {
4263        std::default::Default::default()
4264    }
4265
4266    /// Sets the value of [node_types][crate::model::ListNodeTypesResponse::node_types].
4267    ///
4268    /// # Example
4269    /// ```ignore,no_run
4270    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesResponse;
4271    /// use google_cloud_vmwareengine_v1::model::NodeType;
4272    /// let x = ListNodeTypesResponse::new()
4273    ///     .set_node_types([
4274    ///         NodeType::default()/* use setters */,
4275    ///         NodeType::default()/* use (different) setters */,
4276    ///     ]);
4277    /// ```
4278    pub fn set_node_types<T, V>(mut self, v: T) -> Self
4279    where
4280        T: std::iter::IntoIterator<Item = V>,
4281        V: std::convert::Into<crate::model::NodeType>,
4282    {
4283        use std::iter::Iterator;
4284        self.node_types = v.into_iter().map(|i| i.into()).collect();
4285        self
4286    }
4287
4288    /// Sets the value of [next_page_token][crate::model::ListNodeTypesResponse::next_page_token].
4289    ///
4290    /// # Example
4291    /// ```ignore,no_run
4292    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesResponse;
4293    /// let x = ListNodeTypesResponse::new().set_next_page_token("example");
4294    /// ```
4295    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4296        self.next_page_token = v.into();
4297        self
4298    }
4299
4300    /// Sets the value of [unreachable][crate::model::ListNodeTypesResponse::unreachable].
4301    ///
4302    /// # Example
4303    /// ```ignore,no_run
4304    /// # use google_cloud_vmwareengine_v1::model::ListNodeTypesResponse;
4305    /// let x = ListNodeTypesResponse::new().set_unreachable(["a", "b", "c"]);
4306    /// ```
4307    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4308    where
4309        T: std::iter::IntoIterator<Item = V>,
4310        V: std::convert::Into<std::string::String>,
4311    {
4312        use std::iter::Iterator;
4313        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4314        self
4315    }
4316}
4317
4318impl wkt::message::Message for ListNodeTypesResponse {
4319    fn typename() -> &'static str {
4320        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesResponse"
4321    }
4322}
4323
4324#[doc(hidden)]
4325impl google_cloud_gax::paginator::internal::PageableResponse for ListNodeTypesResponse {
4326    type PageItem = crate::model::NodeType;
4327
4328    fn items(self) -> std::vec::Vec<Self::PageItem> {
4329        self.node_types
4330    }
4331
4332    fn next_page_token(&self) -> std::string::String {
4333        use std::clone::Clone;
4334        self.next_page_token.clone()
4335    }
4336}
4337
4338/// Request message for
4339/// [VmwareEngine.GetNodeType][google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]
4340///
4341/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]: crate::client::VmwareEngine::get_node_type
4342#[derive(Clone, Default, PartialEq)]
4343#[non_exhaustive]
4344pub struct GetNodeTypeRequest {
4345    /// Required. The resource name of the node type to retrieve.
4346    /// Resource names are schemeless URIs that follow the conventions in
4347    /// <https://cloud.google.com/apis/design/resource_names>.
4348    /// For example:
4349    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
4350    pub name: std::string::String,
4351
4352    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4353}
4354
4355impl GetNodeTypeRequest {
4356    /// Creates a new default instance.
4357    pub fn new() -> Self {
4358        std::default::Default::default()
4359    }
4360
4361    /// Sets the value of [name][crate::model::GetNodeTypeRequest::name].
4362    ///
4363    /// # Example
4364    /// ```ignore,no_run
4365    /// # use google_cloud_vmwareengine_v1::model::GetNodeTypeRequest;
4366    /// # let project_id = "project_id";
4367    /// # let location_id = "location_id";
4368    /// # let node_type_id = "node_type_id";
4369    /// let x = GetNodeTypeRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/nodeTypes/{node_type_id}"));
4370    /// ```
4371    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4372        self.name = v.into();
4373        self
4374    }
4375}
4376
4377impl wkt::message::Message for GetNodeTypeRequest {
4378    fn typename() -> &'static str {
4379        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeTypeRequest"
4380    }
4381}
4382
4383/// Request message for
4384/// [VmwareEngine.ShowNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]
4385///
4386/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]: crate::client::VmwareEngine::show_nsx_credentials
4387#[derive(Clone, Default, PartialEq)]
4388#[non_exhaustive]
4389pub struct ShowNsxCredentialsRequest {
4390    /// Required. The resource name of the private cloud
4391    /// to be queried for credentials.
4392    /// Resource names are schemeless URIs that follow the conventions in
4393    /// <https://cloud.google.com/apis/design/resource_names>.
4394    /// For example:
4395    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
4396    pub private_cloud: std::string::String,
4397
4398    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4399}
4400
4401impl ShowNsxCredentialsRequest {
4402    /// Creates a new default instance.
4403    pub fn new() -> Self {
4404        std::default::Default::default()
4405    }
4406
4407    /// Sets the value of [private_cloud][crate::model::ShowNsxCredentialsRequest::private_cloud].
4408    ///
4409    /// # Example
4410    /// ```ignore,no_run
4411    /// # use google_cloud_vmwareengine_v1::model::ShowNsxCredentialsRequest;
4412    /// # let project_id = "project_id";
4413    /// # let location_id = "location_id";
4414    /// # let private_cloud_id = "private_cloud_id";
4415    /// let x = ShowNsxCredentialsRequest::new().set_private_cloud(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
4416    /// ```
4417    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4418        self.private_cloud = v.into();
4419        self
4420    }
4421}
4422
4423impl wkt::message::Message for ShowNsxCredentialsRequest {
4424    fn typename() -> &'static str {
4425        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest"
4426    }
4427}
4428
4429/// Request message for
4430/// [VmwareEngine.ShowVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]
4431///
4432/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]: crate::client::VmwareEngine::show_vcenter_credentials
4433#[derive(Clone, Default, PartialEq)]
4434#[non_exhaustive]
4435pub struct ShowVcenterCredentialsRequest {
4436    /// Required. The resource name of the private cloud
4437    /// to be queried for credentials.
4438    /// Resource names are schemeless URIs that follow the conventions in
4439    /// <https://cloud.google.com/apis/design/resource_names>.
4440    /// For example:
4441    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
4442    pub private_cloud: std::string::String,
4443
4444    /// Optional. The username of the user to be queried for credentials.
4445    /// The default value of this field is CloudOwner@gve.local.
4446    /// The provided value must be one of the following:
4447    /// CloudOwner@gve.local,
4448    /// solution-user-01@gve.local,
4449    /// solution-user-02@gve.local,
4450    /// solution-user-03@gve.local,
4451    /// solution-user-04@gve.local,
4452    /// solution-user-05@gve.local,
4453    /// zertoadmin@gve.local.
4454    pub username: std::string::String,
4455
4456    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4457}
4458
4459impl ShowVcenterCredentialsRequest {
4460    /// Creates a new default instance.
4461    pub fn new() -> Self {
4462        std::default::Default::default()
4463    }
4464
4465    /// Sets the value of [private_cloud][crate::model::ShowVcenterCredentialsRequest::private_cloud].
4466    ///
4467    /// # Example
4468    /// ```ignore,no_run
4469    /// # use google_cloud_vmwareengine_v1::model::ShowVcenterCredentialsRequest;
4470    /// # let project_id = "project_id";
4471    /// # let location_id = "location_id";
4472    /// # let private_cloud_id = "private_cloud_id";
4473    /// let x = ShowVcenterCredentialsRequest::new().set_private_cloud(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
4474    /// ```
4475    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4476        self.private_cloud = v.into();
4477        self
4478    }
4479
4480    /// Sets the value of [username][crate::model::ShowVcenterCredentialsRequest::username].
4481    ///
4482    /// # Example
4483    /// ```ignore,no_run
4484    /// # use google_cloud_vmwareengine_v1::model::ShowVcenterCredentialsRequest;
4485    /// let x = ShowVcenterCredentialsRequest::new().set_username("example");
4486    /// ```
4487    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4488        self.username = v.into();
4489        self
4490    }
4491}
4492
4493impl wkt::message::Message for ShowVcenterCredentialsRequest {
4494    fn typename() -> &'static str {
4495        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest"
4496    }
4497}
4498
4499/// Request message for
4500/// [VmwareEngine.ResetNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]
4501///
4502/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]: crate::client::VmwareEngine::reset_nsx_credentials
4503#[derive(Clone, Default, PartialEq)]
4504#[non_exhaustive]
4505pub struct ResetNsxCredentialsRequest {
4506    /// Required. The resource name of the private cloud
4507    /// to reset credentials for.
4508    /// Resource names are schemeless URIs that follow the conventions in
4509    /// <https://cloud.google.com/apis/design/resource_names>.
4510    /// For example:
4511    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
4512    pub private_cloud: std::string::String,
4513
4514    /// Optional. A request ID to identify requests. Specify a unique request ID
4515    /// so that if you must retry your request, the server will know to ignore
4516    /// the request if it has already been completed. The server guarantees that a
4517    /// request doesn't result in creation of duplicate commitments for at least 60
4518    /// minutes.
4519    ///
4520    /// For example, consider a situation where you make an initial request and the
4521    /// request times out. If you make the request again with the same request
4522    /// ID, the server can check if original operation with the same request ID
4523    /// was received, and if so, will ignore the second request. This prevents
4524    /// clients from accidentally creating duplicate commitments.
4525    ///
4526    /// The request ID must be a valid UUID with the exception that zero UUID is
4527    /// not supported (00000000-0000-0000-0000-000000000000).
4528    pub request_id: std::string::String,
4529
4530    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4531}
4532
4533impl ResetNsxCredentialsRequest {
4534    /// Creates a new default instance.
4535    pub fn new() -> Self {
4536        std::default::Default::default()
4537    }
4538
4539    /// Sets the value of [private_cloud][crate::model::ResetNsxCredentialsRequest::private_cloud].
4540    ///
4541    /// # Example
4542    /// ```ignore,no_run
4543    /// # use google_cloud_vmwareengine_v1::model::ResetNsxCredentialsRequest;
4544    /// # let project_id = "project_id";
4545    /// # let location_id = "location_id";
4546    /// # let private_cloud_id = "private_cloud_id";
4547    /// let x = ResetNsxCredentialsRequest::new().set_private_cloud(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
4548    /// ```
4549    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4550        self.private_cloud = v.into();
4551        self
4552    }
4553
4554    /// Sets the value of [request_id][crate::model::ResetNsxCredentialsRequest::request_id].
4555    ///
4556    /// # Example
4557    /// ```ignore,no_run
4558    /// # use google_cloud_vmwareengine_v1::model::ResetNsxCredentialsRequest;
4559    /// let x = ResetNsxCredentialsRequest::new().set_request_id("example");
4560    /// ```
4561    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4562        self.request_id = v.into();
4563        self
4564    }
4565}
4566
4567impl wkt::message::Message for ResetNsxCredentialsRequest {
4568    fn typename() -> &'static str {
4569        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest"
4570    }
4571}
4572
4573/// Request message for
4574/// [VmwareEngine.ResetVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]
4575///
4576/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]: crate::client::VmwareEngine::reset_vcenter_credentials
4577#[derive(Clone, Default, PartialEq)]
4578#[non_exhaustive]
4579pub struct ResetVcenterCredentialsRequest {
4580    /// Required. The resource name of the private cloud
4581    /// to reset credentials for.
4582    /// Resource names are schemeless URIs that follow the conventions in
4583    /// <https://cloud.google.com/apis/design/resource_names>.
4584    /// For example:
4585    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
4586    pub private_cloud: std::string::String,
4587
4588    /// Optional. A request ID to identify requests. Specify a unique request ID
4589    /// so that if you must retry your request, the server will know to ignore
4590    /// the request if it has already been completed. The server guarantees that a
4591    /// request doesn't result in creation of duplicate commitments for at least 60
4592    /// minutes.
4593    ///
4594    /// For example, consider a situation where you make an initial request and the
4595    /// request times out. If you make the request again with the same request
4596    /// ID, the server can check if original operation with the same request ID
4597    /// was received, and if so, will ignore the second request. This prevents
4598    /// clients from accidentally creating duplicate commitments.
4599    ///
4600    /// The request ID must be a valid UUID with the exception that zero UUID is
4601    /// not supported (00000000-0000-0000-0000-000000000000).
4602    pub request_id: std::string::String,
4603
4604    /// Optional. The username of the user to be to reset the credentials.
4605    /// The default value of this field is CloudOwner@gve.local.
4606    /// The provided value should be one of the following:
4607    /// solution-user-01@gve.local,
4608    /// solution-user-02@gve.local,
4609    /// solution-user-03@gve.local,
4610    /// solution-user-04@gve.local,
4611    /// solution-user-05@gve.local,
4612    /// zertoadmin@gve.local.
4613    pub username: std::string::String,
4614
4615    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4616}
4617
4618impl ResetVcenterCredentialsRequest {
4619    /// Creates a new default instance.
4620    pub fn new() -> Self {
4621        std::default::Default::default()
4622    }
4623
4624    /// Sets the value of [private_cloud][crate::model::ResetVcenterCredentialsRequest::private_cloud].
4625    ///
4626    /// # Example
4627    /// ```ignore,no_run
4628    /// # use google_cloud_vmwareengine_v1::model::ResetVcenterCredentialsRequest;
4629    /// # let project_id = "project_id";
4630    /// # let location_id = "location_id";
4631    /// # let private_cloud_id = "private_cloud_id";
4632    /// let x = ResetVcenterCredentialsRequest::new().set_private_cloud(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
4633    /// ```
4634    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4635        self.private_cloud = v.into();
4636        self
4637    }
4638
4639    /// Sets the value of [request_id][crate::model::ResetVcenterCredentialsRequest::request_id].
4640    ///
4641    /// # Example
4642    /// ```ignore,no_run
4643    /// # use google_cloud_vmwareengine_v1::model::ResetVcenterCredentialsRequest;
4644    /// let x = ResetVcenterCredentialsRequest::new().set_request_id("example");
4645    /// ```
4646    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4647        self.request_id = v.into();
4648        self
4649    }
4650
4651    /// Sets the value of [username][crate::model::ResetVcenterCredentialsRequest::username].
4652    ///
4653    /// # Example
4654    /// ```ignore,no_run
4655    /// # use google_cloud_vmwareengine_v1::model::ResetVcenterCredentialsRequest;
4656    /// let x = ResetVcenterCredentialsRequest::new().set_username("example");
4657    /// ```
4658    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4659        self.username = v.into();
4660        self
4661    }
4662}
4663
4664impl wkt::message::Message for ResetVcenterCredentialsRequest {
4665    fn typename() -> &'static str {
4666        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest"
4667    }
4668}
4669
4670/// Response message for
4671/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
4672///
4673/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
4674#[derive(Clone, Default, PartialEq)]
4675#[non_exhaustive]
4676pub struct ListHcxActivationKeysResponse {
4677    /// List of HCX activation keys.
4678    pub hcx_activation_keys: std::vec::Vec<crate::model::HcxActivationKey>,
4679
4680    /// A token, which can be sent as `page_token` to retrieve the next page.
4681    /// If this field is omitted, there are no subsequent pages.
4682    pub next_page_token: std::string::String,
4683
4684    /// Locations that could not be reached when making an aggregated query using
4685    /// wildcards.
4686    pub unreachable: std::vec::Vec<std::string::String>,
4687
4688    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4689}
4690
4691impl ListHcxActivationKeysResponse {
4692    /// Creates a new default instance.
4693    pub fn new() -> Self {
4694        std::default::Default::default()
4695    }
4696
4697    /// Sets the value of [hcx_activation_keys][crate::model::ListHcxActivationKeysResponse::hcx_activation_keys].
4698    ///
4699    /// # Example
4700    /// ```ignore,no_run
4701    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysResponse;
4702    /// use google_cloud_vmwareengine_v1::model::HcxActivationKey;
4703    /// let x = ListHcxActivationKeysResponse::new()
4704    ///     .set_hcx_activation_keys([
4705    ///         HcxActivationKey::default()/* use setters */,
4706    ///         HcxActivationKey::default()/* use (different) setters */,
4707    ///     ]);
4708    /// ```
4709    pub fn set_hcx_activation_keys<T, V>(mut self, v: T) -> Self
4710    where
4711        T: std::iter::IntoIterator<Item = V>,
4712        V: std::convert::Into<crate::model::HcxActivationKey>,
4713    {
4714        use std::iter::Iterator;
4715        self.hcx_activation_keys = v.into_iter().map(|i| i.into()).collect();
4716        self
4717    }
4718
4719    /// Sets the value of [next_page_token][crate::model::ListHcxActivationKeysResponse::next_page_token].
4720    ///
4721    /// # Example
4722    /// ```ignore,no_run
4723    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysResponse;
4724    /// let x = ListHcxActivationKeysResponse::new().set_next_page_token("example");
4725    /// ```
4726    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4727        self.next_page_token = v.into();
4728        self
4729    }
4730
4731    /// Sets the value of [unreachable][crate::model::ListHcxActivationKeysResponse::unreachable].
4732    ///
4733    /// # Example
4734    /// ```ignore,no_run
4735    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysResponse;
4736    /// let x = ListHcxActivationKeysResponse::new().set_unreachable(["a", "b", "c"]);
4737    /// ```
4738    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4739    where
4740        T: std::iter::IntoIterator<Item = V>,
4741        V: std::convert::Into<std::string::String>,
4742    {
4743        use std::iter::Iterator;
4744        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4745        self
4746    }
4747}
4748
4749impl wkt::message::Message for ListHcxActivationKeysResponse {
4750    fn typename() -> &'static str {
4751        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse"
4752    }
4753}
4754
4755#[doc(hidden)]
4756impl google_cloud_gax::paginator::internal::PageableResponse for ListHcxActivationKeysResponse {
4757    type PageItem = crate::model::HcxActivationKey;
4758
4759    fn items(self) -> std::vec::Vec<Self::PageItem> {
4760        self.hcx_activation_keys
4761    }
4762
4763    fn next_page_token(&self) -> std::string::String {
4764        use std::clone::Clone;
4765        self.next_page_token.clone()
4766    }
4767}
4768
4769/// Request message for
4770/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
4771///
4772/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
4773#[derive(Clone, Default, PartialEq)]
4774#[non_exhaustive]
4775pub struct ListHcxActivationKeysRequest {
4776    /// Required. The resource name of the private cloud
4777    /// to be queried for HCX activation keys.
4778    /// Resource names are schemeless URIs that follow the conventions in
4779    /// <https://cloud.google.com/apis/design/resource_names>.
4780    /// For example:
4781    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
4782    pub parent: std::string::String,
4783
4784    /// The maximum number of HCX activation keys to return in one page.
4785    /// The service may return fewer than this value.
4786    /// The maximum value is coerced to 1000.
4787    /// The default value of this field is 500.
4788    pub page_size: i32,
4789
4790    /// A page token, received from a previous `ListHcxActivationKeys` call.
4791    /// Provide this to retrieve the subsequent page.
4792    ///
4793    /// When paginating, all other parameters provided to
4794    /// `ListHcxActivationKeys` must match the call that provided the page
4795    /// token.
4796    pub page_token: std::string::String,
4797
4798    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4799}
4800
4801impl ListHcxActivationKeysRequest {
4802    /// Creates a new default instance.
4803    pub fn new() -> Self {
4804        std::default::Default::default()
4805    }
4806
4807    /// Sets the value of [parent][crate::model::ListHcxActivationKeysRequest::parent].
4808    ///
4809    /// # Example
4810    /// ```ignore,no_run
4811    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysRequest;
4812    /// # let project_id = "project_id";
4813    /// # let location_id = "location_id";
4814    /// # let private_cloud_id = "private_cloud_id";
4815    /// let x = ListHcxActivationKeysRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
4816    /// ```
4817    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4818        self.parent = v.into();
4819        self
4820    }
4821
4822    /// Sets the value of [page_size][crate::model::ListHcxActivationKeysRequest::page_size].
4823    ///
4824    /// # Example
4825    /// ```ignore,no_run
4826    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysRequest;
4827    /// let x = ListHcxActivationKeysRequest::new().set_page_size(42);
4828    /// ```
4829    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4830        self.page_size = v.into();
4831        self
4832    }
4833
4834    /// Sets the value of [page_token][crate::model::ListHcxActivationKeysRequest::page_token].
4835    ///
4836    /// # Example
4837    /// ```ignore,no_run
4838    /// # use google_cloud_vmwareengine_v1::model::ListHcxActivationKeysRequest;
4839    /// let x = ListHcxActivationKeysRequest::new().set_page_token("example");
4840    /// ```
4841    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4842        self.page_token = v.into();
4843        self
4844    }
4845}
4846
4847impl wkt::message::Message for ListHcxActivationKeysRequest {
4848    fn typename() -> &'static str {
4849        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest"
4850    }
4851}
4852
4853/// Request message for [VmwareEngine.GetHcxActivationKeys][]
4854#[derive(Clone, Default, PartialEq)]
4855#[non_exhaustive]
4856pub struct GetHcxActivationKeyRequest {
4857    /// Required. The resource name of the HCX activation key to retrieve.
4858    /// Resource names are schemeless URIs that follow the conventions in
4859    /// <https://cloud.google.com/apis/design/resource_names>.
4860    /// For example:
4861    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
4862    pub name: std::string::String,
4863
4864    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4865}
4866
4867impl GetHcxActivationKeyRequest {
4868    /// Creates a new default instance.
4869    pub fn new() -> Self {
4870        std::default::Default::default()
4871    }
4872
4873    /// Sets the value of [name][crate::model::GetHcxActivationKeyRequest::name].
4874    ///
4875    /// # Example
4876    /// ```ignore,no_run
4877    /// # use google_cloud_vmwareengine_v1::model::GetHcxActivationKeyRequest;
4878    /// # let project_id = "project_id";
4879    /// # let location_id = "location_id";
4880    /// # let private_cloud_id = "private_cloud_id";
4881    /// # let hcx_activation_key_id = "hcx_activation_key_id";
4882    /// let x = GetHcxActivationKeyRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/hcxActivationKeys/{hcx_activation_key_id}"));
4883    /// ```
4884    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4885        self.name = v.into();
4886        self
4887    }
4888}
4889
4890impl wkt::message::Message for GetHcxActivationKeyRequest {
4891    fn typename() -> &'static str {
4892        "type.googleapis.com/google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest"
4893    }
4894}
4895
4896/// Request message for
4897/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
4898///
4899/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
4900#[derive(Clone, Default, PartialEq)]
4901#[non_exhaustive]
4902pub struct CreateHcxActivationKeyRequest {
4903    /// Required. The resource name of the private cloud to create the key for.
4904    /// Resource names are schemeless URIs that follow the conventions in
4905    /// <https://cloud.google.com/apis/design/resource_names>.
4906    /// For example:
4907    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
4908    pub parent: std::string::String,
4909
4910    /// Required. The initial description of a new HCX activation key. When
4911    /// creating a new key, this field must be an empty object.
4912    pub hcx_activation_key: std::option::Option<crate::model::HcxActivationKey>,
4913
4914    /// Required. The user-provided identifier of the `HcxActivationKey` to be
4915    /// created. This identifier must be unique among `HcxActivationKey` resources
4916    /// within the parent and becomes the final token in the name URI.
4917    /// The identifier must meet the following requirements:
4918    ///
4919    /// * Only contains 1-63 alphanumeric characters and hyphens
4920    /// * Begins with an alphabetical character
4921    /// * Ends with a non-hyphen character
4922    /// * Not formatted as a UUID
4923    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
4924    ///   (section 3.5)
4925    pub hcx_activation_key_id: std::string::String,
4926
4927    /// A request ID to identify requests. Specify a unique request ID
4928    /// so that if you must retry your request, the server will know to ignore
4929    /// the request if it has already been completed. The server guarantees that a
4930    /// request doesn't result in creation of duplicate commitments for at least 60
4931    /// minutes.
4932    ///
4933    /// For example, consider a situation where you make an initial request and the
4934    /// request times out. If you make the request again with the same request ID,
4935    /// the server can check if original operation with the same request ID was
4936    /// received, and if so, will ignore the second request. This prevents clients
4937    /// from accidentally creating duplicate commitments.
4938    ///
4939    /// The request ID must be a valid UUID with the exception that zero UUID is
4940    /// not supported (00000000-0000-0000-0000-000000000000).
4941    pub request_id: std::string::String,
4942
4943    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4944}
4945
4946impl CreateHcxActivationKeyRequest {
4947    /// Creates a new default instance.
4948    pub fn new() -> Self {
4949        std::default::Default::default()
4950    }
4951
4952    /// Sets the value of [parent][crate::model::CreateHcxActivationKeyRequest::parent].
4953    ///
4954    /// # Example
4955    /// ```ignore,no_run
4956    /// # use google_cloud_vmwareengine_v1::model::CreateHcxActivationKeyRequest;
4957    /// # let project_id = "project_id";
4958    /// # let location_id = "location_id";
4959    /// # let private_cloud_id = "private_cloud_id";
4960    /// let x = CreateHcxActivationKeyRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
4961    /// ```
4962    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4963        self.parent = v.into();
4964        self
4965    }
4966
4967    /// Sets the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
4968    ///
4969    /// # Example
4970    /// ```ignore,no_run
4971    /// # use google_cloud_vmwareengine_v1::model::CreateHcxActivationKeyRequest;
4972    /// use google_cloud_vmwareengine_v1::model::HcxActivationKey;
4973    /// let x = CreateHcxActivationKeyRequest::new().set_hcx_activation_key(HcxActivationKey::default()/* use setters */);
4974    /// ```
4975    pub fn set_hcx_activation_key<T>(mut self, v: T) -> Self
4976    where
4977        T: std::convert::Into<crate::model::HcxActivationKey>,
4978    {
4979        self.hcx_activation_key = std::option::Option::Some(v.into());
4980        self
4981    }
4982
4983    /// Sets or clears the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
4984    ///
4985    /// # Example
4986    /// ```ignore,no_run
4987    /// # use google_cloud_vmwareengine_v1::model::CreateHcxActivationKeyRequest;
4988    /// use google_cloud_vmwareengine_v1::model::HcxActivationKey;
4989    /// let x = CreateHcxActivationKeyRequest::new().set_or_clear_hcx_activation_key(Some(HcxActivationKey::default()/* use setters */));
4990    /// let x = CreateHcxActivationKeyRequest::new().set_or_clear_hcx_activation_key(None::<HcxActivationKey>);
4991    /// ```
4992    pub fn set_or_clear_hcx_activation_key<T>(mut self, v: std::option::Option<T>) -> Self
4993    where
4994        T: std::convert::Into<crate::model::HcxActivationKey>,
4995    {
4996        self.hcx_activation_key = v.map(|x| x.into());
4997        self
4998    }
4999
5000    /// Sets the value of [hcx_activation_key_id][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key_id].
5001    ///
5002    /// # Example
5003    /// ```ignore,no_run
5004    /// # use google_cloud_vmwareengine_v1::model::CreateHcxActivationKeyRequest;
5005    /// let x = CreateHcxActivationKeyRequest::new().set_hcx_activation_key_id("example");
5006    /// ```
5007    pub fn set_hcx_activation_key_id<T: std::convert::Into<std::string::String>>(
5008        mut self,
5009        v: T,
5010    ) -> Self {
5011        self.hcx_activation_key_id = v.into();
5012        self
5013    }
5014
5015    /// Sets the value of [request_id][crate::model::CreateHcxActivationKeyRequest::request_id].
5016    ///
5017    /// # Example
5018    /// ```ignore,no_run
5019    /// # use google_cloud_vmwareengine_v1::model::CreateHcxActivationKeyRequest;
5020    /// let x = CreateHcxActivationKeyRequest::new().set_request_id("example");
5021    /// ```
5022    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5023        self.request_id = v.into();
5024        self
5025    }
5026}
5027
5028impl wkt::message::Message for CreateHcxActivationKeyRequest {
5029    fn typename() -> &'static str {
5030        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest"
5031    }
5032}
5033
5034/// Request message for
5035/// [VmwareEngine.GetDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]
5036///
5037/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]: crate::client::VmwareEngine::get_dns_forwarding
5038#[derive(Clone, Default, PartialEq)]
5039#[non_exhaustive]
5040pub struct GetDnsForwardingRequest {
5041    /// Required. The resource name of a `DnsForwarding` to retrieve.
5042    /// Resource names are schemeless URIs that follow the conventions in
5043    /// <https://cloud.google.com/apis/design/resource_names>.
5044    /// For example:
5045    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
5046    pub name: std::string::String,
5047
5048    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5049}
5050
5051impl GetDnsForwardingRequest {
5052    /// Creates a new default instance.
5053    pub fn new() -> Self {
5054        std::default::Default::default()
5055    }
5056
5057    /// Sets the value of [name][crate::model::GetDnsForwardingRequest::name].
5058    ///
5059    /// # Example
5060    /// ```ignore,no_run
5061    /// # use google_cloud_vmwareengine_v1::model::GetDnsForwardingRequest;
5062    /// # let project_id = "project_id";
5063    /// # let location_id = "location_id";
5064    /// # let private_cloud_id = "private_cloud_id";
5065    /// let x = GetDnsForwardingRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/dnsForwarding"));
5066    /// ```
5067    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5068        self.name = v.into();
5069        self
5070    }
5071}
5072
5073impl wkt::message::Message for GetDnsForwardingRequest {
5074    fn typename() -> &'static str {
5075        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsForwardingRequest"
5076    }
5077}
5078
5079/// Request message for
5080/// [VmwareEngine.UpdateDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]
5081///
5082/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]: crate::client::VmwareEngine::update_dns_forwarding
5083#[derive(Clone, Default, PartialEq)]
5084#[non_exhaustive]
5085pub struct UpdateDnsForwardingRequest {
5086    /// Required. DnsForwarding config details.
5087    pub dns_forwarding: std::option::Option<crate::model::DnsForwarding>,
5088
5089    /// Required. Field mask is used to specify the fields to be overwritten in the
5090    /// `DnsForwarding` resource by the update.
5091    /// The fields specified in the `update_mask` are relative to the resource, not
5092    /// the full request. A field will be overwritten if it is in the mask. If the
5093    /// user does not provide a mask then all fields will be overwritten.
5094    pub update_mask: std::option::Option<wkt::FieldMask>,
5095
5096    /// Optional. A request ID to identify requests. Specify a unique request ID
5097    /// so that if you must retry your request, the server will know to ignore
5098    /// the request if it has already been completed. The server guarantees that a
5099    /// request doesn't result in creation of duplicate commitments for at least 60
5100    /// minutes.
5101    ///
5102    /// For example, consider a situation where you make an initial request and the
5103    /// request times out. If you make the request again with the same request ID,
5104    /// the server can check if original operation with the same request ID was
5105    /// received, and if so, will ignore the second request. This prevents clients
5106    /// from accidentally creating duplicate commitments.
5107    ///
5108    /// The request ID must be a valid UUID with the exception that zero UUID is
5109    /// not supported (00000000-0000-0000-0000-000000000000).
5110    pub request_id: std::string::String,
5111
5112    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5113}
5114
5115impl UpdateDnsForwardingRequest {
5116    /// Creates a new default instance.
5117    pub fn new() -> Self {
5118        std::default::Default::default()
5119    }
5120
5121    /// Sets the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
5122    ///
5123    /// # Example
5124    /// ```ignore,no_run
5125    /// # use google_cloud_vmwareengine_v1::model::UpdateDnsForwardingRequest;
5126    /// use google_cloud_vmwareengine_v1::model::DnsForwarding;
5127    /// let x = UpdateDnsForwardingRequest::new().set_dns_forwarding(DnsForwarding::default()/* use setters */);
5128    /// ```
5129    pub fn set_dns_forwarding<T>(mut self, v: T) -> Self
5130    where
5131        T: std::convert::Into<crate::model::DnsForwarding>,
5132    {
5133        self.dns_forwarding = std::option::Option::Some(v.into());
5134        self
5135    }
5136
5137    /// Sets or clears the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
5138    ///
5139    /// # Example
5140    /// ```ignore,no_run
5141    /// # use google_cloud_vmwareengine_v1::model::UpdateDnsForwardingRequest;
5142    /// use google_cloud_vmwareengine_v1::model::DnsForwarding;
5143    /// let x = UpdateDnsForwardingRequest::new().set_or_clear_dns_forwarding(Some(DnsForwarding::default()/* use setters */));
5144    /// let x = UpdateDnsForwardingRequest::new().set_or_clear_dns_forwarding(None::<DnsForwarding>);
5145    /// ```
5146    pub fn set_or_clear_dns_forwarding<T>(mut self, v: std::option::Option<T>) -> Self
5147    where
5148        T: std::convert::Into<crate::model::DnsForwarding>,
5149    {
5150        self.dns_forwarding = v.map(|x| x.into());
5151        self
5152    }
5153
5154    /// Sets the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
5155    ///
5156    /// # Example
5157    /// ```ignore,no_run
5158    /// # use google_cloud_vmwareengine_v1::model::UpdateDnsForwardingRequest;
5159    /// use wkt::FieldMask;
5160    /// let x = UpdateDnsForwardingRequest::new().set_update_mask(FieldMask::default()/* use setters */);
5161    /// ```
5162    pub fn set_update_mask<T>(mut self, v: T) -> Self
5163    where
5164        T: std::convert::Into<wkt::FieldMask>,
5165    {
5166        self.update_mask = std::option::Option::Some(v.into());
5167        self
5168    }
5169
5170    /// Sets or clears the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
5171    ///
5172    /// # Example
5173    /// ```ignore,no_run
5174    /// # use google_cloud_vmwareengine_v1::model::UpdateDnsForwardingRequest;
5175    /// use wkt::FieldMask;
5176    /// let x = UpdateDnsForwardingRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5177    /// let x = UpdateDnsForwardingRequest::new().set_or_clear_update_mask(None::<FieldMask>);
5178    /// ```
5179    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5180    where
5181        T: std::convert::Into<wkt::FieldMask>,
5182    {
5183        self.update_mask = v.map(|x| x.into());
5184        self
5185    }
5186
5187    /// Sets the value of [request_id][crate::model::UpdateDnsForwardingRequest::request_id].
5188    ///
5189    /// # Example
5190    /// ```ignore,no_run
5191    /// # use google_cloud_vmwareengine_v1::model::UpdateDnsForwardingRequest;
5192    /// let x = UpdateDnsForwardingRequest::new().set_request_id("example");
5193    /// ```
5194    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5195        self.request_id = v.into();
5196        self
5197    }
5198}
5199
5200impl wkt::message::Message for UpdateDnsForwardingRequest {
5201    fn typename() -> &'static str {
5202        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest"
5203    }
5204}
5205
5206/// Request message for
5207/// [VmwareEngine.CreateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]
5208///
5209/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]: crate::client::VmwareEngine::create_network_peering
5210#[derive(Clone, Default, PartialEq)]
5211#[non_exhaustive]
5212pub struct CreateNetworkPeeringRequest {
5213    /// Required. The resource name of the location to create the new network
5214    /// peering in. This value is always `global`, because `NetworkPeering` is a
5215    /// global resource. Resource names are schemeless URIs that follow the
5216    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
5217    /// example: `projects/my-project/locations/global`
5218    pub parent: std::string::String,
5219
5220    /// Required. The user-provided identifier of the new `NetworkPeering`.
5221    /// This identifier must be unique among `NetworkPeering` resources within the
5222    /// parent and becomes the final token in the name URI.
5223    /// The identifier must meet the following requirements:
5224    ///
5225    /// * Only contains 1-63 alphanumeric characters and hyphens
5226    /// * Begins with an alphabetical character
5227    /// * Ends with a non-hyphen character
5228    /// * Not formatted as a UUID
5229    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5230    ///   (section 3.5)
5231    pub network_peering_id: std::string::String,
5232
5233    /// Required. The initial description of the new network peering.
5234    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
5235
5236    /// Optional. A request ID to identify requests. Specify a unique request ID
5237    /// so that if you must retry your request, the server will know to ignore
5238    /// the request if it has already been completed. The server guarantees that a
5239    /// request doesn't result in creation of duplicate commitments for at least 60
5240    /// minutes.
5241    ///
5242    /// For example, consider a situation where you make an initial request and the
5243    /// request times out. If you make the request again with the same request
5244    /// ID, the server can check if original operation with the same request ID
5245    /// was received, and if so, will ignore the second request. This prevents
5246    /// clients from accidentally creating duplicate commitments.
5247    ///
5248    /// The request ID must be a valid UUID with the exception that zero UUID is
5249    /// not supported (00000000-0000-0000-0000-000000000000).
5250    pub request_id: std::string::String,
5251
5252    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5253}
5254
5255impl CreateNetworkPeeringRequest {
5256    /// Creates a new default instance.
5257    pub fn new() -> Self {
5258        std::default::Default::default()
5259    }
5260
5261    /// Sets the value of [parent][crate::model::CreateNetworkPeeringRequest::parent].
5262    ///
5263    /// # Example
5264    /// ```ignore,no_run
5265    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPeeringRequest;
5266    /// let x = CreateNetworkPeeringRequest::new().set_parent("example");
5267    /// ```
5268    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5269        self.parent = v.into();
5270        self
5271    }
5272
5273    /// Sets the value of [network_peering_id][crate::model::CreateNetworkPeeringRequest::network_peering_id].
5274    ///
5275    /// # Example
5276    /// ```ignore,no_run
5277    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPeeringRequest;
5278    /// let x = CreateNetworkPeeringRequest::new().set_network_peering_id("example");
5279    /// ```
5280    pub fn set_network_peering_id<T: std::convert::Into<std::string::String>>(
5281        mut self,
5282        v: T,
5283    ) -> Self {
5284        self.network_peering_id = v.into();
5285        self
5286    }
5287
5288    /// Sets the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
5289    ///
5290    /// # Example
5291    /// ```ignore,no_run
5292    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPeeringRequest;
5293    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
5294    /// let x = CreateNetworkPeeringRequest::new().set_network_peering(NetworkPeering::default()/* use setters */);
5295    /// ```
5296    pub fn set_network_peering<T>(mut self, v: T) -> Self
5297    where
5298        T: std::convert::Into<crate::model::NetworkPeering>,
5299    {
5300        self.network_peering = std::option::Option::Some(v.into());
5301        self
5302    }
5303
5304    /// Sets or clears the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
5305    ///
5306    /// # Example
5307    /// ```ignore,no_run
5308    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPeeringRequest;
5309    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
5310    /// let x = CreateNetworkPeeringRequest::new().set_or_clear_network_peering(Some(NetworkPeering::default()/* use setters */));
5311    /// let x = CreateNetworkPeeringRequest::new().set_or_clear_network_peering(None::<NetworkPeering>);
5312    /// ```
5313    pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
5314    where
5315        T: std::convert::Into<crate::model::NetworkPeering>,
5316    {
5317        self.network_peering = v.map(|x| x.into());
5318        self
5319    }
5320
5321    /// Sets the value of [request_id][crate::model::CreateNetworkPeeringRequest::request_id].
5322    ///
5323    /// # Example
5324    /// ```ignore,no_run
5325    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPeeringRequest;
5326    /// let x = CreateNetworkPeeringRequest::new().set_request_id("example");
5327    /// ```
5328    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5329        self.request_id = v.into();
5330        self
5331    }
5332}
5333
5334impl wkt::message::Message for CreateNetworkPeeringRequest {
5335    fn typename() -> &'static str {
5336        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest"
5337    }
5338}
5339
5340/// Request message for
5341/// [VmwareEngine.DeleteNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]
5342///
5343/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]: crate::client::VmwareEngine::delete_network_peering
5344#[derive(Clone, Default, PartialEq)]
5345#[non_exhaustive]
5346pub struct DeleteNetworkPeeringRequest {
5347    /// Required. The resource name of the network peering to be deleted.
5348    /// Resource names are schemeless URIs that follow the conventions in
5349    /// <https://cloud.google.com/apis/design/resource_names>.
5350    /// For example:
5351    /// `projects/my-project/locations/global/networkPeerings/my-peering`
5352    pub name: std::string::String,
5353
5354    /// Optional. A request ID to identify requests. Specify a unique request ID
5355    /// so that if you must retry your request, the server will know to ignore
5356    /// the request if it has already been completed. The server guarantees that a
5357    /// request doesn't result in creation of duplicate commitments for at least 60
5358    /// minutes.
5359    ///
5360    /// For example, consider a situation where you make an initial request and the
5361    /// request times out. If you make the request again with the same request
5362    /// ID, the server can check if original operation with the same request ID
5363    /// was received, and if so, will ignore the second request. This prevents
5364    /// clients from accidentally creating duplicate commitments.
5365    ///
5366    /// The request ID must be a valid UUID with the exception that zero UUID is
5367    /// not supported (00000000-0000-0000-0000-000000000000).
5368    pub request_id: std::string::String,
5369
5370    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5371}
5372
5373impl DeleteNetworkPeeringRequest {
5374    /// Creates a new default instance.
5375    pub fn new() -> Self {
5376        std::default::Default::default()
5377    }
5378
5379    /// Sets the value of [name][crate::model::DeleteNetworkPeeringRequest::name].
5380    ///
5381    /// # Example
5382    /// ```ignore,no_run
5383    /// # use google_cloud_vmwareengine_v1::model::DeleteNetworkPeeringRequest;
5384    /// # let project_id = "project_id";
5385    /// # let location_id = "location_id";
5386    /// # let network_peering_id = "network_peering_id";
5387    /// let x = DeleteNetworkPeeringRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPeerings/{network_peering_id}"));
5388    /// ```
5389    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5390        self.name = v.into();
5391        self
5392    }
5393
5394    /// Sets the value of [request_id][crate::model::DeleteNetworkPeeringRequest::request_id].
5395    ///
5396    /// # Example
5397    /// ```ignore,no_run
5398    /// # use google_cloud_vmwareengine_v1::model::DeleteNetworkPeeringRequest;
5399    /// let x = DeleteNetworkPeeringRequest::new().set_request_id("example");
5400    /// ```
5401    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5402        self.request_id = v.into();
5403        self
5404    }
5405}
5406
5407impl wkt::message::Message for DeleteNetworkPeeringRequest {
5408    fn typename() -> &'static str {
5409        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest"
5410    }
5411}
5412
5413/// Request message for
5414/// [VmwareEngine.GetNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]
5415///
5416/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]: crate::client::VmwareEngine::get_network_peering
5417#[derive(Clone, Default, PartialEq)]
5418#[non_exhaustive]
5419pub struct GetNetworkPeeringRequest {
5420    /// Required. The resource name of the network peering to retrieve.
5421    /// Resource names are schemeless URIs that follow the conventions in
5422    /// <https://cloud.google.com/apis/design/resource_names>.
5423    /// For example:
5424    /// `projects/my-project/locations/global/networkPeerings/my-peering`
5425    pub name: std::string::String,
5426
5427    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5428}
5429
5430impl GetNetworkPeeringRequest {
5431    /// Creates a new default instance.
5432    pub fn new() -> Self {
5433        std::default::Default::default()
5434    }
5435
5436    /// Sets the value of [name][crate::model::GetNetworkPeeringRequest::name].
5437    ///
5438    /// # Example
5439    /// ```ignore,no_run
5440    /// # use google_cloud_vmwareengine_v1::model::GetNetworkPeeringRequest;
5441    /// # let project_id = "project_id";
5442    /// # let location_id = "location_id";
5443    /// # let network_peering_id = "network_peering_id";
5444    /// let x = GetNetworkPeeringRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPeerings/{network_peering_id}"));
5445    /// ```
5446    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5447        self.name = v.into();
5448        self
5449    }
5450}
5451
5452impl wkt::message::Message for GetNetworkPeeringRequest {
5453    fn typename() -> &'static str {
5454        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPeeringRequest"
5455    }
5456}
5457
5458/// Request message for
5459/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
5460///
5461/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
5462#[derive(Clone, Default, PartialEq)]
5463#[non_exhaustive]
5464pub struct ListNetworkPeeringsRequest {
5465    /// Required. The resource name of the location (global) to query for
5466    /// network peerings. Resource names are schemeless URIs that follow the
5467    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
5468    /// example: `projects/my-project/locations/global`
5469    pub parent: std::string::String,
5470
5471    /// The maximum number of network peerings to return in one page.
5472    /// The maximum value is coerced to 1000.
5473    /// The default value of this field is 500.
5474    pub page_size: i32,
5475
5476    /// A page token, received from a previous `ListNetworkPeerings` call.
5477    /// Provide this to retrieve the subsequent page.
5478    ///
5479    /// When paginating, all other parameters provided to
5480    /// `ListNetworkPeerings` must match the call that provided the page
5481    /// token.
5482    pub page_token: std::string::String,
5483
5484    /// A filter expression that matches resources returned in the response.
5485    /// The expression must specify the field name, a comparison
5486    /// operator, and the value that you want to use for filtering. The value
5487    /// must be a string, a number, or a boolean. The comparison operator
5488    /// must be `=`, `!=`, `>`, or `<`.
5489    ///
5490    /// For example, if you are filtering a list of network peerings, you can
5491    /// exclude the ones named `example-peering` by specifying
5492    /// `name != "example-peering"`.
5493    ///
5494    /// To filter on multiple expressions, provide each separate expression within
5495    /// parentheses. For example:
5496    ///
5497    /// ```norust
5498    /// (name = "example-peering")
5499    /// (createTime > "2021-04-12T08:15:10.40Z")
5500    /// ```
5501    ///
5502    /// By default, each expression is an `AND` expression. However, you
5503    /// can include `AND` and `OR` expressions explicitly.
5504    /// For example:
5505    ///
5506    /// ```norust
5507    /// (name = "example-peering-1") AND
5508    /// (createTime > "2021-04-12T08:15:10.40Z") OR
5509    /// (name = "example-peering-2")
5510    /// ```
5511    pub filter: std::string::String,
5512
5513    /// Sorts list results by a certain order. By default, returned results
5514    /// are ordered by `name` in ascending order.
5515    /// You can also sort results in descending order based on the `name` value
5516    /// using `orderBy="name desc"`.
5517    /// Currently, only ordering by `name` is supported.
5518    pub order_by: std::string::String,
5519
5520    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5521}
5522
5523impl ListNetworkPeeringsRequest {
5524    /// Creates a new default instance.
5525    pub fn new() -> Self {
5526        std::default::Default::default()
5527    }
5528
5529    /// Sets the value of [parent][crate::model::ListNetworkPeeringsRequest::parent].
5530    ///
5531    /// # Example
5532    /// ```ignore,no_run
5533    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsRequest;
5534    /// # let project_id = "project_id";
5535    /// # let location_id = "location_id";
5536    /// let x = ListNetworkPeeringsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
5537    /// ```
5538    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5539        self.parent = v.into();
5540        self
5541    }
5542
5543    /// Sets the value of [page_size][crate::model::ListNetworkPeeringsRequest::page_size].
5544    ///
5545    /// # Example
5546    /// ```ignore,no_run
5547    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsRequest;
5548    /// let x = ListNetworkPeeringsRequest::new().set_page_size(42);
5549    /// ```
5550    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5551        self.page_size = v.into();
5552        self
5553    }
5554
5555    /// Sets the value of [page_token][crate::model::ListNetworkPeeringsRequest::page_token].
5556    ///
5557    /// # Example
5558    /// ```ignore,no_run
5559    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsRequest;
5560    /// let x = ListNetworkPeeringsRequest::new().set_page_token("example");
5561    /// ```
5562    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5563        self.page_token = v.into();
5564        self
5565    }
5566
5567    /// Sets the value of [filter][crate::model::ListNetworkPeeringsRequest::filter].
5568    ///
5569    /// # Example
5570    /// ```ignore,no_run
5571    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsRequest;
5572    /// let x = ListNetworkPeeringsRequest::new().set_filter("example");
5573    /// ```
5574    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5575        self.filter = v.into();
5576        self
5577    }
5578
5579    /// Sets the value of [order_by][crate::model::ListNetworkPeeringsRequest::order_by].
5580    ///
5581    /// # Example
5582    /// ```ignore,no_run
5583    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsRequest;
5584    /// let x = ListNetworkPeeringsRequest::new().set_order_by("example");
5585    /// ```
5586    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5587        self.order_by = v.into();
5588        self
5589    }
5590}
5591
5592impl wkt::message::Message for ListNetworkPeeringsRequest {
5593    fn typename() -> &'static str {
5594        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest"
5595    }
5596}
5597
5598/// Request message for
5599/// [VmwareEngine.UpdateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]
5600///
5601/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]: crate::client::VmwareEngine::update_network_peering
5602#[derive(Clone, Default, PartialEq)]
5603#[non_exhaustive]
5604pub struct UpdateNetworkPeeringRequest {
5605    /// Required. Network peering description.
5606    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
5607
5608    /// Required. Field mask is used to specify the fields to be overwritten in the
5609    /// `NetworkPeering` resource by the update.
5610    /// The fields specified in the `update_mask` are relative to the resource, not
5611    /// the full request. A field will be overwritten if it is in the mask. If the
5612    /// user does not provide a mask then all fields will be overwritten.
5613    pub update_mask: std::option::Option<wkt::FieldMask>,
5614
5615    /// Optional. A request ID to identify requests. Specify a unique request ID
5616    /// so that if you must retry your request, the server will know to ignore
5617    /// the request if it has already been completed. The server guarantees that a
5618    /// request doesn't result in creation of duplicate commitments for at least 60
5619    /// minutes.
5620    ///
5621    /// For example, consider a situation where you make an initial request and the
5622    /// request times out. If you make the request again with the same request
5623    /// ID, the server can check if original operation with the same request ID
5624    /// was received, and if so, will ignore the second request. This prevents
5625    /// clients from accidentally creating duplicate commitments.
5626    ///
5627    /// The request ID must be a valid UUID with the exception that zero UUID is
5628    /// not supported (00000000-0000-0000-0000-000000000000).
5629    pub request_id: std::string::String,
5630
5631    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5632}
5633
5634impl UpdateNetworkPeeringRequest {
5635    /// Creates a new default instance.
5636    pub fn new() -> Self {
5637        std::default::Default::default()
5638    }
5639
5640    /// Sets the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
5641    ///
5642    /// # Example
5643    /// ```ignore,no_run
5644    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPeeringRequest;
5645    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
5646    /// let x = UpdateNetworkPeeringRequest::new().set_network_peering(NetworkPeering::default()/* use setters */);
5647    /// ```
5648    pub fn set_network_peering<T>(mut self, v: T) -> Self
5649    where
5650        T: std::convert::Into<crate::model::NetworkPeering>,
5651    {
5652        self.network_peering = std::option::Option::Some(v.into());
5653        self
5654    }
5655
5656    /// Sets or clears the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
5657    ///
5658    /// # Example
5659    /// ```ignore,no_run
5660    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPeeringRequest;
5661    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
5662    /// let x = UpdateNetworkPeeringRequest::new().set_or_clear_network_peering(Some(NetworkPeering::default()/* use setters */));
5663    /// let x = UpdateNetworkPeeringRequest::new().set_or_clear_network_peering(None::<NetworkPeering>);
5664    /// ```
5665    pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
5666    where
5667        T: std::convert::Into<crate::model::NetworkPeering>,
5668    {
5669        self.network_peering = v.map(|x| x.into());
5670        self
5671    }
5672
5673    /// Sets the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
5674    ///
5675    /// # Example
5676    /// ```ignore,no_run
5677    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPeeringRequest;
5678    /// use wkt::FieldMask;
5679    /// let x = UpdateNetworkPeeringRequest::new().set_update_mask(FieldMask::default()/* use setters */);
5680    /// ```
5681    pub fn set_update_mask<T>(mut self, v: T) -> Self
5682    where
5683        T: std::convert::Into<wkt::FieldMask>,
5684    {
5685        self.update_mask = std::option::Option::Some(v.into());
5686        self
5687    }
5688
5689    /// Sets or clears the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
5690    ///
5691    /// # Example
5692    /// ```ignore,no_run
5693    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPeeringRequest;
5694    /// use wkt::FieldMask;
5695    /// let x = UpdateNetworkPeeringRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
5696    /// let x = UpdateNetworkPeeringRequest::new().set_or_clear_update_mask(None::<FieldMask>);
5697    /// ```
5698    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5699    where
5700        T: std::convert::Into<wkt::FieldMask>,
5701    {
5702        self.update_mask = v.map(|x| x.into());
5703        self
5704    }
5705
5706    /// Sets the value of [request_id][crate::model::UpdateNetworkPeeringRequest::request_id].
5707    ///
5708    /// # Example
5709    /// ```ignore,no_run
5710    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPeeringRequest;
5711    /// let x = UpdateNetworkPeeringRequest::new().set_request_id("example");
5712    /// ```
5713    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5714        self.request_id = v.into();
5715        self
5716    }
5717}
5718
5719impl wkt::message::Message for UpdateNetworkPeeringRequest {
5720    fn typename() -> &'static str {
5721        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest"
5722    }
5723}
5724
5725/// Response message for
5726/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
5727///
5728/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
5729#[derive(Clone, Default, PartialEq)]
5730#[non_exhaustive]
5731pub struct ListNetworkPeeringsResponse {
5732    /// A list of network peerings.
5733    pub network_peerings: std::vec::Vec<crate::model::NetworkPeering>,
5734
5735    /// A token, which can be sent as `page_token` to retrieve the next page.
5736    /// If this field is omitted, there are no subsequent pages.
5737    pub next_page_token: std::string::String,
5738
5739    /// Unreachable resources.
5740    pub unreachable: std::vec::Vec<std::string::String>,
5741
5742    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5743}
5744
5745impl ListNetworkPeeringsResponse {
5746    /// Creates a new default instance.
5747    pub fn new() -> Self {
5748        std::default::Default::default()
5749    }
5750
5751    /// Sets the value of [network_peerings][crate::model::ListNetworkPeeringsResponse::network_peerings].
5752    ///
5753    /// # Example
5754    /// ```ignore,no_run
5755    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsResponse;
5756    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
5757    /// let x = ListNetworkPeeringsResponse::new()
5758    ///     .set_network_peerings([
5759    ///         NetworkPeering::default()/* use setters */,
5760    ///         NetworkPeering::default()/* use (different) setters */,
5761    ///     ]);
5762    /// ```
5763    pub fn set_network_peerings<T, V>(mut self, v: T) -> Self
5764    where
5765        T: std::iter::IntoIterator<Item = V>,
5766        V: std::convert::Into<crate::model::NetworkPeering>,
5767    {
5768        use std::iter::Iterator;
5769        self.network_peerings = v.into_iter().map(|i| i.into()).collect();
5770        self
5771    }
5772
5773    /// Sets the value of [next_page_token][crate::model::ListNetworkPeeringsResponse::next_page_token].
5774    ///
5775    /// # Example
5776    /// ```ignore,no_run
5777    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsResponse;
5778    /// let x = ListNetworkPeeringsResponse::new().set_next_page_token("example");
5779    /// ```
5780    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5781        self.next_page_token = v.into();
5782        self
5783    }
5784
5785    /// Sets the value of [unreachable][crate::model::ListNetworkPeeringsResponse::unreachable].
5786    ///
5787    /// # Example
5788    /// ```ignore,no_run
5789    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPeeringsResponse;
5790    /// let x = ListNetworkPeeringsResponse::new().set_unreachable(["a", "b", "c"]);
5791    /// ```
5792    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5793    where
5794        T: std::iter::IntoIterator<Item = V>,
5795        V: std::convert::Into<std::string::String>,
5796    {
5797        use std::iter::Iterator;
5798        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5799        self
5800    }
5801}
5802
5803impl wkt::message::Message for ListNetworkPeeringsResponse {
5804    fn typename() -> &'static str {
5805        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsResponse"
5806    }
5807}
5808
5809#[doc(hidden)]
5810impl google_cloud_gax::paginator::internal::PageableResponse for ListNetworkPeeringsResponse {
5811    type PageItem = crate::model::NetworkPeering;
5812
5813    fn items(self) -> std::vec::Vec<Self::PageItem> {
5814        self.network_peerings
5815    }
5816
5817    fn next_page_token(&self) -> std::string::String {
5818        use std::clone::Clone;
5819        self.next_page_token.clone()
5820    }
5821}
5822
5823/// Request message for
5824/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
5825///
5826/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
5827#[derive(Clone, Default, PartialEq)]
5828#[non_exhaustive]
5829pub struct ListPeeringRoutesRequest {
5830    /// Required. The resource name of the network peering to retrieve peering
5831    /// routes from. Resource names are schemeless URIs that follow the conventions
5832    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
5833    /// `projects/my-project/locations/global/networkPeerings/my-peering`
5834    pub parent: std::string::String,
5835
5836    /// The maximum number of peering routes to return in one page.
5837    /// The service may return fewer than this value.
5838    /// The maximum value is coerced to 1000.
5839    /// The default value of this field is 500.
5840    pub page_size: i32,
5841
5842    /// A page token, received from a previous `ListPeeringRoutes` call.
5843    /// Provide this to retrieve the subsequent page.
5844    /// When paginating, all other parameters provided to `ListPeeringRoutes` must
5845    /// match the call that provided the page token.
5846    pub page_token: std::string::String,
5847
5848    /// A filter expression that matches resources returned in the response.
5849    /// Currently, only filtering on the `direction` field is supported. To return
5850    /// routes imported from the peer network, provide "direction=INCOMING". To
5851    /// return routes exported from the VMware Engine network, provide
5852    /// "direction=OUTGOING". Other filter expressions return an error.
5853    pub filter: std::string::String,
5854
5855    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5856}
5857
5858impl ListPeeringRoutesRequest {
5859    /// Creates a new default instance.
5860    pub fn new() -> Self {
5861        std::default::Default::default()
5862    }
5863
5864    /// Sets the value of [parent][crate::model::ListPeeringRoutesRequest::parent].
5865    ///
5866    /// # Example
5867    /// ```ignore,no_run
5868    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesRequest;
5869    /// # let project_id = "project_id";
5870    /// # let location_id = "location_id";
5871    /// # let network_peering_id = "network_peering_id";
5872    /// let x = ListPeeringRoutesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/networkPeerings/{network_peering_id}"));
5873    /// ```
5874    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5875        self.parent = v.into();
5876        self
5877    }
5878
5879    /// Sets the value of [page_size][crate::model::ListPeeringRoutesRequest::page_size].
5880    ///
5881    /// # Example
5882    /// ```ignore,no_run
5883    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesRequest;
5884    /// let x = ListPeeringRoutesRequest::new().set_page_size(42);
5885    /// ```
5886    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5887        self.page_size = v.into();
5888        self
5889    }
5890
5891    /// Sets the value of [page_token][crate::model::ListPeeringRoutesRequest::page_token].
5892    ///
5893    /// # Example
5894    /// ```ignore,no_run
5895    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesRequest;
5896    /// let x = ListPeeringRoutesRequest::new().set_page_token("example");
5897    /// ```
5898    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5899        self.page_token = v.into();
5900        self
5901    }
5902
5903    /// Sets the value of [filter][crate::model::ListPeeringRoutesRequest::filter].
5904    ///
5905    /// # Example
5906    /// ```ignore,no_run
5907    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesRequest;
5908    /// let x = ListPeeringRoutesRequest::new().set_filter("example");
5909    /// ```
5910    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5911        self.filter = v.into();
5912        self
5913    }
5914}
5915
5916impl wkt::message::Message for ListPeeringRoutesRequest {
5917    fn typename() -> &'static str {
5918        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesRequest"
5919    }
5920}
5921
5922/// Response message for
5923/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
5924///
5925/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
5926#[derive(Clone, Default, PartialEq)]
5927#[non_exhaustive]
5928pub struct ListPeeringRoutesResponse {
5929    /// A list of peering routes.
5930    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
5931
5932    /// A token, which can be sent as `page_token` to retrieve the next page.
5933    /// If this field is omitted, there are no subsequent pages.
5934    pub next_page_token: std::string::String,
5935
5936    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5937}
5938
5939impl ListPeeringRoutesResponse {
5940    /// Creates a new default instance.
5941    pub fn new() -> Self {
5942        std::default::Default::default()
5943    }
5944
5945    /// Sets the value of [peering_routes][crate::model::ListPeeringRoutesResponse::peering_routes].
5946    ///
5947    /// # Example
5948    /// ```ignore,no_run
5949    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesResponse;
5950    /// use google_cloud_vmwareengine_v1::model::PeeringRoute;
5951    /// let x = ListPeeringRoutesResponse::new()
5952    ///     .set_peering_routes([
5953    ///         PeeringRoute::default()/* use setters */,
5954    ///         PeeringRoute::default()/* use (different) setters */,
5955    ///     ]);
5956    /// ```
5957    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
5958    where
5959        T: std::iter::IntoIterator<Item = V>,
5960        V: std::convert::Into<crate::model::PeeringRoute>,
5961    {
5962        use std::iter::Iterator;
5963        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
5964        self
5965    }
5966
5967    /// Sets the value of [next_page_token][crate::model::ListPeeringRoutesResponse::next_page_token].
5968    ///
5969    /// # Example
5970    /// ```ignore,no_run
5971    /// # use google_cloud_vmwareengine_v1::model::ListPeeringRoutesResponse;
5972    /// let x = ListPeeringRoutesResponse::new().set_next_page_token("example");
5973    /// ```
5974    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5975        self.next_page_token = v.into();
5976        self
5977    }
5978}
5979
5980impl wkt::message::Message for ListPeeringRoutesResponse {
5981    fn typename() -> &'static str {
5982        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesResponse"
5983    }
5984}
5985
5986#[doc(hidden)]
5987impl google_cloud_gax::paginator::internal::PageableResponse for ListPeeringRoutesResponse {
5988    type PageItem = crate::model::PeeringRoute;
5989
5990    fn items(self) -> std::vec::Vec<Self::PageItem> {
5991        self.peering_routes
5992    }
5993
5994    fn next_page_token(&self) -> std::string::String {
5995        use std::clone::Clone;
5996        self.next_page_token.clone()
5997    }
5998}
5999
6000/// Request message for
6001/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
6002///
6003/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
6004#[derive(Clone, Default, PartialEq)]
6005#[non_exhaustive]
6006pub struct ListNetworkPoliciesRequest {
6007    /// Required. The resource name of the location (region) to query for
6008    /// network policies. Resource names are schemeless URIs that follow the
6009    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
6010    /// example: `projects/my-project/locations/us-central1`
6011    pub parent: std::string::String,
6012
6013    /// The maximum number of network policies to return in one page.
6014    /// The service may return fewer than this value.
6015    /// The maximum value is coerced to 1000.
6016    /// The default value of this field is 500.
6017    pub page_size: i32,
6018
6019    /// A page token, received from a previous `ListNetworkPolicies` call.
6020    /// Provide this to retrieve the subsequent page.
6021    ///
6022    /// When paginating, all other parameters provided to
6023    /// `ListNetworkPolicies` must match the call that provided the page
6024    /// token.
6025    pub page_token: std::string::String,
6026
6027    /// A filter expression that matches resources returned in the response.
6028    /// The expression must specify the field name, a comparison
6029    /// operator, and the value that you want to use for filtering. The value
6030    /// must be a string, a number, or a boolean. The comparison operator
6031    /// must be `=`, `!=`, `>`, or `<`.
6032    ///
6033    /// For example, if you are filtering a list of network policies, you can
6034    /// exclude the ones named `example-policy` by specifying
6035    /// `name != "example-policy"`.
6036    ///
6037    /// To filter on multiple expressions, provide each separate expression within
6038    /// parentheses. For example:
6039    ///
6040    /// ```norust
6041    /// (name = "example-policy")
6042    /// (createTime > "2021-04-12T08:15:10.40Z")
6043    /// ```
6044    ///
6045    /// By default, each expression is an `AND` expression. However, you
6046    /// can include `AND` and `OR` expressions explicitly.
6047    /// For example:
6048    ///
6049    /// ```norust
6050    /// (name = "example-policy-1") AND
6051    /// (createTime > "2021-04-12T08:15:10.40Z") OR
6052    /// (name = "example-policy-2")
6053    /// ```
6054    pub filter: std::string::String,
6055
6056    /// Sorts list results by a certain order. By default, returned results
6057    /// are ordered by `name` in ascending order.
6058    /// You can also sort results in descending order based on the `name` value
6059    /// using `orderBy="name desc"`.
6060    /// Currently, only ordering by `name` is supported.
6061    pub order_by: std::string::String,
6062
6063    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6064}
6065
6066impl ListNetworkPoliciesRequest {
6067    /// Creates a new default instance.
6068    pub fn new() -> Self {
6069        std::default::Default::default()
6070    }
6071
6072    /// Sets the value of [parent][crate::model::ListNetworkPoliciesRequest::parent].
6073    ///
6074    /// # Example
6075    /// ```ignore,no_run
6076    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesRequest;
6077    /// # let project_id = "project_id";
6078    /// # let location_id = "location_id";
6079    /// let x = ListNetworkPoliciesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
6080    /// ```
6081    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6082        self.parent = v.into();
6083        self
6084    }
6085
6086    /// Sets the value of [page_size][crate::model::ListNetworkPoliciesRequest::page_size].
6087    ///
6088    /// # Example
6089    /// ```ignore,no_run
6090    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesRequest;
6091    /// let x = ListNetworkPoliciesRequest::new().set_page_size(42);
6092    /// ```
6093    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6094        self.page_size = v.into();
6095        self
6096    }
6097
6098    /// Sets the value of [page_token][crate::model::ListNetworkPoliciesRequest::page_token].
6099    ///
6100    /// # Example
6101    /// ```ignore,no_run
6102    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesRequest;
6103    /// let x = ListNetworkPoliciesRequest::new().set_page_token("example");
6104    /// ```
6105    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6106        self.page_token = v.into();
6107        self
6108    }
6109
6110    /// Sets the value of [filter][crate::model::ListNetworkPoliciesRequest::filter].
6111    ///
6112    /// # Example
6113    /// ```ignore,no_run
6114    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesRequest;
6115    /// let x = ListNetworkPoliciesRequest::new().set_filter("example");
6116    /// ```
6117    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6118        self.filter = v.into();
6119        self
6120    }
6121
6122    /// Sets the value of [order_by][crate::model::ListNetworkPoliciesRequest::order_by].
6123    ///
6124    /// # Example
6125    /// ```ignore,no_run
6126    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesRequest;
6127    /// let x = ListNetworkPoliciesRequest::new().set_order_by("example");
6128    /// ```
6129    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6130        self.order_by = v.into();
6131        self
6132    }
6133}
6134
6135impl wkt::message::Message for ListNetworkPoliciesRequest {
6136    fn typename() -> &'static str {
6137        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest"
6138    }
6139}
6140
6141/// Response message for
6142/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
6143///
6144/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
6145#[derive(Clone, Default, PartialEq)]
6146#[non_exhaustive]
6147pub struct ListNetworkPoliciesResponse {
6148    /// A list of network policies.
6149    pub network_policies: std::vec::Vec<crate::model::NetworkPolicy>,
6150
6151    /// A token, which can be send as `page_token` to retrieve the next page.
6152    /// If this field is omitted, there are no subsequent pages.
6153    pub next_page_token: std::string::String,
6154
6155    /// Locations that could not be reached when making an aggregated query using
6156    /// wildcards.
6157    pub unreachable: std::vec::Vec<std::string::String>,
6158
6159    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6160}
6161
6162impl ListNetworkPoliciesResponse {
6163    /// Creates a new default instance.
6164    pub fn new() -> Self {
6165        std::default::Default::default()
6166    }
6167
6168    /// Sets the value of [network_policies][crate::model::ListNetworkPoliciesResponse::network_policies].
6169    ///
6170    /// # Example
6171    /// ```ignore,no_run
6172    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesResponse;
6173    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
6174    /// let x = ListNetworkPoliciesResponse::new()
6175    ///     .set_network_policies([
6176    ///         NetworkPolicy::default()/* use setters */,
6177    ///         NetworkPolicy::default()/* use (different) setters */,
6178    ///     ]);
6179    /// ```
6180    pub fn set_network_policies<T, V>(mut self, v: T) -> Self
6181    where
6182        T: std::iter::IntoIterator<Item = V>,
6183        V: std::convert::Into<crate::model::NetworkPolicy>,
6184    {
6185        use std::iter::Iterator;
6186        self.network_policies = v.into_iter().map(|i| i.into()).collect();
6187        self
6188    }
6189
6190    /// Sets the value of [next_page_token][crate::model::ListNetworkPoliciesResponse::next_page_token].
6191    ///
6192    /// # Example
6193    /// ```ignore,no_run
6194    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesResponse;
6195    /// let x = ListNetworkPoliciesResponse::new().set_next_page_token("example");
6196    /// ```
6197    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6198        self.next_page_token = v.into();
6199        self
6200    }
6201
6202    /// Sets the value of [unreachable][crate::model::ListNetworkPoliciesResponse::unreachable].
6203    ///
6204    /// # Example
6205    /// ```ignore,no_run
6206    /// # use google_cloud_vmwareengine_v1::model::ListNetworkPoliciesResponse;
6207    /// let x = ListNetworkPoliciesResponse::new().set_unreachable(["a", "b", "c"]);
6208    /// ```
6209    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6210    where
6211        T: std::iter::IntoIterator<Item = V>,
6212        V: std::convert::Into<std::string::String>,
6213    {
6214        use std::iter::Iterator;
6215        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6216        self
6217    }
6218}
6219
6220impl wkt::message::Message for ListNetworkPoliciesResponse {
6221    fn typename() -> &'static str {
6222        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse"
6223    }
6224}
6225
6226#[doc(hidden)]
6227impl google_cloud_gax::paginator::internal::PageableResponse for ListNetworkPoliciesResponse {
6228    type PageItem = crate::model::NetworkPolicy;
6229
6230    fn items(self) -> std::vec::Vec<Self::PageItem> {
6231        self.network_policies
6232    }
6233
6234    fn next_page_token(&self) -> std::string::String {
6235        use std::clone::Clone;
6236        self.next_page_token.clone()
6237    }
6238}
6239
6240/// Request message for
6241/// [VmwareEngine.GetNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]
6242///
6243/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]: crate::client::VmwareEngine::get_network_policy
6244#[derive(Clone, Default, PartialEq)]
6245#[non_exhaustive]
6246pub struct GetNetworkPolicyRequest {
6247    /// Required. The resource name of the network policy to retrieve.
6248    /// Resource names are schemeless URIs that follow the conventions in
6249    /// <https://cloud.google.com/apis/design/resource_names>.
6250    /// For example:
6251    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
6252    pub name: std::string::String,
6253
6254    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6255}
6256
6257impl GetNetworkPolicyRequest {
6258    /// Creates a new default instance.
6259    pub fn new() -> Self {
6260        std::default::Default::default()
6261    }
6262
6263    /// Sets the value of [name][crate::model::GetNetworkPolicyRequest::name].
6264    ///
6265    /// # Example
6266    /// ```ignore,no_run
6267    /// # use google_cloud_vmwareengine_v1::model::GetNetworkPolicyRequest;
6268    /// # let project_id = "project_id";
6269    /// # let location_id = "location_id";
6270    /// # let network_policy_id = "network_policy_id";
6271    /// let x = GetNetworkPolicyRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}"));
6272    /// ```
6273    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6274        self.name = v.into();
6275        self
6276    }
6277}
6278
6279impl wkt::message::Message for GetNetworkPolicyRequest {
6280    fn typename() -> &'static str {
6281        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPolicyRequest"
6282    }
6283}
6284
6285/// Request message for
6286/// [VmwareEngine.UpdateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]
6287///
6288/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]: crate::client::VmwareEngine::update_network_policy
6289#[derive(Clone, Default, PartialEq)]
6290#[non_exhaustive]
6291pub struct UpdateNetworkPolicyRequest {
6292    /// Required. Network policy description.
6293    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
6294
6295    /// Required. Field mask is used to specify the fields to be overwritten in the
6296    /// `NetworkPolicy` resource by the update.
6297    /// The fields specified in the `update_mask` are relative to the resource, not
6298    /// the full request. A field will be overwritten if it is in the mask. If the
6299    /// user does not provide a mask then all fields will be overwritten.
6300    pub update_mask: std::option::Option<wkt::FieldMask>,
6301
6302    /// Optional. A request ID to identify requests. Specify a unique request ID
6303    /// so that if you must retry your request, the server will know to ignore
6304    /// the request if it has already been completed. The server guarantees that a
6305    /// request doesn't result in creation of duplicate commitments for at least 60
6306    /// minutes.
6307    ///
6308    /// For example, consider a situation where you make an initial request and the
6309    /// request times out. If you make the request again with the same request
6310    /// ID, the server can check if original operation with the same request ID
6311    /// was received, and if so, will ignore the second request. This prevents
6312    /// clients from accidentally creating duplicate commitments.
6313    ///
6314    /// The request ID must be a valid UUID with the exception that zero UUID is
6315    /// not supported (00000000-0000-0000-0000-000000000000).
6316    pub request_id: std::string::String,
6317
6318    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6319}
6320
6321impl UpdateNetworkPolicyRequest {
6322    /// Creates a new default instance.
6323    pub fn new() -> Self {
6324        std::default::Default::default()
6325    }
6326
6327    /// Sets the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
6328    ///
6329    /// # Example
6330    /// ```ignore,no_run
6331    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPolicyRequest;
6332    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
6333    /// let x = UpdateNetworkPolicyRequest::new().set_network_policy(NetworkPolicy::default()/* use setters */);
6334    /// ```
6335    pub fn set_network_policy<T>(mut self, v: T) -> Self
6336    where
6337        T: std::convert::Into<crate::model::NetworkPolicy>,
6338    {
6339        self.network_policy = std::option::Option::Some(v.into());
6340        self
6341    }
6342
6343    /// Sets or clears the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
6344    ///
6345    /// # Example
6346    /// ```ignore,no_run
6347    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPolicyRequest;
6348    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
6349    /// let x = UpdateNetworkPolicyRequest::new().set_or_clear_network_policy(Some(NetworkPolicy::default()/* use setters */));
6350    /// let x = UpdateNetworkPolicyRequest::new().set_or_clear_network_policy(None::<NetworkPolicy>);
6351    /// ```
6352    pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
6353    where
6354        T: std::convert::Into<crate::model::NetworkPolicy>,
6355    {
6356        self.network_policy = v.map(|x| x.into());
6357        self
6358    }
6359
6360    /// Sets the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
6361    ///
6362    /// # Example
6363    /// ```ignore,no_run
6364    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPolicyRequest;
6365    /// use wkt::FieldMask;
6366    /// let x = UpdateNetworkPolicyRequest::new().set_update_mask(FieldMask::default()/* use setters */);
6367    /// ```
6368    pub fn set_update_mask<T>(mut self, v: T) -> Self
6369    where
6370        T: std::convert::Into<wkt::FieldMask>,
6371    {
6372        self.update_mask = std::option::Option::Some(v.into());
6373        self
6374    }
6375
6376    /// Sets or clears the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
6377    ///
6378    /// # Example
6379    /// ```ignore,no_run
6380    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPolicyRequest;
6381    /// use wkt::FieldMask;
6382    /// let x = UpdateNetworkPolicyRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
6383    /// let x = UpdateNetworkPolicyRequest::new().set_or_clear_update_mask(None::<FieldMask>);
6384    /// ```
6385    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6386    where
6387        T: std::convert::Into<wkt::FieldMask>,
6388    {
6389        self.update_mask = v.map(|x| x.into());
6390        self
6391    }
6392
6393    /// Sets the value of [request_id][crate::model::UpdateNetworkPolicyRequest::request_id].
6394    ///
6395    /// # Example
6396    /// ```ignore,no_run
6397    /// # use google_cloud_vmwareengine_v1::model::UpdateNetworkPolicyRequest;
6398    /// let x = UpdateNetworkPolicyRequest::new().set_request_id("example");
6399    /// ```
6400    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6401        self.request_id = v.into();
6402        self
6403    }
6404}
6405
6406impl wkt::message::Message for UpdateNetworkPolicyRequest {
6407    fn typename() -> &'static str {
6408        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest"
6409    }
6410}
6411
6412/// Request message for
6413/// [VmwareEngine.CreateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]
6414///
6415/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]: crate::client::VmwareEngine::create_network_policy
6416#[derive(Clone, Default, PartialEq)]
6417#[non_exhaustive]
6418pub struct CreateNetworkPolicyRequest {
6419    /// Required. The resource name of the location (region)
6420    /// to create the new network policy in.
6421    /// Resource names are schemeless URIs that follow the conventions in
6422    /// <https://cloud.google.com/apis/design/resource_names>.
6423    /// For example:
6424    /// `projects/my-project/locations/us-central1`
6425    pub parent: std::string::String,
6426
6427    /// Required. The user-provided identifier of the network policy to be created.
6428    /// This identifier must be unique within parent
6429    /// `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes
6430    /// the final token in the name URI.
6431    /// The identifier must meet the following requirements:
6432    ///
6433    /// * Only contains 1-63 alphanumeric characters and hyphens
6434    /// * Begins with an alphabetical character
6435    /// * Ends with a non-hyphen character
6436    /// * Not formatted as a UUID
6437    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
6438    ///   (section 3.5)
6439    pub network_policy_id: std::string::String,
6440
6441    /// Required. The network policy configuration to use in the request.
6442    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
6443
6444    /// Optional. A request ID to identify requests. Specify a unique request ID
6445    /// so that if you must retry your request, the server will know to ignore
6446    /// the request if it has already been completed. The server guarantees that a
6447    /// request doesn't result in creation of duplicate commitments for at least 60
6448    /// minutes.
6449    ///
6450    /// For example, consider a situation where you make an initial request and the
6451    /// request times out. If you make the request again with the same request
6452    /// ID, the server can check if original operation with the same request ID
6453    /// was received, and if so, will ignore the second request. This prevents
6454    /// clients from accidentally creating duplicate commitments.
6455    ///
6456    /// The request ID must be a valid UUID with the exception that zero UUID is
6457    /// not supported (00000000-0000-0000-0000-000000000000).
6458    pub request_id: std::string::String,
6459
6460    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6461}
6462
6463impl CreateNetworkPolicyRequest {
6464    /// Creates a new default instance.
6465    pub fn new() -> Self {
6466        std::default::Default::default()
6467    }
6468
6469    /// Sets the value of [parent][crate::model::CreateNetworkPolicyRequest::parent].
6470    ///
6471    /// # Example
6472    /// ```ignore,no_run
6473    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPolicyRequest;
6474    /// # let project_id = "project_id";
6475    /// # let location_id = "location_id";
6476    /// let x = CreateNetworkPolicyRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
6477    /// ```
6478    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6479        self.parent = v.into();
6480        self
6481    }
6482
6483    /// Sets the value of [network_policy_id][crate::model::CreateNetworkPolicyRequest::network_policy_id].
6484    ///
6485    /// # Example
6486    /// ```ignore,no_run
6487    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPolicyRequest;
6488    /// let x = CreateNetworkPolicyRequest::new().set_network_policy_id("example");
6489    /// ```
6490    pub fn set_network_policy_id<T: std::convert::Into<std::string::String>>(
6491        mut self,
6492        v: T,
6493    ) -> Self {
6494        self.network_policy_id = v.into();
6495        self
6496    }
6497
6498    /// Sets the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
6499    ///
6500    /// # Example
6501    /// ```ignore,no_run
6502    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPolicyRequest;
6503    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
6504    /// let x = CreateNetworkPolicyRequest::new().set_network_policy(NetworkPolicy::default()/* use setters */);
6505    /// ```
6506    pub fn set_network_policy<T>(mut self, v: T) -> Self
6507    where
6508        T: std::convert::Into<crate::model::NetworkPolicy>,
6509    {
6510        self.network_policy = std::option::Option::Some(v.into());
6511        self
6512    }
6513
6514    /// Sets or clears the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
6515    ///
6516    /// # Example
6517    /// ```ignore,no_run
6518    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPolicyRequest;
6519    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
6520    /// let x = CreateNetworkPolicyRequest::new().set_or_clear_network_policy(Some(NetworkPolicy::default()/* use setters */));
6521    /// let x = CreateNetworkPolicyRequest::new().set_or_clear_network_policy(None::<NetworkPolicy>);
6522    /// ```
6523    pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
6524    where
6525        T: std::convert::Into<crate::model::NetworkPolicy>,
6526    {
6527        self.network_policy = v.map(|x| x.into());
6528        self
6529    }
6530
6531    /// Sets the value of [request_id][crate::model::CreateNetworkPolicyRequest::request_id].
6532    ///
6533    /// # Example
6534    /// ```ignore,no_run
6535    /// # use google_cloud_vmwareengine_v1::model::CreateNetworkPolicyRequest;
6536    /// let x = CreateNetworkPolicyRequest::new().set_request_id("example");
6537    /// ```
6538    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6539        self.request_id = v.into();
6540        self
6541    }
6542}
6543
6544impl wkt::message::Message for CreateNetworkPolicyRequest {
6545    fn typename() -> &'static str {
6546        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest"
6547    }
6548}
6549
6550/// Request message for
6551/// [VmwareEngine.DeleteNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]
6552///
6553/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]: crate::client::VmwareEngine::delete_network_policy
6554#[derive(Clone, Default, PartialEq)]
6555#[non_exhaustive]
6556pub struct DeleteNetworkPolicyRequest {
6557    /// Required. The resource name of the network policy to delete.
6558    /// Resource names are schemeless URIs that follow the conventions in
6559    /// <https://cloud.google.com/apis/design/resource_names>.
6560    /// For example:
6561    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
6562    pub name: std::string::String,
6563
6564    /// Optional. A request ID to identify requests. Specify a unique request ID
6565    /// so that if you must retry your request, the server will know to ignore
6566    /// the request if it has already been completed. The server guarantees that a
6567    /// request doesn't result in creation of duplicate commitments for at least 60
6568    /// minutes.
6569    ///
6570    /// For example, consider a situation where you make an initial request and the
6571    /// request times out. If you make the request again with the same request
6572    /// ID, the server can check if original operation with the same request ID
6573    /// was received, and if so, will ignore the second request. This prevents
6574    /// clients from accidentally creating duplicate commitments.
6575    ///
6576    /// The request ID must be a valid UUID with the exception that zero UUID is
6577    /// not supported (00000000-0000-0000-0000-000000000000).
6578    pub request_id: std::string::String,
6579
6580    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6581}
6582
6583impl DeleteNetworkPolicyRequest {
6584    /// Creates a new default instance.
6585    pub fn new() -> Self {
6586        std::default::Default::default()
6587    }
6588
6589    /// Sets the value of [name][crate::model::DeleteNetworkPolicyRequest::name].
6590    ///
6591    /// # Example
6592    /// ```ignore,no_run
6593    /// # use google_cloud_vmwareengine_v1::model::DeleteNetworkPolicyRequest;
6594    /// # let project_id = "project_id";
6595    /// # let location_id = "location_id";
6596    /// # let network_policy_id = "network_policy_id";
6597    /// let x = DeleteNetworkPolicyRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}"));
6598    /// ```
6599    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6600        self.name = v.into();
6601        self
6602    }
6603
6604    /// Sets the value of [request_id][crate::model::DeleteNetworkPolicyRequest::request_id].
6605    ///
6606    /// # Example
6607    /// ```ignore,no_run
6608    /// # use google_cloud_vmwareengine_v1::model::DeleteNetworkPolicyRequest;
6609    /// let x = DeleteNetworkPolicyRequest::new().set_request_id("example");
6610    /// ```
6611    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6612        self.request_id = v.into();
6613        self
6614    }
6615}
6616
6617impl wkt::message::Message for DeleteNetworkPolicyRequest {
6618    fn typename() -> &'static str {
6619        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest"
6620    }
6621}
6622
6623/// Request message for
6624/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
6625///
6626/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
6627#[derive(Clone, Default, PartialEq)]
6628#[non_exhaustive]
6629pub struct ListManagementDnsZoneBindingsRequest {
6630    /// Required. The resource name of the private cloud to be queried for
6631    /// management DNS zone bindings.
6632    /// Resource names are schemeless URIs that follow the conventions in
6633    /// <https://cloud.google.com/apis/design/resource_names>.
6634    /// For example:
6635    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
6636    pub parent: std::string::String,
6637
6638    /// The maximum number of management DNS zone bindings to return in one page.
6639    /// The service may return fewer than this value.
6640    /// The maximum value is coerced to 1000.
6641    /// The default value of this field is 500.
6642    pub page_size: i32,
6643
6644    /// A page token, received from a previous `ListManagementDnsZoneBindings`
6645    /// call. Provide this to retrieve the subsequent page.
6646    ///
6647    /// When paginating, all other parameters provided to
6648    /// `ListManagementDnsZoneBindings` must match the call that provided the page
6649    /// token.
6650    pub page_token: std::string::String,
6651
6652    /// A filter expression that matches resources returned in the response.
6653    /// The expression must specify the field name, a comparison
6654    /// operator, and the value that you want to use for filtering. The value
6655    /// must be a string, a number, or a boolean. The comparison operator
6656    /// must be `=`, `!=`, `>`, or `<`.
6657    ///
6658    /// For example, if you are filtering a list of Management DNS Zone Bindings,
6659    /// you can exclude the ones named `example-management-dns-zone-binding` by
6660    /// specifying `name != "example-management-dns-zone-binding"`.
6661    ///
6662    /// To filter on multiple expressions, provide each separate expression within
6663    /// parentheses. For example:
6664    ///
6665    /// ```norust
6666    /// (name = "example-management-dns-zone-binding")
6667    /// (createTime > "2021-04-12T08:15:10.40Z")
6668    /// ```
6669    ///
6670    /// By default, each expression is an `AND` expression. However, you
6671    /// can include `AND` and `OR` expressions explicitly.
6672    /// For example:
6673    ///
6674    /// ```norust
6675    /// (name = "example-management-dns-zone-binding-1") AND
6676    /// (createTime > "2021-04-12T08:15:10.40Z") OR
6677    /// (name = "example-management-dns-zone-binding-2")
6678    /// ```
6679    pub filter: std::string::String,
6680
6681    /// Sorts list results by a certain order. By default, returned results
6682    /// are ordered by `name` in ascending order.
6683    /// You can also sort results in descending order based on the `name` value
6684    /// using `orderBy="name desc"`.
6685    /// Currently, only ordering by `name` is supported.
6686    pub order_by: std::string::String,
6687
6688    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6689}
6690
6691impl ListManagementDnsZoneBindingsRequest {
6692    /// Creates a new default instance.
6693    pub fn new() -> Self {
6694        std::default::Default::default()
6695    }
6696
6697    /// Sets the value of [parent][crate::model::ListManagementDnsZoneBindingsRequest::parent].
6698    ///
6699    /// # Example
6700    /// ```ignore,no_run
6701    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsRequest;
6702    /// # let project_id = "project_id";
6703    /// # let location_id = "location_id";
6704    /// # let private_cloud_id = "private_cloud_id";
6705    /// let x = ListManagementDnsZoneBindingsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
6706    /// ```
6707    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6708        self.parent = v.into();
6709        self
6710    }
6711
6712    /// Sets the value of [page_size][crate::model::ListManagementDnsZoneBindingsRequest::page_size].
6713    ///
6714    /// # Example
6715    /// ```ignore,no_run
6716    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsRequest;
6717    /// let x = ListManagementDnsZoneBindingsRequest::new().set_page_size(42);
6718    /// ```
6719    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6720        self.page_size = v.into();
6721        self
6722    }
6723
6724    /// Sets the value of [page_token][crate::model::ListManagementDnsZoneBindingsRequest::page_token].
6725    ///
6726    /// # Example
6727    /// ```ignore,no_run
6728    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsRequest;
6729    /// let x = ListManagementDnsZoneBindingsRequest::new().set_page_token("example");
6730    /// ```
6731    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6732        self.page_token = v.into();
6733        self
6734    }
6735
6736    /// Sets the value of [filter][crate::model::ListManagementDnsZoneBindingsRequest::filter].
6737    ///
6738    /// # Example
6739    /// ```ignore,no_run
6740    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsRequest;
6741    /// let x = ListManagementDnsZoneBindingsRequest::new().set_filter("example");
6742    /// ```
6743    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6744        self.filter = v.into();
6745        self
6746    }
6747
6748    /// Sets the value of [order_by][crate::model::ListManagementDnsZoneBindingsRequest::order_by].
6749    ///
6750    /// # Example
6751    /// ```ignore,no_run
6752    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsRequest;
6753    /// let x = ListManagementDnsZoneBindingsRequest::new().set_order_by("example");
6754    /// ```
6755    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6756        self.order_by = v.into();
6757        self
6758    }
6759}
6760
6761impl wkt::message::Message for ListManagementDnsZoneBindingsRequest {
6762    fn typename() -> &'static str {
6763        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest"
6764    }
6765}
6766
6767/// Response message for
6768/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
6769///
6770/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
6771#[derive(Clone, Default, PartialEq)]
6772#[non_exhaustive]
6773pub struct ListManagementDnsZoneBindingsResponse {
6774    /// A list of management DNS zone bindings.
6775    pub management_dns_zone_bindings: std::vec::Vec<crate::model::ManagementDnsZoneBinding>,
6776
6777    /// A token, which can be sent as `page_token` to retrieve the next page.
6778    /// If this field is omitted, there are no subsequent pages.
6779    pub next_page_token: std::string::String,
6780
6781    /// Locations that could not be reached when making an aggregated query using
6782    /// wildcards.
6783    pub unreachable: std::vec::Vec<std::string::String>,
6784
6785    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6786}
6787
6788impl ListManagementDnsZoneBindingsResponse {
6789    /// Creates a new default instance.
6790    pub fn new() -> Self {
6791        std::default::Default::default()
6792    }
6793
6794    /// Sets the value of [management_dns_zone_bindings][crate::model::ListManagementDnsZoneBindingsResponse::management_dns_zone_bindings].
6795    ///
6796    /// # Example
6797    /// ```ignore,no_run
6798    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsResponse;
6799    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
6800    /// let x = ListManagementDnsZoneBindingsResponse::new()
6801    ///     .set_management_dns_zone_bindings([
6802    ///         ManagementDnsZoneBinding::default()/* use setters */,
6803    ///         ManagementDnsZoneBinding::default()/* use (different) setters */,
6804    ///     ]);
6805    /// ```
6806    pub fn set_management_dns_zone_bindings<T, V>(mut self, v: T) -> Self
6807    where
6808        T: std::iter::IntoIterator<Item = V>,
6809        V: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6810    {
6811        use std::iter::Iterator;
6812        self.management_dns_zone_bindings = v.into_iter().map(|i| i.into()).collect();
6813        self
6814    }
6815
6816    /// Sets the value of [next_page_token][crate::model::ListManagementDnsZoneBindingsResponse::next_page_token].
6817    ///
6818    /// # Example
6819    /// ```ignore,no_run
6820    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsResponse;
6821    /// let x = ListManagementDnsZoneBindingsResponse::new().set_next_page_token("example");
6822    /// ```
6823    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6824        self.next_page_token = v.into();
6825        self
6826    }
6827
6828    /// Sets the value of [unreachable][crate::model::ListManagementDnsZoneBindingsResponse::unreachable].
6829    ///
6830    /// # Example
6831    /// ```ignore,no_run
6832    /// # use google_cloud_vmwareengine_v1::model::ListManagementDnsZoneBindingsResponse;
6833    /// let x = ListManagementDnsZoneBindingsResponse::new().set_unreachable(["a", "b", "c"]);
6834    /// ```
6835    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6836    where
6837        T: std::iter::IntoIterator<Item = V>,
6838        V: std::convert::Into<std::string::String>,
6839    {
6840        use std::iter::Iterator;
6841        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6842        self
6843    }
6844}
6845
6846impl wkt::message::Message for ListManagementDnsZoneBindingsResponse {
6847    fn typename() -> &'static str {
6848        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsResponse"
6849    }
6850}
6851
6852#[doc(hidden)]
6853impl google_cloud_gax::paginator::internal::PageableResponse
6854    for ListManagementDnsZoneBindingsResponse
6855{
6856    type PageItem = crate::model::ManagementDnsZoneBinding;
6857
6858    fn items(self) -> std::vec::Vec<Self::PageItem> {
6859        self.management_dns_zone_bindings
6860    }
6861
6862    fn next_page_token(&self) -> std::string::String {
6863        use std::clone::Clone;
6864        self.next_page_token.clone()
6865    }
6866}
6867
6868/// Request message for
6869/// [VmwareEngine.GetManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]
6870///
6871/// [google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]: crate::client::VmwareEngine::get_management_dns_zone_binding
6872#[derive(Clone, Default, PartialEq)]
6873#[non_exhaustive]
6874pub struct GetManagementDnsZoneBindingRequest {
6875    /// Required. The resource name of the management DNS zone binding to
6876    /// retrieve. Resource names are schemeless URIs that follow the conventions in
6877    /// <https://cloud.google.com/apis/design/resource_names>.
6878    /// For example:
6879    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
6880    pub name: std::string::String,
6881
6882    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6883}
6884
6885impl GetManagementDnsZoneBindingRequest {
6886    /// Creates a new default instance.
6887    pub fn new() -> Self {
6888        std::default::Default::default()
6889    }
6890
6891    /// Sets the value of [name][crate::model::GetManagementDnsZoneBindingRequest::name].
6892    ///
6893    /// # Example
6894    /// ```ignore,no_run
6895    /// # use google_cloud_vmwareengine_v1::model::GetManagementDnsZoneBindingRequest;
6896    /// # let project_id = "project_id";
6897    /// # let location_id = "location_id";
6898    /// # let private_cloud_id = "private_cloud_id";
6899    /// # let management_dns_zone_binding_id = "management_dns_zone_binding_id";
6900    /// let x = GetManagementDnsZoneBindingRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/managementDnsZoneBindings/{management_dns_zone_binding_id}"));
6901    /// ```
6902    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6903        self.name = v.into();
6904        self
6905    }
6906}
6907
6908impl wkt::message::Message for GetManagementDnsZoneBindingRequest {
6909    fn typename() -> &'static str {
6910        "type.googleapis.com/google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest"
6911    }
6912}
6913
6914/// Request message for [VmwareEngine.CreateManagementDnsZoneBindings][]
6915#[derive(Clone, Default, PartialEq)]
6916#[non_exhaustive]
6917pub struct CreateManagementDnsZoneBindingRequest {
6918    /// Required. The resource name of the private cloud
6919    /// to create a new management DNS zone binding for.
6920    /// Resource names are schemeless URIs that follow the conventions in
6921    /// <https://cloud.google.com/apis/design/resource_names>.
6922    /// For example:
6923    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
6924    pub parent: std::string::String,
6925
6926    /// Required. The initial values for a new management DNS zone binding.
6927    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
6928
6929    /// Required. The user-provided identifier of the `ManagementDnsZoneBinding`
6930    /// resource to be created. This identifier must be unique among
6931    /// `ManagementDnsZoneBinding` resources within the parent and becomes the
6932    /// final token in the name URI. The identifier must meet the following
6933    /// requirements:
6934    ///
6935    /// * Only contains 1-63 alphanumeric characters and hyphens
6936    /// * Begins with an alphabetical character
6937    /// * Ends with a non-hyphen character
6938    /// * Not formatted as a UUID
6939    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
6940    ///   (section 3.5)
6941    pub management_dns_zone_binding_id: std::string::String,
6942
6943    /// Optional. A request ID to identify requests. Specify a unique request ID
6944    /// so that if you must retry your request, the server will know to ignore
6945    /// the request if it has already been completed. The server guarantees that a
6946    /// request doesn't result in creation of duplicate commitments for at least 60
6947    /// minutes.
6948    ///
6949    /// For example, consider a situation where you make an initial request and the
6950    /// request times out. If you make the request again with the same request ID,
6951    /// the server can check if the original operation with the same request ID was
6952    /// received, and if so, will ignore the second request. This prevents clients
6953    /// from accidentally creating duplicate commitments.
6954    ///
6955    /// The request ID must be a valid UUID with the exception that zero UUID is
6956    /// not supported (00000000-0000-0000-0000-000000000000).
6957    pub request_id: std::string::String,
6958
6959    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6960}
6961
6962impl CreateManagementDnsZoneBindingRequest {
6963    /// Creates a new default instance.
6964    pub fn new() -> Self {
6965        std::default::Default::default()
6966    }
6967
6968    /// Sets the value of [parent][crate::model::CreateManagementDnsZoneBindingRequest::parent].
6969    ///
6970    /// # Example
6971    /// ```ignore,no_run
6972    /// # use google_cloud_vmwareengine_v1::model::CreateManagementDnsZoneBindingRequest;
6973    /// # let project_id = "project_id";
6974    /// # let location_id = "location_id";
6975    /// # let private_cloud_id = "private_cloud_id";
6976    /// let x = CreateManagementDnsZoneBindingRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
6977    /// ```
6978    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6979        self.parent = v.into();
6980        self
6981    }
6982
6983    /// Sets the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
6984    ///
6985    /// # Example
6986    /// ```ignore,no_run
6987    /// # use google_cloud_vmwareengine_v1::model::CreateManagementDnsZoneBindingRequest;
6988    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
6989    /// let x = CreateManagementDnsZoneBindingRequest::new().set_management_dns_zone_binding(ManagementDnsZoneBinding::default()/* use setters */);
6990    /// ```
6991    pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6992    where
6993        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6994    {
6995        self.management_dns_zone_binding = std::option::Option::Some(v.into());
6996        self
6997    }
6998
6999    /// Sets or clears the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
7000    ///
7001    /// # Example
7002    /// ```ignore,no_run
7003    /// # use google_cloud_vmwareengine_v1::model::CreateManagementDnsZoneBindingRequest;
7004    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
7005    /// let x = CreateManagementDnsZoneBindingRequest::new().set_or_clear_management_dns_zone_binding(Some(ManagementDnsZoneBinding::default()/* use setters */));
7006    /// let x = CreateManagementDnsZoneBindingRequest::new().set_or_clear_management_dns_zone_binding(None::<ManagementDnsZoneBinding>);
7007    /// ```
7008    pub fn set_or_clear_management_dns_zone_binding<T>(mut self, v: std::option::Option<T>) -> Self
7009    where
7010        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
7011    {
7012        self.management_dns_zone_binding = v.map(|x| x.into());
7013        self
7014    }
7015
7016    /// Sets the value of [management_dns_zone_binding_id][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding_id].
7017    ///
7018    /// # Example
7019    /// ```ignore,no_run
7020    /// # use google_cloud_vmwareengine_v1::model::CreateManagementDnsZoneBindingRequest;
7021    /// let x = CreateManagementDnsZoneBindingRequest::new().set_management_dns_zone_binding_id("example");
7022    /// ```
7023    pub fn set_management_dns_zone_binding_id<T: std::convert::Into<std::string::String>>(
7024        mut self,
7025        v: T,
7026    ) -> Self {
7027        self.management_dns_zone_binding_id = v.into();
7028        self
7029    }
7030
7031    /// Sets the value of [request_id][crate::model::CreateManagementDnsZoneBindingRequest::request_id].
7032    ///
7033    /// # Example
7034    /// ```ignore,no_run
7035    /// # use google_cloud_vmwareengine_v1::model::CreateManagementDnsZoneBindingRequest;
7036    /// let x = CreateManagementDnsZoneBindingRequest::new().set_request_id("example");
7037    /// ```
7038    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7039        self.request_id = v.into();
7040        self
7041    }
7042}
7043
7044impl wkt::message::Message for CreateManagementDnsZoneBindingRequest {
7045    fn typename() -> &'static str {
7046        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest"
7047    }
7048}
7049
7050/// Request message for
7051/// [VmwareEngine.UpdateManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]
7052///
7053/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]: crate::client::VmwareEngine::update_management_dns_zone_binding
7054#[derive(Clone, Default, PartialEq)]
7055#[non_exhaustive]
7056pub struct UpdateManagementDnsZoneBindingRequest {
7057    /// Required. Field mask is used to specify the fields to be overwritten in the
7058    /// `ManagementDnsZoneBinding` resource by the update.
7059    /// The fields specified in the `update_mask` are relative to the resource, not
7060    /// the full request. A field will be overwritten if it is in the mask. If the
7061    /// user does not provide a mask then all fields will be overwritten.
7062    pub update_mask: std::option::Option<wkt::FieldMask>,
7063
7064    /// Required. New values to update the management DNS zone binding with.
7065    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
7066
7067    /// Optional. A request ID to identify requests. Specify a unique request ID
7068    /// so that if you must retry your request, the server will know to ignore
7069    /// the request if it has already been completed. The server guarantees that a
7070    /// request doesn't result in creation of duplicate commitments for at least 60
7071    /// minutes.
7072    ///
7073    /// For example, consider a situation where you make an initial request and the
7074    /// request times out. If you make the request again with the same request ID,
7075    /// the server can check if the original operation with the same request ID was
7076    /// received, and if so, will ignore the second request. This prevents clients
7077    /// from accidentally creating duplicate commitments.
7078    ///
7079    /// The request ID must be a valid UUID with the exception that zero UUID is
7080    /// not supported (00000000-0000-0000-0000-000000000000).
7081    pub request_id: std::string::String,
7082
7083    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7084}
7085
7086impl UpdateManagementDnsZoneBindingRequest {
7087    /// Creates a new default instance.
7088    pub fn new() -> Self {
7089        std::default::Default::default()
7090    }
7091
7092    /// Sets the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
7093    ///
7094    /// # Example
7095    /// ```ignore,no_run
7096    /// # use google_cloud_vmwareengine_v1::model::UpdateManagementDnsZoneBindingRequest;
7097    /// use wkt::FieldMask;
7098    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7099    /// ```
7100    pub fn set_update_mask<T>(mut self, v: T) -> Self
7101    where
7102        T: std::convert::Into<wkt::FieldMask>,
7103    {
7104        self.update_mask = std::option::Option::Some(v.into());
7105        self
7106    }
7107
7108    /// Sets or clears the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
7109    ///
7110    /// # Example
7111    /// ```ignore,no_run
7112    /// # use google_cloud_vmwareengine_v1::model::UpdateManagementDnsZoneBindingRequest;
7113    /// use wkt::FieldMask;
7114    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7115    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7116    /// ```
7117    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7118    where
7119        T: std::convert::Into<wkt::FieldMask>,
7120    {
7121        self.update_mask = v.map(|x| x.into());
7122        self
7123    }
7124
7125    /// Sets the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
7126    ///
7127    /// # Example
7128    /// ```ignore,no_run
7129    /// # use google_cloud_vmwareengine_v1::model::UpdateManagementDnsZoneBindingRequest;
7130    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
7131    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_management_dns_zone_binding(ManagementDnsZoneBinding::default()/* use setters */);
7132    /// ```
7133    pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
7134    where
7135        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
7136    {
7137        self.management_dns_zone_binding = std::option::Option::Some(v.into());
7138        self
7139    }
7140
7141    /// Sets or clears the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
7142    ///
7143    /// # Example
7144    /// ```ignore,no_run
7145    /// # use google_cloud_vmwareengine_v1::model::UpdateManagementDnsZoneBindingRequest;
7146    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
7147    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_or_clear_management_dns_zone_binding(Some(ManagementDnsZoneBinding::default()/* use setters */));
7148    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_or_clear_management_dns_zone_binding(None::<ManagementDnsZoneBinding>);
7149    /// ```
7150    pub fn set_or_clear_management_dns_zone_binding<T>(mut self, v: std::option::Option<T>) -> Self
7151    where
7152        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
7153    {
7154        self.management_dns_zone_binding = v.map(|x| x.into());
7155        self
7156    }
7157
7158    /// Sets the value of [request_id][crate::model::UpdateManagementDnsZoneBindingRequest::request_id].
7159    ///
7160    /// # Example
7161    /// ```ignore,no_run
7162    /// # use google_cloud_vmwareengine_v1::model::UpdateManagementDnsZoneBindingRequest;
7163    /// let x = UpdateManagementDnsZoneBindingRequest::new().set_request_id("example");
7164    /// ```
7165    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7166        self.request_id = v.into();
7167        self
7168    }
7169}
7170
7171impl wkt::message::Message for UpdateManagementDnsZoneBindingRequest {
7172    fn typename() -> &'static str {
7173        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest"
7174    }
7175}
7176
7177/// Request message for
7178/// [VmwareEngine.DeleteManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]
7179///
7180/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]: crate::client::VmwareEngine::delete_management_dns_zone_binding
7181#[derive(Clone, Default, PartialEq)]
7182#[non_exhaustive]
7183pub struct DeleteManagementDnsZoneBindingRequest {
7184    /// Required. The resource name of the management DNS zone binding to delete.
7185    /// Resource names are schemeless URIs that follow the conventions in
7186    /// <https://cloud.google.com/apis/design/resource_names>.
7187    /// For example:
7188    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
7189    pub name: std::string::String,
7190
7191    /// Optional. A request ID to identify requests. Specify a unique request ID
7192    /// so that if you must retry your request, the server will know to ignore
7193    /// the request if it has already been completed. The server guarantees that a
7194    /// request doesn't result in creation of duplicate commitments for at least 60
7195    /// minutes.
7196    ///
7197    /// For example, consider a situation where you make an initial request and the
7198    /// request times out. If you make the request again with the same request
7199    /// ID, the server can check if the original operation with the same request ID
7200    /// was received, and if so, will ignore the second request. This prevents
7201    /// clients from accidentally creating duplicate commitments.
7202    ///
7203    /// The request ID must be a valid UUID with the exception that zero UUID is
7204    /// not supported (00000000-0000-0000-0000-000000000000).
7205    pub request_id: std::string::String,
7206
7207    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7208}
7209
7210impl DeleteManagementDnsZoneBindingRequest {
7211    /// Creates a new default instance.
7212    pub fn new() -> Self {
7213        std::default::Default::default()
7214    }
7215
7216    /// Sets the value of [name][crate::model::DeleteManagementDnsZoneBindingRequest::name].
7217    ///
7218    /// # Example
7219    /// ```ignore,no_run
7220    /// # use google_cloud_vmwareengine_v1::model::DeleteManagementDnsZoneBindingRequest;
7221    /// # let project_id = "project_id";
7222    /// # let location_id = "location_id";
7223    /// # let private_cloud_id = "private_cloud_id";
7224    /// # let management_dns_zone_binding_id = "management_dns_zone_binding_id";
7225    /// let x = DeleteManagementDnsZoneBindingRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/managementDnsZoneBindings/{management_dns_zone_binding_id}"));
7226    /// ```
7227    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7228        self.name = v.into();
7229        self
7230    }
7231
7232    /// Sets the value of [request_id][crate::model::DeleteManagementDnsZoneBindingRequest::request_id].
7233    ///
7234    /// # Example
7235    /// ```ignore,no_run
7236    /// # use google_cloud_vmwareengine_v1::model::DeleteManagementDnsZoneBindingRequest;
7237    /// let x = DeleteManagementDnsZoneBindingRequest::new().set_request_id("example");
7238    /// ```
7239    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7240        self.request_id = v.into();
7241        self
7242    }
7243}
7244
7245impl wkt::message::Message for DeleteManagementDnsZoneBindingRequest {
7246    fn typename() -> &'static str {
7247        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest"
7248    }
7249}
7250
7251/// Request message for [VmwareEngine.RepairManagementDnsZoneBindings][]
7252#[derive(Clone, Default, PartialEq)]
7253#[non_exhaustive]
7254pub struct RepairManagementDnsZoneBindingRequest {
7255    /// Required. The resource name of the management DNS zone binding to repair.
7256    /// Resource names are schemeless URIs that follow the conventions in
7257    /// <https://cloud.google.com/apis/design/resource_names>.
7258    /// For example:
7259    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
7260    pub name: std::string::String,
7261
7262    /// Optional. A request ID to identify requests. Specify a unique request ID
7263    /// so that if you must retry your request, the server will know to ignore
7264    /// the request if it has already been completed. The server guarantees that a
7265    /// request doesn't result in creation of duplicate commitments for at least 60
7266    /// minutes.
7267    ///
7268    /// For example, consider a situation where you make an initial request and the
7269    /// request times out. If you make the request again with the same request ID,
7270    /// the server can check if the original operation with the same request ID was
7271    /// received, and if so, will ignore the second request. This prevents clients
7272    /// from accidentally creating duplicate commitments.
7273    ///
7274    /// The request ID must be a valid UUID with the exception that zero UUID is
7275    /// not supported (00000000-0000-0000-0000-000000000000).
7276    pub request_id: std::string::String,
7277
7278    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7279}
7280
7281impl RepairManagementDnsZoneBindingRequest {
7282    /// Creates a new default instance.
7283    pub fn new() -> Self {
7284        std::default::Default::default()
7285    }
7286
7287    /// Sets the value of [name][crate::model::RepairManagementDnsZoneBindingRequest::name].
7288    ///
7289    /// # Example
7290    /// ```ignore,no_run
7291    /// # use google_cloud_vmwareengine_v1::model::RepairManagementDnsZoneBindingRequest;
7292    /// # let project_id = "project_id";
7293    /// # let location_id = "location_id";
7294    /// # let private_cloud_id = "private_cloud_id";
7295    /// # let management_dns_zone_binding_id = "management_dns_zone_binding_id";
7296    /// let x = RepairManagementDnsZoneBindingRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/managementDnsZoneBindings/{management_dns_zone_binding_id}"));
7297    /// ```
7298    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7299        self.name = v.into();
7300        self
7301    }
7302
7303    /// Sets the value of [request_id][crate::model::RepairManagementDnsZoneBindingRequest::request_id].
7304    ///
7305    /// # Example
7306    /// ```ignore,no_run
7307    /// # use google_cloud_vmwareengine_v1::model::RepairManagementDnsZoneBindingRequest;
7308    /// let x = RepairManagementDnsZoneBindingRequest::new().set_request_id("example");
7309    /// ```
7310    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7311        self.request_id = v.into();
7312        self
7313    }
7314}
7315
7316impl wkt::message::Message for RepairManagementDnsZoneBindingRequest {
7317    fn typename() -> &'static str {
7318        "type.googleapis.com/google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest"
7319    }
7320}
7321
7322/// Request message for
7323/// [VmwareEngine.CreateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]
7324///
7325/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]: crate::client::VmwareEngine::create_vmware_engine_network
7326#[derive(Clone, Default, PartialEq)]
7327#[non_exhaustive]
7328pub struct CreateVmwareEngineNetworkRequest {
7329    /// Required. The resource name of the location to create the new VMware Engine
7330    /// network in. A VMware Engine network of type
7331    /// `LEGACY` is a regional resource, and a VMware
7332    /// Engine network of type `STANDARD` is a global resource.
7333    /// Resource names are schemeless URIs that follow the conventions in
7334    /// <https://cloud.google.com/apis/design/resource_names>. For example:
7335    /// `projects/my-project/locations/global`
7336    pub parent: std::string::String,
7337
7338    /// Required. The user-provided identifier of the new VMware Engine network.
7339    /// This identifier must be unique among VMware Engine network resources
7340    /// within the parent and becomes the final token in the name URI. The
7341    /// identifier must meet the following requirements:
7342    ///
7343    /// * For networks of type LEGACY, adheres to the format:
7344    ///   `{region-id}-default`. Replace `{region-id}` with the region where you want
7345    ///   to create the VMware Engine network. For example, "us-central1-default".
7346    /// * Only contains 1-63 alphanumeric characters and hyphens
7347    /// * Begins with an alphabetical character
7348    /// * Ends with a non-hyphen character
7349    /// * Not formatted as a UUID
7350    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
7351    ///   (section 3.5)
7352    pub vmware_engine_network_id: std::string::String,
7353
7354    /// Required. The initial description of the new VMware Engine network.
7355    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
7356
7357    /// Optional. A request ID to identify requests. Specify a unique request ID
7358    /// so that if you must retry your request, the server will know to ignore
7359    /// the request if it has already been completed. The server guarantees that a
7360    /// request doesn't result in creation of duplicate commitments for at least 60
7361    /// minutes.
7362    ///
7363    /// For example, consider a situation where you make an initial request and the
7364    /// request times out. If you make the request again with the same request
7365    /// ID, the server can check if original operation with the same request ID
7366    /// was received, and if so, will ignore the second request. This prevents
7367    /// clients from accidentally creating duplicate commitments.
7368    ///
7369    /// The request ID must be a valid UUID with the exception that zero UUID is
7370    /// not supported (00000000-0000-0000-0000-000000000000).
7371    pub request_id: std::string::String,
7372
7373    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7374}
7375
7376impl CreateVmwareEngineNetworkRequest {
7377    /// Creates a new default instance.
7378    pub fn new() -> Self {
7379        std::default::Default::default()
7380    }
7381
7382    /// Sets the value of [parent][crate::model::CreateVmwareEngineNetworkRequest::parent].
7383    ///
7384    /// # Example
7385    /// ```ignore,no_run
7386    /// # use google_cloud_vmwareengine_v1::model::CreateVmwareEngineNetworkRequest;
7387    /// # let project_id = "project_id";
7388    /// # let location_id = "location_id";
7389    /// let x = CreateVmwareEngineNetworkRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
7390    /// ```
7391    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7392        self.parent = v.into();
7393        self
7394    }
7395
7396    /// Sets the value of [vmware_engine_network_id][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network_id].
7397    ///
7398    /// # Example
7399    /// ```ignore,no_run
7400    /// # use google_cloud_vmwareengine_v1::model::CreateVmwareEngineNetworkRequest;
7401    /// let x = CreateVmwareEngineNetworkRequest::new().set_vmware_engine_network_id("example");
7402    /// ```
7403    pub fn set_vmware_engine_network_id<T: std::convert::Into<std::string::String>>(
7404        mut self,
7405        v: T,
7406    ) -> Self {
7407        self.vmware_engine_network_id = v.into();
7408        self
7409    }
7410
7411    /// Sets the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
7412    ///
7413    /// # Example
7414    /// ```ignore,no_run
7415    /// # use google_cloud_vmwareengine_v1::model::CreateVmwareEngineNetworkRequest;
7416    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
7417    /// let x = CreateVmwareEngineNetworkRequest::new().set_vmware_engine_network(VmwareEngineNetwork::default()/* use setters */);
7418    /// ```
7419    pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7420    where
7421        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7422    {
7423        self.vmware_engine_network = std::option::Option::Some(v.into());
7424        self
7425    }
7426
7427    /// Sets or clears the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
7428    ///
7429    /// # Example
7430    /// ```ignore,no_run
7431    /// # use google_cloud_vmwareengine_v1::model::CreateVmwareEngineNetworkRequest;
7432    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
7433    /// let x = CreateVmwareEngineNetworkRequest::new().set_or_clear_vmware_engine_network(Some(VmwareEngineNetwork::default()/* use setters */));
7434    /// let x = CreateVmwareEngineNetworkRequest::new().set_or_clear_vmware_engine_network(None::<VmwareEngineNetwork>);
7435    /// ```
7436    pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7437    where
7438        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7439    {
7440        self.vmware_engine_network = v.map(|x| x.into());
7441        self
7442    }
7443
7444    /// Sets the value of [request_id][crate::model::CreateVmwareEngineNetworkRequest::request_id].
7445    ///
7446    /// # Example
7447    /// ```ignore,no_run
7448    /// # use google_cloud_vmwareengine_v1::model::CreateVmwareEngineNetworkRequest;
7449    /// let x = CreateVmwareEngineNetworkRequest::new().set_request_id("example");
7450    /// ```
7451    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7452        self.request_id = v.into();
7453        self
7454    }
7455}
7456
7457impl wkt::message::Message for CreateVmwareEngineNetworkRequest {
7458    fn typename() -> &'static str {
7459        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest"
7460    }
7461}
7462
7463/// Request message for
7464/// [VmwareEngine.UpdateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]
7465///
7466/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]: crate::client::VmwareEngine::update_vmware_engine_network
7467#[derive(Clone, Default, PartialEq)]
7468#[non_exhaustive]
7469pub struct UpdateVmwareEngineNetworkRequest {
7470    /// Required. VMware Engine network description.
7471    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
7472
7473    /// Required. Field mask is used to specify the fields to be overwritten in the
7474    /// VMware Engine network resource by the update.
7475    /// The fields specified in the `update_mask` are relative to the resource, not
7476    /// the full request. A field will be overwritten if it is in the mask. If the
7477    /// user does not provide a mask then all fields will be overwritten. Only the
7478    /// following fields can be updated: `description`.
7479    pub update_mask: std::option::Option<wkt::FieldMask>,
7480
7481    /// Optional. A request ID to identify requests. Specify a unique request ID
7482    /// so that if you must retry your request, the server will know to ignore
7483    /// the request if it has already been completed. The server guarantees that a
7484    /// request doesn't result in creation of duplicate commitments for at least 60
7485    /// minutes.
7486    ///
7487    /// For example, consider a situation where you make an initial request and the
7488    /// request times out. If you make the request again with the same request
7489    /// ID, the server can check if original operation with the same request ID
7490    /// was received, and if so, will ignore the second request. This prevents
7491    /// clients from accidentally creating duplicate commitments.
7492    ///
7493    /// The request ID must be a valid UUID with the exception that zero UUID is
7494    /// not supported (00000000-0000-0000-0000-000000000000).
7495    pub request_id: std::string::String,
7496
7497    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7498}
7499
7500impl UpdateVmwareEngineNetworkRequest {
7501    /// Creates a new default instance.
7502    pub fn new() -> Self {
7503        std::default::Default::default()
7504    }
7505
7506    /// Sets the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
7507    ///
7508    /// # Example
7509    /// ```ignore,no_run
7510    /// # use google_cloud_vmwareengine_v1::model::UpdateVmwareEngineNetworkRequest;
7511    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
7512    /// let x = UpdateVmwareEngineNetworkRequest::new().set_vmware_engine_network(VmwareEngineNetwork::default()/* use setters */);
7513    /// ```
7514    pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7515    where
7516        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7517    {
7518        self.vmware_engine_network = std::option::Option::Some(v.into());
7519        self
7520    }
7521
7522    /// Sets or clears the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
7523    ///
7524    /// # Example
7525    /// ```ignore,no_run
7526    /// # use google_cloud_vmwareengine_v1::model::UpdateVmwareEngineNetworkRequest;
7527    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
7528    /// let x = UpdateVmwareEngineNetworkRequest::new().set_or_clear_vmware_engine_network(Some(VmwareEngineNetwork::default()/* use setters */));
7529    /// let x = UpdateVmwareEngineNetworkRequest::new().set_or_clear_vmware_engine_network(None::<VmwareEngineNetwork>);
7530    /// ```
7531    pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7532    where
7533        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7534    {
7535        self.vmware_engine_network = v.map(|x| x.into());
7536        self
7537    }
7538
7539    /// Sets the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
7540    ///
7541    /// # Example
7542    /// ```ignore,no_run
7543    /// # use google_cloud_vmwareengine_v1::model::UpdateVmwareEngineNetworkRequest;
7544    /// use wkt::FieldMask;
7545    /// let x = UpdateVmwareEngineNetworkRequest::new().set_update_mask(FieldMask::default()/* use setters */);
7546    /// ```
7547    pub fn set_update_mask<T>(mut self, v: T) -> Self
7548    where
7549        T: std::convert::Into<wkt::FieldMask>,
7550    {
7551        self.update_mask = std::option::Option::Some(v.into());
7552        self
7553    }
7554
7555    /// Sets or clears the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
7556    ///
7557    /// # Example
7558    /// ```ignore,no_run
7559    /// # use google_cloud_vmwareengine_v1::model::UpdateVmwareEngineNetworkRequest;
7560    /// use wkt::FieldMask;
7561    /// let x = UpdateVmwareEngineNetworkRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
7562    /// let x = UpdateVmwareEngineNetworkRequest::new().set_or_clear_update_mask(None::<FieldMask>);
7563    /// ```
7564    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7565    where
7566        T: std::convert::Into<wkt::FieldMask>,
7567    {
7568        self.update_mask = v.map(|x| x.into());
7569        self
7570    }
7571
7572    /// Sets the value of [request_id][crate::model::UpdateVmwareEngineNetworkRequest::request_id].
7573    ///
7574    /// # Example
7575    /// ```ignore,no_run
7576    /// # use google_cloud_vmwareengine_v1::model::UpdateVmwareEngineNetworkRequest;
7577    /// let x = UpdateVmwareEngineNetworkRequest::new().set_request_id("example");
7578    /// ```
7579    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7580        self.request_id = v.into();
7581        self
7582    }
7583}
7584
7585impl wkt::message::Message for UpdateVmwareEngineNetworkRequest {
7586    fn typename() -> &'static str {
7587        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest"
7588    }
7589}
7590
7591/// Request message for
7592/// [VmwareEngine.DeleteVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]
7593///
7594/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]: crate::client::VmwareEngine::delete_vmware_engine_network
7595#[derive(Clone, Default, PartialEq)]
7596#[non_exhaustive]
7597pub struct DeleteVmwareEngineNetworkRequest {
7598    /// Required. The resource name of the VMware Engine network to be deleted.
7599    /// Resource names are schemeless URIs that follow the conventions in
7600    /// <https://cloud.google.com/apis/design/resource_names>.
7601    /// For example:
7602    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
7603    pub name: std::string::String,
7604
7605    /// Optional. A request ID to identify requests. Specify a unique request ID
7606    /// so that if you must retry your request, the server will know to ignore
7607    /// the request if it has already been completed. The server guarantees that a
7608    /// request doesn't result in creation of duplicate commitments for at least 60
7609    /// minutes.
7610    ///
7611    /// For example, consider a situation where you make an initial request and the
7612    /// request times out. If you make the request again with the same request
7613    /// ID, the server can check if original operation with the same request ID
7614    /// was received, and if so, will ignore the second request. This prevents
7615    /// clients from accidentally creating duplicate commitments.
7616    ///
7617    /// The request ID must be a valid UUID with the exception that zero UUID is
7618    /// not supported (00000000-0000-0000-0000-000000000000).
7619    pub request_id: std::string::String,
7620
7621    /// Optional. Checksum used to ensure that the user-provided value is up to
7622    /// date before the server processes the request. The server compares provided
7623    /// checksum with the current checksum of the resource. If the user-provided
7624    /// value is out of date, this request returns an `ABORTED` error.
7625    pub etag: std::string::String,
7626
7627    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7628}
7629
7630impl DeleteVmwareEngineNetworkRequest {
7631    /// Creates a new default instance.
7632    pub fn new() -> Self {
7633        std::default::Default::default()
7634    }
7635
7636    /// Sets the value of [name][crate::model::DeleteVmwareEngineNetworkRequest::name].
7637    ///
7638    /// # Example
7639    /// ```ignore,no_run
7640    /// # use google_cloud_vmwareengine_v1::model::DeleteVmwareEngineNetworkRequest;
7641    /// # let project_id = "project_id";
7642    /// # let location_id = "location_id";
7643    /// # let vmware_engine_network_id = "vmware_engine_network_id";
7644    /// let x = DeleteVmwareEngineNetworkRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"));
7645    /// ```
7646    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7647        self.name = v.into();
7648        self
7649    }
7650
7651    /// Sets the value of [request_id][crate::model::DeleteVmwareEngineNetworkRequest::request_id].
7652    ///
7653    /// # Example
7654    /// ```ignore,no_run
7655    /// # use google_cloud_vmwareengine_v1::model::DeleteVmwareEngineNetworkRequest;
7656    /// let x = DeleteVmwareEngineNetworkRequest::new().set_request_id("example");
7657    /// ```
7658    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7659        self.request_id = v.into();
7660        self
7661    }
7662
7663    /// Sets the value of [etag][crate::model::DeleteVmwareEngineNetworkRequest::etag].
7664    ///
7665    /// # Example
7666    /// ```ignore,no_run
7667    /// # use google_cloud_vmwareengine_v1::model::DeleteVmwareEngineNetworkRequest;
7668    /// let x = DeleteVmwareEngineNetworkRequest::new().set_etag("example");
7669    /// ```
7670    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7671        self.etag = v.into();
7672        self
7673    }
7674}
7675
7676impl wkt::message::Message for DeleteVmwareEngineNetworkRequest {
7677    fn typename() -> &'static str {
7678        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest"
7679    }
7680}
7681
7682/// Request message for
7683/// [VmwareEngine.GetVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]
7684///
7685/// [google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]: crate::client::VmwareEngine::get_vmware_engine_network
7686#[derive(Clone, Default, PartialEq)]
7687#[non_exhaustive]
7688pub struct GetVmwareEngineNetworkRequest {
7689    /// Required. The resource name of the VMware Engine network to retrieve.
7690    /// Resource names are schemeless URIs that follow the conventions in
7691    /// <https://cloud.google.com/apis/design/resource_names>.
7692    /// For example:
7693    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
7694    pub name: std::string::String,
7695
7696    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7697}
7698
7699impl GetVmwareEngineNetworkRequest {
7700    /// Creates a new default instance.
7701    pub fn new() -> Self {
7702        std::default::Default::default()
7703    }
7704
7705    /// Sets the value of [name][crate::model::GetVmwareEngineNetworkRequest::name].
7706    ///
7707    /// # Example
7708    /// ```ignore,no_run
7709    /// # use google_cloud_vmwareengine_v1::model::GetVmwareEngineNetworkRequest;
7710    /// # let project_id = "project_id";
7711    /// # let location_id = "location_id";
7712    /// # let vmware_engine_network_id = "vmware_engine_network_id";
7713    /// let x = GetVmwareEngineNetworkRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"));
7714    /// ```
7715    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7716        self.name = v.into();
7717        self
7718    }
7719}
7720
7721impl wkt::message::Message for GetVmwareEngineNetworkRequest {
7722    fn typename() -> &'static str {
7723        "type.googleapis.com/google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest"
7724    }
7725}
7726
7727/// Request message for
7728/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
7729///
7730/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
7731#[derive(Clone, Default, PartialEq)]
7732#[non_exhaustive]
7733pub struct ListVmwareEngineNetworksRequest {
7734    /// Required. The resource name of the location to query for
7735    /// VMware Engine networks. Resource names are schemeless URIs that follow the
7736    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
7737    /// example: `projects/my-project/locations/global`
7738    pub parent: std::string::String,
7739
7740    /// The maximum number of results to return in one page.
7741    /// The maximum value is coerced to 1000.
7742    /// The default value of this field is 500.
7743    pub page_size: i32,
7744
7745    /// A page token, received from a previous `ListVmwareEngineNetworks` call.
7746    /// Provide this to retrieve the subsequent page.
7747    ///
7748    /// When paginating, all other parameters provided to
7749    /// `ListVmwareEngineNetworks` must match the call that provided the page
7750    /// token.
7751    pub page_token: std::string::String,
7752
7753    /// A filter expression that matches resources returned in the response.
7754    /// The expression must specify the field name, a comparison
7755    /// operator, and the value that you want to use for filtering. The value
7756    /// must be a string, a number, or a boolean. The comparison operator
7757    /// must be `=`, `!=`, `>`, or `<`.
7758    ///
7759    /// For example, if you are filtering a list of network peerings, you can
7760    /// exclude the ones named `example-network` by specifying
7761    /// `name != "example-network"`.
7762    ///
7763    /// To filter on multiple expressions, provide each separate expression within
7764    /// parentheses. For example:
7765    ///
7766    /// ```norust
7767    /// (name = "example-network")
7768    /// (createTime > "2021-04-12T08:15:10.40Z")
7769    /// ```
7770    ///
7771    /// By default, each expression is an `AND` expression. However, you
7772    /// can include `AND` and `OR` expressions explicitly.
7773    /// For example:
7774    ///
7775    /// ```norust
7776    /// (name = "example-network-1") AND
7777    /// (createTime > "2021-04-12T08:15:10.40Z") OR
7778    /// (name = "example-network-2")
7779    /// ```
7780    pub filter: std::string::String,
7781
7782    /// Sorts list results by a certain order. By default, returned results
7783    /// are ordered by `name` in ascending order.
7784    /// You can also sort results in descending order based on the `name` value
7785    /// using `orderBy="name desc"`.
7786    /// Currently, only ordering by `name` is supported.
7787    pub order_by: std::string::String,
7788
7789    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7790}
7791
7792impl ListVmwareEngineNetworksRequest {
7793    /// Creates a new default instance.
7794    pub fn new() -> Self {
7795        std::default::Default::default()
7796    }
7797
7798    /// Sets the value of [parent][crate::model::ListVmwareEngineNetworksRequest::parent].
7799    ///
7800    /// # Example
7801    /// ```ignore,no_run
7802    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksRequest;
7803    /// let x = ListVmwareEngineNetworksRequest::new().set_parent("example");
7804    /// ```
7805    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7806        self.parent = v.into();
7807        self
7808    }
7809
7810    /// Sets the value of [page_size][crate::model::ListVmwareEngineNetworksRequest::page_size].
7811    ///
7812    /// # Example
7813    /// ```ignore,no_run
7814    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksRequest;
7815    /// let x = ListVmwareEngineNetworksRequest::new().set_page_size(42);
7816    /// ```
7817    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7818        self.page_size = v.into();
7819        self
7820    }
7821
7822    /// Sets the value of [page_token][crate::model::ListVmwareEngineNetworksRequest::page_token].
7823    ///
7824    /// # Example
7825    /// ```ignore,no_run
7826    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksRequest;
7827    /// let x = ListVmwareEngineNetworksRequest::new().set_page_token("example");
7828    /// ```
7829    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7830        self.page_token = v.into();
7831        self
7832    }
7833
7834    /// Sets the value of [filter][crate::model::ListVmwareEngineNetworksRequest::filter].
7835    ///
7836    /// # Example
7837    /// ```ignore,no_run
7838    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksRequest;
7839    /// let x = ListVmwareEngineNetworksRequest::new().set_filter("example");
7840    /// ```
7841    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7842        self.filter = v.into();
7843        self
7844    }
7845
7846    /// Sets the value of [order_by][crate::model::ListVmwareEngineNetworksRequest::order_by].
7847    ///
7848    /// # Example
7849    /// ```ignore,no_run
7850    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksRequest;
7851    /// let x = ListVmwareEngineNetworksRequest::new().set_order_by("example");
7852    /// ```
7853    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7854        self.order_by = v.into();
7855        self
7856    }
7857}
7858
7859impl wkt::message::Message for ListVmwareEngineNetworksRequest {
7860    fn typename() -> &'static str {
7861        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest"
7862    }
7863}
7864
7865/// Response message for
7866/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
7867///
7868/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
7869#[derive(Clone, Default, PartialEq)]
7870#[non_exhaustive]
7871pub struct ListVmwareEngineNetworksResponse {
7872    /// A list of VMware Engine networks.
7873    pub vmware_engine_networks: std::vec::Vec<crate::model::VmwareEngineNetwork>,
7874
7875    /// A token, which can be sent as `page_token` to retrieve the next page.
7876    /// If this field is omitted, there are no subsequent pages.
7877    pub next_page_token: std::string::String,
7878
7879    /// Unreachable resources.
7880    pub unreachable: std::vec::Vec<std::string::String>,
7881
7882    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7883}
7884
7885impl ListVmwareEngineNetworksResponse {
7886    /// Creates a new default instance.
7887    pub fn new() -> Self {
7888        std::default::Default::default()
7889    }
7890
7891    /// Sets the value of [vmware_engine_networks][crate::model::ListVmwareEngineNetworksResponse::vmware_engine_networks].
7892    ///
7893    /// # Example
7894    /// ```ignore,no_run
7895    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksResponse;
7896    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
7897    /// let x = ListVmwareEngineNetworksResponse::new()
7898    ///     .set_vmware_engine_networks([
7899    ///         VmwareEngineNetwork::default()/* use setters */,
7900    ///         VmwareEngineNetwork::default()/* use (different) setters */,
7901    ///     ]);
7902    /// ```
7903    pub fn set_vmware_engine_networks<T, V>(mut self, v: T) -> Self
7904    where
7905        T: std::iter::IntoIterator<Item = V>,
7906        V: std::convert::Into<crate::model::VmwareEngineNetwork>,
7907    {
7908        use std::iter::Iterator;
7909        self.vmware_engine_networks = v.into_iter().map(|i| i.into()).collect();
7910        self
7911    }
7912
7913    /// Sets the value of [next_page_token][crate::model::ListVmwareEngineNetworksResponse::next_page_token].
7914    ///
7915    /// # Example
7916    /// ```ignore,no_run
7917    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksResponse;
7918    /// let x = ListVmwareEngineNetworksResponse::new().set_next_page_token("example");
7919    /// ```
7920    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7921        self.next_page_token = v.into();
7922        self
7923    }
7924
7925    /// Sets the value of [unreachable][crate::model::ListVmwareEngineNetworksResponse::unreachable].
7926    ///
7927    /// # Example
7928    /// ```ignore,no_run
7929    /// # use google_cloud_vmwareengine_v1::model::ListVmwareEngineNetworksResponse;
7930    /// let x = ListVmwareEngineNetworksResponse::new().set_unreachable(["a", "b", "c"]);
7931    /// ```
7932    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
7933    where
7934        T: std::iter::IntoIterator<Item = V>,
7935        V: std::convert::Into<std::string::String>,
7936    {
7937        use std::iter::Iterator;
7938        self.unreachable = v.into_iter().map(|i| i.into()).collect();
7939        self
7940    }
7941}
7942
7943impl wkt::message::Message for ListVmwareEngineNetworksResponse {
7944    fn typename() -> &'static str {
7945        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse"
7946    }
7947}
7948
7949#[doc(hidden)]
7950impl google_cloud_gax::paginator::internal::PageableResponse for ListVmwareEngineNetworksResponse {
7951    type PageItem = crate::model::VmwareEngineNetwork;
7952
7953    fn items(self) -> std::vec::Vec<Self::PageItem> {
7954        self.vmware_engine_networks
7955    }
7956
7957    fn next_page_token(&self) -> std::string::String {
7958        use std::clone::Clone;
7959        self.next_page_token.clone()
7960    }
7961}
7962
7963/// Request message for
7964/// [VmwareEngine.CreatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]
7965///
7966/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]: crate::client::VmwareEngine::create_private_connection
7967#[derive(Clone, Default, PartialEq)]
7968#[non_exhaustive]
7969pub struct CreatePrivateConnectionRequest {
7970    /// Required. The resource name of the location to create the new private
7971    /// connection in. Private connection is a regional resource.
7972    /// Resource names are schemeless URIs that follow the conventions in
7973    /// <https://cloud.google.com/apis/design/resource_names>. For example:
7974    /// `projects/my-project/locations/us-central1`
7975    pub parent: std::string::String,
7976
7977    /// Required. The user-provided identifier of the new private connection.
7978    /// This identifier must be unique among private connection resources
7979    /// within the parent and becomes the final token in the name URI. The
7980    /// identifier must meet the following requirements:
7981    ///
7982    /// * Only contains 1-63 alphanumeric characters and hyphens
7983    /// * Begins with an alphabetical character
7984    /// * Ends with a non-hyphen character
7985    /// * Not formatted as a UUID
7986    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
7987    ///   (section 3.5)
7988    pub private_connection_id: std::string::String,
7989
7990    /// Required. The initial description of the new private connection.
7991    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
7992
7993    /// Optional. A request ID to identify requests. Specify a unique request ID
7994    /// so that if you must retry your request, the server will know to ignore
7995    /// the request if it has already been completed. The server guarantees that a
7996    /// request doesn't result in creation of duplicate commitments for at least 60
7997    /// minutes.
7998    ///
7999    /// For example, consider a situation where you make an initial request and the
8000    /// request times out. If you make the request again with the same request
8001    /// ID, the server can check if original operation with the same request ID
8002    /// was received, and if so, will ignore the second request. This prevents
8003    /// clients from accidentally creating duplicate commitments.
8004    ///
8005    /// The request ID must be a valid UUID with the exception that zero UUID is
8006    /// not supported (00000000-0000-0000-0000-000000000000).
8007    pub request_id: std::string::String,
8008
8009    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8010}
8011
8012impl CreatePrivateConnectionRequest {
8013    /// Creates a new default instance.
8014    pub fn new() -> Self {
8015        std::default::Default::default()
8016    }
8017
8018    /// Sets the value of [parent][crate::model::CreatePrivateConnectionRequest::parent].
8019    ///
8020    /// # Example
8021    /// ```ignore,no_run
8022    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateConnectionRequest;
8023    /// # let project_id = "project_id";
8024    /// # let location_id = "location_id";
8025    /// let x = CreatePrivateConnectionRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
8026    /// ```
8027    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8028        self.parent = v.into();
8029        self
8030    }
8031
8032    /// Sets the value of [private_connection_id][crate::model::CreatePrivateConnectionRequest::private_connection_id].
8033    ///
8034    /// # Example
8035    /// ```ignore,no_run
8036    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateConnectionRequest;
8037    /// let x = CreatePrivateConnectionRequest::new().set_private_connection_id("example");
8038    /// ```
8039    pub fn set_private_connection_id<T: std::convert::Into<std::string::String>>(
8040        mut self,
8041        v: T,
8042    ) -> Self {
8043        self.private_connection_id = v.into();
8044        self
8045    }
8046
8047    /// Sets the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
8048    ///
8049    /// # Example
8050    /// ```ignore,no_run
8051    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateConnectionRequest;
8052    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
8053    /// let x = CreatePrivateConnectionRequest::new().set_private_connection(PrivateConnection::default()/* use setters */);
8054    /// ```
8055    pub fn set_private_connection<T>(mut self, v: T) -> Self
8056    where
8057        T: std::convert::Into<crate::model::PrivateConnection>,
8058    {
8059        self.private_connection = std::option::Option::Some(v.into());
8060        self
8061    }
8062
8063    /// Sets or clears the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
8064    ///
8065    /// # Example
8066    /// ```ignore,no_run
8067    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateConnectionRequest;
8068    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
8069    /// let x = CreatePrivateConnectionRequest::new().set_or_clear_private_connection(Some(PrivateConnection::default()/* use setters */));
8070    /// let x = CreatePrivateConnectionRequest::new().set_or_clear_private_connection(None::<PrivateConnection>);
8071    /// ```
8072    pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
8073    where
8074        T: std::convert::Into<crate::model::PrivateConnection>,
8075    {
8076        self.private_connection = v.map(|x| x.into());
8077        self
8078    }
8079
8080    /// Sets the value of [request_id][crate::model::CreatePrivateConnectionRequest::request_id].
8081    ///
8082    /// # Example
8083    /// ```ignore,no_run
8084    /// # use google_cloud_vmwareengine_v1::model::CreatePrivateConnectionRequest;
8085    /// let x = CreatePrivateConnectionRequest::new().set_request_id("example");
8086    /// ```
8087    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8088        self.request_id = v.into();
8089        self
8090    }
8091}
8092
8093impl wkt::message::Message for CreatePrivateConnectionRequest {
8094    fn typename() -> &'static str {
8095        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest"
8096    }
8097}
8098
8099/// Request message for
8100/// [VmwareEngine.GetPrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]
8101///
8102/// [google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]: crate::client::VmwareEngine::get_private_connection
8103#[derive(Clone, Default, PartialEq)]
8104#[non_exhaustive]
8105pub struct GetPrivateConnectionRequest {
8106    /// Required. The resource name of the private connection to retrieve.
8107    /// Resource names are schemeless URIs that follow the conventions in
8108    /// <https://cloud.google.com/apis/design/resource_names>.
8109    /// For example:
8110    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
8111    pub name: std::string::String,
8112
8113    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8114}
8115
8116impl GetPrivateConnectionRequest {
8117    /// Creates a new default instance.
8118    pub fn new() -> Self {
8119        std::default::Default::default()
8120    }
8121
8122    /// Sets the value of [name][crate::model::GetPrivateConnectionRequest::name].
8123    ///
8124    /// # Example
8125    /// ```ignore,no_run
8126    /// # use google_cloud_vmwareengine_v1::model::GetPrivateConnectionRequest;
8127    /// # let project_id = "project_id";
8128    /// # let location_id = "location_id";
8129    /// # let private_connection_id = "private_connection_id";
8130    /// let x = GetPrivateConnectionRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateConnections/{private_connection_id}"));
8131    /// ```
8132    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8133        self.name = v.into();
8134        self
8135    }
8136}
8137
8138impl wkt::message::Message for GetPrivateConnectionRequest {
8139    fn typename() -> &'static str {
8140        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateConnectionRequest"
8141    }
8142}
8143
8144/// Request message for
8145/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
8146///
8147/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
8148#[derive(Clone, Default, PartialEq)]
8149#[non_exhaustive]
8150pub struct ListPrivateConnectionsRequest {
8151    /// Required. The resource name of the location to query for
8152    /// private connections. Resource names are schemeless URIs that follow the
8153    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
8154    /// example: `projects/my-project/locations/us-central1`
8155    pub parent: std::string::String,
8156
8157    /// The maximum number of private connections to return in one page.
8158    /// The maximum value is coerced to 1000.
8159    /// The default value of this field is 500.
8160    pub page_size: i32,
8161
8162    /// A page token, received from a previous `ListPrivateConnections` call.
8163    /// Provide this to retrieve the subsequent page.
8164    ///
8165    /// When paginating, all other parameters provided to
8166    /// `ListPrivateConnections` must match the call that provided the page
8167    /// token.
8168    pub page_token: std::string::String,
8169
8170    /// A filter expression that matches resources returned in the response.
8171    /// The expression must specify the field name, a comparison
8172    /// operator, and the value that you want to use for filtering. The value
8173    /// must be a string, a number, or a boolean. The comparison operator
8174    /// must be `=`, `!=`, `>`, or `<`.
8175    ///
8176    /// For example, if you are filtering a list of private connections, you can
8177    /// exclude the ones named `example-connection` by specifying
8178    /// `name != "example-connection"`.
8179    ///
8180    /// To filter on multiple expressions, provide each separate expression within
8181    /// parentheses. For example:
8182    ///
8183    /// ```norust
8184    /// (name = "example-connection")
8185    /// (createTime > "2022-09-22T08:15:10.40Z")
8186    /// ```
8187    ///
8188    /// By default, each expression is an `AND` expression. However, you
8189    /// can include `AND` and `OR` expressions explicitly.
8190    /// For example:
8191    ///
8192    /// ```norust
8193    /// (name = "example-connection-1") AND
8194    /// (createTime > "2021-04-12T08:15:10.40Z") OR
8195    /// (name = "example-connection-2")
8196    /// ```
8197    pub filter: std::string::String,
8198
8199    /// Sorts list results by a certain order. By default, returned results
8200    /// are ordered by `name` in ascending order.
8201    /// You can also sort results in descending order based on the `name` value
8202    /// using `orderBy="name desc"`.
8203    /// Currently, only ordering by `name` is supported.
8204    pub order_by: std::string::String,
8205
8206    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8207}
8208
8209impl ListPrivateConnectionsRequest {
8210    /// Creates a new default instance.
8211    pub fn new() -> Self {
8212        std::default::Default::default()
8213    }
8214
8215    /// Sets the value of [parent][crate::model::ListPrivateConnectionsRequest::parent].
8216    ///
8217    /// # Example
8218    /// ```ignore,no_run
8219    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsRequest;
8220    /// # let project_id = "project_id";
8221    /// # let location_id = "location_id";
8222    /// let x = ListPrivateConnectionsRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
8223    /// ```
8224    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8225        self.parent = v.into();
8226        self
8227    }
8228
8229    /// Sets the value of [page_size][crate::model::ListPrivateConnectionsRequest::page_size].
8230    ///
8231    /// # Example
8232    /// ```ignore,no_run
8233    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsRequest;
8234    /// let x = ListPrivateConnectionsRequest::new().set_page_size(42);
8235    /// ```
8236    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8237        self.page_size = v.into();
8238        self
8239    }
8240
8241    /// Sets the value of [page_token][crate::model::ListPrivateConnectionsRequest::page_token].
8242    ///
8243    /// # Example
8244    /// ```ignore,no_run
8245    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsRequest;
8246    /// let x = ListPrivateConnectionsRequest::new().set_page_token("example");
8247    /// ```
8248    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8249        self.page_token = v.into();
8250        self
8251    }
8252
8253    /// Sets the value of [filter][crate::model::ListPrivateConnectionsRequest::filter].
8254    ///
8255    /// # Example
8256    /// ```ignore,no_run
8257    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsRequest;
8258    /// let x = ListPrivateConnectionsRequest::new().set_filter("example");
8259    /// ```
8260    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8261        self.filter = v.into();
8262        self
8263    }
8264
8265    /// Sets the value of [order_by][crate::model::ListPrivateConnectionsRequest::order_by].
8266    ///
8267    /// # Example
8268    /// ```ignore,no_run
8269    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsRequest;
8270    /// let x = ListPrivateConnectionsRequest::new().set_order_by("example");
8271    /// ```
8272    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8273        self.order_by = v.into();
8274        self
8275    }
8276}
8277
8278impl wkt::message::Message for ListPrivateConnectionsRequest {
8279    fn typename() -> &'static str {
8280        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest"
8281    }
8282}
8283
8284/// Response message for
8285/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
8286///
8287/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
8288#[derive(Clone, Default, PartialEq)]
8289#[non_exhaustive]
8290pub struct ListPrivateConnectionsResponse {
8291    /// A list of private connections.
8292    pub private_connections: std::vec::Vec<crate::model::PrivateConnection>,
8293
8294    /// A token, which can be sent as `page_token` to retrieve the next page.
8295    /// If this field is omitted, there are no subsequent pages.
8296    pub next_page_token: std::string::String,
8297
8298    /// Unreachable resources.
8299    pub unreachable: std::vec::Vec<std::string::String>,
8300
8301    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8302}
8303
8304impl ListPrivateConnectionsResponse {
8305    /// Creates a new default instance.
8306    pub fn new() -> Self {
8307        std::default::Default::default()
8308    }
8309
8310    /// Sets the value of [private_connections][crate::model::ListPrivateConnectionsResponse::private_connections].
8311    ///
8312    /// # Example
8313    /// ```ignore,no_run
8314    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsResponse;
8315    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
8316    /// let x = ListPrivateConnectionsResponse::new()
8317    ///     .set_private_connections([
8318    ///         PrivateConnection::default()/* use setters */,
8319    ///         PrivateConnection::default()/* use (different) setters */,
8320    ///     ]);
8321    /// ```
8322    pub fn set_private_connections<T, V>(mut self, v: T) -> Self
8323    where
8324        T: std::iter::IntoIterator<Item = V>,
8325        V: std::convert::Into<crate::model::PrivateConnection>,
8326    {
8327        use std::iter::Iterator;
8328        self.private_connections = v.into_iter().map(|i| i.into()).collect();
8329        self
8330    }
8331
8332    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionsResponse::next_page_token].
8333    ///
8334    /// # Example
8335    /// ```ignore,no_run
8336    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsResponse;
8337    /// let x = ListPrivateConnectionsResponse::new().set_next_page_token("example");
8338    /// ```
8339    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8340        self.next_page_token = v.into();
8341        self
8342    }
8343
8344    /// Sets the value of [unreachable][crate::model::ListPrivateConnectionsResponse::unreachable].
8345    ///
8346    /// # Example
8347    /// ```ignore,no_run
8348    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionsResponse;
8349    /// let x = ListPrivateConnectionsResponse::new().set_unreachable(["a", "b", "c"]);
8350    /// ```
8351    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
8352    where
8353        T: std::iter::IntoIterator<Item = V>,
8354        V: std::convert::Into<std::string::String>,
8355    {
8356        use std::iter::Iterator;
8357        self.unreachable = v.into_iter().map(|i| i.into()).collect();
8358        self
8359    }
8360}
8361
8362impl wkt::message::Message for ListPrivateConnectionsResponse {
8363    fn typename() -> &'static str {
8364        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsResponse"
8365    }
8366}
8367
8368#[doc(hidden)]
8369impl google_cloud_gax::paginator::internal::PageableResponse for ListPrivateConnectionsResponse {
8370    type PageItem = crate::model::PrivateConnection;
8371
8372    fn items(self) -> std::vec::Vec<Self::PageItem> {
8373        self.private_connections
8374    }
8375
8376    fn next_page_token(&self) -> std::string::String {
8377        use std::clone::Clone;
8378        self.next_page_token.clone()
8379    }
8380}
8381
8382/// Request message for
8383/// [VmwareEngine.UpdatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]
8384///
8385/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]: crate::client::VmwareEngine::update_private_connection
8386#[derive(Clone, Default, PartialEq)]
8387#[non_exhaustive]
8388pub struct UpdatePrivateConnectionRequest {
8389    /// Required. Private connection description.
8390    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
8391
8392    /// Required. Field mask is used to specify the fields to be overwritten in the
8393    /// `PrivateConnection` resource by the update.
8394    /// The fields specified in the `update_mask` are relative to the resource, not
8395    /// the full request. A field will be overwritten if it is in the mask. If the
8396    /// user does not provide a mask then all fields will be overwritten.
8397    pub update_mask: std::option::Option<wkt::FieldMask>,
8398
8399    /// Optional. A request ID to identify requests. Specify a unique request ID
8400    /// so that if you must retry your request, the server will know to ignore
8401    /// the request if it has already been completed. The server guarantees that a
8402    /// request doesn't result in creation of duplicate commitments for at least 60
8403    /// minutes.
8404    ///
8405    /// For example, consider a situation where you make an initial request and the
8406    /// request times out. If you make the request again with the same request
8407    /// ID, the server can check if original operation with the same request ID
8408    /// was received, and if so, will ignore the second request. This prevents
8409    /// clients from accidentally creating duplicate commitments.
8410    ///
8411    /// The request ID must be a valid UUID with the exception that zero UUID is
8412    /// not supported (00000000-0000-0000-0000-000000000000).
8413    pub request_id: std::string::String,
8414
8415    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8416}
8417
8418impl UpdatePrivateConnectionRequest {
8419    /// Creates a new default instance.
8420    pub fn new() -> Self {
8421        std::default::Default::default()
8422    }
8423
8424    /// Sets the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
8425    ///
8426    /// # Example
8427    /// ```ignore,no_run
8428    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateConnectionRequest;
8429    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
8430    /// let x = UpdatePrivateConnectionRequest::new().set_private_connection(PrivateConnection::default()/* use setters */);
8431    /// ```
8432    pub fn set_private_connection<T>(mut self, v: T) -> Self
8433    where
8434        T: std::convert::Into<crate::model::PrivateConnection>,
8435    {
8436        self.private_connection = std::option::Option::Some(v.into());
8437        self
8438    }
8439
8440    /// Sets or clears the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
8441    ///
8442    /// # Example
8443    /// ```ignore,no_run
8444    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateConnectionRequest;
8445    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
8446    /// let x = UpdatePrivateConnectionRequest::new().set_or_clear_private_connection(Some(PrivateConnection::default()/* use setters */));
8447    /// let x = UpdatePrivateConnectionRequest::new().set_or_clear_private_connection(None::<PrivateConnection>);
8448    /// ```
8449    pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
8450    where
8451        T: std::convert::Into<crate::model::PrivateConnection>,
8452    {
8453        self.private_connection = v.map(|x| x.into());
8454        self
8455    }
8456
8457    /// Sets the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
8458    ///
8459    /// # Example
8460    /// ```ignore,no_run
8461    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateConnectionRequest;
8462    /// use wkt::FieldMask;
8463    /// let x = UpdatePrivateConnectionRequest::new().set_update_mask(FieldMask::default()/* use setters */);
8464    /// ```
8465    pub fn set_update_mask<T>(mut self, v: T) -> Self
8466    where
8467        T: std::convert::Into<wkt::FieldMask>,
8468    {
8469        self.update_mask = std::option::Option::Some(v.into());
8470        self
8471    }
8472
8473    /// Sets or clears the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
8474    ///
8475    /// # Example
8476    /// ```ignore,no_run
8477    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateConnectionRequest;
8478    /// use wkt::FieldMask;
8479    /// let x = UpdatePrivateConnectionRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
8480    /// let x = UpdatePrivateConnectionRequest::new().set_or_clear_update_mask(None::<FieldMask>);
8481    /// ```
8482    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8483    where
8484        T: std::convert::Into<wkt::FieldMask>,
8485    {
8486        self.update_mask = v.map(|x| x.into());
8487        self
8488    }
8489
8490    /// Sets the value of [request_id][crate::model::UpdatePrivateConnectionRequest::request_id].
8491    ///
8492    /// # Example
8493    /// ```ignore,no_run
8494    /// # use google_cloud_vmwareengine_v1::model::UpdatePrivateConnectionRequest;
8495    /// let x = UpdatePrivateConnectionRequest::new().set_request_id("example");
8496    /// ```
8497    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8498        self.request_id = v.into();
8499        self
8500    }
8501}
8502
8503impl wkt::message::Message for UpdatePrivateConnectionRequest {
8504    fn typename() -> &'static str {
8505        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest"
8506    }
8507}
8508
8509/// Request message for
8510/// [VmwareEngine.DeletePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]
8511///
8512/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]: crate::client::VmwareEngine::delete_private_connection
8513#[derive(Clone, Default, PartialEq)]
8514#[non_exhaustive]
8515pub struct DeletePrivateConnectionRequest {
8516    /// Required. The resource name of the private connection to be deleted.
8517    /// Resource names are schemeless URIs that follow the conventions in
8518    /// <https://cloud.google.com/apis/design/resource_names>.
8519    /// For example:
8520    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
8521    pub name: std::string::String,
8522
8523    /// Optional. A request ID to identify requests. Specify a unique request ID
8524    /// so that if you must retry your request, the server will know to ignore
8525    /// the request if it has already been completed. The server guarantees that a
8526    /// request doesn't result in creation of duplicate commitments for at least 60
8527    /// minutes.
8528    ///
8529    /// For example, consider a situation where you make an initial request and the
8530    /// request times out. If you make the request again with the same request
8531    /// ID, the server can check if original operation with the same request ID
8532    /// was received, and if so, will ignore the second request. This prevents
8533    /// clients from accidentally creating duplicate commitments.
8534    ///
8535    /// The request ID must be a valid UUID with the exception that zero UUID is
8536    /// not supported (00000000-0000-0000-0000-000000000000).
8537    pub request_id: std::string::String,
8538
8539    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8540}
8541
8542impl DeletePrivateConnectionRequest {
8543    /// Creates a new default instance.
8544    pub fn new() -> Self {
8545        std::default::Default::default()
8546    }
8547
8548    /// Sets the value of [name][crate::model::DeletePrivateConnectionRequest::name].
8549    ///
8550    /// # Example
8551    /// ```ignore,no_run
8552    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateConnectionRequest;
8553    /// # let project_id = "project_id";
8554    /// # let location_id = "location_id";
8555    /// # let private_connection_id = "private_connection_id";
8556    /// let x = DeletePrivateConnectionRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateConnections/{private_connection_id}"));
8557    /// ```
8558    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8559        self.name = v.into();
8560        self
8561    }
8562
8563    /// Sets the value of [request_id][crate::model::DeletePrivateConnectionRequest::request_id].
8564    ///
8565    /// # Example
8566    /// ```ignore,no_run
8567    /// # use google_cloud_vmwareengine_v1::model::DeletePrivateConnectionRequest;
8568    /// let x = DeletePrivateConnectionRequest::new().set_request_id("example");
8569    /// ```
8570    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8571        self.request_id = v.into();
8572        self
8573    }
8574}
8575
8576impl wkt::message::Message for DeletePrivateConnectionRequest {
8577    fn typename() -> &'static str {
8578        "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest"
8579    }
8580}
8581
8582/// Request message for
8583/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
8584///
8585/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
8586#[derive(Clone, Default, PartialEq)]
8587#[non_exhaustive]
8588pub struct ListPrivateConnectionPeeringRoutesRequest {
8589    /// Required. The resource name of the private connection to retrieve peering
8590    /// routes from. Resource names are schemeless URIs that follow the conventions
8591    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
8592    /// `projects/my-project/locations/us-west1/privateConnections/my-connection`
8593    pub parent: std::string::String,
8594
8595    /// The maximum number of peering routes to return in one page.
8596    /// The service may return fewer than this value.
8597    /// The maximum value is coerced to 1000.
8598    /// The default value of this field is 500.
8599    pub page_size: i32,
8600
8601    /// A page token, received from a previous `ListPrivateConnectionPeeringRoutes`
8602    /// call. Provide this to retrieve the subsequent page. When paginating, all
8603    /// other parameters provided to `ListPrivateConnectionPeeringRoutes` must
8604    /// match the call that provided the page token.
8605    pub page_token: std::string::String,
8606
8607    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8608}
8609
8610impl ListPrivateConnectionPeeringRoutesRequest {
8611    /// Creates a new default instance.
8612    pub fn new() -> Self {
8613        std::default::Default::default()
8614    }
8615
8616    /// Sets the value of [parent][crate::model::ListPrivateConnectionPeeringRoutesRequest::parent].
8617    ///
8618    /// # Example
8619    /// ```ignore,no_run
8620    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionPeeringRoutesRequest;
8621    /// # let project_id = "project_id";
8622    /// # let location_id = "location_id";
8623    /// # let private_connection_id = "private_connection_id";
8624    /// let x = ListPrivateConnectionPeeringRoutesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}/privateConnections/{private_connection_id}"));
8625    /// ```
8626    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8627        self.parent = v.into();
8628        self
8629    }
8630
8631    /// Sets the value of [page_size][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_size].
8632    ///
8633    /// # Example
8634    /// ```ignore,no_run
8635    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionPeeringRoutesRequest;
8636    /// let x = ListPrivateConnectionPeeringRoutesRequest::new().set_page_size(42);
8637    /// ```
8638    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8639        self.page_size = v.into();
8640        self
8641    }
8642
8643    /// Sets the value of [page_token][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_token].
8644    ///
8645    /// # Example
8646    /// ```ignore,no_run
8647    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionPeeringRoutesRequest;
8648    /// let x = ListPrivateConnectionPeeringRoutesRequest::new().set_page_token("example");
8649    /// ```
8650    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8651        self.page_token = v.into();
8652        self
8653    }
8654}
8655
8656impl wkt::message::Message for ListPrivateConnectionPeeringRoutesRequest {
8657    fn typename() -> &'static str {
8658        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest"
8659    }
8660}
8661
8662/// Response message for
8663/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
8664///
8665/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
8666#[derive(Clone, Default, PartialEq)]
8667#[non_exhaustive]
8668pub struct ListPrivateConnectionPeeringRoutesResponse {
8669    /// A list of peering routes.
8670    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
8671
8672    /// A token, which can be sent as `page_token` to retrieve the next page.
8673    /// If this field is omitted, there are no subsequent pages.
8674    pub next_page_token: std::string::String,
8675
8676    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8677}
8678
8679impl ListPrivateConnectionPeeringRoutesResponse {
8680    /// Creates a new default instance.
8681    pub fn new() -> Self {
8682        std::default::Default::default()
8683    }
8684
8685    /// Sets the value of [peering_routes][crate::model::ListPrivateConnectionPeeringRoutesResponse::peering_routes].
8686    ///
8687    /// # Example
8688    /// ```ignore,no_run
8689    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionPeeringRoutesResponse;
8690    /// use google_cloud_vmwareengine_v1::model::PeeringRoute;
8691    /// let x = ListPrivateConnectionPeeringRoutesResponse::new()
8692    ///     .set_peering_routes([
8693    ///         PeeringRoute::default()/* use setters */,
8694    ///         PeeringRoute::default()/* use (different) setters */,
8695    ///     ]);
8696    /// ```
8697    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
8698    where
8699        T: std::iter::IntoIterator<Item = V>,
8700        V: std::convert::Into<crate::model::PeeringRoute>,
8701    {
8702        use std::iter::Iterator;
8703        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
8704        self
8705    }
8706
8707    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionPeeringRoutesResponse::next_page_token].
8708    ///
8709    /// # Example
8710    /// ```ignore,no_run
8711    /// # use google_cloud_vmwareengine_v1::model::ListPrivateConnectionPeeringRoutesResponse;
8712    /// let x = ListPrivateConnectionPeeringRoutesResponse::new().set_next_page_token("example");
8713    /// ```
8714    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8715        self.next_page_token = v.into();
8716        self
8717    }
8718}
8719
8720impl wkt::message::Message for ListPrivateConnectionPeeringRoutesResponse {
8721    fn typename() -> &'static str {
8722        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesResponse"
8723    }
8724}
8725
8726#[doc(hidden)]
8727impl google_cloud_gax::paginator::internal::PageableResponse
8728    for ListPrivateConnectionPeeringRoutesResponse
8729{
8730    type PageItem = crate::model::PeeringRoute;
8731
8732    fn items(self) -> std::vec::Vec<Self::PageItem> {
8733        self.peering_routes
8734    }
8735
8736    fn next_page_token(&self) -> std::string::String {
8737        use std::clone::Clone;
8738        self.next_page_token.clone()
8739    }
8740}
8741
8742/// Request message for
8743/// [VmwareEngine.GrantDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]
8744///
8745/// [google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]: crate::client::VmwareEngine::grant_dns_bind_permission
8746#[derive(Clone, Default, PartialEq)]
8747#[non_exhaustive]
8748pub struct GrantDnsBindPermissionRequest {
8749    /// Required. The name of the resource which stores the users/service accounts
8750    /// having the permission to bind to the corresponding intranet VPC of the
8751    /// consumer project. DnsBindPermission is a global resource. Resource names
8752    /// are schemeless URIs that follow the conventions in
8753    /// <https://cloud.google.com/apis/design/resource_names>. For example:
8754    /// `projects/my-project/locations/global/dnsBindPermission`
8755    pub name: std::string::String,
8756
8757    /// Required. The consumer provided user/service account which needs to be
8758    /// granted permission to bind with the intranet VPC corresponding to the
8759    /// consumer project.
8760    pub principal: std::option::Option<crate::model::Principal>,
8761
8762    /// Optional. A request ID to identify requests. Specify a unique request ID
8763    /// so that if you must retry your request, the server will know to ignore
8764    /// the request if it has already been completed. The server guarantees that a
8765    /// request doesn't result in creation of duplicate commitments for at least 60
8766    /// minutes.
8767    ///
8768    /// For example, consider a situation where you make an initial request and the
8769    /// request times out. If you make the request again with the same request
8770    /// ID, the server can check if original operation with the same request ID
8771    /// was received, and if so, will ignore the second request. This prevents
8772    /// clients from accidentally creating duplicate commitments.
8773    ///
8774    /// The request ID must be a valid UUID with the exception that zero UUID is
8775    /// not supported (00000000-0000-0000-0000-000000000000).
8776    pub request_id: std::string::String,
8777
8778    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8779}
8780
8781impl GrantDnsBindPermissionRequest {
8782    /// Creates a new default instance.
8783    pub fn new() -> Self {
8784        std::default::Default::default()
8785    }
8786
8787    /// Sets the value of [name][crate::model::GrantDnsBindPermissionRequest::name].
8788    ///
8789    /// # Example
8790    /// ```ignore,no_run
8791    /// # use google_cloud_vmwareengine_v1::model::GrantDnsBindPermissionRequest;
8792    /// # let project_id = "project_id";
8793    /// # let location_id = "location_id";
8794    /// let x = GrantDnsBindPermissionRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/dnsBindPermission"));
8795    /// ```
8796    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8797        self.name = v.into();
8798        self
8799    }
8800
8801    /// Sets the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
8802    ///
8803    /// # Example
8804    /// ```ignore,no_run
8805    /// # use google_cloud_vmwareengine_v1::model::GrantDnsBindPermissionRequest;
8806    /// use google_cloud_vmwareengine_v1::model::Principal;
8807    /// let x = GrantDnsBindPermissionRequest::new().set_principal(Principal::default()/* use setters */);
8808    /// ```
8809    pub fn set_principal<T>(mut self, v: T) -> Self
8810    where
8811        T: std::convert::Into<crate::model::Principal>,
8812    {
8813        self.principal = std::option::Option::Some(v.into());
8814        self
8815    }
8816
8817    /// Sets or clears the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
8818    ///
8819    /// # Example
8820    /// ```ignore,no_run
8821    /// # use google_cloud_vmwareengine_v1::model::GrantDnsBindPermissionRequest;
8822    /// use google_cloud_vmwareengine_v1::model::Principal;
8823    /// let x = GrantDnsBindPermissionRequest::new().set_or_clear_principal(Some(Principal::default()/* use setters */));
8824    /// let x = GrantDnsBindPermissionRequest::new().set_or_clear_principal(None::<Principal>);
8825    /// ```
8826    pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8827    where
8828        T: std::convert::Into<crate::model::Principal>,
8829    {
8830        self.principal = v.map(|x| x.into());
8831        self
8832    }
8833
8834    /// Sets the value of [request_id][crate::model::GrantDnsBindPermissionRequest::request_id].
8835    ///
8836    /// # Example
8837    /// ```ignore,no_run
8838    /// # use google_cloud_vmwareengine_v1::model::GrantDnsBindPermissionRequest;
8839    /// let x = GrantDnsBindPermissionRequest::new().set_request_id("example");
8840    /// ```
8841    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8842        self.request_id = v.into();
8843        self
8844    }
8845}
8846
8847impl wkt::message::Message for GrantDnsBindPermissionRequest {
8848    fn typename() -> &'static str {
8849        "type.googleapis.com/google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest"
8850    }
8851}
8852
8853/// Request message for
8854/// [VmwareEngine.RevokeDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]
8855///
8856/// [google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]: crate::client::VmwareEngine::revoke_dns_bind_permission
8857#[derive(Clone, Default, PartialEq)]
8858#[non_exhaustive]
8859pub struct RevokeDnsBindPermissionRequest {
8860    /// Required. The name of the resource which stores the users/service accounts
8861    /// having the permission to bind to the corresponding intranet VPC of the
8862    /// consumer project. DnsBindPermission is a global resource. Resource names
8863    /// are schemeless URIs that follow the conventions in
8864    /// <https://cloud.google.com/apis/design/resource_names>. For example:
8865    /// `projects/my-project/locations/global/dnsBindPermission`
8866    pub name: std::string::String,
8867
8868    /// Required. The consumer provided user/service account which needs to be
8869    /// granted permission to bind with the intranet VPC corresponding to the
8870    /// consumer project.
8871    pub principal: std::option::Option<crate::model::Principal>,
8872
8873    /// Optional. A request ID to identify requests. Specify a unique request ID
8874    /// so that if you must retry your request, the server will know to ignore
8875    /// the request if it has already been completed. The server guarantees that a
8876    /// request doesn't result in creation of duplicate commitments for at least 60
8877    /// minutes.
8878    ///
8879    /// For example, consider a situation where you make an initial request and the
8880    /// request times out. If you make the request again with the same request
8881    /// ID, the server can check if original operation with the same request ID
8882    /// was received, and if so, will ignore the second request. This prevents
8883    /// clients from accidentally creating duplicate commitments.
8884    ///
8885    /// The request ID must be a valid UUID with the exception that zero UUID is
8886    /// not supported (00000000-0000-0000-0000-000000000000).
8887    pub request_id: std::string::String,
8888
8889    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8890}
8891
8892impl RevokeDnsBindPermissionRequest {
8893    /// Creates a new default instance.
8894    pub fn new() -> Self {
8895        std::default::Default::default()
8896    }
8897
8898    /// Sets the value of [name][crate::model::RevokeDnsBindPermissionRequest::name].
8899    ///
8900    /// # Example
8901    /// ```ignore,no_run
8902    /// # use google_cloud_vmwareengine_v1::model::RevokeDnsBindPermissionRequest;
8903    /// # let project_id = "project_id";
8904    /// # let location_id = "location_id";
8905    /// let x = RevokeDnsBindPermissionRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/dnsBindPermission"));
8906    /// ```
8907    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8908        self.name = v.into();
8909        self
8910    }
8911
8912    /// Sets the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
8913    ///
8914    /// # Example
8915    /// ```ignore,no_run
8916    /// # use google_cloud_vmwareengine_v1::model::RevokeDnsBindPermissionRequest;
8917    /// use google_cloud_vmwareengine_v1::model::Principal;
8918    /// let x = RevokeDnsBindPermissionRequest::new().set_principal(Principal::default()/* use setters */);
8919    /// ```
8920    pub fn set_principal<T>(mut self, v: T) -> Self
8921    where
8922        T: std::convert::Into<crate::model::Principal>,
8923    {
8924        self.principal = std::option::Option::Some(v.into());
8925        self
8926    }
8927
8928    /// Sets or clears the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
8929    ///
8930    /// # Example
8931    /// ```ignore,no_run
8932    /// # use google_cloud_vmwareengine_v1::model::RevokeDnsBindPermissionRequest;
8933    /// use google_cloud_vmwareengine_v1::model::Principal;
8934    /// let x = RevokeDnsBindPermissionRequest::new().set_or_clear_principal(Some(Principal::default()/* use setters */));
8935    /// let x = RevokeDnsBindPermissionRequest::new().set_or_clear_principal(None::<Principal>);
8936    /// ```
8937    pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8938    where
8939        T: std::convert::Into<crate::model::Principal>,
8940    {
8941        self.principal = v.map(|x| x.into());
8942        self
8943    }
8944
8945    /// Sets the value of [request_id][crate::model::RevokeDnsBindPermissionRequest::request_id].
8946    ///
8947    /// # Example
8948    /// ```ignore,no_run
8949    /// # use google_cloud_vmwareengine_v1::model::RevokeDnsBindPermissionRequest;
8950    /// let x = RevokeDnsBindPermissionRequest::new().set_request_id("example");
8951    /// ```
8952    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8953        self.request_id = v.into();
8954        self
8955    }
8956}
8957
8958impl wkt::message::Message for RevokeDnsBindPermissionRequest {
8959    fn typename() -> &'static str {
8960        "type.googleapis.com/google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest"
8961    }
8962}
8963
8964/// Request message for
8965/// [VmwareEngine.GetDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]
8966///
8967/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]: crate::client::VmwareEngine::get_dns_bind_permission
8968#[derive(Clone, Default, PartialEq)]
8969#[non_exhaustive]
8970pub struct GetDnsBindPermissionRequest {
8971    /// Required. The name of the resource which stores the users/service accounts
8972    /// having the permission to bind to the corresponding intranet VPC of the
8973    /// consumer project. DnsBindPermission is a global resource. Resource names
8974    /// are schemeless URIs that follow the conventions in
8975    /// <https://cloud.google.com/apis/design/resource_names>. For example:
8976    /// `projects/my-project/locations/global/dnsBindPermission`
8977    pub name: std::string::String,
8978
8979    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8980}
8981
8982impl GetDnsBindPermissionRequest {
8983    /// Creates a new default instance.
8984    pub fn new() -> Self {
8985        std::default::Default::default()
8986    }
8987
8988    /// Sets the value of [name][crate::model::GetDnsBindPermissionRequest::name].
8989    ///
8990    /// # Example
8991    /// ```ignore,no_run
8992    /// # use google_cloud_vmwareengine_v1::model::GetDnsBindPermissionRequest;
8993    /// # let project_id = "project_id";
8994    /// # let location_id = "location_id";
8995    /// let x = GetDnsBindPermissionRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/dnsBindPermission"));
8996    /// ```
8997    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8998        self.name = v.into();
8999        self
9000    }
9001}
9002
9003impl wkt::message::Message for GetDnsBindPermissionRequest {
9004    fn typename() -> &'static str {
9005        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest"
9006    }
9007}
9008
9009/// Network configuration in the consumer project
9010/// with which the peering has to be done.
9011#[derive(Clone, Default, PartialEq)]
9012#[non_exhaustive]
9013pub struct NetworkConfig {
9014    /// Required. Management CIDR used by VMware management appliances.
9015    pub management_cidr: std::string::String,
9016
9017    /// Optional. The relative resource name of the VMware Engine network attached
9018    /// to the private cloud. Specify the name in the following form:
9019    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
9020    /// where `{project}` can either be a project number or a project ID.
9021    pub vmware_engine_network: std::string::String,
9022
9023    /// Output only. The canonical name of the VMware Engine network in the form:
9024    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
9025    pub vmware_engine_network_canonical: std::string::String,
9026
9027    /// Output only. The IP address layout version of the management IP address
9028    /// range. Possible versions include:
9029    ///
9030    /// * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address
9031    ///   layout used by some existing private clouds. This is no longer supported
9032    ///   for new private clouds as it does not support all features.
9033    /// * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address
9034    ///   layout used by all newly created private clouds. This version supports all
9035    ///   current features.
9036    pub management_ip_address_layout_version: i32,
9037
9038    /// Output only. DNS Server IP of the Private Cloud.
9039    /// All DNS queries can be forwarded to this address for name resolution of
9040    /// Private Cloud's management entities like vCenter, NSX-T Manager and
9041    /// ESXi hosts.
9042    pub dns_server_ip: std::string::String,
9043
9044    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9045}
9046
9047impl NetworkConfig {
9048    /// Creates a new default instance.
9049    pub fn new() -> Self {
9050        std::default::Default::default()
9051    }
9052
9053    /// Sets the value of [management_cidr][crate::model::NetworkConfig::management_cidr].
9054    ///
9055    /// # Example
9056    /// ```ignore,no_run
9057    /// # use google_cloud_vmwareengine_v1::model::NetworkConfig;
9058    /// let x = NetworkConfig::new().set_management_cidr("example");
9059    /// ```
9060    pub fn set_management_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9061        self.management_cidr = v.into();
9062        self
9063    }
9064
9065    /// Sets the value of [vmware_engine_network][crate::model::NetworkConfig::vmware_engine_network].
9066    ///
9067    /// # Example
9068    /// ```ignore,no_run
9069    /// # use google_cloud_vmwareengine_v1::model::NetworkConfig;
9070    /// # let project_id = "project_id";
9071    /// # let location_id = "location_id";
9072    /// # let vmware_engine_network_id = "vmware_engine_network_id";
9073    /// let x = NetworkConfig::new().set_vmware_engine_network(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"));
9074    /// ```
9075    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
9076        mut self,
9077        v: T,
9078    ) -> Self {
9079        self.vmware_engine_network = v.into();
9080        self
9081    }
9082
9083    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkConfig::vmware_engine_network_canonical].
9084    ///
9085    /// # Example
9086    /// ```ignore,no_run
9087    /// # use google_cloud_vmwareengine_v1::model::NetworkConfig;
9088    /// # let project_id = "project_id";
9089    /// # let location_id = "location_id";
9090    /// # let vmware_engine_network_id = "vmware_engine_network_id";
9091    /// let x = NetworkConfig::new().set_vmware_engine_network_canonical(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"));
9092    /// ```
9093    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
9094        mut self,
9095        v: T,
9096    ) -> Self {
9097        self.vmware_engine_network_canonical = v.into();
9098        self
9099    }
9100
9101    /// Sets the value of [management_ip_address_layout_version][crate::model::NetworkConfig::management_ip_address_layout_version].
9102    ///
9103    /// # Example
9104    /// ```ignore,no_run
9105    /// # use google_cloud_vmwareengine_v1::model::NetworkConfig;
9106    /// let x = NetworkConfig::new().set_management_ip_address_layout_version(42);
9107    /// ```
9108    pub fn set_management_ip_address_layout_version<T: std::convert::Into<i32>>(
9109        mut self,
9110        v: T,
9111    ) -> Self {
9112        self.management_ip_address_layout_version = v.into();
9113        self
9114    }
9115
9116    /// Sets the value of [dns_server_ip][crate::model::NetworkConfig::dns_server_ip].
9117    ///
9118    /// # Example
9119    /// ```ignore,no_run
9120    /// # use google_cloud_vmwareengine_v1::model::NetworkConfig;
9121    /// let x = NetworkConfig::new().set_dns_server_ip("example");
9122    /// ```
9123    pub fn set_dns_server_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9124        self.dns_server_ip = v.into();
9125        self
9126    }
9127}
9128
9129impl wkt::message::Message for NetworkConfig {
9130    fn typename() -> &'static str {
9131        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkConfig"
9132    }
9133}
9134
9135/// Information about the type and number of nodes associated with the cluster.
9136#[derive(Clone, Default, PartialEq)]
9137#[non_exhaustive]
9138pub struct NodeTypeConfig {
9139    /// Required. The number of nodes of this type in the cluster
9140    pub node_count: i32,
9141
9142    /// Optional. Customized number of cores available to each node of the type.
9143    /// This number must always be one of `nodeType.availableCustomCoreCounts`.
9144    /// If zero is provided max value from `nodeType.availableCustomCoreCounts`
9145    /// will be used.
9146    pub custom_core_count: i32,
9147
9148    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9149}
9150
9151impl NodeTypeConfig {
9152    /// Creates a new default instance.
9153    pub fn new() -> Self {
9154        std::default::Default::default()
9155    }
9156
9157    /// Sets the value of [node_count][crate::model::NodeTypeConfig::node_count].
9158    ///
9159    /// # Example
9160    /// ```ignore,no_run
9161    /// # use google_cloud_vmwareengine_v1::model::NodeTypeConfig;
9162    /// let x = NodeTypeConfig::new().set_node_count(42);
9163    /// ```
9164    pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9165        self.node_count = v.into();
9166        self
9167    }
9168
9169    /// Sets the value of [custom_core_count][crate::model::NodeTypeConfig::custom_core_count].
9170    ///
9171    /// # Example
9172    /// ```ignore,no_run
9173    /// # use google_cloud_vmwareengine_v1::model::NodeTypeConfig;
9174    /// let x = NodeTypeConfig::new().set_custom_core_count(42);
9175    /// ```
9176    pub fn set_custom_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9177        self.custom_core_count = v.into();
9178        self
9179    }
9180}
9181
9182impl wkt::message::Message for NodeTypeConfig {
9183    fn typename() -> &'static str {
9184        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeTypeConfig"
9185    }
9186}
9187
9188/// Configuration of a stretched cluster.
9189#[derive(Clone, Default, PartialEq)]
9190#[non_exhaustive]
9191pub struct StretchedClusterConfig {
9192    /// Required. Zone that will remain operational when connection between the two
9193    /// zones is lost. Specify the resource name of a zone that belongs to the
9194    /// region of the private cloud. For example:
9195    /// `projects/{project}/locations/europe-west3-a` where `{project}` can either
9196    /// be a project number or a project ID.
9197    pub preferred_location: std::string::String,
9198
9199    /// Required. Additional zone for a higher level of availability and load
9200    /// balancing. Specify the resource name of a zone that belongs to the region
9201    /// of the private cloud. For example:
9202    /// `projects/{project}/locations/europe-west3-b` where `{project}` can either
9203    /// be a project number or a project ID.
9204    pub secondary_location: std::string::String,
9205
9206    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9207}
9208
9209impl StretchedClusterConfig {
9210    /// Creates a new default instance.
9211    pub fn new() -> Self {
9212        std::default::Default::default()
9213    }
9214
9215    /// Sets the value of [preferred_location][crate::model::StretchedClusterConfig::preferred_location].
9216    ///
9217    /// # Example
9218    /// ```ignore,no_run
9219    /// # use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
9220    /// let x = StretchedClusterConfig::new().set_preferred_location("example");
9221    /// ```
9222    pub fn set_preferred_location<T: std::convert::Into<std::string::String>>(
9223        mut self,
9224        v: T,
9225    ) -> Self {
9226        self.preferred_location = v.into();
9227        self
9228    }
9229
9230    /// Sets the value of [secondary_location][crate::model::StretchedClusterConfig::secondary_location].
9231    ///
9232    /// # Example
9233    /// ```ignore,no_run
9234    /// # use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
9235    /// let x = StretchedClusterConfig::new().set_secondary_location("example");
9236    /// ```
9237    pub fn set_secondary_location<T: std::convert::Into<std::string::String>>(
9238        mut self,
9239        v: T,
9240    ) -> Self {
9241        self.secondary_location = v.into();
9242        self
9243    }
9244}
9245
9246impl wkt::message::Message for StretchedClusterConfig {
9247    fn typename() -> &'static str {
9248        "type.googleapis.com/google.cloud.vmwareengine.v1.StretchedClusterConfig"
9249    }
9250}
9251
9252/// Represents a private cloud resource. Private clouds of type `STANDARD` and
9253/// `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are
9254/// regional.
9255#[derive(Clone, Default, PartialEq)]
9256#[non_exhaustive]
9257pub struct PrivateCloud {
9258    /// Output only. The resource name of this private cloud.
9259    /// Resource names are schemeless URIs that follow the conventions in
9260    /// <https://cloud.google.com/apis/design/resource_names>.
9261    /// For example:
9262    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
9263    pub name: std::string::String,
9264
9265    /// Output only. Creation time of this resource.
9266    pub create_time: std::option::Option<wkt::Timestamp>,
9267
9268    /// Output only. Last update time of this resource.
9269    pub update_time: std::option::Option<wkt::Timestamp>,
9270
9271    /// Output only. Time when the resource was scheduled for deletion.
9272    pub delete_time: std::option::Option<wkt::Timestamp>,
9273
9274    /// Output only. Time when the resource will be irreversibly deleted.
9275    pub expire_time: std::option::Option<wkt::Timestamp>,
9276
9277    /// Output only. State of the resource. New values may be added to this enum
9278    /// when appropriate.
9279    pub state: crate::model::private_cloud::State,
9280
9281    /// Required. Network configuration of the private cloud.
9282    pub network_config: std::option::Option<crate::model::NetworkConfig>,
9283
9284    /// Required. Input only. The management cluster for this private cloud.
9285    /// This field is required during creation of the private cloud to provide
9286    /// details for the default cluster.
9287    ///
9288    /// The following fields can't be changed after private cloud creation:
9289    /// `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`.
9290    pub management_cluster: std::option::Option<crate::model::private_cloud::ManagementCluster>,
9291
9292    /// User-provided description for this private cloud.
9293    pub description: std::string::String,
9294
9295    /// Output only. HCX appliance.
9296    pub hcx: std::option::Option<crate::model::Hcx>,
9297
9298    /// Output only. NSX appliance.
9299    pub nsx: std::option::Option<crate::model::Nsx>,
9300
9301    /// Output only. Vcenter appliance.
9302    pub vcenter: std::option::Option<crate::model::Vcenter>,
9303
9304    /// Output only. System-generated unique identifier for the resource.
9305    pub uid: std::string::String,
9306
9307    /// Optional. Type of the private cloud. Defaults to STANDARD.
9308    pub r#type: crate::model::private_cloud::Type,
9309
9310    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9311}
9312
9313impl PrivateCloud {
9314    /// Creates a new default instance.
9315    pub fn new() -> Self {
9316        std::default::Default::default()
9317    }
9318
9319    /// Sets the value of [name][crate::model::PrivateCloud::name].
9320    ///
9321    /// # Example
9322    /// ```ignore,no_run
9323    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9324    /// # let project_id = "project_id";
9325    /// # let location_id = "location_id";
9326    /// # let private_cloud_id = "private_cloud_id";
9327    /// let x = PrivateCloud::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"));
9328    /// ```
9329    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9330        self.name = v.into();
9331        self
9332    }
9333
9334    /// Sets the value of [create_time][crate::model::PrivateCloud::create_time].
9335    ///
9336    /// # Example
9337    /// ```ignore,no_run
9338    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9339    /// use wkt::Timestamp;
9340    /// let x = PrivateCloud::new().set_create_time(Timestamp::default()/* use setters */);
9341    /// ```
9342    pub fn set_create_time<T>(mut self, v: T) -> Self
9343    where
9344        T: std::convert::Into<wkt::Timestamp>,
9345    {
9346        self.create_time = std::option::Option::Some(v.into());
9347        self
9348    }
9349
9350    /// Sets or clears the value of [create_time][crate::model::PrivateCloud::create_time].
9351    ///
9352    /// # Example
9353    /// ```ignore,no_run
9354    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9355    /// use wkt::Timestamp;
9356    /// let x = PrivateCloud::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
9357    /// let x = PrivateCloud::new().set_or_clear_create_time(None::<Timestamp>);
9358    /// ```
9359    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9360    where
9361        T: std::convert::Into<wkt::Timestamp>,
9362    {
9363        self.create_time = v.map(|x| x.into());
9364        self
9365    }
9366
9367    /// Sets the value of [update_time][crate::model::PrivateCloud::update_time].
9368    ///
9369    /// # Example
9370    /// ```ignore,no_run
9371    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9372    /// use wkt::Timestamp;
9373    /// let x = PrivateCloud::new().set_update_time(Timestamp::default()/* use setters */);
9374    /// ```
9375    pub fn set_update_time<T>(mut self, v: T) -> Self
9376    where
9377        T: std::convert::Into<wkt::Timestamp>,
9378    {
9379        self.update_time = std::option::Option::Some(v.into());
9380        self
9381    }
9382
9383    /// Sets or clears the value of [update_time][crate::model::PrivateCloud::update_time].
9384    ///
9385    /// # Example
9386    /// ```ignore,no_run
9387    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9388    /// use wkt::Timestamp;
9389    /// let x = PrivateCloud::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
9390    /// let x = PrivateCloud::new().set_or_clear_update_time(None::<Timestamp>);
9391    /// ```
9392    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9393    where
9394        T: std::convert::Into<wkt::Timestamp>,
9395    {
9396        self.update_time = v.map(|x| x.into());
9397        self
9398    }
9399
9400    /// Sets the value of [delete_time][crate::model::PrivateCloud::delete_time].
9401    ///
9402    /// # Example
9403    /// ```ignore,no_run
9404    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9405    /// use wkt::Timestamp;
9406    /// let x = PrivateCloud::new().set_delete_time(Timestamp::default()/* use setters */);
9407    /// ```
9408    pub fn set_delete_time<T>(mut self, v: T) -> Self
9409    where
9410        T: std::convert::Into<wkt::Timestamp>,
9411    {
9412        self.delete_time = std::option::Option::Some(v.into());
9413        self
9414    }
9415
9416    /// Sets or clears the value of [delete_time][crate::model::PrivateCloud::delete_time].
9417    ///
9418    /// # Example
9419    /// ```ignore,no_run
9420    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9421    /// use wkt::Timestamp;
9422    /// let x = PrivateCloud::new().set_or_clear_delete_time(Some(Timestamp::default()/* use setters */));
9423    /// let x = PrivateCloud::new().set_or_clear_delete_time(None::<Timestamp>);
9424    /// ```
9425    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
9426    where
9427        T: std::convert::Into<wkt::Timestamp>,
9428    {
9429        self.delete_time = v.map(|x| x.into());
9430        self
9431    }
9432
9433    /// Sets the value of [expire_time][crate::model::PrivateCloud::expire_time].
9434    ///
9435    /// # Example
9436    /// ```ignore,no_run
9437    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9438    /// use wkt::Timestamp;
9439    /// let x = PrivateCloud::new().set_expire_time(Timestamp::default()/* use setters */);
9440    /// ```
9441    pub fn set_expire_time<T>(mut self, v: T) -> Self
9442    where
9443        T: std::convert::Into<wkt::Timestamp>,
9444    {
9445        self.expire_time = std::option::Option::Some(v.into());
9446        self
9447    }
9448
9449    /// Sets or clears the value of [expire_time][crate::model::PrivateCloud::expire_time].
9450    ///
9451    /// # Example
9452    /// ```ignore,no_run
9453    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9454    /// use wkt::Timestamp;
9455    /// let x = PrivateCloud::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
9456    /// let x = PrivateCloud::new().set_or_clear_expire_time(None::<Timestamp>);
9457    /// ```
9458    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
9459    where
9460        T: std::convert::Into<wkt::Timestamp>,
9461    {
9462        self.expire_time = v.map(|x| x.into());
9463        self
9464    }
9465
9466    /// Sets the value of [state][crate::model::PrivateCloud::state].
9467    ///
9468    /// # Example
9469    /// ```ignore,no_run
9470    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9471    /// use google_cloud_vmwareengine_v1::model::private_cloud::State;
9472    /// let x0 = PrivateCloud::new().set_state(State::Active);
9473    /// let x1 = PrivateCloud::new().set_state(State::Creating);
9474    /// let x2 = PrivateCloud::new().set_state(State::Updating);
9475    /// ```
9476    pub fn set_state<T: std::convert::Into<crate::model::private_cloud::State>>(
9477        mut self,
9478        v: T,
9479    ) -> Self {
9480        self.state = v.into();
9481        self
9482    }
9483
9484    /// Sets the value of [network_config][crate::model::PrivateCloud::network_config].
9485    ///
9486    /// # Example
9487    /// ```ignore,no_run
9488    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9489    /// use google_cloud_vmwareengine_v1::model::NetworkConfig;
9490    /// let x = PrivateCloud::new().set_network_config(NetworkConfig::default()/* use setters */);
9491    /// ```
9492    pub fn set_network_config<T>(mut self, v: T) -> Self
9493    where
9494        T: std::convert::Into<crate::model::NetworkConfig>,
9495    {
9496        self.network_config = std::option::Option::Some(v.into());
9497        self
9498    }
9499
9500    /// Sets or clears the value of [network_config][crate::model::PrivateCloud::network_config].
9501    ///
9502    /// # Example
9503    /// ```ignore,no_run
9504    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9505    /// use google_cloud_vmwareengine_v1::model::NetworkConfig;
9506    /// let x = PrivateCloud::new().set_or_clear_network_config(Some(NetworkConfig::default()/* use setters */));
9507    /// let x = PrivateCloud::new().set_or_clear_network_config(None::<NetworkConfig>);
9508    /// ```
9509    pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
9510    where
9511        T: std::convert::Into<crate::model::NetworkConfig>,
9512    {
9513        self.network_config = v.map(|x| x.into());
9514        self
9515    }
9516
9517    /// Sets the value of [management_cluster][crate::model::PrivateCloud::management_cluster].
9518    ///
9519    /// # Example
9520    /// ```ignore,no_run
9521    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9522    /// use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9523    /// let x = PrivateCloud::new().set_management_cluster(ManagementCluster::default()/* use setters */);
9524    /// ```
9525    pub fn set_management_cluster<T>(mut self, v: T) -> Self
9526    where
9527        T: std::convert::Into<crate::model::private_cloud::ManagementCluster>,
9528    {
9529        self.management_cluster = std::option::Option::Some(v.into());
9530        self
9531    }
9532
9533    /// Sets or clears the value of [management_cluster][crate::model::PrivateCloud::management_cluster].
9534    ///
9535    /// # Example
9536    /// ```ignore,no_run
9537    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9538    /// use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9539    /// let x = PrivateCloud::new().set_or_clear_management_cluster(Some(ManagementCluster::default()/* use setters */));
9540    /// let x = PrivateCloud::new().set_or_clear_management_cluster(None::<ManagementCluster>);
9541    /// ```
9542    pub fn set_or_clear_management_cluster<T>(mut self, v: std::option::Option<T>) -> Self
9543    where
9544        T: std::convert::Into<crate::model::private_cloud::ManagementCluster>,
9545    {
9546        self.management_cluster = v.map(|x| x.into());
9547        self
9548    }
9549
9550    /// Sets the value of [description][crate::model::PrivateCloud::description].
9551    ///
9552    /// # Example
9553    /// ```ignore,no_run
9554    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9555    /// let x = PrivateCloud::new().set_description("example");
9556    /// ```
9557    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9558        self.description = v.into();
9559        self
9560    }
9561
9562    /// Sets the value of [hcx][crate::model::PrivateCloud::hcx].
9563    ///
9564    /// # Example
9565    /// ```ignore,no_run
9566    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9567    /// use google_cloud_vmwareengine_v1::model::Hcx;
9568    /// let x = PrivateCloud::new().set_hcx(Hcx::default()/* use setters */);
9569    /// ```
9570    pub fn set_hcx<T>(mut self, v: T) -> Self
9571    where
9572        T: std::convert::Into<crate::model::Hcx>,
9573    {
9574        self.hcx = std::option::Option::Some(v.into());
9575        self
9576    }
9577
9578    /// Sets or clears the value of [hcx][crate::model::PrivateCloud::hcx].
9579    ///
9580    /// # Example
9581    /// ```ignore,no_run
9582    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9583    /// use google_cloud_vmwareengine_v1::model::Hcx;
9584    /// let x = PrivateCloud::new().set_or_clear_hcx(Some(Hcx::default()/* use setters */));
9585    /// let x = PrivateCloud::new().set_or_clear_hcx(None::<Hcx>);
9586    /// ```
9587    pub fn set_or_clear_hcx<T>(mut self, v: std::option::Option<T>) -> Self
9588    where
9589        T: std::convert::Into<crate::model::Hcx>,
9590    {
9591        self.hcx = v.map(|x| x.into());
9592        self
9593    }
9594
9595    /// Sets the value of [nsx][crate::model::PrivateCloud::nsx].
9596    ///
9597    /// # Example
9598    /// ```ignore,no_run
9599    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9600    /// use google_cloud_vmwareengine_v1::model::Nsx;
9601    /// let x = PrivateCloud::new().set_nsx(Nsx::default()/* use setters */);
9602    /// ```
9603    pub fn set_nsx<T>(mut self, v: T) -> Self
9604    where
9605        T: std::convert::Into<crate::model::Nsx>,
9606    {
9607        self.nsx = std::option::Option::Some(v.into());
9608        self
9609    }
9610
9611    /// Sets or clears the value of [nsx][crate::model::PrivateCloud::nsx].
9612    ///
9613    /// # Example
9614    /// ```ignore,no_run
9615    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9616    /// use google_cloud_vmwareengine_v1::model::Nsx;
9617    /// let x = PrivateCloud::new().set_or_clear_nsx(Some(Nsx::default()/* use setters */));
9618    /// let x = PrivateCloud::new().set_or_clear_nsx(None::<Nsx>);
9619    /// ```
9620    pub fn set_or_clear_nsx<T>(mut self, v: std::option::Option<T>) -> Self
9621    where
9622        T: std::convert::Into<crate::model::Nsx>,
9623    {
9624        self.nsx = v.map(|x| x.into());
9625        self
9626    }
9627
9628    /// Sets the value of [vcenter][crate::model::PrivateCloud::vcenter].
9629    ///
9630    /// # Example
9631    /// ```ignore,no_run
9632    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9633    /// use google_cloud_vmwareengine_v1::model::Vcenter;
9634    /// let x = PrivateCloud::new().set_vcenter(Vcenter::default()/* use setters */);
9635    /// ```
9636    pub fn set_vcenter<T>(mut self, v: T) -> Self
9637    where
9638        T: std::convert::Into<crate::model::Vcenter>,
9639    {
9640        self.vcenter = std::option::Option::Some(v.into());
9641        self
9642    }
9643
9644    /// Sets or clears the value of [vcenter][crate::model::PrivateCloud::vcenter].
9645    ///
9646    /// # Example
9647    /// ```ignore,no_run
9648    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9649    /// use google_cloud_vmwareengine_v1::model::Vcenter;
9650    /// let x = PrivateCloud::new().set_or_clear_vcenter(Some(Vcenter::default()/* use setters */));
9651    /// let x = PrivateCloud::new().set_or_clear_vcenter(None::<Vcenter>);
9652    /// ```
9653    pub fn set_or_clear_vcenter<T>(mut self, v: std::option::Option<T>) -> Self
9654    where
9655        T: std::convert::Into<crate::model::Vcenter>,
9656    {
9657        self.vcenter = v.map(|x| x.into());
9658        self
9659    }
9660
9661    /// Sets the value of [uid][crate::model::PrivateCloud::uid].
9662    ///
9663    /// # Example
9664    /// ```ignore,no_run
9665    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9666    /// let x = PrivateCloud::new().set_uid("example");
9667    /// ```
9668    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9669        self.uid = v.into();
9670        self
9671    }
9672
9673    /// Sets the value of [r#type][crate::model::PrivateCloud::type].
9674    ///
9675    /// # Example
9676    /// ```ignore,no_run
9677    /// # use google_cloud_vmwareengine_v1::model::PrivateCloud;
9678    /// use google_cloud_vmwareengine_v1::model::private_cloud::Type;
9679    /// let x0 = PrivateCloud::new().set_type(Type::TimeLimited);
9680    /// let x1 = PrivateCloud::new().set_type(Type::Stretched);
9681    /// ```
9682    pub fn set_type<T: std::convert::Into<crate::model::private_cloud::Type>>(
9683        mut self,
9684        v: T,
9685    ) -> Self {
9686        self.r#type = v.into();
9687        self
9688    }
9689}
9690
9691impl wkt::message::Message for PrivateCloud {
9692    fn typename() -> &'static str {
9693        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud"
9694    }
9695}
9696
9697/// Defines additional types related to [PrivateCloud].
9698pub mod private_cloud {
9699    #[allow(unused_imports)]
9700    use super::*;
9701
9702    /// Management cluster configuration.
9703    #[derive(Clone, Default, PartialEq)]
9704    #[non_exhaustive]
9705    pub struct ManagementCluster {
9706        /// Required. The user-provided identifier of the new `Cluster`.
9707        /// The identifier must meet the following requirements:
9708        ///
9709        /// * Only contains 1-63 alphanumeric characters and hyphens
9710        /// * Begins with an alphabetical character
9711        /// * Ends with a non-hyphen character
9712        /// * Not formatted as a UUID
9713        /// * Complies with [RFC
9714        ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
9715        pub cluster_id: std::string::String,
9716
9717        /// Required. The map of cluster node types in this cluster, where the key is
9718        /// canonical identifier of the node type (corresponds to the `NodeType`).
9719        pub node_type_configs:
9720            std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
9721
9722        /// Optional. Configuration of a stretched cluster. Required for STRETCHED
9723        /// private clouds.
9724        pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
9725
9726        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9727    }
9728
9729    impl ManagementCluster {
9730        /// Creates a new default instance.
9731        pub fn new() -> Self {
9732            std::default::Default::default()
9733        }
9734
9735        /// Sets the value of [cluster_id][crate::model::private_cloud::ManagementCluster::cluster_id].
9736        ///
9737        /// # Example
9738        /// ```ignore,no_run
9739        /// # use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9740        /// let x = ManagementCluster::new().set_cluster_id("example");
9741        /// ```
9742        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9743            self.cluster_id = v.into();
9744            self
9745        }
9746
9747        /// Sets the value of [node_type_configs][crate::model::private_cloud::ManagementCluster::node_type_configs].
9748        ///
9749        /// # Example
9750        /// ```ignore,no_run
9751        /// # use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9752        /// use google_cloud_vmwareengine_v1::model::NodeTypeConfig;
9753        /// let x = ManagementCluster::new().set_node_type_configs([
9754        ///     ("key0", NodeTypeConfig::default()/* use setters */),
9755        ///     ("key1", NodeTypeConfig::default()/* use (different) setters */),
9756        /// ]);
9757        /// ```
9758        pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
9759        where
9760            T: std::iter::IntoIterator<Item = (K, V)>,
9761            K: std::convert::Into<std::string::String>,
9762            V: std::convert::Into<crate::model::NodeTypeConfig>,
9763        {
9764            use std::iter::Iterator;
9765            self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9766            self
9767        }
9768
9769        /// Sets the value of [stretched_cluster_config][crate::model::private_cloud::ManagementCluster::stretched_cluster_config].
9770        ///
9771        /// # Example
9772        /// ```ignore,no_run
9773        /// # use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9774        /// use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
9775        /// let x = ManagementCluster::new().set_stretched_cluster_config(StretchedClusterConfig::default()/* use setters */);
9776        /// ```
9777        pub fn set_stretched_cluster_config<T>(mut self, v: T) -> Self
9778        where
9779            T: std::convert::Into<crate::model::StretchedClusterConfig>,
9780        {
9781            self.stretched_cluster_config = std::option::Option::Some(v.into());
9782            self
9783        }
9784
9785        /// Sets or clears the value of [stretched_cluster_config][crate::model::private_cloud::ManagementCluster::stretched_cluster_config].
9786        ///
9787        /// # Example
9788        /// ```ignore,no_run
9789        /// # use google_cloud_vmwareengine_v1::model::private_cloud::ManagementCluster;
9790        /// use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
9791        /// let x = ManagementCluster::new().set_or_clear_stretched_cluster_config(Some(StretchedClusterConfig::default()/* use setters */));
9792        /// let x = ManagementCluster::new().set_or_clear_stretched_cluster_config(None::<StretchedClusterConfig>);
9793        /// ```
9794        pub fn set_or_clear_stretched_cluster_config<T>(mut self, v: std::option::Option<T>) -> Self
9795        where
9796            T: std::convert::Into<crate::model::StretchedClusterConfig>,
9797        {
9798            self.stretched_cluster_config = v.map(|x| x.into());
9799            self
9800        }
9801    }
9802
9803    impl wkt::message::Message for ManagementCluster {
9804        fn typename() -> &'static str {
9805            "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster"
9806        }
9807    }
9808
9809    /// Enum State defines possible states of private clouds.
9810    ///
9811    /// # Working with unknown values
9812    ///
9813    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9814    /// additional enum variants at any time. Adding new variants is not considered
9815    /// a breaking change. Applications should write their code in anticipation of:
9816    ///
9817    /// - New values appearing in future releases of the client library, **and**
9818    /// - New values received dynamically, without application changes.
9819    ///
9820    /// Please consult the [Working with enums] section in the user guide for some
9821    /// guidelines.
9822    ///
9823    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9824    #[derive(Clone, Debug, PartialEq)]
9825    #[non_exhaustive]
9826    pub enum State {
9827        /// The default value. This value should never be used.
9828        Unspecified,
9829        /// The private cloud is ready.
9830        Active,
9831        /// The private cloud is being created.
9832        Creating,
9833        /// The private cloud is being updated.
9834        Updating,
9835        /// The private cloud is in failed state.
9836        Failed,
9837        /// The private cloud is scheduled for deletion. The deletion process can be
9838        /// cancelled by using the corresponding undelete method.
9839        Deleted,
9840        /// The private cloud is irreversibly deleted and is being removed from the
9841        /// system.
9842        Purging,
9843        /// If set, the enum was initialized with an unknown value.
9844        ///
9845        /// Applications can examine the value using [State::value] or
9846        /// [State::name].
9847        UnknownValue(state::UnknownValue),
9848    }
9849
9850    #[doc(hidden)]
9851    pub mod state {
9852        #[allow(unused_imports)]
9853        use super::*;
9854        #[derive(Clone, Debug, PartialEq)]
9855        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9856    }
9857
9858    impl State {
9859        /// Gets the enum value.
9860        ///
9861        /// Returns `None` if the enum contains an unknown value deserialized from
9862        /// the string representation of enums.
9863        pub fn value(&self) -> std::option::Option<i32> {
9864            match self {
9865                Self::Unspecified => std::option::Option::Some(0),
9866                Self::Active => std::option::Option::Some(1),
9867                Self::Creating => std::option::Option::Some(2),
9868                Self::Updating => std::option::Option::Some(3),
9869                Self::Failed => std::option::Option::Some(5),
9870                Self::Deleted => std::option::Option::Some(6),
9871                Self::Purging => std::option::Option::Some(7),
9872                Self::UnknownValue(u) => u.0.value(),
9873            }
9874        }
9875
9876        /// Gets the enum value as a string.
9877        ///
9878        /// Returns `None` if the enum contains an unknown value deserialized from
9879        /// the integer representation of enums.
9880        pub fn name(&self) -> std::option::Option<&str> {
9881            match self {
9882                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
9883                Self::Active => std::option::Option::Some("ACTIVE"),
9884                Self::Creating => std::option::Option::Some("CREATING"),
9885                Self::Updating => std::option::Option::Some("UPDATING"),
9886                Self::Failed => std::option::Option::Some("FAILED"),
9887                Self::Deleted => std::option::Option::Some("DELETED"),
9888                Self::Purging => std::option::Option::Some("PURGING"),
9889                Self::UnknownValue(u) => u.0.name(),
9890            }
9891        }
9892    }
9893
9894    impl std::default::Default for State {
9895        fn default() -> Self {
9896            use std::convert::From;
9897            Self::from(0)
9898        }
9899    }
9900
9901    impl std::fmt::Display for State {
9902        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9903            wkt::internal::display_enum(f, self.name(), self.value())
9904        }
9905    }
9906
9907    impl std::convert::From<i32> for State {
9908        fn from(value: i32) -> Self {
9909            match value {
9910                0 => Self::Unspecified,
9911                1 => Self::Active,
9912                2 => Self::Creating,
9913                3 => Self::Updating,
9914                5 => Self::Failed,
9915                6 => Self::Deleted,
9916                7 => Self::Purging,
9917                _ => Self::UnknownValue(state::UnknownValue(
9918                    wkt::internal::UnknownEnumValue::Integer(value),
9919                )),
9920            }
9921        }
9922    }
9923
9924    impl std::convert::From<&str> for State {
9925        fn from(value: &str) -> Self {
9926            use std::string::ToString;
9927            match value {
9928                "STATE_UNSPECIFIED" => Self::Unspecified,
9929                "ACTIVE" => Self::Active,
9930                "CREATING" => Self::Creating,
9931                "UPDATING" => Self::Updating,
9932                "FAILED" => Self::Failed,
9933                "DELETED" => Self::Deleted,
9934                "PURGING" => Self::Purging,
9935                _ => Self::UnknownValue(state::UnknownValue(
9936                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9937                )),
9938            }
9939        }
9940    }
9941
9942    impl serde::ser::Serialize for State {
9943        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9944        where
9945            S: serde::Serializer,
9946        {
9947            match self {
9948                Self::Unspecified => serializer.serialize_i32(0),
9949                Self::Active => serializer.serialize_i32(1),
9950                Self::Creating => serializer.serialize_i32(2),
9951                Self::Updating => serializer.serialize_i32(3),
9952                Self::Failed => serializer.serialize_i32(5),
9953                Self::Deleted => serializer.serialize_i32(6),
9954                Self::Purging => serializer.serialize_i32(7),
9955                Self::UnknownValue(u) => u.0.serialize(serializer),
9956            }
9957        }
9958    }
9959
9960    impl<'de> serde::de::Deserialize<'de> for State {
9961        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9962        where
9963            D: serde::Deserializer<'de>,
9964        {
9965            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9966                ".google.cloud.vmwareengine.v1.PrivateCloud.State",
9967            ))
9968        }
9969    }
9970
9971    /// Enum Type defines private cloud type.
9972    ///
9973    /// # Working with unknown values
9974    ///
9975    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9976    /// additional enum variants at any time. Adding new variants is not considered
9977    /// a breaking change. Applications should write their code in anticipation of:
9978    ///
9979    /// - New values appearing in future releases of the client library, **and**
9980    /// - New values received dynamically, without application changes.
9981    ///
9982    /// Please consult the [Working with enums] section in the user guide for some
9983    /// guidelines.
9984    ///
9985    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
9986    #[derive(Clone, Debug, PartialEq)]
9987    #[non_exhaustive]
9988    pub enum Type {
9989        /// Standard private is a zonal resource, with 3+ nodes. Default type.
9990        Standard,
9991        /// Time limited private cloud is a zonal resource, can have only 1 node and
9992        /// has limited life span. Will be deleted after defined period of time,
9993        /// can be converted into standard private cloud by expanding it up to 3
9994        /// or more nodes.
9995        TimeLimited,
9996        /// Stretched private cloud is a regional resource with redundancy,
9997        /// with a minimum of 6 nodes, nodes count has to be even.
9998        Stretched,
9999        /// If set, the enum was initialized with an unknown value.
10000        ///
10001        /// Applications can examine the value using [Type::value] or
10002        /// [Type::name].
10003        UnknownValue(r#type::UnknownValue),
10004    }
10005
10006    #[doc(hidden)]
10007    pub mod r#type {
10008        #[allow(unused_imports)]
10009        use super::*;
10010        #[derive(Clone, Debug, PartialEq)]
10011        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10012    }
10013
10014    impl Type {
10015        /// Gets the enum value.
10016        ///
10017        /// Returns `None` if the enum contains an unknown value deserialized from
10018        /// the string representation of enums.
10019        pub fn value(&self) -> std::option::Option<i32> {
10020            match self {
10021                Self::Standard => std::option::Option::Some(0),
10022                Self::TimeLimited => std::option::Option::Some(1),
10023                Self::Stretched => std::option::Option::Some(2),
10024                Self::UnknownValue(u) => u.0.value(),
10025            }
10026        }
10027
10028        /// Gets the enum value as a string.
10029        ///
10030        /// Returns `None` if the enum contains an unknown value deserialized from
10031        /// the integer representation of enums.
10032        pub fn name(&self) -> std::option::Option<&str> {
10033            match self {
10034                Self::Standard => std::option::Option::Some("STANDARD"),
10035                Self::TimeLimited => std::option::Option::Some("TIME_LIMITED"),
10036                Self::Stretched => std::option::Option::Some("STRETCHED"),
10037                Self::UnknownValue(u) => u.0.name(),
10038            }
10039        }
10040    }
10041
10042    impl std::default::Default for Type {
10043        fn default() -> Self {
10044            use std::convert::From;
10045            Self::from(0)
10046        }
10047    }
10048
10049    impl std::fmt::Display for Type {
10050        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10051            wkt::internal::display_enum(f, self.name(), self.value())
10052        }
10053    }
10054
10055    impl std::convert::From<i32> for Type {
10056        fn from(value: i32) -> Self {
10057            match value {
10058                0 => Self::Standard,
10059                1 => Self::TimeLimited,
10060                2 => Self::Stretched,
10061                _ => Self::UnknownValue(r#type::UnknownValue(
10062                    wkt::internal::UnknownEnumValue::Integer(value),
10063                )),
10064            }
10065        }
10066    }
10067
10068    impl std::convert::From<&str> for Type {
10069        fn from(value: &str) -> Self {
10070            use std::string::ToString;
10071            match value {
10072                "STANDARD" => Self::Standard,
10073                "TIME_LIMITED" => Self::TimeLimited,
10074                "STRETCHED" => Self::Stretched,
10075                _ => Self::UnknownValue(r#type::UnknownValue(
10076                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10077                )),
10078            }
10079        }
10080    }
10081
10082    impl serde::ser::Serialize for Type {
10083        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10084        where
10085            S: serde::Serializer,
10086        {
10087            match self {
10088                Self::Standard => serializer.serialize_i32(0),
10089                Self::TimeLimited => serializer.serialize_i32(1),
10090                Self::Stretched => serializer.serialize_i32(2),
10091                Self::UnknownValue(u) => u.0.serialize(serializer),
10092            }
10093        }
10094    }
10095
10096    impl<'de> serde::de::Deserialize<'de> for Type {
10097        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10098        where
10099            D: serde::Deserializer<'de>,
10100        {
10101            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
10102                ".google.cloud.vmwareengine.v1.PrivateCloud.Type",
10103            ))
10104        }
10105    }
10106}
10107
10108/// A cluster in a private cloud.
10109#[derive(Clone, Default, PartialEq)]
10110#[non_exhaustive]
10111pub struct Cluster {
10112    /// Output only. The resource name of this cluster.
10113    /// Resource names are schemeless URIs that follow the conventions in
10114    /// <https://cloud.google.com/apis/design/resource_names>.
10115    /// For example:
10116    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
10117    pub name: std::string::String,
10118
10119    /// Output only. Creation time of this resource.
10120    pub create_time: std::option::Option<wkt::Timestamp>,
10121
10122    /// Output only. Last update time of this resource.
10123    pub update_time: std::option::Option<wkt::Timestamp>,
10124
10125    /// Output only. State of the resource.
10126    pub state: crate::model::cluster::State,
10127
10128    /// Output only. True if the cluster is a management cluster; false otherwise.
10129    /// There can only be one management cluster in a private cloud
10130    /// and it has to be the first one.
10131    pub management: bool,
10132
10133    /// Optional. Configuration of the autoscaling applied to this cluster.
10134    pub autoscaling_settings: std::option::Option<crate::model::AutoscalingSettings>,
10135
10136    /// Output only. System-generated unique identifier for the resource.
10137    pub uid: std::string::String,
10138
10139    /// Required. The map of cluster node types in this cluster, where the key is
10140    /// canonical identifier of the node type (corresponds to the `NodeType`).
10141    pub node_type_configs:
10142        std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
10143
10144    /// Optional. Configuration of a stretched cluster. Required for clusters that
10145    /// belong to a STRETCHED private cloud.
10146    pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
10147
10148    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10149}
10150
10151impl Cluster {
10152    /// Creates a new default instance.
10153    pub fn new() -> Self {
10154        std::default::Default::default()
10155    }
10156
10157    /// Sets the value of [name][crate::model::Cluster::name].
10158    ///
10159    /// # Example
10160    /// ```ignore,no_run
10161    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10162    /// # let project_id = "project_id";
10163    /// # let location_id = "location_id";
10164    /// # let private_cloud_id = "private_cloud_id";
10165    /// # let cluster_id = "cluster_id";
10166    /// let x = Cluster::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/clusters/{cluster_id}"));
10167    /// ```
10168    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10169        self.name = v.into();
10170        self
10171    }
10172
10173    /// Sets the value of [create_time][crate::model::Cluster::create_time].
10174    ///
10175    /// # Example
10176    /// ```ignore,no_run
10177    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10178    /// use wkt::Timestamp;
10179    /// let x = Cluster::new().set_create_time(Timestamp::default()/* use setters */);
10180    /// ```
10181    pub fn set_create_time<T>(mut self, v: T) -> Self
10182    where
10183        T: std::convert::Into<wkt::Timestamp>,
10184    {
10185        self.create_time = std::option::Option::Some(v.into());
10186        self
10187    }
10188
10189    /// Sets or clears the value of [create_time][crate::model::Cluster::create_time].
10190    ///
10191    /// # Example
10192    /// ```ignore,no_run
10193    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10194    /// use wkt::Timestamp;
10195    /// let x = Cluster::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
10196    /// let x = Cluster::new().set_or_clear_create_time(None::<Timestamp>);
10197    /// ```
10198    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10199    where
10200        T: std::convert::Into<wkt::Timestamp>,
10201    {
10202        self.create_time = v.map(|x| x.into());
10203        self
10204    }
10205
10206    /// Sets the value of [update_time][crate::model::Cluster::update_time].
10207    ///
10208    /// # Example
10209    /// ```ignore,no_run
10210    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10211    /// use wkt::Timestamp;
10212    /// let x = Cluster::new().set_update_time(Timestamp::default()/* use setters */);
10213    /// ```
10214    pub fn set_update_time<T>(mut self, v: T) -> Self
10215    where
10216        T: std::convert::Into<wkt::Timestamp>,
10217    {
10218        self.update_time = std::option::Option::Some(v.into());
10219        self
10220    }
10221
10222    /// Sets or clears the value of [update_time][crate::model::Cluster::update_time].
10223    ///
10224    /// # Example
10225    /// ```ignore,no_run
10226    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10227    /// use wkt::Timestamp;
10228    /// let x = Cluster::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
10229    /// let x = Cluster::new().set_or_clear_update_time(None::<Timestamp>);
10230    /// ```
10231    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
10232    where
10233        T: std::convert::Into<wkt::Timestamp>,
10234    {
10235        self.update_time = v.map(|x| x.into());
10236        self
10237    }
10238
10239    /// Sets the value of [state][crate::model::Cluster::state].
10240    ///
10241    /// # Example
10242    /// ```ignore,no_run
10243    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10244    /// use google_cloud_vmwareengine_v1::model::cluster::State;
10245    /// let x0 = Cluster::new().set_state(State::Active);
10246    /// let x1 = Cluster::new().set_state(State::Creating);
10247    /// let x2 = Cluster::new().set_state(State::Updating);
10248    /// ```
10249    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
10250        self.state = v.into();
10251        self
10252    }
10253
10254    /// Sets the value of [management][crate::model::Cluster::management].
10255    ///
10256    /// # Example
10257    /// ```ignore,no_run
10258    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10259    /// let x = Cluster::new().set_management(true);
10260    /// ```
10261    pub fn set_management<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10262        self.management = v.into();
10263        self
10264    }
10265
10266    /// Sets the value of [autoscaling_settings][crate::model::Cluster::autoscaling_settings].
10267    ///
10268    /// # Example
10269    /// ```ignore,no_run
10270    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10271    /// use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
10272    /// let x = Cluster::new().set_autoscaling_settings(AutoscalingSettings::default()/* use setters */);
10273    /// ```
10274    pub fn set_autoscaling_settings<T>(mut self, v: T) -> Self
10275    where
10276        T: std::convert::Into<crate::model::AutoscalingSettings>,
10277    {
10278        self.autoscaling_settings = std::option::Option::Some(v.into());
10279        self
10280    }
10281
10282    /// Sets or clears the value of [autoscaling_settings][crate::model::Cluster::autoscaling_settings].
10283    ///
10284    /// # Example
10285    /// ```ignore,no_run
10286    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10287    /// use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
10288    /// let x = Cluster::new().set_or_clear_autoscaling_settings(Some(AutoscalingSettings::default()/* use setters */));
10289    /// let x = Cluster::new().set_or_clear_autoscaling_settings(None::<AutoscalingSettings>);
10290    /// ```
10291    pub fn set_or_clear_autoscaling_settings<T>(mut self, v: std::option::Option<T>) -> Self
10292    where
10293        T: std::convert::Into<crate::model::AutoscalingSettings>,
10294    {
10295        self.autoscaling_settings = v.map(|x| x.into());
10296        self
10297    }
10298
10299    /// Sets the value of [uid][crate::model::Cluster::uid].
10300    ///
10301    /// # Example
10302    /// ```ignore,no_run
10303    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10304    /// let x = Cluster::new().set_uid("example");
10305    /// ```
10306    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10307        self.uid = v.into();
10308        self
10309    }
10310
10311    /// Sets the value of [node_type_configs][crate::model::Cluster::node_type_configs].
10312    ///
10313    /// # Example
10314    /// ```ignore,no_run
10315    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10316    /// use google_cloud_vmwareengine_v1::model::NodeTypeConfig;
10317    /// let x = Cluster::new().set_node_type_configs([
10318    ///     ("key0", NodeTypeConfig::default()/* use setters */),
10319    ///     ("key1", NodeTypeConfig::default()/* use (different) setters */),
10320    /// ]);
10321    /// ```
10322    pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
10323    where
10324        T: std::iter::IntoIterator<Item = (K, V)>,
10325        K: std::convert::Into<std::string::String>,
10326        V: std::convert::Into<crate::model::NodeTypeConfig>,
10327    {
10328        use std::iter::Iterator;
10329        self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
10330        self
10331    }
10332
10333    /// Sets the value of [stretched_cluster_config][crate::model::Cluster::stretched_cluster_config].
10334    ///
10335    /// # Example
10336    /// ```ignore,no_run
10337    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10338    /// use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
10339    /// let x = Cluster::new().set_stretched_cluster_config(StretchedClusterConfig::default()/* use setters */);
10340    /// ```
10341    pub fn set_stretched_cluster_config<T>(mut self, v: T) -> Self
10342    where
10343        T: std::convert::Into<crate::model::StretchedClusterConfig>,
10344    {
10345        self.stretched_cluster_config = std::option::Option::Some(v.into());
10346        self
10347    }
10348
10349    /// Sets or clears the value of [stretched_cluster_config][crate::model::Cluster::stretched_cluster_config].
10350    ///
10351    /// # Example
10352    /// ```ignore,no_run
10353    /// # use google_cloud_vmwareengine_v1::model::Cluster;
10354    /// use google_cloud_vmwareengine_v1::model::StretchedClusterConfig;
10355    /// let x = Cluster::new().set_or_clear_stretched_cluster_config(Some(StretchedClusterConfig::default()/* use setters */));
10356    /// let x = Cluster::new().set_or_clear_stretched_cluster_config(None::<StretchedClusterConfig>);
10357    /// ```
10358    pub fn set_or_clear_stretched_cluster_config<T>(mut self, v: std::option::Option<T>) -> Self
10359    where
10360        T: std::convert::Into<crate::model::StretchedClusterConfig>,
10361    {
10362        self.stretched_cluster_config = v.map(|x| x.into());
10363        self
10364    }
10365}
10366
10367impl wkt::message::Message for Cluster {
10368    fn typename() -> &'static str {
10369        "type.googleapis.com/google.cloud.vmwareengine.v1.Cluster"
10370    }
10371}
10372
10373/// Defines additional types related to [Cluster].
10374pub mod cluster {
10375    #[allow(unused_imports)]
10376    use super::*;
10377
10378    /// Enum State defines possible states of private cloud clusters.
10379    ///
10380    /// # Working with unknown values
10381    ///
10382    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10383    /// additional enum variants at any time. Adding new variants is not considered
10384    /// a breaking change. Applications should write their code in anticipation of:
10385    ///
10386    /// - New values appearing in future releases of the client library, **and**
10387    /// - New values received dynamically, without application changes.
10388    ///
10389    /// Please consult the [Working with enums] section in the user guide for some
10390    /// guidelines.
10391    ///
10392    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10393    #[derive(Clone, Debug, PartialEq)]
10394    #[non_exhaustive]
10395    pub enum State {
10396        /// The default value. This value should never be used.
10397        Unspecified,
10398        /// The Cluster is operational and can be used by the user.
10399        Active,
10400        /// The Cluster is being deployed.
10401        Creating,
10402        /// Adding or removing of a node to the cluster, any other cluster specific
10403        /// updates.
10404        Updating,
10405        /// The Cluster is being deleted.
10406        Deleting,
10407        /// The Cluster is undergoing maintenance, for example: a failed node is
10408        /// getting replaced.
10409        Repairing,
10410        /// If set, the enum was initialized with an unknown value.
10411        ///
10412        /// Applications can examine the value using [State::value] or
10413        /// [State::name].
10414        UnknownValue(state::UnknownValue),
10415    }
10416
10417    #[doc(hidden)]
10418    pub mod state {
10419        #[allow(unused_imports)]
10420        use super::*;
10421        #[derive(Clone, Debug, PartialEq)]
10422        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10423    }
10424
10425    impl State {
10426        /// Gets the enum value.
10427        ///
10428        /// Returns `None` if the enum contains an unknown value deserialized from
10429        /// the string representation of enums.
10430        pub fn value(&self) -> std::option::Option<i32> {
10431            match self {
10432                Self::Unspecified => std::option::Option::Some(0),
10433                Self::Active => std::option::Option::Some(1),
10434                Self::Creating => std::option::Option::Some(2),
10435                Self::Updating => std::option::Option::Some(3),
10436                Self::Deleting => std::option::Option::Some(4),
10437                Self::Repairing => std::option::Option::Some(5),
10438                Self::UnknownValue(u) => u.0.value(),
10439            }
10440        }
10441
10442        /// Gets the enum value as a string.
10443        ///
10444        /// Returns `None` if the enum contains an unknown value deserialized from
10445        /// the integer representation of enums.
10446        pub fn name(&self) -> std::option::Option<&str> {
10447            match self {
10448                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10449                Self::Active => std::option::Option::Some("ACTIVE"),
10450                Self::Creating => std::option::Option::Some("CREATING"),
10451                Self::Updating => std::option::Option::Some("UPDATING"),
10452                Self::Deleting => std::option::Option::Some("DELETING"),
10453                Self::Repairing => std::option::Option::Some("REPAIRING"),
10454                Self::UnknownValue(u) => u.0.name(),
10455            }
10456        }
10457    }
10458
10459    impl std::default::Default for State {
10460        fn default() -> Self {
10461            use std::convert::From;
10462            Self::from(0)
10463        }
10464    }
10465
10466    impl std::fmt::Display for State {
10467        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10468            wkt::internal::display_enum(f, self.name(), self.value())
10469        }
10470    }
10471
10472    impl std::convert::From<i32> for State {
10473        fn from(value: i32) -> Self {
10474            match value {
10475                0 => Self::Unspecified,
10476                1 => Self::Active,
10477                2 => Self::Creating,
10478                3 => Self::Updating,
10479                4 => Self::Deleting,
10480                5 => Self::Repairing,
10481                _ => Self::UnknownValue(state::UnknownValue(
10482                    wkt::internal::UnknownEnumValue::Integer(value),
10483                )),
10484            }
10485        }
10486    }
10487
10488    impl std::convert::From<&str> for State {
10489        fn from(value: &str) -> Self {
10490            use std::string::ToString;
10491            match value {
10492                "STATE_UNSPECIFIED" => Self::Unspecified,
10493                "ACTIVE" => Self::Active,
10494                "CREATING" => Self::Creating,
10495                "UPDATING" => Self::Updating,
10496                "DELETING" => Self::Deleting,
10497                "REPAIRING" => Self::Repairing,
10498                _ => Self::UnknownValue(state::UnknownValue(
10499                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10500                )),
10501            }
10502        }
10503    }
10504
10505    impl serde::ser::Serialize for State {
10506        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10507        where
10508            S: serde::Serializer,
10509        {
10510            match self {
10511                Self::Unspecified => serializer.serialize_i32(0),
10512                Self::Active => serializer.serialize_i32(1),
10513                Self::Creating => serializer.serialize_i32(2),
10514                Self::Updating => serializer.serialize_i32(3),
10515                Self::Deleting => serializer.serialize_i32(4),
10516                Self::Repairing => serializer.serialize_i32(5),
10517                Self::UnknownValue(u) => u.0.serialize(serializer),
10518            }
10519        }
10520    }
10521
10522    impl<'de> serde::de::Deserialize<'de> for State {
10523        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10524        where
10525            D: serde::Deserializer<'de>,
10526        {
10527            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10528                ".google.cloud.vmwareengine.v1.Cluster.State",
10529            ))
10530        }
10531    }
10532}
10533
10534/// Node in a cluster.
10535#[derive(Clone, Default, PartialEq)]
10536#[non_exhaustive]
10537pub struct Node {
10538    /// Output only. The resource name of this node.
10539    /// Resource names are schemeless URIs that follow the conventions in
10540    /// <https://cloud.google.com/apis/design/resource_names>.
10541    /// For example:
10542    /// projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node
10543    pub name: std::string::String,
10544
10545    /// Output only. Fully qualified domain name of the node.
10546    pub fqdn: std::string::String,
10547
10548    /// Output only. Internal IP address of the node.
10549    pub internal_ip: std::string::String,
10550
10551    /// Output only. The canonical identifier of the node type (corresponds to the
10552    /// `NodeType`).
10553    /// For example: standard-72.
10554    pub node_type_id: std::string::String,
10555
10556    /// Output only. The version number of the VMware ESXi
10557    /// management component in this cluster.
10558    pub version: std::string::String,
10559
10560    /// Output only. Customized number of cores
10561    pub custom_core_count: i64,
10562
10563    /// Output only. The state of the appliance.
10564    pub state: crate::model::node::State,
10565
10566    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10567}
10568
10569impl Node {
10570    /// Creates a new default instance.
10571    pub fn new() -> Self {
10572        std::default::Default::default()
10573    }
10574
10575    /// Sets the value of [name][crate::model::Node::name].
10576    ///
10577    /// # Example
10578    /// ```ignore,no_run
10579    /// # use google_cloud_vmwareengine_v1::model::Node;
10580    /// # let project_id = "project_id";
10581    /// # let location_id = "location_id";
10582    /// # let private_cloud_id = "private_cloud_id";
10583    /// # let cluster_id = "cluster_id";
10584    /// # let node_id = "node_id";
10585    /// let x = Node::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/clusters/{cluster_id}/nodes/{node_id}"));
10586    /// ```
10587    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10588        self.name = v.into();
10589        self
10590    }
10591
10592    /// Sets the value of [fqdn][crate::model::Node::fqdn].
10593    ///
10594    /// # Example
10595    /// ```ignore,no_run
10596    /// # use google_cloud_vmwareengine_v1::model::Node;
10597    /// let x = Node::new().set_fqdn("example");
10598    /// ```
10599    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10600        self.fqdn = v.into();
10601        self
10602    }
10603
10604    /// Sets the value of [internal_ip][crate::model::Node::internal_ip].
10605    ///
10606    /// # Example
10607    /// ```ignore,no_run
10608    /// # use google_cloud_vmwareengine_v1::model::Node;
10609    /// let x = Node::new().set_internal_ip("example");
10610    /// ```
10611    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10612        self.internal_ip = v.into();
10613        self
10614    }
10615
10616    /// Sets the value of [node_type_id][crate::model::Node::node_type_id].
10617    ///
10618    /// # Example
10619    /// ```ignore,no_run
10620    /// # use google_cloud_vmwareengine_v1::model::Node;
10621    /// let x = Node::new().set_node_type_id("example");
10622    /// ```
10623    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10624        self.node_type_id = v.into();
10625        self
10626    }
10627
10628    /// Sets the value of [version][crate::model::Node::version].
10629    ///
10630    /// # Example
10631    /// ```ignore,no_run
10632    /// # use google_cloud_vmwareengine_v1::model::Node;
10633    /// let x = Node::new().set_version("example");
10634    /// ```
10635    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10636        self.version = v.into();
10637        self
10638    }
10639
10640    /// Sets the value of [custom_core_count][crate::model::Node::custom_core_count].
10641    ///
10642    /// # Example
10643    /// ```ignore,no_run
10644    /// # use google_cloud_vmwareengine_v1::model::Node;
10645    /// let x = Node::new().set_custom_core_count(42);
10646    /// ```
10647    pub fn set_custom_core_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10648        self.custom_core_count = v.into();
10649        self
10650    }
10651
10652    /// Sets the value of [state][crate::model::Node::state].
10653    ///
10654    /// # Example
10655    /// ```ignore,no_run
10656    /// # use google_cloud_vmwareengine_v1::model::Node;
10657    /// use google_cloud_vmwareengine_v1::model::node::State;
10658    /// let x0 = Node::new().set_state(State::Active);
10659    /// let x1 = Node::new().set_state(State::Creating);
10660    /// let x2 = Node::new().set_state(State::Failed);
10661    /// ```
10662    pub fn set_state<T: std::convert::Into<crate::model::node::State>>(mut self, v: T) -> Self {
10663        self.state = v.into();
10664        self
10665    }
10666}
10667
10668impl wkt::message::Message for Node {
10669    fn typename() -> &'static str {
10670        "type.googleapis.com/google.cloud.vmwareengine.v1.Node"
10671    }
10672}
10673
10674/// Defines additional types related to [Node].
10675pub mod node {
10676    #[allow(unused_imports)]
10677    use super::*;
10678
10679    /// Enum State defines possible states of a node in a cluster.
10680    ///
10681    /// # Working with unknown values
10682    ///
10683    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10684    /// additional enum variants at any time. Adding new variants is not considered
10685    /// a breaking change. Applications should write their code in anticipation of:
10686    ///
10687    /// - New values appearing in future releases of the client library, **and**
10688    /// - New values received dynamically, without application changes.
10689    ///
10690    /// Please consult the [Working with enums] section in the user guide for some
10691    /// guidelines.
10692    ///
10693    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
10694    #[derive(Clone, Debug, PartialEq)]
10695    #[non_exhaustive]
10696    pub enum State {
10697        /// The default value. This value should never be used.
10698        Unspecified,
10699        /// Node is operational and can be used by the user.
10700        Active,
10701        /// Node is being provisioned.
10702        Creating,
10703        /// Node is in a failed state.
10704        Failed,
10705        /// Node is undergoing maintenance, e.g.: during private cloud upgrade.
10706        Upgrading,
10707        /// If set, the enum was initialized with an unknown value.
10708        ///
10709        /// Applications can examine the value using [State::value] or
10710        /// [State::name].
10711        UnknownValue(state::UnknownValue),
10712    }
10713
10714    #[doc(hidden)]
10715    pub mod state {
10716        #[allow(unused_imports)]
10717        use super::*;
10718        #[derive(Clone, Debug, PartialEq)]
10719        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10720    }
10721
10722    impl State {
10723        /// Gets the enum value.
10724        ///
10725        /// Returns `None` if the enum contains an unknown value deserialized from
10726        /// the string representation of enums.
10727        pub fn value(&self) -> std::option::Option<i32> {
10728            match self {
10729                Self::Unspecified => std::option::Option::Some(0),
10730                Self::Active => std::option::Option::Some(1),
10731                Self::Creating => std::option::Option::Some(2),
10732                Self::Failed => std::option::Option::Some(3),
10733                Self::Upgrading => std::option::Option::Some(4),
10734                Self::UnknownValue(u) => u.0.value(),
10735            }
10736        }
10737
10738        /// Gets the enum value as a string.
10739        ///
10740        /// Returns `None` if the enum contains an unknown value deserialized from
10741        /// the integer representation of enums.
10742        pub fn name(&self) -> std::option::Option<&str> {
10743            match self {
10744                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10745                Self::Active => std::option::Option::Some("ACTIVE"),
10746                Self::Creating => std::option::Option::Some("CREATING"),
10747                Self::Failed => std::option::Option::Some("FAILED"),
10748                Self::Upgrading => std::option::Option::Some("UPGRADING"),
10749                Self::UnknownValue(u) => u.0.name(),
10750            }
10751        }
10752    }
10753
10754    impl std::default::Default for State {
10755        fn default() -> Self {
10756            use std::convert::From;
10757            Self::from(0)
10758        }
10759    }
10760
10761    impl std::fmt::Display for State {
10762        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10763            wkt::internal::display_enum(f, self.name(), self.value())
10764        }
10765    }
10766
10767    impl std::convert::From<i32> for State {
10768        fn from(value: i32) -> Self {
10769            match value {
10770                0 => Self::Unspecified,
10771                1 => Self::Active,
10772                2 => Self::Creating,
10773                3 => Self::Failed,
10774                4 => Self::Upgrading,
10775                _ => Self::UnknownValue(state::UnknownValue(
10776                    wkt::internal::UnknownEnumValue::Integer(value),
10777                )),
10778            }
10779        }
10780    }
10781
10782    impl std::convert::From<&str> for State {
10783        fn from(value: &str) -> Self {
10784            use std::string::ToString;
10785            match value {
10786                "STATE_UNSPECIFIED" => Self::Unspecified,
10787                "ACTIVE" => Self::Active,
10788                "CREATING" => Self::Creating,
10789                "FAILED" => Self::Failed,
10790                "UPGRADING" => Self::Upgrading,
10791                _ => Self::UnknownValue(state::UnknownValue(
10792                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10793                )),
10794            }
10795        }
10796    }
10797
10798    impl serde::ser::Serialize for State {
10799        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10800        where
10801            S: serde::Serializer,
10802        {
10803            match self {
10804                Self::Unspecified => serializer.serialize_i32(0),
10805                Self::Active => serializer.serialize_i32(1),
10806                Self::Creating => serializer.serialize_i32(2),
10807                Self::Failed => serializer.serialize_i32(3),
10808                Self::Upgrading => serializer.serialize_i32(4),
10809                Self::UnknownValue(u) => u.0.serialize(serializer),
10810            }
10811        }
10812    }
10813
10814    impl<'de> serde::de::Deserialize<'de> for State {
10815        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10816        where
10817            D: serde::Deserializer<'de>,
10818        {
10819            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10820                ".google.cloud.vmwareengine.v1.Node.State",
10821            ))
10822        }
10823    }
10824}
10825
10826/// Represents an allocated external IP address and its corresponding internal IP
10827/// address in a private cloud.
10828#[derive(Clone, Default, PartialEq)]
10829#[non_exhaustive]
10830pub struct ExternalAddress {
10831    /// Output only. The resource name of this external IP address.
10832    /// Resource names are schemeless URIs that follow the conventions in
10833    /// <https://cloud.google.com/apis/design/resource_names>.
10834    /// For example:
10835    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`
10836    pub name: std::string::String,
10837
10838    /// Output only. Creation time of this resource.
10839    pub create_time: std::option::Option<wkt::Timestamp>,
10840
10841    /// Output only. Last update time of this resource.
10842    pub update_time: std::option::Option<wkt::Timestamp>,
10843
10844    /// The internal IP address of a workload VM.
10845    pub internal_ip: std::string::String,
10846
10847    /// Output only. The external IP address of a workload VM.
10848    pub external_ip: std::string::String,
10849
10850    /// Output only. The state of the resource.
10851    pub state: crate::model::external_address::State,
10852
10853    /// Output only. System-generated unique identifier for the resource.
10854    pub uid: std::string::String,
10855
10856    /// User-provided description for this resource.
10857    pub description: std::string::String,
10858
10859    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10860}
10861
10862impl ExternalAddress {
10863    /// Creates a new default instance.
10864    pub fn new() -> Self {
10865        std::default::Default::default()
10866    }
10867
10868    /// Sets the value of [name][crate::model::ExternalAddress::name].
10869    ///
10870    /// # Example
10871    /// ```ignore,no_run
10872    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10873    /// # let project_id = "project_id";
10874    /// # let location_id = "location_id";
10875    /// # let private_cloud_id = "private_cloud_id";
10876    /// # let external_address_id = "external_address_id";
10877    /// let x = ExternalAddress::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/externalAddresses/{external_address_id}"));
10878    /// ```
10879    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10880        self.name = v.into();
10881        self
10882    }
10883
10884    /// Sets the value of [create_time][crate::model::ExternalAddress::create_time].
10885    ///
10886    /// # Example
10887    /// ```ignore,no_run
10888    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10889    /// use wkt::Timestamp;
10890    /// let x = ExternalAddress::new().set_create_time(Timestamp::default()/* use setters */);
10891    /// ```
10892    pub fn set_create_time<T>(mut self, v: T) -> Self
10893    where
10894        T: std::convert::Into<wkt::Timestamp>,
10895    {
10896        self.create_time = std::option::Option::Some(v.into());
10897        self
10898    }
10899
10900    /// Sets or clears the value of [create_time][crate::model::ExternalAddress::create_time].
10901    ///
10902    /// # Example
10903    /// ```ignore,no_run
10904    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10905    /// use wkt::Timestamp;
10906    /// let x = ExternalAddress::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
10907    /// let x = ExternalAddress::new().set_or_clear_create_time(None::<Timestamp>);
10908    /// ```
10909    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10910    where
10911        T: std::convert::Into<wkt::Timestamp>,
10912    {
10913        self.create_time = v.map(|x| x.into());
10914        self
10915    }
10916
10917    /// Sets the value of [update_time][crate::model::ExternalAddress::update_time].
10918    ///
10919    /// # Example
10920    /// ```ignore,no_run
10921    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10922    /// use wkt::Timestamp;
10923    /// let x = ExternalAddress::new().set_update_time(Timestamp::default()/* use setters */);
10924    /// ```
10925    pub fn set_update_time<T>(mut self, v: T) -> Self
10926    where
10927        T: std::convert::Into<wkt::Timestamp>,
10928    {
10929        self.update_time = std::option::Option::Some(v.into());
10930        self
10931    }
10932
10933    /// Sets or clears the value of [update_time][crate::model::ExternalAddress::update_time].
10934    ///
10935    /// # Example
10936    /// ```ignore,no_run
10937    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10938    /// use wkt::Timestamp;
10939    /// let x = ExternalAddress::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
10940    /// let x = ExternalAddress::new().set_or_clear_update_time(None::<Timestamp>);
10941    /// ```
10942    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
10943    where
10944        T: std::convert::Into<wkt::Timestamp>,
10945    {
10946        self.update_time = v.map(|x| x.into());
10947        self
10948    }
10949
10950    /// Sets the value of [internal_ip][crate::model::ExternalAddress::internal_ip].
10951    ///
10952    /// # Example
10953    /// ```ignore,no_run
10954    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10955    /// let x = ExternalAddress::new().set_internal_ip("example");
10956    /// ```
10957    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10958        self.internal_ip = v.into();
10959        self
10960    }
10961
10962    /// Sets the value of [external_ip][crate::model::ExternalAddress::external_ip].
10963    ///
10964    /// # Example
10965    /// ```ignore,no_run
10966    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10967    /// let x = ExternalAddress::new().set_external_ip("example");
10968    /// ```
10969    pub fn set_external_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10970        self.external_ip = v.into();
10971        self
10972    }
10973
10974    /// Sets the value of [state][crate::model::ExternalAddress::state].
10975    ///
10976    /// # Example
10977    /// ```ignore,no_run
10978    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10979    /// use google_cloud_vmwareengine_v1::model::external_address::State;
10980    /// let x0 = ExternalAddress::new().set_state(State::Active);
10981    /// let x1 = ExternalAddress::new().set_state(State::Creating);
10982    /// let x2 = ExternalAddress::new().set_state(State::Updating);
10983    /// ```
10984    pub fn set_state<T: std::convert::Into<crate::model::external_address::State>>(
10985        mut self,
10986        v: T,
10987    ) -> Self {
10988        self.state = v.into();
10989        self
10990    }
10991
10992    /// Sets the value of [uid][crate::model::ExternalAddress::uid].
10993    ///
10994    /// # Example
10995    /// ```ignore,no_run
10996    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
10997    /// let x = ExternalAddress::new().set_uid("example");
10998    /// ```
10999    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11000        self.uid = v.into();
11001        self
11002    }
11003
11004    /// Sets the value of [description][crate::model::ExternalAddress::description].
11005    ///
11006    /// # Example
11007    /// ```ignore,no_run
11008    /// # use google_cloud_vmwareengine_v1::model::ExternalAddress;
11009    /// let x = ExternalAddress::new().set_description("example");
11010    /// ```
11011    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11012        self.description = v.into();
11013        self
11014    }
11015}
11016
11017impl wkt::message::Message for ExternalAddress {
11018    fn typename() -> &'static str {
11019        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAddress"
11020    }
11021}
11022
11023/// Defines additional types related to [ExternalAddress].
11024pub mod external_address {
11025    #[allow(unused_imports)]
11026    use super::*;
11027
11028    /// Enum State defines possible states of external addresses.
11029    ///
11030    /// # Working with unknown values
11031    ///
11032    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11033    /// additional enum variants at any time. Adding new variants is not considered
11034    /// a breaking change. Applications should write their code in anticipation of:
11035    ///
11036    /// - New values appearing in future releases of the client library, **and**
11037    /// - New values received dynamically, without application changes.
11038    ///
11039    /// Please consult the [Working with enums] section in the user guide for some
11040    /// guidelines.
11041    ///
11042    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11043    #[derive(Clone, Debug, PartialEq)]
11044    #[non_exhaustive]
11045    pub enum State {
11046        /// The default value. This value should never be used.
11047        Unspecified,
11048        /// The address is ready.
11049        Active,
11050        /// The address is being created.
11051        Creating,
11052        /// The address is being updated.
11053        Updating,
11054        /// The address is being deleted.
11055        Deleting,
11056        /// If set, the enum was initialized with an unknown value.
11057        ///
11058        /// Applications can examine the value using [State::value] or
11059        /// [State::name].
11060        UnknownValue(state::UnknownValue),
11061    }
11062
11063    #[doc(hidden)]
11064    pub mod state {
11065        #[allow(unused_imports)]
11066        use super::*;
11067        #[derive(Clone, Debug, PartialEq)]
11068        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11069    }
11070
11071    impl State {
11072        /// Gets the enum value.
11073        ///
11074        /// Returns `None` if the enum contains an unknown value deserialized from
11075        /// the string representation of enums.
11076        pub fn value(&self) -> std::option::Option<i32> {
11077            match self {
11078                Self::Unspecified => std::option::Option::Some(0),
11079                Self::Active => std::option::Option::Some(1),
11080                Self::Creating => std::option::Option::Some(2),
11081                Self::Updating => std::option::Option::Some(3),
11082                Self::Deleting => std::option::Option::Some(4),
11083                Self::UnknownValue(u) => u.0.value(),
11084            }
11085        }
11086
11087        /// Gets the enum value as a string.
11088        ///
11089        /// Returns `None` if the enum contains an unknown value deserialized from
11090        /// the integer representation of enums.
11091        pub fn name(&self) -> std::option::Option<&str> {
11092            match self {
11093                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11094                Self::Active => std::option::Option::Some("ACTIVE"),
11095                Self::Creating => std::option::Option::Some("CREATING"),
11096                Self::Updating => std::option::Option::Some("UPDATING"),
11097                Self::Deleting => std::option::Option::Some("DELETING"),
11098                Self::UnknownValue(u) => u.0.name(),
11099            }
11100        }
11101    }
11102
11103    impl std::default::Default for State {
11104        fn default() -> Self {
11105            use std::convert::From;
11106            Self::from(0)
11107        }
11108    }
11109
11110    impl std::fmt::Display for State {
11111        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11112            wkt::internal::display_enum(f, self.name(), self.value())
11113        }
11114    }
11115
11116    impl std::convert::From<i32> for State {
11117        fn from(value: i32) -> Self {
11118            match value {
11119                0 => Self::Unspecified,
11120                1 => Self::Active,
11121                2 => Self::Creating,
11122                3 => Self::Updating,
11123                4 => Self::Deleting,
11124                _ => Self::UnknownValue(state::UnknownValue(
11125                    wkt::internal::UnknownEnumValue::Integer(value),
11126                )),
11127            }
11128        }
11129    }
11130
11131    impl std::convert::From<&str> for State {
11132        fn from(value: &str) -> Self {
11133            use std::string::ToString;
11134            match value {
11135                "STATE_UNSPECIFIED" => Self::Unspecified,
11136                "ACTIVE" => Self::Active,
11137                "CREATING" => Self::Creating,
11138                "UPDATING" => Self::Updating,
11139                "DELETING" => Self::Deleting,
11140                _ => Self::UnknownValue(state::UnknownValue(
11141                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11142                )),
11143            }
11144        }
11145    }
11146
11147    impl serde::ser::Serialize for State {
11148        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11149        where
11150            S: serde::Serializer,
11151        {
11152            match self {
11153                Self::Unspecified => serializer.serialize_i32(0),
11154                Self::Active => serializer.serialize_i32(1),
11155                Self::Creating => serializer.serialize_i32(2),
11156                Self::Updating => serializer.serialize_i32(3),
11157                Self::Deleting => serializer.serialize_i32(4),
11158                Self::UnknownValue(u) => u.0.serialize(serializer),
11159            }
11160        }
11161    }
11162
11163    impl<'de> serde::de::Deserialize<'de> for State {
11164        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11165        where
11166            D: serde::Deserializer<'de>,
11167        {
11168            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11169                ".google.cloud.vmwareengine.v1.ExternalAddress.State",
11170            ))
11171        }
11172    }
11173}
11174
11175/// Subnet in a private cloud. Either `management` subnets (such as vMotion) that
11176/// are read-only, or `userDefined`, which can also be updated.
11177#[derive(Clone, Default, PartialEq)]
11178#[non_exhaustive]
11179pub struct Subnet {
11180    /// Output only. The resource name of this subnet.
11181    /// Resource names are schemeless URIs that follow the conventions in
11182    /// <https://cloud.google.com/apis/design/resource_names>.
11183    /// For example:
11184    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
11185    pub name: std::string::String,
11186
11187    /// The IP address range of the subnet in CIDR format '10.0.0.0/24'.
11188    pub ip_cidr_range: std::string::String,
11189
11190    /// The IP address of the gateway of this subnet.
11191    /// Must fall within the IP prefix defined above.
11192    pub gateway_ip: std::string::String,
11193
11194    /// Output only. The type of the subnet. For example "management" or
11195    /// "userDefined".
11196    pub r#type: std::string::String,
11197
11198    /// Output only. The state of the resource.
11199    pub state: crate::model::subnet::State,
11200
11201    /// Output only. VLAN ID of the VLAN on which the subnet is configured
11202    pub vlan_id: i32,
11203
11204    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11205}
11206
11207impl Subnet {
11208    /// Creates a new default instance.
11209    pub fn new() -> Self {
11210        std::default::Default::default()
11211    }
11212
11213    /// Sets the value of [name][crate::model::Subnet::name].
11214    ///
11215    /// # Example
11216    /// ```ignore,no_run
11217    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11218    /// # let project_id = "project_id";
11219    /// # let location_id = "location_id";
11220    /// # let private_cloud_id = "private_cloud_id";
11221    /// # let subnet_id = "subnet_id";
11222    /// let x = Subnet::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/subnets/{subnet_id}"));
11223    /// ```
11224    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11225        self.name = v.into();
11226        self
11227    }
11228
11229    /// Sets the value of [ip_cidr_range][crate::model::Subnet::ip_cidr_range].
11230    ///
11231    /// # Example
11232    /// ```ignore,no_run
11233    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11234    /// let x = Subnet::new().set_ip_cidr_range("example");
11235    /// ```
11236    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11237        self.ip_cidr_range = v.into();
11238        self
11239    }
11240
11241    /// Sets the value of [gateway_ip][crate::model::Subnet::gateway_ip].
11242    ///
11243    /// # Example
11244    /// ```ignore,no_run
11245    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11246    /// let x = Subnet::new().set_gateway_ip("example");
11247    /// ```
11248    pub fn set_gateway_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11249        self.gateway_ip = v.into();
11250        self
11251    }
11252
11253    /// Sets the value of [r#type][crate::model::Subnet::type].
11254    ///
11255    /// # Example
11256    /// ```ignore,no_run
11257    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11258    /// let x = Subnet::new().set_type("example");
11259    /// ```
11260    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11261        self.r#type = v.into();
11262        self
11263    }
11264
11265    /// Sets the value of [state][crate::model::Subnet::state].
11266    ///
11267    /// # Example
11268    /// ```ignore,no_run
11269    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11270    /// use google_cloud_vmwareengine_v1::model::subnet::State;
11271    /// let x0 = Subnet::new().set_state(State::Active);
11272    /// let x1 = Subnet::new().set_state(State::Creating);
11273    /// let x2 = Subnet::new().set_state(State::Updating);
11274    /// ```
11275    pub fn set_state<T: std::convert::Into<crate::model::subnet::State>>(mut self, v: T) -> Self {
11276        self.state = v.into();
11277        self
11278    }
11279
11280    /// Sets the value of [vlan_id][crate::model::Subnet::vlan_id].
11281    ///
11282    /// # Example
11283    /// ```ignore,no_run
11284    /// # use google_cloud_vmwareengine_v1::model::Subnet;
11285    /// let x = Subnet::new().set_vlan_id(42);
11286    /// ```
11287    pub fn set_vlan_id<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11288        self.vlan_id = v.into();
11289        self
11290    }
11291}
11292
11293impl wkt::message::Message for Subnet {
11294    fn typename() -> &'static str {
11295        "type.googleapis.com/google.cloud.vmwareengine.v1.Subnet"
11296    }
11297}
11298
11299/// Defines additional types related to [Subnet].
11300pub mod subnet {
11301    #[allow(unused_imports)]
11302    use super::*;
11303
11304    /// Defines possible states of subnets.
11305    ///
11306    /// # Working with unknown values
11307    ///
11308    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11309    /// additional enum variants at any time. Adding new variants is not considered
11310    /// a breaking change. Applications should write their code in anticipation of:
11311    ///
11312    /// - New values appearing in future releases of the client library, **and**
11313    /// - New values received dynamically, without application changes.
11314    ///
11315    /// Please consult the [Working with enums] section in the user guide for some
11316    /// guidelines.
11317    ///
11318    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
11319    #[derive(Clone, Debug, PartialEq)]
11320    #[non_exhaustive]
11321    pub enum State {
11322        /// The default value. This value should never be used.
11323        Unspecified,
11324        /// The subnet is ready.
11325        Active,
11326        /// The subnet is being created.
11327        Creating,
11328        /// The subnet is being updated.
11329        Updating,
11330        /// The subnet is being deleted.
11331        Deleting,
11332        /// Changes requested in the last operation are being propagated.
11333        Reconciling,
11334        /// Last operation on the subnet did not succeed. Subnet's payload is
11335        /// reverted back to its most recent working state.
11336        Failed,
11337        /// If set, the enum was initialized with an unknown value.
11338        ///
11339        /// Applications can examine the value using [State::value] or
11340        /// [State::name].
11341        UnknownValue(state::UnknownValue),
11342    }
11343
11344    #[doc(hidden)]
11345    pub mod state {
11346        #[allow(unused_imports)]
11347        use super::*;
11348        #[derive(Clone, Debug, PartialEq)]
11349        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11350    }
11351
11352    impl State {
11353        /// Gets the enum value.
11354        ///
11355        /// Returns `None` if the enum contains an unknown value deserialized from
11356        /// the string representation of enums.
11357        pub fn value(&self) -> std::option::Option<i32> {
11358            match self {
11359                Self::Unspecified => std::option::Option::Some(0),
11360                Self::Active => std::option::Option::Some(1),
11361                Self::Creating => std::option::Option::Some(2),
11362                Self::Updating => std::option::Option::Some(3),
11363                Self::Deleting => std::option::Option::Some(4),
11364                Self::Reconciling => std::option::Option::Some(5),
11365                Self::Failed => std::option::Option::Some(6),
11366                Self::UnknownValue(u) => u.0.value(),
11367            }
11368        }
11369
11370        /// Gets the enum value as a string.
11371        ///
11372        /// Returns `None` if the enum contains an unknown value deserialized from
11373        /// the integer representation of enums.
11374        pub fn name(&self) -> std::option::Option<&str> {
11375            match self {
11376                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11377                Self::Active => std::option::Option::Some("ACTIVE"),
11378                Self::Creating => std::option::Option::Some("CREATING"),
11379                Self::Updating => std::option::Option::Some("UPDATING"),
11380                Self::Deleting => std::option::Option::Some("DELETING"),
11381                Self::Reconciling => std::option::Option::Some("RECONCILING"),
11382                Self::Failed => std::option::Option::Some("FAILED"),
11383                Self::UnknownValue(u) => u.0.name(),
11384            }
11385        }
11386    }
11387
11388    impl std::default::Default for State {
11389        fn default() -> Self {
11390            use std::convert::From;
11391            Self::from(0)
11392        }
11393    }
11394
11395    impl std::fmt::Display for State {
11396        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11397            wkt::internal::display_enum(f, self.name(), self.value())
11398        }
11399    }
11400
11401    impl std::convert::From<i32> for State {
11402        fn from(value: i32) -> Self {
11403            match value {
11404                0 => Self::Unspecified,
11405                1 => Self::Active,
11406                2 => Self::Creating,
11407                3 => Self::Updating,
11408                4 => Self::Deleting,
11409                5 => Self::Reconciling,
11410                6 => Self::Failed,
11411                _ => Self::UnknownValue(state::UnknownValue(
11412                    wkt::internal::UnknownEnumValue::Integer(value),
11413                )),
11414            }
11415        }
11416    }
11417
11418    impl std::convert::From<&str> for State {
11419        fn from(value: &str) -> Self {
11420            use std::string::ToString;
11421            match value {
11422                "STATE_UNSPECIFIED" => Self::Unspecified,
11423                "ACTIVE" => Self::Active,
11424                "CREATING" => Self::Creating,
11425                "UPDATING" => Self::Updating,
11426                "DELETING" => Self::Deleting,
11427                "RECONCILING" => Self::Reconciling,
11428                "FAILED" => Self::Failed,
11429                _ => Self::UnknownValue(state::UnknownValue(
11430                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11431                )),
11432            }
11433        }
11434    }
11435
11436    impl serde::ser::Serialize for State {
11437        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11438        where
11439            S: serde::Serializer,
11440        {
11441            match self {
11442                Self::Unspecified => serializer.serialize_i32(0),
11443                Self::Active => serializer.serialize_i32(1),
11444                Self::Creating => serializer.serialize_i32(2),
11445                Self::Updating => serializer.serialize_i32(3),
11446                Self::Deleting => serializer.serialize_i32(4),
11447                Self::Reconciling => serializer.serialize_i32(5),
11448                Self::Failed => serializer.serialize_i32(6),
11449                Self::UnknownValue(u) => u.0.serialize(serializer),
11450            }
11451        }
11452    }
11453
11454    impl<'de> serde::de::Deserialize<'de> for State {
11455        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11456        where
11457            D: serde::Deserializer<'de>,
11458        {
11459            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11460                ".google.cloud.vmwareengine.v1.Subnet.State",
11461            ))
11462        }
11463    }
11464}
11465
11466/// External access firewall rules for filtering incoming traffic destined to
11467/// `ExternalAddress` resources.
11468#[derive(Clone, Default, PartialEq)]
11469#[non_exhaustive]
11470pub struct ExternalAccessRule {
11471    /// Output only. The resource name of this external access rule.
11472    /// Resource names are schemeless URIs that follow the conventions in
11473    /// <https://cloud.google.com/apis/design/resource_names>.
11474    /// For example:
11475    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
11476    pub name: std::string::String,
11477
11478    /// Output only. Creation time of this resource.
11479    pub create_time: std::option::Option<wkt::Timestamp>,
11480
11481    /// Output only. Last update time of this resource.
11482    pub update_time: std::option::Option<wkt::Timestamp>,
11483
11484    /// User-provided description for this external access rule.
11485    pub description: std::string::String,
11486
11487    /// External access rule priority, which determines the external access rule to
11488    /// use when multiple rules apply. If multiple rules have the same priority,
11489    /// their ordering is non-deterministic. If specific ordering is required,
11490    /// assign unique priorities to enforce such ordering. The external access rule
11491    /// priority is an integer from 100 to 4096, both inclusive. Lower integers
11492    /// indicate higher precedence. For example, a rule with priority `100` has
11493    /// higher precedence than a rule with priority `101`.
11494    pub priority: i32,
11495
11496    /// The action that the external access rule performs.
11497    pub action: crate::model::external_access_rule::Action,
11498
11499    /// The IP protocol to which the external access rule applies. This value can
11500    /// be one of the following three protocol strings (not case-sensitive):
11501    /// `tcp`, `udp`, or `icmp`.
11502    pub ip_protocol: std::string::String,
11503
11504    /// If source ranges are specified, the external access rule applies only to
11505    /// traffic that has a source IP address in these ranges. These ranges can
11506    /// either be expressed in the CIDR format or as an IP address. As only inbound
11507    /// rules are supported, `ExternalAddress` resources cannot be the source IP
11508    /// addresses of an external access rule. To match all source addresses,
11509    /// specify `0.0.0.0/0`.
11510    pub source_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
11511
11512    /// A list of source ports to which the external access rule applies. This
11513    /// field is only applicable for the UDP or TCP protocol.
11514    /// Each entry must be either an integer or a range. For example: `["22"]`,
11515    /// `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify
11516    /// `["0-65535"]`.
11517    pub source_ports: std::vec::Vec<std::string::String>,
11518
11519    /// If destination ranges are specified, the external access rule applies only
11520    /// to the traffic that has a destination IP address in these ranges. The
11521    /// specified IP addresses must have reserved external IP addresses in the
11522    /// scope of the parent network policy. To match all external IP addresses in
11523    /// the scope of the parent network policy, specify `0.0.0.0/0`. To match a
11524    /// specific external IP address, specify it using the
11525    /// `IpRange.external_address` property.
11526    pub destination_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
11527
11528    /// A list of destination ports to which the external access rule applies. This
11529    /// field is only applicable for the UDP or TCP protocol.
11530    /// Each entry must be either an integer or a range. For example: `["22"]`,
11531    /// `["80","443"]`, or `["12345-12349"]`. To match all destination ports,
11532    /// specify `["0-65535"]`.
11533    pub destination_ports: std::vec::Vec<std::string::String>,
11534
11535    /// Output only. The state of the resource.
11536    pub state: crate::model::external_access_rule::State,
11537
11538    /// Output only. System-generated unique identifier for the resource.
11539    pub uid: std::string::String,
11540
11541    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11542}
11543
11544impl ExternalAccessRule {
11545    /// Creates a new default instance.
11546    pub fn new() -> Self {
11547        std::default::Default::default()
11548    }
11549
11550    /// Sets the value of [name][crate::model::ExternalAccessRule::name].
11551    ///
11552    /// # Example
11553    /// ```ignore,no_run
11554    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11555    /// # let project_id = "project_id";
11556    /// # let location_id = "location_id";
11557    /// # let network_policy_id = "network_policy_id";
11558    /// # let external_access_rule_id = "external_access_rule_id";
11559    /// let x = ExternalAccessRule::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}/externalAccessRules/{external_access_rule_id}"));
11560    /// ```
11561    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11562        self.name = v.into();
11563        self
11564    }
11565
11566    /// Sets the value of [create_time][crate::model::ExternalAccessRule::create_time].
11567    ///
11568    /// # Example
11569    /// ```ignore,no_run
11570    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11571    /// use wkt::Timestamp;
11572    /// let x = ExternalAccessRule::new().set_create_time(Timestamp::default()/* use setters */);
11573    /// ```
11574    pub fn set_create_time<T>(mut self, v: T) -> Self
11575    where
11576        T: std::convert::Into<wkt::Timestamp>,
11577    {
11578        self.create_time = std::option::Option::Some(v.into());
11579        self
11580    }
11581
11582    /// Sets or clears the value of [create_time][crate::model::ExternalAccessRule::create_time].
11583    ///
11584    /// # Example
11585    /// ```ignore,no_run
11586    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11587    /// use wkt::Timestamp;
11588    /// let x = ExternalAccessRule::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
11589    /// let x = ExternalAccessRule::new().set_or_clear_create_time(None::<Timestamp>);
11590    /// ```
11591    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11592    where
11593        T: std::convert::Into<wkt::Timestamp>,
11594    {
11595        self.create_time = v.map(|x| x.into());
11596        self
11597    }
11598
11599    /// Sets the value of [update_time][crate::model::ExternalAccessRule::update_time].
11600    ///
11601    /// # Example
11602    /// ```ignore,no_run
11603    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11604    /// use wkt::Timestamp;
11605    /// let x = ExternalAccessRule::new().set_update_time(Timestamp::default()/* use setters */);
11606    /// ```
11607    pub fn set_update_time<T>(mut self, v: T) -> Self
11608    where
11609        T: std::convert::Into<wkt::Timestamp>,
11610    {
11611        self.update_time = std::option::Option::Some(v.into());
11612        self
11613    }
11614
11615    /// Sets or clears the value of [update_time][crate::model::ExternalAccessRule::update_time].
11616    ///
11617    /// # Example
11618    /// ```ignore,no_run
11619    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11620    /// use wkt::Timestamp;
11621    /// let x = ExternalAccessRule::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
11622    /// let x = ExternalAccessRule::new().set_or_clear_update_time(None::<Timestamp>);
11623    /// ```
11624    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11625    where
11626        T: std::convert::Into<wkt::Timestamp>,
11627    {
11628        self.update_time = v.map(|x| x.into());
11629        self
11630    }
11631
11632    /// Sets the value of [description][crate::model::ExternalAccessRule::description].
11633    ///
11634    /// # Example
11635    /// ```ignore,no_run
11636    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11637    /// let x = ExternalAccessRule::new().set_description("example");
11638    /// ```
11639    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11640        self.description = v.into();
11641        self
11642    }
11643
11644    /// Sets the value of [priority][crate::model::ExternalAccessRule::priority].
11645    ///
11646    /// # Example
11647    /// ```ignore,no_run
11648    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11649    /// let x = ExternalAccessRule::new().set_priority(42);
11650    /// ```
11651    pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11652        self.priority = v.into();
11653        self
11654    }
11655
11656    /// Sets the value of [action][crate::model::ExternalAccessRule::action].
11657    ///
11658    /// # Example
11659    /// ```ignore,no_run
11660    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11661    /// use google_cloud_vmwareengine_v1::model::external_access_rule::Action;
11662    /// let x0 = ExternalAccessRule::new().set_action(Action::Allow);
11663    /// let x1 = ExternalAccessRule::new().set_action(Action::Deny);
11664    /// ```
11665    pub fn set_action<T: std::convert::Into<crate::model::external_access_rule::Action>>(
11666        mut self,
11667        v: T,
11668    ) -> Self {
11669        self.action = v.into();
11670        self
11671    }
11672
11673    /// Sets the value of [ip_protocol][crate::model::ExternalAccessRule::ip_protocol].
11674    ///
11675    /// # Example
11676    /// ```ignore,no_run
11677    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11678    /// let x = ExternalAccessRule::new().set_ip_protocol("example");
11679    /// ```
11680    pub fn set_ip_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11681        self.ip_protocol = v.into();
11682        self
11683    }
11684
11685    /// Sets the value of [source_ip_ranges][crate::model::ExternalAccessRule::source_ip_ranges].
11686    ///
11687    /// # Example
11688    /// ```ignore,no_run
11689    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11690    /// use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11691    /// let x = ExternalAccessRule::new()
11692    ///     .set_source_ip_ranges([
11693    ///         IpRange::default()/* use setters */,
11694    ///         IpRange::default()/* use (different) setters */,
11695    ///     ]);
11696    /// ```
11697    pub fn set_source_ip_ranges<T, V>(mut self, v: T) -> Self
11698    where
11699        T: std::iter::IntoIterator<Item = V>,
11700        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
11701    {
11702        use std::iter::Iterator;
11703        self.source_ip_ranges = v.into_iter().map(|i| i.into()).collect();
11704        self
11705    }
11706
11707    /// Sets the value of [source_ports][crate::model::ExternalAccessRule::source_ports].
11708    ///
11709    /// # Example
11710    /// ```ignore,no_run
11711    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11712    /// let x = ExternalAccessRule::new().set_source_ports(["a", "b", "c"]);
11713    /// ```
11714    pub fn set_source_ports<T, V>(mut self, v: T) -> Self
11715    where
11716        T: std::iter::IntoIterator<Item = V>,
11717        V: std::convert::Into<std::string::String>,
11718    {
11719        use std::iter::Iterator;
11720        self.source_ports = v.into_iter().map(|i| i.into()).collect();
11721        self
11722    }
11723
11724    /// Sets the value of [destination_ip_ranges][crate::model::ExternalAccessRule::destination_ip_ranges].
11725    ///
11726    /// # Example
11727    /// ```ignore,no_run
11728    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11729    /// use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11730    /// let x = ExternalAccessRule::new()
11731    ///     .set_destination_ip_ranges([
11732    ///         IpRange::default()/* use setters */,
11733    ///         IpRange::default()/* use (different) setters */,
11734    ///     ]);
11735    /// ```
11736    pub fn set_destination_ip_ranges<T, V>(mut self, v: T) -> Self
11737    where
11738        T: std::iter::IntoIterator<Item = V>,
11739        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
11740    {
11741        use std::iter::Iterator;
11742        self.destination_ip_ranges = v.into_iter().map(|i| i.into()).collect();
11743        self
11744    }
11745
11746    /// Sets the value of [destination_ports][crate::model::ExternalAccessRule::destination_ports].
11747    ///
11748    /// # Example
11749    /// ```ignore,no_run
11750    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11751    /// let x = ExternalAccessRule::new().set_destination_ports(["a", "b", "c"]);
11752    /// ```
11753    pub fn set_destination_ports<T, V>(mut self, v: T) -> Self
11754    where
11755        T: std::iter::IntoIterator<Item = V>,
11756        V: std::convert::Into<std::string::String>,
11757    {
11758        use std::iter::Iterator;
11759        self.destination_ports = v.into_iter().map(|i| i.into()).collect();
11760        self
11761    }
11762
11763    /// Sets the value of [state][crate::model::ExternalAccessRule::state].
11764    ///
11765    /// # Example
11766    /// ```ignore,no_run
11767    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11768    /// use google_cloud_vmwareengine_v1::model::external_access_rule::State;
11769    /// let x0 = ExternalAccessRule::new().set_state(State::Active);
11770    /// let x1 = ExternalAccessRule::new().set_state(State::Creating);
11771    /// let x2 = ExternalAccessRule::new().set_state(State::Updating);
11772    /// ```
11773    pub fn set_state<T: std::convert::Into<crate::model::external_access_rule::State>>(
11774        mut self,
11775        v: T,
11776    ) -> Self {
11777        self.state = v.into();
11778        self
11779    }
11780
11781    /// Sets the value of [uid][crate::model::ExternalAccessRule::uid].
11782    ///
11783    /// # Example
11784    /// ```ignore,no_run
11785    /// # use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
11786    /// let x = ExternalAccessRule::new().set_uid("example");
11787    /// ```
11788    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11789        self.uid = v.into();
11790        self
11791    }
11792}
11793
11794impl wkt::message::Message for ExternalAccessRule {
11795    fn typename() -> &'static str {
11796        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule"
11797    }
11798}
11799
11800/// Defines additional types related to [ExternalAccessRule].
11801pub mod external_access_rule {
11802    #[allow(unused_imports)]
11803    use super::*;
11804
11805    /// An IP range provided in any one of the supported formats.
11806    #[derive(Clone, Default, PartialEq)]
11807    #[non_exhaustive]
11808    pub struct IpRange {
11809        #[allow(missing_docs)]
11810        pub ip_range: std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
11811
11812        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11813    }
11814
11815    impl IpRange {
11816        /// Creates a new default instance.
11817        pub fn new() -> Self {
11818            std::default::Default::default()
11819        }
11820
11821        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range].
11822        ///
11823        /// Note that all the setters affecting `ip_range` are mutually
11824        /// exclusive.
11825        ///
11826        /// # Example
11827        /// ```ignore,no_run
11828        /// # use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11829        /// use google_cloud_vmwareengine_v1::model::external_access_rule::ip_range::IpRange as IpRangeOneOf;
11830        /// let x = IpRange::new().set_ip_range(Some(IpRangeOneOf::IpAddress("example".to_string())));
11831        /// ```
11832        pub fn set_ip_range<
11833            T: std::convert::Into<
11834                    std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
11835                >,
11836        >(
11837            mut self,
11838            v: T,
11839        ) -> Self {
11840            self.ip_range = v.into();
11841            self
11842        }
11843
11844        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11845        /// if it holds a `IpAddress`, `None` if the field is not set or
11846        /// holds a different branch.
11847        pub fn ip_address(&self) -> std::option::Option<&std::string::String> {
11848            #[allow(unreachable_patterns)]
11849            self.ip_range.as_ref().and_then(|v| match v {
11850                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v) => {
11851                    std::option::Option::Some(v)
11852                }
11853                _ => std::option::Option::None,
11854            })
11855        }
11856
11857        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11858        /// to hold a `IpAddress`.
11859        ///
11860        /// Note that all the setters affecting `ip_range` are
11861        /// mutually exclusive.
11862        ///
11863        /// # Example
11864        /// ```ignore,no_run
11865        /// # use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11866        /// let x = IpRange::new().set_ip_address("example");
11867        /// assert!(x.ip_address().is_some());
11868        /// assert!(x.ip_address_range().is_none());
11869        /// assert!(x.external_address().is_none());
11870        /// ```
11871        pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11872            self.ip_range = std::option::Option::Some(
11873                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v.into()),
11874            );
11875            self
11876        }
11877
11878        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11879        /// if it holds a `IpAddressRange`, `None` if the field is not set or
11880        /// holds a different branch.
11881        pub fn ip_address_range(&self) -> std::option::Option<&std::string::String> {
11882            #[allow(unreachable_patterns)]
11883            self.ip_range.as_ref().and_then(|v| match v {
11884                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v) => {
11885                    std::option::Option::Some(v)
11886                }
11887                _ => std::option::Option::None,
11888            })
11889        }
11890
11891        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11892        /// to hold a `IpAddressRange`.
11893        ///
11894        /// Note that all the setters affecting `ip_range` are
11895        /// mutually exclusive.
11896        ///
11897        /// # Example
11898        /// ```ignore,no_run
11899        /// # use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11900        /// let x = IpRange::new().set_ip_address_range("example");
11901        /// assert!(x.ip_address_range().is_some());
11902        /// assert!(x.ip_address().is_none());
11903        /// assert!(x.external_address().is_none());
11904        /// ```
11905        pub fn set_ip_address_range<T: std::convert::Into<std::string::String>>(
11906            mut self,
11907            v: T,
11908        ) -> Self {
11909            self.ip_range = std::option::Option::Some(
11910                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v.into()),
11911            );
11912            self
11913        }
11914
11915        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11916        /// if it holds a `ExternalAddress`, `None` if the field is not set or
11917        /// holds a different branch.
11918        pub fn external_address(&self) -> std::option::Option<&std::string::String> {
11919            #[allow(unreachable_patterns)]
11920            self.ip_range.as_ref().and_then(|v| match v {
11921                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v) => {
11922                    std::option::Option::Some(v)
11923                }
11924                _ => std::option::Option::None,
11925            })
11926        }
11927
11928        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
11929        /// to hold a `ExternalAddress`.
11930        ///
11931        /// Note that all the setters affecting `ip_range` are
11932        /// mutually exclusive.
11933        ///
11934        /// # Example
11935        /// ```ignore,no_run
11936        /// # use google_cloud_vmwareengine_v1::model::external_access_rule::IpRange;
11937        /// # let project_id = "project_id";
11938        /// # let location_id = "location_id";
11939        /// # let private_cloud_id = "private_cloud_id";
11940        /// # let external_address_id = "external_address_id";
11941        /// let x = IpRange::new().set_external_address(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/externalAddresses/{external_address_id}"));
11942        /// assert!(x.external_address().is_some());
11943        /// assert!(x.ip_address().is_none());
11944        /// assert!(x.ip_address_range().is_none());
11945        /// ```
11946        pub fn set_external_address<T: std::convert::Into<std::string::String>>(
11947            mut self,
11948            v: T,
11949        ) -> Self {
11950            self.ip_range = std::option::Option::Some(
11951                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v.into()),
11952            );
11953            self
11954        }
11955    }
11956
11957    impl wkt::message::Message for IpRange {
11958        fn typename() -> &'static str {
11959            "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange"
11960        }
11961    }
11962
11963    /// Defines additional types related to [IpRange].
11964    pub mod ip_range {
11965        #[allow(unused_imports)]
11966        use super::*;
11967
11968        #[allow(missing_docs)]
11969        #[derive(Clone, Debug, PartialEq)]
11970        #[non_exhaustive]
11971        pub enum IpRange {
11972            /// A single IP address. For example: `10.0.0.5`.
11973            IpAddress(std::string::String),
11974            /// An IP address range in the CIDR format. For example: `10.0.0.0/24`.
11975            IpAddressRange(std::string::String),
11976            /// The name of an `ExternalAddress` resource. The external address must
11977            /// have been reserved in the scope of this external access rule's parent
11978            /// network policy.  Provide the external address name in the form of
11979            /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`.
11980            /// For example:
11981            /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`.
11982            ExternalAddress(std::string::String),
11983        }
11984    }
11985
11986    /// Action determines whether the external access rule permits or blocks
11987    /// traffic, subject to the other components of the rule matching the traffic.
11988    ///
11989    /// # Working with unknown values
11990    ///
11991    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11992    /// additional enum variants at any time. Adding new variants is not considered
11993    /// a breaking change. Applications should write their code in anticipation of:
11994    ///
11995    /// - New values appearing in future releases of the client library, **and**
11996    /// - New values received dynamically, without application changes.
11997    ///
11998    /// Please consult the [Working with enums] section in the user guide for some
11999    /// guidelines.
12000    ///
12001    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12002    #[derive(Clone, Debug, PartialEq)]
12003    #[non_exhaustive]
12004    pub enum Action {
12005        /// Defaults to allow.
12006        Unspecified,
12007        /// Allows connections that match the other specified components.
12008        Allow,
12009        /// Blocks connections that match the other specified components.
12010        Deny,
12011        /// If set, the enum was initialized with an unknown value.
12012        ///
12013        /// Applications can examine the value using [Action::value] or
12014        /// [Action::name].
12015        UnknownValue(action::UnknownValue),
12016    }
12017
12018    #[doc(hidden)]
12019    pub mod action {
12020        #[allow(unused_imports)]
12021        use super::*;
12022        #[derive(Clone, Debug, PartialEq)]
12023        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12024    }
12025
12026    impl Action {
12027        /// Gets the enum value.
12028        ///
12029        /// Returns `None` if the enum contains an unknown value deserialized from
12030        /// the string representation of enums.
12031        pub fn value(&self) -> std::option::Option<i32> {
12032            match self {
12033                Self::Unspecified => std::option::Option::Some(0),
12034                Self::Allow => std::option::Option::Some(1),
12035                Self::Deny => std::option::Option::Some(2),
12036                Self::UnknownValue(u) => u.0.value(),
12037            }
12038        }
12039
12040        /// Gets the enum value as a string.
12041        ///
12042        /// Returns `None` if the enum contains an unknown value deserialized from
12043        /// the integer representation of enums.
12044        pub fn name(&self) -> std::option::Option<&str> {
12045            match self {
12046                Self::Unspecified => std::option::Option::Some("ACTION_UNSPECIFIED"),
12047                Self::Allow => std::option::Option::Some("ALLOW"),
12048                Self::Deny => std::option::Option::Some("DENY"),
12049                Self::UnknownValue(u) => u.0.name(),
12050            }
12051        }
12052    }
12053
12054    impl std::default::Default for Action {
12055        fn default() -> Self {
12056            use std::convert::From;
12057            Self::from(0)
12058        }
12059    }
12060
12061    impl std::fmt::Display for Action {
12062        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12063            wkt::internal::display_enum(f, self.name(), self.value())
12064        }
12065    }
12066
12067    impl std::convert::From<i32> for Action {
12068        fn from(value: i32) -> Self {
12069            match value {
12070                0 => Self::Unspecified,
12071                1 => Self::Allow,
12072                2 => Self::Deny,
12073                _ => Self::UnknownValue(action::UnknownValue(
12074                    wkt::internal::UnknownEnumValue::Integer(value),
12075                )),
12076            }
12077        }
12078    }
12079
12080    impl std::convert::From<&str> for Action {
12081        fn from(value: &str) -> Self {
12082            use std::string::ToString;
12083            match value {
12084                "ACTION_UNSPECIFIED" => Self::Unspecified,
12085                "ALLOW" => Self::Allow,
12086                "DENY" => Self::Deny,
12087                _ => Self::UnknownValue(action::UnknownValue(
12088                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12089                )),
12090            }
12091        }
12092    }
12093
12094    impl serde::ser::Serialize for Action {
12095        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12096        where
12097            S: serde::Serializer,
12098        {
12099            match self {
12100                Self::Unspecified => serializer.serialize_i32(0),
12101                Self::Allow => serializer.serialize_i32(1),
12102                Self::Deny => serializer.serialize_i32(2),
12103                Self::UnknownValue(u) => u.0.serialize(serializer),
12104            }
12105        }
12106    }
12107
12108    impl<'de> serde::de::Deserialize<'de> for Action {
12109        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12110        where
12111            D: serde::Deserializer<'de>,
12112        {
12113            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
12114                ".google.cloud.vmwareengine.v1.ExternalAccessRule.Action",
12115            ))
12116        }
12117    }
12118
12119    /// Defines possible states of external access firewall rules.
12120    ///
12121    /// # Working with unknown values
12122    ///
12123    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12124    /// additional enum variants at any time. Adding new variants is not considered
12125    /// a breaking change. Applications should write their code in anticipation of:
12126    ///
12127    /// - New values appearing in future releases of the client library, **and**
12128    /// - New values received dynamically, without application changes.
12129    ///
12130    /// Please consult the [Working with enums] section in the user guide for some
12131    /// guidelines.
12132    ///
12133    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12134    #[derive(Clone, Debug, PartialEq)]
12135    #[non_exhaustive]
12136    pub enum State {
12137        /// The default value. This value is used if the state is omitted.
12138        Unspecified,
12139        /// The rule is ready.
12140        Active,
12141        /// The rule is being created.
12142        Creating,
12143        /// The rule is being updated.
12144        Updating,
12145        /// The rule is being deleted.
12146        Deleting,
12147        /// If set, the enum was initialized with an unknown value.
12148        ///
12149        /// Applications can examine the value using [State::value] or
12150        /// [State::name].
12151        UnknownValue(state::UnknownValue),
12152    }
12153
12154    #[doc(hidden)]
12155    pub mod state {
12156        #[allow(unused_imports)]
12157        use super::*;
12158        #[derive(Clone, Debug, PartialEq)]
12159        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12160    }
12161
12162    impl State {
12163        /// Gets the enum value.
12164        ///
12165        /// Returns `None` if the enum contains an unknown value deserialized from
12166        /// the string representation of enums.
12167        pub fn value(&self) -> std::option::Option<i32> {
12168            match self {
12169                Self::Unspecified => std::option::Option::Some(0),
12170                Self::Active => std::option::Option::Some(1),
12171                Self::Creating => std::option::Option::Some(2),
12172                Self::Updating => std::option::Option::Some(3),
12173                Self::Deleting => std::option::Option::Some(4),
12174                Self::UnknownValue(u) => u.0.value(),
12175            }
12176        }
12177
12178        /// Gets the enum value as a string.
12179        ///
12180        /// Returns `None` if the enum contains an unknown value deserialized from
12181        /// the integer representation of enums.
12182        pub fn name(&self) -> std::option::Option<&str> {
12183            match self {
12184                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
12185                Self::Active => std::option::Option::Some("ACTIVE"),
12186                Self::Creating => std::option::Option::Some("CREATING"),
12187                Self::Updating => std::option::Option::Some("UPDATING"),
12188                Self::Deleting => std::option::Option::Some("DELETING"),
12189                Self::UnknownValue(u) => u.0.name(),
12190            }
12191        }
12192    }
12193
12194    impl std::default::Default for State {
12195        fn default() -> Self {
12196            use std::convert::From;
12197            Self::from(0)
12198        }
12199    }
12200
12201    impl std::fmt::Display for State {
12202        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12203            wkt::internal::display_enum(f, self.name(), self.value())
12204        }
12205    }
12206
12207    impl std::convert::From<i32> for State {
12208        fn from(value: i32) -> Self {
12209            match value {
12210                0 => Self::Unspecified,
12211                1 => Self::Active,
12212                2 => Self::Creating,
12213                3 => Self::Updating,
12214                4 => Self::Deleting,
12215                _ => Self::UnknownValue(state::UnknownValue(
12216                    wkt::internal::UnknownEnumValue::Integer(value),
12217                )),
12218            }
12219        }
12220    }
12221
12222    impl std::convert::From<&str> for State {
12223        fn from(value: &str) -> Self {
12224            use std::string::ToString;
12225            match value {
12226                "STATE_UNSPECIFIED" => Self::Unspecified,
12227                "ACTIVE" => Self::Active,
12228                "CREATING" => Self::Creating,
12229                "UPDATING" => Self::Updating,
12230                "DELETING" => Self::Deleting,
12231                _ => Self::UnknownValue(state::UnknownValue(
12232                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12233                )),
12234            }
12235        }
12236    }
12237
12238    impl serde::ser::Serialize for State {
12239        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12240        where
12241            S: serde::Serializer,
12242        {
12243            match self {
12244                Self::Unspecified => serializer.serialize_i32(0),
12245                Self::Active => serializer.serialize_i32(1),
12246                Self::Creating => serializer.serialize_i32(2),
12247                Self::Updating => serializer.serialize_i32(3),
12248                Self::Deleting => serializer.serialize_i32(4),
12249                Self::UnknownValue(u) => u.0.serialize(serializer),
12250            }
12251        }
12252    }
12253
12254    impl<'de> serde::de::Deserialize<'de> for State {
12255        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12256        where
12257            D: serde::Deserializer<'de>,
12258        {
12259            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
12260                ".google.cloud.vmwareengine.v1.ExternalAccessRule.State",
12261            ))
12262        }
12263    }
12264}
12265
12266/// Logging server to receive vCenter or ESXi logs.
12267#[derive(Clone, Default, PartialEq)]
12268#[non_exhaustive]
12269pub struct LoggingServer {
12270    /// Output only. The resource name of this logging server.
12271    /// Resource names are schemeless URIs that follow the conventions in
12272    /// <https://cloud.google.com/apis/design/resource_names>.
12273    /// For example:
12274    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
12275    pub name: std::string::String,
12276
12277    /// Output only. Creation time of this resource.
12278    pub create_time: std::option::Option<wkt::Timestamp>,
12279
12280    /// Output only. Last update time of this resource.
12281    pub update_time: std::option::Option<wkt::Timestamp>,
12282
12283    /// Required. Fully-qualified domain name (FQDN) or IP Address of the logging
12284    /// server.
12285    pub hostname: std::string::String,
12286
12287    /// Required. Port number at which the logging server receives logs.
12288    pub port: i32,
12289
12290    /// Required. Protocol used by vCenter to send logs to a logging server.
12291    pub protocol: crate::model::logging_server::Protocol,
12292
12293    /// Required. The type of component that produces logs that will be forwarded
12294    /// to this logging server.
12295    pub source_type: crate::model::logging_server::SourceType,
12296
12297    /// Output only. System-generated unique identifier for the resource.
12298    pub uid: std::string::String,
12299
12300    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12301}
12302
12303impl LoggingServer {
12304    /// Creates a new default instance.
12305    pub fn new() -> Self {
12306        std::default::Default::default()
12307    }
12308
12309    /// Sets the value of [name][crate::model::LoggingServer::name].
12310    ///
12311    /// # Example
12312    /// ```ignore,no_run
12313    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12314    /// # let project_id = "project_id";
12315    /// # let location_id = "location_id";
12316    /// # let private_cloud_id = "private_cloud_id";
12317    /// # let logging_server_id = "logging_server_id";
12318    /// let x = LoggingServer::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/loggingServers/{logging_server_id}"));
12319    /// ```
12320    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12321        self.name = v.into();
12322        self
12323    }
12324
12325    /// Sets the value of [create_time][crate::model::LoggingServer::create_time].
12326    ///
12327    /// # Example
12328    /// ```ignore,no_run
12329    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12330    /// use wkt::Timestamp;
12331    /// let x = LoggingServer::new().set_create_time(Timestamp::default()/* use setters */);
12332    /// ```
12333    pub fn set_create_time<T>(mut self, v: T) -> Self
12334    where
12335        T: std::convert::Into<wkt::Timestamp>,
12336    {
12337        self.create_time = std::option::Option::Some(v.into());
12338        self
12339    }
12340
12341    /// Sets or clears the value of [create_time][crate::model::LoggingServer::create_time].
12342    ///
12343    /// # Example
12344    /// ```ignore,no_run
12345    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12346    /// use wkt::Timestamp;
12347    /// let x = LoggingServer::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
12348    /// let x = LoggingServer::new().set_or_clear_create_time(None::<Timestamp>);
12349    /// ```
12350    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
12351    where
12352        T: std::convert::Into<wkt::Timestamp>,
12353    {
12354        self.create_time = v.map(|x| x.into());
12355        self
12356    }
12357
12358    /// Sets the value of [update_time][crate::model::LoggingServer::update_time].
12359    ///
12360    /// # Example
12361    /// ```ignore,no_run
12362    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12363    /// use wkt::Timestamp;
12364    /// let x = LoggingServer::new().set_update_time(Timestamp::default()/* use setters */);
12365    /// ```
12366    pub fn set_update_time<T>(mut self, v: T) -> Self
12367    where
12368        T: std::convert::Into<wkt::Timestamp>,
12369    {
12370        self.update_time = std::option::Option::Some(v.into());
12371        self
12372    }
12373
12374    /// Sets or clears the value of [update_time][crate::model::LoggingServer::update_time].
12375    ///
12376    /// # Example
12377    /// ```ignore,no_run
12378    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12379    /// use wkt::Timestamp;
12380    /// let x = LoggingServer::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
12381    /// let x = LoggingServer::new().set_or_clear_update_time(None::<Timestamp>);
12382    /// ```
12383    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
12384    where
12385        T: std::convert::Into<wkt::Timestamp>,
12386    {
12387        self.update_time = v.map(|x| x.into());
12388        self
12389    }
12390
12391    /// Sets the value of [hostname][crate::model::LoggingServer::hostname].
12392    ///
12393    /// # Example
12394    /// ```ignore,no_run
12395    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12396    /// let x = LoggingServer::new().set_hostname("example");
12397    /// ```
12398    pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12399        self.hostname = v.into();
12400        self
12401    }
12402
12403    /// Sets the value of [port][crate::model::LoggingServer::port].
12404    ///
12405    /// # Example
12406    /// ```ignore,no_run
12407    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12408    /// let x = LoggingServer::new().set_port(42);
12409    /// ```
12410    pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12411        self.port = v.into();
12412        self
12413    }
12414
12415    /// Sets the value of [protocol][crate::model::LoggingServer::protocol].
12416    ///
12417    /// # Example
12418    /// ```ignore,no_run
12419    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12420    /// use google_cloud_vmwareengine_v1::model::logging_server::Protocol;
12421    /// let x0 = LoggingServer::new().set_protocol(Protocol::Udp);
12422    /// let x1 = LoggingServer::new().set_protocol(Protocol::Tcp);
12423    /// let x2 = LoggingServer::new().set_protocol(Protocol::Tls);
12424    /// ```
12425    pub fn set_protocol<T: std::convert::Into<crate::model::logging_server::Protocol>>(
12426        mut self,
12427        v: T,
12428    ) -> Self {
12429        self.protocol = v.into();
12430        self
12431    }
12432
12433    /// Sets the value of [source_type][crate::model::LoggingServer::source_type].
12434    ///
12435    /// # Example
12436    /// ```ignore,no_run
12437    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12438    /// use google_cloud_vmwareengine_v1::model::logging_server::SourceType;
12439    /// let x0 = LoggingServer::new().set_source_type(SourceType::Esxi);
12440    /// let x1 = LoggingServer::new().set_source_type(SourceType::Vcsa);
12441    /// ```
12442    pub fn set_source_type<T: std::convert::Into<crate::model::logging_server::SourceType>>(
12443        mut self,
12444        v: T,
12445    ) -> Self {
12446        self.source_type = v.into();
12447        self
12448    }
12449
12450    /// Sets the value of [uid][crate::model::LoggingServer::uid].
12451    ///
12452    /// # Example
12453    /// ```ignore,no_run
12454    /// # use google_cloud_vmwareengine_v1::model::LoggingServer;
12455    /// let x = LoggingServer::new().set_uid("example");
12456    /// ```
12457    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12458        self.uid = v.into();
12459        self
12460    }
12461}
12462
12463impl wkt::message::Message for LoggingServer {
12464    fn typename() -> &'static str {
12465        "type.googleapis.com/google.cloud.vmwareengine.v1.LoggingServer"
12466    }
12467}
12468
12469/// Defines additional types related to [LoggingServer].
12470pub mod logging_server {
12471    #[allow(unused_imports)]
12472    use super::*;
12473
12474    /// Defines possible protocols used to send logs to
12475    /// a logging server.
12476    ///
12477    /// # Working with unknown values
12478    ///
12479    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12480    /// additional enum variants at any time. Adding new variants is not considered
12481    /// a breaking change. Applications should write their code in anticipation of:
12482    ///
12483    /// - New values appearing in future releases of the client library, **and**
12484    /// - New values received dynamically, without application changes.
12485    ///
12486    /// Please consult the [Working with enums] section in the user guide for some
12487    /// guidelines.
12488    ///
12489    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12490    #[derive(Clone, Debug, PartialEq)]
12491    #[non_exhaustive]
12492    pub enum Protocol {
12493        /// Unspecified communications protocol. This is the default value.
12494        Unspecified,
12495        /// UDP
12496        Udp,
12497        /// TCP
12498        Tcp,
12499        /// TLS
12500        Tls,
12501        /// SSL
12502        Ssl,
12503        /// RELP
12504        Relp,
12505        /// If set, the enum was initialized with an unknown value.
12506        ///
12507        /// Applications can examine the value using [Protocol::value] or
12508        /// [Protocol::name].
12509        UnknownValue(protocol::UnknownValue),
12510    }
12511
12512    #[doc(hidden)]
12513    pub mod protocol {
12514        #[allow(unused_imports)]
12515        use super::*;
12516        #[derive(Clone, Debug, PartialEq)]
12517        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12518    }
12519
12520    impl Protocol {
12521        /// Gets the enum value.
12522        ///
12523        /// Returns `None` if the enum contains an unknown value deserialized from
12524        /// the string representation of enums.
12525        pub fn value(&self) -> std::option::Option<i32> {
12526            match self {
12527                Self::Unspecified => std::option::Option::Some(0),
12528                Self::Udp => std::option::Option::Some(1),
12529                Self::Tcp => std::option::Option::Some(2),
12530                Self::Tls => std::option::Option::Some(3),
12531                Self::Ssl => std::option::Option::Some(4),
12532                Self::Relp => std::option::Option::Some(5),
12533                Self::UnknownValue(u) => u.0.value(),
12534            }
12535        }
12536
12537        /// Gets the enum value as a string.
12538        ///
12539        /// Returns `None` if the enum contains an unknown value deserialized from
12540        /// the integer representation of enums.
12541        pub fn name(&self) -> std::option::Option<&str> {
12542            match self {
12543                Self::Unspecified => std::option::Option::Some("PROTOCOL_UNSPECIFIED"),
12544                Self::Udp => std::option::Option::Some("UDP"),
12545                Self::Tcp => std::option::Option::Some("TCP"),
12546                Self::Tls => std::option::Option::Some("TLS"),
12547                Self::Ssl => std::option::Option::Some("SSL"),
12548                Self::Relp => std::option::Option::Some("RELP"),
12549                Self::UnknownValue(u) => u.0.name(),
12550            }
12551        }
12552    }
12553
12554    impl std::default::Default for Protocol {
12555        fn default() -> Self {
12556            use std::convert::From;
12557            Self::from(0)
12558        }
12559    }
12560
12561    impl std::fmt::Display for Protocol {
12562        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12563            wkt::internal::display_enum(f, self.name(), self.value())
12564        }
12565    }
12566
12567    impl std::convert::From<i32> for Protocol {
12568        fn from(value: i32) -> Self {
12569            match value {
12570                0 => Self::Unspecified,
12571                1 => Self::Udp,
12572                2 => Self::Tcp,
12573                3 => Self::Tls,
12574                4 => Self::Ssl,
12575                5 => Self::Relp,
12576                _ => Self::UnknownValue(protocol::UnknownValue(
12577                    wkt::internal::UnknownEnumValue::Integer(value),
12578                )),
12579            }
12580        }
12581    }
12582
12583    impl std::convert::From<&str> for Protocol {
12584        fn from(value: &str) -> Self {
12585            use std::string::ToString;
12586            match value {
12587                "PROTOCOL_UNSPECIFIED" => Self::Unspecified,
12588                "UDP" => Self::Udp,
12589                "TCP" => Self::Tcp,
12590                "TLS" => Self::Tls,
12591                "SSL" => Self::Ssl,
12592                "RELP" => Self::Relp,
12593                _ => Self::UnknownValue(protocol::UnknownValue(
12594                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12595                )),
12596            }
12597        }
12598    }
12599
12600    impl serde::ser::Serialize for Protocol {
12601        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12602        where
12603            S: serde::Serializer,
12604        {
12605            match self {
12606                Self::Unspecified => serializer.serialize_i32(0),
12607                Self::Udp => serializer.serialize_i32(1),
12608                Self::Tcp => serializer.serialize_i32(2),
12609                Self::Tls => serializer.serialize_i32(3),
12610                Self::Ssl => serializer.serialize_i32(4),
12611                Self::Relp => serializer.serialize_i32(5),
12612                Self::UnknownValue(u) => u.0.serialize(serializer),
12613            }
12614        }
12615    }
12616
12617    impl<'de> serde::de::Deserialize<'de> for Protocol {
12618        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12619        where
12620            D: serde::Deserializer<'de>,
12621        {
12622            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Protocol>::new(
12623                ".google.cloud.vmwareengine.v1.LoggingServer.Protocol",
12624            ))
12625        }
12626    }
12627
12628    /// Defines possible types of component that produces logs.
12629    ///
12630    /// # Working with unknown values
12631    ///
12632    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12633    /// additional enum variants at any time. Adding new variants is not considered
12634    /// a breaking change. Applications should write their code in anticipation of:
12635    ///
12636    /// - New values appearing in future releases of the client library, **and**
12637    /// - New values received dynamically, without application changes.
12638    ///
12639    /// Please consult the [Working with enums] section in the user guide for some
12640    /// guidelines.
12641    ///
12642    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12643    #[derive(Clone, Debug, PartialEq)]
12644    #[non_exhaustive]
12645    pub enum SourceType {
12646        /// The default value. This value should never be used.
12647        Unspecified,
12648        /// Logs produced by ESXI hosts
12649        Esxi,
12650        /// Logs produced by vCenter server
12651        Vcsa,
12652        /// If set, the enum was initialized with an unknown value.
12653        ///
12654        /// Applications can examine the value using [SourceType::value] or
12655        /// [SourceType::name].
12656        UnknownValue(source_type::UnknownValue),
12657    }
12658
12659    #[doc(hidden)]
12660    pub mod source_type {
12661        #[allow(unused_imports)]
12662        use super::*;
12663        #[derive(Clone, Debug, PartialEq)]
12664        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12665    }
12666
12667    impl SourceType {
12668        /// Gets the enum value.
12669        ///
12670        /// Returns `None` if the enum contains an unknown value deserialized from
12671        /// the string representation of enums.
12672        pub fn value(&self) -> std::option::Option<i32> {
12673            match self {
12674                Self::Unspecified => std::option::Option::Some(0),
12675                Self::Esxi => std::option::Option::Some(1),
12676                Self::Vcsa => std::option::Option::Some(2),
12677                Self::UnknownValue(u) => u.0.value(),
12678            }
12679        }
12680
12681        /// Gets the enum value as a string.
12682        ///
12683        /// Returns `None` if the enum contains an unknown value deserialized from
12684        /// the integer representation of enums.
12685        pub fn name(&self) -> std::option::Option<&str> {
12686            match self {
12687                Self::Unspecified => std::option::Option::Some("SOURCE_TYPE_UNSPECIFIED"),
12688                Self::Esxi => std::option::Option::Some("ESXI"),
12689                Self::Vcsa => std::option::Option::Some("VCSA"),
12690                Self::UnknownValue(u) => u.0.name(),
12691            }
12692        }
12693    }
12694
12695    impl std::default::Default for SourceType {
12696        fn default() -> Self {
12697            use std::convert::From;
12698            Self::from(0)
12699        }
12700    }
12701
12702    impl std::fmt::Display for SourceType {
12703        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12704            wkt::internal::display_enum(f, self.name(), self.value())
12705        }
12706    }
12707
12708    impl std::convert::From<i32> for SourceType {
12709        fn from(value: i32) -> Self {
12710            match value {
12711                0 => Self::Unspecified,
12712                1 => Self::Esxi,
12713                2 => Self::Vcsa,
12714                _ => Self::UnknownValue(source_type::UnknownValue(
12715                    wkt::internal::UnknownEnumValue::Integer(value),
12716                )),
12717            }
12718        }
12719    }
12720
12721    impl std::convert::From<&str> for SourceType {
12722        fn from(value: &str) -> Self {
12723            use std::string::ToString;
12724            match value {
12725                "SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
12726                "ESXI" => Self::Esxi,
12727                "VCSA" => Self::Vcsa,
12728                _ => Self::UnknownValue(source_type::UnknownValue(
12729                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12730                )),
12731            }
12732        }
12733    }
12734
12735    impl serde::ser::Serialize for SourceType {
12736        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12737        where
12738            S: serde::Serializer,
12739        {
12740            match self {
12741                Self::Unspecified => serializer.serialize_i32(0),
12742                Self::Esxi => serializer.serialize_i32(1),
12743                Self::Vcsa => serializer.serialize_i32(2),
12744                Self::UnknownValue(u) => u.0.serialize(serializer),
12745            }
12746        }
12747    }
12748
12749    impl<'de> serde::de::Deserialize<'de> for SourceType {
12750        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12751        where
12752            D: serde::Deserializer<'de>,
12753        {
12754            deserializer.deserialize_any(wkt::internal::EnumVisitor::<SourceType>::new(
12755                ".google.cloud.vmwareengine.v1.LoggingServer.SourceType",
12756            ))
12757        }
12758    }
12759}
12760
12761/// Describes node type.
12762#[derive(Clone, Default, PartialEq)]
12763#[non_exhaustive]
12764pub struct NodeType {
12765    /// Output only. The resource name of this node type.
12766    /// Resource names are schemeless URIs that follow the conventions in
12767    /// <https://cloud.google.com/apis/design/resource_names>.
12768    /// For example:
12769    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
12770    pub name: std::string::String,
12771
12772    /// Output only. The canonical identifier of the node type
12773    /// (corresponds to the `NodeType`). For example: standard-72.
12774    pub node_type_id: std::string::String,
12775
12776    /// Output only. The friendly name for this node type.
12777    /// For example: ve1-standard-72
12778    pub display_name: std::string::String,
12779
12780    /// Output only. The total number of virtual CPUs in a single node.
12781    pub virtual_cpu_count: i32,
12782
12783    /// Output only. The total number of CPU cores in a single node.
12784    pub total_core_count: i32,
12785
12786    /// Output only. The amount of physical memory available, defined in GB.
12787    pub memory_gb: i32,
12788
12789    /// Output only. The amount of storage available, defined in GB.
12790    pub disk_size_gb: i32,
12791
12792    /// Output only. List of possible values of custom core count.
12793    pub available_custom_core_counts: std::vec::Vec<i32>,
12794
12795    /// Output only. The type of the resource.
12796    pub kind: crate::model::node_type::Kind,
12797
12798    /// Output only. Families of the node type.
12799    /// For node types to be in the same cluster
12800    /// they must share at least one element in the `families`.
12801    pub families: std::vec::Vec<std::string::String>,
12802
12803    /// Output only. Capabilities of this node type.
12804    pub capabilities: std::vec::Vec<crate::model::node_type::Capability>,
12805
12806    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12807}
12808
12809impl NodeType {
12810    /// Creates a new default instance.
12811    pub fn new() -> Self {
12812        std::default::Default::default()
12813    }
12814
12815    /// Sets the value of [name][crate::model::NodeType::name].
12816    ///
12817    /// # Example
12818    /// ```ignore,no_run
12819    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12820    /// # let project_id = "project_id";
12821    /// # let location_id = "location_id";
12822    /// # let node_type_id = "node_type_id";
12823    /// let x = NodeType::new().set_name(format!("projects/{project_id}/locations/{location_id}/nodeTypes/{node_type_id}"));
12824    /// ```
12825    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12826        self.name = v.into();
12827        self
12828    }
12829
12830    /// Sets the value of [node_type_id][crate::model::NodeType::node_type_id].
12831    ///
12832    /// # Example
12833    /// ```ignore,no_run
12834    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12835    /// let x = NodeType::new().set_node_type_id("example");
12836    /// ```
12837    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12838        self.node_type_id = v.into();
12839        self
12840    }
12841
12842    /// Sets the value of [display_name][crate::model::NodeType::display_name].
12843    ///
12844    /// # Example
12845    /// ```ignore,no_run
12846    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12847    /// let x = NodeType::new().set_display_name("example");
12848    /// ```
12849    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12850        self.display_name = v.into();
12851        self
12852    }
12853
12854    /// Sets the value of [virtual_cpu_count][crate::model::NodeType::virtual_cpu_count].
12855    ///
12856    /// # Example
12857    /// ```ignore,no_run
12858    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12859    /// let x = NodeType::new().set_virtual_cpu_count(42);
12860    /// ```
12861    pub fn set_virtual_cpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12862        self.virtual_cpu_count = v.into();
12863        self
12864    }
12865
12866    /// Sets the value of [total_core_count][crate::model::NodeType::total_core_count].
12867    ///
12868    /// # Example
12869    /// ```ignore,no_run
12870    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12871    /// let x = NodeType::new().set_total_core_count(42);
12872    /// ```
12873    pub fn set_total_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12874        self.total_core_count = v.into();
12875        self
12876    }
12877
12878    /// Sets the value of [memory_gb][crate::model::NodeType::memory_gb].
12879    ///
12880    /// # Example
12881    /// ```ignore,no_run
12882    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12883    /// let x = NodeType::new().set_memory_gb(42);
12884    /// ```
12885    pub fn set_memory_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12886        self.memory_gb = v.into();
12887        self
12888    }
12889
12890    /// Sets the value of [disk_size_gb][crate::model::NodeType::disk_size_gb].
12891    ///
12892    /// # Example
12893    /// ```ignore,no_run
12894    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12895    /// let x = NodeType::new().set_disk_size_gb(42);
12896    /// ```
12897    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
12898        self.disk_size_gb = v.into();
12899        self
12900    }
12901
12902    /// Sets the value of [available_custom_core_counts][crate::model::NodeType::available_custom_core_counts].
12903    ///
12904    /// # Example
12905    /// ```ignore,no_run
12906    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12907    /// let x = NodeType::new().set_available_custom_core_counts([1, 2, 3]);
12908    /// ```
12909    pub fn set_available_custom_core_counts<T, V>(mut self, v: T) -> Self
12910    where
12911        T: std::iter::IntoIterator<Item = V>,
12912        V: std::convert::Into<i32>,
12913    {
12914        use std::iter::Iterator;
12915        self.available_custom_core_counts = v.into_iter().map(|i| i.into()).collect();
12916        self
12917    }
12918
12919    /// Sets the value of [kind][crate::model::NodeType::kind].
12920    ///
12921    /// # Example
12922    /// ```ignore,no_run
12923    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12924    /// use google_cloud_vmwareengine_v1::model::node_type::Kind;
12925    /// let x0 = NodeType::new().set_kind(Kind::Standard);
12926    /// let x1 = NodeType::new().set_kind(Kind::StorageOnly);
12927    /// ```
12928    pub fn set_kind<T: std::convert::Into<crate::model::node_type::Kind>>(mut self, v: T) -> Self {
12929        self.kind = v.into();
12930        self
12931    }
12932
12933    /// Sets the value of [families][crate::model::NodeType::families].
12934    ///
12935    /// # Example
12936    /// ```ignore,no_run
12937    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12938    /// let x = NodeType::new().set_families(["a", "b", "c"]);
12939    /// ```
12940    pub fn set_families<T, V>(mut self, v: T) -> Self
12941    where
12942        T: std::iter::IntoIterator<Item = V>,
12943        V: std::convert::Into<std::string::String>,
12944    {
12945        use std::iter::Iterator;
12946        self.families = v.into_iter().map(|i| i.into()).collect();
12947        self
12948    }
12949
12950    /// Sets the value of [capabilities][crate::model::NodeType::capabilities].
12951    ///
12952    /// # Example
12953    /// ```ignore,no_run
12954    /// # use google_cloud_vmwareengine_v1::model::NodeType;
12955    /// use google_cloud_vmwareengine_v1::model::node_type::Capability;
12956    /// let x = NodeType::new().set_capabilities([
12957    ///     Capability::StretchedClusters,
12958    /// ]);
12959    /// ```
12960    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
12961    where
12962        T: std::iter::IntoIterator<Item = V>,
12963        V: std::convert::Into<crate::model::node_type::Capability>,
12964    {
12965        use std::iter::Iterator;
12966        self.capabilities = v.into_iter().map(|i| i.into()).collect();
12967        self
12968    }
12969}
12970
12971impl wkt::message::Message for NodeType {
12972    fn typename() -> &'static str {
12973        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeType"
12974    }
12975}
12976
12977/// Defines additional types related to [NodeType].
12978pub mod node_type {
12979    #[allow(unused_imports)]
12980    use super::*;
12981
12982    /// Enum Kind defines possible types of a NodeType.
12983    ///
12984    /// # Working with unknown values
12985    ///
12986    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12987    /// additional enum variants at any time. Adding new variants is not considered
12988    /// a breaking change. Applications should write their code in anticipation of:
12989    ///
12990    /// - New values appearing in future releases of the client library, **and**
12991    /// - New values received dynamically, without application changes.
12992    ///
12993    /// Please consult the [Working with enums] section in the user guide for some
12994    /// guidelines.
12995    ///
12996    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
12997    #[derive(Clone, Debug, PartialEq)]
12998    #[non_exhaustive]
12999    pub enum Kind {
13000        /// The default value. This value should never be used.
13001        Unspecified,
13002        /// Standard HCI node.
13003        Standard,
13004        /// Storage only Node.
13005        StorageOnly,
13006        /// If set, the enum was initialized with an unknown value.
13007        ///
13008        /// Applications can examine the value using [Kind::value] or
13009        /// [Kind::name].
13010        UnknownValue(kind::UnknownValue),
13011    }
13012
13013    #[doc(hidden)]
13014    pub mod kind {
13015        #[allow(unused_imports)]
13016        use super::*;
13017        #[derive(Clone, Debug, PartialEq)]
13018        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13019    }
13020
13021    impl Kind {
13022        /// Gets the enum value.
13023        ///
13024        /// Returns `None` if the enum contains an unknown value deserialized from
13025        /// the string representation of enums.
13026        pub fn value(&self) -> std::option::Option<i32> {
13027            match self {
13028                Self::Unspecified => std::option::Option::Some(0),
13029                Self::Standard => std::option::Option::Some(1),
13030                Self::StorageOnly => std::option::Option::Some(2),
13031                Self::UnknownValue(u) => u.0.value(),
13032            }
13033        }
13034
13035        /// Gets the enum value as a string.
13036        ///
13037        /// Returns `None` if the enum contains an unknown value deserialized from
13038        /// the integer representation of enums.
13039        pub fn name(&self) -> std::option::Option<&str> {
13040            match self {
13041                Self::Unspecified => std::option::Option::Some("KIND_UNSPECIFIED"),
13042                Self::Standard => std::option::Option::Some("STANDARD"),
13043                Self::StorageOnly => std::option::Option::Some("STORAGE_ONLY"),
13044                Self::UnknownValue(u) => u.0.name(),
13045            }
13046        }
13047    }
13048
13049    impl std::default::Default for Kind {
13050        fn default() -> Self {
13051            use std::convert::From;
13052            Self::from(0)
13053        }
13054    }
13055
13056    impl std::fmt::Display for Kind {
13057        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13058            wkt::internal::display_enum(f, self.name(), self.value())
13059        }
13060    }
13061
13062    impl std::convert::From<i32> for Kind {
13063        fn from(value: i32) -> Self {
13064            match value {
13065                0 => Self::Unspecified,
13066                1 => Self::Standard,
13067                2 => Self::StorageOnly,
13068                _ => Self::UnknownValue(kind::UnknownValue(
13069                    wkt::internal::UnknownEnumValue::Integer(value),
13070                )),
13071            }
13072        }
13073    }
13074
13075    impl std::convert::From<&str> for Kind {
13076        fn from(value: &str) -> Self {
13077            use std::string::ToString;
13078            match value {
13079                "KIND_UNSPECIFIED" => Self::Unspecified,
13080                "STANDARD" => Self::Standard,
13081                "STORAGE_ONLY" => Self::StorageOnly,
13082                _ => Self::UnknownValue(kind::UnknownValue(
13083                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13084                )),
13085            }
13086        }
13087    }
13088
13089    impl serde::ser::Serialize for Kind {
13090        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13091        where
13092            S: serde::Serializer,
13093        {
13094            match self {
13095                Self::Unspecified => serializer.serialize_i32(0),
13096                Self::Standard => serializer.serialize_i32(1),
13097                Self::StorageOnly => serializer.serialize_i32(2),
13098                Self::UnknownValue(u) => u.0.serialize(serializer),
13099            }
13100        }
13101    }
13102
13103    impl<'de> serde::de::Deserialize<'de> for Kind {
13104        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13105        where
13106            D: serde::Deserializer<'de>,
13107        {
13108            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Kind>::new(
13109                ".google.cloud.vmwareengine.v1.NodeType.Kind",
13110            ))
13111        }
13112    }
13113
13114    /// Capability of a node type.
13115    ///
13116    /// # Working with unknown values
13117    ///
13118    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13119    /// additional enum variants at any time. Adding new variants is not considered
13120    /// a breaking change. Applications should write their code in anticipation of:
13121    ///
13122    /// - New values appearing in future releases of the client library, **and**
13123    /// - New values received dynamically, without application changes.
13124    ///
13125    /// Please consult the [Working with enums] section in the user guide for some
13126    /// guidelines.
13127    ///
13128    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13129    #[derive(Clone, Debug, PartialEq)]
13130    #[non_exhaustive]
13131    pub enum Capability {
13132        /// The default value. This value is used if the capability is omitted or
13133        /// unknown.
13134        Unspecified,
13135        /// This node type supports stretch clusters.
13136        StretchedClusters,
13137        /// If set, the enum was initialized with an unknown value.
13138        ///
13139        /// Applications can examine the value using [Capability::value] or
13140        /// [Capability::name].
13141        UnknownValue(capability::UnknownValue),
13142    }
13143
13144    #[doc(hidden)]
13145    pub mod capability {
13146        #[allow(unused_imports)]
13147        use super::*;
13148        #[derive(Clone, Debug, PartialEq)]
13149        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13150    }
13151
13152    impl Capability {
13153        /// Gets the enum value.
13154        ///
13155        /// Returns `None` if the enum contains an unknown value deserialized from
13156        /// the string representation of enums.
13157        pub fn value(&self) -> std::option::Option<i32> {
13158            match self {
13159                Self::Unspecified => std::option::Option::Some(0),
13160                Self::StretchedClusters => std::option::Option::Some(1),
13161                Self::UnknownValue(u) => u.0.value(),
13162            }
13163        }
13164
13165        /// Gets the enum value as a string.
13166        ///
13167        /// Returns `None` if the enum contains an unknown value deserialized from
13168        /// the integer representation of enums.
13169        pub fn name(&self) -> std::option::Option<&str> {
13170            match self {
13171                Self::Unspecified => std::option::Option::Some("CAPABILITY_UNSPECIFIED"),
13172                Self::StretchedClusters => std::option::Option::Some("STRETCHED_CLUSTERS"),
13173                Self::UnknownValue(u) => u.0.name(),
13174            }
13175        }
13176    }
13177
13178    impl std::default::Default for Capability {
13179        fn default() -> Self {
13180            use std::convert::From;
13181            Self::from(0)
13182        }
13183    }
13184
13185    impl std::fmt::Display for Capability {
13186        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13187            wkt::internal::display_enum(f, self.name(), self.value())
13188        }
13189    }
13190
13191    impl std::convert::From<i32> for Capability {
13192        fn from(value: i32) -> Self {
13193            match value {
13194                0 => Self::Unspecified,
13195                1 => Self::StretchedClusters,
13196                _ => Self::UnknownValue(capability::UnknownValue(
13197                    wkt::internal::UnknownEnumValue::Integer(value),
13198                )),
13199            }
13200        }
13201    }
13202
13203    impl std::convert::From<&str> for Capability {
13204        fn from(value: &str) -> Self {
13205            use std::string::ToString;
13206            match value {
13207                "CAPABILITY_UNSPECIFIED" => Self::Unspecified,
13208                "STRETCHED_CLUSTERS" => Self::StretchedClusters,
13209                _ => Self::UnknownValue(capability::UnknownValue(
13210                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13211                )),
13212            }
13213        }
13214    }
13215
13216    impl serde::ser::Serialize for Capability {
13217        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13218        where
13219            S: serde::Serializer,
13220        {
13221            match self {
13222                Self::Unspecified => serializer.serialize_i32(0),
13223                Self::StretchedClusters => serializer.serialize_i32(1),
13224                Self::UnknownValue(u) => u.0.serialize(serializer),
13225            }
13226        }
13227    }
13228
13229    impl<'de> serde::de::Deserialize<'de> for Capability {
13230        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13231        where
13232            D: serde::Deserializer<'de>,
13233        {
13234            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Capability>::new(
13235                ".google.cloud.vmwareengine.v1.NodeType.Capability",
13236            ))
13237        }
13238    }
13239}
13240
13241/// Credentials for a private cloud.
13242#[derive(Clone, Default, PartialEq)]
13243#[non_exhaustive]
13244pub struct Credentials {
13245    /// Initial username.
13246    pub username: std::string::String,
13247
13248    /// Initial password.
13249    pub password: std::string::String,
13250
13251    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13252}
13253
13254impl Credentials {
13255    /// Creates a new default instance.
13256    pub fn new() -> Self {
13257        std::default::Default::default()
13258    }
13259
13260    /// Sets the value of [username][crate::model::Credentials::username].
13261    ///
13262    /// # Example
13263    /// ```ignore,no_run
13264    /// # use google_cloud_vmwareengine_v1::model::Credentials;
13265    /// let x = Credentials::new().set_username("example");
13266    /// ```
13267    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13268        self.username = v.into();
13269        self
13270    }
13271
13272    /// Sets the value of [password][crate::model::Credentials::password].
13273    ///
13274    /// # Example
13275    /// ```ignore,no_run
13276    /// # use google_cloud_vmwareengine_v1::model::Credentials;
13277    /// let x = Credentials::new().set_password("example");
13278    /// ```
13279    pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13280        self.password = v.into();
13281        self
13282    }
13283}
13284
13285impl wkt::message::Message for Credentials {
13286    fn typename() -> &'static str {
13287        "type.googleapis.com/google.cloud.vmwareengine.v1.Credentials"
13288    }
13289}
13290
13291/// HCX activation key. A default key is created during
13292/// private cloud provisioning, but this behavior is subject to change
13293/// and you should always verify active keys.
13294/// Use
13295/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
13296/// to retrieve existing keys and
13297/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
13298/// to create new ones.
13299///
13300/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
13301/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
13302#[derive(Clone, Default, PartialEq)]
13303#[non_exhaustive]
13304pub struct HcxActivationKey {
13305    /// Output only. The resource name of this HcxActivationKey.
13306    /// Resource names are schemeless URIs that follow the conventions in
13307    /// <https://cloud.google.com/apis/design/resource_names>.
13308    /// For example:
13309    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
13310    pub name: std::string::String,
13311
13312    /// Output only. Creation time of HCX activation key.
13313    pub create_time: std::option::Option<wkt::Timestamp>,
13314
13315    /// Output only. State of HCX activation key.
13316    pub state: crate::model::hcx_activation_key::State,
13317
13318    /// Output only. HCX activation key.
13319    pub activation_key: std::string::String,
13320
13321    /// Output only. System-generated unique identifier for the resource.
13322    pub uid: std::string::String,
13323
13324    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13325}
13326
13327impl HcxActivationKey {
13328    /// Creates a new default instance.
13329    pub fn new() -> Self {
13330        std::default::Default::default()
13331    }
13332
13333    /// Sets the value of [name][crate::model::HcxActivationKey::name].
13334    ///
13335    /// # Example
13336    /// ```ignore,no_run
13337    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13338    /// # let project_id = "project_id";
13339    /// # let location_id = "location_id";
13340    /// # let private_cloud_id = "private_cloud_id";
13341    /// # let hcx_activation_key_id = "hcx_activation_key_id";
13342    /// let x = HcxActivationKey::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/hcxActivationKeys/{hcx_activation_key_id}"));
13343    /// ```
13344    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13345        self.name = v.into();
13346        self
13347    }
13348
13349    /// Sets the value of [create_time][crate::model::HcxActivationKey::create_time].
13350    ///
13351    /// # Example
13352    /// ```ignore,no_run
13353    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13354    /// use wkt::Timestamp;
13355    /// let x = HcxActivationKey::new().set_create_time(Timestamp::default()/* use setters */);
13356    /// ```
13357    pub fn set_create_time<T>(mut self, v: T) -> Self
13358    where
13359        T: std::convert::Into<wkt::Timestamp>,
13360    {
13361        self.create_time = std::option::Option::Some(v.into());
13362        self
13363    }
13364
13365    /// Sets or clears the value of [create_time][crate::model::HcxActivationKey::create_time].
13366    ///
13367    /// # Example
13368    /// ```ignore,no_run
13369    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13370    /// use wkt::Timestamp;
13371    /// let x = HcxActivationKey::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
13372    /// let x = HcxActivationKey::new().set_or_clear_create_time(None::<Timestamp>);
13373    /// ```
13374    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
13375    where
13376        T: std::convert::Into<wkt::Timestamp>,
13377    {
13378        self.create_time = v.map(|x| x.into());
13379        self
13380    }
13381
13382    /// Sets the value of [state][crate::model::HcxActivationKey::state].
13383    ///
13384    /// # Example
13385    /// ```ignore,no_run
13386    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13387    /// use google_cloud_vmwareengine_v1::model::hcx_activation_key::State;
13388    /// let x0 = HcxActivationKey::new().set_state(State::Available);
13389    /// let x1 = HcxActivationKey::new().set_state(State::Consumed);
13390    /// let x2 = HcxActivationKey::new().set_state(State::Creating);
13391    /// ```
13392    pub fn set_state<T: std::convert::Into<crate::model::hcx_activation_key::State>>(
13393        mut self,
13394        v: T,
13395    ) -> Self {
13396        self.state = v.into();
13397        self
13398    }
13399
13400    /// Sets the value of [activation_key][crate::model::HcxActivationKey::activation_key].
13401    ///
13402    /// # Example
13403    /// ```ignore,no_run
13404    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13405    /// let x = HcxActivationKey::new().set_activation_key("example");
13406    /// ```
13407    pub fn set_activation_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13408        self.activation_key = v.into();
13409        self
13410    }
13411
13412    /// Sets the value of [uid][crate::model::HcxActivationKey::uid].
13413    ///
13414    /// # Example
13415    /// ```ignore,no_run
13416    /// # use google_cloud_vmwareengine_v1::model::HcxActivationKey;
13417    /// let x = HcxActivationKey::new().set_uid("example");
13418    /// ```
13419    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13420        self.uid = v.into();
13421        self
13422    }
13423}
13424
13425impl wkt::message::Message for HcxActivationKey {
13426    fn typename() -> &'static str {
13427        "type.googleapis.com/google.cloud.vmwareengine.v1.HcxActivationKey"
13428    }
13429}
13430
13431/// Defines additional types related to [HcxActivationKey].
13432pub mod hcx_activation_key {
13433    #[allow(unused_imports)]
13434    use super::*;
13435
13436    /// State of HCX activation key
13437    ///
13438    /// # Working with unknown values
13439    ///
13440    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13441    /// additional enum variants at any time. Adding new variants is not considered
13442    /// a breaking change. Applications should write their code in anticipation of:
13443    ///
13444    /// - New values appearing in future releases of the client library, **and**
13445    /// - New values received dynamically, without application changes.
13446    ///
13447    /// Please consult the [Working with enums] section in the user guide for some
13448    /// guidelines.
13449    ///
13450    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13451    #[derive(Clone, Debug, PartialEq)]
13452    #[non_exhaustive]
13453    pub enum State {
13454        /// Unspecified state.
13455        Unspecified,
13456        /// State of a newly generated activation key.
13457        Available,
13458        /// State of key when it has been used to activate HCX appliance.
13459        Consumed,
13460        /// State of key when it is being created.
13461        Creating,
13462        /// If set, the enum was initialized with an unknown value.
13463        ///
13464        /// Applications can examine the value using [State::value] or
13465        /// [State::name].
13466        UnknownValue(state::UnknownValue),
13467    }
13468
13469    #[doc(hidden)]
13470    pub mod state {
13471        #[allow(unused_imports)]
13472        use super::*;
13473        #[derive(Clone, Debug, PartialEq)]
13474        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13475    }
13476
13477    impl State {
13478        /// Gets the enum value.
13479        ///
13480        /// Returns `None` if the enum contains an unknown value deserialized from
13481        /// the string representation of enums.
13482        pub fn value(&self) -> std::option::Option<i32> {
13483            match self {
13484                Self::Unspecified => std::option::Option::Some(0),
13485                Self::Available => std::option::Option::Some(1),
13486                Self::Consumed => std::option::Option::Some(2),
13487                Self::Creating => std::option::Option::Some(3),
13488                Self::UnknownValue(u) => u.0.value(),
13489            }
13490        }
13491
13492        /// Gets the enum value as a string.
13493        ///
13494        /// Returns `None` if the enum contains an unknown value deserialized from
13495        /// the integer representation of enums.
13496        pub fn name(&self) -> std::option::Option<&str> {
13497            match self {
13498                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13499                Self::Available => std::option::Option::Some("AVAILABLE"),
13500                Self::Consumed => std::option::Option::Some("CONSUMED"),
13501                Self::Creating => std::option::Option::Some("CREATING"),
13502                Self::UnknownValue(u) => u.0.name(),
13503            }
13504        }
13505    }
13506
13507    impl std::default::Default for State {
13508        fn default() -> Self {
13509            use std::convert::From;
13510            Self::from(0)
13511        }
13512    }
13513
13514    impl std::fmt::Display for State {
13515        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13516            wkt::internal::display_enum(f, self.name(), self.value())
13517        }
13518    }
13519
13520    impl std::convert::From<i32> for State {
13521        fn from(value: i32) -> Self {
13522            match value {
13523                0 => Self::Unspecified,
13524                1 => Self::Available,
13525                2 => Self::Consumed,
13526                3 => Self::Creating,
13527                _ => Self::UnknownValue(state::UnknownValue(
13528                    wkt::internal::UnknownEnumValue::Integer(value),
13529                )),
13530            }
13531        }
13532    }
13533
13534    impl std::convert::From<&str> for State {
13535        fn from(value: &str) -> Self {
13536            use std::string::ToString;
13537            match value {
13538                "STATE_UNSPECIFIED" => Self::Unspecified,
13539                "AVAILABLE" => Self::Available,
13540                "CONSUMED" => Self::Consumed,
13541                "CREATING" => Self::Creating,
13542                _ => Self::UnknownValue(state::UnknownValue(
13543                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13544                )),
13545            }
13546        }
13547    }
13548
13549    impl serde::ser::Serialize for State {
13550        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13551        where
13552            S: serde::Serializer,
13553        {
13554            match self {
13555                Self::Unspecified => serializer.serialize_i32(0),
13556                Self::Available => serializer.serialize_i32(1),
13557                Self::Consumed => serializer.serialize_i32(2),
13558                Self::Creating => serializer.serialize_i32(3),
13559                Self::UnknownValue(u) => u.0.serialize(serializer),
13560            }
13561        }
13562    }
13563
13564    impl<'de> serde::de::Deserialize<'de> for State {
13565        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13566        where
13567            D: serde::Deserializer<'de>,
13568        {
13569            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13570                ".google.cloud.vmwareengine.v1.HcxActivationKey.State",
13571            ))
13572        }
13573    }
13574}
13575
13576/// Details about a HCX Cloud Manager appliance.
13577#[derive(Clone, Default, PartialEq)]
13578#[non_exhaustive]
13579pub struct Hcx {
13580    /// Internal IP address of the appliance.
13581    pub internal_ip: std::string::String,
13582
13583    /// Version of the appliance.
13584    pub version: std::string::String,
13585
13586    /// Output only. The state of the appliance.
13587    pub state: crate::model::hcx::State,
13588
13589    /// Fully qualified domain name of the appliance.
13590    pub fqdn: std::string::String,
13591
13592    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13593}
13594
13595impl Hcx {
13596    /// Creates a new default instance.
13597    pub fn new() -> Self {
13598        std::default::Default::default()
13599    }
13600
13601    /// Sets the value of [internal_ip][crate::model::Hcx::internal_ip].
13602    ///
13603    /// # Example
13604    /// ```ignore,no_run
13605    /// # use google_cloud_vmwareengine_v1::model::Hcx;
13606    /// let x = Hcx::new().set_internal_ip("example");
13607    /// ```
13608    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13609        self.internal_ip = v.into();
13610        self
13611    }
13612
13613    /// Sets the value of [version][crate::model::Hcx::version].
13614    ///
13615    /// # Example
13616    /// ```ignore,no_run
13617    /// # use google_cloud_vmwareengine_v1::model::Hcx;
13618    /// let x = Hcx::new().set_version("example");
13619    /// ```
13620    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13621        self.version = v.into();
13622        self
13623    }
13624
13625    /// Sets the value of [state][crate::model::Hcx::state].
13626    ///
13627    /// # Example
13628    /// ```ignore,no_run
13629    /// # use google_cloud_vmwareengine_v1::model::Hcx;
13630    /// use google_cloud_vmwareengine_v1::model::hcx::State;
13631    /// let x0 = Hcx::new().set_state(State::Active);
13632    /// let x1 = Hcx::new().set_state(State::Creating);
13633    /// let x2 = Hcx::new().set_state(State::Activating);
13634    /// ```
13635    pub fn set_state<T: std::convert::Into<crate::model::hcx::State>>(mut self, v: T) -> Self {
13636        self.state = v.into();
13637        self
13638    }
13639
13640    /// Sets the value of [fqdn][crate::model::Hcx::fqdn].
13641    ///
13642    /// # Example
13643    /// ```ignore,no_run
13644    /// # use google_cloud_vmwareengine_v1::model::Hcx;
13645    /// let x = Hcx::new().set_fqdn("example");
13646    /// ```
13647    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13648        self.fqdn = v.into();
13649        self
13650    }
13651}
13652
13653impl wkt::message::Message for Hcx {
13654    fn typename() -> &'static str {
13655        "type.googleapis.com/google.cloud.vmwareengine.v1.Hcx"
13656    }
13657}
13658
13659/// Defines additional types related to [Hcx].
13660pub mod hcx {
13661    #[allow(unused_imports)]
13662    use super::*;
13663
13664    /// State of the appliance
13665    ///
13666    /// # Working with unknown values
13667    ///
13668    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13669    /// additional enum variants at any time. Adding new variants is not considered
13670    /// a breaking change. Applications should write their code in anticipation of:
13671    ///
13672    /// - New values appearing in future releases of the client library, **and**
13673    /// - New values received dynamically, without application changes.
13674    ///
13675    /// Please consult the [Working with enums] section in the user guide for some
13676    /// guidelines.
13677    ///
13678    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13679    #[derive(Clone, Debug, PartialEq)]
13680    #[non_exhaustive]
13681    pub enum State {
13682        /// Unspecified appliance state. This is the default value.
13683        Unspecified,
13684        /// The appliance is operational and can be used.
13685        Active,
13686        /// The appliance is being deployed.
13687        Creating,
13688        /// The appliance is being activated.
13689        Activating,
13690        /// If set, the enum was initialized with an unknown value.
13691        ///
13692        /// Applications can examine the value using [State::value] or
13693        /// [State::name].
13694        UnknownValue(state::UnknownValue),
13695    }
13696
13697    #[doc(hidden)]
13698    pub mod state {
13699        #[allow(unused_imports)]
13700        use super::*;
13701        #[derive(Clone, Debug, PartialEq)]
13702        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13703    }
13704
13705    impl State {
13706        /// Gets the enum value.
13707        ///
13708        /// Returns `None` if the enum contains an unknown value deserialized from
13709        /// the string representation of enums.
13710        pub fn value(&self) -> std::option::Option<i32> {
13711            match self {
13712                Self::Unspecified => std::option::Option::Some(0),
13713                Self::Active => std::option::Option::Some(1),
13714                Self::Creating => std::option::Option::Some(2),
13715                Self::Activating => std::option::Option::Some(3),
13716                Self::UnknownValue(u) => u.0.value(),
13717            }
13718        }
13719
13720        /// Gets the enum value as a string.
13721        ///
13722        /// Returns `None` if the enum contains an unknown value deserialized from
13723        /// the integer representation of enums.
13724        pub fn name(&self) -> std::option::Option<&str> {
13725            match self {
13726                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13727                Self::Active => std::option::Option::Some("ACTIVE"),
13728                Self::Creating => std::option::Option::Some("CREATING"),
13729                Self::Activating => std::option::Option::Some("ACTIVATING"),
13730                Self::UnknownValue(u) => u.0.name(),
13731            }
13732        }
13733    }
13734
13735    impl std::default::Default for State {
13736        fn default() -> Self {
13737            use std::convert::From;
13738            Self::from(0)
13739        }
13740    }
13741
13742    impl std::fmt::Display for State {
13743        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13744            wkt::internal::display_enum(f, self.name(), self.value())
13745        }
13746    }
13747
13748    impl std::convert::From<i32> for State {
13749        fn from(value: i32) -> Self {
13750            match value {
13751                0 => Self::Unspecified,
13752                1 => Self::Active,
13753                2 => Self::Creating,
13754                3 => Self::Activating,
13755                _ => Self::UnknownValue(state::UnknownValue(
13756                    wkt::internal::UnknownEnumValue::Integer(value),
13757                )),
13758            }
13759        }
13760    }
13761
13762    impl std::convert::From<&str> for State {
13763        fn from(value: &str) -> Self {
13764            use std::string::ToString;
13765            match value {
13766                "STATE_UNSPECIFIED" => Self::Unspecified,
13767                "ACTIVE" => Self::Active,
13768                "CREATING" => Self::Creating,
13769                "ACTIVATING" => Self::Activating,
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::Activating => serializer.serialize_i32(3),
13787                Self::UnknownValue(u) => u.0.serialize(serializer),
13788            }
13789        }
13790    }
13791
13792    impl<'de> serde::de::Deserialize<'de> for State {
13793        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13794        where
13795            D: serde::Deserializer<'de>,
13796        {
13797            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13798                ".google.cloud.vmwareengine.v1.Hcx.State",
13799            ))
13800        }
13801    }
13802}
13803
13804/// Details about a NSX Manager appliance.
13805#[derive(Clone, Default, PartialEq)]
13806#[non_exhaustive]
13807pub struct Nsx {
13808    /// Internal IP address of the appliance.
13809    pub internal_ip: std::string::String,
13810
13811    /// Version of the appliance.
13812    pub version: std::string::String,
13813
13814    /// Output only. The state of the appliance.
13815    pub state: crate::model::nsx::State,
13816
13817    /// Fully qualified domain name of the appliance.
13818    pub fqdn: std::string::String,
13819
13820    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13821}
13822
13823impl Nsx {
13824    /// Creates a new default instance.
13825    pub fn new() -> Self {
13826        std::default::Default::default()
13827    }
13828
13829    /// Sets the value of [internal_ip][crate::model::Nsx::internal_ip].
13830    ///
13831    /// # Example
13832    /// ```ignore,no_run
13833    /// # use google_cloud_vmwareengine_v1::model::Nsx;
13834    /// let x = Nsx::new().set_internal_ip("example");
13835    /// ```
13836    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13837        self.internal_ip = v.into();
13838        self
13839    }
13840
13841    /// Sets the value of [version][crate::model::Nsx::version].
13842    ///
13843    /// # Example
13844    /// ```ignore,no_run
13845    /// # use google_cloud_vmwareengine_v1::model::Nsx;
13846    /// let x = Nsx::new().set_version("example");
13847    /// ```
13848    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13849        self.version = v.into();
13850        self
13851    }
13852
13853    /// Sets the value of [state][crate::model::Nsx::state].
13854    ///
13855    /// # Example
13856    /// ```ignore,no_run
13857    /// # use google_cloud_vmwareengine_v1::model::Nsx;
13858    /// use google_cloud_vmwareengine_v1::model::nsx::State;
13859    /// let x0 = Nsx::new().set_state(State::Active);
13860    /// let x1 = Nsx::new().set_state(State::Creating);
13861    /// ```
13862    pub fn set_state<T: std::convert::Into<crate::model::nsx::State>>(mut self, v: T) -> Self {
13863        self.state = v.into();
13864        self
13865    }
13866
13867    /// Sets the value of [fqdn][crate::model::Nsx::fqdn].
13868    ///
13869    /// # Example
13870    /// ```ignore,no_run
13871    /// # use google_cloud_vmwareengine_v1::model::Nsx;
13872    /// let x = Nsx::new().set_fqdn("example");
13873    /// ```
13874    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13875        self.fqdn = v.into();
13876        self
13877    }
13878}
13879
13880impl wkt::message::Message for Nsx {
13881    fn typename() -> &'static str {
13882        "type.googleapis.com/google.cloud.vmwareengine.v1.Nsx"
13883    }
13884}
13885
13886/// Defines additional types related to [Nsx].
13887pub mod nsx {
13888    #[allow(unused_imports)]
13889    use super::*;
13890
13891    /// State of the appliance
13892    ///
13893    /// # Working with unknown values
13894    ///
13895    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13896    /// additional enum variants at any time. Adding new variants is not considered
13897    /// a breaking change. Applications should write their code in anticipation of:
13898    ///
13899    /// - New values appearing in future releases of the client library, **and**
13900    /// - New values received dynamically, without application changes.
13901    ///
13902    /// Please consult the [Working with enums] section in the user guide for some
13903    /// guidelines.
13904    ///
13905    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
13906    #[derive(Clone, Debug, PartialEq)]
13907    #[non_exhaustive]
13908    pub enum State {
13909        /// Unspecified appliance state. This is the default value.
13910        Unspecified,
13911        /// The appliance is operational and can be used.
13912        Active,
13913        /// The appliance is being deployed.
13914        Creating,
13915        /// If set, the enum was initialized with an unknown value.
13916        ///
13917        /// Applications can examine the value using [State::value] or
13918        /// [State::name].
13919        UnknownValue(state::UnknownValue),
13920    }
13921
13922    #[doc(hidden)]
13923    pub mod state {
13924        #[allow(unused_imports)]
13925        use super::*;
13926        #[derive(Clone, Debug, PartialEq)]
13927        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13928    }
13929
13930    impl State {
13931        /// Gets the enum value.
13932        ///
13933        /// Returns `None` if the enum contains an unknown value deserialized from
13934        /// the string representation of enums.
13935        pub fn value(&self) -> std::option::Option<i32> {
13936            match self {
13937                Self::Unspecified => std::option::Option::Some(0),
13938                Self::Active => std::option::Option::Some(1),
13939                Self::Creating => std::option::Option::Some(2),
13940                Self::UnknownValue(u) => u.0.value(),
13941            }
13942        }
13943
13944        /// Gets the enum value as a string.
13945        ///
13946        /// Returns `None` if the enum contains an unknown value deserialized from
13947        /// the integer representation of enums.
13948        pub fn name(&self) -> std::option::Option<&str> {
13949            match self {
13950                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13951                Self::Active => std::option::Option::Some("ACTIVE"),
13952                Self::Creating => std::option::Option::Some("CREATING"),
13953                Self::UnknownValue(u) => u.0.name(),
13954            }
13955        }
13956    }
13957
13958    impl std::default::Default for State {
13959        fn default() -> Self {
13960            use std::convert::From;
13961            Self::from(0)
13962        }
13963    }
13964
13965    impl std::fmt::Display for State {
13966        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13967            wkt::internal::display_enum(f, self.name(), self.value())
13968        }
13969    }
13970
13971    impl std::convert::From<i32> for State {
13972        fn from(value: i32) -> Self {
13973            match value {
13974                0 => Self::Unspecified,
13975                1 => Self::Active,
13976                2 => Self::Creating,
13977                _ => Self::UnknownValue(state::UnknownValue(
13978                    wkt::internal::UnknownEnumValue::Integer(value),
13979                )),
13980            }
13981        }
13982    }
13983
13984    impl std::convert::From<&str> for State {
13985        fn from(value: &str) -> Self {
13986            use std::string::ToString;
13987            match value {
13988                "STATE_UNSPECIFIED" => Self::Unspecified,
13989                "ACTIVE" => Self::Active,
13990                "CREATING" => Self::Creating,
13991                _ => Self::UnknownValue(state::UnknownValue(
13992                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13993                )),
13994            }
13995        }
13996    }
13997
13998    impl serde::ser::Serialize for State {
13999        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14000        where
14001            S: serde::Serializer,
14002        {
14003            match self {
14004                Self::Unspecified => serializer.serialize_i32(0),
14005                Self::Active => serializer.serialize_i32(1),
14006                Self::Creating => serializer.serialize_i32(2),
14007                Self::UnknownValue(u) => u.0.serialize(serializer),
14008            }
14009        }
14010    }
14011
14012    impl<'de> serde::de::Deserialize<'de> for State {
14013        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14014        where
14015            D: serde::Deserializer<'de>,
14016        {
14017            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14018                ".google.cloud.vmwareengine.v1.Nsx.State",
14019            ))
14020        }
14021    }
14022}
14023
14024/// Details about a vCenter Server management appliance.
14025#[derive(Clone, Default, PartialEq)]
14026#[non_exhaustive]
14027pub struct Vcenter {
14028    /// Internal IP address of the appliance.
14029    pub internal_ip: std::string::String,
14030
14031    /// Version of the appliance.
14032    pub version: std::string::String,
14033
14034    /// Output only. The state of the appliance.
14035    pub state: crate::model::vcenter::State,
14036
14037    /// Fully qualified domain name of the appliance.
14038    pub fqdn: std::string::String,
14039
14040    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14041}
14042
14043impl Vcenter {
14044    /// Creates a new default instance.
14045    pub fn new() -> Self {
14046        std::default::Default::default()
14047    }
14048
14049    /// Sets the value of [internal_ip][crate::model::Vcenter::internal_ip].
14050    ///
14051    /// # Example
14052    /// ```ignore,no_run
14053    /// # use google_cloud_vmwareengine_v1::model::Vcenter;
14054    /// let x = Vcenter::new().set_internal_ip("example");
14055    /// ```
14056    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14057        self.internal_ip = v.into();
14058        self
14059    }
14060
14061    /// Sets the value of [version][crate::model::Vcenter::version].
14062    ///
14063    /// # Example
14064    /// ```ignore,no_run
14065    /// # use google_cloud_vmwareengine_v1::model::Vcenter;
14066    /// let x = Vcenter::new().set_version("example");
14067    /// ```
14068    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14069        self.version = v.into();
14070        self
14071    }
14072
14073    /// Sets the value of [state][crate::model::Vcenter::state].
14074    ///
14075    /// # Example
14076    /// ```ignore,no_run
14077    /// # use google_cloud_vmwareengine_v1::model::Vcenter;
14078    /// use google_cloud_vmwareengine_v1::model::vcenter::State;
14079    /// let x0 = Vcenter::new().set_state(State::Active);
14080    /// let x1 = Vcenter::new().set_state(State::Creating);
14081    /// ```
14082    pub fn set_state<T: std::convert::Into<crate::model::vcenter::State>>(mut self, v: T) -> Self {
14083        self.state = v.into();
14084        self
14085    }
14086
14087    /// Sets the value of [fqdn][crate::model::Vcenter::fqdn].
14088    ///
14089    /// # Example
14090    /// ```ignore,no_run
14091    /// # use google_cloud_vmwareengine_v1::model::Vcenter;
14092    /// let x = Vcenter::new().set_fqdn("example");
14093    /// ```
14094    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14095        self.fqdn = v.into();
14096        self
14097    }
14098}
14099
14100impl wkt::message::Message for Vcenter {
14101    fn typename() -> &'static str {
14102        "type.googleapis.com/google.cloud.vmwareengine.v1.Vcenter"
14103    }
14104}
14105
14106/// Defines additional types related to [Vcenter].
14107pub mod vcenter {
14108    #[allow(unused_imports)]
14109    use super::*;
14110
14111    /// State of the appliance
14112    ///
14113    /// # Working with unknown values
14114    ///
14115    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14116    /// additional enum variants at any time. Adding new variants is not considered
14117    /// a breaking change. Applications should write their code in anticipation of:
14118    ///
14119    /// - New values appearing in future releases of the client library, **and**
14120    /// - New values received dynamically, without application changes.
14121    ///
14122    /// Please consult the [Working with enums] section in the user guide for some
14123    /// guidelines.
14124    ///
14125    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
14126    #[derive(Clone, Debug, PartialEq)]
14127    #[non_exhaustive]
14128    pub enum State {
14129        /// Unspecified appliance state. This is the default value.
14130        Unspecified,
14131        /// The appliance is operational and can be used.
14132        Active,
14133        /// The appliance is being deployed.
14134        Creating,
14135        /// If set, the enum was initialized with an unknown value.
14136        ///
14137        /// Applications can examine the value using [State::value] or
14138        /// [State::name].
14139        UnknownValue(state::UnknownValue),
14140    }
14141
14142    #[doc(hidden)]
14143    pub mod state {
14144        #[allow(unused_imports)]
14145        use super::*;
14146        #[derive(Clone, Debug, PartialEq)]
14147        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14148    }
14149
14150    impl State {
14151        /// Gets the enum value.
14152        ///
14153        /// Returns `None` if the enum contains an unknown value deserialized from
14154        /// the string representation of enums.
14155        pub fn value(&self) -> std::option::Option<i32> {
14156            match self {
14157                Self::Unspecified => std::option::Option::Some(0),
14158                Self::Active => std::option::Option::Some(1),
14159                Self::Creating => std::option::Option::Some(2),
14160                Self::UnknownValue(u) => u.0.value(),
14161            }
14162        }
14163
14164        /// Gets the enum value as a string.
14165        ///
14166        /// Returns `None` if the enum contains an unknown value deserialized from
14167        /// the integer representation of enums.
14168        pub fn name(&self) -> std::option::Option<&str> {
14169            match self {
14170                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
14171                Self::Active => std::option::Option::Some("ACTIVE"),
14172                Self::Creating => std::option::Option::Some("CREATING"),
14173                Self::UnknownValue(u) => u.0.name(),
14174            }
14175        }
14176    }
14177
14178    impl std::default::Default for State {
14179        fn default() -> Self {
14180            use std::convert::From;
14181            Self::from(0)
14182        }
14183    }
14184
14185    impl std::fmt::Display for State {
14186        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14187            wkt::internal::display_enum(f, self.name(), self.value())
14188        }
14189    }
14190
14191    impl std::convert::From<i32> for State {
14192        fn from(value: i32) -> Self {
14193            match value {
14194                0 => Self::Unspecified,
14195                1 => Self::Active,
14196                2 => Self::Creating,
14197                _ => Self::UnknownValue(state::UnknownValue(
14198                    wkt::internal::UnknownEnumValue::Integer(value),
14199                )),
14200            }
14201        }
14202    }
14203
14204    impl std::convert::From<&str> for State {
14205        fn from(value: &str) -> Self {
14206            use std::string::ToString;
14207            match value {
14208                "STATE_UNSPECIFIED" => Self::Unspecified,
14209                "ACTIVE" => Self::Active,
14210                "CREATING" => Self::Creating,
14211                _ => Self::UnknownValue(state::UnknownValue(
14212                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14213                )),
14214            }
14215        }
14216    }
14217
14218    impl serde::ser::Serialize for State {
14219        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14220        where
14221            S: serde::Serializer,
14222        {
14223            match self {
14224                Self::Unspecified => serializer.serialize_i32(0),
14225                Self::Active => serializer.serialize_i32(1),
14226                Self::Creating => serializer.serialize_i32(2),
14227                Self::UnknownValue(u) => u.0.serialize(serializer),
14228            }
14229        }
14230    }
14231
14232    impl<'de> serde::de::Deserialize<'de> for State {
14233        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14234        where
14235            D: serde::Deserializer<'de>,
14236        {
14237            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14238                ".google.cloud.vmwareengine.v1.Vcenter.State",
14239            ))
14240        }
14241    }
14242}
14243
14244/// Autoscaling settings define the rules used by VMware Engine to
14245/// automatically scale-out and scale-in the clusters in a private cloud.
14246#[derive(Clone, Default, PartialEq)]
14247#[non_exhaustive]
14248pub struct AutoscalingSettings {
14249    /// Required. The map with autoscaling policies applied to the cluster.
14250    /// The key is the identifier of the policy.
14251    /// It must meet the following requirements:
14252    ///
14253    /// * Only contains 1-63 alphanumeric characters and hyphens
14254    /// * Begins with an alphabetical character
14255    /// * Ends with a non-hyphen character
14256    /// * Not formatted as a UUID
14257    /// * Complies with [RFC
14258    ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
14259    ///
14260    /// Currently there map must contain only one element
14261    /// that describes the autoscaling policy for compute nodes.
14262    pub autoscaling_policies: std::collections::HashMap<
14263        std::string::String,
14264        crate::model::autoscaling_settings::AutoscalingPolicy,
14265    >,
14266
14267    /// Optional. Minimum number of nodes of any type in a cluster.
14268    /// If not specified the default limits apply.
14269    pub min_cluster_node_count: i32,
14270
14271    /// Optional. Maximum number of nodes of any type in a cluster.
14272    /// If not specified the default limits apply.
14273    pub max_cluster_node_count: i32,
14274
14275    /// Optional. The minimum duration between consecutive autoscale operations.
14276    /// It starts once addition or removal of nodes is fully completed.
14277    /// Defaults to 30 minutes if not specified. Cool down period must be in whole
14278    /// minutes (for example, 30, 31, 50, 180 minutes).
14279    pub cool_down_period: std::option::Option<wkt::Duration>,
14280
14281    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14282}
14283
14284impl AutoscalingSettings {
14285    /// Creates a new default instance.
14286    pub fn new() -> Self {
14287        std::default::Default::default()
14288    }
14289
14290    /// Sets the value of [autoscaling_policies][crate::model::AutoscalingSettings::autoscaling_policies].
14291    ///
14292    /// # Example
14293    /// ```ignore,no_run
14294    /// # use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
14295    /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14296    /// let x = AutoscalingSettings::new().set_autoscaling_policies([
14297    ///     ("key0", AutoscalingPolicy::default()/* use setters */),
14298    ///     ("key1", AutoscalingPolicy::default()/* use (different) setters */),
14299    /// ]);
14300    /// ```
14301    pub fn set_autoscaling_policies<T, K, V>(mut self, v: T) -> Self
14302    where
14303        T: std::iter::IntoIterator<Item = (K, V)>,
14304        K: std::convert::Into<std::string::String>,
14305        V: std::convert::Into<crate::model::autoscaling_settings::AutoscalingPolicy>,
14306    {
14307        use std::iter::Iterator;
14308        self.autoscaling_policies = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
14309        self
14310    }
14311
14312    /// Sets the value of [min_cluster_node_count][crate::model::AutoscalingSettings::min_cluster_node_count].
14313    ///
14314    /// # Example
14315    /// ```ignore,no_run
14316    /// # use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
14317    /// let x = AutoscalingSettings::new().set_min_cluster_node_count(42);
14318    /// ```
14319    pub fn set_min_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14320        self.min_cluster_node_count = v.into();
14321        self
14322    }
14323
14324    /// Sets the value of [max_cluster_node_count][crate::model::AutoscalingSettings::max_cluster_node_count].
14325    ///
14326    /// # Example
14327    /// ```ignore,no_run
14328    /// # use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
14329    /// let x = AutoscalingSettings::new().set_max_cluster_node_count(42);
14330    /// ```
14331    pub fn set_max_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14332        self.max_cluster_node_count = v.into();
14333        self
14334    }
14335
14336    /// Sets the value of [cool_down_period][crate::model::AutoscalingSettings::cool_down_period].
14337    ///
14338    /// # Example
14339    /// ```ignore,no_run
14340    /// # use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
14341    /// use wkt::Duration;
14342    /// let x = AutoscalingSettings::new().set_cool_down_period(Duration::default()/* use setters */);
14343    /// ```
14344    pub fn set_cool_down_period<T>(mut self, v: T) -> Self
14345    where
14346        T: std::convert::Into<wkt::Duration>,
14347    {
14348        self.cool_down_period = std::option::Option::Some(v.into());
14349        self
14350    }
14351
14352    /// Sets or clears the value of [cool_down_period][crate::model::AutoscalingSettings::cool_down_period].
14353    ///
14354    /// # Example
14355    /// ```ignore,no_run
14356    /// # use google_cloud_vmwareengine_v1::model::AutoscalingSettings;
14357    /// use wkt::Duration;
14358    /// let x = AutoscalingSettings::new().set_or_clear_cool_down_period(Some(Duration::default()/* use setters */));
14359    /// let x = AutoscalingSettings::new().set_or_clear_cool_down_period(None::<Duration>);
14360    /// ```
14361    pub fn set_or_clear_cool_down_period<T>(mut self, v: std::option::Option<T>) -> Self
14362    where
14363        T: std::convert::Into<wkt::Duration>,
14364    {
14365        self.cool_down_period = v.map(|x| x.into());
14366        self
14367    }
14368}
14369
14370impl wkt::message::Message for AutoscalingSettings {
14371    fn typename() -> &'static str {
14372        "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings"
14373    }
14374}
14375
14376/// Defines additional types related to [AutoscalingSettings].
14377pub mod autoscaling_settings {
14378    #[allow(unused_imports)]
14379    use super::*;
14380
14381    /// Thresholds define the utilization of resources triggering
14382    /// scale-out and scale-in operations.
14383    #[derive(Clone, Default, PartialEq)]
14384    #[non_exhaustive]
14385    pub struct Thresholds {
14386        /// Required. The utilization triggering the scale-out operation in percent.
14387        pub scale_out: i32,
14388
14389        /// Required. The utilization triggering the scale-in operation in percent.
14390        pub scale_in: i32,
14391
14392        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14393    }
14394
14395    impl Thresholds {
14396        /// Creates a new default instance.
14397        pub fn new() -> Self {
14398            std::default::Default::default()
14399        }
14400
14401        /// Sets the value of [scale_out][crate::model::autoscaling_settings::Thresholds::scale_out].
14402        ///
14403        /// # Example
14404        /// ```ignore,no_run
14405        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14406        /// let x = Thresholds::new().set_scale_out(42);
14407        /// ```
14408        pub fn set_scale_out<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14409            self.scale_out = v.into();
14410            self
14411        }
14412
14413        /// Sets the value of [scale_in][crate::model::autoscaling_settings::Thresholds::scale_in].
14414        ///
14415        /// # Example
14416        /// ```ignore,no_run
14417        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14418        /// let x = Thresholds::new().set_scale_in(42);
14419        /// ```
14420        pub fn set_scale_in<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14421            self.scale_in = v.into();
14422            self
14423        }
14424    }
14425
14426    impl wkt::message::Message for Thresholds {
14427        fn typename() -> &'static str {
14428            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds"
14429        }
14430    }
14431
14432    /// Autoscaling policy describes the behavior of the autoscaling
14433    /// with respect to the resource utilization.
14434    /// The scale-out operation is initiated if the utilization
14435    /// exceeds ANY of the respective thresholds.
14436    /// The scale-in operation is initiated if the utilization
14437    /// is below ALL of the respective thresholds.
14438    #[derive(Clone, Default, PartialEq)]
14439    #[non_exhaustive]
14440    pub struct AutoscalingPolicy {
14441        /// Required. The canonical identifier of the node type to add or remove.
14442        /// Corresponds to the `NodeType`.
14443        pub node_type_id: std::string::String,
14444
14445        /// Required. Number of nodes to add to a cluster during a scale-out
14446        /// operation. Must be divisible by 2 for stretched clusters. During a
14447        /// scale-in operation only one node (or 2 for stretched clusters) are
14448        /// removed in a single iteration.
14449        pub scale_out_size: i32,
14450
14451        /// Optional. Utilization thresholds pertaining to CPU utilization.
14452        pub cpu_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
14453
14454        /// Optional. Utilization thresholds pertaining to amount of granted memory.
14455        pub granted_memory_thresholds:
14456            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
14457
14458        /// Optional. Utilization thresholds pertaining to amount of consumed memory.
14459        pub consumed_memory_thresholds:
14460            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
14461
14462        /// Optional. Utilization thresholds pertaining to amount of consumed
14463        /// storage.
14464        pub storage_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
14465
14466        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14467    }
14468
14469    impl AutoscalingPolicy {
14470        /// Creates a new default instance.
14471        pub fn new() -> Self {
14472            std::default::Default::default()
14473        }
14474
14475        /// Sets the value of [node_type_id][crate::model::autoscaling_settings::AutoscalingPolicy::node_type_id].
14476        ///
14477        /// # Example
14478        /// ```ignore,no_run
14479        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14480        /// let x = AutoscalingPolicy::new().set_node_type_id("example");
14481        /// ```
14482        pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(
14483            mut self,
14484            v: T,
14485        ) -> Self {
14486            self.node_type_id = v.into();
14487            self
14488        }
14489
14490        /// Sets the value of [scale_out_size][crate::model::autoscaling_settings::AutoscalingPolicy::scale_out_size].
14491        ///
14492        /// # Example
14493        /// ```ignore,no_run
14494        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14495        /// let x = AutoscalingPolicy::new().set_scale_out_size(42);
14496        /// ```
14497        pub fn set_scale_out_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
14498            self.scale_out_size = v.into();
14499            self
14500        }
14501
14502        /// Sets the value of [cpu_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::cpu_thresholds].
14503        ///
14504        /// # Example
14505        /// ```ignore,no_run
14506        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14507        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14508        /// let x = AutoscalingPolicy::new().set_cpu_thresholds(Thresholds::default()/* use setters */);
14509        /// ```
14510        pub fn set_cpu_thresholds<T>(mut self, v: T) -> Self
14511        where
14512            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14513        {
14514            self.cpu_thresholds = std::option::Option::Some(v.into());
14515            self
14516        }
14517
14518        /// Sets or clears the value of [cpu_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::cpu_thresholds].
14519        ///
14520        /// # Example
14521        /// ```ignore,no_run
14522        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14523        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14524        /// let x = AutoscalingPolicy::new().set_or_clear_cpu_thresholds(Some(Thresholds::default()/* use setters */));
14525        /// let x = AutoscalingPolicy::new().set_or_clear_cpu_thresholds(None::<Thresholds>);
14526        /// ```
14527        pub fn set_or_clear_cpu_thresholds<T>(mut self, v: std::option::Option<T>) -> Self
14528        where
14529            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14530        {
14531            self.cpu_thresholds = v.map(|x| x.into());
14532            self
14533        }
14534
14535        /// Sets the value of [granted_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::granted_memory_thresholds].
14536        ///
14537        /// # Example
14538        /// ```ignore,no_run
14539        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14540        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14541        /// let x = AutoscalingPolicy::new().set_granted_memory_thresholds(Thresholds::default()/* use setters */);
14542        /// ```
14543        pub fn set_granted_memory_thresholds<T>(mut self, v: T) -> Self
14544        where
14545            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14546        {
14547            self.granted_memory_thresholds = std::option::Option::Some(v.into());
14548            self
14549        }
14550
14551        /// Sets or clears the value of [granted_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::granted_memory_thresholds].
14552        ///
14553        /// # Example
14554        /// ```ignore,no_run
14555        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14556        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14557        /// let x = AutoscalingPolicy::new().set_or_clear_granted_memory_thresholds(Some(Thresholds::default()/* use setters */));
14558        /// let x = AutoscalingPolicy::new().set_or_clear_granted_memory_thresholds(None::<Thresholds>);
14559        /// ```
14560        pub fn set_or_clear_granted_memory_thresholds<T>(
14561            mut self,
14562            v: std::option::Option<T>,
14563        ) -> Self
14564        where
14565            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14566        {
14567            self.granted_memory_thresholds = v.map(|x| x.into());
14568            self
14569        }
14570
14571        /// Sets the value of [consumed_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::consumed_memory_thresholds].
14572        ///
14573        /// # Example
14574        /// ```ignore,no_run
14575        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14576        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14577        /// let x = AutoscalingPolicy::new().set_consumed_memory_thresholds(Thresholds::default()/* use setters */);
14578        /// ```
14579        pub fn set_consumed_memory_thresholds<T>(mut self, v: T) -> Self
14580        where
14581            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14582        {
14583            self.consumed_memory_thresholds = std::option::Option::Some(v.into());
14584            self
14585        }
14586
14587        /// Sets or clears the value of [consumed_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::consumed_memory_thresholds].
14588        ///
14589        /// # Example
14590        /// ```ignore,no_run
14591        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14592        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14593        /// let x = AutoscalingPolicy::new().set_or_clear_consumed_memory_thresholds(Some(Thresholds::default()/* use setters */));
14594        /// let x = AutoscalingPolicy::new().set_or_clear_consumed_memory_thresholds(None::<Thresholds>);
14595        /// ```
14596        pub fn set_or_clear_consumed_memory_thresholds<T>(
14597            mut self,
14598            v: std::option::Option<T>,
14599        ) -> Self
14600        where
14601            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14602        {
14603            self.consumed_memory_thresholds = v.map(|x| x.into());
14604            self
14605        }
14606
14607        /// Sets the value of [storage_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::storage_thresholds].
14608        ///
14609        /// # Example
14610        /// ```ignore,no_run
14611        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14612        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14613        /// let x = AutoscalingPolicy::new().set_storage_thresholds(Thresholds::default()/* use setters */);
14614        /// ```
14615        pub fn set_storage_thresholds<T>(mut self, v: T) -> Self
14616        where
14617            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14618        {
14619            self.storage_thresholds = std::option::Option::Some(v.into());
14620            self
14621        }
14622
14623        /// Sets or clears the value of [storage_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::storage_thresholds].
14624        ///
14625        /// # Example
14626        /// ```ignore,no_run
14627        /// # use google_cloud_vmwareengine_v1::model::autoscaling_settings::AutoscalingPolicy;
14628        /// use google_cloud_vmwareengine_v1::model::autoscaling_settings::Thresholds;
14629        /// let x = AutoscalingPolicy::new().set_or_clear_storage_thresholds(Some(Thresholds::default()/* use setters */));
14630        /// let x = AutoscalingPolicy::new().set_or_clear_storage_thresholds(None::<Thresholds>);
14631        /// ```
14632        pub fn set_or_clear_storage_thresholds<T>(mut self, v: std::option::Option<T>) -> Self
14633        where
14634            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
14635        {
14636            self.storage_thresholds = v.map(|x| x.into());
14637            self
14638        }
14639    }
14640
14641    impl wkt::message::Message for AutoscalingPolicy {
14642        fn typename() -> &'static str {
14643            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.AutoscalingPolicy"
14644        }
14645    }
14646}
14647
14648/// DNS forwarding config.
14649/// This config defines a list of domain to name server mappings,
14650/// and is attached to the private cloud for custom domain resolution.
14651#[derive(Clone, Default, PartialEq)]
14652#[non_exhaustive]
14653pub struct DnsForwarding {
14654    /// Output only. The resource name of this DNS profile.
14655    /// Resource names are schemeless URIs that follow the conventions in
14656    /// <https://cloud.google.com/apis/design/resource_names>.
14657    /// For example:
14658    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
14659    pub name: std::string::String,
14660
14661    /// Output only. Creation time of this resource.
14662    pub create_time: std::option::Option<wkt::Timestamp>,
14663
14664    /// Output only. Last update time of this resource.
14665    pub update_time: std::option::Option<wkt::Timestamp>,
14666
14667    /// Required. List of domain mappings to configure
14668    pub forwarding_rules: std::vec::Vec<crate::model::dns_forwarding::ForwardingRule>,
14669
14670    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14671}
14672
14673impl DnsForwarding {
14674    /// Creates a new default instance.
14675    pub fn new() -> Self {
14676        std::default::Default::default()
14677    }
14678
14679    /// Sets the value of [name][crate::model::DnsForwarding::name].
14680    ///
14681    /// # Example
14682    /// ```ignore,no_run
14683    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14684    /// # let project_id = "project_id";
14685    /// # let location_id = "location_id";
14686    /// # let private_cloud_id = "private_cloud_id";
14687    /// let x = DnsForwarding::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/dnsForwarding"));
14688    /// ```
14689    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14690        self.name = v.into();
14691        self
14692    }
14693
14694    /// Sets the value of [create_time][crate::model::DnsForwarding::create_time].
14695    ///
14696    /// # Example
14697    /// ```ignore,no_run
14698    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14699    /// use wkt::Timestamp;
14700    /// let x = DnsForwarding::new().set_create_time(Timestamp::default()/* use setters */);
14701    /// ```
14702    pub fn set_create_time<T>(mut self, v: T) -> Self
14703    where
14704        T: std::convert::Into<wkt::Timestamp>,
14705    {
14706        self.create_time = std::option::Option::Some(v.into());
14707        self
14708    }
14709
14710    /// Sets or clears the value of [create_time][crate::model::DnsForwarding::create_time].
14711    ///
14712    /// # Example
14713    /// ```ignore,no_run
14714    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14715    /// use wkt::Timestamp;
14716    /// let x = DnsForwarding::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14717    /// let x = DnsForwarding::new().set_or_clear_create_time(None::<Timestamp>);
14718    /// ```
14719    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14720    where
14721        T: std::convert::Into<wkt::Timestamp>,
14722    {
14723        self.create_time = v.map(|x| x.into());
14724        self
14725    }
14726
14727    /// Sets the value of [update_time][crate::model::DnsForwarding::update_time].
14728    ///
14729    /// # Example
14730    /// ```ignore,no_run
14731    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14732    /// use wkt::Timestamp;
14733    /// let x = DnsForwarding::new().set_update_time(Timestamp::default()/* use setters */);
14734    /// ```
14735    pub fn set_update_time<T>(mut self, v: T) -> Self
14736    where
14737        T: std::convert::Into<wkt::Timestamp>,
14738    {
14739        self.update_time = std::option::Option::Some(v.into());
14740        self
14741    }
14742
14743    /// Sets or clears the value of [update_time][crate::model::DnsForwarding::update_time].
14744    ///
14745    /// # Example
14746    /// ```ignore,no_run
14747    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14748    /// use wkt::Timestamp;
14749    /// let x = DnsForwarding::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
14750    /// let x = DnsForwarding::new().set_or_clear_update_time(None::<Timestamp>);
14751    /// ```
14752    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
14753    where
14754        T: std::convert::Into<wkt::Timestamp>,
14755    {
14756        self.update_time = v.map(|x| x.into());
14757        self
14758    }
14759
14760    /// Sets the value of [forwarding_rules][crate::model::DnsForwarding::forwarding_rules].
14761    ///
14762    /// # Example
14763    /// ```ignore,no_run
14764    /// # use google_cloud_vmwareengine_v1::model::DnsForwarding;
14765    /// use google_cloud_vmwareengine_v1::model::dns_forwarding::ForwardingRule;
14766    /// let x = DnsForwarding::new()
14767    ///     .set_forwarding_rules([
14768    ///         ForwardingRule::default()/* use setters */,
14769    ///         ForwardingRule::default()/* use (different) setters */,
14770    ///     ]);
14771    /// ```
14772    pub fn set_forwarding_rules<T, V>(mut self, v: T) -> Self
14773    where
14774        T: std::iter::IntoIterator<Item = V>,
14775        V: std::convert::Into<crate::model::dns_forwarding::ForwardingRule>,
14776    {
14777        use std::iter::Iterator;
14778        self.forwarding_rules = v.into_iter().map(|i| i.into()).collect();
14779        self
14780    }
14781}
14782
14783impl wkt::message::Message for DnsForwarding {
14784    fn typename() -> &'static str {
14785        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding"
14786    }
14787}
14788
14789/// Defines additional types related to [DnsForwarding].
14790pub mod dns_forwarding {
14791    #[allow(unused_imports)]
14792    use super::*;
14793
14794    /// A forwarding rule is a mapping of a `domain` to `name_servers`.
14795    /// This mapping allows VMware Engine to resolve domains for attached private
14796    /// clouds by forwarding DNS requests for a given domain to the specified
14797    /// nameservers.
14798    #[derive(Clone, Default, PartialEq)]
14799    #[non_exhaustive]
14800    pub struct ForwardingRule {
14801        /// Required. Domain used to resolve a `name_servers` list.
14802        pub domain: std::string::String,
14803
14804        /// Required. List of DNS servers to use for domain resolution
14805        pub name_servers: std::vec::Vec<std::string::String>,
14806
14807        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14808    }
14809
14810    impl ForwardingRule {
14811        /// Creates a new default instance.
14812        pub fn new() -> Self {
14813            std::default::Default::default()
14814        }
14815
14816        /// Sets the value of [domain][crate::model::dns_forwarding::ForwardingRule::domain].
14817        ///
14818        /// # Example
14819        /// ```ignore,no_run
14820        /// # use google_cloud_vmwareengine_v1::model::dns_forwarding::ForwardingRule;
14821        /// let x = ForwardingRule::new().set_domain("example");
14822        /// ```
14823        pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14824            self.domain = v.into();
14825            self
14826        }
14827
14828        /// Sets the value of [name_servers][crate::model::dns_forwarding::ForwardingRule::name_servers].
14829        ///
14830        /// # Example
14831        /// ```ignore,no_run
14832        /// # use google_cloud_vmwareengine_v1::model::dns_forwarding::ForwardingRule;
14833        /// let x = ForwardingRule::new().set_name_servers(["a", "b", "c"]);
14834        /// ```
14835        pub fn set_name_servers<T, V>(mut self, v: T) -> Self
14836        where
14837            T: std::iter::IntoIterator<Item = V>,
14838            V: std::convert::Into<std::string::String>,
14839        {
14840            use std::iter::Iterator;
14841            self.name_servers = v.into_iter().map(|i| i.into()).collect();
14842            self
14843        }
14844    }
14845
14846    impl wkt::message::Message for ForwardingRule {
14847        fn typename() -> &'static str {
14848            "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule"
14849        }
14850    }
14851}
14852
14853/// Details of a network peering.
14854#[derive(Clone, Default, PartialEq)]
14855#[non_exhaustive]
14856pub struct NetworkPeering {
14857    /// Output only. The resource name of the network peering. NetworkPeering is a
14858    /// global resource and location can only be global. Resource names are
14859    /// scheme-less URIs that follow the conventions in
14860    /// <https://cloud.google.com/apis/design/resource_names>.
14861    /// For example:
14862    /// `projects/my-project/locations/global/networkPeerings/my-peering`
14863    pub name: std::string::String,
14864
14865    /// Output only. Creation time of this resource.
14866    pub create_time: std::option::Option<wkt::Timestamp>,
14867
14868    /// Output only. Last update time of this resource.
14869    pub update_time: std::option::Option<wkt::Timestamp>,
14870
14871    /// Required. The relative resource name of the network to peer with
14872    /// a standard VMware Engine network. The provided network can be a
14873    /// consumer VPC network or another standard VMware Engine network. If the
14874    /// `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form:
14875    /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
14876    /// Otherwise specify the name in the form:
14877    /// `projects/{project}/global/networks/{network_id}`, where
14878    /// `{project}` can either be a project number or a project ID.
14879    pub peer_network: std::string::String,
14880
14881    /// Optional. True if custom routes are exported to the peered network;
14882    /// false otherwise. The default value is true.
14883    pub export_custom_routes: std::option::Option<bool>,
14884
14885    /// Optional. True if custom routes are imported from the peered network;
14886    /// false otherwise. The default value is true.
14887    pub import_custom_routes: std::option::Option<bool>,
14888
14889    /// Optional. True if full mesh connectivity is created and managed
14890    /// automatically between peered networks; false otherwise. Currently this
14891    /// field is always true because Google Compute Engine automatically creates
14892    /// and manages subnetwork routes between two VPC networks when peering state
14893    /// is 'ACTIVE'.
14894    pub exchange_subnet_routes: std::option::Option<bool>,
14895
14896    /// Optional. True if all subnet routes with a public IP address range are
14897    /// exported; false otherwise. The default value is true. IPv4 special-use
14898    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
14899    /// exported to peers and are not controlled by this field.
14900    pub export_custom_routes_with_public_ip: std::option::Option<bool>,
14901
14902    /// Optional. True if all subnet routes with public IP address range are
14903    /// imported; false otherwise. The default value is true. IPv4 special-use
14904    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
14905    /// imported to peers and are not controlled by this field.
14906    pub import_custom_routes_with_public_ip: std::option::Option<bool>,
14907
14908    /// Output only. State of the network peering. This field
14909    /// has a value of 'ACTIVE' when there's a matching configuration in the peer
14910    /// network. New values may be added to this enum when appropriate.
14911    pub state: crate::model::network_peering::State,
14912
14913    /// Output only. Output Only. Details about the current state of the network
14914    /// peering.
14915    pub state_details: std::string::String,
14916
14917    /// Optional. Maximum transmission unit (MTU) in bytes.
14918    /// The default value is `1500`. If a value of `0` is provided for this field,
14919    /// VMware Engine uses the default value instead.
14920    pub peer_mtu: i32,
14921
14922    /// Required. The type of the network to peer with the VMware Engine network.
14923    pub peer_network_type: crate::model::network_peering::PeerNetworkType,
14924
14925    /// Output only. System-generated unique identifier for the resource.
14926    pub uid: std::string::String,
14927
14928    /// Required. The relative resource name of the VMware Engine network.
14929    /// Specify the name in the following form:
14930    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
14931    /// where `{project}` can either be a project number or a project ID.
14932    pub vmware_engine_network: std::string::String,
14933
14934    /// Optional. User-provided description for this network peering.
14935    pub description: std::string::String,
14936
14937    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14938}
14939
14940impl NetworkPeering {
14941    /// Creates a new default instance.
14942    pub fn new() -> Self {
14943        std::default::Default::default()
14944    }
14945
14946    /// Sets the value of [name][crate::model::NetworkPeering::name].
14947    ///
14948    /// # Example
14949    /// ```ignore,no_run
14950    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14951    /// # let project_id = "project_id";
14952    /// # let location_id = "location_id";
14953    /// # let network_peering_id = "network_peering_id";
14954    /// let x = NetworkPeering::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPeerings/{network_peering_id}"));
14955    /// ```
14956    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14957        self.name = v.into();
14958        self
14959    }
14960
14961    /// Sets the value of [create_time][crate::model::NetworkPeering::create_time].
14962    ///
14963    /// # Example
14964    /// ```ignore,no_run
14965    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14966    /// use wkt::Timestamp;
14967    /// let x = NetworkPeering::new().set_create_time(Timestamp::default()/* use setters */);
14968    /// ```
14969    pub fn set_create_time<T>(mut self, v: T) -> Self
14970    where
14971        T: std::convert::Into<wkt::Timestamp>,
14972    {
14973        self.create_time = std::option::Option::Some(v.into());
14974        self
14975    }
14976
14977    /// Sets or clears the value of [create_time][crate::model::NetworkPeering::create_time].
14978    ///
14979    /// # Example
14980    /// ```ignore,no_run
14981    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14982    /// use wkt::Timestamp;
14983    /// let x = NetworkPeering::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
14984    /// let x = NetworkPeering::new().set_or_clear_create_time(None::<Timestamp>);
14985    /// ```
14986    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
14987    where
14988        T: std::convert::Into<wkt::Timestamp>,
14989    {
14990        self.create_time = v.map(|x| x.into());
14991        self
14992    }
14993
14994    /// Sets the value of [update_time][crate::model::NetworkPeering::update_time].
14995    ///
14996    /// # Example
14997    /// ```ignore,no_run
14998    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
14999    /// use wkt::Timestamp;
15000    /// let x = NetworkPeering::new().set_update_time(Timestamp::default()/* use setters */);
15001    /// ```
15002    pub fn set_update_time<T>(mut self, v: T) -> Self
15003    where
15004        T: std::convert::Into<wkt::Timestamp>,
15005    {
15006        self.update_time = std::option::Option::Some(v.into());
15007        self
15008    }
15009
15010    /// Sets or clears the value of [update_time][crate::model::NetworkPeering::update_time].
15011    ///
15012    /// # Example
15013    /// ```ignore,no_run
15014    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15015    /// use wkt::Timestamp;
15016    /// let x = NetworkPeering::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
15017    /// let x = NetworkPeering::new().set_or_clear_update_time(None::<Timestamp>);
15018    /// ```
15019    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
15020    where
15021        T: std::convert::Into<wkt::Timestamp>,
15022    {
15023        self.update_time = v.map(|x| x.into());
15024        self
15025    }
15026
15027    /// Sets the value of [peer_network][crate::model::NetworkPeering::peer_network].
15028    ///
15029    /// # Example
15030    /// ```ignore,no_run
15031    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15032    /// let x = NetworkPeering::new().set_peer_network("example");
15033    /// ```
15034    pub fn set_peer_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15035        self.peer_network = v.into();
15036        self
15037    }
15038
15039    /// Sets the value of [export_custom_routes][crate::model::NetworkPeering::export_custom_routes].
15040    ///
15041    /// # Example
15042    /// ```ignore,no_run
15043    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15044    /// let x = NetworkPeering::new().set_export_custom_routes(true);
15045    /// ```
15046    pub fn set_export_custom_routes<T>(mut self, v: T) -> Self
15047    where
15048        T: std::convert::Into<bool>,
15049    {
15050        self.export_custom_routes = std::option::Option::Some(v.into());
15051        self
15052    }
15053
15054    /// Sets or clears the value of [export_custom_routes][crate::model::NetworkPeering::export_custom_routes].
15055    ///
15056    /// # Example
15057    /// ```ignore,no_run
15058    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15059    /// let x = NetworkPeering::new().set_or_clear_export_custom_routes(Some(false));
15060    /// let x = NetworkPeering::new().set_or_clear_export_custom_routes(None::<bool>);
15061    /// ```
15062    pub fn set_or_clear_export_custom_routes<T>(mut self, v: std::option::Option<T>) -> Self
15063    where
15064        T: std::convert::Into<bool>,
15065    {
15066        self.export_custom_routes = v.map(|x| x.into());
15067        self
15068    }
15069
15070    /// Sets the value of [import_custom_routes][crate::model::NetworkPeering::import_custom_routes].
15071    ///
15072    /// # Example
15073    /// ```ignore,no_run
15074    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15075    /// let x = NetworkPeering::new().set_import_custom_routes(true);
15076    /// ```
15077    pub fn set_import_custom_routes<T>(mut self, v: T) -> Self
15078    where
15079        T: std::convert::Into<bool>,
15080    {
15081        self.import_custom_routes = std::option::Option::Some(v.into());
15082        self
15083    }
15084
15085    /// Sets or clears the value of [import_custom_routes][crate::model::NetworkPeering::import_custom_routes].
15086    ///
15087    /// # Example
15088    /// ```ignore,no_run
15089    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15090    /// let x = NetworkPeering::new().set_or_clear_import_custom_routes(Some(false));
15091    /// let x = NetworkPeering::new().set_or_clear_import_custom_routes(None::<bool>);
15092    /// ```
15093    pub fn set_or_clear_import_custom_routes<T>(mut self, v: std::option::Option<T>) -> Self
15094    where
15095        T: std::convert::Into<bool>,
15096    {
15097        self.import_custom_routes = v.map(|x| x.into());
15098        self
15099    }
15100
15101    /// Sets the value of [exchange_subnet_routes][crate::model::NetworkPeering::exchange_subnet_routes].
15102    ///
15103    /// # Example
15104    /// ```ignore,no_run
15105    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15106    /// let x = NetworkPeering::new().set_exchange_subnet_routes(true);
15107    /// ```
15108    pub fn set_exchange_subnet_routes<T>(mut self, v: T) -> Self
15109    where
15110        T: std::convert::Into<bool>,
15111    {
15112        self.exchange_subnet_routes = std::option::Option::Some(v.into());
15113        self
15114    }
15115
15116    /// Sets or clears the value of [exchange_subnet_routes][crate::model::NetworkPeering::exchange_subnet_routes].
15117    ///
15118    /// # Example
15119    /// ```ignore,no_run
15120    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15121    /// let x = NetworkPeering::new().set_or_clear_exchange_subnet_routes(Some(false));
15122    /// let x = NetworkPeering::new().set_or_clear_exchange_subnet_routes(None::<bool>);
15123    /// ```
15124    pub fn set_or_clear_exchange_subnet_routes<T>(mut self, v: std::option::Option<T>) -> Self
15125    where
15126        T: std::convert::Into<bool>,
15127    {
15128        self.exchange_subnet_routes = v.map(|x| x.into());
15129        self
15130    }
15131
15132    /// Sets the value of [export_custom_routes_with_public_ip][crate::model::NetworkPeering::export_custom_routes_with_public_ip].
15133    ///
15134    /// # Example
15135    /// ```ignore,no_run
15136    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15137    /// let x = NetworkPeering::new().set_export_custom_routes_with_public_ip(true);
15138    /// ```
15139    pub fn set_export_custom_routes_with_public_ip<T>(mut self, v: T) -> Self
15140    where
15141        T: std::convert::Into<bool>,
15142    {
15143        self.export_custom_routes_with_public_ip = std::option::Option::Some(v.into());
15144        self
15145    }
15146
15147    /// Sets or clears the value of [export_custom_routes_with_public_ip][crate::model::NetworkPeering::export_custom_routes_with_public_ip].
15148    ///
15149    /// # Example
15150    /// ```ignore,no_run
15151    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15152    /// let x = NetworkPeering::new().set_or_clear_export_custom_routes_with_public_ip(Some(false));
15153    /// let x = NetworkPeering::new().set_or_clear_export_custom_routes_with_public_ip(None::<bool>);
15154    /// ```
15155    pub fn set_or_clear_export_custom_routes_with_public_ip<T>(
15156        mut self,
15157        v: std::option::Option<T>,
15158    ) -> Self
15159    where
15160        T: std::convert::Into<bool>,
15161    {
15162        self.export_custom_routes_with_public_ip = v.map(|x| x.into());
15163        self
15164    }
15165
15166    /// Sets the value of [import_custom_routes_with_public_ip][crate::model::NetworkPeering::import_custom_routes_with_public_ip].
15167    ///
15168    /// # Example
15169    /// ```ignore,no_run
15170    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15171    /// let x = NetworkPeering::new().set_import_custom_routes_with_public_ip(true);
15172    /// ```
15173    pub fn set_import_custom_routes_with_public_ip<T>(mut self, v: T) -> Self
15174    where
15175        T: std::convert::Into<bool>,
15176    {
15177        self.import_custom_routes_with_public_ip = std::option::Option::Some(v.into());
15178        self
15179    }
15180
15181    /// Sets or clears the value of [import_custom_routes_with_public_ip][crate::model::NetworkPeering::import_custom_routes_with_public_ip].
15182    ///
15183    /// # Example
15184    /// ```ignore,no_run
15185    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15186    /// let x = NetworkPeering::new().set_or_clear_import_custom_routes_with_public_ip(Some(false));
15187    /// let x = NetworkPeering::new().set_or_clear_import_custom_routes_with_public_ip(None::<bool>);
15188    /// ```
15189    pub fn set_or_clear_import_custom_routes_with_public_ip<T>(
15190        mut self,
15191        v: std::option::Option<T>,
15192    ) -> Self
15193    where
15194        T: std::convert::Into<bool>,
15195    {
15196        self.import_custom_routes_with_public_ip = v.map(|x| x.into());
15197        self
15198    }
15199
15200    /// Sets the value of [state][crate::model::NetworkPeering::state].
15201    ///
15202    /// # Example
15203    /// ```ignore,no_run
15204    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15205    /// use google_cloud_vmwareengine_v1::model::network_peering::State;
15206    /// let x0 = NetworkPeering::new().set_state(State::Inactive);
15207    /// let x1 = NetworkPeering::new().set_state(State::Active);
15208    /// let x2 = NetworkPeering::new().set_state(State::Creating);
15209    /// ```
15210    pub fn set_state<T: std::convert::Into<crate::model::network_peering::State>>(
15211        mut self,
15212        v: T,
15213    ) -> Self {
15214        self.state = v.into();
15215        self
15216    }
15217
15218    /// Sets the value of [state_details][crate::model::NetworkPeering::state_details].
15219    ///
15220    /// # Example
15221    /// ```ignore,no_run
15222    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15223    /// let x = NetworkPeering::new().set_state_details("example");
15224    /// ```
15225    pub fn set_state_details<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15226        self.state_details = v.into();
15227        self
15228    }
15229
15230    /// Sets the value of [peer_mtu][crate::model::NetworkPeering::peer_mtu].
15231    ///
15232    /// # Example
15233    /// ```ignore,no_run
15234    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15235    /// let x = NetworkPeering::new().set_peer_mtu(42);
15236    /// ```
15237    pub fn set_peer_mtu<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
15238        self.peer_mtu = v.into();
15239        self
15240    }
15241
15242    /// Sets the value of [peer_network_type][crate::model::NetworkPeering::peer_network_type].
15243    ///
15244    /// # Example
15245    /// ```ignore,no_run
15246    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15247    /// use google_cloud_vmwareengine_v1::model::network_peering::PeerNetworkType;
15248    /// let x0 = NetworkPeering::new().set_peer_network_type(PeerNetworkType::Standard);
15249    /// let x1 = NetworkPeering::new().set_peer_network_type(PeerNetworkType::VmwareEngineNetwork);
15250    /// let x2 = NetworkPeering::new().set_peer_network_type(PeerNetworkType::PrivateServicesAccess);
15251    /// ```
15252    pub fn set_peer_network_type<
15253        T: std::convert::Into<crate::model::network_peering::PeerNetworkType>,
15254    >(
15255        mut self,
15256        v: T,
15257    ) -> Self {
15258        self.peer_network_type = v.into();
15259        self
15260    }
15261
15262    /// Sets the value of [uid][crate::model::NetworkPeering::uid].
15263    ///
15264    /// # Example
15265    /// ```ignore,no_run
15266    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15267    /// let x = NetworkPeering::new().set_uid("example");
15268    /// ```
15269    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15270        self.uid = v.into();
15271        self
15272    }
15273
15274    /// Sets the value of [vmware_engine_network][crate::model::NetworkPeering::vmware_engine_network].
15275    ///
15276    /// # Example
15277    /// ```ignore,no_run
15278    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15279    /// # let project_id = "project_id";
15280    /// # let location_id = "location_id";
15281    /// # let vmware_engine_network_id = "vmware_engine_network_id";
15282    /// let x = NetworkPeering::new().set_vmware_engine_network(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"));
15283    /// ```
15284    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
15285        mut self,
15286        v: T,
15287    ) -> Self {
15288        self.vmware_engine_network = v.into();
15289        self
15290    }
15291
15292    /// Sets the value of [description][crate::model::NetworkPeering::description].
15293    ///
15294    /// # Example
15295    /// ```ignore,no_run
15296    /// # use google_cloud_vmwareengine_v1::model::NetworkPeering;
15297    /// let x = NetworkPeering::new().set_description("example");
15298    /// ```
15299    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15300        self.description = v.into();
15301        self
15302    }
15303}
15304
15305impl wkt::message::Message for NetworkPeering {
15306    fn typename() -> &'static str {
15307        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPeering"
15308    }
15309}
15310
15311/// Defines additional types related to [NetworkPeering].
15312pub mod network_peering {
15313    #[allow(unused_imports)]
15314    use super::*;
15315
15316    /// Possible states of a network peering.
15317    ///
15318    /// # Working with unknown values
15319    ///
15320    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15321    /// additional enum variants at any time. Adding new variants is not considered
15322    /// a breaking change. Applications should write their code in anticipation of:
15323    ///
15324    /// - New values appearing in future releases of the client library, **and**
15325    /// - New values received dynamically, without application changes.
15326    ///
15327    /// Please consult the [Working with enums] section in the user guide for some
15328    /// guidelines.
15329    ///
15330    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15331    #[derive(Clone, Debug, PartialEq)]
15332    #[non_exhaustive]
15333    pub enum State {
15334        /// Unspecified network peering state. This is the default value.
15335        Unspecified,
15336        /// The peering is not active.
15337        Inactive,
15338        /// The peering is active.
15339        Active,
15340        /// The peering is being created.
15341        Creating,
15342        /// The peering is being deleted.
15343        Deleting,
15344        /// If set, the enum was initialized with an unknown value.
15345        ///
15346        /// Applications can examine the value using [State::value] or
15347        /// [State::name].
15348        UnknownValue(state::UnknownValue),
15349    }
15350
15351    #[doc(hidden)]
15352    pub mod state {
15353        #[allow(unused_imports)]
15354        use super::*;
15355        #[derive(Clone, Debug, PartialEq)]
15356        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15357    }
15358
15359    impl State {
15360        /// Gets the enum value.
15361        ///
15362        /// Returns `None` if the enum contains an unknown value deserialized from
15363        /// the string representation of enums.
15364        pub fn value(&self) -> std::option::Option<i32> {
15365            match self {
15366                Self::Unspecified => std::option::Option::Some(0),
15367                Self::Inactive => std::option::Option::Some(1),
15368                Self::Active => std::option::Option::Some(2),
15369                Self::Creating => std::option::Option::Some(3),
15370                Self::Deleting => std::option::Option::Some(4),
15371                Self::UnknownValue(u) => u.0.value(),
15372            }
15373        }
15374
15375        /// Gets the enum value as a string.
15376        ///
15377        /// Returns `None` if the enum contains an unknown value deserialized from
15378        /// the integer representation of enums.
15379        pub fn name(&self) -> std::option::Option<&str> {
15380            match self {
15381                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
15382                Self::Inactive => std::option::Option::Some("INACTIVE"),
15383                Self::Active => std::option::Option::Some("ACTIVE"),
15384                Self::Creating => std::option::Option::Some("CREATING"),
15385                Self::Deleting => std::option::Option::Some("DELETING"),
15386                Self::UnknownValue(u) => u.0.name(),
15387            }
15388        }
15389    }
15390
15391    impl std::default::Default for State {
15392        fn default() -> Self {
15393            use std::convert::From;
15394            Self::from(0)
15395        }
15396    }
15397
15398    impl std::fmt::Display for State {
15399        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15400            wkt::internal::display_enum(f, self.name(), self.value())
15401        }
15402    }
15403
15404    impl std::convert::From<i32> for State {
15405        fn from(value: i32) -> Self {
15406            match value {
15407                0 => Self::Unspecified,
15408                1 => Self::Inactive,
15409                2 => Self::Active,
15410                3 => Self::Creating,
15411                4 => Self::Deleting,
15412                _ => Self::UnknownValue(state::UnknownValue(
15413                    wkt::internal::UnknownEnumValue::Integer(value),
15414                )),
15415            }
15416        }
15417    }
15418
15419    impl std::convert::From<&str> for State {
15420        fn from(value: &str) -> Self {
15421            use std::string::ToString;
15422            match value {
15423                "STATE_UNSPECIFIED" => Self::Unspecified,
15424                "INACTIVE" => Self::Inactive,
15425                "ACTIVE" => Self::Active,
15426                "CREATING" => Self::Creating,
15427                "DELETING" => Self::Deleting,
15428                _ => Self::UnknownValue(state::UnknownValue(
15429                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15430                )),
15431            }
15432        }
15433    }
15434
15435    impl serde::ser::Serialize for State {
15436        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15437        where
15438            S: serde::Serializer,
15439        {
15440            match self {
15441                Self::Unspecified => serializer.serialize_i32(0),
15442                Self::Inactive => serializer.serialize_i32(1),
15443                Self::Active => serializer.serialize_i32(2),
15444                Self::Creating => serializer.serialize_i32(3),
15445                Self::Deleting => serializer.serialize_i32(4),
15446                Self::UnknownValue(u) => u.0.serialize(serializer),
15447            }
15448        }
15449    }
15450
15451    impl<'de> serde::de::Deserialize<'de> for State {
15452        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15453        where
15454            D: serde::Deserializer<'de>,
15455        {
15456            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
15457                ".google.cloud.vmwareengine.v1.NetworkPeering.State",
15458            ))
15459        }
15460    }
15461
15462    /// Type or purpose of the network peering connection.
15463    ///
15464    /// # Working with unknown values
15465    ///
15466    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15467    /// additional enum variants at any time. Adding new variants is not considered
15468    /// a breaking change. Applications should write their code in anticipation of:
15469    ///
15470    /// - New values appearing in future releases of the client library, **and**
15471    /// - New values received dynamically, without application changes.
15472    ///
15473    /// Please consult the [Working with enums] section in the user guide for some
15474    /// guidelines.
15475    ///
15476    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15477    #[derive(Clone, Debug, PartialEq)]
15478    #[non_exhaustive]
15479    pub enum PeerNetworkType {
15480        /// Unspecified
15481        Unspecified,
15482        /// Peering connection used for connecting to another VPC network established
15483        /// by the same user. For example, a peering connection to another VPC
15484        /// network in the same project or to an on-premises network.
15485        Standard,
15486        /// Peering connection used for connecting to another VMware Engine network.
15487        VmwareEngineNetwork,
15488        /// Peering connection used for establishing [private services
15489        /// access](https://cloud.google.com/vpc/docs/private-services-access).
15490        PrivateServicesAccess,
15491        /// Peering connection used for connecting to NetApp Cloud Volumes.
15492        NetappCloudVolumes,
15493        /// Peering connection used for connecting to third-party services. Most
15494        /// third-party services require manual setup of reverse peering on the VPC
15495        /// network associated with the third-party service.
15496        ThirdPartyService,
15497        /// Peering connection used for connecting to Dell PowerScale Filers
15498        DellPowerscale,
15499        /// Peering connection used for connecting to Google Cloud NetApp Volumes.
15500        GoogleCloudNetappVolumes,
15501        /// If set, the enum was initialized with an unknown value.
15502        ///
15503        /// Applications can examine the value using [PeerNetworkType::value] or
15504        /// [PeerNetworkType::name].
15505        UnknownValue(peer_network_type::UnknownValue),
15506    }
15507
15508    #[doc(hidden)]
15509    pub mod peer_network_type {
15510        #[allow(unused_imports)]
15511        use super::*;
15512        #[derive(Clone, Debug, PartialEq)]
15513        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15514    }
15515
15516    impl PeerNetworkType {
15517        /// Gets the enum value.
15518        ///
15519        /// Returns `None` if the enum contains an unknown value deserialized from
15520        /// the string representation of enums.
15521        pub fn value(&self) -> std::option::Option<i32> {
15522            match self {
15523                Self::Unspecified => std::option::Option::Some(0),
15524                Self::Standard => std::option::Option::Some(1),
15525                Self::VmwareEngineNetwork => std::option::Option::Some(2),
15526                Self::PrivateServicesAccess => std::option::Option::Some(3),
15527                Self::NetappCloudVolumes => std::option::Option::Some(4),
15528                Self::ThirdPartyService => std::option::Option::Some(5),
15529                Self::DellPowerscale => std::option::Option::Some(6),
15530                Self::GoogleCloudNetappVolumes => std::option::Option::Some(7),
15531                Self::UnknownValue(u) => u.0.value(),
15532            }
15533        }
15534
15535        /// Gets the enum value as a string.
15536        ///
15537        /// Returns `None` if the enum contains an unknown value deserialized from
15538        /// the integer representation of enums.
15539        pub fn name(&self) -> std::option::Option<&str> {
15540            match self {
15541                Self::Unspecified => std::option::Option::Some("PEER_NETWORK_TYPE_UNSPECIFIED"),
15542                Self::Standard => std::option::Option::Some("STANDARD"),
15543                Self::VmwareEngineNetwork => std::option::Option::Some("VMWARE_ENGINE_NETWORK"),
15544                Self::PrivateServicesAccess => std::option::Option::Some("PRIVATE_SERVICES_ACCESS"),
15545                Self::NetappCloudVolumes => std::option::Option::Some("NETAPP_CLOUD_VOLUMES"),
15546                Self::ThirdPartyService => std::option::Option::Some("THIRD_PARTY_SERVICE"),
15547                Self::DellPowerscale => std::option::Option::Some("DELL_POWERSCALE"),
15548                Self::GoogleCloudNetappVolumes => {
15549                    std::option::Option::Some("GOOGLE_CLOUD_NETAPP_VOLUMES")
15550                }
15551                Self::UnknownValue(u) => u.0.name(),
15552            }
15553        }
15554    }
15555
15556    impl std::default::Default for PeerNetworkType {
15557        fn default() -> Self {
15558            use std::convert::From;
15559            Self::from(0)
15560        }
15561    }
15562
15563    impl std::fmt::Display for PeerNetworkType {
15564        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15565            wkt::internal::display_enum(f, self.name(), self.value())
15566        }
15567    }
15568
15569    impl std::convert::From<i32> for PeerNetworkType {
15570        fn from(value: i32) -> Self {
15571            match value {
15572                0 => Self::Unspecified,
15573                1 => Self::Standard,
15574                2 => Self::VmwareEngineNetwork,
15575                3 => Self::PrivateServicesAccess,
15576                4 => Self::NetappCloudVolumes,
15577                5 => Self::ThirdPartyService,
15578                6 => Self::DellPowerscale,
15579                7 => Self::GoogleCloudNetappVolumes,
15580                _ => Self::UnknownValue(peer_network_type::UnknownValue(
15581                    wkt::internal::UnknownEnumValue::Integer(value),
15582                )),
15583            }
15584        }
15585    }
15586
15587    impl std::convert::From<&str> for PeerNetworkType {
15588        fn from(value: &str) -> Self {
15589            use std::string::ToString;
15590            match value {
15591                "PEER_NETWORK_TYPE_UNSPECIFIED" => Self::Unspecified,
15592                "STANDARD" => Self::Standard,
15593                "VMWARE_ENGINE_NETWORK" => Self::VmwareEngineNetwork,
15594                "PRIVATE_SERVICES_ACCESS" => Self::PrivateServicesAccess,
15595                "NETAPP_CLOUD_VOLUMES" => Self::NetappCloudVolumes,
15596                "THIRD_PARTY_SERVICE" => Self::ThirdPartyService,
15597                "DELL_POWERSCALE" => Self::DellPowerscale,
15598                "GOOGLE_CLOUD_NETAPP_VOLUMES" => Self::GoogleCloudNetappVolumes,
15599                _ => Self::UnknownValue(peer_network_type::UnknownValue(
15600                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15601                )),
15602            }
15603        }
15604    }
15605
15606    impl serde::ser::Serialize for PeerNetworkType {
15607        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15608        where
15609            S: serde::Serializer,
15610        {
15611            match self {
15612                Self::Unspecified => serializer.serialize_i32(0),
15613                Self::Standard => serializer.serialize_i32(1),
15614                Self::VmwareEngineNetwork => serializer.serialize_i32(2),
15615                Self::PrivateServicesAccess => serializer.serialize_i32(3),
15616                Self::NetappCloudVolumes => serializer.serialize_i32(4),
15617                Self::ThirdPartyService => serializer.serialize_i32(5),
15618                Self::DellPowerscale => serializer.serialize_i32(6),
15619                Self::GoogleCloudNetappVolumes => serializer.serialize_i32(7),
15620                Self::UnknownValue(u) => u.0.serialize(serializer),
15621            }
15622        }
15623    }
15624
15625    impl<'de> serde::de::Deserialize<'de> for PeerNetworkType {
15626        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15627        where
15628            D: serde::Deserializer<'de>,
15629        {
15630            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PeerNetworkType>::new(
15631                ".google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType",
15632            ))
15633        }
15634    }
15635}
15636
15637/// Exchanged network peering route.
15638#[derive(Clone, Default, PartialEq)]
15639#[non_exhaustive]
15640pub struct PeeringRoute {
15641    /// Output only. Destination range of the peering route in CIDR notation.
15642    pub dest_range: std::string::String,
15643
15644    /// Output only. Type of the route in the peer VPC network.
15645    pub r#type: crate::model::peering_route::Type,
15646
15647    /// Output only. Region containing the next hop of the peering route. This
15648    /// field only applies to dynamic routes in the peer VPC network.
15649    pub next_hop_region: std::string::String,
15650
15651    /// Output only. The priority of the peering route.
15652    pub priority: i64,
15653
15654    /// Output only. True if the peering route has been imported from a peered
15655    /// VPC network; false otherwise. The import happens if the field
15656    /// `NetworkPeering.importCustomRoutes` is true for this network,
15657    /// `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and
15658    /// the import does not result in a route conflict.
15659    pub imported: bool,
15660
15661    /// Output only. Direction of the routes exchanged with the peer network, from
15662    /// the VMware Engine network perspective:
15663    ///
15664    /// * Routes of direction `INCOMING` are imported from the peer network.
15665    /// * Routes of direction `OUTGOING` are exported from the intranet VPC network
15666    ///   of the VMware Engine network.
15667    pub direction: crate::model::peering_route::Direction,
15668
15669    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
15670}
15671
15672impl PeeringRoute {
15673    /// Creates a new default instance.
15674    pub fn new() -> Self {
15675        std::default::Default::default()
15676    }
15677
15678    /// Sets the value of [dest_range][crate::model::PeeringRoute::dest_range].
15679    ///
15680    /// # Example
15681    /// ```ignore,no_run
15682    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15683    /// let x = PeeringRoute::new().set_dest_range("example");
15684    /// ```
15685    pub fn set_dest_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15686        self.dest_range = v.into();
15687        self
15688    }
15689
15690    /// Sets the value of [r#type][crate::model::PeeringRoute::type].
15691    ///
15692    /// # Example
15693    /// ```ignore,no_run
15694    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15695    /// use google_cloud_vmwareengine_v1::model::peering_route::Type;
15696    /// let x0 = PeeringRoute::new().set_type(Type::DynamicPeeringRoute);
15697    /// let x1 = PeeringRoute::new().set_type(Type::StaticPeeringRoute);
15698    /// let x2 = PeeringRoute::new().set_type(Type::SubnetPeeringRoute);
15699    /// ```
15700    pub fn set_type<T: std::convert::Into<crate::model::peering_route::Type>>(
15701        mut self,
15702        v: T,
15703    ) -> Self {
15704        self.r#type = v.into();
15705        self
15706    }
15707
15708    /// Sets the value of [next_hop_region][crate::model::PeeringRoute::next_hop_region].
15709    ///
15710    /// # Example
15711    /// ```ignore,no_run
15712    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15713    /// let x = PeeringRoute::new().set_next_hop_region("example");
15714    /// ```
15715    pub fn set_next_hop_region<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
15716        self.next_hop_region = v.into();
15717        self
15718    }
15719
15720    /// Sets the value of [priority][crate::model::PeeringRoute::priority].
15721    ///
15722    /// # Example
15723    /// ```ignore,no_run
15724    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15725    /// let x = PeeringRoute::new().set_priority(42);
15726    /// ```
15727    pub fn set_priority<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
15728        self.priority = v.into();
15729        self
15730    }
15731
15732    /// Sets the value of [imported][crate::model::PeeringRoute::imported].
15733    ///
15734    /// # Example
15735    /// ```ignore,no_run
15736    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15737    /// let x = PeeringRoute::new().set_imported(true);
15738    /// ```
15739    pub fn set_imported<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
15740        self.imported = v.into();
15741        self
15742    }
15743
15744    /// Sets the value of [direction][crate::model::PeeringRoute::direction].
15745    ///
15746    /// # Example
15747    /// ```ignore,no_run
15748    /// # use google_cloud_vmwareengine_v1::model::PeeringRoute;
15749    /// use google_cloud_vmwareengine_v1::model::peering_route::Direction;
15750    /// let x0 = PeeringRoute::new().set_direction(Direction::Incoming);
15751    /// let x1 = PeeringRoute::new().set_direction(Direction::Outgoing);
15752    /// ```
15753    pub fn set_direction<T: std::convert::Into<crate::model::peering_route::Direction>>(
15754        mut self,
15755        v: T,
15756    ) -> Self {
15757        self.direction = v.into();
15758        self
15759    }
15760}
15761
15762impl wkt::message::Message for PeeringRoute {
15763    fn typename() -> &'static str {
15764        "type.googleapis.com/google.cloud.vmwareengine.v1.PeeringRoute"
15765    }
15766}
15767
15768/// Defines additional types related to [PeeringRoute].
15769pub mod peering_route {
15770    #[allow(unused_imports)]
15771    use super::*;
15772
15773    /// The type of the peering route.
15774    ///
15775    /// # Working with unknown values
15776    ///
15777    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15778    /// additional enum variants at any time. Adding new variants is not considered
15779    /// a breaking change. Applications should write their code in anticipation of:
15780    ///
15781    /// - New values appearing in future releases of the client library, **and**
15782    /// - New values received dynamically, without application changes.
15783    ///
15784    /// Please consult the [Working with enums] section in the user guide for some
15785    /// guidelines.
15786    ///
15787    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15788    #[derive(Clone, Debug, PartialEq)]
15789    #[non_exhaustive]
15790    pub enum Type {
15791        /// Unspecified peering route type. This is the default value.
15792        Unspecified,
15793        /// Dynamic routes in the peer network.
15794        DynamicPeeringRoute,
15795        /// Static routes in the peer network.
15796        StaticPeeringRoute,
15797        /// Created, updated, and removed automatically by Google Cloud when subnets
15798        /// are created, modified, or deleted in the peer network.
15799        SubnetPeeringRoute,
15800        /// If set, the enum was initialized with an unknown value.
15801        ///
15802        /// Applications can examine the value using [Type::value] or
15803        /// [Type::name].
15804        UnknownValue(r#type::UnknownValue),
15805    }
15806
15807    #[doc(hidden)]
15808    pub mod r#type {
15809        #[allow(unused_imports)]
15810        use super::*;
15811        #[derive(Clone, Debug, PartialEq)]
15812        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15813    }
15814
15815    impl Type {
15816        /// Gets the enum value.
15817        ///
15818        /// Returns `None` if the enum contains an unknown value deserialized from
15819        /// the string representation of enums.
15820        pub fn value(&self) -> std::option::Option<i32> {
15821            match self {
15822                Self::Unspecified => std::option::Option::Some(0),
15823                Self::DynamicPeeringRoute => std::option::Option::Some(1),
15824                Self::StaticPeeringRoute => std::option::Option::Some(2),
15825                Self::SubnetPeeringRoute => std::option::Option::Some(3),
15826                Self::UnknownValue(u) => u.0.value(),
15827            }
15828        }
15829
15830        /// Gets the enum value as a string.
15831        ///
15832        /// Returns `None` if the enum contains an unknown value deserialized from
15833        /// the integer representation of enums.
15834        pub fn name(&self) -> std::option::Option<&str> {
15835            match self {
15836                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
15837                Self::DynamicPeeringRoute => std::option::Option::Some("DYNAMIC_PEERING_ROUTE"),
15838                Self::StaticPeeringRoute => std::option::Option::Some("STATIC_PEERING_ROUTE"),
15839                Self::SubnetPeeringRoute => std::option::Option::Some("SUBNET_PEERING_ROUTE"),
15840                Self::UnknownValue(u) => u.0.name(),
15841            }
15842        }
15843    }
15844
15845    impl std::default::Default for Type {
15846        fn default() -> Self {
15847            use std::convert::From;
15848            Self::from(0)
15849        }
15850    }
15851
15852    impl std::fmt::Display for Type {
15853        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15854            wkt::internal::display_enum(f, self.name(), self.value())
15855        }
15856    }
15857
15858    impl std::convert::From<i32> for Type {
15859        fn from(value: i32) -> Self {
15860            match value {
15861                0 => Self::Unspecified,
15862                1 => Self::DynamicPeeringRoute,
15863                2 => Self::StaticPeeringRoute,
15864                3 => Self::SubnetPeeringRoute,
15865                _ => Self::UnknownValue(r#type::UnknownValue(
15866                    wkt::internal::UnknownEnumValue::Integer(value),
15867                )),
15868            }
15869        }
15870    }
15871
15872    impl std::convert::From<&str> for Type {
15873        fn from(value: &str) -> Self {
15874            use std::string::ToString;
15875            match value {
15876                "TYPE_UNSPECIFIED" => Self::Unspecified,
15877                "DYNAMIC_PEERING_ROUTE" => Self::DynamicPeeringRoute,
15878                "STATIC_PEERING_ROUTE" => Self::StaticPeeringRoute,
15879                "SUBNET_PEERING_ROUTE" => Self::SubnetPeeringRoute,
15880                _ => Self::UnknownValue(r#type::UnknownValue(
15881                    wkt::internal::UnknownEnumValue::String(value.to_string()),
15882                )),
15883            }
15884        }
15885    }
15886
15887    impl serde::ser::Serialize for Type {
15888        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
15889        where
15890            S: serde::Serializer,
15891        {
15892            match self {
15893                Self::Unspecified => serializer.serialize_i32(0),
15894                Self::DynamicPeeringRoute => serializer.serialize_i32(1),
15895                Self::StaticPeeringRoute => serializer.serialize_i32(2),
15896                Self::SubnetPeeringRoute => serializer.serialize_i32(3),
15897                Self::UnknownValue(u) => u.0.serialize(serializer),
15898            }
15899        }
15900    }
15901
15902    impl<'de> serde::de::Deserialize<'de> for Type {
15903        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
15904        where
15905            D: serde::Deserializer<'de>,
15906        {
15907            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
15908                ".google.cloud.vmwareengine.v1.PeeringRoute.Type",
15909            ))
15910        }
15911    }
15912
15913    /// The direction of the exchanged routes.
15914    ///
15915    /// # Working with unknown values
15916    ///
15917    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
15918    /// additional enum variants at any time. Adding new variants is not considered
15919    /// a breaking change. Applications should write their code in anticipation of:
15920    ///
15921    /// - New values appearing in future releases of the client library, **and**
15922    /// - New values received dynamically, without application changes.
15923    ///
15924    /// Please consult the [Working with enums] section in the user guide for some
15925    /// guidelines.
15926    ///
15927    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
15928    #[derive(Clone, Debug, PartialEq)]
15929    #[non_exhaustive]
15930    pub enum Direction {
15931        /// Unspecified exchanged routes direction. This is default.
15932        Unspecified,
15933        /// Routes imported from the peer network.
15934        Incoming,
15935        /// Routes exported to the peer network.
15936        Outgoing,
15937        /// If set, the enum was initialized with an unknown value.
15938        ///
15939        /// Applications can examine the value using [Direction::value] or
15940        /// [Direction::name].
15941        UnknownValue(direction::UnknownValue),
15942    }
15943
15944    #[doc(hidden)]
15945    pub mod direction {
15946        #[allow(unused_imports)]
15947        use super::*;
15948        #[derive(Clone, Debug, PartialEq)]
15949        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
15950    }
15951
15952    impl Direction {
15953        /// Gets the enum value.
15954        ///
15955        /// Returns `None` if the enum contains an unknown value deserialized from
15956        /// the string representation of enums.
15957        pub fn value(&self) -> std::option::Option<i32> {
15958            match self {
15959                Self::Unspecified => std::option::Option::Some(0),
15960                Self::Incoming => std::option::Option::Some(1),
15961                Self::Outgoing => std::option::Option::Some(2),
15962                Self::UnknownValue(u) => u.0.value(),
15963            }
15964        }
15965
15966        /// Gets the enum value as a string.
15967        ///
15968        /// Returns `None` if the enum contains an unknown value deserialized from
15969        /// the integer representation of enums.
15970        pub fn name(&self) -> std::option::Option<&str> {
15971            match self {
15972                Self::Unspecified => std::option::Option::Some("DIRECTION_UNSPECIFIED"),
15973                Self::Incoming => std::option::Option::Some("INCOMING"),
15974                Self::Outgoing => std::option::Option::Some("OUTGOING"),
15975                Self::UnknownValue(u) => u.0.name(),
15976            }
15977        }
15978    }
15979
15980    impl std::default::Default for Direction {
15981        fn default() -> Self {
15982            use std::convert::From;
15983            Self::from(0)
15984        }
15985    }
15986
15987    impl std::fmt::Display for Direction {
15988        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
15989            wkt::internal::display_enum(f, self.name(), self.value())
15990        }
15991    }
15992
15993    impl std::convert::From<i32> for Direction {
15994        fn from(value: i32) -> Self {
15995            match value {
15996                0 => Self::Unspecified,
15997                1 => Self::Incoming,
15998                2 => Self::Outgoing,
15999                _ => Self::UnknownValue(direction::UnknownValue(
16000                    wkt::internal::UnknownEnumValue::Integer(value),
16001                )),
16002            }
16003        }
16004    }
16005
16006    impl std::convert::From<&str> for Direction {
16007        fn from(value: &str) -> Self {
16008            use std::string::ToString;
16009            match value {
16010                "DIRECTION_UNSPECIFIED" => Self::Unspecified,
16011                "INCOMING" => Self::Incoming,
16012                "OUTGOING" => Self::Outgoing,
16013                _ => Self::UnknownValue(direction::UnknownValue(
16014                    wkt::internal::UnknownEnumValue::String(value.to_string()),
16015                )),
16016            }
16017        }
16018    }
16019
16020    impl serde::ser::Serialize for Direction {
16021        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16022        where
16023            S: serde::Serializer,
16024        {
16025            match self {
16026                Self::Unspecified => serializer.serialize_i32(0),
16027                Self::Incoming => serializer.serialize_i32(1),
16028                Self::Outgoing => serializer.serialize_i32(2),
16029                Self::UnknownValue(u) => u.0.serialize(serializer),
16030            }
16031        }
16032    }
16033
16034    impl<'de> serde::de::Deserialize<'de> for Direction {
16035        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16036        where
16037            D: serde::Deserializer<'de>,
16038        {
16039            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Direction>::new(
16040                ".google.cloud.vmwareengine.v1.PeeringRoute.Direction",
16041            ))
16042        }
16043    }
16044}
16045
16046/// Represents a network policy resource. Network policies are regional
16047/// resources. You can use a network policy to enable or disable internet access
16048/// and external IP access. Network policies are associated with a VMware Engine
16049/// network, which might span across regions. For a given region, a network
16050/// policy applies to all private clouds in the VMware Engine network associated
16051/// with the policy.
16052#[derive(Clone, Default, PartialEq)]
16053#[non_exhaustive]
16054pub struct NetworkPolicy {
16055    /// Output only. The resource name of this network policy.
16056    /// Resource names are schemeless URIs that follow the conventions in
16057    /// <https://cloud.google.com/apis/design/resource_names>.
16058    /// For example:
16059    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
16060    pub name: std::string::String,
16061
16062    /// Output only. Creation time of this resource.
16063    pub create_time: std::option::Option<wkt::Timestamp>,
16064
16065    /// Output only. Last update time of this resource.
16066    pub update_time: std::option::Option<wkt::Timestamp>,
16067
16068    /// Network service that allows VMware workloads to access the internet.
16069    pub internet_access: std::option::Option<crate::model::network_policy::NetworkService>,
16070
16071    /// Network service that allows External IP addresses to be assigned to VMware
16072    /// workloads. This service can only be enabled when `internet_access` is also
16073    /// enabled.
16074    pub external_ip: std::option::Option<crate::model::network_policy::NetworkService>,
16075
16076    /// Required. IP address range in CIDR notation used to create internet access
16077    /// and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is
16078    /// required. The range cannot overlap with any prefixes either in the consumer
16079    /// VPC network or in use by the private clouds attached to that VPC network.
16080    pub edge_services_cidr: std::string::String,
16081
16082    /// Output only. System-generated unique identifier for the resource.
16083    pub uid: std::string::String,
16084
16085    /// Optional. The relative resource name of the VMware Engine network.
16086    /// Specify the name in the following form:
16087    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
16088    /// where `{project}` can either be a project number or a project ID.
16089    pub vmware_engine_network: std::string::String,
16090
16091    /// Optional. User-provided description for this network policy.
16092    pub description: std::string::String,
16093
16094    /// Output only. The canonical name of the VMware Engine network in the form:
16095    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
16096    pub vmware_engine_network_canonical: std::string::String,
16097
16098    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16099}
16100
16101impl NetworkPolicy {
16102    /// Creates a new default instance.
16103    pub fn new() -> Self {
16104        std::default::Default::default()
16105    }
16106
16107    /// Sets the value of [name][crate::model::NetworkPolicy::name].
16108    ///
16109    /// # Example
16110    /// ```ignore,no_run
16111    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16112    /// # let project_id = "project_id";
16113    /// # let location_id = "location_id";
16114    /// # let network_policy_id = "network_policy_id";
16115    /// let x = NetworkPolicy::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}"));
16116    /// ```
16117    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16118        self.name = v.into();
16119        self
16120    }
16121
16122    /// Sets the value of [create_time][crate::model::NetworkPolicy::create_time].
16123    ///
16124    /// # Example
16125    /// ```ignore,no_run
16126    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16127    /// use wkt::Timestamp;
16128    /// let x = NetworkPolicy::new().set_create_time(Timestamp::default()/* use setters */);
16129    /// ```
16130    pub fn set_create_time<T>(mut self, v: T) -> Self
16131    where
16132        T: std::convert::Into<wkt::Timestamp>,
16133    {
16134        self.create_time = std::option::Option::Some(v.into());
16135        self
16136    }
16137
16138    /// Sets or clears the value of [create_time][crate::model::NetworkPolicy::create_time].
16139    ///
16140    /// # Example
16141    /// ```ignore,no_run
16142    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16143    /// use wkt::Timestamp;
16144    /// let x = NetworkPolicy::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
16145    /// let x = NetworkPolicy::new().set_or_clear_create_time(None::<Timestamp>);
16146    /// ```
16147    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16148    where
16149        T: std::convert::Into<wkt::Timestamp>,
16150    {
16151        self.create_time = v.map(|x| x.into());
16152        self
16153    }
16154
16155    /// Sets the value of [update_time][crate::model::NetworkPolicy::update_time].
16156    ///
16157    /// # Example
16158    /// ```ignore,no_run
16159    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16160    /// use wkt::Timestamp;
16161    /// let x = NetworkPolicy::new().set_update_time(Timestamp::default()/* use setters */);
16162    /// ```
16163    pub fn set_update_time<T>(mut self, v: T) -> Self
16164    where
16165        T: std::convert::Into<wkt::Timestamp>,
16166    {
16167        self.update_time = std::option::Option::Some(v.into());
16168        self
16169    }
16170
16171    /// Sets or clears the value of [update_time][crate::model::NetworkPolicy::update_time].
16172    ///
16173    /// # Example
16174    /// ```ignore,no_run
16175    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16176    /// use wkt::Timestamp;
16177    /// let x = NetworkPolicy::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
16178    /// let x = NetworkPolicy::new().set_or_clear_update_time(None::<Timestamp>);
16179    /// ```
16180    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
16181    where
16182        T: std::convert::Into<wkt::Timestamp>,
16183    {
16184        self.update_time = v.map(|x| x.into());
16185        self
16186    }
16187
16188    /// Sets the value of [internet_access][crate::model::NetworkPolicy::internet_access].
16189    ///
16190    /// # Example
16191    /// ```ignore,no_run
16192    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16193    /// use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
16194    /// let x = NetworkPolicy::new().set_internet_access(NetworkService::default()/* use setters */);
16195    /// ```
16196    pub fn set_internet_access<T>(mut self, v: T) -> Self
16197    where
16198        T: std::convert::Into<crate::model::network_policy::NetworkService>,
16199    {
16200        self.internet_access = std::option::Option::Some(v.into());
16201        self
16202    }
16203
16204    /// Sets or clears the value of [internet_access][crate::model::NetworkPolicy::internet_access].
16205    ///
16206    /// # Example
16207    /// ```ignore,no_run
16208    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16209    /// use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
16210    /// let x = NetworkPolicy::new().set_or_clear_internet_access(Some(NetworkService::default()/* use setters */));
16211    /// let x = NetworkPolicy::new().set_or_clear_internet_access(None::<NetworkService>);
16212    /// ```
16213    pub fn set_or_clear_internet_access<T>(mut self, v: std::option::Option<T>) -> Self
16214    where
16215        T: std::convert::Into<crate::model::network_policy::NetworkService>,
16216    {
16217        self.internet_access = v.map(|x| x.into());
16218        self
16219    }
16220
16221    /// Sets the value of [external_ip][crate::model::NetworkPolicy::external_ip].
16222    ///
16223    /// # Example
16224    /// ```ignore,no_run
16225    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16226    /// use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
16227    /// let x = NetworkPolicy::new().set_external_ip(NetworkService::default()/* use setters */);
16228    /// ```
16229    pub fn set_external_ip<T>(mut self, v: T) -> Self
16230    where
16231        T: std::convert::Into<crate::model::network_policy::NetworkService>,
16232    {
16233        self.external_ip = std::option::Option::Some(v.into());
16234        self
16235    }
16236
16237    /// Sets or clears the value of [external_ip][crate::model::NetworkPolicy::external_ip].
16238    ///
16239    /// # Example
16240    /// ```ignore,no_run
16241    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16242    /// use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
16243    /// let x = NetworkPolicy::new().set_or_clear_external_ip(Some(NetworkService::default()/* use setters */));
16244    /// let x = NetworkPolicy::new().set_or_clear_external_ip(None::<NetworkService>);
16245    /// ```
16246    pub fn set_or_clear_external_ip<T>(mut self, v: std::option::Option<T>) -> Self
16247    where
16248        T: std::convert::Into<crate::model::network_policy::NetworkService>,
16249    {
16250        self.external_ip = v.map(|x| x.into());
16251        self
16252    }
16253
16254    /// Sets the value of [edge_services_cidr][crate::model::NetworkPolicy::edge_services_cidr].
16255    ///
16256    /// # Example
16257    /// ```ignore,no_run
16258    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16259    /// let x = NetworkPolicy::new().set_edge_services_cidr("example");
16260    /// ```
16261    pub fn set_edge_services_cidr<T: std::convert::Into<std::string::String>>(
16262        mut self,
16263        v: T,
16264    ) -> Self {
16265        self.edge_services_cidr = v.into();
16266        self
16267    }
16268
16269    /// Sets the value of [uid][crate::model::NetworkPolicy::uid].
16270    ///
16271    /// # Example
16272    /// ```ignore,no_run
16273    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16274    /// let x = NetworkPolicy::new().set_uid("example");
16275    /// ```
16276    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16277        self.uid = v.into();
16278        self
16279    }
16280
16281    /// Sets the value of [vmware_engine_network][crate::model::NetworkPolicy::vmware_engine_network].
16282    ///
16283    /// # Example
16284    /// ```ignore,no_run
16285    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16286    /// # let project_id = "project_id";
16287    /// # let location_id = "location_id";
16288    /// # let vmware_engine_network_id = "vmware_engine_network_id";
16289    /// let x = NetworkPolicy::new().set_vmware_engine_network(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"));
16290    /// ```
16291    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
16292        mut self,
16293        v: T,
16294    ) -> Self {
16295        self.vmware_engine_network = v.into();
16296        self
16297    }
16298
16299    /// Sets the value of [description][crate::model::NetworkPolicy::description].
16300    ///
16301    /// # Example
16302    /// ```ignore,no_run
16303    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16304    /// let x = NetworkPolicy::new().set_description("example");
16305    /// ```
16306    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16307        self.description = v.into();
16308        self
16309    }
16310
16311    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkPolicy::vmware_engine_network_canonical].
16312    ///
16313    /// # Example
16314    /// ```ignore,no_run
16315    /// # use google_cloud_vmwareengine_v1::model::NetworkPolicy;
16316    /// # let project_id = "project_id";
16317    /// # let location_id = "location_id";
16318    /// # let vmware_engine_network_id = "vmware_engine_network_id";
16319    /// let x = NetworkPolicy::new().set_vmware_engine_network_canonical(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"));
16320    /// ```
16321    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
16322        mut self,
16323        v: T,
16324    ) -> Self {
16325        self.vmware_engine_network_canonical = v.into();
16326        self
16327    }
16328}
16329
16330impl wkt::message::Message for NetworkPolicy {
16331    fn typename() -> &'static str {
16332        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy"
16333    }
16334}
16335
16336/// Defines additional types related to [NetworkPolicy].
16337pub mod network_policy {
16338    #[allow(unused_imports)]
16339    use super::*;
16340
16341    /// Represents a network service that is managed by a `NetworkPolicy` resource.
16342    /// A network service provides a way to control an aspect of external access to
16343    /// VMware workloads. For example, whether the VMware workloads in the
16344    /// private clouds governed by a network policy can access or be accessed from
16345    /// the internet.
16346    #[derive(Clone, Default, PartialEq)]
16347    #[non_exhaustive]
16348    pub struct NetworkService {
16349        /// True if the service is enabled; false otherwise.
16350        pub enabled: bool,
16351
16352        /// Output only. State of the service. New values may be added to this enum
16353        /// when appropriate.
16354        pub state: crate::model::network_policy::network_service::State,
16355
16356        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16357    }
16358
16359    impl NetworkService {
16360        /// Creates a new default instance.
16361        pub fn new() -> Self {
16362            std::default::Default::default()
16363        }
16364
16365        /// Sets the value of [enabled][crate::model::network_policy::NetworkService::enabled].
16366        ///
16367        /// # Example
16368        /// ```ignore,no_run
16369        /// # use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
16370        /// let x = NetworkService::new().set_enabled(true);
16371        /// ```
16372        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
16373            self.enabled = v.into();
16374            self
16375        }
16376
16377        /// Sets the value of [state][crate::model::network_policy::NetworkService::state].
16378        ///
16379        /// # Example
16380        /// ```ignore,no_run
16381        /// # use google_cloud_vmwareengine_v1::model::network_policy::NetworkService;
16382        /// use google_cloud_vmwareengine_v1::model::network_policy::network_service::State;
16383        /// let x0 = NetworkService::new().set_state(State::Unprovisioned);
16384        /// let x1 = NetworkService::new().set_state(State::Reconciling);
16385        /// let x2 = NetworkService::new().set_state(State::Active);
16386        /// ```
16387        pub fn set_state<
16388            T: std::convert::Into<crate::model::network_policy::network_service::State>,
16389        >(
16390            mut self,
16391            v: T,
16392        ) -> Self {
16393            self.state = v.into();
16394            self
16395        }
16396    }
16397
16398    impl wkt::message::Message for NetworkService {
16399        fn typename() -> &'static str {
16400            "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService"
16401        }
16402    }
16403
16404    /// Defines additional types related to [NetworkService].
16405    pub mod network_service {
16406        #[allow(unused_imports)]
16407        use super::*;
16408
16409        /// Enum State defines possible states of a network policy controlled
16410        /// service.
16411        ///
16412        /// # Working with unknown values
16413        ///
16414        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16415        /// additional enum variants at any time. Adding new variants is not considered
16416        /// a breaking change. Applications should write their code in anticipation of:
16417        ///
16418        /// - New values appearing in future releases of the client library, **and**
16419        /// - New values received dynamically, without application changes.
16420        ///
16421        /// Please consult the [Working with enums] section in the user guide for some
16422        /// guidelines.
16423        ///
16424        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
16425        #[derive(Clone, Debug, PartialEq)]
16426        #[non_exhaustive]
16427        pub enum State {
16428            /// Unspecified service state. This is the default value.
16429            Unspecified,
16430            /// Service is not provisioned.
16431            Unprovisioned,
16432            /// Service is in the process of being provisioned/deprovisioned.
16433            Reconciling,
16434            /// Service is active.
16435            Active,
16436            /// If set, the enum was initialized with an unknown value.
16437            ///
16438            /// Applications can examine the value using [State::value] or
16439            /// [State::name].
16440            UnknownValue(state::UnknownValue),
16441        }
16442
16443        #[doc(hidden)]
16444        pub mod state {
16445            #[allow(unused_imports)]
16446            use super::*;
16447            #[derive(Clone, Debug, PartialEq)]
16448            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16449        }
16450
16451        impl State {
16452            /// Gets the enum value.
16453            ///
16454            /// Returns `None` if the enum contains an unknown value deserialized from
16455            /// the string representation of enums.
16456            pub fn value(&self) -> std::option::Option<i32> {
16457                match self {
16458                    Self::Unspecified => std::option::Option::Some(0),
16459                    Self::Unprovisioned => std::option::Option::Some(1),
16460                    Self::Reconciling => std::option::Option::Some(2),
16461                    Self::Active => std::option::Option::Some(3),
16462                    Self::UnknownValue(u) => u.0.value(),
16463                }
16464            }
16465
16466            /// Gets the enum value as a string.
16467            ///
16468            /// Returns `None` if the enum contains an unknown value deserialized from
16469            /// the integer representation of enums.
16470            pub fn name(&self) -> std::option::Option<&str> {
16471                match self {
16472                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
16473                    Self::Unprovisioned => std::option::Option::Some("UNPROVISIONED"),
16474                    Self::Reconciling => std::option::Option::Some("RECONCILING"),
16475                    Self::Active => std::option::Option::Some("ACTIVE"),
16476                    Self::UnknownValue(u) => u.0.name(),
16477                }
16478            }
16479        }
16480
16481        impl std::default::Default for State {
16482            fn default() -> Self {
16483                use std::convert::From;
16484                Self::from(0)
16485            }
16486        }
16487
16488        impl std::fmt::Display for State {
16489            fn fmt(
16490                &self,
16491                f: &mut std::fmt::Formatter<'_>,
16492            ) -> std::result::Result<(), std::fmt::Error> {
16493                wkt::internal::display_enum(f, self.name(), self.value())
16494            }
16495        }
16496
16497        impl std::convert::From<i32> for State {
16498            fn from(value: i32) -> Self {
16499                match value {
16500                    0 => Self::Unspecified,
16501                    1 => Self::Unprovisioned,
16502                    2 => Self::Reconciling,
16503                    3 => Self::Active,
16504                    _ => Self::UnknownValue(state::UnknownValue(
16505                        wkt::internal::UnknownEnumValue::Integer(value),
16506                    )),
16507                }
16508            }
16509        }
16510
16511        impl std::convert::From<&str> for State {
16512            fn from(value: &str) -> Self {
16513                use std::string::ToString;
16514                match value {
16515                    "STATE_UNSPECIFIED" => Self::Unspecified,
16516                    "UNPROVISIONED" => Self::Unprovisioned,
16517                    "RECONCILING" => Self::Reconciling,
16518                    "ACTIVE" => Self::Active,
16519                    _ => Self::UnknownValue(state::UnknownValue(
16520                        wkt::internal::UnknownEnumValue::String(value.to_string()),
16521                    )),
16522                }
16523            }
16524        }
16525
16526        impl serde::ser::Serialize for State {
16527            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16528            where
16529                S: serde::Serializer,
16530            {
16531                match self {
16532                    Self::Unspecified => serializer.serialize_i32(0),
16533                    Self::Unprovisioned => serializer.serialize_i32(1),
16534                    Self::Reconciling => serializer.serialize_i32(2),
16535                    Self::Active => serializer.serialize_i32(3),
16536                    Self::UnknownValue(u) => u.0.serialize(serializer),
16537                }
16538            }
16539        }
16540
16541        impl<'de> serde::de::Deserialize<'de> for State {
16542            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16543            where
16544                D: serde::Deserializer<'de>,
16545            {
16546                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
16547                    ".google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State",
16548                ))
16549            }
16550        }
16551    }
16552}
16553
16554/// Represents a binding between a network and the management DNS zone.
16555/// A management DNS zone is the Cloud DNS cross-project binding zone that
16556/// VMware Engine creates for each private cloud. It contains FQDNs and
16557/// corresponding IP addresses for the private cloud's ESXi hosts and management
16558/// VM appliances like vCenter and NSX Manager.
16559#[derive(Clone, Default, PartialEq)]
16560#[non_exhaustive]
16561pub struct ManagementDnsZoneBinding {
16562    /// Output only. The resource name of this binding.
16563    /// Resource names are schemeless URIs that follow the conventions in
16564    /// <https://cloud.google.com/apis/design/resource_names>.
16565    /// For example:
16566    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
16567    pub name: std::string::String,
16568
16569    /// Output only. Creation time of this resource.
16570    pub create_time: std::option::Option<wkt::Timestamp>,
16571
16572    /// Output only. Last update time of this resource.
16573    pub update_time: std::option::Option<wkt::Timestamp>,
16574
16575    /// Output only. The state of the resource.
16576    pub state: crate::model::management_dns_zone_binding::State,
16577
16578    /// User-provided description for this resource.
16579    pub description: std::string::String,
16580
16581    /// Output only. System-generated unique identifier for the resource.
16582    pub uid: std::string::String,
16583
16584    /// Required. The relative resource name of the network to bind to the
16585    /// management DNS zone. This network can be a consumer VPC network or a
16586    /// VMware engine network.
16587    pub bind_network: std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
16588
16589    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
16590}
16591
16592impl ManagementDnsZoneBinding {
16593    /// Creates a new default instance.
16594    pub fn new() -> Self {
16595        std::default::Default::default()
16596    }
16597
16598    /// Sets the value of [name][crate::model::ManagementDnsZoneBinding::name].
16599    ///
16600    /// # Example
16601    /// ```ignore,no_run
16602    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16603    /// # let project_id = "project_id";
16604    /// # let location_id = "location_id";
16605    /// # let private_cloud_id = "private_cloud_id";
16606    /// # let management_dns_zone_binding_id = "management_dns_zone_binding_id";
16607    /// let x = ManagementDnsZoneBinding::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/managementDnsZoneBindings/{management_dns_zone_binding_id}"));
16608    /// ```
16609    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16610        self.name = v.into();
16611        self
16612    }
16613
16614    /// Sets the value of [create_time][crate::model::ManagementDnsZoneBinding::create_time].
16615    ///
16616    /// # Example
16617    /// ```ignore,no_run
16618    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16619    /// use wkt::Timestamp;
16620    /// let x = ManagementDnsZoneBinding::new().set_create_time(Timestamp::default()/* use setters */);
16621    /// ```
16622    pub fn set_create_time<T>(mut self, v: T) -> Self
16623    where
16624        T: std::convert::Into<wkt::Timestamp>,
16625    {
16626        self.create_time = std::option::Option::Some(v.into());
16627        self
16628    }
16629
16630    /// Sets or clears the value of [create_time][crate::model::ManagementDnsZoneBinding::create_time].
16631    ///
16632    /// # Example
16633    /// ```ignore,no_run
16634    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16635    /// use wkt::Timestamp;
16636    /// let x = ManagementDnsZoneBinding::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
16637    /// let x = ManagementDnsZoneBinding::new().set_or_clear_create_time(None::<Timestamp>);
16638    /// ```
16639    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
16640    where
16641        T: std::convert::Into<wkt::Timestamp>,
16642    {
16643        self.create_time = v.map(|x| x.into());
16644        self
16645    }
16646
16647    /// Sets the value of [update_time][crate::model::ManagementDnsZoneBinding::update_time].
16648    ///
16649    /// # Example
16650    /// ```ignore,no_run
16651    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16652    /// use wkt::Timestamp;
16653    /// let x = ManagementDnsZoneBinding::new().set_update_time(Timestamp::default()/* use setters */);
16654    /// ```
16655    pub fn set_update_time<T>(mut self, v: T) -> Self
16656    where
16657        T: std::convert::Into<wkt::Timestamp>,
16658    {
16659        self.update_time = std::option::Option::Some(v.into());
16660        self
16661    }
16662
16663    /// Sets or clears the value of [update_time][crate::model::ManagementDnsZoneBinding::update_time].
16664    ///
16665    /// # Example
16666    /// ```ignore,no_run
16667    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16668    /// use wkt::Timestamp;
16669    /// let x = ManagementDnsZoneBinding::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
16670    /// let x = ManagementDnsZoneBinding::new().set_or_clear_update_time(None::<Timestamp>);
16671    /// ```
16672    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
16673    where
16674        T: std::convert::Into<wkt::Timestamp>,
16675    {
16676        self.update_time = v.map(|x| x.into());
16677        self
16678    }
16679
16680    /// Sets the value of [state][crate::model::ManagementDnsZoneBinding::state].
16681    ///
16682    /// # Example
16683    /// ```ignore,no_run
16684    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16685    /// use google_cloud_vmwareengine_v1::model::management_dns_zone_binding::State;
16686    /// let x0 = ManagementDnsZoneBinding::new().set_state(State::Active);
16687    /// let x1 = ManagementDnsZoneBinding::new().set_state(State::Creating);
16688    /// let x2 = ManagementDnsZoneBinding::new().set_state(State::Updating);
16689    /// ```
16690    pub fn set_state<T: std::convert::Into<crate::model::management_dns_zone_binding::State>>(
16691        mut self,
16692        v: T,
16693    ) -> Self {
16694        self.state = v.into();
16695        self
16696    }
16697
16698    /// Sets the value of [description][crate::model::ManagementDnsZoneBinding::description].
16699    ///
16700    /// # Example
16701    /// ```ignore,no_run
16702    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16703    /// let x = ManagementDnsZoneBinding::new().set_description("example");
16704    /// ```
16705    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16706        self.description = v.into();
16707        self
16708    }
16709
16710    /// Sets the value of [uid][crate::model::ManagementDnsZoneBinding::uid].
16711    ///
16712    /// # Example
16713    /// ```ignore,no_run
16714    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16715    /// let x = ManagementDnsZoneBinding::new().set_uid("example");
16716    /// ```
16717    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16718        self.uid = v.into();
16719        self
16720    }
16721
16722    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network].
16723    ///
16724    /// Note that all the setters affecting `bind_network` are mutually
16725    /// exclusive.
16726    ///
16727    /// # Example
16728    /// ```ignore,no_run
16729    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16730    /// use google_cloud_vmwareengine_v1::model::management_dns_zone_binding::BindNetwork;
16731    /// let x = ManagementDnsZoneBinding::new().set_bind_network(Some(BindNetwork::VpcNetwork("example".to_string())));
16732    /// ```
16733    pub fn set_bind_network<
16734        T: std::convert::Into<
16735                std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
16736            >,
16737    >(
16738        mut self,
16739        v: T,
16740    ) -> Self {
16741        self.bind_network = v.into();
16742        self
16743    }
16744
16745    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
16746    /// if it holds a `VpcNetwork`, `None` if the field is not set or
16747    /// holds a different branch.
16748    pub fn vpc_network(&self) -> std::option::Option<&std::string::String> {
16749        #[allow(unreachable_patterns)]
16750        self.bind_network.as_ref().and_then(|v| match v {
16751            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v) => {
16752                std::option::Option::Some(v)
16753            }
16754            _ => std::option::Option::None,
16755        })
16756    }
16757
16758    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
16759    /// to hold a `VpcNetwork`.
16760    ///
16761    /// Note that all the setters affecting `bind_network` are
16762    /// mutually exclusive.
16763    ///
16764    /// # Example
16765    /// ```ignore,no_run
16766    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16767    /// let x = ManagementDnsZoneBinding::new().set_vpc_network("example");
16768    /// assert!(x.vpc_network().is_some());
16769    /// assert!(x.vmware_engine_network().is_none());
16770    /// ```
16771    pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
16772        self.bind_network = std::option::Option::Some(
16773            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v.into()),
16774        );
16775        self
16776    }
16777
16778    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
16779    /// if it holds a `VmwareEngineNetwork`, `None` if the field is not set or
16780    /// holds a different branch.
16781    pub fn vmware_engine_network(&self) -> std::option::Option<&std::string::String> {
16782        #[allow(unreachable_patterns)]
16783        self.bind_network.as_ref().and_then(|v| match v {
16784            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v) => {
16785                std::option::Option::Some(v)
16786            }
16787            _ => std::option::Option::None,
16788        })
16789    }
16790
16791    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
16792    /// to hold a `VmwareEngineNetwork`.
16793    ///
16794    /// Note that all the setters affecting `bind_network` are
16795    /// mutually exclusive.
16796    ///
16797    /// # Example
16798    /// ```ignore,no_run
16799    /// # use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
16800    /// # let project_id = "project_id";
16801    /// # let location_id = "location_id";
16802    /// # let vmware_engine_network_id = "vmware_engine_network_id";
16803    /// let x = ManagementDnsZoneBinding::new().set_vmware_engine_network(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"));
16804    /// assert!(x.vmware_engine_network().is_some());
16805    /// assert!(x.vpc_network().is_none());
16806    /// ```
16807    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
16808        mut self,
16809        v: T,
16810    ) -> Self {
16811        self.bind_network = std::option::Option::Some(
16812            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v.into()),
16813        );
16814        self
16815    }
16816}
16817
16818impl wkt::message::Message for ManagementDnsZoneBinding {
16819    fn typename() -> &'static str {
16820        "type.googleapis.com/google.cloud.vmwareengine.v1.ManagementDnsZoneBinding"
16821    }
16822}
16823
16824/// Defines additional types related to [ManagementDnsZoneBinding].
16825pub mod management_dns_zone_binding {
16826    #[allow(unused_imports)]
16827    use super::*;
16828
16829    /// Enum State defines possible states of binding between the consumer VPC
16830    /// network and the management DNS zone.
16831    ///
16832    /// # Working with unknown values
16833    ///
16834    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
16835    /// additional enum variants at any time. Adding new variants is not considered
16836    /// a breaking change. Applications should write their code in anticipation of:
16837    ///
16838    /// - New values appearing in future releases of the client library, **and**
16839    /// - New values received dynamically, without application changes.
16840    ///
16841    /// Please consult the [Working with enums] section in the user guide for some
16842    /// guidelines.
16843    ///
16844    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
16845    #[derive(Clone, Debug, PartialEq)]
16846    #[non_exhaustive]
16847    pub enum State {
16848        /// The default value. This value should never be used.
16849        Unspecified,
16850        /// The binding is ready.
16851        Active,
16852        /// The binding is being created.
16853        Creating,
16854        /// The binding is being updated.
16855        Updating,
16856        /// The binding is being deleted.
16857        Deleting,
16858        /// The binding has failed.
16859        Failed,
16860        /// If set, the enum was initialized with an unknown value.
16861        ///
16862        /// Applications can examine the value using [State::value] or
16863        /// [State::name].
16864        UnknownValue(state::UnknownValue),
16865    }
16866
16867    #[doc(hidden)]
16868    pub mod state {
16869        #[allow(unused_imports)]
16870        use super::*;
16871        #[derive(Clone, Debug, PartialEq)]
16872        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
16873    }
16874
16875    impl State {
16876        /// Gets the enum value.
16877        ///
16878        /// Returns `None` if the enum contains an unknown value deserialized from
16879        /// the string representation of enums.
16880        pub fn value(&self) -> std::option::Option<i32> {
16881            match self {
16882                Self::Unspecified => std::option::Option::Some(0),
16883                Self::Active => std::option::Option::Some(1),
16884                Self::Creating => std::option::Option::Some(2),
16885                Self::Updating => std::option::Option::Some(3),
16886                Self::Deleting => std::option::Option::Some(4),
16887                Self::Failed => std::option::Option::Some(5),
16888                Self::UnknownValue(u) => u.0.value(),
16889            }
16890        }
16891
16892        /// Gets the enum value as a string.
16893        ///
16894        /// Returns `None` if the enum contains an unknown value deserialized from
16895        /// the integer representation of enums.
16896        pub fn name(&self) -> std::option::Option<&str> {
16897            match self {
16898                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
16899                Self::Active => std::option::Option::Some("ACTIVE"),
16900                Self::Creating => std::option::Option::Some("CREATING"),
16901                Self::Updating => std::option::Option::Some("UPDATING"),
16902                Self::Deleting => std::option::Option::Some("DELETING"),
16903                Self::Failed => std::option::Option::Some("FAILED"),
16904                Self::UnknownValue(u) => u.0.name(),
16905            }
16906        }
16907    }
16908
16909    impl std::default::Default for State {
16910        fn default() -> Self {
16911            use std::convert::From;
16912            Self::from(0)
16913        }
16914    }
16915
16916    impl std::fmt::Display for State {
16917        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
16918            wkt::internal::display_enum(f, self.name(), self.value())
16919        }
16920    }
16921
16922    impl std::convert::From<i32> for State {
16923        fn from(value: i32) -> Self {
16924            match value {
16925                0 => Self::Unspecified,
16926                1 => Self::Active,
16927                2 => Self::Creating,
16928                3 => Self::Updating,
16929                4 => Self::Deleting,
16930                5 => Self::Failed,
16931                _ => Self::UnknownValue(state::UnknownValue(
16932                    wkt::internal::UnknownEnumValue::Integer(value),
16933                )),
16934            }
16935        }
16936    }
16937
16938    impl std::convert::From<&str> for State {
16939        fn from(value: &str) -> Self {
16940            use std::string::ToString;
16941            match value {
16942                "STATE_UNSPECIFIED" => Self::Unspecified,
16943                "ACTIVE" => Self::Active,
16944                "CREATING" => Self::Creating,
16945                "UPDATING" => Self::Updating,
16946                "DELETING" => Self::Deleting,
16947                "FAILED" => Self::Failed,
16948                _ => Self::UnknownValue(state::UnknownValue(
16949                    wkt::internal::UnknownEnumValue::String(value.to_string()),
16950                )),
16951            }
16952        }
16953    }
16954
16955    impl serde::ser::Serialize for State {
16956        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
16957        where
16958            S: serde::Serializer,
16959        {
16960            match self {
16961                Self::Unspecified => serializer.serialize_i32(0),
16962                Self::Active => serializer.serialize_i32(1),
16963                Self::Creating => serializer.serialize_i32(2),
16964                Self::Updating => serializer.serialize_i32(3),
16965                Self::Deleting => serializer.serialize_i32(4),
16966                Self::Failed => serializer.serialize_i32(5),
16967                Self::UnknownValue(u) => u.0.serialize(serializer),
16968            }
16969        }
16970    }
16971
16972    impl<'de> serde::de::Deserialize<'de> for State {
16973        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
16974        where
16975            D: serde::Deserializer<'de>,
16976        {
16977            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
16978                ".google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State",
16979            ))
16980        }
16981    }
16982
16983    /// Required. The relative resource name of the network to bind to the
16984    /// management DNS zone. This network can be a consumer VPC network or a
16985    /// VMware engine network.
16986    #[derive(Clone, Debug, PartialEq)]
16987    #[non_exhaustive]
16988    pub enum BindNetwork {
16989        /// Network to bind is a standard consumer VPC.
16990        /// Specify the name in the following form for consumer
16991        /// VPC network: `projects/{project}/global/networks/{network_id}`.
16992        /// `{project}` can either be a project number or a project ID.
16993        VpcNetwork(std::string::String),
16994        /// Network to bind is a VMware Engine network.
16995        /// Specify the name in the following form for VMware engine network:
16996        /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
16997        /// `{project}` can either be a project number or a project ID.
16998        VmwareEngineNetwork(std::string::String),
16999    }
17000}
17001
17002/// VMware Engine network resource that provides connectivity for VMware Engine
17003/// private clouds.
17004#[derive(Clone, Default, PartialEq)]
17005#[non_exhaustive]
17006pub struct VmwareEngineNetwork {
17007    /// Output only. The resource name of the VMware Engine network.
17008    /// Resource names are schemeless URIs that follow the conventions in
17009    /// <https://cloud.google.com/apis/design/resource_names>.
17010    /// For example:
17011    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
17012    pub name: std::string::String,
17013
17014    /// Output only. Creation time of this resource.
17015    pub create_time: std::option::Option<wkt::Timestamp>,
17016
17017    /// Output only. Last update time of this resource.
17018    pub update_time: std::option::Option<wkt::Timestamp>,
17019
17020    /// User-provided description for this VMware Engine network.
17021    pub description: std::string::String,
17022
17023    /// Output only. VMware Engine service VPC networks that provide connectivity
17024    /// from a private cloud to customer projects, the internet, and other Google
17025    /// Cloud services.
17026    pub vpc_networks: std::vec::Vec<crate::model::vmware_engine_network::VpcNetwork>,
17027
17028    /// Output only. State of the VMware Engine network.
17029    pub state: crate::model::vmware_engine_network::State,
17030
17031    /// Required. VMware Engine network type.
17032    pub r#type: crate::model::vmware_engine_network::Type,
17033
17034    /// Output only. System-generated unique identifier for the resource.
17035    pub uid: std::string::String,
17036
17037    /// Checksum that may be sent on update and delete requests to ensure that the
17038    /// user-provided value is up to date before the server processes a request.
17039    /// The server computes checksums based on the value of other fields in the
17040    /// request.
17041    pub etag: std::string::String,
17042
17043    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17044}
17045
17046impl VmwareEngineNetwork {
17047    /// Creates a new default instance.
17048    pub fn new() -> Self {
17049        std::default::Default::default()
17050    }
17051
17052    /// Sets the value of [name][crate::model::VmwareEngineNetwork::name].
17053    ///
17054    /// # Example
17055    /// ```ignore,no_run
17056    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
17057    /// # let project_id = "project_id";
17058    /// # let location_id = "location_id";
17059    /// # let vmware_engine_network_id = "vmware_engine_network_id";
17060    /// let x = VmwareEngineNetwork::new().set_name(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"));
17061    /// ```
17062    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17063        self.name = v.into();
17064        self
17065    }
17066
17067    /// Sets the value of [create_time][crate::model::VmwareEngineNetwork::create_time].
17068    ///
17069    /// # Example
17070    /// ```ignore,no_run
17071    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
17072    /// use wkt::Timestamp;
17073    /// let x = VmwareEngineNetwork::new().set_create_time(Timestamp::default()/* use setters */);
17074    /// ```
17075    pub fn set_create_time<T>(mut self, v: T) -> Self
17076    where
17077        T: std::convert::Into<wkt::Timestamp>,
17078    {
17079        self.create_time = std::option::Option::Some(v.into());
17080        self
17081    }
17082
17083    /// Sets or clears the value of [create_time][crate::model::VmwareEngineNetwork::create_time].
17084    ///
17085    /// # Example
17086    /// ```ignore,no_run
17087    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
17088    /// use wkt::Timestamp;
17089    /// let x = VmwareEngineNetwork::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
17090    /// let x = VmwareEngineNetwork::new().set_or_clear_create_time(None::<Timestamp>);
17091    /// ```
17092    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17093    where
17094        T: std::convert::Into<wkt::Timestamp>,
17095    {
17096        self.create_time = v.map(|x| x.into());
17097        self
17098    }
17099
17100    /// Sets the value of [update_time][crate::model::VmwareEngineNetwork::update_time].
17101    ///
17102    /// # Example
17103    /// ```ignore,no_run
17104    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
17105    /// use wkt::Timestamp;
17106    /// let x = VmwareEngineNetwork::new().set_update_time(Timestamp::default()/* use setters */);
17107    /// ```
17108    pub fn set_update_time<T>(mut self, v: T) -> Self
17109    where
17110        T: std::convert::Into<wkt::Timestamp>,
17111    {
17112        self.update_time = std::option::Option::Some(v.into());
17113        self
17114    }
17115
17116    /// Sets or clears the value of [update_time][crate::model::VmwareEngineNetwork::update_time].
17117    ///
17118    /// # Example
17119    /// ```ignore,no_run
17120    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
17121    /// use wkt::Timestamp;
17122    /// let x = VmwareEngineNetwork::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
17123    /// let x = VmwareEngineNetwork::new().set_or_clear_update_time(None::<Timestamp>);
17124    /// ```
17125    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
17126    where
17127        T: std::convert::Into<wkt::Timestamp>,
17128    {
17129        self.update_time = v.map(|x| x.into());
17130        self
17131    }
17132
17133    /// Sets the value of [description][crate::model::VmwareEngineNetwork::description].
17134    ///
17135    /// # Example
17136    /// ```ignore,no_run
17137    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
17138    /// let x = VmwareEngineNetwork::new().set_description("example");
17139    /// ```
17140    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17141        self.description = v.into();
17142        self
17143    }
17144
17145    /// Sets the value of [vpc_networks][crate::model::VmwareEngineNetwork::vpc_networks].
17146    ///
17147    /// # Example
17148    /// ```ignore,no_run
17149    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
17150    /// use google_cloud_vmwareengine_v1::model::vmware_engine_network::VpcNetwork;
17151    /// let x = VmwareEngineNetwork::new()
17152    ///     .set_vpc_networks([
17153    ///         VpcNetwork::default()/* use setters */,
17154    ///         VpcNetwork::default()/* use (different) setters */,
17155    ///     ]);
17156    /// ```
17157    pub fn set_vpc_networks<T, V>(mut self, v: T) -> Self
17158    where
17159        T: std::iter::IntoIterator<Item = V>,
17160        V: std::convert::Into<crate::model::vmware_engine_network::VpcNetwork>,
17161    {
17162        use std::iter::Iterator;
17163        self.vpc_networks = v.into_iter().map(|i| i.into()).collect();
17164        self
17165    }
17166
17167    /// Sets the value of [state][crate::model::VmwareEngineNetwork::state].
17168    ///
17169    /// # Example
17170    /// ```ignore,no_run
17171    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
17172    /// use google_cloud_vmwareengine_v1::model::vmware_engine_network::State;
17173    /// let x0 = VmwareEngineNetwork::new().set_state(State::Creating);
17174    /// let x1 = VmwareEngineNetwork::new().set_state(State::Active);
17175    /// let x2 = VmwareEngineNetwork::new().set_state(State::Updating);
17176    /// ```
17177    pub fn set_state<T: std::convert::Into<crate::model::vmware_engine_network::State>>(
17178        mut self,
17179        v: T,
17180    ) -> Self {
17181        self.state = v.into();
17182        self
17183    }
17184
17185    /// Sets the value of [r#type][crate::model::VmwareEngineNetwork::type].
17186    ///
17187    /// # Example
17188    /// ```ignore,no_run
17189    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
17190    /// use google_cloud_vmwareengine_v1::model::vmware_engine_network::Type;
17191    /// let x0 = VmwareEngineNetwork::new().set_type(Type::Legacy);
17192    /// let x1 = VmwareEngineNetwork::new().set_type(Type::Standard);
17193    /// ```
17194    pub fn set_type<T: std::convert::Into<crate::model::vmware_engine_network::Type>>(
17195        mut self,
17196        v: T,
17197    ) -> Self {
17198        self.r#type = v.into();
17199        self
17200    }
17201
17202    /// Sets the value of [uid][crate::model::VmwareEngineNetwork::uid].
17203    ///
17204    /// # Example
17205    /// ```ignore,no_run
17206    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
17207    /// let x = VmwareEngineNetwork::new().set_uid("example");
17208    /// ```
17209    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17210        self.uid = v.into();
17211        self
17212    }
17213
17214    /// Sets the value of [etag][crate::model::VmwareEngineNetwork::etag].
17215    ///
17216    /// # Example
17217    /// ```ignore,no_run
17218    /// # use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
17219    /// let x = VmwareEngineNetwork::new().set_etag("example");
17220    /// ```
17221    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17222        self.etag = v.into();
17223        self
17224    }
17225}
17226
17227impl wkt::message::Message for VmwareEngineNetwork {
17228    fn typename() -> &'static str {
17229        "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork"
17230    }
17231}
17232
17233/// Defines additional types related to [VmwareEngineNetwork].
17234pub mod vmware_engine_network {
17235    #[allow(unused_imports)]
17236    use super::*;
17237
17238    /// Represents a VMware Engine VPC network that is managed by a
17239    /// VMware Engine network resource.
17240    #[derive(Clone, Default, PartialEq)]
17241    #[non_exhaustive]
17242    pub struct VpcNetwork {
17243        /// Output only. Type of VPC network (INTRANET, INTERNET, or
17244        /// GOOGLE_CLOUD)
17245        pub r#type: crate::model::vmware_engine_network::vpc_network::Type,
17246
17247        /// Output only. The relative resource name of the service VPC network this
17248        /// VMware Engine network is attached to. For example:
17249        /// `projects/123123/global/networks/my-network`
17250        pub network: std::string::String,
17251
17252        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17253    }
17254
17255    impl VpcNetwork {
17256        /// Creates a new default instance.
17257        pub fn new() -> Self {
17258            std::default::Default::default()
17259        }
17260
17261        /// Sets the value of [r#type][crate::model::vmware_engine_network::VpcNetwork::type].
17262        ///
17263        /// # Example
17264        /// ```ignore,no_run
17265        /// # use google_cloud_vmwareengine_v1::model::vmware_engine_network::VpcNetwork;
17266        /// use google_cloud_vmwareengine_v1::model::vmware_engine_network::vpc_network::Type;
17267        /// let x0 = VpcNetwork::new().set_type(Type::Intranet);
17268        /// let x1 = VpcNetwork::new().set_type(Type::Internet);
17269        /// let x2 = VpcNetwork::new().set_type(Type::GoogleCloud);
17270        /// ```
17271        pub fn set_type<
17272            T: std::convert::Into<crate::model::vmware_engine_network::vpc_network::Type>,
17273        >(
17274            mut self,
17275            v: T,
17276        ) -> Self {
17277            self.r#type = v.into();
17278            self
17279        }
17280
17281        /// Sets the value of [network][crate::model::vmware_engine_network::VpcNetwork::network].
17282        ///
17283        /// # Example
17284        /// ```ignore,no_run
17285        /// # use google_cloud_vmwareengine_v1::model::vmware_engine_network::VpcNetwork;
17286        /// let x = VpcNetwork::new().set_network("example");
17287        /// ```
17288        pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17289            self.network = v.into();
17290            self
17291        }
17292    }
17293
17294    impl wkt::message::Message for VpcNetwork {
17295        fn typename() -> &'static str {
17296            "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork"
17297        }
17298    }
17299
17300    /// Defines additional types related to [VpcNetwork].
17301    pub mod vpc_network {
17302        #[allow(unused_imports)]
17303        use super::*;
17304
17305        /// Enum Type defines possible types of a VMware Engine network controlled
17306        /// service.
17307        ///
17308        /// # Working with unknown values
17309        ///
17310        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17311        /// additional enum variants at any time. Adding new variants is not considered
17312        /// a breaking change. Applications should write their code in anticipation of:
17313        ///
17314        /// - New values appearing in future releases of the client library, **and**
17315        /// - New values received dynamically, without application changes.
17316        ///
17317        /// Please consult the [Working with enums] section in the user guide for some
17318        /// guidelines.
17319        ///
17320        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17321        #[derive(Clone, Debug, PartialEq)]
17322        #[non_exhaustive]
17323        pub enum Type {
17324            /// The default value. This value should never be used.
17325            Unspecified,
17326            /// VPC network that will be peered with a consumer VPC network or the
17327            /// intranet VPC of another VMware Engine network. Access a private cloud
17328            /// through Compute Engine VMs on a peered VPC network or an on-premises
17329            /// resource connected to a peered consumer VPC network.
17330            Intranet,
17331            /// VPC network used for internet access to and from a private cloud.
17332            Internet,
17333            /// VPC network used for access to Google Cloud services like
17334            /// Cloud Storage.
17335            GoogleCloud,
17336            /// If set, the enum was initialized with an unknown value.
17337            ///
17338            /// Applications can examine the value using [Type::value] or
17339            /// [Type::name].
17340            UnknownValue(r#type::UnknownValue),
17341        }
17342
17343        #[doc(hidden)]
17344        pub mod r#type {
17345            #[allow(unused_imports)]
17346            use super::*;
17347            #[derive(Clone, Debug, PartialEq)]
17348            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17349        }
17350
17351        impl Type {
17352            /// Gets the enum value.
17353            ///
17354            /// Returns `None` if the enum contains an unknown value deserialized from
17355            /// the string representation of enums.
17356            pub fn value(&self) -> std::option::Option<i32> {
17357                match self {
17358                    Self::Unspecified => std::option::Option::Some(0),
17359                    Self::Intranet => std::option::Option::Some(1),
17360                    Self::Internet => std::option::Option::Some(2),
17361                    Self::GoogleCloud => std::option::Option::Some(3),
17362                    Self::UnknownValue(u) => u.0.value(),
17363                }
17364            }
17365
17366            /// Gets the enum value as a string.
17367            ///
17368            /// Returns `None` if the enum contains an unknown value deserialized from
17369            /// the integer representation of enums.
17370            pub fn name(&self) -> std::option::Option<&str> {
17371                match self {
17372                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
17373                    Self::Intranet => std::option::Option::Some("INTRANET"),
17374                    Self::Internet => std::option::Option::Some("INTERNET"),
17375                    Self::GoogleCloud => std::option::Option::Some("GOOGLE_CLOUD"),
17376                    Self::UnknownValue(u) => u.0.name(),
17377                }
17378            }
17379        }
17380
17381        impl std::default::Default for Type {
17382            fn default() -> Self {
17383                use std::convert::From;
17384                Self::from(0)
17385            }
17386        }
17387
17388        impl std::fmt::Display for Type {
17389            fn fmt(
17390                &self,
17391                f: &mut std::fmt::Formatter<'_>,
17392            ) -> std::result::Result<(), std::fmt::Error> {
17393                wkt::internal::display_enum(f, self.name(), self.value())
17394            }
17395        }
17396
17397        impl std::convert::From<i32> for Type {
17398            fn from(value: i32) -> Self {
17399                match value {
17400                    0 => Self::Unspecified,
17401                    1 => Self::Intranet,
17402                    2 => Self::Internet,
17403                    3 => Self::GoogleCloud,
17404                    _ => Self::UnknownValue(r#type::UnknownValue(
17405                        wkt::internal::UnknownEnumValue::Integer(value),
17406                    )),
17407                }
17408            }
17409        }
17410
17411        impl std::convert::From<&str> for Type {
17412            fn from(value: &str) -> Self {
17413                use std::string::ToString;
17414                match value {
17415                    "TYPE_UNSPECIFIED" => Self::Unspecified,
17416                    "INTRANET" => Self::Intranet,
17417                    "INTERNET" => Self::Internet,
17418                    "GOOGLE_CLOUD" => Self::GoogleCloud,
17419                    _ => Self::UnknownValue(r#type::UnknownValue(
17420                        wkt::internal::UnknownEnumValue::String(value.to_string()),
17421                    )),
17422                }
17423            }
17424        }
17425
17426        impl serde::ser::Serialize for Type {
17427            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17428            where
17429                S: serde::Serializer,
17430            {
17431                match self {
17432                    Self::Unspecified => serializer.serialize_i32(0),
17433                    Self::Intranet => serializer.serialize_i32(1),
17434                    Self::Internet => serializer.serialize_i32(2),
17435                    Self::GoogleCloud => serializer.serialize_i32(3),
17436                    Self::UnknownValue(u) => u.0.serialize(serializer),
17437                }
17438            }
17439        }
17440
17441        impl<'de> serde::de::Deserialize<'de> for Type {
17442            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17443            where
17444                D: serde::Deserializer<'de>,
17445            {
17446                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
17447                    ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type",
17448                ))
17449            }
17450        }
17451    }
17452
17453    /// Enum State defines possible states of VMware Engine network.
17454    ///
17455    /// # Working with unknown values
17456    ///
17457    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17458    /// additional enum variants at any time. Adding new variants is not considered
17459    /// a breaking change. Applications should write their code in anticipation of:
17460    ///
17461    /// - New values appearing in future releases of the client library, **and**
17462    /// - New values received dynamically, without application changes.
17463    ///
17464    /// Please consult the [Working with enums] section in the user guide for some
17465    /// guidelines.
17466    ///
17467    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17468    #[derive(Clone, Debug, PartialEq)]
17469    #[non_exhaustive]
17470    pub enum State {
17471        /// The default value. This value is used if the state is omitted.
17472        Unspecified,
17473        /// The VMware Engine network is being created.
17474        Creating,
17475        /// The VMware Engine network is ready.
17476        Active,
17477        /// The VMware Engine network is being updated.
17478        Updating,
17479        /// The VMware Engine network is being deleted.
17480        Deleting,
17481        /// If set, the enum was initialized with an unknown value.
17482        ///
17483        /// Applications can examine the value using [State::value] or
17484        /// [State::name].
17485        UnknownValue(state::UnknownValue),
17486    }
17487
17488    #[doc(hidden)]
17489    pub mod state {
17490        #[allow(unused_imports)]
17491        use super::*;
17492        #[derive(Clone, Debug, PartialEq)]
17493        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17494    }
17495
17496    impl State {
17497        /// Gets the enum value.
17498        ///
17499        /// Returns `None` if the enum contains an unknown value deserialized from
17500        /// the string representation of enums.
17501        pub fn value(&self) -> std::option::Option<i32> {
17502            match self {
17503                Self::Unspecified => std::option::Option::Some(0),
17504                Self::Creating => std::option::Option::Some(1),
17505                Self::Active => std::option::Option::Some(2),
17506                Self::Updating => std::option::Option::Some(3),
17507                Self::Deleting => std::option::Option::Some(4),
17508                Self::UnknownValue(u) => u.0.value(),
17509            }
17510        }
17511
17512        /// Gets the enum value as a string.
17513        ///
17514        /// Returns `None` if the enum contains an unknown value deserialized from
17515        /// the integer representation of enums.
17516        pub fn name(&self) -> std::option::Option<&str> {
17517            match self {
17518                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
17519                Self::Creating => std::option::Option::Some("CREATING"),
17520                Self::Active => std::option::Option::Some("ACTIVE"),
17521                Self::Updating => std::option::Option::Some("UPDATING"),
17522                Self::Deleting => std::option::Option::Some("DELETING"),
17523                Self::UnknownValue(u) => u.0.name(),
17524            }
17525        }
17526    }
17527
17528    impl std::default::Default for State {
17529        fn default() -> Self {
17530            use std::convert::From;
17531            Self::from(0)
17532        }
17533    }
17534
17535    impl std::fmt::Display for State {
17536        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17537            wkt::internal::display_enum(f, self.name(), self.value())
17538        }
17539    }
17540
17541    impl std::convert::From<i32> for State {
17542        fn from(value: i32) -> Self {
17543            match value {
17544                0 => Self::Unspecified,
17545                1 => Self::Creating,
17546                2 => Self::Active,
17547                3 => Self::Updating,
17548                4 => Self::Deleting,
17549                _ => Self::UnknownValue(state::UnknownValue(
17550                    wkt::internal::UnknownEnumValue::Integer(value),
17551                )),
17552            }
17553        }
17554    }
17555
17556    impl std::convert::From<&str> for State {
17557        fn from(value: &str) -> Self {
17558            use std::string::ToString;
17559            match value {
17560                "STATE_UNSPECIFIED" => Self::Unspecified,
17561                "CREATING" => Self::Creating,
17562                "ACTIVE" => Self::Active,
17563                "UPDATING" => Self::Updating,
17564                "DELETING" => Self::Deleting,
17565                _ => Self::UnknownValue(state::UnknownValue(
17566                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17567                )),
17568            }
17569        }
17570    }
17571
17572    impl serde::ser::Serialize for State {
17573        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17574        where
17575            S: serde::Serializer,
17576        {
17577            match self {
17578                Self::Unspecified => serializer.serialize_i32(0),
17579                Self::Creating => serializer.serialize_i32(1),
17580                Self::Active => serializer.serialize_i32(2),
17581                Self::Updating => serializer.serialize_i32(3),
17582                Self::Deleting => serializer.serialize_i32(4),
17583                Self::UnknownValue(u) => u.0.serialize(serializer),
17584            }
17585        }
17586    }
17587
17588    impl<'de> serde::de::Deserialize<'de> for State {
17589        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17590        where
17591            D: serde::Deserializer<'de>,
17592        {
17593            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
17594                ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.State",
17595            ))
17596        }
17597    }
17598
17599    /// Enum Type defines possible types of VMware Engine network.
17600    ///
17601    /// # Working with unknown values
17602    ///
17603    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
17604    /// additional enum variants at any time. Adding new variants is not considered
17605    /// a breaking change. Applications should write their code in anticipation of:
17606    ///
17607    /// - New values appearing in future releases of the client library, **and**
17608    /// - New values received dynamically, without application changes.
17609    ///
17610    /// Please consult the [Working with enums] section in the user guide for some
17611    /// guidelines.
17612    ///
17613    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
17614    #[derive(Clone, Debug, PartialEq)]
17615    #[non_exhaustive]
17616    pub enum Type {
17617        /// The default value. This value should never be used.
17618        Unspecified,
17619        /// Network type used by private clouds created in projects without a network
17620        /// of type `STANDARD`. This network type is no longer used for new VMware
17621        /// Engine private cloud deployments.
17622        Legacy,
17623        /// Standard network type used for private cloud connectivity.
17624        Standard,
17625        /// If set, the enum was initialized with an unknown value.
17626        ///
17627        /// Applications can examine the value using [Type::value] or
17628        /// [Type::name].
17629        UnknownValue(r#type::UnknownValue),
17630    }
17631
17632    #[doc(hidden)]
17633    pub mod r#type {
17634        #[allow(unused_imports)]
17635        use super::*;
17636        #[derive(Clone, Debug, PartialEq)]
17637        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
17638    }
17639
17640    impl Type {
17641        /// Gets the enum value.
17642        ///
17643        /// Returns `None` if the enum contains an unknown value deserialized from
17644        /// the string representation of enums.
17645        pub fn value(&self) -> std::option::Option<i32> {
17646            match self {
17647                Self::Unspecified => std::option::Option::Some(0),
17648                Self::Legacy => std::option::Option::Some(1),
17649                Self::Standard => std::option::Option::Some(2),
17650                Self::UnknownValue(u) => u.0.value(),
17651            }
17652        }
17653
17654        /// Gets the enum value as a string.
17655        ///
17656        /// Returns `None` if the enum contains an unknown value deserialized from
17657        /// the integer representation of enums.
17658        pub fn name(&self) -> std::option::Option<&str> {
17659            match self {
17660                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
17661                Self::Legacy => std::option::Option::Some("LEGACY"),
17662                Self::Standard => std::option::Option::Some("STANDARD"),
17663                Self::UnknownValue(u) => u.0.name(),
17664            }
17665        }
17666    }
17667
17668    impl std::default::Default for Type {
17669        fn default() -> Self {
17670            use std::convert::From;
17671            Self::from(0)
17672        }
17673    }
17674
17675    impl std::fmt::Display for Type {
17676        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
17677            wkt::internal::display_enum(f, self.name(), self.value())
17678        }
17679    }
17680
17681    impl std::convert::From<i32> for Type {
17682        fn from(value: i32) -> Self {
17683            match value {
17684                0 => Self::Unspecified,
17685                1 => Self::Legacy,
17686                2 => Self::Standard,
17687                _ => Self::UnknownValue(r#type::UnknownValue(
17688                    wkt::internal::UnknownEnumValue::Integer(value),
17689                )),
17690            }
17691        }
17692    }
17693
17694    impl std::convert::From<&str> for Type {
17695        fn from(value: &str) -> Self {
17696            use std::string::ToString;
17697            match value {
17698                "TYPE_UNSPECIFIED" => Self::Unspecified,
17699                "LEGACY" => Self::Legacy,
17700                "STANDARD" => Self::Standard,
17701                _ => Self::UnknownValue(r#type::UnknownValue(
17702                    wkt::internal::UnknownEnumValue::String(value.to_string()),
17703                )),
17704            }
17705        }
17706    }
17707
17708    impl serde::ser::Serialize for Type {
17709        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
17710        where
17711            S: serde::Serializer,
17712        {
17713            match self {
17714                Self::Unspecified => serializer.serialize_i32(0),
17715                Self::Legacy => serializer.serialize_i32(1),
17716                Self::Standard => serializer.serialize_i32(2),
17717                Self::UnknownValue(u) => u.0.serialize(serializer),
17718            }
17719        }
17720    }
17721
17722    impl<'de> serde::de::Deserialize<'de> for Type {
17723        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
17724        where
17725            D: serde::Deserializer<'de>,
17726        {
17727            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
17728                ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type",
17729            ))
17730        }
17731    }
17732}
17733
17734/// Private connection resource that provides connectivity for VMware Engine
17735/// private clouds.
17736#[derive(Clone, Default, PartialEq)]
17737#[non_exhaustive]
17738pub struct PrivateConnection {
17739    /// Output only. The resource name of the private connection.
17740    /// Resource names are schemeless URIs that follow the conventions in
17741    /// <https://cloud.google.com/apis/design/resource_names>.
17742    /// For example:
17743    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
17744    pub name: std::string::String,
17745
17746    /// Output only. Creation time of this resource.
17747    pub create_time: std::option::Option<wkt::Timestamp>,
17748
17749    /// Output only. Last update time of this resource.
17750    pub update_time: std::option::Option<wkt::Timestamp>,
17751
17752    /// Optional. User-provided description for this private connection.
17753    pub description: std::string::String,
17754
17755    /// Output only. State of the private connection.
17756    pub state: crate::model::private_connection::State,
17757
17758    /// Required. The relative resource name of Legacy VMware Engine network.
17759    /// Specify the name in the following form:
17760    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
17761    /// where `{project}`, `{location}` will be same as specified in private
17762    /// connection resource name and `{vmware_engine_network_id}` will be in the
17763    /// form of `{location}`-default e.g.
17764    /// projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default.
17765    pub vmware_engine_network: std::string::String,
17766
17767    /// Output only. The canonical name of the VMware Engine network in the form:
17768    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
17769    pub vmware_engine_network_canonical: std::string::String,
17770
17771    /// Required. Private connection type.
17772    pub r#type: crate::model::private_connection::Type,
17773
17774    /// Output only. VPC network peering id between given network VPC and
17775    /// VMwareEngineNetwork.
17776    pub peering_id: std::string::String,
17777
17778    /// Optional. Routing Mode.
17779    /// Default value is set to GLOBAL.
17780    /// For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or
17781    /// REGIONAL, for other types only GLOBAL is supported.
17782    pub routing_mode: crate::model::private_connection::RoutingMode,
17783
17784    /// Output only. System-generated unique identifier for the resource.
17785    pub uid: std::string::String,
17786
17787    /// Required. Service network to create private connection.
17788    /// Specify the name in the following form:
17789    /// `projects/{project}/global/networks/{network_id}`
17790    /// For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking
17791    /// VPC, e.g. projects/project-tp/global/networks/servicenetworking.
17792    /// For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC,
17793    /// e.g. projects/project-tp/global/networks/netapp-tenant-vpc.
17794    /// For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g.
17795    /// projects/project-tp/global/networks/dell-tenant-vpc.
17796    /// For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or
17797    /// any other producer VPC to which the VMware Engine Network needs to be
17798    /// connected, e.g. projects/project/global/networks/vpc.
17799    pub service_network: std::string::String,
17800
17801    /// Output only. Peering state between service network and VMware Engine
17802    /// network.
17803    pub peering_state: crate::model::private_connection::PeeringState,
17804
17805    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
17806}
17807
17808impl PrivateConnection {
17809    /// Creates a new default instance.
17810    pub fn new() -> Self {
17811        std::default::Default::default()
17812    }
17813
17814    /// Sets the value of [name][crate::model::PrivateConnection::name].
17815    ///
17816    /// # Example
17817    /// ```ignore,no_run
17818    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17819    /// # let project_id = "project_id";
17820    /// # let location_id = "location_id";
17821    /// # let private_connection_id = "private_connection_id";
17822    /// let x = PrivateConnection::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateConnections/{private_connection_id}"));
17823    /// ```
17824    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17825        self.name = v.into();
17826        self
17827    }
17828
17829    /// Sets the value of [create_time][crate::model::PrivateConnection::create_time].
17830    ///
17831    /// # Example
17832    /// ```ignore,no_run
17833    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17834    /// use wkt::Timestamp;
17835    /// let x = PrivateConnection::new().set_create_time(Timestamp::default()/* use setters */);
17836    /// ```
17837    pub fn set_create_time<T>(mut self, v: T) -> Self
17838    where
17839        T: std::convert::Into<wkt::Timestamp>,
17840    {
17841        self.create_time = std::option::Option::Some(v.into());
17842        self
17843    }
17844
17845    /// Sets or clears the value of [create_time][crate::model::PrivateConnection::create_time].
17846    ///
17847    /// # Example
17848    /// ```ignore,no_run
17849    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17850    /// use wkt::Timestamp;
17851    /// let x = PrivateConnection::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
17852    /// let x = PrivateConnection::new().set_or_clear_create_time(None::<Timestamp>);
17853    /// ```
17854    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
17855    where
17856        T: std::convert::Into<wkt::Timestamp>,
17857    {
17858        self.create_time = v.map(|x| x.into());
17859        self
17860    }
17861
17862    /// Sets the value of [update_time][crate::model::PrivateConnection::update_time].
17863    ///
17864    /// # Example
17865    /// ```ignore,no_run
17866    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17867    /// use wkt::Timestamp;
17868    /// let x = PrivateConnection::new().set_update_time(Timestamp::default()/* use setters */);
17869    /// ```
17870    pub fn set_update_time<T>(mut self, v: T) -> Self
17871    where
17872        T: std::convert::Into<wkt::Timestamp>,
17873    {
17874        self.update_time = std::option::Option::Some(v.into());
17875        self
17876    }
17877
17878    /// Sets or clears the value of [update_time][crate::model::PrivateConnection::update_time].
17879    ///
17880    /// # Example
17881    /// ```ignore,no_run
17882    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17883    /// use wkt::Timestamp;
17884    /// let x = PrivateConnection::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
17885    /// let x = PrivateConnection::new().set_or_clear_update_time(None::<Timestamp>);
17886    /// ```
17887    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
17888    where
17889        T: std::convert::Into<wkt::Timestamp>,
17890    {
17891        self.update_time = v.map(|x| x.into());
17892        self
17893    }
17894
17895    /// Sets the value of [description][crate::model::PrivateConnection::description].
17896    ///
17897    /// # Example
17898    /// ```ignore,no_run
17899    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17900    /// let x = PrivateConnection::new().set_description("example");
17901    /// ```
17902    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17903        self.description = v.into();
17904        self
17905    }
17906
17907    /// Sets the value of [state][crate::model::PrivateConnection::state].
17908    ///
17909    /// # Example
17910    /// ```ignore,no_run
17911    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17912    /// use google_cloud_vmwareengine_v1::model::private_connection::State;
17913    /// let x0 = PrivateConnection::new().set_state(State::Creating);
17914    /// let x1 = PrivateConnection::new().set_state(State::Active);
17915    /// let x2 = PrivateConnection::new().set_state(State::Updating);
17916    /// ```
17917    pub fn set_state<T: std::convert::Into<crate::model::private_connection::State>>(
17918        mut self,
17919        v: T,
17920    ) -> Self {
17921        self.state = v.into();
17922        self
17923    }
17924
17925    /// Sets the value of [vmware_engine_network][crate::model::PrivateConnection::vmware_engine_network].
17926    ///
17927    /// # Example
17928    /// ```ignore,no_run
17929    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17930    /// # let project_id = "project_id";
17931    /// # let location_id = "location_id";
17932    /// # let vmware_engine_network_id = "vmware_engine_network_id";
17933    /// let x = PrivateConnection::new().set_vmware_engine_network(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"));
17934    /// ```
17935    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
17936        mut self,
17937        v: T,
17938    ) -> Self {
17939        self.vmware_engine_network = v.into();
17940        self
17941    }
17942
17943    /// Sets the value of [vmware_engine_network_canonical][crate::model::PrivateConnection::vmware_engine_network_canonical].
17944    ///
17945    /// # Example
17946    /// ```ignore,no_run
17947    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17948    /// # let project_id = "project_id";
17949    /// # let location_id = "location_id";
17950    /// # let vmware_engine_network_id = "vmware_engine_network_id";
17951    /// let x = PrivateConnection::new().set_vmware_engine_network_canonical(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"));
17952    /// ```
17953    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
17954        mut self,
17955        v: T,
17956    ) -> Self {
17957        self.vmware_engine_network_canonical = v.into();
17958        self
17959    }
17960
17961    /// Sets the value of [r#type][crate::model::PrivateConnection::type].
17962    ///
17963    /// # Example
17964    /// ```ignore,no_run
17965    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17966    /// use google_cloud_vmwareengine_v1::model::private_connection::Type;
17967    /// let x0 = PrivateConnection::new().set_type(Type::PrivateServiceAccess);
17968    /// let x1 = PrivateConnection::new().set_type(Type::NetappCloudVolumes);
17969    /// let x2 = PrivateConnection::new().set_type(Type::DellPowerscale);
17970    /// ```
17971    pub fn set_type<T: std::convert::Into<crate::model::private_connection::Type>>(
17972        mut self,
17973        v: T,
17974    ) -> Self {
17975        self.r#type = v.into();
17976        self
17977    }
17978
17979    /// Sets the value of [peering_id][crate::model::PrivateConnection::peering_id].
17980    ///
17981    /// # Example
17982    /// ```ignore,no_run
17983    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17984    /// let x = PrivateConnection::new().set_peering_id("example");
17985    /// ```
17986    pub fn set_peering_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
17987        self.peering_id = v.into();
17988        self
17989    }
17990
17991    /// Sets the value of [routing_mode][crate::model::PrivateConnection::routing_mode].
17992    ///
17993    /// # Example
17994    /// ```ignore,no_run
17995    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
17996    /// use google_cloud_vmwareengine_v1::model::private_connection::RoutingMode;
17997    /// let x0 = PrivateConnection::new().set_routing_mode(RoutingMode::Global);
17998    /// let x1 = PrivateConnection::new().set_routing_mode(RoutingMode::Regional);
17999    /// ```
18000    pub fn set_routing_mode<
18001        T: std::convert::Into<crate::model::private_connection::RoutingMode>,
18002    >(
18003        mut self,
18004        v: T,
18005    ) -> Self {
18006        self.routing_mode = v.into();
18007        self
18008    }
18009
18010    /// Sets the value of [uid][crate::model::PrivateConnection::uid].
18011    ///
18012    /// # Example
18013    /// ```ignore,no_run
18014    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
18015    /// let x = PrivateConnection::new().set_uid("example");
18016    /// ```
18017    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18018        self.uid = v.into();
18019        self
18020    }
18021
18022    /// Sets the value of [service_network][crate::model::PrivateConnection::service_network].
18023    ///
18024    /// # Example
18025    /// ```ignore,no_run
18026    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
18027    /// let x = PrivateConnection::new().set_service_network("example");
18028    /// ```
18029    pub fn set_service_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18030        self.service_network = v.into();
18031        self
18032    }
18033
18034    /// Sets the value of [peering_state][crate::model::PrivateConnection::peering_state].
18035    ///
18036    /// # Example
18037    /// ```ignore,no_run
18038    /// # use google_cloud_vmwareengine_v1::model::PrivateConnection;
18039    /// use google_cloud_vmwareengine_v1::model::private_connection::PeeringState;
18040    /// let x0 = PrivateConnection::new().set_peering_state(PeeringState::PeeringActive);
18041    /// let x1 = PrivateConnection::new().set_peering_state(PeeringState::PeeringInactive);
18042    /// ```
18043    pub fn set_peering_state<
18044        T: std::convert::Into<crate::model::private_connection::PeeringState>,
18045    >(
18046        mut self,
18047        v: T,
18048    ) -> Self {
18049        self.peering_state = v.into();
18050        self
18051    }
18052}
18053
18054impl wkt::message::Message for PrivateConnection {
18055    fn typename() -> &'static str {
18056        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateConnection"
18057    }
18058}
18059
18060/// Defines additional types related to [PrivateConnection].
18061pub mod private_connection {
18062    #[allow(unused_imports)]
18063    use super::*;
18064
18065    /// Enum State defines possible states of private connection.
18066    ///
18067    /// # Working with unknown values
18068    ///
18069    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18070    /// additional enum variants at any time. Adding new variants is not considered
18071    /// a breaking change. Applications should write their code in anticipation of:
18072    ///
18073    /// - New values appearing in future releases of the client library, **and**
18074    /// - New values received dynamically, without application changes.
18075    ///
18076    /// Please consult the [Working with enums] section in the user guide for some
18077    /// guidelines.
18078    ///
18079    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18080    #[derive(Clone, Debug, PartialEq)]
18081    #[non_exhaustive]
18082    pub enum State {
18083        /// The default value. This value is used if the state is omitted.
18084        Unspecified,
18085        /// The private connection is being created.
18086        Creating,
18087        /// The private connection is ready.
18088        Active,
18089        /// The private connection is being updated.
18090        Updating,
18091        /// The private connection is being deleted.
18092        Deleting,
18093        /// The private connection is not provisioned, since no private cloud is
18094        /// present for which this private connection is needed.
18095        Unprovisioned,
18096        /// The private connection is in failed state.
18097        Failed,
18098        /// If set, the enum was initialized with an unknown value.
18099        ///
18100        /// Applications can examine the value using [State::value] or
18101        /// [State::name].
18102        UnknownValue(state::UnknownValue),
18103    }
18104
18105    #[doc(hidden)]
18106    pub mod state {
18107        #[allow(unused_imports)]
18108        use super::*;
18109        #[derive(Clone, Debug, PartialEq)]
18110        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18111    }
18112
18113    impl State {
18114        /// Gets the enum value.
18115        ///
18116        /// Returns `None` if the enum contains an unknown value deserialized from
18117        /// the string representation of enums.
18118        pub fn value(&self) -> std::option::Option<i32> {
18119            match self {
18120                Self::Unspecified => std::option::Option::Some(0),
18121                Self::Creating => std::option::Option::Some(1),
18122                Self::Active => std::option::Option::Some(2),
18123                Self::Updating => std::option::Option::Some(3),
18124                Self::Deleting => std::option::Option::Some(4),
18125                Self::Unprovisioned => std::option::Option::Some(5),
18126                Self::Failed => std::option::Option::Some(6),
18127                Self::UnknownValue(u) => u.0.value(),
18128            }
18129        }
18130
18131        /// Gets the enum value as a string.
18132        ///
18133        /// Returns `None` if the enum contains an unknown value deserialized from
18134        /// the integer representation of enums.
18135        pub fn name(&self) -> std::option::Option<&str> {
18136            match self {
18137                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
18138                Self::Creating => std::option::Option::Some("CREATING"),
18139                Self::Active => std::option::Option::Some("ACTIVE"),
18140                Self::Updating => std::option::Option::Some("UPDATING"),
18141                Self::Deleting => std::option::Option::Some("DELETING"),
18142                Self::Unprovisioned => std::option::Option::Some("UNPROVISIONED"),
18143                Self::Failed => std::option::Option::Some("FAILED"),
18144                Self::UnknownValue(u) => u.0.name(),
18145            }
18146        }
18147    }
18148
18149    impl std::default::Default for State {
18150        fn default() -> Self {
18151            use std::convert::From;
18152            Self::from(0)
18153        }
18154    }
18155
18156    impl std::fmt::Display for State {
18157        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18158            wkt::internal::display_enum(f, self.name(), self.value())
18159        }
18160    }
18161
18162    impl std::convert::From<i32> for State {
18163        fn from(value: i32) -> Self {
18164            match value {
18165                0 => Self::Unspecified,
18166                1 => Self::Creating,
18167                2 => Self::Active,
18168                3 => Self::Updating,
18169                4 => Self::Deleting,
18170                5 => Self::Unprovisioned,
18171                6 => Self::Failed,
18172                _ => Self::UnknownValue(state::UnknownValue(
18173                    wkt::internal::UnknownEnumValue::Integer(value),
18174                )),
18175            }
18176        }
18177    }
18178
18179    impl std::convert::From<&str> for State {
18180        fn from(value: &str) -> Self {
18181            use std::string::ToString;
18182            match value {
18183                "STATE_UNSPECIFIED" => Self::Unspecified,
18184                "CREATING" => Self::Creating,
18185                "ACTIVE" => Self::Active,
18186                "UPDATING" => Self::Updating,
18187                "DELETING" => Self::Deleting,
18188                "UNPROVISIONED" => Self::Unprovisioned,
18189                "FAILED" => Self::Failed,
18190                _ => Self::UnknownValue(state::UnknownValue(
18191                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18192                )),
18193            }
18194        }
18195    }
18196
18197    impl serde::ser::Serialize for State {
18198        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18199        where
18200            S: serde::Serializer,
18201        {
18202            match self {
18203                Self::Unspecified => serializer.serialize_i32(0),
18204                Self::Creating => serializer.serialize_i32(1),
18205                Self::Active => serializer.serialize_i32(2),
18206                Self::Updating => serializer.serialize_i32(3),
18207                Self::Deleting => serializer.serialize_i32(4),
18208                Self::Unprovisioned => serializer.serialize_i32(5),
18209                Self::Failed => serializer.serialize_i32(6),
18210                Self::UnknownValue(u) => u.0.serialize(serializer),
18211            }
18212        }
18213    }
18214
18215    impl<'de> serde::de::Deserialize<'de> for State {
18216        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18217        where
18218            D: serde::Deserializer<'de>,
18219        {
18220            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
18221                ".google.cloud.vmwareengine.v1.PrivateConnection.State",
18222            ))
18223        }
18224    }
18225
18226    /// Enum Type defines possible types of private connection.
18227    ///
18228    /// # Working with unknown values
18229    ///
18230    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18231    /// additional enum variants at any time. Adding new variants is not considered
18232    /// a breaking change. Applications should write their code in anticipation of:
18233    ///
18234    /// - New values appearing in future releases of the client library, **and**
18235    /// - New values received dynamically, without application changes.
18236    ///
18237    /// Please consult the [Working with enums] section in the user guide for some
18238    /// guidelines.
18239    ///
18240    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18241    #[derive(Clone, Debug, PartialEq)]
18242    #[non_exhaustive]
18243    pub enum Type {
18244        /// The default value. This value should never be used.
18245        Unspecified,
18246        /// Connection used for establishing [private services
18247        /// access](https://cloud.google.com/vpc/docs/private-services-access).
18248        PrivateServiceAccess,
18249        /// Connection used for connecting to NetApp Cloud Volumes.
18250        NetappCloudVolumes,
18251        /// Connection used for connecting to Dell PowerScale.
18252        DellPowerscale,
18253        /// Connection used for connecting to third-party services.
18254        ThirdPartyService,
18255        /// If set, the enum was initialized with an unknown value.
18256        ///
18257        /// Applications can examine the value using [Type::value] or
18258        /// [Type::name].
18259        UnknownValue(r#type::UnknownValue),
18260    }
18261
18262    #[doc(hidden)]
18263    pub mod r#type {
18264        #[allow(unused_imports)]
18265        use super::*;
18266        #[derive(Clone, Debug, PartialEq)]
18267        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18268    }
18269
18270    impl Type {
18271        /// Gets the enum value.
18272        ///
18273        /// Returns `None` if the enum contains an unknown value deserialized from
18274        /// the string representation of enums.
18275        pub fn value(&self) -> std::option::Option<i32> {
18276            match self {
18277                Self::Unspecified => std::option::Option::Some(0),
18278                Self::PrivateServiceAccess => std::option::Option::Some(1),
18279                Self::NetappCloudVolumes => std::option::Option::Some(2),
18280                Self::DellPowerscale => std::option::Option::Some(3),
18281                Self::ThirdPartyService => std::option::Option::Some(4),
18282                Self::UnknownValue(u) => u.0.value(),
18283            }
18284        }
18285
18286        /// Gets the enum value as a string.
18287        ///
18288        /// Returns `None` if the enum contains an unknown value deserialized from
18289        /// the integer representation of enums.
18290        pub fn name(&self) -> std::option::Option<&str> {
18291            match self {
18292                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
18293                Self::PrivateServiceAccess => std::option::Option::Some("PRIVATE_SERVICE_ACCESS"),
18294                Self::NetappCloudVolumes => std::option::Option::Some("NETAPP_CLOUD_VOLUMES"),
18295                Self::DellPowerscale => std::option::Option::Some("DELL_POWERSCALE"),
18296                Self::ThirdPartyService => std::option::Option::Some("THIRD_PARTY_SERVICE"),
18297                Self::UnknownValue(u) => u.0.name(),
18298            }
18299        }
18300    }
18301
18302    impl std::default::Default for Type {
18303        fn default() -> Self {
18304            use std::convert::From;
18305            Self::from(0)
18306        }
18307    }
18308
18309    impl std::fmt::Display for Type {
18310        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18311            wkt::internal::display_enum(f, self.name(), self.value())
18312        }
18313    }
18314
18315    impl std::convert::From<i32> for Type {
18316        fn from(value: i32) -> Self {
18317            match value {
18318                0 => Self::Unspecified,
18319                1 => Self::PrivateServiceAccess,
18320                2 => Self::NetappCloudVolumes,
18321                3 => Self::DellPowerscale,
18322                4 => Self::ThirdPartyService,
18323                _ => Self::UnknownValue(r#type::UnknownValue(
18324                    wkt::internal::UnknownEnumValue::Integer(value),
18325                )),
18326            }
18327        }
18328    }
18329
18330    impl std::convert::From<&str> for Type {
18331        fn from(value: &str) -> Self {
18332            use std::string::ToString;
18333            match value {
18334                "TYPE_UNSPECIFIED" => Self::Unspecified,
18335                "PRIVATE_SERVICE_ACCESS" => Self::PrivateServiceAccess,
18336                "NETAPP_CLOUD_VOLUMES" => Self::NetappCloudVolumes,
18337                "DELL_POWERSCALE" => Self::DellPowerscale,
18338                "THIRD_PARTY_SERVICE" => Self::ThirdPartyService,
18339                _ => Self::UnknownValue(r#type::UnknownValue(
18340                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18341                )),
18342            }
18343        }
18344    }
18345
18346    impl serde::ser::Serialize for Type {
18347        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18348        where
18349            S: serde::Serializer,
18350        {
18351            match self {
18352                Self::Unspecified => serializer.serialize_i32(0),
18353                Self::PrivateServiceAccess => serializer.serialize_i32(1),
18354                Self::NetappCloudVolumes => serializer.serialize_i32(2),
18355                Self::DellPowerscale => serializer.serialize_i32(3),
18356                Self::ThirdPartyService => serializer.serialize_i32(4),
18357                Self::UnknownValue(u) => u.0.serialize(serializer),
18358            }
18359        }
18360    }
18361
18362    impl<'de> serde::de::Deserialize<'de> for Type {
18363        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18364        where
18365            D: serde::Deserializer<'de>,
18366        {
18367            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
18368                ".google.cloud.vmwareengine.v1.PrivateConnection.Type",
18369            ))
18370        }
18371    }
18372
18373    /// Possible types for RoutingMode
18374    ///
18375    /// # Working with unknown values
18376    ///
18377    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18378    /// additional enum variants at any time. Adding new variants is not considered
18379    /// a breaking change. Applications should write their code in anticipation of:
18380    ///
18381    /// - New values appearing in future releases of the client library, **and**
18382    /// - New values received dynamically, without application changes.
18383    ///
18384    /// Please consult the [Working with enums] section in the user guide for some
18385    /// guidelines.
18386    ///
18387    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18388    #[derive(Clone, Debug, PartialEq)]
18389    #[non_exhaustive]
18390    pub enum RoutingMode {
18391        /// The default value. This value should never be used.
18392        Unspecified,
18393        /// Global Routing Mode
18394        Global,
18395        /// Regional Routing Mode
18396        Regional,
18397        /// If set, the enum was initialized with an unknown value.
18398        ///
18399        /// Applications can examine the value using [RoutingMode::value] or
18400        /// [RoutingMode::name].
18401        UnknownValue(routing_mode::UnknownValue),
18402    }
18403
18404    #[doc(hidden)]
18405    pub mod routing_mode {
18406        #[allow(unused_imports)]
18407        use super::*;
18408        #[derive(Clone, Debug, PartialEq)]
18409        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18410    }
18411
18412    impl RoutingMode {
18413        /// Gets the enum value.
18414        ///
18415        /// Returns `None` if the enum contains an unknown value deserialized from
18416        /// the string representation of enums.
18417        pub fn value(&self) -> std::option::Option<i32> {
18418            match self {
18419                Self::Unspecified => std::option::Option::Some(0),
18420                Self::Global => std::option::Option::Some(1),
18421                Self::Regional => std::option::Option::Some(2),
18422                Self::UnknownValue(u) => u.0.value(),
18423            }
18424        }
18425
18426        /// Gets the enum value as a string.
18427        ///
18428        /// Returns `None` if the enum contains an unknown value deserialized from
18429        /// the integer representation of enums.
18430        pub fn name(&self) -> std::option::Option<&str> {
18431            match self {
18432                Self::Unspecified => std::option::Option::Some("ROUTING_MODE_UNSPECIFIED"),
18433                Self::Global => std::option::Option::Some("GLOBAL"),
18434                Self::Regional => std::option::Option::Some("REGIONAL"),
18435                Self::UnknownValue(u) => u.0.name(),
18436            }
18437        }
18438    }
18439
18440    impl std::default::Default for RoutingMode {
18441        fn default() -> Self {
18442            use std::convert::From;
18443            Self::from(0)
18444        }
18445    }
18446
18447    impl std::fmt::Display for RoutingMode {
18448        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18449            wkt::internal::display_enum(f, self.name(), self.value())
18450        }
18451    }
18452
18453    impl std::convert::From<i32> for RoutingMode {
18454        fn from(value: i32) -> Self {
18455            match value {
18456                0 => Self::Unspecified,
18457                1 => Self::Global,
18458                2 => Self::Regional,
18459                _ => Self::UnknownValue(routing_mode::UnknownValue(
18460                    wkt::internal::UnknownEnumValue::Integer(value),
18461                )),
18462            }
18463        }
18464    }
18465
18466    impl std::convert::From<&str> for RoutingMode {
18467        fn from(value: &str) -> Self {
18468            use std::string::ToString;
18469            match value {
18470                "ROUTING_MODE_UNSPECIFIED" => Self::Unspecified,
18471                "GLOBAL" => Self::Global,
18472                "REGIONAL" => Self::Regional,
18473                _ => Self::UnknownValue(routing_mode::UnknownValue(
18474                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18475                )),
18476            }
18477        }
18478    }
18479
18480    impl serde::ser::Serialize for RoutingMode {
18481        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18482        where
18483            S: serde::Serializer,
18484        {
18485            match self {
18486                Self::Unspecified => serializer.serialize_i32(0),
18487                Self::Global => serializer.serialize_i32(1),
18488                Self::Regional => serializer.serialize_i32(2),
18489                Self::UnknownValue(u) => u.0.serialize(serializer),
18490            }
18491        }
18492    }
18493
18494    impl<'de> serde::de::Deserialize<'de> for RoutingMode {
18495        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18496        where
18497            D: serde::Deserializer<'de>,
18498        {
18499            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RoutingMode>::new(
18500                ".google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode",
18501            ))
18502        }
18503    }
18504
18505    /// Enum PeeringState defines the possible states of peering between service
18506    /// network and the vpc network peered to service network
18507    ///
18508    /// # Working with unknown values
18509    ///
18510    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18511    /// additional enum variants at any time. Adding new variants is not considered
18512    /// a breaking change. Applications should write their code in anticipation of:
18513    ///
18514    /// - New values appearing in future releases of the client library, **and**
18515    /// - New values received dynamically, without application changes.
18516    ///
18517    /// Please consult the [Working with enums] section in the user guide for some
18518    /// guidelines.
18519    ///
18520    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18521    #[derive(Clone, Debug, PartialEq)]
18522    #[non_exhaustive]
18523    pub enum PeeringState {
18524        /// The default value. This value is used if the peering state is omitted or
18525        /// unknown.
18526        Unspecified,
18527        /// The peering is in active state.
18528        PeeringActive,
18529        /// The peering is in inactive state.
18530        PeeringInactive,
18531        /// If set, the enum was initialized with an unknown value.
18532        ///
18533        /// Applications can examine the value using [PeeringState::value] or
18534        /// [PeeringState::name].
18535        UnknownValue(peering_state::UnknownValue),
18536    }
18537
18538    #[doc(hidden)]
18539    pub mod peering_state {
18540        #[allow(unused_imports)]
18541        use super::*;
18542        #[derive(Clone, Debug, PartialEq)]
18543        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18544    }
18545
18546    impl PeeringState {
18547        /// Gets the enum value.
18548        ///
18549        /// Returns `None` if the enum contains an unknown value deserialized from
18550        /// the string representation of enums.
18551        pub fn value(&self) -> std::option::Option<i32> {
18552            match self {
18553                Self::Unspecified => std::option::Option::Some(0),
18554                Self::PeeringActive => std::option::Option::Some(1),
18555                Self::PeeringInactive => std::option::Option::Some(2),
18556                Self::UnknownValue(u) => u.0.value(),
18557            }
18558        }
18559
18560        /// Gets the enum value as a string.
18561        ///
18562        /// Returns `None` if the enum contains an unknown value deserialized from
18563        /// the integer representation of enums.
18564        pub fn name(&self) -> std::option::Option<&str> {
18565            match self {
18566                Self::Unspecified => std::option::Option::Some("PEERING_STATE_UNSPECIFIED"),
18567                Self::PeeringActive => std::option::Option::Some("PEERING_ACTIVE"),
18568                Self::PeeringInactive => std::option::Option::Some("PEERING_INACTIVE"),
18569                Self::UnknownValue(u) => u.0.name(),
18570            }
18571        }
18572    }
18573
18574    impl std::default::Default for PeeringState {
18575        fn default() -> Self {
18576            use std::convert::From;
18577            Self::from(0)
18578        }
18579    }
18580
18581    impl std::fmt::Display for PeeringState {
18582        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18583            wkt::internal::display_enum(f, self.name(), self.value())
18584        }
18585    }
18586
18587    impl std::convert::From<i32> for PeeringState {
18588        fn from(value: i32) -> Self {
18589            match value {
18590                0 => Self::Unspecified,
18591                1 => Self::PeeringActive,
18592                2 => Self::PeeringInactive,
18593                _ => Self::UnknownValue(peering_state::UnknownValue(
18594                    wkt::internal::UnknownEnumValue::Integer(value),
18595                )),
18596            }
18597        }
18598    }
18599
18600    impl std::convert::From<&str> for PeeringState {
18601        fn from(value: &str) -> Self {
18602            use std::string::ToString;
18603            match value {
18604                "PEERING_STATE_UNSPECIFIED" => Self::Unspecified,
18605                "PEERING_ACTIVE" => Self::PeeringActive,
18606                "PEERING_INACTIVE" => Self::PeeringInactive,
18607                _ => Self::UnknownValue(peering_state::UnknownValue(
18608                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18609                )),
18610            }
18611        }
18612    }
18613
18614    impl serde::ser::Serialize for PeeringState {
18615        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18616        where
18617            S: serde::Serializer,
18618        {
18619            match self {
18620                Self::Unspecified => serializer.serialize_i32(0),
18621                Self::PeeringActive => serializer.serialize_i32(1),
18622                Self::PeeringInactive => serializer.serialize_i32(2),
18623                Self::UnknownValue(u) => u.0.serialize(serializer),
18624            }
18625        }
18626    }
18627
18628    impl<'de> serde::de::Deserialize<'de> for PeeringState {
18629        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18630        where
18631            D: serde::Deserializer<'de>,
18632        {
18633            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PeeringState>::new(
18634                ".google.cloud.vmwareengine.v1.PrivateConnection.PeeringState",
18635            ))
18636        }
18637    }
18638}
18639
18640/// VmwareEngine specific metadata for the given
18641/// [google.cloud.location.Location][google.cloud.location.Location]. It is
18642/// returned as a content of the `google.cloud.location.Location.metadata` field.
18643///
18644/// [google.cloud.location.Location]: google_cloud_location::model::Location
18645#[derive(Clone, Default, PartialEq)]
18646#[non_exhaustive]
18647pub struct LocationMetadata {
18648    /// Output only. Capabilities of this location.
18649    pub capabilities: std::vec::Vec<crate::model::location_metadata::Capability>,
18650
18651    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18652}
18653
18654impl LocationMetadata {
18655    /// Creates a new default instance.
18656    pub fn new() -> Self {
18657        std::default::Default::default()
18658    }
18659
18660    /// Sets the value of [capabilities][crate::model::LocationMetadata::capabilities].
18661    ///
18662    /// # Example
18663    /// ```ignore,no_run
18664    /// # use google_cloud_vmwareengine_v1::model::LocationMetadata;
18665    /// use google_cloud_vmwareengine_v1::model::location_metadata::Capability;
18666    /// let x = LocationMetadata::new().set_capabilities([
18667    ///     Capability::StretchedClusters,
18668    /// ]);
18669    /// ```
18670    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
18671    where
18672        T: std::iter::IntoIterator<Item = V>,
18673        V: std::convert::Into<crate::model::location_metadata::Capability>,
18674    {
18675        use std::iter::Iterator;
18676        self.capabilities = v.into_iter().map(|i| i.into()).collect();
18677        self
18678    }
18679}
18680
18681impl wkt::message::Message for LocationMetadata {
18682    fn typename() -> &'static str {
18683        "type.googleapis.com/google.cloud.vmwareengine.v1.LocationMetadata"
18684    }
18685}
18686
18687/// Defines additional types related to [LocationMetadata].
18688pub mod location_metadata {
18689    #[allow(unused_imports)]
18690    use super::*;
18691
18692    /// Capability of a location.
18693    ///
18694    /// # Working with unknown values
18695    ///
18696    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
18697    /// additional enum variants at any time. Adding new variants is not considered
18698    /// a breaking change. Applications should write their code in anticipation of:
18699    ///
18700    /// - New values appearing in future releases of the client library, **and**
18701    /// - New values received dynamically, without application changes.
18702    ///
18703    /// Please consult the [Working with enums] section in the user guide for some
18704    /// guidelines.
18705    ///
18706    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
18707    #[derive(Clone, Debug, PartialEq)]
18708    #[non_exhaustive]
18709    pub enum Capability {
18710        /// The default value. This value is used if the capability is omitted or
18711        /// unknown.
18712        Unspecified,
18713        /// Stretch clusters are supported in this location.
18714        StretchedClusters,
18715        /// If set, the enum was initialized with an unknown value.
18716        ///
18717        /// Applications can examine the value using [Capability::value] or
18718        /// [Capability::name].
18719        UnknownValue(capability::UnknownValue),
18720    }
18721
18722    #[doc(hidden)]
18723    pub mod capability {
18724        #[allow(unused_imports)]
18725        use super::*;
18726        #[derive(Clone, Debug, PartialEq)]
18727        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
18728    }
18729
18730    impl Capability {
18731        /// Gets the enum value.
18732        ///
18733        /// Returns `None` if the enum contains an unknown value deserialized from
18734        /// the string representation of enums.
18735        pub fn value(&self) -> std::option::Option<i32> {
18736            match self {
18737                Self::Unspecified => std::option::Option::Some(0),
18738                Self::StretchedClusters => std::option::Option::Some(1),
18739                Self::UnknownValue(u) => u.0.value(),
18740            }
18741        }
18742
18743        /// Gets the enum value as a string.
18744        ///
18745        /// Returns `None` if the enum contains an unknown value deserialized from
18746        /// the integer representation of enums.
18747        pub fn name(&self) -> std::option::Option<&str> {
18748            match self {
18749                Self::Unspecified => std::option::Option::Some("CAPABILITY_UNSPECIFIED"),
18750                Self::StretchedClusters => std::option::Option::Some("STRETCHED_CLUSTERS"),
18751                Self::UnknownValue(u) => u.0.name(),
18752            }
18753        }
18754    }
18755
18756    impl std::default::Default for Capability {
18757        fn default() -> Self {
18758            use std::convert::From;
18759            Self::from(0)
18760        }
18761    }
18762
18763    impl std::fmt::Display for Capability {
18764        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
18765            wkt::internal::display_enum(f, self.name(), self.value())
18766        }
18767    }
18768
18769    impl std::convert::From<i32> for Capability {
18770        fn from(value: i32) -> Self {
18771            match value {
18772                0 => Self::Unspecified,
18773                1 => Self::StretchedClusters,
18774                _ => Self::UnknownValue(capability::UnknownValue(
18775                    wkt::internal::UnknownEnumValue::Integer(value),
18776                )),
18777            }
18778        }
18779    }
18780
18781    impl std::convert::From<&str> for Capability {
18782        fn from(value: &str) -> Self {
18783            use std::string::ToString;
18784            match value {
18785                "CAPABILITY_UNSPECIFIED" => Self::Unspecified,
18786                "STRETCHED_CLUSTERS" => Self::StretchedClusters,
18787                _ => Self::UnknownValue(capability::UnknownValue(
18788                    wkt::internal::UnknownEnumValue::String(value.to_string()),
18789                )),
18790            }
18791        }
18792    }
18793
18794    impl serde::ser::Serialize for Capability {
18795        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
18796        where
18797            S: serde::Serializer,
18798        {
18799            match self {
18800                Self::Unspecified => serializer.serialize_i32(0),
18801                Self::StretchedClusters => serializer.serialize_i32(1),
18802                Self::UnknownValue(u) => u.0.serialize(serializer),
18803            }
18804        }
18805    }
18806
18807    impl<'de> serde::de::Deserialize<'de> for Capability {
18808        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
18809        where
18810            D: serde::Deserializer<'de>,
18811        {
18812            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Capability>::new(
18813                ".google.cloud.vmwareengine.v1.LocationMetadata.Capability",
18814            ))
18815        }
18816    }
18817}
18818
18819/// DnsBindPermission resource that contains the accounts having the consumer DNS
18820/// bind permission on the corresponding intranet VPC of the consumer project.
18821#[derive(Clone, Default, PartialEq)]
18822#[non_exhaustive]
18823pub struct DnsBindPermission {
18824    /// Required. Output only. The name of the resource which stores the
18825    /// users/service accounts having the permission to bind to the corresponding
18826    /// intranet VPC of the consumer project. DnsBindPermission is a global
18827    /// resource and location can only be global. Resource names are schemeless
18828    /// URIs that follow the conventions in
18829    /// <https://cloud.google.com/apis/design/resource_names>. For example:
18830    /// `projects/my-project/locations/global/dnsBindPermission`
18831    pub name: std::string::String,
18832
18833    /// Output only. Users/Service accounts which have access for binding on the
18834    /// intranet VPC project corresponding to the consumer project.
18835    pub principals: std::vec::Vec<crate::model::Principal>,
18836
18837    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18838}
18839
18840impl DnsBindPermission {
18841    /// Creates a new default instance.
18842    pub fn new() -> Self {
18843        std::default::Default::default()
18844    }
18845
18846    /// Sets the value of [name][crate::model::DnsBindPermission::name].
18847    ///
18848    /// # Example
18849    /// ```ignore,no_run
18850    /// # use google_cloud_vmwareengine_v1::model::DnsBindPermission;
18851    /// # let project_id = "project_id";
18852    /// # let location_id = "location_id";
18853    /// let x = DnsBindPermission::new().set_name(format!("projects/{project_id}/locations/{location_id}/dnsBindPermission"));
18854    /// ```
18855    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18856        self.name = v.into();
18857        self
18858    }
18859
18860    /// Sets the value of [principals][crate::model::DnsBindPermission::principals].
18861    ///
18862    /// # Example
18863    /// ```ignore,no_run
18864    /// # use google_cloud_vmwareengine_v1::model::DnsBindPermission;
18865    /// use google_cloud_vmwareengine_v1::model::Principal;
18866    /// let x = DnsBindPermission::new()
18867    ///     .set_principals([
18868    ///         Principal::default()/* use setters */,
18869    ///         Principal::default()/* use (different) setters */,
18870    ///     ]);
18871    /// ```
18872    pub fn set_principals<T, V>(mut self, v: T) -> Self
18873    where
18874        T: std::iter::IntoIterator<Item = V>,
18875        V: std::convert::Into<crate::model::Principal>,
18876    {
18877        use std::iter::Iterator;
18878        self.principals = v.into_iter().map(|i| i.into()).collect();
18879        self
18880    }
18881}
18882
18883impl wkt::message::Message for DnsBindPermission {
18884    fn typename() -> &'static str {
18885        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsBindPermission"
18886    }
18887}
18888
18889/// Users/Service accounts which have access for DNS binding on the intranet
18890/// VPC corresponding to the consumer project.
18891#[derive(Clone, Default, PartialEq)]
18892#[non_exhaustive]
18893pub struct Principal {
18894    /// The consumer provided user/service account which needs to be
18895    /// granted permission to DNS bind with the intranet VPC corresponding to the
18896    /// consumer project.
18897    pub principal: std::option::Option<crate::model::principal::Principal>,
18898
18899    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
18900}
18901
18902impl Principal {
18903    /// Creates a new default instance.
18904    pub fn new() -> Self {
18905        std::default::Default::default()
18906    }
18907
18908    /// Sets the value of [principal][crate::model::Principal::principal].
18909    ///
18910    /// Note that all the setters affecting `principal` are mutually
18911    /// exclusive.
18912    ///
18913    /// # Example
18914    /// ```ignore,no_run
18915    /// # use google_cloud_vmwareengine_v1::model::Principal;
18916    /// use google_cloud_vmwareengine_v1::model::principal::Principal as PrincipalOneOf;
18917    /// let x = Principal::new().set_principal(Some(PrincipalOneOf::User("example".to_string())));
18918    /// ```
18919    pub fn set_principal<
18920        T: std::convert::Into<std::option::Option<crate::model::principal::Principal>>,
18921    >(
18922        mut self,
18923        v: T,
18924    ) -> Self {
18925        self.principal = v.into();
18926        self
18927    }
18928
18929    /// The value of [principal][crate::model::Principal::principal]
18930    /// if it holds a `User`, `None` if the field is not set or
18931    /// holds a different branch.
18932    pub fn user(&self) -> std::option::Option<&std::string::String> {
18933        #[allow(unreachable_patterns)]
18934        self.principal.as_ref().and_then(|v| match v {
18935            crate::model::principal::Principal::User(v) => std::option::Option::Some(v),
18936            _ => std::option::Option::None,
18937        })
18938    }
18939
18940    /// Sets the value of [principal][crate::model::Principal::principal]
18941    /// to hold a `User`.
18942    ///
18943    /// Note that all the setters affecting `principal` are
18944    /// mutually exclusive.
18945    ///
18946    /// # Example
18947    /// ```ignore,no_run
18948    /// # use google_cloud_vmwareengine_v1::model::Principal;
18949    /// let x = Principal::new().set_user("example");
18950    /// assert!(x.user().is_some());
18951    /// assert!(x.service_account().is_none());
18952    /// ```
18953    pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18954        self.principal =
18955            std::option::Option::Some(crate::model::principal::Principal::User(v.into()));
18956        self
18957    }
18958
18959    /// The value of [principal][crate::model::Principal::principal]
18960    /// if it holds a `ServiceAccount`, `None` if the field is not set or
18961    /// holds a different branch.
18962    pub fn service_account(&self) -> std::option::Option<&std::string::String> {
18963        #[allow(unreachable_patterns)]
18964        self.principal.as_ref().and_then(|v| match v {
18965            crate::model::principal::Principal::ServiceAccount(v) => std::option::Option::Some(v),
18966            _ => std::option::Option::None,
18967        })
18968    }
18969
18970    /// Sets the value of [principal][crate::model::Principal::principal]
18971    /// to hold a `ServiceAccount`.
18972    ///
18973    /// Note that all the setters affecting `principal` are
18974    /// mutually exclusive.
18975    ///
18976    /// # Example
18977    /// ```ignore,no_run
18978    /// # use google_cloud_vmwareengine_v1::model::Principal;
18979    /// let x = Principal::new().set_service_account("example");
18980    /// assert!(x.service_account().is_some());
18981    /// assert!(x.user().is_none());
18982    /// ```
18983    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
18984        self.principal =
18985            std::option::Option::Some(crate::model::principal::Principal::ServiceAccount(v.into()));
18986        self
18987    }
18988}
18989
18990impl wkt::message::Message for Principal {
18991    fn typename() -> &'static str {
18992        "type.googleapis.com/google.cloud.vmwareengine.v1.Principal"
18993    }
18994}
18995
18996/// Defines additional types related to [Principal].
18997pub mod principal {
18998    #[allow(unused_imports)]
18999    use super::*;
19000
19001    /// The consumer provided user/service account which needs to be
19002    /// granted permission to DNS bind with the intranet VPC corresponding to the
19003    /// consumer project.
19004    #[derive(Clone, Debug, PartialEq)]
19005    #[non_exhaustive]
19006    pub enum Principal {
19007        /// The user who needs to be granted permission.
19008        User(std::string::String),
19009        /// The service account which needs to be granted the permission.
19010        ServiceAccount(std::string::String),
19011    }
19012}