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 gax;
23extern crate gaxi;
24extern crate iam_v1;
25extern crate lazy_static;
26extern crate location;
27extern crate longrunning;
28extern crate lro;
29extern crate reqwest;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37/// Request message for
38/// [VmwareEngine.ListPrivateClouds][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]
39///
40/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]: crate::client::VmwareEngine::list_private_clouds
41#[serde_with::serde_as]
42#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
43#[serde(default, rename_all = "camelCase")]
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    #[serde(skip_serializing_if = "std::string::String::is_empty")]
52    pub parent: std::string::String,
53
54    /// The maximum number of private clouds to return in one page.
55    /// The service may return fewer than this value.
56    /// The maximum value is coerced to 1000.
57    /// The default value of this field is 500.
58    #[serde(skip_serializing_if = "wkt::internal::is_default")]
59    pub page_size: i32,
60
61    /// A page token, received from a previous `ListPrivateClouds` call.
62    /// Provide this to retrieve the subsequent page.
63    ///
64    /// When paginating, all other parameters provided to `ListPrivateClouds` must
65    /// match the call that provided the page token.
66    #[serde(skip_serializing_if = "std::string::String::is_empty")]
67    pub page_token: std::string::String,
68
69    /// A filter expression that matches resources returned in the response.
70    /// The expression must specify the field name, a comparison operator, and the
71    /// value that you want to use for filtering. The value must be a string, a
72    /// number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or
73    /// `<`.
74    ///
75    /// For example, if you are filtering a list of private clouds, you can exclude
76    /// the ones named `example-pc` by specifying `name != "example-pc"`.
77    ///
78    /// You can also filter nested fields. For example, you could specify
79    /// `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds
80    /// only if they have a matching address in their network configuration.
81    ///
82    /// To filter on multiple expressions, provide each separate expression within
83    /// parentheses. For example:
84    ///
85    /// ```norust
86    /// (name = "example-pc")
87    /// (createTime > "2021-04-12T08:15:10.40Z")
88    /// ```
89    ///
90    /// By default, each expression is an `AND` expression. However, you can
91    /// include `AND` and `OR` expressions explicitly. For example:
92    ///
93    /// ```norust
94    /// (name = "private-cloud-1") AND
95    /// (createTime > "2021-04-12T08:15:10.40Z") OR
96    /// (name = "private-cloud-2")
97    /// ```
98    #[serde(skip_serializing_if = "std::string::String::is_empty")]
99    pub filter: std::string::String,
100
101    /// Sorts list results by a certain order. By default, returned results are
102    /// ordered by `name` in ascending order. You can also sort results in
103    /// descending order based on the `name` value using `orderBy="name desc"`.
104    /// Currently, only ordering by `name` is supported.
105    #[serde(skip_serializing_if = "std::string::String::is_empty")]
106    pub order_by: std::string::String,
107
108    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
109    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
110}
111
112impl ListPrivateCloudsRequest {
113    pub fn new() -> Self {
114        std::default::Default::default()
115    }
116
117    /// Sets the value of [parent][crate::model::ListPrivateCloudsRequest::parent].
118    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
119        self.parent = v.into();
120        self
121    }
122
123    /// Sets the value of [page_size][crate::model::ListPrivateCloudsRequest::page_size].
124    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
125        self.page_size = v.into();
126        self
127    }
128
129    /// Sets the value of [page_token][crate::model::ListPrivateCloudsRequest::page_token].
130    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
131        self.page_token = v.into();
132        self
133    }
134
135    /// Sets the value of [filter][crate::model::ListPrivateCloudsRequest::filter].
136    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
137        self.filter = v.into();
138        self
139    }
140
141    /// Sets the value of [order_by][crate::model::ListPrivateCloudsRequest::order_by].
142    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
143        self.order_by = v.into();
144        self
145    }
146}
147
148impl wkt::message::Message for ListPrivateCloudsRequest {
149    fn typename() -> &'static str {
150        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsRequest"
151    }
152}
153
154/// Response message for
155/// [VmwareEngine.ListPrivateClouds][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]
156///
157/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]: crate::client::VmwareEngine::list_private_clouds
158#[serde_with::serde_as]
159#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
160#[serde(default, rename_all = "camelCase")]
161#[non_exhaustive]
162pub struct ListPrivateCloudsResponse {
163    /// A list of private clouds.
164    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
165    pub private_clouds: std::vec::Vec<crate::model::PrivateCloud>,
166
167    /// A token, which can be sent as `page_token` to retrieve the next page.
168    /// If this field is omitted, there are no subsequent pages.
169    #[serde(skip_serializing_if = "std::string::String::is_empty")]
170    pub next_page_token: std::string::String,
171
172    /// Locations that could not be reached when making an aggregated query using
173    /// wildcards.
174    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
175    pub unreachable: std::vec::Vec<std::string::String>,
176
177    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
178    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
179}
180
181impl ListPrivateCloudsResponse {
182    pub fn new() -> Self {
183        std::default::Default::default()
184    }
185
186    /// Sets the value of [private_clouds][crate::model::ListPrivateCloudsResponse::private_clouds].
187    pub fn set_private_clouds<T, V>(mut self, v: T) -> Self
188    where
189        T: std::iter::IntoIterator<Item = V>,
190        V: std::convert::Into<crate::model::PrivateCloud>,
191    {
192        use std::iter::Iterator;
193        self.private_clouds = v.into_iter().map(|i| i.into()).collect();
194        self
195    }
196
197    /// Sets the value of [next_page_token][crate::model::ListPrivateCloudsResponse::next_page_token].
198    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
199        self.next_page_token = v.into();
200        self
201    }
202
203    /// Sets the value of [unreachable][crate::model::ListPrivateCloudsResponse::unreachable].
204    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
205    where
206        T: std::iter::IntoIterator<Item = V>,
207        V: std::convert::Into<std::string::String>,
208    {
209        use std::iter::Iterator;
210        self.unreachable = v.into_iter().map(|i| i.into()).collect();
211        self
212    }
213}
214
215impl wkt::message::Message for ListPrivateCloudsResponse {
216    fn typename() -> &'static str {
217        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsResponse"
218    }
219}
220
221#[doc(hidden)]
222impl gax::paginator::internal::PageableResponse for ListPrivateCloudsResponse {
223    type PageItem = crate::model::PrivateCloud;
224
225    fn items(self) -> std::vec::Vec<Self::PageItem> {
226        self.private_clouds
227    }
228
229    fn next_page_token(&self) -> std::string::String {
230        use std::clone::Clone;
231        self.next_page_token.clone()
232    }
233}
234
235/// Request message for
236/// [VmwareEngine.GetPrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateCloud]
237///
238/// [google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateCloud]: crate::client::VmwareEngine::get_private_cloud
239#[serde_with::serde_as]
240#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
241#[serde(default, rename_all = "camelCase")]
242#[non_exhaustive]
243pub struct GetPrivateCloudRequest {
244    /// Required. The resource name of the private cloud to retrieve.
245    /// Resource names are schemeless URIs that follow the conventions in
246    /// <https://cloud.google.com/apis/design/resource_names>.
247    /// For example:
248    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
249    #[serde(skip_serializing_if = "std::string::String::is_empty")]
250    pub name: std::string::String,
251
252    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
253    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
254}
255
256impl GetPrivateCloudRequest {
257    pub fn new() -> Self {
258        std::default::Default::default()
259    }
260
261    /// Sets the value of [name][crate::model::GetPrivateCloudRequest::name].
262    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
263        self.name = v.into();
264        self
265    }
266}
267
268impl wkt::message::Message for GetPrivateCloudRequest {
269    fn typename() -> &'static str {
270        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateCloudRequest"
271    }
272}
273
274/// Request message for
275/// [VmwareEngine.CreatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]
276///
277/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]: crate::client::VmwareEngine::create_private_cloud
278#[serde_with::serde_as]
279#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
280#[serde(default, rename_all = "camelCase")]
281#[non_exhaustive]
282pub struct CreatePrivateCloudRequest {
283    /// Required. The resource name of the location to create the new
284    /// private cloud in. Resource names are schemeless URIs that follow the
285    /// conventions in <https://cloud.google.com/apis/design/resource_names>.
286    /// For example:
287    /// `projects/my-project/locations/us-central1-a`
288    #[serde(skip_serializing_if = "std::string::String::is_empty")]
289    pub parent: std::string::String,
290
291    /// Required. The user-provided identifier of the private cloud to be created.
292    /// This identifier must be unique among each `PrivateCloud` within the parent
293    /// and becomes the final token in the name URI.
294    /// The identifier must meet the following requirements:
295    ///
296    /// * Only contains 1-63 alphanumeric characters and hyphens
297    /// * Begins with an alphabetical character
298    /// * Ends with a non-hyphen character
299    /// * Not formatted as a UUID
300    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
301    ///   (section 3.5)
302    #[serde(skip_serializing_if = "std::string::String::is_empty")]
303    pub private_cloud_id: std::string::String,
304
305    /// Required. The initial description of the new private cloud.
306    #[serde(skip_serializing_if = "std::option::Option::is_none")]
307    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
308
309    /// Optional. The request ID must be a valid UUID with the exception that zero
310    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
311    #[serde(skip_serializing_if = "std::string::String::is_empty")]
312    pub request_id: std::string::String,
313
314    /// Optional. True if you want the request to be validated and not executed;
315    /// false otherwise.
316    #[serde(skip_serializing_if = "wkt::internal::is_default")]
317    pub validate_only: bool,
318
319    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
320    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
321}
322
323impl CreatePrivateCloudRequest {
324    pub fn new() -> Self {
325        std::default::Default::default()
326    }
327
328    /// Sets the value of [parent][crate::model::CreatePrivateCloudRequest::parent].
329    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
330        self.parent = v.into();
331        self
332    }
333
334    /// Sets the value of [private_cloud_id][crate::model::CreatePrivateCloudRequest::private_cloud_id].
335    pub fn set_private_cloud_id<T: std::convert::Into<std::string::String>>(
336        mut self,
337        v: T,
338    ) -> Self {
339        self.private_cloud_id = v.into();
340        self
341    }
342
343    /// Sets the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
344    pub fn set_private_cloud<
345        T: std::convert::Into<std::option::Option<crate::model::PrivateCloud>>,
346    >(
347        mut self,
348        v: T,
349    ) -> Self {
350        self.private_cloud = v.into();
351        self
352    }
353
354    /// Sets the value of [request_id][crate::model::CreatePrivateCloudRequest::request_id].
355    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
356        self.request_id = v.into();
357        self
358    }
359
360    /// Sets the value of [validate_only][crate::model::CreatePrivateCloudRequest::validate_only].
361    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
362        self.validate_only = v.into();
363        self
364    }
365}
366
367impl wkt::message::Message for CreatePrivateCloudRequest {
368    fn typename() -> &'static str {
369        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateCloudRequest"
370    }
371}
372
373/// Request message for
374/// [VmwareEngine.UpdatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]
375///
376/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]: crate::client::VmwareEngine::update_private_cloud
377#[serde_with::serde_as]
378#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
379#[serde(default, rename_all = "camelCase")]
380#[non_exhaustive]
381pub struct UpdatePrivateCloudRequest {
382    /// Required. Private cloud description.
383    #[serde(skip_serializing_if = "std::option::Option::is_none")]
384    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
385
386    /// Required. Field mask is used to specify the fields to be overwritten in the
387    /// `PrivateCloud` resource by the update. The fields specified in `updateMask`
388    /// are relative to the resource, not the full request. A field will be
389    /// overwritten if it is in the mask. If the user does not provide a mask then
390    /// all fields will be overwritten.
391    #[serde(skip_serializing_if = "std::option::Option::is_none")]
392    pub update_mask: std::option::Option<wkt::FieldMask>,
393
394    /// Optional. The request ID must be a valid UUID with the exception that zero
395    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
396    #[serde(skip_serializing_if = "std::string::String::is_empty")]
397    pub request_id: std::string::String,
398
399    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
400    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
401}
402
403impl UpdatePrivateCloudRequest {
404    pub fn new() -> Self {
405        std::default::Default::default()
406    }
407
408    /// Sets the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
409    pub fn set_private_cloud<
410        T: std::convert::Into<std::option::Option<crate::model::PrivateCloud>>,
411    >(
412        mut self,
413        v: T,
414    ) -> Self {
415        self.private_cloud = v.into();
416        self
417    }
418
419    /// Sets the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
420    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
421        mut self,
422        v: T,
423    ) -> Self {
424        self.update_mask = v.into();
425        self
426    }
427
428    /// Sets the value of [request_id][crate::model::UpdatePrivateCloudRequest::request_id].
429    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
430        self.request_id = v.into();
431        self
432    }
433}
434
435impl wkt::message::Message for UpdatePrivateCloudRequest {
436    fn typename() -> &'static str {
437        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest"
438    }
439}
440
441/// Request message for
442/// [VmwareEngine.DeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]
443///
444/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]: crate::client::VmwareEngine::delete_private_cloud
445#[serde_with::serde_as]
446#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
447#[serde(default, rename_all = "camelCase")]
448#[non_exhaustive]
449pub struct DeletePrivateCloudRequest {
450    /// Required. The resource name of the private cloud to delete.
451    /// Resource names are schemeless URIs that follow the conventions in
452    /// <https://cloud.google.com/apis/design/resource_names>.
453    /// For example:
454    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
455    #[serde(skip_serializing_if = "std::string::String::is_empty")]
456    pub name: std::string::String,
457
458    /// Optional. The request ID must be a valid UUID with the exception that zero
459    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
460    #[serde(skip_serializing_if = "std::string::String::is_empty")]
461    pub request_id: std::string::String,
462
463    /// Optional. If set to true, cascade delete is enabled and all children of
464    /// this private cloud resource are also deleted. When this flag is set to
465    /// false, the private cloud will not be deleted if there are any children
466    /// other than the management cluster. The management cluster is always
467    /// deleted.
468    #[serde(skip_serializing_if = "wkt::internal::is_default")]
469    pub force: bool,
470
471    /// Optional. Time delay of the deletion specified in hours. The default value
472    /// is `3`. Specifying a non-zero value for this field changes the value of
473    /// `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned
474    /// deletion time. Deletion can be cancelled before `expire_time` elapses using
475    /// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud].
476    /// Specifying a value of `0` for this field instead begins the deletion
477    /// process and ceases billing immediately. During the final deletion process,
478    /// the value of `PrivateCloud.state` becomes `PURGING`.
479    ///
480    /// [google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]: crate::client::VmwareEngine::undelete_private_cloud
481    #[serde(skip_serializing_if = "std::option::Option::is_none")]
482    pub delay_hours: std::option::Option<i32>,
483
484    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
485    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
486}
487
488impl DeletePrivateCloudRequest {
489    pub fn new() -> Self {
490        std::default::Default::default()
491    }
492
493    /// Sets the value of [name][crate::model::DeletePrivateCloudRequest::name].
494    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
495        self.name = v.into();
496        self
497    }
498
499    /// Sets the value of [request_id][crate::model::DeletePrivateCloudRequest::request_id].
500    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
501        self.request_id = v.into();
502        self
503    }
504
505    /// Sets the value of [force][crate::model::DeletePrivateCloudRequest::force].
506    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
507        self.force = v.into();
508        self
509    }
510
511    /// Sets the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
512    pub fn set_delay_hours<T: std::convert::Into<std::option::Option<i32>>>(
513        mut self,
514        v: T,
515    ) -> Self {
516        self.delay_hours = v.into();
517        self
518    }
519}
520
521impl wkt::message::Message for DeletePrivateCloudRequest {
522    fn typename() -> &'static str {
523        "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateCloudRequest"
524    }
525}
526
527/// Request message for
528/// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]
529///
530/// [google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]: crate::client::VmwareEngine::undelete_private_cloud
531#[serde_with::serde_as]
532#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
533#[serde(default, rename_all = "camelCase")]
534#[non_exhaustive]
535pub struct UndeletePrivateCloudRequest {
536    /// Required. The resource name of the private cloud scheduled for deletion.
537    /// Resource names are schemeless URIs that follow the conventions in
538    /// <https://cloud.google.com/apis/design/resource_names>.
539    /// For example:
540    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
541    #[serde(skip_serializing_if = "std::string::String::is_empty")]
542    pub name: std::string::String,
543
544    /// Optional. The request ID must be a valid UUID with the exception that zero
545    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
546    #[serde(skip_serializing_if = "std::string::String::is_empty")]
547    pub request_id: std::string::String,
548
549    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
550    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
551}
552
553impl UndeletePrivateCloudRequest {
554    pub fn new() -> Self {
555        std::default::Default::default()
556    }
557
558    /// Sets the value of [name][crate::model::UndeletePrivateCloudRequest::name].
559    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
560        self.name = v.into();
561        self
562    }
563
564    /// Sets the value of [request_id][crate::model::UndeletePrivateCloudRequest::request_id].
565    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
566        self.request_id = v.into();
567        self
568    }
569}
570
571impl wkt::message::Message for UndeletePrivateCloudRequest {
572    fn typename() -> &'static str {
573        "type.googleapis.com/google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest"
574    }
575}
576
577/// Request message for
578/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
579///
580/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
581#[serde_with::serde_as]
582#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
583#[serde(default, rename_all = "camelCase")]
584#[non_exhaustive]
585pub struct ListClustersRequest {
586    /// Required. The resource name of the private cloud to query for clusters.
587    /// Resource names are schemeless URIs that follow the conventions in
588    /// <https://cloud.google.com/apis/design/resource_names>.
589    /// For example:
590    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
591    #[serde(skip_serializing_if = "std::string::String::is_empty")]
592    pub parent: std::string::String,
593
594    /// The maximum number of clusters to return in one page.
595    /// The service may return fewer than this value.
596    /// The maximum value is coerced to 1000.
597    /// The default value of this field is 500.
598    #[serde(skip_serializing_if = "wkt::internal::is_default")]
599    pub page_size: i32,
600
601    /// A page token, received from a previous `ListClusters` call.
602    /// Provide this to retrieve the subsequent page.
603    ///
604    /// When paginating, all other parameters provided to `ListClusters`
605    /// must match the call that provided the page token.
606    #[serde(skip_serializing_if = "std::string::String::is_empty")]
607    pub page_token: std::string::String,
608
609    /// To filter on multiple expressions, provide each separate expression within
610    /// parentheses. For example:
611    ///
612    /// ```norust
613    /// (name = "example-cluster")
614    /// (nodeCount = "3")
615    /// ```
616    ///
617    /// By default, each expression is an `AND` expression. However, you can
618    /// include `AND` and `OR` expressions explicitly. For example:
619    ///
620    /// ```norust
621    /// (name = "example-cluster-1") AND
622    /// (createTime > "2021-04-12T08:15:10.40Z") OR
623    /// (name = "example-cluster-2")
624    /// ```
625    #[serde(skip_serializing_if = "std::string::String::is_empty")]
626    pub filter: std::string::String,
627
628    /// Sorts list results by a certain order. By default, returned results are
629    /// ordered by `name` in ascending order. You can also sort results in
630    /// descending order based on the `name` value using `orderBy="name desc"`.
631    /// Currently, only ordering by `name` is supported.
632    #[serde(skip_serializing_if = "std::string::String::is_empty")]
633    pub order_by: std::string::String,
634
635    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
636    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
637}
638
639impl ListClustersRequest {
640    pub fn new() -> Self {
641        std::default::Default::default()
642    }
643
644    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
645    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
646        self.parent = v.into();
647        self
648    }
649
650    /// Sets the value of [page_size][crate::model::ListClustersRequest::page_size].
651    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
652        self.page_size = v.into();
653        self
654    }
655
656    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
657    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
658        self.page_token = v.into();
659        self
660    }
661
662    /// Sets the value of [filter][crate::model::ListClustersRequest::filter].
663    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
664        self.filter = v.into();
665        self
666    }
667
668    /// Sets the value of [order_by][crate::model::ListClustersRequest::order_by].
669    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
670        self.order_by = v.into();
671        self
672    }
673}
674
675impl wkt::message::Message for ListClustersRequest {
676    fn typename() -> &'static str {
677        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersRequest"
678    }
679}
680
681/// Response message for
682/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
683///
684/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
685#[serde_with::serde_as]
686#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
687#[serde(default, rename_all = "camelCase")]
688#[non_exhaustive]
689pub struct ListClustersResponse {
690    /// A list of private cloud clusters.
691    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
692    pub clusters: std::vec::Vec<crate::model::Cluster>,
693
694    /// A token, which can be sent as `page_token` to retrieve the next page.
695    /// If this field is omitted, there are no subsequent pages.
696    #[serde(skip_serializing_if = "std::string::String::is_empty")]
697    pub next_page_token: std::string::String,
698
699    /// Locations that could not be reached when making an aggregated query using
700    /// wildcards.
701    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
702    pub unreachable: std::vec::Vec<std::string::String>,
703
704    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
705    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
706}
707
708impl ListClustersResponse {
709    pub fn new() -> Self {
710        std::default::Default::default()
711    }
712
713    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
714    pub fn set_clusters<T, V>(mut self, v: T) -> Self
715    where
716        T: std::iter::IntoIterator<Item = V>,
717        V: std::convert::Into<crate::model::Cluster>,
718    {
719        use std::iter::Iterator;
720        self.clusters = v.into_iter().map(|i| i.into()).collect();
721        self
722    }
723
724    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
725    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
726        self.next_page_token = v.into();
727        self
728    }
729
730    /// Sets the value of [unreachable][crate::model::ListClustersResponse::unreachable].
731    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
732    where
733        T: std::iter::IntoIterator<Item = V>,
734        V: std::convert::Into<std::string::String>,
735    {
736        use std::iter::Iterator;
737        self.unreachable = v.into_iter().map(|i| i.into()).collect();
738        self
739    }
740}
741
742impl wkt::message::Message for ListClustersResponse {
743    fn typename() -> &'static str {
744        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersResponse"
745    }
746}
747
748#[doc(hidden)]
749impl gax::paginator::internal::PageableResponse for ListClustersResponse {
750    type PageItem = crate::model::Cluster;
751
752    fn items(self) -> std::vec::Vec<Self::PageItem> {
753        self.clusters
754    }
755
756    fn next_page_token(&self) -> std::string::String {
757        use std::clone::Clone;
758        self.next_page_token.clone()
759    }
760}
761
762/// Request message for
763/// [VmwareEngine.GetCluster][google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]
764///
765/// [google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]: crate::client::VmwareEngine::get_cluster
766#[serde_with::serde_as]
767#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
768#[serde(default, rename_all = "camelCase")]
769#[non_exhaustive]
770pub struct GetClusterRequest {
771    /// Required. The cluster resource name to retrieve.
772    /// Resource names are schemeless URIs that follow the conventions in
773    /// <https://cloud.google.com/apis/design/resource_names>.
774    /// For example:
775    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
776    #[serde(skip_serializing_if = "std::string::String::is_empty")]
777    pub name: std::string::String,
778
779    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
780    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
781}
782
783impl GetClusterRequest {
784    pub fn new() -> Self {
785        std::default::Default::default()
786    }
787
788    /// Sets the value of [name][crate::model::GetClusterRequest::name].
789    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
790        self.name = v.into();
791        self
792    }
793}
794
795impl wkt::message::Message for GetClusterRequest {
796    fn typename() -> &'static str {
797        "type.googleapis.com/google.cloud.vmwareengine.v1.GetClusterRequest"
798    }
799}
800
801/// Request message for
802/// [VmwareEngine.CreateCluster][google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]
803///
804/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]: crate::client::VmwareEngine::create_cluster
805#[serde_with::serde_as]
806#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
807#[serde(default, rename_all = "camelCase")]
808#[non_exhaustive]
809pub struct CreateClusterRequest {
810    /// Required. The resource name of the private cloud to create a new cluster
811    /// in. Resource names are schemeless URIs that follow the conventions in
812    /// <https://cloud.google.com/apis/design/resource_names>.
813    /// For example:
814    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
815    #[serde(skip_serializing_if = "std::string::String::is_empty")]
816    pub parent: std::string::String,
817
818    /// Required. The user-provided identifier of the new `Cluster`.
819    /// This identifier must be unique among clusters within the parent and becomes
820    /// the final token in the name URI.
821    /// The identifier must meet the following requirements:
822    ///
823    /// * Only contains 1-63 alphanumeric characters and hyphens
824    /// * Begins with an alphabetical character
825    /// * Ends with a non-hyphen character
826    /// * Not formatted as a UUID
827    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
828    ///   (section 3.5)
829    #[serde(skip_serializing_if = "std::string::String::is_empty")]
830    pub cluster_id: std::string::String,
831
832    /// Required. The initial description of the new cluster.
833    #[serde(skip_serializing_if = "std::option::Option::is_none")]
834    pub cluster: std::option::Option<crate::model::Cluster>,
835
836    /// Optional. The request ID must be a valid UUID with the exception that zero
837    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
838    #[serde(skip_serializing_if = "std::string::String::is_empty")]
839    pub request_id: std::string::String,
840
841    /// Optional. True if you want the request to be validated and not executed;
842    /// false otherwise.
843    #[serde(skip_serializing_if = "wkt::internal::is_default")]
844    pub validate_only: bool,
845
846    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
847    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
848}
849
850impl CreateClusterRequest {
851    pub fn new() -> Self {
852        std::default::Default::default()
853    }
854
855    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
856    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
857        self.parent = v.into();
858        self
859    }
860
861    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
862    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
863        self.cluster_id = v.into();
864        self
865    }
866
867    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
868    pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
869        mut self,
870        v: T,
871    ) -> Self {
872        self.cluster = v.into();
873        self
874    }
875
876    /// Sets the value of [request_id][crate::model::CreateClusterRequest::request_id].
877    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
878        self.request_id = v.into();
879        self
880    }
881
882    /// Sets the value of [validate_only][crate::model::CreateClusterRequest::validate_only].
883    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
884        self.validate_only = v.into();
885        self
886    }
887}
888
889impl wkt::message::Message for CreateClusterRequest {
890    fn typename() -> &'static str {
891        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateClusterRequest"
892    }
893}
894
895/// Request message for
896/// [VmwareEngine.UpdateCluster][google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]
897///
898/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]: crate::client::VmwareEngine::update_cluster
899#[serde_with::serde_as]
900#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
901#[serde(default, rename_all = "camelCase")]
902#[non_exhaustive]
903pub struct UpdateClusterRequest {
904    /// Required. Field mask is used to specify the fields to be overwritten in the
905    /// `Cluster` resource by the update. The fields specified in the `updateMask`
906    /// are relative to the resource, not the full request. A field will be
907    /// overwritten if it is in the mask. If the user does not provide a mask then
908    /// all fields will be overwritten.
909    #[serde(skip_serializing_if = "std::option::Option::is_none")]
910    pub update_mask: std::option::Option<wkt::FieldMask>,
911
912    /// Required. The description of the cluster.
913    #[serde(skip_serializing_if = "std::option::Option::is_none")]
914    pub cluster: std::option::Option<crate::model::Cluster>,
915
916    /// Optional. The request ID must be a valid UUID with the exception that
917    /// zero UUID is not supported (00000000-0000-0000-0000-000000000000).
918    #[serde(skip_serializing_if = "std::string::String::is_empty")]
919    pub request_id: std::string::String,
920
921    /// Optional. True if you want the request to be validated and not executed;
922    /// false otherwise.
923    #[serde(skip_serializing_if = "wkt::internal::is_default")]
924    pub validate_only: bool,
925
926    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
927    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
928}
929
930impl UpdateClusterRequest {
931    pub fn new() -> Self {
932        std::default::Default::default()
933    }
934
935    /// Sets the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
936    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
937        mut self,
938        v: T,
939    ) -> Self {
940        self.update_mask = v.into();
941        self
942    }
943
944    /// Sets the value of [cluster][crate::model::UpdateClusterRequest::cluster].
945    pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
946        mut self,
947        v: T,
948    ) -> Self {
949        self.cluster = v.into();
950        self
951    }
952
953    /// Sets the value of [request_id][crate::model::UpdateClusterRequest::request_id].
954    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
955        self.request_id = v.into();
956        self
957    }
958
959    /// Sets the value of [validate_only][crate::model::UpdateClusterRequest::validate_only].
960    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
961        self.validate_only = v.into();
962        self
963    }
964}
965
966impl wkt::message::Message for UpdateClusterRequest {
967    fn typename() -> &'static str {
968        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateClusterRequest"
969    }
970}
971
972/// Request message for
973/// [VmwareEngine.DeleteCluster][google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]
974///
975/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]: crate::client::VmwareEngine::delete_cluster
976#[serde_with::serde_as]
977#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
978#[serde(default, rename_all = "camelCase")]
979#[non_exhaustive]
980pub struct DeleteClusterRequest {
981    /// Required. The resource name of the cluster to delete.
982    /// Resource names are schemeless URIs that follow the conventions in
983    /// <https://cloud.google.com/apis/design/resource_names>.
984    /// For example:
985    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
986    #[serde(skip_serializing_if = "std::string::String::is_empty")]
987    pub name: std::string::String,
988
989    /// Optional. The request ID must be a valid UUID with the exception that zero
990    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
991    #[serde(skip_serializing_if = "std::string::String::is_empty")]
992    pub request_id: std::string::String,
993
994    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
995    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
996}
997
998impl DeleteClusterRequest {
999    pub fn new() -> Self {
1000        std::default::Default::default()
1001    }
1002
1003    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
1004    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1005        self.name = v.into();
1006        self
1007    }
1008
1009    /// Sets the value of [request_id][crate::model::DeleteClusterRequest::request_id].
1010    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1011        self.request_id = v.into();
1012        self
1013    }
1014}
1015
1016impl wkt::message::Message for DeleteClusterRequest {
1017    fn typename() -> &'static str {
1018        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteClusterRequest"
1019    }
1020}
1021
1022/// Request message for
1023/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
1024///
1025/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
1026#[serde_with::serde_as]
1027#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1028#[serde(default, rename_all = "camelCase")]
1029#[non_exhaustive]
1030pub struct ListNodesRequest {
1031    /// Required. The resource name of the cluster to be queried for nodes.
1032    /// Resource names are schemeless URIs that follow the conventions in
1033    /// <https://cloud.google.com/apis/design/resource_names>.
1034    /// For example:
1035    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
1036    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1037    pub parent: std::string::String,
1038
1039    /// The maximum number of nodes to return in one page.
1040    /// The service may return fewer than this value.
1041    /// The maximum value is coerced to 1000.
1042    /// The default value of this field is 500.
1043    #[serde(skip_serializing_if = "wkt::internal::is_default")]
1044    pub page_size: i32,
1045
1046    /// A page token, received from a previous `ListNodes` call.
1047    /// Provide this to retrieve the subsequent page.
1048    ///
1049    /// When paginating, all other parameters provided to
1050    /// `ListNodes` must match the call that provided the page
1051    /// token.
1052    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1053    pub page_token: std::string::String,
1054
1055    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1056    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1057}
1058
1059impl ListNodesRequest {
1060    pub fn new() -> Self {
1061        std::default::Default::default()
1062    }
1063
1064    /// Sets the value of [parent][crate::model::ListNodesRequest::parent].
1065    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1066        self.parent = v.into();
1067        self
1068    }
1069
1070    /// Sets the value of [page_size][crate::model::ListNodesRequest::page_size].
1071    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1072        self.page_size = v.into();
1073        self
1074    }
1075
1076    /// Sets the value of [page_token][crate::model::ListNodesRequest::page_token].
1077    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1078        self.page_token = v.into();
1079        self
1080    }
1081}
1082
1083impl wkt::message::Message for ListNodesRequest {
1084    fn typename() -> &'static str {
1085        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesRequest"
1086    }
1087}
1088
1089/// Response message for
1090/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
1091///
1092/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
1093#[serde_with::serde_as]
1094#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1095#[serde(default, rename_all = "camelCase")]
1096#[non_exhaustive]
1097pub struct ListNodesResponse {
1098    /// The nodes.
1099    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1100    pub nodes: std::vec::Vec<crate::model::Node>,
1101
1102    /// A token, which can be sent as `page_token` to retrieve the next page.
1103    /// If this field is omitted, there are no subsequent pages.
1104    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1105    pub next_page_token: std::string::String,
1106
1107    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1108    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1109}
1110
1111impl ListNodesResponse {
1112    pub fn new() -> Self {
1113        std::default::Default::default()
1114    }
1115
1116    /// Sets the value of [nodes][crate::model::ListNodesResponse::nodes].
1117    pub fn set_nodes<T, V>(mut self, v: T) -> Self
1118    where
1119        T: std::iter::IntoIterator<Item = V>,
1120        V: std::convert::Into<crate::model::Node>,
1121    {
1122        use std::iter::Iterator;
1123        self.nodes = v.into_iter().map(|i| i.into()).collect();
1124        self
1125    }
1126
1127    /// Sets the value of [next_page_token][crate::model::ListNodesResponse::next_page_token].
1128    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1129        self.next_page_token = v.into();
1130        self
1131    }
1132}
1133
1134impl wkt::message::Message for ListNodesResponse {
1135    fn typename() -> &'static str {
1136        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesResponse"
1137    }
1138}
1139
1140#[doc(hidden)]
1141impl gax::paginator::internal::PageableResponse for ListNodesResponse {
1142    type PageItem = crate::model::Node;
1143
1144    fn items(self) -> std::vec::Vec<Self::PageItem> {
1145        self.nodes
1146    }
1147
1148    fn next_page_token(&self) -> std::string::String {
1149        use std::clone::Clone;
1150        self.next_page_token.clone()
1151    }
1152}
1153
1154/// Request message for
1155/// [VmwareEngine.GetNode][google.cloud.vmwareengine.v1.VmwareEngine.GetNode]
1156///
1157/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNode]: crate::client::VmwareEngine::get_node
1158#[serde_with::serde_as]
1159#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1160#[serde(default, rename_all = "camelCase")]
1161#[non_exhaustive]
1162pub struct GetNodeRequest {
1163    /// Required. The resource name of the node to retrieve.
1164    /// For example:
1165    /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}`
1166    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1167    pub name: std::string::String,
1168
1169    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1170    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1171}
1172
1173impl GetNodeRequest {
1174    pub fn new() -> Self {
1175        std::default::Default::default()
1176    }
1177
1178    /// Sets the value of [name][crate::model::GetNodeRequest::name].
1179    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1180        self.name = v.into();
1181        self
1182    }
1183}
1184
1185impl wkt::message::Message for GetNodeRequest {
1186    fn typename() -> &'static str {
1187        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeRequest"
1188    }
1189}
1190
1191/// Request message for
1192/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1193///
1194/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1195#[serde_with::serde_as]
1196#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1197#[serde(default, rename_all = "camelCase")]
1198#[non_exhaustive]
1199pub struct ListExternalAddressesRequest {
1200    /// Required. The resource name of the private cloud to be queried for
1201    /// external IP addresses.
1202    /// Resource names are schemeless URIs that follow the conventions in
1203    /// <https://cloud.google.com/apis/design/resource_names>.
1204    /// For example:
1205    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1206    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1207    pub parent: std::string::String,
1208
1209    /// The maximum number of external IP addresses to return in one page.
1210    /// The service may return fewer than this value.
1211    /// The maximum value is coerced to 1000.
1212    /// The default value of this field is 500.
1213    #[serde(skip_serializing_if = "wkt::internal::is_default")]
1214    pub page_size: i32,
1215
1216    /// A page token, received from a previous `ListExternalAddresses` call.
1217    /// Provide this to retrieve the subsequent page.
1218    ///
1219    /// When paginating, all other parameters provided to
1220    /// `ListExternalAddresses` must match the call that provided the page token.
1221    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1222    pub page_token: std::string::String,
1223
1224    /// A filter expression that matches resources returned in the response.
1225    /// The expression must specify the field name, a comparison
1226    /// operator, and the value that you want to use for filtering. The value
1227    /// must be a string, a number, or a boolean. The comparison operator
1228    /// must be `=`, `!=`, `>`, or `<`.
1229    ///
1230    /// For example, if you are filtering a list of IP addresses, you can
1231    /// exclude the ones named `example-ip` by specifying
1232    /// `name != "example-ip"`.
1233    ///
1234    /// To filter on multiple expressions, provide each separate expression within
1235    /// parentheses. For example:
1236    ///
1237    /// ```norust
1238    /// (name = "example-ip")
1239    /// (createTime > "2021-04-12T08:15:10.40Z")
1240    /// ```
1241    ///
1242    /// By default, each expression is an `AND` expression. However, you
1243    /// can include `AND` and `OR` expressions explicitly.
1244    /// For example:
1245    ///
1246    /// ```norust
1247    /// (name = "example-ip-1") AND
1248    /// (createTime > "2021-04-12T08:15:10.40Z") OR
1249    /// (name = "example-ip-2")
1250    /// ```
1251    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1252    pub filter: std::string::String,
1253
1254    /// Sorts list results by a certain order. By default, returned results
1255    /// are ordered by `name` in ascending order.
1256    /// You can also sort results in descending order based on the `name` value
1257    /// using `orderBy="name desc"`.
1258    /// Currently, only ordering by `name` is supported.
1259    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1260    pub order_by: std::string::String,
1261
1262    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1263    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1264}
1265
1266impl ListExternalAddressesRequest {
1267    pub fn new() -> Self {
1268        std::default::Default::default()
1269    }
1270
1271    /// Sets the value of [parent][crate::model::ListExternalAddressesRequest::parent].
1272    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1273        self.parent = v.into();
1274        self
1275    }
1276
1277    /// Sets the value of [page_size][crate::model::ListExternalAddressesRequest::page_size].
1278    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1279        self.page_size = v.into();
1280        self
1281    }
1282
1283    /// Sets the value of [page_token][crate::model::ListExternalAddressesRequest::page_token].
1284    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1285        self.page_token = v.into();
1286        self
1287    }
1288
1289    /// Sets the value of [filter][crate::model::ListExternalAddressesRequest::filter].
1290    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1291        self.filter = v.into();
1292        self
1293    }
1294
1295    /// Sets the value of [order_by][crate::model::ListExternalAddressesRequest::order_by].
1296    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1297        self.order_by = v.into();
1298        self
1299    }
1300}
1301
1302impl wkt::message::Message for ListExternalAddressesRequest {
1303    fn typename() -> &'static str {
1304        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesRequest"
1305    }
1306}
1307
1308/// Response message for
1309/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1310///
1311/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1312#[serde_with::serde_as]
1313#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1314#[serde(default, rename_all = "camelCase")]
1315#[non_exhaustive]
1316pub struct ListExternalAddressesResponse {
1317    /// A list of external IP addresses.
1318    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1319    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1320
1321    /// A token, which can be sent as `page_token` to retrieve the next page.
1322    /// If this field is omitted, there are no subsequent pages.
1323    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1324    pub next_page_token: std::string::String,
1325
1326    /// Locations that could not be reached when making an aggregated query using
1327    /// wildcards.
1328    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1329    pub unreachable: std::vec::Vec<std::string::String>,
1330
1331    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1332    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1333}
1334
1335impl ListExternalAddressesResponse {
1336    pub fn new() -> Self {
1337        std::default::Default::default()
1338    }
1339
1340    /// Sets the value of [external_addresses][crate::model::ListExternalAddressesResponse::external_addresses].
1341    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1342    where
1343        T: std::iter::IntoIterator<Item = V>,
1344        V: std::convert::Into<crate::model::ExternalAddress>,
1345    {
1346        use std::iter::Iterator;
1347        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1348        self
1349    }
1350
1351    /// Sets the value of [next_page_token][crate::model::ListExternalAddressesResponse::next_page_token].
1352    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1353        self.next_page_token = v.into();
1354        self
1355    }
1356
1357    /// Sets the value of [unreachable][crate::model::ListExternalAddressesResponse::unreachable].
1358    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1359    where
1360        T: std::iter::IntoIterator<Item = V>,
1361        V: std::convert::Into<std::string::String>,
1362    {
1363        use std::iter::Iterator;
1364        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1365        self
1366    }
1367}
1368
1369impl wkt::message::Message for ListExternalAddressesResponse {
1370    fn typename() -> &'static str {
1371        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesResponse"
1372    }
1373}
1374
1375#[doc(hidden)]
1376impl gax::paginator::internal::PageableResponse for ListExternalAddressesResponse {
1377    type PageItem = crate::model::ExternalAddress;
1378
1379    fn items(self) -> std::vec::Vec<Self::PageItem> {
1380        self.external_addresses
1381    }
1382
1383    fn next_page_token(&self) -> std::string::String {
1384        use std::clone::Clone;
1385        self.next_page_token.clone()
1386    }
1387}
1388
1389/// Request message for
1390/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1391///
1392/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
1393#[serde_with::serde_as]
1394#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1395#[serde(default, rename_all = "camelCase")]
1396#[non_exhaustive]
1397pub struct FetchNetworkPolicyExternalAddressesRequest {
1398    /// Required. The resource name of the network policy to query for assigned
1399    /// external IP addresses. Resource names are schemeless URIs that follow the
1400    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
1401    /// example:
1402    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
1403    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1404    pub network_policy: std::string::String,
1405
1406    /// The maximum number of external IP addresses to return in one page.
1407    /// The service may return fewer than this value.
1408    /// The maximum value is coerced to 1000.
1409    /// The default value of this field is 500.
1410    #[serde(skip_serializing_if = "wkt::internal::is_default")]
1411    pub page_size: i32,
1412
1413    /// A page token, received from a previous
1414    /// `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the
1415    /// subsequent page.
1416    ///
1417    /// When paginating, all parameters provided to
1418    /// `FetchNetworkPolicyExternalAddresses`, except for `page_size` and
1419    /// `page_token`, must match the call that provided the page token.
1420    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1421    pub page_token: std::string::String,
1422
1423    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1424    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1425}
1426
1427impl FetchNetworkPolicyExternalAddressesRequest {
1428    pub fn new() -> Self {
1429        std::default::Default::default()
1430    }
1431
1432    /// Sets the value of [network_policy][crate::model::FetchNetworkPolicyExternalAddressesRequest::network_policy].
1433    pub fn set_network_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1434        self.network_policy = v.into();
1435        self
1436    }
1437
1438    /// Sets the value of [page_size][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_size].
1439    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1440        self.page_size = v.into();
1441        self
1442    }
1443
1444    /// Sets the value of [page_token][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_token].
1445    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1446        self.page_token = v.into();
1447        self
1448    }
1449}
1450
1451impl wkt::message::Message for FetchNetworkPolicyExternalAddressesRequest {
1452    fn typename() -> &'static str {
1453        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest"
1454    }
1455}
1456
1457/// Response message for
1458/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1459///
1460/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
1461#[serde_with::serde_as]
1462#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1463#[serde(default, rename_all = "camelCase")]
1464#[non_exhaustive]
1465pub struct FetchNetworkPolicyExternalAddressesResponse {
1466    /// A list of external IP addresses assigned to VMware workload VMs within the
1467    /// scope of the given network policy.
1468    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1469    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1470
1471    /// A token, which can be sent as `page_token` to retrieve the next page.
1472    /// If this field is omitted, there are no subsequent pages.
1473    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1474    pub next_page_token: std::string::String,
1475
1476    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1477    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1478}
1479
1480impl FetchNetworkPolicyExternalAddressesResponse {
1481    pub fn new() -> Self {
1482        std::default::Default::default()
1483    }
1484
1485    /// Sets the value of [external_addresses][crate::model::FetchNetworkPolicyExternalAddressesResponse::external_addresses].
1486    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1487    where
1488        T: std::iter::IntoIterator<Item = V>,
1489        V: std::convert::Into<crate::model::ExternalAddress>,
1490    {
1491        use std::iter::Iterator;
1492        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1493        self
1494    }
1495
1496    /// Sets the value of [next_page_token][crate::model::FetchNetworkPolicyExternalAddressesResponse::next_page_token].
1497    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1498        self.next_page_token = v.into();
1499        self
1500    }
1501}
1502
1503impl wkt::message::Message for FetchNetworkPolicyExternalAddressesResponse {
1504    fn typename() -> &'static str {
1505        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesResponse"
1506    }
1507}
1508
1509#[doc(hidden)]
1510impl gax::paginator::internal::PageableResponse for FetchNetworkPolicyExternalAddressesResponse {
1511    type PageItem = crate::model::ExternalAddress;
1512
1513    fn items(self) -> std::vec::Vec<Self::PageItem> {
1514        self.external_addresses
1515    }
1516
1517    fn next_page_token(&self) -> std::string::String {
1518        use std::clone::Clone;
1519        self.next_page_token.clone()
1520    }
1521}
1522
1523/// Request message for
1524/// [VmwareEngine.GetExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]
1525///
1526/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]: crate::client::VmwareEngine::get_external_address
1527#[serde_with::serde_as]
1528#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1529#[serde(default, rename_all = "camelCase")]
1530#[non_exhaustive]
1531pub struct GetExternalAddressRequest {
1532    /// Required. The resource name of the external IP address to retrieve.
1533    /// Resource names are schemeless URIs that follow the conventions in
1534    /// <https://cloud.google.com/apis/design/resource_names>.
1535    /// For example:
1536    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
1537    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1538    pub name: std::string::String,
1539
1540    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1541    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1542}
1543
1544impl GetExternalAddressRequest {
1545    pub fn new() -> Self {
1546        std::default::Default::default()
1547    }
1548
1549    /// Sets the value of [name][crate::model::GetExternalAddressRequest::name].
1550    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1551        self.name = v.into();
1552        self
1553    }
1554}
1555
1556impl wkt::message::Message for GetExternalAddressRequest {
1557    fn typename() -> &'static str {
1558        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAddressRequest"
1559    }
1560}
1561
1562/// Request message for
1563/// [VmwareEngine.CreateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]
1564///
1565/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]: crate::client::VmwareEngine::create_external_address
1566#[serde_with::serde_as]
1567#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1568#[serde(default, rename_all = "camelCase")]
1569#[non_exhaustive]
1570pub struct CreateExternalAddressRequest {
1571    /// Required. The resource name of the private cloud
1572    /// to create a new external IP address in.
1573    /// Resource names are schemeless URIs that follow the conventions in
1574    /// <https://cloud.google.com/apis/design/resource_names>.
1575    /// For example:
1576    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1577    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1578    pub parent: std::string::String,
1579
1580    /// Required. The initial description of a new external IP address.
1581    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1582    pub external_address: std::option::Option<crate::model::ExternalAddress>,
1583
1584    /// Required. The user-provided identifier of the `ExternalAddress` to be
1585    /// created. This identifier must be unique among `ExternalAddress` resources
1586    /// within the parent and becomes the final token in the name URI. The
1587    /// identifier must meet the following requirements:
1588    ///
1589    /// * Only contains 1-63 alphanumeric characters and hyphens
1590    /// * Begins with an alphabetical character
1591    /// * Ends with a non-hyphen character
1592    /// * Not formatted as a UUID
1593    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
1594    ///   (section 3.5)
1595    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1596    pub external_address_id: std::string::String,
1597
1598    /// Optional. A request ID to identify requests. Specify a unique request ID
1599    /// so that if you must retry your request, the server will know to ignore
1600    /// the request if it has already been completed. The server guarantees that a
1601    /// request doesn't result in creation of duplicate commitments for at least 60
1602    /// minutes.
1603    ///
1604    /// For example, consider a situation where you make an initial request and the
1605    /// request times out. If you make the request again with the same request ID,
1606    /// the server can check if the original operation with the same request ID was
1607    /// received, and if so, will ignore the second request. This prevents clients
1608    /// from accidentally creating duplicate commitments.
1609    ///
1610    /// The request ID must be a valid UUID with the exception that zero UUID is
1611    /// not supported (00000000-0000-0000-0000-000000000000).
1612    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1613    pub request_id: std::string::String,
1614
1615    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1616    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1617}
1618
1619impl CreateExternalAddressRequest {
1620    pub fn new() -> Self {
1621        std::default::Default::default()
1622    }
1623
1624    /// Sets the value of [parent][crate::model::CreateExternalAddressRequest::parent].
1625    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1626        self.parent = v.into();
1627        self
1628    }
1629
1630    /// Sets the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
1631    pub fn set_external_address<
1632        T: std::convert::Into<std::option::Option<crate::model::ExternalAddress>>,
1633    >(
1634        mut self,
1635        v: T,
1636    ) -> Self {
1637        self.external_address = v.into();
1638        self
1639    }
1640
1641    /// Sets the value of [external_address_id][crate::model::CreateExternalAddressRequest::external_address_id].
1642    pub fn set_external_address_id<T: std::convert::Into<std::string::String>>(
1643        mut self,
1644        v: T,
1645    ) -> Self {
1646        self.external_address_id = v.into();
1647        self
1648    }
1649
1650    /// Sets the value of [request_id][crate::model::CreateExternalAddressRequest::request_id].
1651    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1652        self.request_id = v.into();
1653        self
1654    }
1655}
1656
1657impl wkt::message::Message for CreateExternalAddressRequest {
1658    fn typename() -> &'static str {
1659        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAddressRequest"
1660    }
1661}
1662
1663/// Request message for
1664/// [VmwareEngine.UpdateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]
1665///
1666/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]: crate::client::VmwareEngine::update_external_address
1667#[serde_with::serde_as]
1668#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1669#[serde(default, rename_all = "camelCase")]
1670#[non_exhaustive]
1671pub struct UpdateExternalAddressRequest {
1672    /// Required. Field mask is used to specify the fields to be overwritten in the
1673    /// `ExternalAddress` resource by the update.
1674    /// The fields specified in the `update_mask` are relative to the resource, not
1675    /// the full request. A field will be overwritten if it is in the mask. If the
1676    /// user does not provide a mask then all fields will be overwritten.
1677    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1678    pub update_mask: std::option::Option<wkt::FieldMask>,
1679
1680    /// Required. External IP address description.
1681    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1682    pub external_address: std::option::Option<crate::model::ExternalAddress>,
1683
1684    /// Optional. A request ID to identify requests. Specify a unique request ID
1685    /// so that if you must retry your request, the server will know to ignore
1686    /// the request if it has already been completed. The server guarantees that a
1687    /// request doesn't result in creation of duplicate commitments for at least 60
1688    /// minutes.
1689    ///
1690    /// For example, consider a situation where you make an initial request and the
1691    /// request times out. If you make the request again with the same request ID,
1692    /// the server can check if the original operation with the same request ID was
1693    /// received, and if so, will ignore the second request. This prevents clients
1694    /// from accidentally creating duplicate commitments.
1695    ///
1696    /// The request ID must be a valid UUID with the exception that zero UUID is
1697    /// not supported (00000000-0000-0000-0000-000000000000).
1698    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1699    pub request_id: std::string::String,
1700
1701    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1702    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1703}
1704
1705impl UpdateExternalAddressRequest {
1706    pub fn new() -> Self {
1707        std::default::Default::default()
1708    }
1709
1710    /// Sets the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
1711    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
1712        mut self,
1713        v: T,
1714    ) -> Self {
1715        self.update_mask = v.into();
1716        self
1717    }
1718
1719    /// Sets the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
1720    pub fn set_external_address<
1721        T: std::convert::Into<std::option::Option<crate::model::ExternalAddress>>,
1722    >(
1723        mut self,
1724        v: T,
1725    ) -> Self {
1726        self.external_address = v.into();
1727        self
1728    }
1729
1730    /// Sets the value of [request_id][crate::model::UpdateExternalAddressRequest::request_id].
1731    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1732        self.request_id = v.into();
1733        self
1734    }
1735}
1736
1737impl wkt::message::Message for UpdateExternalAddressRequest {
1738    fn typename() -> &'static str {
1739        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAddressRequest"
1740    }
1741}
1742
1743/// Request message for
1744/// [VmwareEngine.DeleteExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]
1745///
1746/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]: crate::client::VmwareEngine::delete_external_address
1747#[serde_with::serde_as]
1748#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1749#[serde(default, rename_all = "camelCase")]
1750#[non_exhaustive]
1751pub struct DeleteExternalAddressRequest {
1752    /// Required. The resource name of the external IP address to delete.
1753    /// Resource names are schemeless URIs that follow the conventions in
1754    /// <https://cloud.google.com/apis/design/resource_names>.
1755    /// For example:
1756    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
1757    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1758    pub name: std::string::String,
1759
1760    /// Optional. A request ID to identify requests. Specify a unique request ID
1761    /// so that if you must retry your request, the server will know to ignore
1762    /// the request if it has already been completed. The server guarantees that a
1763    /// request doesn't result in creation of duplicate commitments for at least 60
1764    /// minutes.
1765    ///
1766    /// For example, consider a situation where you make an initial request and the
1767    /// request times out. If you make the request again with the same request
1768    /// ID, the server can check if the original operation with the same request ID
1769    /// was received, and if so, will ignore the second request. This prevents
1770    /// clients from accidentally creating duplicate commitments.
1771    ///
1772    /// The request ID must be a valid UUID with the exception that zero UUID is
1773    /// not supported (00000000-0000-0000-0000-000000000000).
1774    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1775    pub request_id: std::string::String,
1776
1777    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1778    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1779}
1780
1781impl DeleteExternalAddressRequest {
1782    pub fn new() -> Self {
1783        std::default::Default::default()
1784    }
1785
1786    /// Sets the value of [name][crate::model::DeleteExternalAddressRequest::name].
1787    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1788        self.name = v.into();
1789        self
1790    }
1791
1792    /// Sets the value of [request_id][crate::model::DeleteExternalAddressRequest::request_id].
1793    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1794        self.request_id = v.into();
1795        self
1796    }
1797}
1798
1799impl wkt::message::Message for DeleteExternalAddressRequest {
1800    fn typename() -> &'static str {
1801        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAddressRequest"
1802    }
1803}
1804
1805/// Request message for
1806/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
1807///
1808/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
1809#[serde_with::serde_as]
1810#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1811#[serde(default, rename_all = "camelCase")]
1812#[non_exhaustive]
1813pub struct ListSubnetsRequest {
1814    /// Required. The resource name of the private cloud to be queried for
1815    /// subnets.
1816    /// Resource names are schemeless URIs that follow the conventions in
1817    /// <https://cloud.google.com/apis/design/resource_names>.
1818    /// For example:
1819    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1820    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1821    pub parent: std::string::String,
1822
1823    /// The maximum number of subnets to return in one page.
1824    /// The service may return fewer than this value.
1825    /// The maximum value is coerced to 1000.
1826    /// The default value of this field is 500.
1827    #[serde(skip_serializing_if = "wkt::internal::is_default")]
1828    pub page_size: i32,
1829
1830    /// A page token, received from a previous `ListSubnetsRequest` call.
1831    /// Provide this to retrieve the subsequent page.
1832    ///
1833    /// When paginating, all other parameters provided to
1834    /// `ListSubnetsRequest` must match the call that provided the page token.
1835    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1836    pub page_token: std::string::String,
1837
1838    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1839    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1840}
1841
1842impl ListSubnetsRequest {
1843    pub fn new() -> Self {
1844        std::default::Default::default()
1845    }
1846
1847    /// Sets the value of [parent][crate::model::ListSubnetsRequest::parent].
1848    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1849        self.parent = v.into();
1850        self
1851    }
1852
1853    /// Sets the value of [page_size][crate::model::ListSubnetsRequest::page_size].
1854    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1855        self.page_size = v.into();
1856        self
1857    }
1858
1859    /// Sets the value of [page_token][crate::model::ListSubnetsRequest::page_token].
1860    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1861        self.page_token = v.into();
1862        self
1863    }
1864}
1865
1866impl wkt::message::Message for ListSubnetsRequest {
1867    fn typename() -> &'static str {
1868        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsRequest"
1869    }
1870}
1871
1872/// Response message for
1873/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
1874///
1875/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
1876#[serde_with::serde_as]
1877#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1878#[serde(default, rename_all = "camelCase")]
1879#[non_exhaustive]
1880pub struct ListSubnetsResponse {
1881    /// A list of subnets.
1882    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1883    pub subnets: std::vec::Vec<crate::model::Subnet>,
1884
1885    /// A token, which can be sent as `page_token` to retrieve the next page.
1886    /// If this field is omitted, there are no subsequent pages.
1887    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1888    pub next_page_token: std::string::String,
1889
1890    /// Locations that could not be reached when making an aggregated query using
1891    /// wildcards.
1892    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1893    pub unreachable: std::vec::Vec<std::string::String>,
1894
1895    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1896    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1897}
1898
1899impl ListSubnetsResponse {
1900    pub fn new() -> Self {
1901        std::default::Default::default()
1902    }
1903
1904    /// Sets the value of [subnets][crate::model::ListSubnetsResponse::subnets].
1905    pub fn set_subnets<T, V>(mut self, v: T) -> Self
1906    where
1907        T: std::iter::IntoIterator<Item = V>,
1908        V: std::convert::Into<crate::model::Subnet>,
1909    {
1910        use std::iter::Iterator;
1911        self.subnets = v.into_iter().map(|i| i.into()).collect();
1912        self
1913    }
1914
1915    /// Sets the value of [next_page_token][crate::model::ListSubnetsResponse::next_page_token].
1916    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1917        self.next_page_token = v.into();
1918        self
1919    }
1920
1921    /// Sets the value of [unreachable][crate::model::ListSubnetsResponse::unreachable].
1922    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1923    where
1924        T: std::iter::IntoIterator<Item = V>,
1925        V: std::convert::Into<std::string::String>,
1926    {
1927        use std::iter::Iterator;
1928        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1929        self
1930    }
1931}
1932
1933impl wkt::message::Message for ListSubnetsResponse {
1934    fn typename() -> &'static str {
1935        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsResponse"
1936    }
1937}
1938
1939#[doc(hidden)]
1940impl gax::paginator::internal::PageableResponse for ListSubnetsResponse {
1941    type PageItem = crate::model::Subnet;
1942
1943    fn items(self) -> std::vec::Vec<Self::PageItem> {
1944        self.subnets
1945    }
1946
1947    fn next_page_token(&self) -> std::string::String {
1948        use std::clone::Clone;
1949        self.next_page_token.clone()
1950    }
1951}
1952
1953/// Request message for
1954/// [VmwareEngine.GetSubnet][google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]
1955///
1956/// [google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]: crate::client::VmwareEngine::get_subnet
1957#[serde_with::serde_as]
1958#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1959#[serde(default, rename_all = "camelCase")]
1960#[non_exhaustive]
1961pub struct GetSubnetRequest {
1962    /// Required. The resource name of the subnet to retrieve.
1963    /// Resource names are schemeless URIs that follow the conventions in
1964    /// <https://cloud.google.com/apis/design/resource_names>.
1965    /// For example:
1966    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
1967    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1968    pub name: std::string::String,
1969
1970    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1971    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1972}
1973
1974impl GetSubnetRequest {
1975    pub fn new() -> Self {
1976        std::default::Default::default()
1977    }
1978
1979    /// Sets the value of [name][crate::model::GetSubnetRequest::name].
1980    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1981        self.name = v.into();
1982        self
1983    }
1984}
1985
1986impl wkt::message::Message for GetSubnetRequest {
1987    fn typename() -> &'static str {
1988        "type.googleapis.com/google.cloud.vmwareengine.v1.GetSubnetRequest"
1989    }
1990}
1991
1992/// Request message for
1993/// [VmwareEngine.UpdateSubnet][google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]
1994///
1995/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]: crate::client::VmwareEngine::update_subnet
1996#[serde_with::serde_as]
1997#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1998#[serde(default, rename_all = "camelCase")]
1999#[non_exhaustive]
2000pub struct UpdateSubnetRequest {
2001    /// Required. Field mask is used to specify the fields to be overwritten in the
2002    /// `Subnet` resource by the update.
2003    /// The fields specified in the `update_mask` are relative to the resource, not
2004    /// the full request. A field will be overwritten if it is in the mask. If the
2005    /// user does not provide a mask then all fields will be overwritten.
2006    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2007    pub update_mask: std::option::Option<wkt::FieldMask>,
2008
2009    /// Required. Subnet description.
2010    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2011    pub subnet: std::option::Option<crate::model::Subnet>,
2012
2013    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2014    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2015}
2016
2017impl UpdateSubnetRequest {
2018    pub fn new() -> Self {
2019        std::default::Default::default()
2020    }
2021
2022    /// Sets the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
2023    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2024        mut self,
2025        v: T,
2026    ) -> Self {
2027        self.update_mask = v.into();
2028        self
2029    }
2030
2031    /// Sets the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
2032    pub fn set_subnet<T: std::convert::Into<std::option::Option<crate::model::Subnet>>>(
2033        mut self,
2034        v: T,
2035    ) -> Self {
2036        self.subnet = v.into();
2037        self
2038    }
2039}
2040
2041impl wkt::message::Message for UpdateSubnetRequest {
2042    fn typename() -> &'static str {
2043        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateSubnetRequest"
2044    }
2045}
2046
2047/// Request message for
2048/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
2049///
2050/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
2051#[serde_with::serde_as]
2052#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2053#[serde(default, rename_all = "camelCase")]
2054#[non_exhaustive]
2055pub struct ListExternalAccessRulesRequest {
2056    /// Required. The resource name of the network policy to query for external
2057    /// access firewall rules. Resource names are schemeless URIs that follow the
2058    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
2059    /// example:
2060    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
2061    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2062    pub parent: std::string::String,
2063
2064    /// The maximum number of external access rules to return in one page.
2065    /// The service may return fewer than this value.
2066    /// The maximum value is coerced to 1000.
2067    /// The default value of this field is 500.
2068    #[serde(skip_serializing_if = "wkt::internal::is_default")]
2069    pub page_size: i32,
2070
2071    /// A page token, received from a previous `ListExternalAccessRulesRequest`
2072    /// call. Provide this to retrieve the subsequent page.
2073    ///
2074    /// When paginating, all other parameters provided to
2075    /// `ListExternalAccessRulesRequest` must match the call that provided the page
2076    /// token.
2077    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2078    pub page_token: std::string::String,
2079
2080    /// A filter expression that matches resources returned in the response.
2081    /// The expression must specify the field name, a comparison
2082    /// operator, and the value that you want to use for filtering. The value
2083    /// must be a string, a number, or a boolean. The comparison operator
2084    /// must be `=`, `!=`, `>`, or `<`.
2085    ///
2086    /// For example, if you are filtering a list of external access rules, you can
2087    /// exclude the ones named `example-rule` by specifying
2088    /// `name != "example-rule"`.
2089    ///
2090    /// To filter on multiple expressions, provide each separate expression within
2091    /// parentheses. For example:
2092    ///
2093    /// ```norust
2094    /// (name = "example-rule")
2095    /// (createTime > "2021-04-12T08:15:10.40Z")
2096    /// ```
2097    ///
2098    /// By default, each expression is an `AND` expression. However, you
2099    /// can include `AND` and `OR` expressions explicitly.
2100    /// For example:
2101    ///
2102    /// ```norust
2103    /// (name = "example-rule-1") AND
2104    /// (createTime > "2021-04-12T08:15:10.40Z") OR
2105    /// (name = "example-rule-2")
2106    /// ```
2107    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2108    pub filter: std::string::String,
2109
2110    /// Sorts list results by a certain order. By default, returned results
2111    /// are ordered by `name` in ascending order.
2112    /// You can also sort results in descending order based on the `name` value
2113    /// using `orderBy="name desc"`.
2114    /// Currently, only ordering by `name` is supported.
2115    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2116    pub order_by: std::string::String,
2117
2118    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2119    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2120}
2121
2122impl ListExternalAccessRulesRequest {
2123    pub fn new() -> Self {
2124        std::default::Default::default()
2125    }
2126
2127    /// Sets the value of [parent][crate::model::ListExternalAccessRulesRequest::parent].
2128    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2129        self.parent = v.into();
2130        self
2131    }
2132
2133    /// Sets the value of [page_size][crate::model::ListExternalAccessRulesRequest::page_size].
2134    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2135        self.page_size = v.into();
2136        self
2137    }
2138
2139    /// Sets the value of [page_token][crate::model::ListExternalAccessRulesRequest::page_token].
2140    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2141        self.page_token = v.into();
2142        self
2143    }
2144
2145    /// Sets the value of [filter][crate::model::ListExternalAccessRulesRequest::filter].
2146    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2147        self.filter = v.into();
2148        self
2149    }
2150
2151    /// Sets the value of [order_by][crate::model::ListExternalAccessRulesRequest::order_by].
2152    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2153        self.order_by = v.into();
2154        self
2155    }
2156}
2157
2158impl wkt::message::Message for ListExternalAccessRulesRequest {
2159    fn typename() -> &'static str {
2160        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest"
2161    }
2162}
2163
2164/// Response message for
2165/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
2166///
2167/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
2168#[serde_with::serde_as]
2169#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2170#[serde(default, rename_all = "camelCase")]
2171#[non_exhaustive]
2172pub struct ListExternalAccessRulesResponse {
2173    /// A list of external access firewall rules.
2174    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2175    pub external_access_rules: std::vec::Vec<crate::model::ExternalAccessRule>,
2176
2177    /// A token, which can be sent as `page_token` to retrieve the next page.
2178    /// If this field is omitted, there are no subsequent pages.
2179    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2180    pub next_page_token: std::string::String,
2181
2182    /// Locations that could not be reached when making an aggregated query using
2183    /// wildcards.
2184    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2185    pub unreachable: std::vec::Vec<std::string::String>,
2186
2187    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2188    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2189}
2190
2191impl ListExternalAccessRulesResponse {
2192    pub fn new() -> Self {
2193        std::default::Default::default()
2194    }
2195
2196    /// Sets the value of [external_access_rules][crate::model::ListExternalAccessRulesResponse::external_access_rules].
2197    pub fn set_external_access_rules<T, V>(mut self, v: T) -> Self
2198    where
2199        T: std::iter::IntoIterator<Item = V>,
2200        V: std::convert::Into<crate::model::ExternalAccessRule>,
2201    {
2202        use std::iter::Iterator;
2203        self.external_access_rules = v.into_iter().map(|i| i.into()).collect();
2204        self
2205    }
2206
2207    /// Sets the value of [next_page_token][crate::model::ListExternalAccessRulesResponse::next_page_token].
2208    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2209        self.next_page_token = v.into();
2210        self
2211    }
2212
2213    /// Sets the value of [unreachable][crate::model::ListExternalAccessRulesResponse::unreachable].
2214    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2215    where
2216        T: std::iter::IntoIterator<Item = V>,
2217        V: std::convert::Into<std::string::String>,
2218    {
2219        use std::iter::Iterator;
2220        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2221        self
2222    }
2223}
2224
2225impl wkt::message::Message for ListExternalAccessRulesResponse {
2226    fn typename() -> &'static str {
2227        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesResponse"
2228    }
2229}
2230
2231#[doc(hidden)]
2232impl gax::paginator::internal::PageableResponse for ListExternalAccessRulesResponse {
2233    type PageItem = crate::model::ExternalAccessRule;
2234
2235    fn items(self) -> std::vec::Vec<Self::PageItem> {
2236        self.external_access_rules
2237    }
2238
2239    fn next_page_token(&self) -> std::string::String {
2240        use std::clone::Clone;
2241        self.next_page_token.clone()
2242    }
2243}
2244
2245/// Request message for
2246/// [VmwareEngine.GetExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]
2247///
2248/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]: crate::client::VmwareEngine::get_external_access_rule
2249#[serde_with::serde_as]
2250#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2251#[serde(default, rename_all = "camelCase")]
2252#[non_exhaustive]
2253pub struct GetExternalAccessRuleRequest {
2254    /// Required. The resource name of the external access firewall rule to
2255    /// retrieve. Resource names are schemeless URIs that follow the conventions in
2256    /// <https://cloud.google.com/apis/design/resource_names>.
2257    /// For example:
2258    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
2259    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2260    pub name: std::string::String,
2261
2262    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2263    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2264}
2265
2266impl GetExternalAccessRuleRequest {
2267    pub fn new() -> Self {
2268        std::default::Default::default()
2269    }
2270
2271    /// Sets the value of [name][crate::model::GetExternalAccessRuleRequest::name].
2272    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2273        self.name = v.into();
2274        self
2275    }
2276}
2277
2278impl wkt::message::Message for GetExternalAccessRuleRequest {
2279    fn typename() -> &'static str {
2280        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest"
2281    }
2282}
2283
2284/// Request message for
2285/// [VmwareEngine.CreateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]
2286///
2287/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]: crate::client::VmwareEngine::create_external_access_rule
2288#[serde_with::serde_as]
2289#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2290#[serde(default, rename_all = "camelCase")]
2291#[non_exhaustive]
2292pub struct CreateExternalAccessRuleRequest {
2293    /// Required. The resource name of the network policy
2294    /// to create a new external access firewall rule in.
2295    /// Resource names are schemeless URIs that follow the conventions in
2296    /// <https://cloud.google.com/apis/design/resource_names>.
2297    /// For example:
2298    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
2299    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2300    pub parent: std::string::String,
2301
2302    /// Required. The initial description of a new external access rule.
2303    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2304    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2305
2306    /// Required. The user-provided identifier of the `ExternalAccessRule` to be
2307    /// created. This identifier must be unique among `ExternalAccessRule`
2308    /// resources within the parent and becomes the final token in the name URI.
2309    /// The identifier must meet the following requirements:
2310    ///
2311    /// * Only contains 1-63 alphanumeric characters and hyphens
2312    /// * Begins with an alphabetical character
2313    /// * Ends with a non-hyphen character
2314    /// * Not formatted as a UUID
2315    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
2316    ///   (section 3.5)
2317    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2318    pub external_access_rule_id: std::string::String,
2319
2320    /// A request ID to identify requests. Specify a unique request ID
2321    /// so that if you must retry your request, the server will know to ignore
2322    /// the request if it has already been completed. The server guarantees that a
2323    /// request doesn't result in creation of duplicate commitments for at least 60
2324    /// minutes.
2325    ///
2326    /// For example, consider a situation where you make an initial request and the
2327    /// request times out. If you make the request again with the same request ID,
2328    /// the server can check if the original operation with the same request ID was
2329    /// received, and if so, will ignore the second request. This prevents clients
2330    /// from accidentally creating duplicate commitments.
2331    ///
2332    /// The request ID must be a valid UUID with the exception that zero UUID is
2333    /// not supported (00000000-0000-0000-0000-000000000000).
2334    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2335    pub request_id: std::string::String,
2336
2337    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2338    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2339}
2340
2341impl CreateExternalAccessRuleRequest {
2342    pub fn new() -> Self {
2343        std::default::Default::default()
2344    }
2345
2346    /// Sets the value of [parent][crate::model::CreateExternalAccessRuleRequest::parent].
2347    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2348        self.parent = v.into();
2349        self
2350    }
2351
2352    /// Sets the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
2353    pub fn set_external_access_rule<
2354        T: std::convert::Into<std::option::Option<crate::model::ExternalAccessRule>>,
2355    >(
2356        mut self,
2357        v: T,
2358    ) -> Self {
2359        self.external_access_rule = v.into();
2360        self
2361    }
2362
2363    /// Sets the value of [external_access_rule_id][crate::model::CreateExternalAccessRuleRequest::external_access_rule_id].
2364    pub fn set_external_access_rule_id<T: std::convert::Into<std::string::String>>(
2365        mut self,
2366        v: T,
2367    ) -> Self {
2368        self.external_access_rule_id = v.into();
2369        self
2370    }
2371
2372    /// Sets the value of [request_id][crate::model::CreateExternalAccessRuleRequest::request_id].
2373    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2374        self.request_id = v.into();
2375        self
2376    }
2377}
2378
2379impl wkt::message::Message for CreateExternalAccessRuleRequest {
2380    fn typename() -> &'static str {
2381        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest"
2382    }
2383}
2384
2385/// Request message for
2386/// [VmwareEngine.UpdateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]
2387///
2388/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]: crate::client::VmwareEngine::update_external_access_rule
2389#[serde_with::serde_as]
2390#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2391#[serde(default, rename_all = "camelCase")]
2392#[non_exhaustive]
2393pub struct UpdateExternalAccessRuleRequest {
2394    /// Required. Field mask is used to specify the fields to be overwritten in the
2395    /// `ExternalAccessRule` resource by the update.
2396    /// The fields specified in the `update_mask` are relative to the resource, not
2397    /// the full request. A field will be overwritten if it is in the mask. If the
2398    /// user does not provide a mask then all fields will be overwritten.
2399    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2400    pub update_mask: std::option::Option<wkt::FieldMask>,
2401
2402    /// Required. Description of the external access rule.
2403    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2404    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2405
2406    /// Optional. A request ID to identify requests. Specify a unique request ID
2407    /// so that if you must retry your request, the server will know to ignore
2408    /// the request if it has already been completed. The server guarantees that a
2409    /// request doesn't result in creation of duplicate commitments for at least 60
2410    /// minutes.
2411    ///
2412    /// For example, consider a situation where you make an initial request and the
2413    /// request times out. If you make the request again with the same request ID,
2414    /// the server can check if the original operation with the same request ID was
2415    /// received, and if so, will ignore the second request. This prevents clients
2416    /// from accidentally creating duplicate commitments.
2417    ///
2418    /// The request ID must be a valid UUID with the exception that zero UUID is
2419    /// not supported (00000000-0000-0000-0000-000000000000).
2420    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2421    pub request_id: std::string::String,
2422
2423    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2424    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2425}
2426
2427impl UpdateExternalAccessRuleRequest {
2428    pub fn new() -> Self {
2429        std::default::Default::default()
2430    }
2431
2432    /// Sets the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
2433    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2434        mut self,
2435        v: T,
2436    ) -> Self {
2437        self.update_mask = v.into();
2438        self
2439    }
2440
2441    /// Sets the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
2442    pub fn set_external_access_rule<
2443        T: std::convert::Into<std::option::Option<crate::model::ExternalAccessRule>>,
2444    >(
2445        mut self,
2446        v: T,
2447    ) -> Self {
2448        self.external_access_rule = v.into();
2449        self
2450    }
2451
2452    /// Sets the value of [request_id][crate::model::UpdateExternalAccessRuleRequest::request_id].
2453    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2454        self.request_id = v.into();
2455        self
2456    }
2457}
2458
2459impl wkt::message::Message for UpdateExternalAccessRuleRequest {
2460    fn typename() -> &'static str {
2461        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest"
2462    }
2463}
2464
2465/// Request message for
2466/// [VmwareEngine.DeleteExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]
2467///
2468/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]: crate::client::VmwareEngine::delete_external_access_rule
2469#[serde_with::serde_as]
2470#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2471#[serde(default, rename_all = "camelCase")]
2472#[non_exhaustive]
2473pub struct DeleteExternalAccessRuleRequest {
2474    /// Required. The resource name of the external access firewall rule to delete.
2475    /// Resource names are schemeless URIs that follow the conventions in
2476    /// <https://cloud.google.com/apis/design/resource_names>.
2477    /// For example:
2478    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
2479    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2480    pub name: std::string::String,
2481
2482    /// Optional. A request ID to identify requests. Specify a unique request ID
2483    /// so that if you must retry your request, the server will know to ignore
2484    /// the request if it has already been completed. The server guarantees that a
2485    /// request doesn't result in creation of duplicate commitments for at least 60
2486    /// minutes.
2487    ///
2488    /// For example, consider a situation where you make an initial request and the
2489    /// request times out. If you make the request again with the same request
2490    /// ID, the server can check if the original operation with the same request ID
2491    /// was received, and if so, will ignore the second request. This prevents
2492    /// clients from accidentally creating duplicate commitments.
2493    ///
2494    /// The request ID must be a valid UUID with the exception that zero UUID is
2495    /// not supported (00000000-0000-0000-0000-000000000000).
2496    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2497    pub request_id: std::string::String,
2498
2499    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2500    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2501}
2502
2503impl DeleteExternalAccessRuleRequest {
2504    pub fn new() -> Self {
2505        std::default::Default::default()
2506    }
2507
2508    /// Sets the value of [name][crate::model::DeleteExternalAccessRuleRequest::name].
2509    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2510        self.name = v.into();
2511        self
2512    }
2513
2514    /// Sets the value of [request_id][crate::model::DeleteExternalAccessRuleRequest::request_id].
2515    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2516        self.request_id = v.into();
2517        self
2518    }
2519}
2520
2521impl wkt::message::Message for DeleteExternalAccessRuleRequest {
2522    fn typename() -> &'static str {
2523        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest"
2524    }
2525}
2526
2527/// Request message for
2528/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
2529///
2530/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
2531#[serde_with::serde_as]
2532#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2533#[serde(default, rename_all = "camelCase")]
2534#[non_exhaustive]
2535pub struct ListLoggingServersRequest {
2536    /// Required. The resource name of the private cloud to be queried for
2537    /// logging servers.
2538    /// Resource names are schemeless URIs that follow the conventions in
2539    /// <https://cloud.google.com/apis/design/resource_names>.
2540    /// For example:
2541    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
2542    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2543    pub parent: std::string::String,
2544
2545    /// The maximum number of logging servers to return in one page.
2546    /// The service may return fewer than this value.
2547    /// The maximum value is coerced to 1000.
2548    /// The default value of this field is 500.
2549    #[serde(skip_serializing_if = "wkt::internal::is_default")]
2550    pub page_size: i32,
2551
2552    /// A page token, received from a previous `ListLoggingServersRequest` call.
2553    /// Provide this to retrieve the subsequent page.
2554    ///
2555    /// When paginating, all other parameters provided to
2556    /// `ListLoggingServersRequest` must match the call that provided the page
2557    /// token.
2558    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2559    pub page_token: std::string::String,
2560
2561    /// A filter expression that matches resources returned in the response.
2562    /// The expression must specify the field name, a comparison
2563    /// operator, and the value that you want to use for filtering. The value
2564    /// must be a string, a number, or a boolean. The comparison operator
2565    /// must be `=`, `!=`, `>`, or `<`.
2566    ///
2567    /// For example, if you are filtering a list of logging servers, you can
2568    /// exclude the ones named `example-server` by specifying
2569    /// `name != "example-server"`.
2570    ///
2571    /// To filter on multiple expressions, provide each separate expression within
2572    /// parentheses. For example:
2573    ///
2574    /// ```norust
2575    /// (name = "example-server")
2576    /// (createTime > "2021-04-12T08:15:10.40Z")
2577    /// ```
2578    ///
2579    /// By default, each expression is an `AND` expression. However, you
2580    /// can include `AND` and `OR` expressions explicitly.
2581    /// For example:
2582    ///
2583    /// ```norust
2584    /// (name = "example-server-1") AND
2585    /// (createTime > "2021-04-12T08:15:10.40Z") OR
2586    /// (name = "example-server-2")
2587    /// ```
2588    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2589    pub filter: std::string::String,
2590
2591    /// Sorts list results by a certain order. By default, returned results
2592    /// are ordered by `name` in ascending order.
2593    /// You can also sort results in descending order based on the `name` value
2594    /// using `orderBy="name desc"`.
2595    /// Currently, only ordering by `name` is supported.
2596    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2597    pub order_by: std::string::String,
2598
2599    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2600    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2601}
2602
2603impl ListLoggingServersRequest {
2604    pub fn new() -> Self {
2605        std::default::Default::default()
2606    }
2607
2608    /// Sets the value of [parent][crate::model::ListLoggingServersRequest::parent].
2609    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2610        self.parent = v.into();
2611        self
2612    }
2613
2614    /// Sets the value of [page_size][crate::model::ListLoggingServersRequest::page_size].
2615    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2616        self.page_size = v.into();
2617        self
2618    }
2619
2620    /// Sets the value of [page_token][crate::model::ListLoggingServersRequest::page_token].
2621    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2622        self.page_token = v.into();
2623        self
2624    }
2625
2626    /// Sets the value of [filter][crate::model::ListLoggingServersRequest::filter].
2627    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2628        self.filter = v.into();
2629        self
2630    }
2631
2632    /// Sets the value of [order_by][crate::model::ListLoggingServersRequest::order_by].
2633    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2634        self.order_by = v.into();
2635        self
2636    }
2637}
2638
2639impl wkt::message::Message for ListLoggingServersRequest {
2640    fn typename() -> &'static str {
2641        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersRequest"
2642    }
2643}
2644
2645/// Response message for
2646/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
2647///
2648/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
2649#[serde_with::serde_as]
2650#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2651#[serde(default, rename_all = "camelCase")]
2652#[non_exhaustive]
2653pub struct ListLoggingServersResponse {
2654    /// A list of Logging Servers.
2655    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2656    pub logging_servers: std::vec::Vec<crate::model::LoggingServer>,
2657
2658    /// A token, which can be send as `page_token` to retrieve the next page.
2659    /// If this field is omitted, there are no subsequent pages.
2660    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2661    pub next_page_token: std::string::String,
2662
2663    /// Locations that could not be reached when making an aggregated query using
2664    /// wildcards.
2665    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2666    pub unreachable: std::vec::Vec<std::string::String>,
2667
2668    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2669    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2670}
2671
2672impl ListLoggingServersResponse {
2673    pub fn new() -> Self {
2674        std::default::Default::default()
2675    }
2676
2677    /// Sets the value of [logging_servers][crate::model::ListLoggingServersResponse::logging_servers].
2678    pub fn set_logging_servers<T, V>(mut self, v: T) -> Self
2679    where
2680        T: std::iter::IntoIterator<Item = V>,
2681        V: std::convert::Into<crate::model::LoggingServer>,
2682    {
2683        use std::iter::Iterator;
2684        self.logging_servers = v.into_iter().map(|i| i.into()).collect();
2685        self
2686    }
2687
2688    /// Sets the value of [next_page_token][crate::model::ListLoggingServersResponse::next_page_token].
2689    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2690        self.next_page_token = v.into();
2691        self
2692    }
2693
2694    /// Sets the value of [unreachable][crate::model::ListLoggingServersResponse::unreachable].
2695    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2696    where
2697        T: std::iter::IntoIterator<Item = V>,
2698        V: std::convert::Into<std::string::String>,
2699    {
2700        use std::iter::Iterator;
2701        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2702        self
2703    }
2704}
2705
2706impl wkt::message::Message for ListLoggingServersResponse {
2707    fn typename() -> &'static str {
2708        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersResponse"
2709    }
2710}
2711
2712#[doc(hidden)]
2713impl gax::paginator::internal::PageableResponse for ListLoggingServersResponse {
2714    type PageItem = crate::model::LoggingServer;
2715
2716    fn items(self) -> std::vec::Vec<Self::PageItem> {
2717        self.logging_servers
2718    }
2719
2720    fn next_page_token(&self) -> std::string::String {
2721        use std::clone::Clone;
2722        self.next_page_token.clone()
2723    }
2724}
2725
2726/// Request message for
2727/// [VmwareEngine.GetLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]
2728///
2729/// [google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]: crate::client::VmwareEngine::get_logging_server
2730#[serde_with::serde_as]
2731#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2732#[serde(default, rename_all = "camelCase")]
2733#[non_exhaustive]
2734pub struct GetLoggingServerRequest {
2735    /// Required. The resource name of the Logging Server to retrieve.
2736    /// Resource names are schemeless URIs that follow the conventions in
2737    /// <https://cloud.google.com/apis/design/resource_names>.
2738    /// For example:
2739    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
2740    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2741    pub name: std::string::String,
2742
2743    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2744    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2745}
2746
2747impl GetLoggingServerRequest {
2748    pub fn new() -> Self {
2749        std::default::Default::default()
2750    }
2751
2752    /// Sets the value of [name][crate::model::GetLoggingServerRequest::name].
2753    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2754        self.name = v.into();
2755        self
2756    }
2757}
2758
2759impl wkt::message::Message for GetLoggingServerRequest {
2760    fn typename() -> &'static str {
2761        "type.googleapis.com/google.cloud.vmwareengine.v1.GetLoggingServerRequest"
2762    }
2763}
2764
2765/// Request message for
2766/// [VmwareEngine.CreateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]
2767///
2768/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]: crate::client::VmwareEngine::create_logging_server
2769#[serde_with::serde_as]
2770#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2771#[serde(default, rename_all = "camelCase")]
2772#[non_exhaustive]
2773pub struct CreateLoggingServerRequest {
2774    /// Required. The resource name of the private cloud
2775    /// to create a new Logging Server in.
2776    /// Resource names are schemeless URIs that follow the conventions in
2777    /// <https://cloud.google.com/apis/design/resource_names>.
2778    /// For example:
2779    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
2780    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2781    pub parent: std::string::String,
2782
2783    /// Required. The initial description of a new logging server.
2784    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2785    pub logging_server: std::option::Option<crate::model::LoggingServer>,
2786
2787    /// Required. The user-provided identifier of the `LoggingServer` to be
2788    /// created. This identifier must be unique among `LoggingServer` resources
2789    /// within the parent and becomes the final token in the name URI.
2790    /// The identifier must meet the following requirements:
2791    ///
2792    /// * Only contains 1-63 alphanumeric characters and hyphens
2793    /// * Begins with an alphabetical character
2794    /// * Ends with a non-hyphen character
2795    /// * Not formatted as a UUID
2796    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
2797    ///   (section 3.5)
2798    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2799    pub logging_server_id: std::string::String,
2800
2801    /// Optional. A request ID to identify requests. Specify a unique request ID
2802    /// so that if you must retry your request, the server will know to ignore
2803    /// the request if it has already been completed. The server guarantees that a
2804    /// request doesn't result in creation of duplicate commitments for at least 60
2805    /// minutes.
2806    ///
2807    /// For example, consider a situation where you make an initial request and the
2808    /// request times out. If you make the request again with the same request ID,
2809    /// the server can check if original operation with the same request ID was
2810    /// received, and if so, will ignore the second request. This prevents clients
2811    /// from accidentally creating duplicate commitments.
2812    ///
2813    /// The request ID must be a valid UUID with the exception that zero UUID is
2814    /// not supported (00000000-0000-0000-0000-000000000000).
2815    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2816    pub request_id: std::string::String,
2817
2818    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2819    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2820}
2821
2822impl CreateLoggingServerRequest {
2823    pub fn new() -> Self {
2824        std::default::Default::default()
2825    }
2826
2827    /// Sets the value of [parent][crate::model::CreateLoggingServerRequest::parent].
2828    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2829        self.parent = v.into();
2830        self
2831    }
2832
2833    /// Sets the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
2834    pub fn set_logging_server<
2835        T: std::convert::Into<std::option::Option<crate::model::LoggingServer>>,
2836    >(
2837        mut self,
2838        v: T,
2839    ) -> Self {
2840        self.logging_server = v.into();
2841        self
2842    }
2843
2844    /// Sets the value of [logging_server_id][crate::model::CreateLoggingServerRequest::logging_server_id].
2845    pub fn set_logging_server_id<T: std::convert::Into<std::string::String>>(
2846        mut self,
2847        v: T,
2848    ) -> Self {
2849        self.logging_server_id = v.into();
2850        self
2851    }
2852
2853    /// Sets the value of [request_id][crate::model::CreateLoggingServerRequest::request_id].
2854    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2855        self.request_id = v.into();
2856        self
2857    }
2858}
2859
2860impl wkt::message::Message for CreateLoggingServerRequest {
2861    fn typename() -> &'static str {
2862        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateLoggingServerRequest"
2863    }
2864}
2865
2866/// Request message for
2867/// [VmwareEngine.UpdateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]
2868///
2869/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]: crate::client::VmwareEngine::update_logging_server
2870#[serde_with::serde_as]
2871#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2872#[serde(default, rename_all = "camelCase")]
2873#[non_exhaustive]
2874pub struct UpdateLoggingServerRequest {
2875    /// Required. Field mask is used to specify the fields to be overwritten in the
2876    /// `LoggingServer` resource by the update.
2877    /// The fields specified in the `update_mask` are relative to the resource, not
2878    /// the full request. A field will be overwritten if it is in the mask. If the
2879    /// user does not provide a mask then all fields will be overwritten.
2880    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2881    pub update_mask: std::option::Option<wkt::FieldMask>,
2882
2883    /// Required. Logging server description.
2884    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2885    pub logging_server: std::option::Option<crate::model::LoggingServer>,
2886
2887    /// Optional. A request ID to identify requests. Specify a unique request ID
2888    /// so that if you must retry your request, the server will know to ignore
2889    /// the request if it has already been completed. The server guarantees that a
2890    /// request doesn't result in creation of duplicate commitments for at least 60
2891    /// minutes.
2892    ///
2893    /// For example, consider a situation where you make an initial request and the
2894    /// request times out. If you make the request again with the same request ID,
2895    /// the server can check if original operation with the same request ID was
2896    /// received, and if so, will ignore the second request. This prevents clients
2897    /// from accidentally creating duplicate commitments.
2898    ///
2899    /// The request ID must be a valid UUID with the exception that zero UUID is
2900    /// not supported (00000000-0000-0000-0000-000000000000).
2901    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2902    pub request_id: std::string::String,
2903
2904    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2905    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2906}
2907
2908impl UpdateLoggingServerRequest {
2909    pub fn new() -> Self {
2910        std::default::Default::default()
2911    }
2912
2913    /// Sets the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
2914    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2915        mut self,
2916        v: T,
2917    ) -> Self {
2918        self.update_mask = v.into();
2919        self
2920    }
2921
2922    /// Sets the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
2923    pub fn set_logging_server<
2924        T: std::convert::Into<std::option::Option<crate::model::LoggingServer>>,
2925    >(
2926        mut self,
2927        v: T,
2928    ) -> Self {
2929        self.logging_server = v.into();
2930        self
2931    }
2932
2933    /// Sets the value of [request_id][crate::model::UpdateLoggingServerRequest::request_id].
2934    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2935        self.request_id = v.into();
2936        self
2937    }
2938}
2939
2940impl wkt::message::Message for UpdateLoggingServerRequest {
2941    fn typename() -> &'static str {
2942        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateLoggingServerRequest"
2943    }
2944}
2945
2946/// Request message for
2947/// [VmwareEngine.DeleteLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]
2948///
2949/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]: crate::client::VmwareEngine::delete_logging_server
2950#[serde_with::serde_as]
2951#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2952#[serde(default, rename_all = "camelCase")]
2953#[non_exhaustive]
2954pub struct DeleteLoggingServerRequest {
2955    /// Required. The resource name of the logging server to delete.
2956    /// Resource names are schemeless URIs that follow the conventions in
2957    /// <https://cloud.google.com/apis/design/resource_names>.
2958    /// For example:
2959    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
2960    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2961    pub name: std::string::String,
2962
2963    /// Optional. A request ID to identify requests. Specify a unique request ID
2964    /// so that if you must retry your request, the server will know to ignore
2965    /// the request if it has already been completed. The server guarantees that a
2966    /// request doesn't result in creation of duplicate commitments for at least 60
2967    /// minutes.
2968    ///
2969    /// For example, consider a situation where you make an initial request and the
2970    /// request times out. If you make the request again with the same request
2971    /// ID, the server can check if original operation with the same request ID
2972    /// was received, and if so, will ignore the second request. This prevents
2973    /// clients from accidentally creating duplicate commitments.
2974    ///
2975    /// The request ID must be a valid UUID with the exception that zero UUID is
2976    /// not supported (00000000-0000-0000-0000-000000000000).
2977    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2978    pub request_id: std::string::String,
2979
2980    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2981    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2982}
2983
2984impl DeleteLoggingServerRequest {
2985    pub fn new() -> Self {
2986        std::default::Default::default()
2987    }
2988
2989    /// Sets the value of [name][crate::model::DeleteLoggingServerRequest::name].
2990    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2991        self.name = v.into();
2992        self
2993    }
2994
2995    /// Sets the value of [request_id][crate::model::DeleteLoggingServerRequest::request_id].
2996    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2997        self.request_id = v.into();
2998        self
2999    }
3000}
3001
3002impl wkt::message::Message for DeleteLoggingServerRequest {
3003    fn typename() -> &'static str {
3004        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteLoggingServerRequest"
3005    }
3006}
3007
3008/// Represents the metadata of the long-running operation.
3009#[serde_with::serde_as]
3010#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3011#[serde(default, rename_all = "camelCase")]
3012#[non_exhaustive]
3013pub struct OperationMetadata {
3014    /// Output only. The time the operation was created.
3015    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3016    pub create_time: std::option::Option<wkt::Timestamp>,
3017
3018    /// Output only. The time the operation finished running.
3019    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3020    pub end_time: std::option::Option<wkt::Timestamp>,
3021
3022    /// Output only. Server-defined resource path for the target of the operation.
3023    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3024    pub target: std::string::String,
3025
3026    /// Output only. Name of the verb executed by the operation.
3027    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3028    pub verb: std::string::String,
3029
3030    /// Output only. Human-readable status of the operation, if any.
3031    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3032    pub status_message: std::string::String,
3033
3034    /// Output only. True if the user has requested cancellation
3035    /// of the operation; false otherwise.
3036    /// Operations that have successfully been cancelled
3037    /// have [Operation.error][] value with a
3038    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
3039    /// `Code.CANCELLED`.
3040    ///
3041    /// [google.rpc.Status.code]: rpc::model::Status::code
3042    #[serde(skip_serializing_if = "wkt::internal::is_default")]
3043    pub requested_cancellation: bool,
3044
3045    /// Output only. API version used to start the operation.
3046    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3047    pub api_version: std::string::String,
3048
3049    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3050    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3051}
3052
3053impl OperationMetadata {
3054    pub fn new() -> Self {
3055        std::default::Default::default()
3056    }
3057
3058    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
3059    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3060        mut self,
3061        v: T,
3062    ) -> Self {
3063        self.create_time = v.into();
3064        self
3065    }
3066
3067    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
3068    pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3069        mut self,
3070        v: T,
3071    ) -> Self {
3072        self.end_time = v.into();
3073        self
3074    }
3075
3076    /// Sets the value of [target][crate::model::OperationMetadata::target].
3077    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3078        self.target = v.into();
3079        self
3080    }
3081
3082    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
3083    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3084        self.verb = v.into();
3085        self
3086    }
3087
3088    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
3089    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3090        self.status_message = v.into();
3091        self
3092    }
3093
3094    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
3095    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3096        self.requested_cancellation = v.into();
3097        self
3098    }
3099
3100    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
3101    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3102        self.api_version = v.into();
3103        self
3104    }
3105}
3106
3107impl wkt::message::Message for OperationMetadata {
3108    fn typename() -> &'static str {
3109        "type.googleapis.com/google.cloud.vmwareengine.v1.OperationMetadata"
3110    }
3111}
3112
3113/// Request message for
3114/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
3115///
3116/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
3117#[serde_with::serde_as]
3118#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3119#[serde(default, rename_all = "camelCase")]
3120#[non_exhaustive]
3121pub struct ListNodeTypesRequest {
3122    /// Required. The resource name of the location to be queried for node types.
3123    /// Resource names are schemeless URIs that follow the conventions in
3124    /// <https://cloud.google.com/apis/design/resource_names>.
3125    /// For example:
3126    /// `projects/my-project/locations/us-central1-a`
3127    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3128    pub parent: std::string::String,
3129
3130    /// The maximum number of node types to return in one page.
3131    /// The service may return fewer than this value.
3132    /// The maximum value is coerced to 1000.
3133    /// The default value of this field is 500.
3134    #[serde(skip_serializing_if = "wkt::internal::is_default")]
3135    pub page_size: i32,
3136
3137    /// A page token, received from a previous `ListNodeTypes` call.
3138    /// Provide this to retrieve the subsequent page.
3139    ///
3140    /// When paginating, all other parameters provided to
3141    /// `ListNodeTypes` must match the call that provided the page token.
3142    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3143    pub page_token: std::string::String,
3144
3145    /// A filter expression that matches resources returned in the response.
3146    /// The expression must specify the field name, a comparison
3147    /// operator, and the value that you want to use for filtering. The value
3148    /// must be a string, a number, or a boolean. The comparison operator
3149    /// must be `=`, `!=`, `>`, or `<`.
3150    ///
3151    /// For example, if you are filtering a list of node types, you can
3152    /// exclude the ones named `standard-72` by specifying
3153    /// `name != "standard-72"`.
3154    ///
3155    /// To filter on multiple expressions, provide each separate expression within
3156    /// parentheses. For example:
3157    ///
3158    /// ```norust
3159    /// (name = "standard-72")
3160    /// (virtual_cpu_count > 2)
3161    /// ```
3162    ///
3163    /// By default, each expression is an `AND` expression. However, you
3164    /// can include `AND` and `OR` expressions explicitly.
3165    /// For example:
3166    ///
3167    /// ```norust
3168    /// (name = "standard-96") AND
3169    /// (virtual_cpu_count > 2) OR
3170    /// (name = "standard-72")
3171    /// ```
3172    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3173    pub filter: std::string::String,
3174
3175    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3176    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3177}
3178
3179impl ListNodeTypesRequest {
3180    pub fn new() -> Self {
3181        std::default::Default::default()
3182    }
3183
3184    /// Sets the value of [parent][crate::model::ListNodeTypesRequest::parent].
3185    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3186        self.parent = v.into();
3187        self
3188    }
3189
3190    /// Sets the value of [page_size][crate::model::ListNodeTypesRequest::page_size].
3191    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3192        self.page_size = v.into();
3193        self
3194    }
3195
3196    /// Sets the value of [page_token][crate::model::ListNodeTypesRequest::page_token].
3197    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3198        self.page_token = v.into();
3199        self
3200    }
3201
3202    /// Sets the value of [filter][crate::model::ListNodeTypesRequest::filter].
3203    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3204        self.filter = v.into();
3205        self
3206    }
3207}
3208
3209impl wkt::message::Message for ListNodeTypesRequest {
3210    fn typename() -> &'static str {
3211        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesRequest"
3212    }
3213}
3214
3215/// Response message for
3216/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
3217///
3218/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
3219#[serde_with::serde_as]
3220#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3221#[serde(default, rename_all = "camelCase")]
3222#[non_exhaustive]
3223pub struct ListNodeTypesResponse {
3224    /// A list of Node Types.
3225    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3226    pub node_types: std::vec::Vec<crate::model::NodeType>,
3227
3228    /// A token, which can be sent as `page_token` to retrieve the next page.
3229    /// If this field is omitted, there are no subsequent pages.
3230    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3231    pub next_page_token: std::string::String,
3232
3233    /// Locations that could not be reached when making an aggregated query using
3234    /// wildcards.
3235    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3236    pub unreachable: std::vec::Vec<std::string::String>,
3237
3238    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3239    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3240}
3241
3242impl ListNodeTypesResponse {
3243    pub fn new() -> Self {
3244        std::default::Default::default()
3245    }
3246
3247    /// Sets the value of [node_types][crate::model::ListNodeTypesResponse::node_types].
3248    pub fn set_node_types<T, V>(mut self, v: T) -> Self
3249    where
3250        T: std::iter::IntoIterator<Item = V>,
3251        V: std::convert::Into<crate::model::NodeType>,
3252    {
3253        use std::iter::Iterator;
3254        self.node_types = v.into_iter().map(|i| i.into()).collect();
3255        self
3256    }
3257
3258    /// Sets the value of [next_page_token][crate::model::ListNodeTypesResponse::next_page_token].
3259    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3260        self.next_page_token = v.into();
3261        self
3262    }
3263
3264    /// Sets the value of [unreachable][crate::model::ListNodeTypesResponse::unreachable].
3265    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3266    where
3267        T: std::iter::IntoIterator<Item = V>,
3268        V: std::convert::Into<std::string::String>,
3269    {
3270        use std::iter::Iterator;
3271        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3272        self
3273    }
3274}
3275
3276impl wkt::message::Message for ListNodeTypesResponse {
3277    fn typename() -> &'static str {
3278        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesResponse"
3279    }
3280}
3281
3282#[doc(hidden)]
3283impl gax::paginator::internal::PageableResponse for ListNodeTypesResponse {
3284    type PageItem = crate::model::NodeType;
3285
3286    fn items(self) -> std::vec::Vec<Self::PageItem> {
3287        self.node_types
3288    }
3289
3290    fn next_page_token(&self) -> std::string::String {
3291        use std::clone::Clone;
3292        self.next_page_token.clone()
3293    }
3294}
3295
3296/// Request message for
3297/// [VmwareEngine.GetNodeType][google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]
3298///
3299/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]: crate::client::VmwareEngine::get_node_type
3300#[serde_with::serde_as]
3301#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3302#[serde(default, rename_all = "camelCase")]
3303#[non_exhaustive]
3304pub struct GetNodeTypeRequest {
3305    /// Required. The resource name of the node type to retrieve.
3306    /// Resource names are schemeless URIs that follow the conventions in
3307    /// <https://cloud.google.com/apis/design/resource_names>.
3308    /// For example:
3309    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
3310    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3311    pub name: std::string::String,
3312
3313    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3314    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3315}
3316
3317impl GetNodeTypeRequest {
3318    pub fn new() -> Self {
3319        std::default::Default::default()
3320    }
3321
3322    /// Sets the value of [name][crate::model::GetNodeTypeRequest::name].
3323    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3324        self.name = v.into();
3325        self
3326    }
3327}
3328
3329impl wkt::message::Message for GetNodeTypeRequest {
3330    fn typename() -> &'static str {
3331        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeTypeRequest"
3332    }
3333}
3334
3335/// Request message for
3336/// [VmwareEngine.ShowNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]
3337///
3338/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]: crate::client::VmwareEngine::show_nsx_credentials
3339#[serde_with::serde_as]
3340#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3341#[serde(default, rename_all = "camelCase")]
3342#[non_exhaustive]
3343pub struct ShowNsxCredentialsRequest {
3344    /// Required. The resource name of the private cloud
3345    /// to be queried for credentials.
3346    /// Resource names are schemeless URIs that follow the conventions in
3347    /// <https://cloud.google.com/apis/design/resource_names>.
3348    /// For example:
3349    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3350    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3351    pub private_cloud: std::string::String,
3352
3353    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3354    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3355}
3356
3357impl ShowNsxCredentialsRequest {
3358    pub fn new() -> Self {
3359        std::default::Default::default()
3360    }
3361
3362    /// Sets the value of [private_cloud][crate::model::ShowNsxCredentialsRequest::private_cloud].
3363    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3364        self.private_cloud = v.into();
3365        self
3366    }
3367}
3368
3369impl wkt::message::Message for ShowNsxCredentialsRequest {
3370    fn typename() -> &'static str {
3371        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest"
3372    }
3373}
3374
3375/// Request message for
3376/// [VmwareEngine.ShowVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]
3377///
3378/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]: crate::client::VmwareEngine::show_vcenter_credentials
3379#[serde_with::serde_as]
3380#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3381#[serde(default, rename_all = "camelCase")]
3382#[non_exhaustive]
3383pub struct ShowVcenterCredentialsRequest {
3384    /// Required. The resource name of the private cloud
3385    /// to be queried for credentials.
3386    /// Resource names are schemeless URIs that follow the conventions in
3387    /// <https://cloud.google.com/apis/design/resource_names>.
3388    /// For example:
3389    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3390    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3391    pub private_cloud: std::string::String,
3392
3393    /// Optional. The username of the user to be queried for credentials.
3394    /// The default value of this field is CloudOwner@gve.local.
3395    /// The provided value must be one of the following:
3396    /// CloudOwner@gve.local,
3397    /// solution-user-01@gve.local,
3398    /// solution-user-02@gve.local,
3399    /// solution-user-03@gve.local,
3400    /// solution-user-04@gve.local,
3401    /// solution-user-05@gve.local,
3402    /// zertoadmin@gve.local.
3403    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3404    pub username: std::string::String,
3405
3406    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3407    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3408}
3409
3410impl ShowVcenterCredentialsRequest {
3411    pub fn new() -> Self {
3412        std::default::Default::default()
3413    }
3414
3415    /// Sets the value of [private_cloud][crate::model::ShowVcenterCredentialsRequest::private_cloud].
3416    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3417        self.private_cloud = v.into();
3418        self
3419    }
3420
3421    /// Sets the value of [username][crate::model::ShowVcenterCredentialsRequest::username].
3422    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3423        self.username = v.into();
3424        self
3425    }
3426}
3427
3428impl wkt::message::Message for ShowVcenterCredentialsRequest {
3429    fn typename() -> &'static str {
3430        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest"
3431    }
3432}
3433
3434/// Request message for
3435/// [VmwareEngine.ResetNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]
3436///
3437/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]: crate::client::VmwareEngine::reset_nsx_credentials
3438#[serde_with::serde_as]
3439#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3440#[serde(default, rename_all = "camelCase")]
3441#[non_exhaustive]
3442pub struct ResetNsxCredentialsRequest {
3443    /// Required. The resource name of the private cloud
3444    /// to reset credentials for.
3445    /// Resource names are schemeless URIs that follow the conventions in
3446    /// <https://cloud.google.com/apis/design/resource_names>.
3447    /// For example:
3448    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3449    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3450    pub private_cloud: std::string::String,
3451
3452    /// Optional. A request ID to identify requests. Specify a unique request ID
3453    /// so that if you must retry your request, the server will know to ignore
3454    /// the request if it has already been completed. The server guarantees that a
3455    /// request doesn't result in creation of duplicate commitments for at least 60
3456    /// minutes.
3457    ///
3458    /// For example, consider a situation where you make an initial request and the
3459    /// request times out. If you make the request again with the same request
3460    /// ID, the server can check if original operation with the same request ID
3461    /// was received, and if so, will ignore the second request. This prevents
3462    /// clients from accidentally creating duplicate commitments.
3463    ///
3464    /// The request ID must be a valid UUID with the exception that zero UUID is
3465    /// not supported (00000000-0000-0000-0000-000000000000).
3466    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3467    pub request_id: std::string::String,
3468
3469    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3470    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3471}
3472
3473impl ResetNsxCredentialsRequest {
3474    pub fn new() -> Self {
3475        std::default::Default::default()
3476    }
3477
3478    /// Sets the value of [private_cloud][crate::model::ResetNsxCredentialsRequest::private_cloud].
3479    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3480        self.private_cloud = v.into();
3481        self
3482    }
3483
3484    /// Sets the value of [request_id][crate::model::ResetNsxCredentialsRequest::request_id].
3485    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3486        self.request_id = v.into();
3487        self
3488    }
3489}
3490
3491impl wkt::message::Message for ResetNsxCredentialsRequest {
3492    fn typename() -> &'static str {
3493        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest"
3494    }
3495}
3496
3497/// Request message for
3498/// [VmwareEngine.ResetVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]
3499///
3500/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]: crate::client::VmwareEngine::reset_vcenter_credentials
3501#[serde_with::serde_as]
3502#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3503#[serde(default, rename_all = "camelCase")]
3504#[non_exhaustive]
3505pub struct ResetVcenterCredentialsRequest {
3506    /// Required. The resource name of the private cloud
3507    /// to reset credentials for.
3508    /// Resource names are schemeless URIs that follow the conventions in
3509    /// <https://cloud.google.com/apis/design/resource_names>.
3510    /// For example:
3511    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3512    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3513    pub private_cloud: std::string::String,
3514
3515    /// Optional. A request ID to identify requests. Specify a unique request ID
3516    /// so that if you must retry your request, the server will know to ignore
3517    /// the request if it has already been completed. The server guarantees that a
3518    /// request doesn't result in creation of duplicate commitments for at least 60
3519    /// minutes.
3520    ///
3521    /// For example, consider a situation where you make an initial request and the
3522    /// request times out. If you make the request again with the same request
3523    /// ID, the server can check if original operation with the same request ID
3524    /// was received, and if so, will ignore the second request. This prevents
3525    /// clients from accidentally creating duplicate commitments.
3526    ///
3527    /// The request ID must be a valid UUID with the exception that zero UUID is
3528    /// not supported (00000000-0000-0000-0000-000000000000).
3529    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3530    pub request_id: std::string::String,
3531
3532    /// Optional. The username of the user to be to reset the credentials.
3533    /// The default value of this field is CloudOwner@gve.local.
3534    /// The provided value should be one of the following:
3535    /// solution-user-01@gve.local,
3536    /// solution-user-02@gve.local,
3537    /// solution-user-03@gve.local,
3538    /// solution-user-04@gve.local,
3539    /// solution-user-05@gve.local,
3540    /// zertoadmin@gve.local.
3541    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3542    pub username: std::string::String,
3543
3544    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3545    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3546}
3547
3548impl ResetVcenterCredentialsRequest {
3549    pub fn new() -> Self {
3550        std::default::Default::default()
3551    }
3552
3553    /// Sets the value of [private_cloud][crate::model::ResetVcenterCredentialsRequest::private_cloud].
3554    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3555        self.private_cloud = v.into();
3556        self
3557    }
3558
3559    /// Sets the value of [request_id][crate::model::ResetVcenterCredentialsRequest::request_id].
3560    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3561        self.request_id = v.into();
3562        self
3563    }
3564
3565    /// Sets the value of [username][crate::model::ResetVcenterCredentialsRequest::username].
3566    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3567        self.username = v.into();
3568        self
3569    }
3570}
3571
3572impl wkt::message::Message for ResetVcenterCredentialsRequest {
3573    fn typename() -> &'static str {
3574        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest"
3575    }
3576}
3577
3578/// Response message for
3579/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
3580///
3581/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
3582#[serde_with::serde_as]
3583#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3584#[serde(default, rename_all = "camelCase")]
3585#[non_exhaustive]
3586pub struct ListHcxActivationKeysResponse {
3587    /// List of HCX activation keys.
3588    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3589    pub hcx_activation_keys: std::vec::Vec<crate::model::HcxActivationKey>,
3590
3591    /// A token, which can be sent as `page_token` to retrieve the next page.
3592    /// If this field is omitted, there are no subsequent pages.
3593    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3594    pub next_page_token: std::string::String,
3595
3596    /// Locations that could not be reached when making an aggregated query using
3597    /// wildcards.
3598    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3599    pub unreachable: std::vec::Vec<std::string::String>,
3600
3601    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3602    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3603}
3604
3605impl ListHcxActivationKeysResponse {
3606    pub fn new() -> Self {
3607        std::default::Default::default()
3608    }
3609
3610    /// Sets the value of [hcx_activation_keys][crate::model::ListHcxActivationKeysResponse::hcx_activation_keys].
3611    pub fn set_hcx_activation_keys<T, V>(mut self, v: T) -> Self
3612    where
3613        T: std::iter::IntoIterator<Item = V>,
3614        V: std::convert::Into<crate::model::HcxActivationKey>,
3615    {
3616        use std::iter::Iterator;
3617        self.hcx_activation_keys = v.into_iter().map(|i| i.into()).collect();
3618        self
3619    }
3620
3621    /// Sets the value of [next_page_token][crate::model::ListHcxActivationKeysResponse::next_page_token].
3622    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3623        self.next_page_token = v.into();
3624        self
3625    }
3626
3627    /// Sets the value of [unreachable][crate::model::ListHcxActivationKeysResponse::unreachable].
3628    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3629    where
3630        T: std::iter::IntoIterator<Item = V>,
3631        V: std::convert::Into<std::string::String>,
3632    {
3633        use std::iter::Iterator;
3634        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3635        self
3636    }
3637}
3638
3639impl wkt::message::Message for ListHcxActivationKeysResponse {
3640    fn typename() -> &'static str {
3641        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse"
3642    }
3643}
3644
3645#[doc(hidden)]
3646impl gax::paginator::internal::PageableResponse for ListHcxActivationKeysResponse {
3647    type PageItem = crate::model::HcxActivationKey;
3648
3649    fn items(self) -> std::vec::Vec<Self::PageItem> {
3650        self.hcx_activation_keys
3651    }
3652
3653    fn next_page_token(&self) -> std::string::String {
3654        use std::clone::Clone;
3655        self.next_page_token.clone()
3656    }
3657}
3658
3659/// Request message for
3660/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
3661///
3662/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
3663#[serde_with::serde_as]
3664#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3665#[serde(default, rename_all = "camelCase")]
3666#[non_exhaustive]
3667pub struct ListHcxActivationKeysRequest {
3668    /// Required. The resource name of the private cloud
3669    /// to be queried for HCX activation keys.
3670    /// Resource names are schemeless URIs that follow the conventions in
3671    /// <https://cloud.google.com/apis/design/resource_names>.
3672    /// For example:
3673    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
3674    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3675    pub parent: std::string::String,
3676
3677    /// The maximum number of HCX activation keys to return in one page.
3678    /// The service may return fewer than this value.
3679    /// The maximum value is coerced to 1000.
3680    /// The default value of this field is 500.
3681    #[serde(skip_serializing_if = "wkt::internal::is_default")]
3682    pub page_size: i32,
3683
3684    /// A page token, received from a previous `ListHcxActivationKeys` call.
3685    /// Provide this to retrieve the subsequent page.
3686    ///
3687    /// When paginating, all other parameters provided to
3688    /// `ListHcxActivationKeys` must match the call that provided the page
3689    /// token.
3690    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3691    pub page_token: std::string::String,
3692
3693    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3694    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3695}
3696
3697impl ListHcxActivationKeysRequest {
3698    pub fn new() -> Self {
3699        std::default::Default::default()
3700    }
3701
3702    /// Sets the value of [parent][crate::model::ListHcxActivationKeysRequest::parent].
3703    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3704        self.parent = v.into();
3705        self
3706    }
3707
3708    /// Sets the value of [page_size][crate::model::ListHcxActivationKeysRequest::page_size].
3709    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3710        self.page_size = v.into();
3711        self
3712    }
3713
3714    /// Sets the value of [page_token][crate::model::ListHcxActivationKeysRequest::page_token].
3715    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3716        self.page_token = v.into();
3717        self
3718    }
3719}
3720
3721impl wkt::message::Message for ListHcxActivationKeysRequest {
3722    fn typename() -> &'static str {
3723        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest"
3724    }
3725}
3726
3727/// Request message for [VmwareEngine.GetHcxActivationKeys][]
3728#[serde_with::serde_as]
3729#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3730#[serde(default, rename_all = "camelCase")]
3731#[non_exhaustive]
3732pub struct GetHcxActivationKeyRequest {
3733    /// Required. The resource name of the HCX activation key to retrieve.
3734    /// Resource names are schemeless URIs that follow the conventions in
3735    /// <https://cloud.google.com/apis/design/resource_names>.
3736    /// For example:
3737    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
3738    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3739    pub name: std::string::String,
3740
3741    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3742    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3743}
3744
3745impl GetHcxActivationKeyRequest {
3746    pub fn new() -> Self {
3747        std::default::Default::default()
3748    }
3749
3750    /// Sets the value of [name][crate::model::GetHcxActivationKeyRequest::name].
3751    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3752        self.name = v.into();
3753        self
3754    }
3755}
3756
3757impl wkt::message::Message for GetHcxActivationKeyRequest {
3758    fn typename() -> &'static str {
3759        "type.googleapis.com/google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest"
3760    }
3761}
3762
3763/// Request message for
3764/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
3765///
3766/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
3767#[serde_with::serde_as]
3768#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3769#[serde(default, rename_all = "camelCase")]
3770#[non_exhaustive]
3771pub struct CreateHcxActivationKeyRequest {
3772    /// Required. The resource name of the private cloud to create the key for.
3773    /// Resource names are schemeless URIs that follow the conventions in
3774    /// <https://cloud.google.com/apis/design/resource_names>.
3775    /// For example:
3776    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
3777    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3778    pub parent: std::string::String,
3779
3780    /// Required. The initial description of a new HCX activation key. When
3781    /// creating a new key, this field must be an empty object.
3782    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3783    pub hcx_activation_key: std::option::Option<crate::model::HcxActivationKey>,
3784
3785    /// Required. The user-provided identifier of the `HcxActivationKey` to be
3786    /// created. This identifier must be unique among `HcxActivationKey` resources
3787    /// within the parent and becomes the final token in the name URI.
3788    /// The identifier must meet the following requirements:
3789    ///
3790    /// * Only contains 1-63 alphanumeric characters and hyphens
3791    /// * Begins with an alphabetical character
3792    /// * Ends with a non-hyphen character
3793    /// * Not formatted as a UUID
3794    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
3795    ///   (section 3.5)
3796    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3797    pub hcx_activation_key_id: std::string::String,
3798
3799    /// A request ID to identify requests. Specify a unique request ID
3800    /// so that if you must retry your request, the server will know to ignore
3801    /// the request if it has already been completed. The server guarantees that a
3802    /// request doesn't result in creation of duplicate commitments for at least 60
3803    /// minutes.
3804    ///
3805    /// For example, consider a situation where you make an initial request and the
3806    /// request times out. If you make the request again with the same request ID,
3807    /// the server can check if original operation with the same request ID was
3808    /// received, and if so, will ignore the second request. This prevents clients
3809    /// from accidentally creating duplicate commitments.
3810    ///
3811    /// The request ID must be a valid UUID with the exception that zero UUID is
3812    /// not supported (00000000-0000-0000-0000-000000000000).
3813    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3814    pub request_id: std::string::String,
3815
3816    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3817    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3818}
3819
3820impl CreateHcxActivationKeyRequest {
3821    pub fn new() -> Self {
3822        std::default::Default::default()
3823    }
3824
3825    /// Sets the value of [parent][crate::model::CreateHcxActivationKeyRequest::parent].
3826    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3827        self.parent = v.into();
3828        self
3829    }
3830
3831    /// Sets the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
3832    pub fn set_hcx_activation_key<
3833        T: std::convert::Into<std::option::Option<crate::model::HcxActivationKey>>,
3834    >(
3835        mut self,
3836        v: T,
3837    ) -> Self {
3838        self.hcx_activation_key = v.into();
3839        self
3840    }
3841
3842    /// Sets the value of [hcx_activation_key_id][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key_id].
3843    pub fn set_hcx_activation_key_id<T: std::convert::Into<std::string::String>>(
3844        mut self,
3845        v: T,
3846    ) -> Self {
3847        self.hcx_activation_key_id = v.into();
3848        self
3849    }
3850
3851    /// Sets the value of [request_id][crate::model::CreateHcxActivationKeyRequest::request_id].
3852    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3853        self.request_id = v.into();
3854        self
3855    }
3856}
3857
3858impl wkt::message::Message for CreateHcxActivationKeyRequest {
3859    fn typename() -> &'static str {
3860        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest"
3861    }
3862}
3863
3864/// Request message for
3865/// [VmwareEngine.GetDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]
3866///
3867/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]: crate::client::VmwareEngine::get_dns_forwarding
3868#[serde_with::serde_as]
3869#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3870#[serde(default, rename_all = "camelCase")]
3871#[non_exhaustive]
3872pub struct GetDnsForwardingRequest {
3873    /// Required. The resource name of a `DnsForwarding` to retrieve.
3874    /// Resource names are schemeless URIs that follow the conventions in
3875    /// <https://cloud.google.com/apis/design/resource_names>.
3876    /// For example:
3877    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
3878    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3879    pub name: std::string::String,
3880
3881    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3882    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3883}
3884
3885impl GetDnsForwardingRequest {
3886    pub fn new() -> Self {
3887        std::default::Default::default()
3888    }
3889
3890    /// Sets the value of [name][crate::model::GetDnsForwardingRequest::name].
3891    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3892        self.name = v.into();
3893        self
3894    }
3895}
3896
3897impl wkt::message::Message for GetDnsForwardingRequest {
3898    fn typename() -> &'static str {
3899        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsForwardingRequest"
3900    }
3901}
3902
3903/// Request message for
3904/// [VmwareEngine.UpdateDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]
3905///
3906/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]: crate::client::VmwareEngine::update_dns_forwarding
3907#[serde_with::serde_as]
3908#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3909#[serde(default, rename_all = "camelCase")]
3910#[non_exhaustive]
3911pub struct UpdateDnsForwardingRequest {
3912    /// Required. DnsForwarding config details.
3913    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3914    pub dns_forwarding: std::option::Option<crate::model::DnsForwarding>,
3915
3916    /// Required. Field mask is used to specify the fields to be overwritten in the
3917    /// `DnsForwarding` resource by the update.
3918    /// The fields specified in the `update_mask` are relative to the resource, not
3919    /// the full request. A field will be overwritten if it is in the mask. If the
3920    /// user does not provide a mask then all fields will be overwritten.
3921    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3922    pub update_mask: std::option::Option<wkt::FieldMask>,
3923
3924    /// Optional. A request ID to identify requests. Specify a unique request ID
3925    /// so that if you must retry your request, the server will know to ignore
3926    /// the request if it has already been completed. The server guarantees that a
3927    /// request doesn't result in creation of duplicate commitments for at least 60
3928    /// minutes.
3929    ///
3930    /// For example, consider a situation where you make an initial request and the
3931    /// request times out. If you make the request again with the same request ID,
3932    /// the server can check if original operation with the same request ID was
3933    /// received, and if so, will ignore the second request. This prevents clients
3934    /// from accidentally creating duplicate commitments.
3935    ///
3936    /// The request ID must be a valid UUID with the exception that zero UUID is
3937    /// not supported (00000000-0000-0000-0000-000000000000).
3938    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3939    pub request_id: std::string::String,
3940
3941    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3942    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3943}
3944
3945impl UpdateDnsForwardingRequest {
3946    pub fn new() -> Self {
3947        std::default::Default::default()
3948    }
3949
3950    /// Sets the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
3951    pub fn set_dns_forwarding<
3952        T: std::convert::Into<std::option::Option<crate::model::DnsForwarding>>,
3953    >(
3954        mut self,
3955        v: T,
3956    ) -> Self {
3957        self.dns_forwarding = v.into();
3958        self
3959    }
3960
3961    /// Sets the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
3962    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
3963        mut self,
3964        v: T,
3965    ) -> Self {
3966        self.update_mask = v.into();
3967        self
3968    }
3969
3970    /// Sets the value of [request_id][crate::model::UpdateDnsForwardingRequest::request_id].
3971    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3972        self.request_id = v.into();
3973        self
3974    }
3975}
3976
3977impl wkt::message::Message for UpdateDnsForwardingRequest {
3978    fn typename() -> &'static str {
3979        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest"
3980    }
3981}
3982
3983/// Request message for
3984/// [VmwareEngine.CreateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]
3985///
3986/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]: crate::client::VmwareEngine::create_network_peering
3987#[serde_with::serde_as]
3988#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3989#[serde(default, rename_all = "camelCase")]
3990#[non_exhaustive]
3991pub struct CreateNetworkPeeringRequest {
3992    /// Required. The resource name of the location to create the new network
3993    /// peering in. This value is always `global`, because `NetworkPeering` is a
3994    /// global resource. Resource names are schemeless URIs that follow the
3995    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
3996    /// example: `projects/my-project/locations/global`
3997    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3998    pub parent: std::string::String,
3999
4000    /// Required. The user-provided identifier of the new `NetworkPeering`.
4001    /// This identifier must be unique among `NetworkPeering` resources within the
4002    /// parent and becomes the final token in the name URI.
4003    /// The identifier must meet the following requirements:
4004    ///
4005    /// * Only contains 1-63 alphanumeric characters and hyphens
4006    /// * Begins with an alphabetical character
4007    /// * Ends with a non-hyphen character
4008    /// * Not formatted as a UUID
4009    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
4010    ///   (section 3.5)
4011    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4012    pub network_peering_id: std::string::String,
4013
4014    /// Required. The initial description of the new network peering.
4015    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4016    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
4017
4018    /// Optional. A request ID to identify requests. Specify a unique request ID
4019    /// so that if you must retry your request, the server will know to ignore
4020    /// the request if it has already been completed. The server guarantees that a
4021    /// request doesn't result in creation of duplicate commitments for at least 60
4022    /// minutes.
4023    ///
4024    /// For example, consider a situation where you make an initial request and the
4025    /// request times out. If you make the request again with the same request
4026    /// ID, the server can check if original operation with the same request ID
4027    /// was received, and if so, will ignore the second request. This prevents
4028    /// clients from accidentally creating duplicate commitments.
4029    ///
4030    /// The request ID must be a valid UUID with the exception that zero UUID is
4031    /// not supported (00000000-0000-0000-0000-000000000000).
4032    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4033    pub request_id: std::string::String,
4034
4035    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4036    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4037}
4038
4039impl CreateNetworkPeeringRequest {
4040    pub fn new() -> Self {
4041        std::default::Default::default()
4042    }
4043
4044    /// Sets the value of [parent][crate::model::CreateNetworkPeeringRequest::parent].
4045    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4046        self.parent = v.into();
4047        self
4048    }
4049
4050    /// Sets the value of [network_peering_id][crate::model::CreateNetworkPeeringRequest::network_peering_id].
4051    pub fn set_network_peering_id<T: std::convert::Into<std::string::String>>(
4052        mut self,
4053        v: T,
4054    ) -> Self {
4055        self.network_peering_id = v.into();
4056        self
4057    }
4058
4059    /// Sets the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
4060    pub fn set_network_peering<
4061        T: std::convert::Into<std::option::Option<crate::model::NetworkPeering>>,
4062    >(
4063        mut self,
4064        v: T,
4065    ) -> Self {
4066        self.network_peering = v.into();
4067        self
4068    }
4069
4070    /// Sets the value of [request_id][crate::model::CreateNetworkPeeringRequest::request_id].
4071    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4072        self.request_id = v.into();
4073        self
4074    }
4075}
4076
4077impl wkt::message::Message for CreateNetworkPeeringRequest {
4078    fn typename() -> &'static str {
4079        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest"
4080    }
4081}
4082
4083/// Request message for
4084/// [VmwareEngine.DeleteNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]
4085///
4086/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]: crate::client::VmwareEngine::delete_network_peering
4087#[serde_with::serde_as]
4088#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4089#[serde(default, rename_all = "camelCase")]
4090#[non_exhaustive]
4091pub struct DeleteNetworkPeeringRequest {
4092    /// Required. The resource name of the network peering to be deleted.
4093    /// Resource names are schemeless URIs that follow the conventions in
4094    /// <https://cloud.google.com/apis/design/resource_names>.
4095    /// For example:
4096    /// `projects/my-project/locations/global/networkPeerings/my-peering`
4097    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4098    pub name: std::string::String,
4099
4100    /// Optional. A request ID to identify requests. Specify a unique request ID
4101    /// so that if you must retry your request, the server will know to ignore
4102    /// the request if it has already been completed. The server guarantees that a
4103    /// request doesn't result in creation of duplicate commitments for at least 60
4104    /// minutes.
4105    ///
4106    /// For example, consider a situation where you make an initial request and the
4107    /// request times out. If you make the request again with the same request
4108    /// ID, the server can check if original operation with the same request ID
4109    /// was received, and if so, will ignore the second request. This prevents
4110    /// clients from accidentally creating duplicate commitments.
4111    ///
4112    /// The request ID must be a valid UUID with the exception that zero UUID is
4113    /// not supported (00000000-0000-0000-0000-000000000000).
4114    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4115    pub request_id: std::string::String,
4116
4117    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4118    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4119}
4120
4121impl DeleteNetworkPeeringRequest {
4122    pub fn new() -> Self {
4123        std::default::Default::default()
4124    }
4125
4126    /// Sets the value of [name][crate::model::DeleteNetworkPeeringRequest::name].
4127    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4128        self.name = v.into();
4129        self
4130    }
4131
4132    /// Sets the value of [request_id][crate::model::DeleteNetworkPeeringRequest::request_id].
4133    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4134        self.request_id = v.into();
4135        self
4136    }
4137}
4138
4139impl wkt::message::Message for DeleteNetworkPeeringRequest {
4140    fn typename() -> &'static str {
4141        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest"
4142    }
4143}
4144
4145/// Request message for
4146/// [VmwareEngine.GetNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]
4147///
4148/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]: crate::client::VmwareEngine::get_network_peering
4149#[serde_with::serde_as]
4150#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4151#[serde(default, rename_all = "camelCase")]
4152#[non_exhaustive]
4153pub struct GetNetworkPeeringRequest {
4154    /// Required. The resource name of the network peering to retrieve.
4155    /// Resource names are schemeless URIs that follow the conventions in
4156    /// <https://cloud.google.com/apis/design/resource_names>.
4157    /// For example:
4158    /// `projects/my-project/locations/global/networkPeerings/my-peering`
4159    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4160    pub name: std::string::String,
4161
4162    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4163    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4164}
4165
4166impl GetNetworkPeeringRequest {
4167    pub fn new() -> Self {
4168        std::default::Default::default()
4169    }
4170
4171    /// Sets the value of [name][crate::model::GetNetworkPeeringRequest::name].
4172    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4173        self.name = v.into();
4174        self
4175    }
4176}
4177
4178impl wkt::message::Message for GetNetworkPeeringRequest {
4179    fn typename() -> &'static str {
4180        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPeeringRequest"
4181    }
4182}
4183
4184/// Request message for
4185/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
4186///
4187/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
4188#[serde_with::serde_as]
4189#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4190#[serde(default, rename_all = "camelCase")]
4191#[non_exhaustive]
4192pub struct ListNetworkPeeringsRequest {
4193    /// Required. The resource name of the location (global) to query for
4194    /// network peerings. Resource names are schemeless URIs that follow the
4195    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
4196    /// example: `projects/my-project/locations/global`
4197    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4198    pub parent: std::string::String,
4199
4200    /// The maximum number of network peerings to return in one page.
4201    /// The maximum value is coerced to 1000.
4202    /// The default value of this field is 500.
4203    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4204    pub page_size: i32,
4205
4206    /// A page token, received from a previous `ListNetworkPeerings` call.
4207    /// Provide this to retrieve the subsequent page.
4208    ///
4209    /// When paginating, all other parameters provided to
4210    /// `ListNetworkPeerings` must match the call that provided the page
4211    /// token.
4212    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4213    pub page_token: std::string::String,
4214
4215    /// A filter expression that matches resources returned in the response.
4216    /// The expression must specify the field name, a comparison
4217    /// operator, and the value that you want to use for filtering. The value
4218    /// must be a string, a number, or a boolean. The comparison operator
4219    /// must be `=`, `!=`, `>`, or `<`.
4220    ///
4221    /// For example, if you are filtering a list of network peerings, you can
4222    /// exclude the ones named `example-peering` by specifying
4223    /// `name != "example-peering"`.
4224    ///
4225    /// To filter on multiple expressions, provide each separate expression within
4226    /// parentheses. For example:
4227    ///
4228    /// ```norust
4229    /// (name = "example-peering")
4230    /// (createTime > "2021-04-12T08:15:10.40Z")
4231    /// ```
4232    ///
4233    /// By default, each expression is an `AND` expression. However, you
4234    /// can include `AND` and `OR` expressions explicitly.
4235    /// For example:
4236    ///
4237    /// ```norust
4238    /// (name = "example-peering-1") AND
4239    /// (createTime > "2021-04-12T08:15:10.40Z") OR
4240    /// (name = "example-peering-2")
4241    /// ```
4242    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4243    pub filter: std::string::String,
4244
4245    /// Sorts list results by a certain order. By default, returned results
4246    /// are ordered by `name` in ascending order.
4247    /// You can also sort results in descending order based on the `name` value
4248    /// using `orderBy="name desc"`.
4249    /// Currently, only ordering by `name` is supported.
4250    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4251    pub order_by: std::string::String,
4252
4253    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4254    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4255}
4256
4257impl ListNetworkPeeringsRequest {
4258    pub fn new() -> Self {
4259        std::default::Default::default()
4260    }
4261
4262    /// Sets the value of [parent][crate::model::ListNetworkPeeringsRequest::parent].
4263    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4264        self.parent = v.into();
4265        self
4266    }
4267
4268    /// Sets the value of [page_size][crate::model::ListNetworkPeeringsRequest::page_size].
4269    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4270        self.page_size = v.into();
4271        self
4272    }
4273
4274    /// Sets the value of [page_token][crate::model::ListNetworkPeeringsRequest::page_token].
4275    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4276        self.page_token = v.into();
4277        self
4278    }
4279
4280    /// Sets the value of [filter][crate::model::ListNetworkPeeringsRequest::filter].
4281    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4282        self.filter = v.into();
4283        self
4284    }
4285
4286    /// Sets the value of [order_by][crate::model::ListNetworkPeeringsRequest::order_by].
4287    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4288        self.order_by = v.into();
4289        self
4290    }
4291}
4292
4293impl wkt::message::Message for ListNetworkPeeringsRequest {
4294    fn typename() -> &'static str {
4295        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest"
4296    }
4297}
4298
4299/// Request message for
4300/// [VmwareEngine.UpdateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]
4301///
4302/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]: crate::client::VmwareEngine::update_network_peering
4303#[serde_with::serde_as]
4304#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4305#[serde(default, rename_all = "camelCase")]
4306#[non_exhaustive]
4307pub struct UpdateNetworkPeeringRequest {
4308    /// Required. Network peering description.
4309    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4310    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
4311
4312    /// Required. Field mask is used to specify the fields to be overwritten in the
4313    /// `NetworkPeering` resource by the update.
4314    /// The fields specified in the `update_mask` are relative to the resource, not
4315    /// the full request. A field will be overwritten if it is in the mask. If the
4316    /// user does not provide a mask then all fields will be overwritten.
4317    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4318    pub update_mask: std::option::Option<wkt::FieldMask>,
4319
4320    /// Optional. A request ID to identify requests. Specify a unique request ID
4321    /// so that if you must retry your request, the server will know to ignore
4322    /// the request if it has already been completed. The server guarantees that a
4323    /// request doesn't result in creation of duplicate commitments for at least 60
4324    /// minutes.
4325    ///
4326    /// For example, consider a situation where you make an initial request and the
4327    /// request times out. If you make the request again with the same request
4328    /// ID, the server can check if original operation with the same request ID
4329    /// was received, and if so, will ignore the second request. This prevents
4330    /// clients from accidentally creating duplicate commitments.
4331    ///
4332    /// The request ID must be a valid UUID with the exception that zero UUID is
4333    /// not supported (00000000-0000-0000-0000-000000000000).
4334    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4335    pub request_id: std::string::String,
4336
4337    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4338    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4339}
4340
4341impl UpdateNetworkPeeringRequest {
4342    pub fn new() -> Self {
4343        std::default::Default::default()
4344    }
4345
4346    /// Sets the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
4347    pub fn set_network_peering<
4348        T: std::convert::Into<std::option::Option<crate::model::NetworkPeering>>,
4349    >(
4350        mut self,
4351        v: T,
4352    ) -> Self {
4353        self.network_peering = v.into();
4354        self
4355    }
4356
4357    /// Sets the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
4358    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4359        mut self,
4360        v: T,
4361    ) -> Self {
4362        self.update_mask = v.into();
4363        self
4364    }
4365
4366    /// Sets the value of [request_id][crate::model::UpdateNetworkPeeringRequest::request_id].
4367    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4368        self.request_id = v.into();
4369        self
4370    }
4371}
4372
4373impl wkt::message::Message for UpdateNetworkPeeringRequest {
4374    fn typename() -> &'static str {
4375        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest"
4376    }
4377}
4378
4379/// Response message for
4380/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
4381///
4382/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
4383#[serde_with::serde_as]
4384#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4385#[serde(default, rename_all = "camelCase")]
4386#[non_exhaustive]
4387pub struct ListNetworkPeeringsResponse {
4388    /// A list of network peerings.
4389    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4390    pub network_peerings: std::vec::Vec<crate::model::NetworkPeering>,
4391
4392    /// A token, which can be sent as `page_token` to retrieve the next page.
4393    /// If this field is omitted, there are no subsequent pages.
4394    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4395    pub next_page_token: std::string::String,
4396
4397    /// Unreachable resources.
4398    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4399    pub unreachable: std::vec::Vec<std::string::String>,
4400
4401    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4402    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4403}
4404
4405impl ListNetworkPeeringsResponse {
4406    pub fn new() -> Self {
4407        std::default::Default::default()
4408    }
4409
4410    /// Sets the value of [network_peerings][crate::model::ListNetworkPeeringsResponse::network_peerings].
4411    pub fn set_network_peerings<T, V>(mut self, v: T) -> Self
4412    where
4413        T: std::iter::IntoIterator<Item = V>,
4414        V: std::convert::Into<crate::model::NetworkPeering>,
4415    {
4416        use std::iter::Iterator;
4417        self.network_peerings = v.into_iter().map(|i| i.into()).collect();
4418        self
4419    }
4420
4421    /// Sets the value of [next_page_token][crate::model::ListNetworkPeeringsResponse::next_page_token].
4422    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4423        self.next_page_token = v.into();
4424        self
4425    }
4426
4427    /// Sets the value of [unreachable][crate::model::ListNetworkPeeringsResponse::unreachable].
4428    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4429    where
4430        T: std::iter::IntoIterator<Item = V>,
4431        V: std::convert::Into<std::string::String>,
4432    {
4433        use std::iter::Iterator;
4434        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4435        self
4436    }
4437}
4438
4439impl wkt::message::Message for ListNetworkPeeringsResponse {
4440    fn typename() -> &'static str {
4441        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsResponse"
4442    }
4443}
4444
4445#[doc(hidden)]
4446impl gax::paginator::internal::PageableResponse for ListNetworkPeeringsResponse {
4447    type PageItem = crate::model::NetworkPeering;
4448
4449    fn items(self) -> std::vec::Vec<Self::PageItem> {
4450        self.network_peerings
4451    }
4452
4453    fn next_page_token(&self) -> std::string::String {
4454        use std::clone::Clone;
4455        self.next_page_token.clone()
4456    }
4457}
4458
4459/// Request message for
4460/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
4461///
4462/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
4463#[serde_with::serde_as]
4464#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4465#[serde(default, rename_all = "camelCase")]
4466#[non_exhaustive]
4467pub struct ListPeeringRoutesRequest {
4468    /// Required. The resource name of the network peering to retrieve peering
4469    /// routes from. Resource names are schemeless URIs that follow the conventions
4470    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
4471    /// `projects/my-project/locations/global/networkPeerings/my-peering`
4472    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4473    pub parent: std::string::String,
4474
4475    /// The maximum number of peering routes to return in one page.
4476    /// The service may return fewer than this value.
4477    /// The maximum value is coerced to 1000.
4478    /// The default value of this field is 500.
4479    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4480    pub page_size: i32,
4481
4482    /// A page token, received from a previous `ListPeeringRoutes` call.
4483    /// Provide this to retrieve the subsequent page.
4484    /// When paginating, all other parameters provided to `ListPeeringRoutes` must
4485    /// match the call that provided the page token.
4486    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4487    pub page_token: std::string::String,
4488
4489    /// A filter expression that matches resources returned in the response.
4490    /// Currently, only filtering on the `direction` field is supported. To return
4491    /// routes imported from the peer network, provide "direction=INCOMING". To
4492    /// return routes exported from the VMware Engine network, provide
4493    /// "direction=OUTGOING". Other filter expressions return an error.
4494    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4495    pub filter: std::string::String,
4496
4497    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4498    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4499}
4500
4501impl ListPeeringRoutesRequest {
4502    pub fn new() -> Self {
4503        std::default::Default::default()
4504    }
4505
4506    /// Sets the value of [parent][crate::model::ListPeeringRoutesRequest::parent].
4507    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4508        self.parent = v.into();
4509        self
4510    }
4511
4512    /// Sets the value of [page_size][crate::model::ListPeeringRoutesRequest::page_size].
4513    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4514        self.page_size = v.into();
4515        self
4516    }
4517
4518    /// Sets the value of [page_token][crate::model::ListPeeringRoutesRequest::page_token].
4519    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4520        self.page_token = v.into();
4521        self
4522    }
4523
4524    /// Sets the value of [filter][crate::model::ListPeeringRoutesRequest::filter].
4525    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4526        self.filter = v.into();
4527        self
4528    }
4529}
4530
4531impl wkt::message::Message for ListPeeringRoutesRequest {
4532    fn typename() -> &'static str {
4533        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesRequest"
4534    }
4535}
4536
4537/// Response message for
4538/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
4539///
4540/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
4541#[serde_with::serde_as]
4542#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4543#[serde(default, rename_all = "camelCase")]
4544#[non_exhaustive]
4545pub struct ListPeeringRoutesResponse {
4546    /// A list of peering routes.
4547    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4548    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
4549
4550    /// A token, which can be sent as `page_token` to retrieve the next page.
4551    /// If this field is omitted, there are no subsequent pages.
4552    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4553    pub next_page_token: std::string::String,
4554
4555    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4556    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4557}
4558
4559impl ListPeeringRoutesResponse {
4560    pub fn new() -> Self {
4561        std::default::Default::default()
4562    }
4563
4564    /// Sets the value of [peering_routes][crate::model::ListPeeringRoutesResponse::peering_routes].
4565    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
4566    where
4567        T: std::iter::IntoIterator<Item = V>,
4568        V: std::convert::Into<crate::model::PeeringRoute>,
4569    {
4570        use std::iter::Iterator;
4571        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
4572        self
4573    }
4574
4575    /// Sets the value of [next_page_token][crate::model::ListPeeringRoutesResponse::next_page_token].
4576    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4577        self.next_page_token = v.into();
4578        self
4579    }
4580}
4581
4582impl wkt::message::Message for ListPeeringRoutesResponse {
4583    fn typename() -> &'static str {
4584        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesResponse"
4585    }
4586}
4587
4588#[doc(hidden)]
4589impl gax::paginator::internal::PageableResponse for ListPeeringRoutesResponse {
4590    type PageItem = crate::model::PeeringRoute;
4591
4592    fn items(self) -> std::vec::Vec<Self::PageItem> {
4593        self.peering_routes
4594    }
4595
4596    fn next_page_token(&self) -> std::string::String {
4597        use std::clone::Clone;
4598        self.next_page_token.clone()
4599    }
4600}
4601
4602/// Request message for
4603/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
4604///
4605/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
4606#[serde_with::serde_as]
4607#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4608#[serde(default, rename_all = "camelCase")]
4609#[non_exhaustive]
4610pub struct ListNetworkPoliciesRequest {
4611    /// Required. The resource name of the location (region) to query for
4612    /// network policies. Resource names are schemeless URIs that follow the
4613    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
4614    /// example: `projects/my-project/locations/us-central1`
4615    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4616    pub parent: std::string::String,
4617
4618    /// The maximum number of network policies to return in one page.
4619    /// The service may return fewer than this value.
4620    /// The maximum value is coerced to 1000.
4621    /// The default value of this field is 500.
4622    #[serde(skip_serializing_if = "wkt::internal::is_default")]
4623    pub page_size: i32,
4624
4625    /// A page token, received from a previous `ListNetworkPolicies` call.
4626    /// Provide this to retrieve the subsequent page.
4627    ///
4628    /// When paginating, all other parameters provided to
4629    /// `ListNetworkPolicies` must match the call that provided the page
4630    /// token.
4631    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4632    pub page_token: std::string::String,
4633
4634    /// A filter expression that matches resources returned in the response.
4635    /// The expression must specify the field name, a comparison
4636    /// operator, and the value that you want to use for filtering. The value
4637    /// must be a string, a number, or a boolean. The comparison operator
4638    /// must be `=`, `!=`, `>`, or `<`.
4639    ///
4640    /// For example, if you are filtering a list of network policies, you can
4641    /// exclude the ones named `example-policy` by specifying
4642    /// `name != "example-policy"`.
4643    ///
4644    /// To filter on multiple expressions, provide each separate expression within
4645    /// parentheses. For example:
4646    ///
4647    /// ```norust
4648    /// (name = "example-policy")
4649    /// (createTime > "2021-04-12T08:15:10.40Z")
4650    /// ```
4651    ///
4652    /// By default, each expression is an `AND` expression. However, you
4653    /// can include `AND` and `OR` expressions explicitly.
4654    /// For example:
4655    ///
4656    /// ```norust
4657    /// (name = "example-policy-1") AND
4658    /// (createTime > "2021-04-12T08:15:10.40Z") OR
4659    /// (name = "example-policy-2")
4660    /// ```
4661    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4662    pub filter: std::string::String,
4663
4664    /// Sorts list results by a certain order. By default, returned results
4665    /// are ordered by `name` in ascending order.
4666    /// You can also sort results in descending order based on the `name` value
4667    /// using `orderBy="name desc"`.
4668    /// Currently, only ordering by `name` is supported.
4669    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4670    pub order_by: std::string::String,
4671
4672    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4673    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4674}
4675
4676impl ListNetworkPoliciesRequest {
4677    pub fn new() -> Self {
4678        std::default::Default::default()
4679    }
4680
4681    /// Sets the value of [parent][crate::model::ListNetworkPoliciesRequest::parent].
4682    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4683        self.parent = v.into();
4684        self
4685    }
4686
4687    /// Sets the value of [page_size][crate::model::ListNetworkPoliciesRequest::page_size].
4688    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4689        self.page_size = v.into();
4690        self
4691    }
4692
4693    /// Sets the value of [page_token][crate::model::ListNetworkPoliciesRequest::page_token].
4694    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4695        self.page_token = v.into();
4696        self
4697    }
4698
4699    /// Sets the value of [filter][crate::model::ListNetworkPoliciesRequest::filter].
4700    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4701        self.filter = v.into();
4702        self
4703    }
4704
4705    /// Sets the value of [order_by][crate::model::ListNetworkPoliciesRequest::order_by].
4706    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4707        self.order_by = v.into();
4708        self
4709    }
4710}
4711
4712impl wkt::message::Message for ListNetworkPoliciesRequest {
4713    fn typename() -> &'static str {
4714        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest"
4715    }
4716}
4717
4718/// Response message for
4719/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
4720///
4721/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
4722#[serde_with::serde_as]
4723#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4724#[serde(default, rename_all = "camelCase")]
4725#[non_exhaustive]
4726pub struct ListNetworkPoliciesResponse {
4727    /// A list of network policies.
4728    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4729    pub network_policies: std::vec::Vec<crate::model::NetworkPolicy>,
4730
4731    /// A token, which can be send as `page_token` to retrieve the next page.
4732    /// If this field is omitted, there are no subsequent pages.
4733    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4734    pub next_page_token: std::string::String,
4735
4736    /// Locations that could not be reached when making an aggregated query using
4737    /// wildcards.
4738    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4739    pub unreachable: std::vec::Vec<std::string::String>,
4740
4741    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4742    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4743}
4744
4745impl ListNetworkPoliciesResponse {
4746    pub fn new() -> Self {
4747        std::default::Default::default()
4748    }
4749
4750    /// Sets the value of [network_policies][crate::model::ListNetworkPoliciesResponse::network_policies].
4751    pub fn set_network_policies<T, V>(mut self, v: T) -> Self
4752    where
4753        T: std::iter::IntoIterator<Item = V>,
4754        V: std::convert::Into<crate::model::NetworkPolicy>,
4755    {
4756        use std::iter::Iterator;
4757        self.network_policies = v.into_iter().map(|i| i.into()).collect();
4758        self
4759    }
4760
4761    /// Sets the value of [next_page_token][crate::model::ListNetworkPoliciesResponse::next_page_token].
4762    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4763        self.next_page_token = v.into();
4764        self
4765    }
4766
4767    /// Sets the value of [unreachable][crate::model::ListNetworkPoliciesResponse::unreachable].
4768    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4769    where
4770        T: std::iter::IntoIterator<Item = V>,
4771        V: std::convert::Into<std::string::String>,
4772    {
4773        use std::iter::Iterator;
4774        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4775        self
4776    }
4777}
4778
4779impl wkt::message::Message for ListNetworkPoliciesResponse {
4780    fn typename() -> &'static str {
4781        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse"
4782    }
4783}
4784
4785#[doc(hidden)]
4786impl gax::paginator::internal::PageableResponse for ListNetworkPoliciesResponse {
4787    type PageItem = crate::model::NetworkPolicy;
4788
4789    fn items(self) -> std::vec::Vec<Self::PageItem> {
4790        self.network_policies
4791    }
4792
4793    fn next_page_token(&self) -> std::string::String {
4794        use std::clone::Clone;
4795        self.next_page_token.clone()
4796    }
4797}
4798
4799/// Request message for
4800/// [VmwareEngine.GetNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]
4801///
4802/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]: crate::client::VmwareEngine::get_network_policy
4803#[serde_with::serde_as]
4804#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4805#[serde(default, rename_all = "camelCase")]
4806#[non_exhaustive]
4807pub struct GetNetworkPolicyRequest {
4808    /// Required. The resource name of the network policy to retrieve.
4809    /// Resource names are schemeless URIs that follow the conventions in
4810    /// <https://cloud.google.com/apis/design/resource_names>.
4811    /// For example:
4812    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
4813    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4814    pub name: std::string::String,
4815
4816    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4817    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4818}
4819
4820impl GetNetworkPolicyRequest {
4821    pub fn new() -> Self {
4822        std::default::Default::default()
4823    }
4824
4825    /// Sets the value of [name][crate::model::GetNetworkPolicyRequest::name].
4826    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4827        self.name = v.into();
4828        self
4829    }
4830}
4831
4832impl wkt::message::Message for GetNetworkPolicyRequest {
4833    fn typename() -> &'static str {
4834        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPolicyRequest"
4835    }
4836}
4837
4838/// Request message for
4839/// [VmwareEngine.UpdateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]
4840///
4841/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]: crate::client::VmwareEngine::update_network_policy
4842#[serde_with::serde_as]
4843#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4844#[serde(default, rename_all = "camelCase")]
4845#[non_exhaustive]
4846pub struct UpdateNetworkPolicyRequest {
4847    /// Required. Network policy description.
4848    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4849    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
4850
4851    /// Required. Field mask is used to specify the fields to be overwritten in the
4852    /// `NetworkPolicy` resource by the update.
4853    /// The fields specified in the `update_mask` are relative to the resource, not
4854    /// the full request. A field will be overwritten if it is in the mask. If the
4855    /// user does not provide a mask then all fields will be overwritten.
4856    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4857    pub update_mask: std::option::Option<wkt::FieldMask>,
4858
4859    /// Optional. A request ID to identify requests. Specify a unique request ID
4860    /// so that if you must retry your request, the server will know to ignore
4861    /// the request if it has already been completed. The server guarantees that a
4862    /// request doesn't result in creation of duplicate commitments for at least 60
4863    /// minutes.
4864    ///
4865    /// For example, consider a situation where you make an initial request and the
4866    /// request times out. If you make the request again with the same request
4867    /// ID, the server can check if original operation with the same request ID
4868    /// was received, and if so, will ignore the second request. This prevents
4869    /// clients from accidentally creating duplicate commitments.
4870    ///
4871    /// The request ID must be a valid UUID with the exception that zero UUID is
4872    /// not supported (00000000-0000-0000-0000-000000000000).
4873    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4874    pub request_id: std::string::String,
4875
4876    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4877    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4878}
4879
4880impl UpdateNetworkPolicyRequest {
4881    pub fn new() -> Self {
4882        std::default::Default::default()
4883    }
4884
4885    /// Sets the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
4886    pub fn set_network_policy<
4887        T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
4888    >(
4889        mut self,
4890        v: T,
4891    ) -> Self {
4892        self.network_policy = v.into();
4893        self
4894    }
4895
4896    /// Sets the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
4897    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4898        mut self,
4899        v: T,
4900    ) -> Self {
4901        self.update_mask = v.into();
4902        self
4903    }
4904
4905    /// Sets the value of [request_id][crate::model::UpdateNetworkPolicyRequest::request_id].
4906    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4907        self.request_id = v.into();
4908        self
4909    }
4910}
4911
4912impl wkt::message::Message for UpdateNetworkPolicyRequest {
4913    fn typename() -> &'static str {
4914        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest"
4915    }
4916}
4917
4918/// Request message for
4919/// [VmwareEngine.CreateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]
4920///
4921/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]: crate::client::VmwareEngine::create_network_policy
4922#[serde_with::serde_as]
4923#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4924#[serde(default, rename_all = "camelCase")]
4925#[non_exhaustive]
4926pub struct CreateNetworkPolicyRequest {
4927    /// Required. The resource name of the location (region)
4928    /// to create the new network policy in.
4929    /// Resource names are schemeless URIs that follow the conventions in
4930    /// <https://cloud.google.com/apis/design/resource_names>.
4931    /// For example:
4932    /// `projects/my-project/locations/us-central1`
4933    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4934    pub parent: std::string::String,
4935
4936    /// Required. The user-provided identifier of the network policy to be created.
4937    /// This identifier must be unique within parent
4938    /// `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes
4939    /// the final token in the name URI.
4940    /// The identifier must meet the following requirements:
4941    ///
4942    /// * Only contains 1-63 alphanumeric characters and hyphens
4943    /// * Begins with an alphabetical character
4944    /// * Ends with a non-hyphen character
4945    /// * Not formatted as a UUID
4946    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
4947    ///   (section 3.5)
4948    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4949    pub network_policy_id: std::string::String,
4950
4951    /// Required. The network policy configuration to use in the request.
4952    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4953    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
4954
4955    /// Optional. A request ID to identify requests. Specify a unique request ID
4956    /// so that if you must retry your request, the server will know to ignore
4957    /// the request if it has already been completed. The server guarantees that a
4958    /// request doesn't result in creation of duplicate commitments for at least 60
4959    /// minutes.
4960    ///
4961    /// For example, consider a situation where you make an initial request and the
4962    /// request times out. If you make the request again with the same request
4963    /// ID, the server can check if original operation with the same request ID
4964    /// was received, and if so, will ignore the second request. This prevents
4965    /// clients from accidentally creating duplicate commitments.
4966    ///
4967    /// The request ID must be a valid UUID with the exception that zero UUID is
4968    /// not supported (00000000-0000-0000-0000-000000000000).
4969    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4970    pub request_id: std::string::String,
4971
4972    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4973    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4974}
4975
4976impl CreateNetworkPolicyRequest {
4977    pub fn new() -> Self {
4978        std::default::Default::default()
4979    }
4980
4981    /// Sets the value of [parent][crate::model::CreateNetworkPolicyRequest::parent].
4982    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4983        self.parent = v.into();
4984        self
4985    }
4986
4987    /// Sets the value of [network_policy_id][crate::model::CreateNetworkPolicyRequest::network_policy_id].
4988    pub fn set_network_policy_id<T: std::convert::Into<std::string::String>>(
4989        mut self,
4990        v: T,
4991    ) -> Self {
4992        self.network_policy_id = v.into();
4993        self
4994    }
4995
4996    /// Sets the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
4997    pub fn set_network_policy<
4998        T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
4999    >(
5000        mut self,
5001        v: T,
5002    ) -> Self {
5003        self.network_policy = v.into();
5004        self
5005    }
5006
5007    /// Sets the value of [request_id][crate::model::CreateNetworkPolicyRequest::request_id].
5008    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5009        self.request_id = v.into();
5010        self
5011    }
5012}
5013
5014impl wkt::message::Message for CreateNetworkPolicyRequest {
5015    fn typename() -> &'static str {
5016        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest"
5017    }
5018}
5019
5020/// Request message for
5021/// [VmwareEngine.DeleteNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]
5022///
5023/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]: crate::client::VmwareEngine::delete_network_policy
5024#[serde_with::serde_as]
5025#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5026#[serde(default, rename_all = "camelCase")]
5027#[non_exhaustive]
5028pub struct DeleteNetworkPolicyRequest {
5029    /// Required. The resource name of the network policy to delete.
5030    /// Resource names are schemeless URIs that follow the conventions in
5031    /// <https://cloud.google.com/apis/design/resource_names>.
5032    /// For example:
5033    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
5034    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5035    pub name: std::string::String,
5036
5037    /// Optional. A request ID to identify requests. Specify a unique request ID
5038    /// so that if you must retry your request, the server will know to ignore
5039    /// the request if it has already been completed. The server guarantees that a
5040    /// request doesn't result in creation of duplicate commitments for at least 60
5041    /// minutes.
5042    ///
5043    /// For example, consider a situation where you make an initial request and the
5044    /// request times out. If you make the request again with the same request
5045    /// ID, the server can check if original operation with the same request ID
5046    /// was received, and if so, will ignore the second request. This prevents
5047    /// clients from accidentally creating duplicate commitments.
5048    ///
5049    /// The request ID must be a valid UUID with the exception that zero UUID is
5050    /// not supported (00000000-0000-0000-0000-000000000000).
5051    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5052    pub request_id: std::string::String,
5053
5054    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5055    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5056}
5057
5058impl DeleteNetworkPolicyRequest {
5059    pub fn new() -> Self {
5060        std::default::Default::default()
5061    }
5062
5063    /// Sets the value of [name][crate::model::DeleteNetworkPolicyRequest::name].
5064    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5065        self.name = v.into();
5066        self
5067    }
5068
5069    /// Sets the value of [request_id][crate::model::DeleteNetworkPolicyRequest::request_id].
5070    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5071        self.request_id = v.into();
5072        self
5073    }
5074}
5075
5076impl wkt::message::Message for DeleteNetworkPolicyRequest {
5077    fn typename() -> &'static str {
5078        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest"
5079    }
5080}
5081
5082/// Request message for
5083/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
5084///
5085/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
5086#[serde_with::serde_as]
5087#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5088#[serde(default, rename_all = "camelCase")]
5089#[non_exhaustive]
5090pub struct ListManagementDnsZoneBindingsRequest {
5091    /// Required. The resource name of the private cloud to be queried for
5092    /// management DNS zone bindings.
5093    /// Resource names are schemeless URIs that follow the conventions in
5094    /// <https://cloud.google.com/apis/design/resource_names>.
5095    /// For example:
5096    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
5097    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5098    pub parent: std::string::String,
5099
5100    /// The maximum number of management DNS zone bindings to return in one page.
5101    /// The service may return fewer than this value.
5102    /// The maximum value is coerced to 1000.
5103    /// The default value of this field is 500.
5104    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5105    pub page_size: i32,
5106
5107    /// A page token, received from a previous `ListManagementDnsZoneBindings`
5108    /// call. Provide this to retrieve the subsequent page.
5109    ///
5110    /// When paginating, all other parameters provided to
5111    /// `ListManagementDnsZoneBindings` must match the call that provided the page
5112    /// token.
5113    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5114    pub page_token: std::string::String,
5115
5116    /// A filter expression that matches resources returned in the response.
5117    /// The expression must specify the field name, a comparison
5118    /// operator, and the value that you want to use for filtering. The value
5119    /// must be a string, a number, or a boolean. The comparison operator
5120    /// must be `=`, `!=`, `>`, or `<`.
5121    ///
5122    /// For example, if you are filtering a list of Management DNS Zone Bindings,
5123    /// you can exclude the ones named `example-management-dns-zone-binding` by
5124    /// specifying `name != "example-management-dns-zone-binding"`.
5125    ///
5126    /// To filter on multiple expressions, provide each separate expression within
5127    /// parentheses. For example:
5128    ///
5129    /// ```norust
5130    /// (name = "example-management-dns-zone-binding")
5131    /// (createTime > "2021-04-12T08:15:10.40Z")
5132    /// ```
5133    ///
5134    /// By default, each expression is an `AND` expression. However, you
5135    /// can include `AND` and `OR` expressions explicitly.
5136    /// For example:
5137    ///
5138    /// ```norust
5139    /// (name = "example-management-dns-zone-binding-1") AND
5140    /// (createTime > "2021-04-12T08:15:10.40Z") OR
5141    /// (name = "example-management-dns-zone-binding-2")
5142    /// ```
5143    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5144    pub filter: std::string::String,
5145
5146    /// Sorts list results by a certain order. By default, returned results
5147    /// are ordered by `name` in ascending order.
5148    /// You can also sort results in descending order based on the `name` value
5149    /// using `orderBy="name desc"`.
5150    /// Currently, only ordering by `name` is supported.
5151    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5152    pub order_by: std::string::String,
5153
5154    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5155    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5156}
5157
5158impl ListManagementDnsZoneBindingsRequest {
5159    pub fn new() -> Self {
5160        std::default::Default::default()
5161    }
5162
5163    /// Sets the value of [parent][crate::model::ListManagementDnsZoneBindingsRequest::parent].
5164    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5165        self.parent = v.into();
5166        self
5167    }
5168
5169    /// Sets the value of [page_size][crate::model::ListManagementDnsZoneBindingsRequest::page_size].
5170    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5171        self.page_size = v.into();
5172        self
5173    }
5174
5175    /// Sets the value of [page_token][crate::model::ListManagementDnsZoneBindingsRequest::page_token].
5176    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5177        self.page_token = v.into();
5178        self
5179    }
5180
5181    /// Sets the value of [filter][crate::model::ListManagementDnsZoneBindingsRequest::filter].
5182    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5183        self.filter = v.into();
5184        self
5185    }
5186
5187    /// Sets the value of [order_by][crate::model::ListManagementDnsZoneBindingsRequest::order_by].
5188    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5189        self.order_by = v.into();
5190        self
5191    }
5192}
5193
5194impl wkt::message::Message for ListManagementDnsZoneBindingsRequest {
5195    fn typename() -> &'static str {
5196        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest"
5197    }
5198}
5199
5200/// Response message for
5201/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
5202///
5203/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
5204#[serde_with::serde_as]
5205#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5206#[serde(default, rename_all = "camelCase")]
5207#[non_exhaustive]
5208pub struct ListManagementDnsZoneBindingsResponse {
5209    /// A list of management DNS zone bindings.
5210    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5211    pub management_dns_zone_bindings: std::vec::Vec<crate::model::ManagementDnsZoneBinding>,
5212
5213    /// A token, which can be sent as `page_token` to retrieve the next page.
5214    /// If this field is omitted, there are no subsequent pages.
5215    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5216    pub next_page_token: std::string::String,
5217
5218    /// Locations that could not be reached when making an aggregated query using
5219    /// wildcards.
5220    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5221    pub unreachable: std::vec::Vec<std::string::String>,
5222
5223    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5224    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5225}
5226
5227impl ListManagementDnsZoneBindingsResponse {
5228    pub fn new() -> Self {
5229        std::default::Default::default()
5230    }
5231
5232    /// Sets the value of [management_dns_zone_bindings][crate::model::ListManagementDnsZoneBindingsResponse::management_dns_zone_bindings].
5233    pub fn set_management_dns_zone_bindings<T, V>(mut self, v: T) -> Self
5234    where
5235        T: std::iter::IntoIterator<Item = V>,
5236        V: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
5237    {
5238        use std::iter::Iterator;
5239        self.management_dns_zone_bindings = v.into_iter().map(|i| i.into()).collect();
5240        self
5241    }
5242
5243    /// Sets the value of [next_page_token][crate::model::ListManagementDnsZoneBindingsResponse::next_page_token].
5244    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5245        self.next_page_token = v.into();
5246        self
5247    }
5248
5249    /// Sets the value of [unreachable][crate::model::ListManagementDnsZoneBindingsResponse::unreachable].
5250    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5251    where
5252        T: std::iter::IntoIterator<Item = V>,
5253        V: std::convert::Into<std::string::String>,
5254    {
5255        use std::iter::Iterator;
5256        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5257        self
5258    }
5259}
5260
5261impl wkt::message::Message for ListManagementDnsZoneBindingsResponse {
5262    fn typename() -> &'static str {
5263        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsResponse"
5264    }
5265}
5266
5267#[doc(hidden)]
5268impl gax::paginator::internal::PageableResponse for ListManagementDnsZoneBindingsResponse {
5269    type PageItem = crate::model::ManagementDnsZoneBinding;
5270
5271    fn items(self) -> std::vec::Vec<Self::PageItem> {
5272        self.management_dns_zone_bindings
5273    }
5274
5275    fn next_page_token(&self) -> std::string::String {
5276        use std::clone::Clone;
5277        self.next_page_token.clone()
5278    }
5279}
5280
5281/// Request message for
5282/// [VmwareEngine.GetManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]
5283///
5284/// [google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]: crate::client::VmwareEngine::get_management_dns_zone_binding
5285#[serde_with::serde_as]
5286#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5287#[serde(default, rename_all = "camelCase")]
5288#[non_exhaustive]
5289pub struct GetManagementDnsZoneBindingRequest {
5290    /// Required. The resource name of the management DNS zone binding to
5291    /// retrieve. Resource names are schemeless URIs that follow the conventions in
5292    /// <https://cloud.google.com/apis/design/resource_names>.
5293    /// For example:
5294    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5295    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5296    pub name: std::string::String,
5297
5298    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5299    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5300}
5301
5302impl GetManagementDnsZoneBindingRequest {
5303    pub fn new() -> Self {
5304        std::default::Default::default()
5305    }
5306
5307    /// Sets the value of [name][crate::model::GetManagementDnsZoneBindingRequest::name].
5308    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5309        self.name = v.into();
5310        self
5311    }
5312}
5313
5314impl wkt::message::Message for GetManagementDnsZoneBindingRequest {
5315    fn typename() -> &'static str {
5316        "type.googleapis.com/google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest"
5317    }
5318}
5319
5320/// Request message for [VmwareEngine.CreateManagementDnsZoneBindings][]
5321#[serde_with::serde_as]
5322#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5323#[serde(default, rename_all = "camelCase")]
5324#[non_exhaustive]
5325pub struct CreateManagementDnsZoneBindingRequest {
5326    /// Required. The resource name of the private cloud
5327    /// to create a new management DNS zone binding for.
5328    /// Resource names are schemeless URIs that follow the conventions in
5329    /// <https://cloud.google.com/apis/design/resource_names>.
5330    /// For example:
5331    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
5332    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5333    pub parent: std::string::String,
5334
5335    /// Required. The initial values for a new management DNS zone binding.
5336    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5337    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
5338
5339    /// Required. The user-provided identifier of the `ManagementDnsZoneBinding`
5340    /// resource to be created. This identifier must be unique among
5341    /// `ManagementDnsZoneBinding` resources within the parent and becomes the
5342    /// final token in the name URI. The identifier must meet the following
5343    /// requirements:
5344    ///
5345    /// * Only contains 1-63 alphanumeric characters and hyphens
5346    /// * Begins with an alphabetical character
5347    /// * Ends with a non-hyphen character
5348    /// * Not formatted as a UUID
5349    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5350    ///   (section 3.5)
5351    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5352    pub management_dns_zone_binding_id: 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 ID,
5362    /// the server can check if the original operation with the same request ID was
5363    /// received, and if so, will ignore the second request. This prevents clients
5364    /// 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    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5369    pub request_id: std::string::String,
5370
5371    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5372    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5373}
5374
5375impl CreateManagementDnsZoneBindingRequest {
5376    pub fn new() -> Self {
5377        std::default::Default::default()
5378    }
5379
5380    /// Sets the value of [parent][crate::model::CreateManagementDnsZoneBindingRequest::parent].
5381    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5382        self.parent = v.into();
5383        self
5384    }
5385
5386    /// Sets the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
5387    pub fn set_management_dns_zone_binding<
5388        T: std::convert::Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
5389    >(
5390        mut self,
5391        v: T,
5392    ) -> Self {
5393        self.management_dns_zone_binding = v.into();
5394        self
5395    }
5396
5397    /// Sets the value of [management_dns_zone_binding_id][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding_id].
5398    pub fn set_management_dns_zone_binding_id<T: std::convert::Into<std::string::String>>(
5399        mut self,
5400        v: T,
5401    ) -> Self {
5402        self.management_dns_zone_binding_id = v.into();
5403        self
5404    }
5405
5406    /// Sets the value of [request_id][crate::model::CreateManagementDnsZoneBindingRequest::request_id].
5407    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5408        self.request_id = v.into();
5409        self
5410    }
5411}
5412
5413impl wkt::message::Message for CreateManagementDnsZoneBindingRequest {
5414    fn typename() -> &'static str {
5415        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest"
5416    }
5417}
5418
5419/// Request message for
5420/// [VmwareEngine.UpdateManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]
5421///
5422/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]: crate::client::VmwareEngine::update_management_dns_zone_binding
5423#[serde_with::serde_as]
5424#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5425#[serde(default, rename_all = "camelCase")]
5426#[non_exhaustive]
5427pub struct UpdateManagementDnsZoneBindingRequest {
5428    /// Required. Field mask is used to specify the fields to be overwritten in the
5429    /// `ManagementDnsZoneBinding` resource by the update.
5430    /// The fields specified in the `update_mask` are relative to the resource, not
5431    /// the full request. A field will be overwritten if it is in the mask. If the
5432    /// user does not provide a mask then all fields will be overwritten.
5433    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5434    pub update_mask: std::option::Option<wkt::FieldMask>,
5435
5436    /// Required. New values to update the management DNS zone binding with.
5437    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5438    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
5439
5440    /// Optional. A request ID to identify requests. Specify a unique request ID
5441    /// so that if you must retry your request, the server will know to ignore
5442    /// the request if it has already been completed. The server guarantees that a
5443    /// request doesn't result in creation of duplicate commitments for at least 60
5444    /// minutes.
5445    ///
5446    /// For example, consider a situation where you make an initial request and the
5447    /// request times out. If you make the request again with the same request ID,
5448    /// the server can check if the original operation with the same request ID was
5449    /// received, and if so, will ignore the second request. This prevents clients
5450    /// from accidentally creating duplicate commitments.
5451    ///
5452    /// The request ID must be a valid UUID with the exception that zero UUID is
5453    /// not supported (00000000-0000-0000-0000-000000000000).
5454    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5455    pub request_id: std::string::String,
5456
5457    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5458    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5459}
5460
5461impl UpdateManagementDnsZoneBindingRequest {
5462    pub fn new() -> Self {
5463        std::default::Default::default()
5464    }
5465
5466    /// Sets the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
5467    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
5468        mut self,
5469        v: T,
5470    ) -> Self {
5471        self.update_mask = v.into();
5472        self
5473    }
5474
5475    /// Sets the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
5476    pub fn set_management_dns_zone_binding<
5477        T: std::convert::Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
5478    >(
5479        mut self,
5480        v: T,
5481    ) -> Self {
5482        self.management_dns_zone_binding = v.into();
5483        self
5484    }
5485
5486    /// Sets the value of [request_id][crate::model::UpdateManagementDnsZoneBindingRequest::request_id].
5487    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5488        self.request_id = v.into();
5489        self
5490    }
5491}
5492
5493impl wkt::message::Message for UpdateManagementDnsZoneBindingRequest {
5494    fn typename() -> &'static str {
5495        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest"
5496    }
5497}
5498
5499/// Request message for
5500/// [VmwareEngine.DeleteManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]
5501///
5502/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]: crate::client::VmwareEngine::delete_management_dns_zone_binding
5503#[serde_with::serde_as]
5504#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5505#[serde(default, rename_all = "camelCase")]
5506#[non_exhaustive]
5507pub struct DeleteManagementDnsZoneBindingRequest {
5508    /// Required. The resource name of the management DNS zone binding to delete.
5509    /// Resource names are schemeless URIs that follow the conventions in
5510    /// <https://cloud.google.com/apis/design/resource_names>.
5511    /// For example:
5512    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5513    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5514    pub name: std::string::String,
5515
5516    /// Optional. A request ID to identify requests. Specify a unique request ID
5517    /// so that if you must retry your request, the server will know to ignore
5518    /// the request if it has already been completed. The server guarantees that a
5519    /// request doesn't result in creation of duplicate commitments for at least 60
5520    /// minutes.
5521    ///
5522    /// For example, consider a situation where you make an initial request and the
5523    /// request times out. If you make the request again with the same request
5524    /// ID, the server can check if the original operation with the same request ID
5525    /// was received, and if so, will ignore the second request. This prevents
5526    /// clients from accidentally creating duplicate commitments.
5527    ///
5528    /// The request ID must be a valid UUID with the exception that zero UUID is
5529    /// not supported (00000000-0000-0000-0000-000000000000).
5530    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5531    pub request_id: std::string::String,
5532
5533    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5534    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5535}
5536
5537impl DeleteManagementDnsZoneBindingRequest {
5538    pub fn new() -> Self {
5539        std::default::Default::default()
5540    }
5541
5542    /// Sets the value of [name][crate::model::DeleteManagementDnsZoneBindingRequest::name].
5543    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5544        self.name = v.into();
5545        self
5546    }
5547
5548    /// Sets the value of [request_id][crate::model::DeleteManagementDnsZoneBindingRequest::request_id].
5549    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5550        self.request_id = v.into();
5551        self
5552    }
5553}
5554
5555impl wkt::message::Message for DeleteManagementDnsZoneBindingRequest {
5556    fn typename() -> &'static str {
5557        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest"
5558    }
5559}
5560
5561/// Request message for [VmwareEngine.RepairManagementDnsZoneBindings][]
5562#[serde_with::serde_as]
5563#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5564#[serde(default, rename_all = "camelCase")]
5565#[non_exhaustive]
5566pub struct RepairManagementDnsZoneBindingRequest {
5567    /// Required. The resource name of the management DNS zone binding to repair.
5568    /// Resource names are schemeless URIs that follow the conventions in
5569    /// <https://cloud.google.com/apis/design/resource_names>.
5570    /// For example:
5571    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5572    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5573    pub name: std::string::String,
5574
5575    /// Optional. A request ID to identify requests. Specify a unique request ID
5576    /// so that if you must retry your request, the server will know to ignore
5577    /// the request if it has already been completed. The server guarantees that a
5578    /// request doesn't result in creation of duplicate commitments for at least 60
5579    /// minutes.
5580    ///
5581    /// For example, consider a situation where you make an initial request and the
5582    /// request times out. If you make the request again with the same request ID,
5583    /// the server can check if the original operation with the same request ID was
5584    /// received, and if so, will ignore the second request. This prevents clients
5585    /// from accidentally creating duplicate commitments.
5586    ///
5587    /// The request ID must be a valid UUID with the exception that zero UUID is
5588    /// not supported (00000000-0000-0000-0000-000000000000).
5589    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5590    pub request_id: std::string::String,
5591
5592    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5593    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5594}
5595
5596impl RepairManagementDnsZoneBindingRequest {
5597    pub fn new() -> Self {
5598        std::default::Default::default()
5599    }
5600
5601    /// Sets the value of [name][crate::model::RepairManagementDnsZoneBindingRequest::name].
5602    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5603        self.name = v.into();
5604        self
5605    }
5606
5607    /// Sets the value of [request_id][crate::model::RepairManagementDnsZoneBindingRequest::request_id].
5608    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5609        self.request_id = v.into();
5610        self
5611    }
5612}
5613
5614impl wkt::message::Message for RepairManagementDnsZoneBindingRequest {
5615    fn typename() -> &'static str {
5616        "type.googleapis.com/google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest"
5617    }
5618}
5619
5620/// Request message for
5621/// [VmwareEngine.CreateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]
5622///
5623/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]: crate::client::VmwareEngine::create_vmware_engine_network
5624#[serde_with::serde_as]
5625#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5626#[serde(default, rename_all = "camelCase")]
5627#[non_exhaustive]
5628pub struct CreateVmwareEngineNetworkRequest {
5629    /// Required. The resource name of the location to create the new VMware Engine
5630    /// network in. A VMware Engine network of type
5631    /// `LEGACY` is a regional resource, and a VMware
5632    /// Engine network of type `STANDARD` is a global resource.
5633    /// Resource names are schemeless URIs that follow the conventions in
5634    /// <https://cloud.google.com/apis/design/resource_names>. For example:
5635    /// `projects/my-project/locations/global`
5636    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5637    pub parent: std::string::String,
5638
5639    /// Required. The user-provided identifier of the new VMware Engine network.
5640    /// This identifier must be unique among VMware Engine network resources
5641    /// within the parent and becomes the final token in the name URI. The
5642    /// identifier must meet the following requirements:
5643    ///
5644    /// * For networks of type LEGACY, adheres to the format:
5645    ///   `{region-id}-default`. Replace `{region-id}` with the region where you want
5646    ///   to create the VMware Engine network. For example, "us-central1-default".
5647    /// * Only contains 1-63 alphanumeric characters and hyphens
5648    /// * Begins with an alphabetical character
5649    /// * Ends with a non-hyphen character
5650    /// * Not formatted as a UUID
5651    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5652    ///   (section 3.5)
5653    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5654    pub vmware_engine_network_id: std::string::String,
5655
5656    /// Required. The initial description of the new VMware Engine network.
5657    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5658    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
5659
5660    /// Optional. A request ID to identify requests. Specify a unique request ID
5661    /// so that if you must retry your request, the server will know to ignore
5662    /// the request if it has already been completed. The server guarantees that a
5663    /// request doesn't result in creation of duplicate commitments for at least 60
5664    /// minutes.
5665    ///
5666    /// For example, consider a situation where you make an initial request and the
5667    /// request times out. If you make the request again with the same request
5668    /// ID, the server can check if original operation with the same request ID
5669    /// was received, and if so, will ignore the second request. This prevents
5670    /// clients from accidentally creating duplicate commitments.
5671    ///
5672    /// The request ID must be a valid UUID with the exception that zero UUID is
5673    /// not supported (00000000-0000-0000-0000-000000000000).
5674    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5675    pub request_id: std::string::String,
5676
5677    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5678    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5679}
5680
5681impl CreateVmwareEngineNetworkRequest {
5682    pub fn new() -> Self {
5683        std::default::Default::default()
5684    }
5685
5686    /// Sets the value of [parent][crate::model::CreateVmwareEngineNetworkRequest::parent].
5687    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5688        self.parent = v.into();
5689        self
5690    }
5691
5692    /// Sets the value of [vmware_engine_network_id][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network_id].
5693    pub fn set_vmware_engine_network_id<T: std::convert::Into<std::string::String>>(
5694        mut self,
5695        v: T,
5696    ) -> Self {
5697        self.vmware_engine_network_id = v.into();
5698        self
5699    }
5700
5701    /// Sets the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
5702    pub fn set_vmware_engine_network<
5703        T: std::convert::Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
5704    >(
5705        mut self,
5706        v: T,
5707    ) -> Self {
5708        self.vmware_engine_network = v.into();
5709        self
5710    }
5711
5712    /// Sets the value of [request_id][crate::model::CreateVmwareEngineNetworkRequest::request_id].
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 CreateVmwareEngineNetworkRequest {
5720    fn typename() -> &'static str {
5721        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest"
5722    }
5723}
5724
5725/// Request message for
5726/// [VmwareEngine.UpdateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]
5727///
5728/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]: crate::client::VmwareEngine::update_vmware_engine_network
5729#[serde_with::serde_as]
5730#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5731#[serde(default, rename_all = "camelCase")]
5732#[non_exhaustive]
5733pub struct UpdateVmwareEngineNetworkRequest {
5734    /// Required. VMware Engine network description.
5735    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5736    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
5737
5738    /// Required. Field mask is used to specify the fields to be overwritten in the
5739    /// VMware Engine network resource by the update.
5740    /// The fields specified in the `update_mask` are relative to the resource, not
5741    /// the full request. A field will be overwritten if it is in the mask. If the
5742    /// user does not provide a mask then all fields will be overwritten. Only the
5743    /// following fields can be updated: `description`.
5744    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5745    pub update_mask: std::option::Option<wkt::FieldMask>,
5746
5747    /// Optional. A request ID to identify requests. Specify a unique request ID
5748    /// so that if you must retry your request, the server will know to ignore
5749    /// the request if it has already been completed. The server guarantees that a
5750    /// request doesn't result in creation of duplicate commitments for at least 60
5751    /// minutes.
5752    ///
5753    /// For example, consider a situation where you make an initial request and the
5754    /// request times out. If you make the request again with the same request
5755    /// ID, the server can check if original operation with the same request ID
5756    /// was received, and if so, will ignore the second request. This prevents
5757    /// clients from accidentally creating duplicate commitments.
5758    ///
5759    /// The request ID must be a valid UUID with the exception that zero UUID is
5760    /// not supported (00000000-0000-0000-0000-000000000000).
5761    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5762    pub request_id: std::string::String,
5763
5764    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5765    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5766}
5767
5768impl UpdateVmwareEngineNetworkRequest {
5769    pub fn new() -> Self {
5770        std::default::Default::default()
5771    }
5772
5773    /// Sets the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
5774    pub fn set_vmware_engine_network<
5775        T: std::convert::Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
5776    >(
5777        mut self,
5778        v: T,
5779    ) -> Self {
5780        self.vmware_engine_network = v.into();
5781        self
5782    }
5783
5784    /// Sets the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
5785    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
5786        mut self,
5787        v: T,
5788    ) -> Self {
5789        self.update_mask = v.into();
5790        self
5791    }
5792
5793    /// Sets the value of [request_id][crate::model::UpdateVmwareEngineNetworkRequest::request_id].
5794    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5795        self.request_id = v.into();
5796        self
5797    }
5798}
5799
5800impl wkt::message::Message for UpdateVmwareEngineNetworkRequest {
5801    fn typename() -> &'static str {
5802        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest"
5803    }
5804}
5805
5806/// Request message for
5807/// [VmwareEngine.DeleteVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]
5808///
5809/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]: crate::client::VmwareEngine::delete_vmware_engine_network
5810#[serde_with::serde_as]
5811#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5812#[serde(default, rename_all = "camelCase")]
5813#[non_exhaustive]
5814pub struct DeleteVmwareEngineNetworkRequest {
5815    /// Required. The resource name of the VMware Engine network to be deleted.
5816    /// Resource names are schemeless URIs that follow the conventions in
5817    /// <https://cloud.google.com/apis/design/resource_names>.
5818    /// For example:
5819    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
5820    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5821    pub name: std::string::String,
5822
5823    /// Optional. A request ID to identify requests. Specify a unique request ID
5824    /// so that if you must retry your request, the server will know to ignore
5825    /// the request if it has already been completed. The server guarantees that a
5826    /// request doesn't result in creation of duplicate commitments for at least 60
5827    /// minutes.
5828    ///
5829    /// For example, consider a situation where you make an initial request and the
5830    /// request times out. If you make the request again with the same request
5831    /// ID, the server can check if original operation with the same request ID
5832    /// was received, and if so, will ignore the second request. This prevents
5833    /// clients from accidentally creating duplicate commitments.
5834    ///
5835    /// The request ID must be a valid UUID with the exception that zero UUID is
5836    /// not supported (00000000-0000-0000-0000-000000000000).
5837    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5838    pub request_id: std::string::String,
5839
5840    /// Optional. Checksum used to ensure that the user-provided value is up to
5841    /// date before the server processes the request. The server compares provided
5842    /// checksum with the current checksum of the resource. If the user-provided
5843    /// value is out of date, this request returns an `ABORTED` error.
5844    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5845    pub etag: std::string::String,
5846
5847    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5848    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5849}
5850
5851impl DeleteVmwareEngineNetworkRequest {
5852    pub fn new() -> Self {
5853        std::default::Default::default()
5854    }
5855
5856    /// Sets the value of [name][crate::model::DeleteVmwareEngineNetworkRequest::name].
5857    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5858        self.name = v.into();
5859        self
5860    }
5861
5862    /// Sets the value of [request_id][crate::model::DeleteVmwareEngineNetworkRequest::request_id].
5863    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5864        self.request_id = v.into();
5865        self
5866    }
5867
5868    /// Sets the value of [etag][crate::model::DeleteVmwareEngineNetworkRequest::etag].
5869    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5870        self.etag = v.into();
5871        self
5872    }
5873}
5874
5875impl wkt::message::Message for DeleteVmwareEngineNetworkRequest {
5876    fn typename() -> &'static str {
5877        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest"
5878    }
5879}
5880
5881/// Request message for
5882/// [VmwareEngine.GetVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]
5883///
5884/// [google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]: crate::client::VmwareEngine::get_vmware_engine_network
5885#[serde_with::serde_as]
5886#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5887#[serde(default, rename_all = "camelCase")]
5888#[non_exhaustive]
5889pub struct GetVmwareEngineNetworkRequest {
5890    /// Required. The resource name of the VMware Engine network to retrieve.
5891    /// Resource names are schemeless URIs that follow the conventions in
5892    /// <https://cloud.google.com/apis/design/resource_names>.
5893    /// For example:
5894    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
5895    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5896    pub name: std::string::String,
5897
5898    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5899    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5900}
5901
5902impl GetVmwareEngineNetworkRequest {
5903    pub fn new() -> Self {
5904        std::default::Default::default()
5905    }
5906
5907    /// Sets the value of [name][crate::model::GetVmwareEngineNetworkRequest::name].
5908    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5909        self.name = v.into();
5910        self
5911    }
5912}
5913
5914impl wkt::message::Message for GetVmwareEngineNetworkRequest {
5915    fn typename() -> &'static str {
5916        "type.googleapis.com/google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest"
5917    }
5918}
5919
5920/// Request message for
5921/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
5922///
5923/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
5924#[serde_with::serde_as]
5925#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5926#[serde(default, rename_all = "camelCase")]
5927#[non_exhaustive]
5928pub struct ListVmwareEngineNetworksRequest {
5929    /// Required. The resource name of the location to query for
5930    /// VMware Engine networks. Resource names are schemeless URIs that follow the
5931    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
5932    /// example: `projects/my-project/locations/global`
5933    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5934    pub parent: std::string::String,
5935
5936    /// The maximum number of results to return in one page.
5937    /// The maximum value is coerced to 1000.
5938    /// The default value of this field is 500.
5939    #[serde(skip_serializing_if = "wkt::internal::is_default")]
5940    pub page_size: i32,
5941
5942    /// A page token, received from a previous `ListVmwareEngineNetworks` call.
5943    /// Provide this to retrieve the subsequent page.
5944    ///
5945    /// When paginating, all other parameters provided to
5946    /// `ListVmwareEngineNetworks` must match the call that provided the page
5947    /// token.
5948    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5949    pub page_token: std::string::String,
5950
5951    /// A filter expression that matches resources returned in the response.
5952    /// The expression must specify the field name, a comparison
5953    /// operator, and the value that you want to use for filtering. The value
5954    /// must be a string, a number, or a boolean. The comparison operator
5955    /// must be `=`, `!=`, `>`, or `<`.
5956    ///
5957    /// For example, if you are filtering a list of network peerings, you can
5958    /// exclude the ones named `example-network` by specifying
5959    /// `name != "example-network"`.
5960    ///
5961    /// To filter on multiple expressions, provide each separate expression within
5962    /// parentheses. For example:
5963    ///
5964    /// ```norust
5965    /// (name = "example-network")
5966    /// (createTime > "2021-04-12T08:15:10.40Z")
5967    /// ```
5968    ///
5969    /// By default, each expression is an `AND` expression. However, you
5970    /// can include `AND` and `OR` expressions explicitly.
5971    /// For example:
5972    ///
5973    /// ```norust
5974    /// (name = "example-network-1") AND
5975    /// (createTime > "2021-04-12T08:15:10.40Z") OR
5976    /// (name = "example-network-2")
5977    /// ```
5978    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5979    pub filter: std::string::String,
5980
5981    /// Sorts list results by a certain order. By default, returned results
5982    /// are ordered by `name` in ascending order.
5983    /// You can also sort results in descending order based on the `name` value
5984    /// using `orderBy="name desc"`.
5985    /// Currently, only ordering by `name` is supported.
5986    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5987    pub order_by: std::string::String,
5988
5989    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5990    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5991}
5992
5993impl ListVmwareEngineNetworksRequest {
5994    pub fn new() -> Self {
5995        std::default::Default::default()
5996    }
5997
5998    /// Sets the value of [parent][crate::model::ListVmwareEngineNetworksRequest::parent].
5999    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6000        self.parent = v.into();
6001        self
6002    }
6003
6004    /// Sets the value of [page_size][crate::model::ListVmwareEngineNetworksRequest::page_size].
6005    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6006        self.page_size = v.into();
6007        self
6008    }
6009
6010    /// Sets the value of [page_token][crate::model::ListVmwareEngineNetworksRequest::page_token].
6011    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6012        self.page_token = v.into();
6013        self
6014    }
6015
6016    /// Sets the value of [filter][crate::model::ListVmwareEngineNetworksRequest::filter].
6017    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6018        self.filter = v.into();
6019        self
6020    }
6021
6022    /// Sets the value of [order_by][crate::model::ListVmwareEngineNetworksRequest::order_by].
6023    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6024        self.order_by = v.into();
6025        self
6026    }
6027}
6028
6029impl wkt::message::Message for ListVmwareEngineNetworksRequest {
6030    fn typename() -> &'static str {
6031        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest"
6032    }
6033}
6034
6035/// Response message for
6036/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
6037///
6038/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
6039#[serde_with::serde_as]
6040#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6041#[serde(default, rename_all = "camelCase")]
6042#[non_exhaustive]
6043pub struct ListVmwareEngineNetworksResponse {
6044    /// A list of VMware Engine networks.
6045    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6046    pub vmware_engine_networks: std::vec::Vec<crate::model::VmwareEngineNetwork>,
6047
6048    /// A token, which can be sent as `page_token` to retrieve the next page.
6049    /// If this field is omitted, there are no subsequent pages.
6050    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6051    pub next_page_token: std::string::String,
6052
6053    /// Unreachable resources.
6054    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6055    pub unreachable: std::vec::Vec<std::string::String>,
6056
6057    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6058    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6059}
6060
6061impl ListVmwareEngineNetworksResponse {
6062    pub fn new() -> Self {
6063        std::default::Default::default()
6064    }
6065
6066    /// Sets the value of [vmware_engine_networks][crate::model::ListVmwareEngineNetworksResponse::vmware_engine_networks].
6067    pub fn set_vmware_engine_networks<T, V>(mut self, v: T) -> Self
6068    where
6069        T: std::iter::IntoIterator<Item = V>,
6070        V: std::convert::Into<crate::model::VmwareEngineNetwork>,
6071    {
6072        use std::iter::Iterator;
6073        self.vmware_engine_networks = v.into_iter().map(|i| i.into()).collect();
6074        self
6075    }
6076
6077    /// Sets the value of [next_page_token][crate::model::ListVmwareEngineNetworksResponse::next_page_token].
6078    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6079        self.next_page_token = v.into();
6080        self
6081    }
6082
6083    /// Sets the value of [unreachable][crate::model::ListVmwareEngineNetworksResponse::unreachable].
6084    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6085    where
6086        T: std::iter::IntoIterator<Item = V>,
6087        V: std::convert::Into<std::string::String>,
6088    {
6089        use std::iter::Iterator;
6090        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6091        self
6092    }
6093}
6094
6095impl wkt::message::Message for ListVmwareEngineNetworksResponse {
6096    fn typename() -> &'static str {
6097        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse"
6098    }
6099}
6100
6101#[doc(hidden)]
6102impl gax::paginator::internal::PageableResponse for ListVmwareEngineNetworksResponse {
6103    type PageItem = crate::model::VmwareEngineNetwork;
6104
6105    fn items(self) -> std::vec::Vec<Self::PageItem> {
6106        self.vmware_engine_networks
6107    }
6108
6109    fn next_page_token(&self) -> std::string::String {
6110        use std::clone::Clone;
6111        self.next_page_token.clone()
6112    }
6113}
6114
6115/// Request message for
6116/// [VmwareEngine.CreatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]
6117///
6118/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]: crate::client::VmwareEngine::create_private_connection
6119#[serde_with::serde_as]
6120#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6121#[serde(default, rename_all = "camelCase")]
6122#[non_exhaustive]
6123pub struct CreatePrivateConnectionRequest {
6124    /// Required. The resource name of the location to create the new private
6125    /// connection in. Private connection is a regional resource.
6126    /// Resource names are schemeless URIs that follow the conventions in
6127    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6128    /// `projects/my-project/locations/us-central1`
6129    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6130    pub parent: std::string::String,
6131
6132    /// Required. The user-provided identifier of the new private connection.
6133    /// This identifier must be unique among private connection resources
6134    /// within the parent and becomes the final token in the name URI. The
6135    /// identifier must meet the following requirements:
6136    ///
6137    /// * Only contains 1-63 alphanumeric characters and hyphens
6138    /// * Begins with an alphabetical character
6139    /// * Ends with a non-hyphen character
6140    /// * Not formatted as a UUID
6141    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
6142    ///   (section 3.5)
6143    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6144    pub private_connection_id: std::string::String,
6145
6146    /// Required. The initial description of the new private connection.
6147    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6148    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
6149
6150    /// Optional. A request ID to identify requests. Specify a unique request ID
6151    /// so that if you must retry your request, the server will know to ignore
6152    /// the request if it has already been completed. The server guarantees that a
6153    /// request doesn't result in creation of duplicate commitments for at least 60
6154    /// minutes.
6155    ///
6156    /// For example, consider a situation where you make an initial request and the
6157    /// request times out. If you make the request again with the same request
6158    /// ID, the server can check if original operation with the same request ID
6159    /// was received, and if so, will ignore the second request. This prevents
6160    /// clients from accidentally creating duplicate commitments.
6161    ///
6162    /// The request ID must be a valid UUID with the exception that zero UUID is
6163    /// not supported (00000000-0000-0000-0000-000000000000).
6164    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6165    pub request_id: std::string::String,
6166
6167    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6168    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6169}
6170
6171impl CreatePrivateConnectionRequest {
6172    pub fn new() -> Self {
6173        std::default::Default::default()
6174    }
6175
6176    /// Sets the value of [parent][crate::model::CreatePrivateConnectionRequest::parent].
6177    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6178        self.parent = v.into();
6179        self
6180    }
6181
6182    /// Sets the value of [private_connection_id][crate::model::CreatePrivateConnectionRequest::private_connection_id].
6183    pub fn set_private_connection_id<T: std::convert::Into<std::string::String>>(
6184        mut self,
6185        v: T,
6186    ) -> Self {
6187        self.private_connection_id = v.into();
6188        self
6189    }
6190
6191    /// Sets the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
6192    pub fn set_private_connection<
6193        T: std::convert::Into<std::option::Option<crate::model::PrivateConnection>>,
6194    >(
6195        mut self,
6196        v: T,
6197    ) -> Self {
6198        self.private_connection = v.into();
6199        self
6200    }
6201
6202    /// Sets the value of [request_id][crate::model::CreatePrivateConnectionRequest::request_id].
6203    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6204        self.request_id = v.into();
6205        self
6206    }
6207}
6208
6209impl wkt::message::Message for CreatePrivateConnectionRequest {
6210    fn typename() -> &'static str {
6211        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest"
6212    }
6213}
6214
6215/// Request message for
6216/// [VmwareEngine.GetPrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]
6217///
6218/// [google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]: crate::client::VmwareEngine::get_private_connection
6219#[serde_with::serde_as]
6220#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6221#[serde(default, rename_all = "camelCase")]
6222#[non_exhaustive]
6223pub struct GetPrivateConnectionRequest {
6224    /// Required. The resource name of the private connection to retrieve.
6225    /// Resource names are schemeless URIs that follow the conventions in
6226    /// <https://cloud.google.com/apis/design/resource_names>.
6227    /// For example:
6228    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
6229    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6230    pub name: std::string::String,
6231
6232    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6233    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6234}
6235
6236impl GetPrivateConnectionRequest {
6237    pub fn new() -> Self {
6238        std::default::Default::default()
6239    }
6240
6241    /// Sets the value of [name][crate::model::GetPrivateConnectionRequest::name].
6242    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6243        self.name = v.into();
6244        self
6245    }
6246}
6247
6248impl wkt::message::Message for GetPrivateConnectionRequest {
6249    fn typename() -> &'static str {
6250        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateConnectionRequest"
6251    }
6252}
6253
6254/// Request message for
6255/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
6256///
6257/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
6258#[serde_with::serde_as]
6259#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6260#[serde(default, rename_all = "camelCase")]
6261#[non_exhaustive]
6262pub struct ListPrivateConnectionsRequest {
6263    /// Required. The resource name of the location to query for
6264    /// private connections. Resource names are schemeless URIs that follow the
6265    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
6266    /// example: `projects/my-project/locations/us-central1`
6267    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6268    pub parent: std::string::String,
6269
6270    /// The maximum number of private connections to return in one page.
6271    /// The maximum value is coerced to 1000.
6272    /// The default value of this field is 500.
6273    #[serde(skip_serializing_if = "wkt::internal::is_default")]
6274    pub page_size: i32,
6275
6276    /// A page token, received from a previous `ListPrivateConnections` call.
6277    /// Provide this to retrieve the subsequent page.
6278    ///
6279    /// When paginating, all other parameters provided to
6280    /// `ListPrivateConnections` must match the call that provided the page
6281    /// token.
6282    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6283    pub page_token: std::string::String,
6284
6285    /// A filter expression that matches resources returned in the response.
6286    /// The expression must specify the field name, a comparison
6287    /// operator, and the value that you want to use for filtering. The value
6288    /// must be a string, a number, or a boolean. The comparison operator
6289    /// must be `=`, `!=`, `>`, or `<`.
6290    ///
6291    /// For example, if you are filtering a list of private connections, you can
6292    /// exclude the ones named `example-connection` by specifying
6293    /// `name != "example-connection"`.
6294    ///
6295    /// To filter on multiple expressions, provide each separate expression within
6296    /// parentheses. For example:
6297    ///
6298    /// ```norust
6299    /// (name = "example-connection")
6300    /// (createTime > "2022-09-22T08:15:10.40Z")
6301    /// ```
6302    ///
6303    /// By default, each expression is an `AND` expression. However, you
6304    /// can include `AND` and `OR` expressions explicitly.
6305    /// For example:
6306    ///
6307    /// ```norust
6308    /// (name = "example-connection-1") AND
6309    /// (createTime > "2021-04-12T08:15:10.40Z") OR
6310    /// (name = "example-connection-2")
6311    /// ```
6312    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6313    pub filter: std::string::String,
6314
6315    /// Sorts list results by a certain order. By default, returned results
6316    /// are ordered by `name` in ascending order.
6317    /// You can also sort results in descending order based on the `name` value
6318    /// using `orderBy="name desc"`.
6319    /// Currently, only ordering by `name` is supported.
6320    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6321    pub order_by: std::string::String,
6322
6323    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6324    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6325}
6326
6327impl ListPrivateConnectionsRequest {
6328    pub fn new() -> Self {
6329        std::default::Default::default()
6330    }
6331
6332    /// Sets the value of [parent][crate::model::ListPrivateConnectionsRequest::parent].
6333    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6334        self.parent = v.into();
6335        self
6336    }
6337
6338    /// Sets the value of [page_size][crate::model::ListPrivateConnectionsRequest::page_size].
6339    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6340        self.page_size = v.into();
6341        self
6342    }
6343
6344    /// Sets the value of [page_token][crate::model::ListPrivateConnectionsRequest::page_token].
6345    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6346        self.page_token = v.into();
6347        self
6348    }
6349
6350    /// Sets the value of [filter][crate::model::ListPrivateConnectionsRequest::filter].
6351    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6352        self.filter = v.into();
6353        self
6354    }
6355
6356    /// Sets the value of [order_by][crate::model::ListPrivateConnectionsRequest::order_by].
6357    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6358        self.order_by = v.into();
6359        self
6360    }
6361}
6362
6363impl wkt::message::Message for ListPrivateConnectionsRequest {
6364    fn typename() -> &'static str {
6365        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest"
6366    }
6367}
6368
6369/// Response message for
6370/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
6371///
6372/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
6373#[serde_with::serde_as]
6374#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6375#[serde(default, rename_all = "camelCase")]
6376#[non_exhaustive]
6377pub struct ListPrivateConnectionsResponse {
6378    /// A list of private connections.
6379    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6380    pub private_connections: std::vec::Vec<crate::model::PrivateConnection>,
6381
6382    /// A token, which can be sent as `page_token` to retrieve the next page.
6383    /// If this field is omitted, there are no subsequent pages.
6384    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6385    pub next_page_token: std::string::String,
6386
6387    /// Unreachable resources.
6388    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6389    pub unreachable: std::vec::Vec<std::string::String>,
6390
6391    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6392    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6393}
6394
6395impl ListPrivateConnectionsResponse {
6396    pub fn new() -> Self {
6397        std::default::Default::default()
6398    }
6399
6400    /// Sets the value of [private_connections][crate::model::ListPrivateConnectionsResponse::private_connections].
6401    pub fn set_private_connections<T, V>(mut self, v: T) -> Self
6402    where
6403        T: std::iter::IntoIterator<Item = V>,
6404        V: std::convert::Into<crate::model::PrivateConnection>,
6405    {
6406        use std::iter::Iterator;
6407        self.private_connections = v.into_iter().map(|i| i.into()).collect();
6408        self
6409    }
6410
6411    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionsResponse::next_page_token].
6412    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6413        self.next_page_token = v.into();
6414        self
6415    }
6416
6417    /// Sets the value of [unreachable][crate::model::ListPrivateConnectionsResponse::unreachable].
6418    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6419    where
6420        T: std::iter::IntoIterator<Item = V>,
6421        V: std::convert::Into<std::string::String>,
6422    {
6423        use std::iter::Iterator;
6424        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6425        self
6426    }
6427}
6428
6429impl wkt::message::Message for ListPrivateConnectionsResponse {
6430    fn typename() -> &'static str {
6431        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsResponse"
6432    }
6433}
6434
6435#[doc(hidden)]
6436impl gax::paginator::internal::PageableResponse for ListPrivateConnectionsResponse {
6437    type PageItem = crate::model::PrivateConnection;
6438
6439    fn items(self) -> std::vec::Vec<Self::PageItem> {
6440        self.private_connections
6441    }
6442
6443    fn next_page_token(&self) -> std::string::String {
6444        use std::clone::Clone;
6445        self.next_page_token.clone()
6446    }
6447}
6448
6449/// Request message for
6450/// [VmwareEngine.UpdatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]
6451///
6452/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]: crate::client::VmwareEngine::update_private_connection
6453#[serde_with::serde_as]
6454#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6455#[serde(default, rename_all = "camelCase")]
6456#[non_exhaustive]
6457pub struct UpdatePrivateConnectionRequest {
6458    /// Required. Private connection description.
6459    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6460    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
6461
6462    /// Required. Field mask is used to specify the fields to be overwritten in the
6463    /// `PrivateConnection` resource by the update.
6464    /// The fields specified in the `update_mask` are relative to the resource, not
6465    /// the full request. A field will be overwritten if it is in the mask. If the
6466    /// user does not provide a mask then all fields will be overwritten.
6467    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6468    pub update_mask: std::option::Option<wkt::FieldMask>,
6469
6470    /// Optional. A request ID to identify requests. Specify a unique request ID
6471    /// so that if you must retry your request, the server will know to ignore
6472    /// the request if it has already been completed. The server guarantees that a
6473    /// request doesn't result in creation of duplicate commitments for at least 60
6474    /// minutes.
6475    ///
6476    /// For example, consider a situation where you make an initial request and the
6477    /// request times out. If you make the request again with the same request
6478    /// ID, the server can check if original operation with the same request ID
6479    /// was received, and if so, will ignore the second request. This prevents
6480    /// clients from accidentally creating duplicate commitments.
6481    ///
6482    /// The request ID must be a valid UUID with the exception that zero UUID is
6483    /// not supported (00000000-0000-0000-0000-000000000000).
6484    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6485    pub request_id: std::string::String,
6486
6487    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6488    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6489}
6490
6491impl UpdatePrivateConnectionRequest {
6492    pub fn new() -> Self {
6493        std::default::Default::default()
6494    }
6495
6496    /// Sets the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
6497    pub fn set_private_connection<
6498        T: std::convert::Into<std::option::Option<crate::model::PrivateConnection>>,
6499    >(
6500        mut self,
6501        v: T,
6502    ) -> Self {
6503        self.private_connection = v.into();
6504        self
6505    }
6506
6507    /// Sets the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
6508    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
6509        mut self,
6510        v: T,
6511    ) -> Self {
6512        self.update_mask = v.into();
6513        self
6514    }
6515
6516    /// Sets the value of [request_id][crate::model::UpdatePrivateConnectionRequest::request_id].
6517    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6518        self.request_id = v.into();
6519        self
6520    }
6521}
6522
6523impl wkt::message::Message for UpdatePrivateConnectionRequest {
6524    fn typename() -> &'static str {
6525        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest"
6526    }
6527}
6528
6529/// Request message for
6530/// [VmwareEngine.DeletePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]
6531///
6532/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]: crate::client::VmwareEngine::delete_private_connection
6533#[serde_with::serde_as]
6534#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6535#[serde(default, rename_all = "camelCase")]
6536#[non_exhaustive]
6537pub struct DeletePrivateConnectionRequest {
6538    /// Required. The resource name of the private connection to be deleted.
6539    /// Resource names are schemeless URIs that follow the conventions in
6540    /// <https://cloud.google.com/apis/design/resource_names>.
6541    /// For example:
6542    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
6543    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6544    pub name: std::string::String,
6545
6546    /// Optional. A request ID to identify requests. Specify a unique request ID
6547    /// so that if you must retry your request, the server will know to ignore
6548    /// the request if it has already been completed. The server guarantees that a
6549    /// request doesn't result in creation of duplicate commitments for at least 60
6550    /// minutes.
6551    ///
6552    /// For example, consider a situation where you make an initial request and the
6553    /// request times out. If you make the request again with the same request
6554    /// ID, the server can check if original operation with the same request ID
6555    /// was received, and if so, will ignore the second request. This prevents
6556    /// clients from accidentally creating duplicate commitments.
6557    ///
6558    /// The request ID must be a valid UUID with the exception that zero UUID is
6559    /// not supported (00000000-0000-0000-0000-000000000000).
6560    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6561    pub request_id: std::string::String,
6562
6563    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6564    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6565}
6566
6567impl DeletePrivateConnectionRequest {
6568    pub fn new() -> Self {
6569        std::default::Default::default()
6570    }
6571
6572    /// Sets the value of [name][crate::model::DeletePrivateConnectionRequest::name].
6573    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6574        self.name = v.into();
6575        self
6576    }
6577
6578    /// Sets the value of [request_id][crate::model::DeletePrivateConnectionRequest::request_id].
6579    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6580        self.request_id = v.into();
6581        self
6582    }
6583}
6584
6585impl wkt::message::Message for DeletePrivateConnectionRequest {
6586    fn typename() -> &'static str {
6587        "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest"
6588    }
6589}
6590
6591/// Request message for
6592/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
6593///
6594/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
6595#[serde_with::serde_as]
6596#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6597#[serde(default, rename_all = "camelCase")]
6598#[non_exhaustive]
6599pub struct ListPrivateConnectionPeeringRoutesRequest {
6600    /// Required. The resource name of the private connection to retrieve peering
6601    /// routes from. Resource names are schemeless URIs that follow the conventions
6602    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
6603    /// `projects/my-project/locations/us-west1/privateConnections/my-connection`
6604    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6605    pub parent: std::string::String,
6606
6607    /// The maximum number of peering routes to return in one page.
6608    /// The service may return fewer than this value.
6609    /// The maximum value is coerced to 1000.
6610    /// The default value of this field is 500.
6611    #[serde(skip_serializing_if = "wkt::internal::is_default")]
6612    pub page_size: i32,
6613
6614    /// A page token, received from a previous `ListPrivateConnectionPeeringRoutes`
6615    /// call. Provide this to retrieve the subsequent page. When paginating, all
6616    /// other parameters provided to `ListPrivateConnectionPeeringRoutes` must
6617    /// match the call that provided the page token.
6618    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6619    pub page_token: std::string::String,
6620
6621    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6622    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6623}
6624
6625impl ListPrivateConnectionPeeringRoutesRequest {
6626    pub fn new() -> Self {
6627        std::default::Default::default()
6628    }
6629
6630    /// Sets the value of [parent][crate::model::ListPrivateConnectionPeeringRoutesRequest::parent].
6631    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6632        self.parent = v.into();
6633        self
6634    }
6635
6636    /// Sets the value of [page_size][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_size].
6637    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6638        self.page_size = v.into();
6639        self
6640    }
6641
6642    /// Sets the value of [page_token][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_token].
6643    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6644        self.page_token = v.into();
6645        self
6646    }
6647}
6648
6649impl wkt::message::Message for ListPrivateConnectionPeeringRoutesRequest {
6650    fn typename() -> &'static str {
6651        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest"
6652    }
6653}
6654
6655/// Response message for
6656/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
6657///
6658/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
6659#[serde_with::serde_as]
6660#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6661#[serde(default, rename_all = "camelCase")]
6662#[non_exhaustive]
6663pub struct ListPrivateConnectionPeeringRoutesResponse {
6664    /// A list of peering routes.
6665    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6666    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
6667
6668    /// A token, which can be sent as `page_token` to retrieve the next page.
6669    /// If this field is omitted, there are no subsequent pages.
6670    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6671    pub next_page_token: std::string::String,
6672
6673    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6674    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6675}
6676
6677impl ListPrivateConnectionPeeringRoutesResponse {
6678    pub fn new() -> Self {
6679        std::default::Default::default()
6680    }
6681
6682    /// Sets the value of [peering_routes][crate::model::ListPrivateConnectionPeeringRoutesResponse::peering_routes].
6683    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
6684    where
6685        T: std::iter::IntoIterator<Item = V>,
6686        V: std::convert::Into<crate::model::PeeringRoute>,
6687    {
6688        use std::iter::Iterator;
6689        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
6690        self
6691    }
6692
6693    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionPeeringRoutesResponse::next_page_token].
6694    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6695        self.next_page_token = v.into();
6696        self
6697    }
6698}
6699
6700impl wkt::message::Message for ListPrivateConnectionPeeringRoutesResponse {
6701    fn typename() -> &'static str {
6702        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesResponse"
6703    }
6704}
6705
6706#[doc(hidden)]
6707impl gax::paginator::internal::PageableResponse for ListPrivateConnectionPeeringRoutesResponse {
6708    type PageItem = crate::model::PeeringRoute;
6709
6710    fn items(self) -> std::vec::Vec<Self::PageItem> {
6711        self.peering_routes
6712    }
6713
6714    fn next_page_token(&self) -> std::string::String {
6715        use std::clone::Clone;
6716        self.next_page_token.clone()
6717    }
6718}
6719
6720/// Request message for
6721/// [VmwareEngine.GrantDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]
6722///
6723/// [google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]: crate::client::VmwareEngine::grant_dns_bind_permission
6724#[serde_with::serde_as]
6725#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6726#[serde(default, rename_all = "camelCase")]
6727#[non_exhaustive]
6728pub struct GrantDnsBindPermissionRequest {
6729    /// Required. The name of the resource which stores the users/service accounts
6730    /// having the permission to bind to the corresponding intranet VPC of the
6731    /// consumer project. DnsBindPermission is a global resource. Resource names
6732    /// are schemeless URIs that follow the conventions in
6733    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6734    /// `projects/my-project/locations/global/dnsBindPermission`
6735    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6736    pub name: std::string::String,
6737
6738    /// Required. The consumer provided user/service account which needs to be
6739    /// granted permission to bind with the intranet VPC corresponding to the
6740    /// consumer project.
6741    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6742    pub principal: std::option::Option<crate::model::Principal>,
6743
6744    /// Optional. A request ID to identify requests. Specify a unique request ID
6745    /// so that if you must retry your request, the server will know to ignore
6746    /// the request if it has already been completed. The server guarantees that a
6747    /// request doesn't result in creation of duplicate commitments for at least 60
6748    /// minutes.
6749    ///
6750    /// For example, consider a situation where you make an initial request and the
6751    /// request times out. If you make the request again with the same request
6752    /// ID, the server can check if original operation with the same request ID
6753    /// was received, and if so, will ignore the second request. This prevents
6754    /// clients from accidentally creating duplicate commitments.
6755    ///
6756    /// The request ID must be a valid UUID with the exception that zero UUID is
6757    /// not supported (00000000-0000-0000-0000-000000000000).
6758    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6759    pub request_id: std::string::String,
6760
6761    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6762    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6763}
6764
6765impl GrantDnsBindPermissionRequest {
6766    pub fn new() -> Self {
6767        std::default::Default::default()
6768    }
6769
6770    /// Sets the value of [name][crate::model::GrantDnsBindPermissionRequest::name].
6771    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6772        self.name = v.into();
6773        self
6774    }
6775
6776    /// Sets the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
6777    pub fn set_principal<T: std::convert::Into<std::option::Option<crate::model::Principal>>>(
6778        mut self,
6779        v: T,
6780    ) -> Self {
6781        self.principal = v.into();
6782        self
6783    }
6784
6785    /// Sets the value of [request_id][crate::model::GrantDnsBindPermissionRequest::request_id].
6786    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6787        self.request_id = v.into();
6788        self
6789    }
6790}
6791
6792impl wkt::message::Message for GrantDnsBindPermissionRequest {
6793    fn typename() -> &'static str {
6794        "type.googleapis.com/google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest"
6795    }
6796}
6797
6798/// Request message for
6799/// [VmwareEngine.RevokeDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]
6800///
6801/// [google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]: crate::client::VmwareEngine::revoke_dns_bind_permission
6802#[serde_with::serde_as]
6803#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6804#[serde(default, rename_all = "camelCase")]
6805#[non_exhaustive]
6806pub struct RevokeDnsBindPermissionRequest {
6807    /// Required. The name of the resource which stores the users/service accounts
6808    /// having the permission to bind to the corresponding intranet VPC of the
6809    /// consumer project. DnsBindPermission is a global resource. Resource names
6810    /// are schemeless URIs that follow the conventions in
6811    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6812    /// `projects/my-project/locations/global/dnsBindPermission`
6813    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6814    pub name: std::string::String,
6815
6816    /// Required. The consumer provided user/service account which needs to be
6817    /// granted permission to bind with the intranet VPC corresponding to the
6818    /// consumer project.
6819    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6820    pub principal: std::option::Option<crate::model::Principal>,
6821
6822    /// Optional. A request ID to identify requests. Specify a unique request ID
6823    /// so that if you must retry your request, the server will know to ignore
6824    /// the request if it has already been completed. The server guarantees that a
6825    /// request doesn't result in creation of duplicate commitments for at least 60
6826    /// minutes.
6827    ///
6828    /// For example, consider a situation where you make an initial request and the
6829    /// request times out. If you make the request again with the same request
6830    /// ID, the server can check if original operation with the same request ID
6831    /// was received, and if so, will ignore the second request. This prevents
6832    /// clients from accidentally creating duplicate commitments.
6833    ///
6834    /// The request ID must be a valid UUID with the exception that zero UUID is
6835    /// not supported (00000000-0000-0000-0000-000000000000).
6836    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6837    pub request_id: std::string::String,
6838
6839    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6840    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6841}
6842
6843impl RevokeDnsBindPermissionRequest {
6844    pub fn new() -> Self {
6845        std::default::Default::default()
6846    }
6847
6848    /// Sets the value of [name][crate::model::RevokeDnsBindPermissionRequest::name].
6849    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6850        self.name = v.into();
6851        self
6852    }
6853
6854    /// Sets the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
6855    pub fn set_principal<T: std::convert::Into<std::option::Option<crate::model::Principal>>>(
6856        mut self,
6857        v: T,
6858    ) -> Self {
6859        self.principal = v.into();
6860        self
6861    }
6862
6863    /// Sets the value of [request_id][crate::model::RevokeDnsBindPermissionRequest::request_id].
6864    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6865        self.request_id = v.into();
6866        self
6867    }
6868}
6869
6870impl wkt::message::Message for RevokeDnsBindPermissionRequest {
6871    fn typename() -> &'static str {
6872        "type.googleapis.com/google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest"
6873    }
6874}
6875
6876/// Request message for
6877/// [VmwareEngine.GetDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]
6878///
6879/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]: crate::client::VmwareEngine::get_dns_bind_permission
6880#[serde_with::serde_as]
6881#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6882#[serde(default, rename_all = "camelCase")]
6883#[non_exhaustive]
6884pub struct GetDnsBindPermissionRequest {
6885    /// Required. The name of the resource which stores the users/service accounts
6886    /// having the permission to bind to the corresponding intranet VPC of the
6887    /// consumer project. DnsBindPermission is a global resource. Resource names
6888    /// are schemeless URIs that follow the conventions in
6889    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6890    /// `projects/my-project/locations/global/dnsBindPermission`
6891    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6892    pub name: std::string::String,
6893
6894    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6895    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6896}
6897
6898impl GetDnsBindPermissionRequest {
6899    pub fn new() -> Self {
6900        std::default::Default::default()
6901    }
6902
6903    /// Sets the value of [name][crate::model::GetDnsBindPermissionRequest::name].
6904    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6905        self.name = v.into();
6906        self
6907    }
6908}
6909
6910impl wkt::message::Message for GetDnsBindPermissionRequest {
6911    fn typename() -> &'static str {
6912        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest"
6913    }
6914}
6915
6916/// Network configuration in the consumer project
6917/// with which the peering has to be done.
6918#[serde_with::serde_as]
6919#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6920#[serde(default, rename_all = "camelCase")]
6921#[non_exhaustive]
6922pub struct NetworkConfig {
6923    /// Required. Management CIDR used by VMware management appliances.
6924    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6925    pub management_cidr: std::string::String,
6926
6927    /// Optional. The relative resource name of the VMware Engine network attached
6928    /// to the private cloud. Specify the name in the following form:
6929    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
6930    /// where `{project}` can either be a project number or a project ID.
6931    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6932    pub vmware_engine_network: std::string::String,
6933
6934    /// Output only. The canonical name of the VMware Engine network in the form:
6935    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
6936    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6937    pub vmware_engine_network_canonical: std::string::String,
6938
6939    /// Output only. The IP address layout version of the management IP address
6940    /// range. Possible versions include:
6941    ///
6942    /// * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address
6943    ///   layout used by some existing private clouds. This is no longer supported
6944    ///   for new private clouds as it does not support all features.
6945    /// * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address
6946    ///   layout used by all newly created private clouds. This version supports all
6947    ///   current features.
6948    #[serde(skip_serializing_if = "wkt::internal::is_default")]
6949    pub management_ip_address_layout_version: i32,
6950
6951    /// Output only. DNS Server IP of the Private Cloud.
6952    /// All DNS queries can be forwarded to this address for name resolution of
6953    /// Private Cloud's management entities like vCenter, NSX-T Manager and
6954    /// ESXi hosts.
6955    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6956    pub dns_server_ip: std::string::String,
6957
6958    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6959    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6960}
6961
6962impl NetworkConfig {
6963    pub fn new() -> Self {
6964        std::default::Default::default()
6965    }
6966
6967    /// Sets the value of [management_cidr][crate::model::NetworkConfig::management_cidr].
6968    pub fn set_management_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6969        self.management_cidr = v.into();
6970        self
6971    }
6972
6973    /// Sets the value of [vmware_engine_network][crate::model::NetworkConfig::vmware_engine_network].
6974    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
6975        mut self,
6976        v: T,
6977    ) -> Self {
6978        self.vmware_engine_network = v.into();
6979        self
6980    }
6981
6982    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkConfig::vmware_engine_network_canonical].
6983    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
6984        mut self,
6985        v: T,
6986    ) -> Self {
6987        self.vmware_engine_network_canonical = v.into();
6988        self
6989    }
6990
6991    /// Sets the value of [management_ip_address_layout_version][crate::model::NetworkConfig::management_ip_address_layout_version].
6992    pub fn set_management_ip_address_layout_version<T: std::convert::Into<i32>>(
6993        mut self,
6994        v: T,
6995    ) -> Self {
6996        self.management_ip_address_layout_version = v.into();
6997        self
6998    }
6999
7000    /// Sets the value of [dns_server_ip][crate::model::NetworkConfig::dns_server_ip].
7001    pub fn set_dns_server_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7002        self.dns_server_ip = v.into();
7003        self
7004    }
7005}
7006
7007impl wkt::message::Message for NetworkConfig {
7008    fn typename() -> &'static str {
7009        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkConfig"
7010    }
7011}
7012
7013/// Information about the type and number of nodes associated with the cluster.
7014#[serde_with::serde_as]
7015#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7016#[serde(default, rename_all = "camelCase")]
7017#[non_exhaustive]
7018pub struct NodeTypeConfig {
7019    /// Required. The number of nodes of this type in the cluster
7020    #[serde(skip_serializing_if = "wkt::internal::is_default")]
7021    pub node_count: i32,
7022
7023    /// Optional. Customized number of cores available to each node of the type.
7024    /// This number must always be one of `nodeType.availableCustomCoreCounts`.
7025    /// If zero is provided max value from `nodeType.availableCustomCoreCounts`
7026    /// will be used.
7027    #[serde(skip_serializing_if = "wkt::internal::is_default")]
7028    pub custom_core_count: i32,
7029
7030    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7031    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7032}
7033
7034impl NodeTypeConfig {
7035    pub fn new() -> Self {
7036        std::default::Default::default()
7037    }
7038
7039    /// Sets the value of [node_count][crate::model::NodeTypeConfig::node_count].
7040    pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7041        self.node_count = v.into();
7042        self
7043    }
7044
7045    /// Sets the value of [custom_core_count][crate::model::NodeTypeConfig::custom_core_count].
7046    pub fn set_custom_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7047        self.custom_core_count = v.into();
7048        self
7049    }
7050}
7051
7052impl wkt::message::Message for NodeTypeConfig {
7053    fn typename() -> &'static str {
7054        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeTypeConfig"
7055    }
7056}
7057
7058/// Configuration of a stretched cluster.
7059#[serde_with::serde_as]
7060#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7061#[serde(default, rename_all = "camelCase")]
7062#[non_exhaustive]
7063pub struct StretchedClusterConfig {
7064    /// Required. Zone that will remain operational when connection between the two
7065    /// zones is lost. Specify the resource name of a zone that belongs to the
7066    /// region of the private cloud. For example:
7067    /// `projects/{project}/locations/europe-west3-a` where `{project}` can either
7068    /// be a project number or a project ID.
7069    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7070    pub preferred_location: std::string::String,
7071
7072    /// Required. Additional zone for a higher level of availability and load
7073    /// balancing. Specify the resource name of a zone that belongs to the region
7074    /// of the private cloud. For example:
7075    /// `projects/{project}/locations/europe-west3-b` where `{project}` can either
7076    /// be a project number or a project ID.
7077    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7078    pub secondary_location: std::string::String,
7079
7080    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7081    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7082}
7083
7084impl StretchedClusterConfig {
7085    pub fn new() -> Self {
7086        std::default::Default::default()
7087    }
7088
7089    /// Sets the value of [preferred_location][crate::model::StretchedClusterConfig::preferred_location].
7090    pub fn set_preferred_location<T: std::convert::Into<std::string::String>>(
7091        mut self,
7092        v: T,
7093    ) -> Self {
7094        self.preferred_location = v.into();
7095        self
7096    }
7097
7098    /// Sets the value of [secondary_location][crate::model::StretchedClusterConfig::secondary_location].
7099    pub fn set_secondary_location<T: std::convert::Into<std::string::String>>(
7100        mut self,
7101        v: T,
7102    ) -> Self {
7103        self.secondary_location = v.into();
7104        self
7105    }
7106}
7107
7108impl wkt::message::Message for StretchedClusterConfig {
7109    fn typename() -> &'static str {
7110        "type.googleapis.com/google.cloud.vmwareengine.v1.StretchedClusterConfig"
7111    }
7112}
7113
7114/// Represents a private cloud resource. Private clouds of type `STANDARD` and
7115/// `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are
7116/// regional.
7117#[serde_with::serde_as]
7118#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7119#[serde(default, rename_all = "camelCase")]
7120#[non_exhaustive]
7121pub struct PrivateCloud {
7122    /// Output only. The resource name of this private cloud.
7123    /// Resource names are schemeless URIs that follow the conventions in
7124    /// <https://cloud.google.com/apis/design/resource_names>.
7125    /// For example:
7126    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
7127    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7128    pub name: std::string::String,
7129
7130    /// Output only. Creation time of this resource.
7131    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7132    pub create_time: std::option::Option<wkt::Timestamp>,
7133
7134    /// Output only. Last update time of this resource.
7135    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7136    pub update_time: std::option::Option<wkt::Timestamp>,
7137
7138    /// Output only. Time when the resource was scheduled for deletion.
7139    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7140    pub delete_time: std::option::Option<wkt::Timestamp>,
7141
7142    /// Output only. Time when the resource will be irreversibly deleted.
7143    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7144    pub expire_time: std::option::Option<wkt::Timestamp>,
7145
7146    /// Output only. State of the resource. New values may be added to this enum
7147    /// when appropriate.
7148    pub state: crate::model::private_cloud::State,
7149
7150    /// Required. Network configuration of the private cloud.
7151    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7152    pub network_config: std::option::Option<crate::model::NetworkConfig>,
7153
7154    /// Required. Input only. The management cluster for this private cloud.
7155    /// This field is required during creation of the private cloud to provide
7156    /// details for the default cluster.
7157    ///
7158    /// The following fields can't be changed after private cloud creation:
7159    /// `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`.
7160    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7161    pub management_cluster: std::option::Option<crate::model::private_cloud::ManagementCluster>,
7162
7163    /// User-provided description for this private cloud.
7164    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7165    pub description: std::string::String,
7166
7167    /// Output only. HCX appliance.
7168    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7169    pub hcx: std::option::Option<crate::model::Hcx>,
7170
7171    /// Output only. NSX appliance.
7172    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7173    pub nsx: std::option::Option<crate::model::Nsx>,
7174
7175    /// Output only. Vcenter appliance.
7176    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7177    pub vcenter: std::option::Option<crate::model::Vcenter>,
7178
7179    /// Output only. System-generated unique identifier for the resource.
7180    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7181    pub uid: std::string::String,
7182
7183    /// Optional. Type of the private cloud. Defaults to STANDARD.
7184    #[serde(rename = "type")]
7185    pub r#type: crate::model::private_cloud::Type,
7186
7187    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7188    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7189}
7190
7191impl PrivateCloud {
7192    pub fn new() -> Self {
7193        std::default::Default::default()
7194    }
7195
7196    /// Sets the value of [name][crate::model::PrivateCloud::name].
7197    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7198        self.name = v.into();
7199        self
7200    }
7201
7202    /// Sets the value of [create_time][crate::model::PrivateCloud::create_time].
7203    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7204        mut self,
7205        v: T,
7206    ) -> Self {
7207        self.create_time = v.into();
7208        self
7209    }
7210
7211    /// Sets the value of [update_time][crate::model::PrivateCloud::update_time].
7212    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7213        mut self,
7214        v: T,
7215    ) -> Self {
7216        self.update_time = v.into();
7217        self
7218    }
7219
7220    /// Sets the value of [delete_time][crate::model::PrivateCloud::delete_time].
7221    pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7222        mut self,
7223        v: T,
7224    ) -> Self {
7225        self.delete_time = v.into();
7226        self
7227    }
7228
7229    /// Sets the value of [expire_time][crate::model::PrivateCloud::expire_time].
7230    pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7231        mut self,
7232        v: T,
7233    ) -> Self {
7234        self.expire_time = v.into();
7235        self
7236    }
7237
7238    /// Sets the value of [state][crate::model::PrivateCloud::state].
7239    pub fn set_state<T: std::convert::Into<crate::model::private_cloud::State>>(
7240        mut self,
7241        v: T,
7242    ) -> Self {
7243        self.state = v.into();
7244        self
7245    }
7246
7247    /// Sets the value of [network_config][crate::model::PrivateCloud::network_config].
7248    pub fn set_network_config<
7249        T: std::convert::Into<std::option::Option<crate::model::NetworkConfig>>,
7250    >(
7251        mut self,
7252        v: T,
7253    ) -> Self {
7254        self.network_config = v.into();
7255        self
7256    }
7257
7258    /// Sets the value of [management_cluster][crate::model::PrivateCloud::management_cluster].
7259    pub fn set_management_cluster<
7260        T: std::convert::Into<std::option::Option<crate::model::private_cloud::ManagementCluster>>,
7261    >(
7262        mut self,
7263        v: T,
7264    ) -> Self {
7265        self.management_cluster = v.into();
7266        self
7267    }
7268
7269    /// Sets the value of [description][crate::model::PrivateCloud::description].
7270    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7271        self.description = v.into();
7272        self
7273    }
7274
7275    /// Sets the value of [hcx][crate::model::PrivateCloud::hcx].
7276    pub fn set_hcx<T: std::convert::Into<std::option::Option<crate::model::Hcx>>>(
7277        mut self,
7278        v: T,
7279    ) -> Self {
7280        self.hcx = v.into();
7281        self
7282    }
7283
7284    /// Sets the value of [nsx][crate::model::PrivateCloud::nsx].
7285    pub fn set_nsx<T: std::convert::Into<std::option::Option<crate::model::Nsx>>>(
7286        mut self,
7287        v: T,
7288    ) -> Self {
7289        self.nsx = v.into();
7290        self
7291    }
7292
7293    /// Sets the value of [vcenter][crate::model::PrivateCloud::vcenter].
7294    pub fn set_vcenter<T: std::convert::Into<std::option::Option<crate::model::Vcenter>>>(
7295        mut self,
7296        v: T,
7297    ) -> Self {
7298        self.vcenter = v.into();
7299        self
7300    }
7301
7302    /// Sets the value of [uid][crate::model::PrivateCloud::uid].
7303    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7304        self.uid = v.into();
7305        self
7306    }
7307
7308    /// Sets the value of [r#type][crate::model::PrivateCloud::type].
7309    pub fn set_type<T: std::convert::Into<crate::model::private_cloud::Type>>(
7310        mut self,
7311        v: T,
7312    ) -> Self {
7313        self.r#type = v.into();
7314        self
7315    }
7316}
7317
7318impl wkt::message::Message for PrivateCloud {
7319    fn typename() -> &'static str {
7320        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud"
7321    }
7322}
7323
7324/// Defines additional types related to [PrivateCloud].
7325pub mod private_cloud {
7326    #[allow(unused_imports)]
7327    use super::*;
7328
7329    /// Management cluster configuration.
7330    #[serde_with::serde_as]
7331    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7332    #[serde(default, rename_all = "camelCase")]
7333    #[non_exhaustive]
7334    pub struct ManagementCluster {
7335        /// Required. The user-provided identifier of the new `Cluster`.
7336        /// The identifier must meet the following requirements:
7337        ///
7338        /// * Only contains 1-63 alphanumeric characters and hyphens
7339        /// * Begins with an alphabetical character
7340        /// * Ends with a non-hyphen character
7341        /// * Not formatted as a UUID
7342        /// * Complies with [RFC
7343        ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
7344        #[serde(skip_serializing_if = "std::string::String::is_empty")]
7345        pub cluster_id: std::string::String,
7346
7347        /// Required. The map of cluster node types in this cluster, where the key is
7348        /// canonical identifier of the node type (corresponds to the `NodeType`).
7349        #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
7350        pub node_type_configs:
7351            std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
7352
7353        /// Optional. Configuration of a stretched cluster. Required for STRETCHED
7354        /// private clouds.
7355        #[serde(skip_serializing_if = "std::option::Option::is_none")]
7356        pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
7357
7358        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7359        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7360    }
7361
7362    impl ManagementCluster {
7363        pub fn new() -> Self {
7364            std::default::Default::default()
7365        }
7366
7367        /// Sets the value of [cluster_id][crate::model::private_cloud::ManagementCluster::cluster_id].
7368        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7369            self.cluster_id = v.into();
7370            self
7371        }
7372
7373        /// Sets the value of [node_type_configs][crate::model::private_cloud::ManagementCluster::node_type_configs].
7374        pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
7375        where
7376            T: std::iter::IntoIterator<Item = (K, V)>,
7377            K: std::convert::Into<std::string::String>,
7378            V: std::convert::Into<crate::model::NodeTypeConfig>,
7379        {
7380            use std::iter::Iterator;
7381            self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7382            self
7383        }
7384
7385        /// Sets the value of [stretched_cluster_config][crate::model::private_cloud::ManagementCluster::stretched_cluster_config].
7386        pub fn set_stretched_cluster_config<
7387            T: std::convert::Into<std::option::Option<crate::model::StretchedClusterConfig>>,
7388        >(
7389            mut self,
7390            v: T,
7391        ) -> Self {
7392            self.stretched_cluster_config = v.into();
7393            self
7394        }
7395    }
7396
7397    impl wkt::message::Message for ManagementCluster {
7398        fn typename() -> &'static str {
7399            "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster"
7400        }
7401    }
7402
7403    /// Enum State defines possible states of private clouds.
7404    ///
7405    /// # Working with unknown values
7406    ///
7407    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7408    /// additional enum variants at any time. Adding new variants is not considered
7409    /// a breaking change. Applications should write their code in anticipation of:
7410    ///
7411    /// - New values appearing in future releases of the client library, **and**
7412    /// - New values received dynamically, without application changes.
7413    ///
7414    /// Please consult the [Working with enums] section in the user guide for some
7415    /// guidelines.
7416    ///
7417    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7418    #[derive(Clone, Debug, PartialEq)]
7419    #[non_exhaustive]
7420    pub enum State {
7421        /// The default value. This value should never be used.
7422        Unspecified,
7423        /// The private cloud is ready.
7424        Active,
7425        /// The private cloud is being created.
7426        Creating,
7427        /// The private cloud is being updated.
7428        Updating,
7429        /// The private cloud is in failed state.
7430        Failed,
7431        /// The private cloud is scheduled for deletion. The deletion process can be
7432        /// cancelled by using the corresponding undelete method.
7433        Deleted,
7434        /// The private cloud is irreversibly deleted and is being removed from the
7435        /// system.
7436        Purging,
7437        /// If set, the enum was initialized with an unknown value.
7438        ///
7439        /// Applications can examine the value using [State::value] or
7440        /// [State::name].
7441        UnknownValue(state::UnknownValue),
7442    }
7443
7444    #[doc(hidden)]
7445    pub mod state {
7446        #[allow(unused_imports)]
7447        use super::*;
7448        #[derive(Clone, Debug, PartialEq)]
7449        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7450    }
7451
7452    impl State {
7453        /// Gets the enum value.
7454        ///
7455        /// Returns `None` if the enum contains an unknown value deserialized from
7456        /// the string representation of enums.
7457        pub fn value(&self) -> std::option::Option<i32> {
7458            match self {
7459                Self::Unspecified => std::option::Option::Some(0),
7460                Self::Active => std::option::Option::Some(1),
7461                Self::Creating => std::option::Option::Some(2),
7462                Self::Updating => std::option::Option::Some(3),
7463                Self::Failed => std::option::Option::Some(5),
7464                Self::Deleted => std::option::Option::Some(6),
7465                Self::Purging => std::option::Option::Some(7),
7466                Self::UnknownValue(u) => u.0.value(),
7467            }
7468        }
7469
7470        /// Gets the enum value as a string.
7471        ///
7472        /// Returns `None` if the enum contains an unknown value deserialized from
7473        /// the integer representation of enums.
7474        pub fn name(&self) -> std::option::Option<&str> {
7475            match self {
7476                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
7477                Self::Active => std::option::Option::Some("ACTIVE"),
7478                Self::Creating => std::option::Option::Some("CREATING"),
7479                Self::Updating => std::option::Option::Some("UPDATING"),
7480                Self::Failed => std::option::Option::Some("FAILED"),
7481                Self::Deleted => std::option::Option::Some("DELETED"),
7482                Self::Purging => std::option::Option::Some("PURGING"),
7483                Self::UnknownValue(u) => u.0.name(),
7484            }
7485        }
7486    }
7487
7488    impl std::default::Default for State {
7489        fn default() -> Self {
7490            use std::convert::From;
7491            Self::from(0)
7492        }
7493    }
7494
7495    impl std::fmt::Display for State {
7496        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7497            wkt::internal::display_enum(f, self.name(), self.value())
7498        }
7499    }
7500
7501    impl std::convert::From<i32> for State {
7502        fn from(value: i32) -> Self {
7503            match value {
7504                0 => Self::Unspecified,
7505                1 => Self::Active,
7506                2 => Self::Creating,
7507                3 => Self::Updating,
7508                5 => Self::Failed,
7509                6 => Self::Deleted,
7510                7 => Self::Purging,
7511                _ => Self::UnknownValue(state::UnknownValue(
7512                    wkt::internal::UnknownEnumValue::Integer(value),
7513                )),
7514            }
7515        }
7516    }
7517
7518    impl std::convert::From<&str> for State {
7519        fn from(value: &str) -> Self {
7520            use std::string::ToString;
7521            match value {
7522                "STATE_UNSPECIFIED" => Self::Unspecified,
7523                "ACTIVE" => Self::Active,
7524                "CREATING" => Self::Creating,
7525                "UPDATING" => Self::Updating,
7526                "FAILED" => Self::Failed,
7527                "DELETED" => Self::Deleted,
7528                "PURGING" => Self::Purging,
7529                _ => Self::UnknownValue(state::UnknownValue(
7530                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7531                )),
7532            }
7533        }
7534    }
7535
7536    impl serde::ser::Serialize for State {
7537        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7538        where
7539            S: serde::Serializer,
7540        {
7541            match self {
7542                Self::Unspecified => serializer.serialize_i32(0),
7543                Self::Active => serializer.serialize_i32(1),
7544                Self::Creating => serializer.serialize_i32(2),
7545                Self::Updating => serializer.serialize_i32(3),
7546                Self::Failed => serializer.serialize_i32(5),
7547                Self::Deleted => serializer.serialize_i32(6),
7548                Self::Purging => serializer.serialize_i32(7),
7549                Self::UnknownValue(u) => u.0.serialize(serializer),
7550            }
7551        }
7552    }
7553
7554    impl<'de> serde::de::Deserialize<'de> for State {
7555        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7556        where
7557            D: serde::Deserializer<'de>,
7558        {
7559            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
7560                ".google.cloud.vmwareengine.v1.PrivateCloud.State",
7561            ))
7562        }
7563    }
7564
7565    /// Enum Type defines private cloud type.
7566    ///
7567    /// # Working with unknown values
7568    ///
7569    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7570    /// additional enum variants at any time. Adding new variants is not considered
7571    /// a breaking change. Applications should write their code in anticipation of:
7572    ///
7573    /// - New values appearing in future releases of the client library, **and**
7574    /// - New values received dynamically, without application changes.
7575    ///
7576    /// Please consult the [Working with enums] section in the user guide for some
7577    /// guidelines.
7578    ///
7579    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7580    #[derive(Clone, Debug, PartialEq)]
7581    #[non_exhaustive]
7582    pub enum Type {
7583        /// Standard private is a zonal resource, with 3+ nodes. Default type.
7584        Standard,
7585        /// Time limited private cloud is a zonal resource, can have only 1 node and
7586        /// has limited life span. Will be deleted after defined period of time,
7587        /// can be converted into standard private cloud by expanding it up to 3
7588        /// or more nodes.
7589        TimeLimited,
7590        /// Stretched private cloud is a regional resource with redundancy,
7591        /// with a minimum of 6 nodes, nodes count has to be even.
7592        Stretched,
7593        /// If set, the enum was initialized with an unknown value.
7594        ///
7595        /// Applications can examine the value using [Type::value] or
7596        /// [Type::name].
7597        UnknownValue(r#type::UnknownValue),
7598    }
7599
7600    #[doc(hidden)]
7601    pub mod r#type {
7602        #[allow(unused_imports)]
7603        use super::*;
7604        #[derive(Clone, Debug, PartialEq)]
7605        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7606    }
7607
7608    impl Type {
7609        /// Gets the enum value.
7610        ///
7611        /// Returns `None` if the enum contains an unknown value deserialized from
7612        /// the string representation of enums.
7613        pub fn value(&self) -> std::option::Option<i32> {
7614            match self {
7615                Self::Standard => std::option::Option::Some(0),
7616                Self::TimeLimited => std::option::Option::Some(1),
7617                Self::Stretched => std::option::Option::Some(2),
7618                Self::UnknownValue(u) => u.0.value(),
7619            }
7620        }
7621
7622        /// Gets the enum value as a string.
7623        ///
7624        /// Returns `None` if the enum contains an unknown value deserialized from
7625        /// the integer representation of enums.
7626        pub fn name(&self) -> std::option::Option<&str> {
7627            match self {
7628                Self::Standard => std::option::Option::Some("STANDARD"),
7629                Self::TimeLimited => std::option::Option::Some("TIME_LIMITED"),
7630                Self::Stretched => std::option::Option::Some("STRETCHED"),
7631                Self::UnknownValue(u) => u.0.name(),
7632            }
7633        }
7634    }
7635
7636    impl std::default::Default for Type {
7637        fn default() -> Self {
7638            use std::convert::From;
7639            Self::from(0)
7640        }
7641    }
7642
7643    impl std::fmt::Display for Type {
7644        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7645            wkt::internal::display_enum(f, self.name(), self.value())
7646        }
7647    }
7648
7649    impl std::convert::From<i32> for Type {
7650        fn from(value: i32) -> Self {
7651            match value {
7652                0 => Self::Standard,
7653                1 => Self::TimeLimited,
7654                2 => Self::Stretched,
7655                _ => Self::UnknownValue(r#type::UnknownValue(
7656                    wkt::internal::UnknownEnumValue::Integer(value),
7657                )),
7658            }
7659        }
7660    }
7661
7662    impl std::convert::From<&str> for Type {
7663        fn from(value: &str) -> Self {
7664            use std::string::ToString;
7665            match value {
7666                "STANDARD" => Self::Standard,
7667                "TIME_LIMITED" => Self::TimeLimited,
7668                "STRETCHED" => Self::Stretched,
7669                _ => Self::UnknownValue(r#type::UnknownValue(
7670                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7671                )),
7672            }
7673        }
7674    }
7675
7676    impl serde::ser::Serialize for Type {
7677        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7678        where
7679            S: serde::Serializer,
7680        {
7681            match self {
7682                Self::Standard => serializer.serialize_i32(0),
7683                Self::TimeLimited => serializer.serialize_i32(1),
7684                Self::Stretched => serializer.serialize_i32(2),
7685                Self::UnknownValue(u) => u.0.serialize(serializer),
7686            }
7687        }
7688    }
7689
7690    impl<'de> serde::de::Deserialize<'de> for Type {
7691        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7692        where
7693            D: serde::Deserializer<'de>,
7694        {
7695            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
7696                ".google.cloud.vmwareengine.v1.PrivateCloud.Type",
7697            ))
7698        }
7699    }
7700}
7701
7702/// A cluster in a private cloud.
7703#[serde_with::serde_as]
7704#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7705#[serde(default, rename_all = "camelCase")]
7706#[non_exhaustive]
7707pub struct Cluster {
7708    /// Output only. The resource name of this cluster.
7709    /// Resource names are schemeless URIs that follow the conventions in
7710    /// <https://cloud.google.com/apis/design/resource_names>.
7711    /// For example:
7712    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
7713    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7714    pub name: std::string::String,
7715
7716    /// Output only. Creation time of this resource.
7717    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7718    pub create_time: std::option::Option<wkt::Timestamp>,
7719
7720    /// Output only. Last update time of this resource.
7721    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7722    pub update_time: std::option::Option<wkt::Timestamp>,
7723
7724    /// Output only. State of the resource.
7725    pub state: crate::model::cluster::State,
7726
7727    /// Output only. True if the cluster is a management cluster; false otherwise.
7728    /// There can only be one management cluster in a private cloud
7729    /// and it has to be the first one.
7730    #[serde(skip_serializing_if = "wkt::internal::is_default")]
7731    pub management: bool,
7732
7733    /// Optional. Configuration of the autoscaling applied to this cluster.
7734    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7735    pub autoscaling_settings: std::option::Option<crate::model::AutoscalingSettings>,
7736
7737    /// Output only. System-generated unique identifier for the resource.
7738    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7739    pub uid: std::string::String,
7740
7741    /// Required. The map of cluster node types in this cluster, where the key is
7742    /// canonical identifier of the node type (corresponds to the `NodeType`).
7743    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
7744    pub node_type_configs:
7745        std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
7746
7747    /// Optional. Configuration of a stretched cluster. Required for clusters that
7748    /// belong to a STRETCHED private cloud.
7749    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7750    pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
7751
7752    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7753    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7754}
7755
7756impl Cluster {
7757    pub fn new() -> Self {
7758        std::default::Default::default()
7759    }
7760
7761    /// Sets the value of [name][crate::model::Cluster::name].
7762    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7763        self.name = v.into();
7764        self
7765    }
7766
7767    /// Sets the value of [create_time][crate::model::Cluster::create_time].
7768    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7769        mut self,
7770        v: T,
7771    ) -> Self {
7772        self.create_time = v.into();
7773        self
7774    }
7775
7776    /// Sets the value of [update_time][crate::model::Cluster::update_time].
7777    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7778        mut self,
7779        v: T,
7780    ) -> Self {
7781        self.update_time = v.into();
7782        self
7783    }
7784
7785    /// Sets the value of [state][crate::model::Cluster::state].
7786    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
7787        self.state = v.into();
7788        self
7789    }
7790
7791    /// Sets the value of [management][crate::model::Cluster::management].
7792    pub fn set_management<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7793        self.management = v.into();
7794        self
7795    }
7796
7797    /// Sets the value of [autoscaling_settings][crate::model::Cluster::autoscaling_settings].
7798    pub fn set_autoscaling_settings<
7799        T: std::convert::Into<std::option::Option<crate::model::AutoscalingSettings>>,
7800    >(
7801        mut self,
7802        v: T,
7803    ) -> Self {
7804        self.autoscaling_settings = v.into();
7805        self
7806    }
7807
7808    /// Sets the value of [uid][crate::model::Cluster::uid].
7809    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7810        self.uid = v.into();
7811        self
7812    }
7813
7814    /// Sets the value of [node_type_configs][crate::model::Cluster::node_type_configs].
7815    pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
7816    where
7817        T: std::iter::IntoIterator<Item = (K, V)>,
7818        K: std::convert::Into<std::string::String>,
7819        V: std::convert::Into<crate::model::NodeTypeConfig>,
7820    {
7821        use std::iter::Iterator;
7822        self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7823        self
7824    }
7825
7826    /// Sets the value of [stretched_cluster_config][crate::model::Cluster::stretched_cluster_config].
7827    pub fn set_stretched_cluster_config<
7828        T: std::convert::Into<std::option::Option<crate::model::StretchedClusterConfig>>,
7829    >(
7830        mut self,
7831        v: T,
7832    ) -> Self {
7833        self.stretched_cluster_config = v.into();
7834        self
7835    }
7836}
7837
7838impl wkt::message::Message for Cluster {
7839    fn typename() -> &'static str {
7840        "type.googleapis.com/google.cloud.vmwareengine.v1.Cluster"
7841    }
7842}
7843
7844/// Defines additional types related to [Cluster].
7845pub mod cluster {
7846    #[allow(unused_imports)]
7847    use super::*;
7848
7849    /// Enum State defines possible states of private cloud clusters.
7850    ///
7851    /// # Working with unknown values
7852    ///
7853    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7854    /// additional enum variants at any time. Adding new variants is not considered
7855    /// a breaking change. Applications should write their code in anticipation of:
7856    ///
7857    /// - New values appearing in future releases of the client library, **and**
7858    /// - New values received dynamically, without application changes.
7859    ///
7860    /// Please consult the [Working with enums] section in the user guide for some
7861    /// guidelines.
7862    ///
7863    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7864    #[derive(Clone, Debug, PartialEq)]
7865    #[non_exhaustive]
7866    pub enum State {
7867        /// The default value. This value should never be used.
7868        Unspecified,
7869        /// The Cluster is operational and can be used by the user.
7870        Active,
7871        /// The Cluster is being deployed.
7872        Creating,
7873        /// Adding or removing of a node to the cluster, any other cluster specific
7874        /// updates.
7875        Updating,
7876        /// The Cluster is being deleted.
7877        Deleting,
7878        /// The Cluster is undergoing maintenance, for example: a failed node is
7879        /// getting replaced.
7880        Repairing,
7881        /// If set, the enum was initialized with an unknown value.
7882        ///
7883        /// Applications can examine the value using [State::value] or
7884        /// [State::name].
7885        UnknownValue(state::UnknownValue),
7886    }
7887
7888    #[doc(hidden)]
7889    pub mod state {
7890        #[allow(unused_imports)]
7891        use super::*;
7892        #[derive(Clone, Debug, PartialEq)]
7893        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7894    }
7895
7896    impl State {
7897        /// Gets the enum value.
7898        ///
7899        /// Returns `None` if the enum contains an unknown value deserialized from
7900        /// the string representation of enums.
7901        pub fn value(&self) -> std::option::Option<i32> {
7902            match self {
7903                Self::Unspecified => std::option::Option::Some(0),
7904                Self::Active => std::option::Option::Some(1),
7905                Self::Creating => std::option::Option::Some(2),
7906                Self::Updating => std::option::Option::Some(3),
7907                Self::Deleting => std::option::Option::Some(4),
7908                Self::Repairing => std::option::Option::Some(5),
7909                Self::UnknownValue(u) => u.0.value(),
7910            }
7911        }
7912
7913        /// Gets the enum value as a string.
7914        ///
7915        /// Returns `None` if the enum contains an unknown value deserialized from
7916        /// the integer representation of enums.
7917        pub fn name(&self) -> std::option::Option<&str> {
7918            match self {
7919                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
7920                Self::Active => std::option::Option::Some("ACTIVE"),
7921                Self::Creating => std::option::Option::Some("CREATING"),
7922                Self::Updating => std::option::Option::Some("UPDATING"),
7923                Self::Deleting => std::option::Option::Some("DELETING"),
7924                Self::Repairing => std::option::Option::Some("REPAIRING"),
7925                Self::UnknownValue(u) => u.0.name(),
7926            }
7927        }
7928    }
7929
7930    impl std::default::Default for State {
7931        fn default() -> Self {
7932            use std::convert::From;
7933            Self::from(0)
7934        }
7935    }
7936
7937    impl std::fmt::Display for State {
7938        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7939            wkt::internal::display_enum(f, self.name(), self.value())
7940        }
7941    }
7942
7943    impl std::convert::From<i32> for State {
7944        fn from(value: i32) -> Self {
7945            match value {
7946                0 => Self::Unspecified,
7947                1 => Self::Active,
7948                2 => Self::Creating,
7949                3 => Self::Updating,
7950                4 => Self::Deleting,
7951                5 => Self::Repairing,
7952                _ => Self::UnknownValue(state::UnknownValue(
7953                    wkt::internal::UnknownEnumValue::Integer(value),
7954                )),
7955            }
7956        }
7957    }
7958
7959    impl std::convert::From<&str> for State {
7960        fn from(value: &str) -> Self {
7961            use std::string::ToString;
7962            match value {
7963                "STATE_UNSPECIFIED" => Self::Unspecified,
7964                "ACTIVE" => Self::Active,
7965                "CREATING" => Self::Creating,
7966                "UPDATING" => Self::Updating,
7967                "DELETING" => Self::Deleting,
7968                "REPAIRING" => Self::Repairing,
7969                _ => Self::UnknownValue(state::UnknownValue(
7970                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7971                )),
7972            }
7973        }
7974    }
7975
7976    impl serde::ser::Serialize for State {
7977        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7978        where
7979            S: serde::Serializer,
7980        {
7981            match self {
7982                Self::Unspecified => serializer.serialize_i32(0),
7983                Self::Active => serializer.serialize_i32(1),
7984                Self::Creating => serializer.serialize_i32(2),
7985                Self::Updating => serializer.serialize_i32(3),
7986                Self::Deleting => serializer.serialize_i32(4),
7987                Self::Repairing => serializer.serialize_i32(5),
7988                Self::UnknownValue(u) => u.0.serialize(serializer),
7989            }
7990        }
7991    }
7992
7993    impl<'de> serde::de::Deserialize<'de> for State {
7994        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7995        where
7996            D: serde::Deserializer<'de>,
7997        {
7998            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
7999                ".google.cloud.vmwareengine.v1.Cluster.State",
8000            ))
8001        }
8002    }
8003}
8004
8005/// Node in a cluster.
8006#[serde_with::serde_as]
8007#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8008#[serde(default, rename_all = "camelCase")]
8009#[non_exhaustive]
8010pub struct Node {
8011    /// Output only. The resource name of this node.
8012    /// Resource names are schemeless URIs that follow the conventions in
8013    /// <https://cloud.google.com/apis/design/resource_names>.
8014    /// For example:
8015    /// projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node
8016    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8017    pub name: std::string::String,
8018
8019    /// Output only. Fully qualified domain name of the node.
8020    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8021    pub fqdn: std::string::String,
8022
8023    /// Output only. Internal IP address of the node.
8024    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8025    pub internal_ip: std::string::String,
8026
8027    /// Output only. The canonical identifier of the node type (corresponds to the
8028    /// `NodeType`).
8029    /// For example: standard-72.
8030    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8031    pub node_type_id: std::string::String,
8032
8033    /// Output only. The version number of the VMware ESXi
8034    /// management component in this cluster.
8035    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8036    pub version: std::string::String,
8037
8038    /// Output only. Customized number of cores
8039    #[serde(skip_serializing_if = "wkt::internal::is_default")]
8040    #[serde_as(as = "serde_with::DisplayFromStr")]
8041    pub custom_core_count: i64,
8042
8043    /// Output only. The state of the appliance.
8044    pub state: crate::model::node::State,
8045
8046    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8047    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8048}
8049
8050impl Node {
8051    pub fn new() -> Self {
8052        std::default::Default::default()
8053    }
8054
8055    /// Sets the value of [name][crate::model::Node::name].
8056    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8057        self.name = v.into();
8058        self
8059    }
8060
8061    /// Sets the value of [fqdn][crate::model::Node::fqdn].
8062    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8063        self.fqdn = v.into();
8064        self
8065    }
8066
8067    /// Sets the value of [internal_ip][crate::model::Node::internal_ip].
8068    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8069        self.internal_ip = v.into();
8070        self
8071    }
8072
8073    /// Sets the value of [node_type_id][crate::model::Node::node_type_id].
8074    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8075        self.node_type_id = v.into();
8076        self
8077    }
8078
8079    /// Sets the value of [version][crate::model::Node::version].
8080    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8081        self.version = v.into();
8082        self
8083    }
8084
8085    /// Sets the value of [custom_core_count][crate::model::Node::custom_core_count].
8086    pub fn set_custom_core_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
8087        self.custom_core_count = v.into();
8088        self
8089    }
8090
8091    /// Sets the value of [state][crate::model::Node::state].
8092    pub fn set_state<T: std::convert::Into<crate::model::node::State>>(mut self, v: T) -> Self {
8093        self.state = v.into();
8094        self
8095    }
8096}
8097
8098impl wkt::message::Message for Node {
8099    fn typename() -> &'static str {
8100        "type.googleapis.com/google.cloud.vmwareengine.v1.Node"
8101    }
8102}
8103
8104/// Defines additional types related to [Node].
8105pub mod node {
8106    #[allow(unused_imports)]
8107    use super::*;
8108
8109    /// Enum State defines possible states of a node in a cluster.
8110    ///
8111    /// # Working with unknown values
8112    ///
8113    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8114    /// additional enum variants at any time. Adding new variants is not considered
8115    /// a breaking change. Applications should write their code in anticipation of:
8116    ///
8117    /// - New values appearing in future releases of the client library, **and**
8118    /// - New values received dynamically, without application changes.
8119    ///
8120    /// Please consult the [Working with enums] section in the user guide for some
8121    /// guidelines.
8122    ///
8123    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8124    #[derive(Clone, Debug, PartialEq)]
8125    #[non_exhaustive]
8126    pub enum State {
8127        /// The default value. This value should never be used.
8128        Unspecified,
8129        /// Node is operational and can be used by the user.
8130        Active,
8131        /// Node is being provisioned.
8132        Creating,
8133        /// Node is in a failed state.
8134        Failed,
8135        /// Node is undergoing maintenance, e.g.: during private cloud upgrade.
8136        Upgrading,
8137        /// If set, the enum was initialized with an unknown value.
8138        ///
8139        /// Applications can examine the value using [State::value] or
8140        /// [State::name].
8141        UnknownValue(state::UnknownValue),
8142    }
8143
8144    #[doc(hidden)]
8145    pub mod state {
8146        #[allow(unused_imports)]
8147        use super::*;
8148        #[derive(Clone, Debug, PartialEq)]
8149        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8150    }
8151
8152    impl State {
8153        /// Gets the enum value.
8154        ///
8155        /// Returns `None` if the enum contains an unknown value deserialized from
8156        /// the string representation of enums.
8157        pub fn value(&self) -> std::option::Option<i32> {
8158            match self {
8159                Self::Unspecified => std::option::Option::Some(0),
8160                Self::Active => std::option::Option::Some(1),
8161                Self::Creating => std::option::Option::Some(2),
8162                Self::Failed => std::option::Option::Some(3),
8163                Self::Upgrading => std::option::Option::Some(4),
8164                Self::UnknownValue(u) => u.0.value(),
8165            }
8166        }
8167
8168        /// Gets the enum value as a string.
8169        ///
8170        /// Returns `None` if the enum contains an unknown value deserialized from
8171        /// the integer representation of enums.
8172        pub fn name(&self) -> std::option::Option<&str> {
8173            match self {
8174                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8175                Self::Active => std::option::Option::Some("ACTIVE"),
8176                Self::Creating => std::option::Option::Some("CREATING"),
8177                Self::Failed => std::option::Option::Some("FAILED"),
8178                Self::Upgrading => std::option::Option::Some("UPGRADING"),
8179                Self::UnknownValue(u) => u.0.name(),
8180            }
8181        }
8182    }
8183
8184    impl std::default::Default for State {
8185        fn default() -> Self {
8186            use std::convert::From;
8187            Self::from(0)
8188        }
8189    }
8190
8191    impl std::fmt::Display for State {
8192        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8193            wkt::internal::display_enum(f, self.name(), self.value())
8194        }
8195    }
8196
8197    impl std::convert::From<i32> for State {
8198        fn from(value: i32) -> Self {
8199            match value {
8200                0 => Self::Unspecified,
8201                1 => Self::Active,
8202                2 => Self::Creating,
8203                3 => Self::Failed,
8204                4 => Self::Upgrading,
8205                _ => Self::UnknownValue(state::UnknownValue(
8206                    wkt::internal::UnknownEnumValue::Integer(value),
8207                )),
8208            }
8209        }
8210    }
8211
8212    impl std::convert::From<&str> for State {
8213        fn from(value: &str) -> Self {
8214            use std::string::ToString;
8215            match value {
8216                "STATE_UNSPECIFIED" => Self::Unspecified,
8217                "ACTIVE" => Self::Active,
8218                "CREATING" => Self::Creating,
8219                "FAILED" => Self::Failed,
8220                "UPGRADING" => Self::Upgrading,
8221                _ => Self::UnknownValue(state::UnknownValue(
8222                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8223                )),
8224            }
8225        }
8226    }
8227
8228    impl serde::ser::Serialize for State {
8229        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8230        where
8231            S: serde::Serializer,
8232        {
8233            match self {
8234                Self::Unspecified => serializer.serialize_i32(0),
8235                Self::Active => serializer.serialize_i32(1),
8236                Self::Creating => serializer.serialize_i32(2),
8237                Self::Failed => serializer.serialize_i32(3),
8238                Self::Upgrading => serializer.serialize_i32(4),
8239                Self::UnknownValue(u) => u.0.serialize(serializer),
8240            }
8241        }
8242    }
8243
8244    impl<'de> serde::de::Deserialize<'de> for State {
8245        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8246        where
8247            D: serde::Deserializer<'de>,
8248        {
8249            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8250                ".google.cloud.vmwareengine.v1.Node.State",
8251            ))
8252        }
8253    }
8254}
8255
8256/// Represents an allocated external IP address and its corresponding internal IP
8257/// address in a private cloud.
8258#[serde_with::serde_as]
8259#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8260#[serde(default, rename_all = "camelCase")]
8261#[non_exhaustive]
8262pub struct ExternalAddress {
8263    /// Output only. The resource name of this external IP address.
8264    /// Resource names are schemeless URIs that follow the conventions in
8265    /// <https://cloud.google.com/apis/design/resource_names>.
8266    /// For example:
8267    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`
8268    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8269    pub name: std::string::String,
8270
8271    /// Output only. Creation time of this resource.
8272    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8273    pub create_time: std::option::Option<wkt::Timestamp>,
8274
8275    /// Output only. Last update time of this resource.
8276    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8277    pub update_time: std::option::Option<wkt::Timestamp>,
8278
8279    /// The internal IP address of a workload VM.
8280    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8281    pub internal_ip: std::string::String,
8282
8283    /// Output only. The external IP address of a workload VM.
8284    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8285    pub external_ip: std::string::String,
8286
8287    /// Output only. The state of the resource.
8288    pub state: crate::model::external_address::State,
8289
8290    /// Output only. System-generated unique identifier for the resource.
8291    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8292    pub uid: std::string::String,
8293
8294    /// User-provided description for this resource.
8295    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8296    pub description: std::string::String,
8297
8298    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8299    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8300}
8301
8302impl ExternalAddress {
8303    pub fn new() -> Self {
8304        std::default::Default::default()
8305    }
8306
8307    /// Sets the value of [name][crate::model::ExternalAddress::name].
8308    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8309        self.name = v.into();
8310        self
8311    }
8312
8313    /// Sets the value of [create_time][crate::model::ExternalAddress::create_time].
8314    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8315        mut self,
8316        v: T,
8317    ) -> Self {
8318        self.create_time = v.into();
8319        self
8320    }
8321
8322    /// Sets the value of [update_time][crate::model::ExternalAddress::update_time].
8323    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8324        mut self,
8325        v: T,
8326    ) -> Self {
8327        self.update_time = v.into();
8328        self
8329    }
8330
8331    /// Sets the value of [internal_ip][crate::model::ExternalAddress::internal_ip].
8332    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8333        self.internal_ip = v.into();
8334        self
8335    }
8336
8337    /// Sets the value of [external_ip][crate::model::ExternalAddress::external_ip].
8338    pub fn set_external_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8339        self.external_ip = v.into();
8340        self
8341    }
8342
8343    /// Sets the value of [state][crate::model::ExternalAddress::state].
8344    pub fn set_state<T: std::convert::Into<crate::model::external_address::State>>(
8345        mut self,
8346        v: T,
8347    ) -> Self {
8348        self.state = v.into();
8349        self
8350    }
8351
8352    /// Sets the value of [uid][crate::model::ExternalAddress::uid].
8353    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8354        self.uid = v.into();
8355        self
8356    }
8357
8358    /// Sets the value of [description][crate::model::ExternalAddress::description].
8359    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8360        self.description = v.into();
8361        self
8362    }
8363}
8364
8365impl wkt::message::Message for ExternalAddress {
8366    fn typename() -> &'static str {
8367        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAddress"
8368    }
8369}
8370
8371/// Defines additional types related to [ExternalAddress].
8372pub mod external_address {
8373    #[allow(unused_imports)]
8374    use super::*;
8375
8376    /// Enum State defines possible states of external addresses.
8377    ///
8378    /// # Working with unknown values
8379    ///
8380    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8381    /// additional enum variants at any time. Adding new variants is not considered
8382    /// a breaking change. Applications should write their code in anticipation of:
8383    ///
8384    /// - New values appearing in future releases of the client library, **and**
8385    /// - New values received dynamically, without application changes.
8386    ///
8387    /// Please consult the [Working with enums] section in the user guide for some
8388    /// guidelines.
8389    ///
8390    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8391    #[derive(Clone, Debug, PartialEq)]
8392    #[non_exhaustive]
8393    pub enum State {
8394        /// The default value. This value should never be used.
8395        Unspecified,
8396        /// The address is ready.
8397        Active,
8398        /// The address is being created.
8399        Creating,
8400        /// The address is being updated.
8401        Updating,
8402        /// The address is being deleted.
8403        Deleting,
8404        /// If set, the enum was initialized with an unknown value.
8405        ///
8406        /// Applications can examine the value using [State::value] or
8407        /// [State::name].
8408        UnknownValue(state::UnknownValue),
8409    }
8410
8411    #[doc(hidden)]
8412    pub mod state {
8413        #[allow(unused_imports)]
8414        use super::*;
8415        #[derive(Clone, Debug, PartialEq)]
8416        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8417    }
8418
8419    impl State {
8420        /// Gets the enum value.
8421        ///
8422        /// Returns `None` if the enum contains an unknown value deserialized from
8423        /// the string representation of enums.
8424        pub fn value(&self) -> std::option::Option<i32> {
8425            match self {
8426                Self::Unspecified => std::option::Option::Some(0),
8427                Self::Active => std::option::Option::Some(1),
8428                Self::Creating => std::option::Option::Some(2),
8429                Self::Updating => std::option::Option::Some(3),
8430                Self::Deleting => std::option::Option::Some(4),
8431                Self::UnknownValue(u) => u.0.value(),
8432            }
8433        }
8434
8435        /// Gets the enum value as a string.
8436        ///
8437        /// Returns `None` if the enum contains an unknown value deserialized from
8438        /// the integer representation of enums.
8439        pub fn name(&self) -> std::option::Option<&str> {
8440            match self {
8441                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8442                Self::Active => std::option::Option::Some("ACTIVE"),
8443                Self::Creating => std::option::Option::Some("CREATING"),
8444                Self::Updating => std::option::Option::Some("UPDATING"),
8445                Self::Deleting => std::option::Option::Some("DELETING"),
8446                Self::UnknownValue(u) => u.0.name(),
8447            }
8448        }
8449    }
8450
8451    impl std::default::Default for State {
8452        fn default() -> Self {
8453            use std::convert::From;
8454            Self::from(0)
8455        }
8456    }
8457
8458    impl std::fmt::Display for State {
8459        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8460            wkt::internal::display_enum(f, self.name(), self.value())
8461        }
8462    }
8463
8464    impl std::convert::From<i32> for State {
8465        fn from(value: i32) -> Self {
8466            match value {
8467                0 => Self::Unspecified,
8468                1 => Self::Active,
8469                2 => Self::Creating,
8470                3 => Self::Updating,
8471                4 => Self::Deleting,
8472                _ => Self::UnknownValue(state::UnknownValue(
8473                    wkt::internal::UnknownEnumValue::Integer(value),
8474                )),
8475            }
8476        }
8477    }
8478
8479    impl std::convert::From<&str> for State {
8480        fn from(value: &str) -> Self {
8481            use std::string::ToString;
8482            match value {
8483                "STATE_UNSPECIFIED" => Self::Unspecified,
8484                "ACTIVE" => Self::Active,
8485                "CREATING" => Self::Creating,
8486                "UPDATING" => Self::Updating,
8487                "DELETING" => Self::Deleting,
8488                _ => Self::UnknownValue(state::UnknownValue(
8489                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8490                )),
8491            }
8492        }
8493    }
8494
8495    impl serde::ser::Serialize for State {
8496        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8497        where
8498            S: serde::Serializer,
8499        {
8500            match self {
8501                Self::Unspecified => serializer.serialize_i32(0),
8502                Self::Active => serializer.serialize_i32(1),
8503                Self::Creating => serializer.serialize_i32(2),
8504                Self::Updating => serializer.serialize_i32(3),
8505                Self::Deleting => serializer.serialize_i32(4),
8506                Self::UnknownValue(u) => u.0.serialize(serializer),
8507            }
8508        }
8509    }
8510
8511    impl<'de> serde::de::Deserialize<'de> for State {
8512        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8513        where
8514            D: serde::Deserializer<'de>,
8515        {
8516            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8517                ".google.cloud.vmwareengine.v1.ExternalAddress.State",
8518            ))
8519        }
8520    }
8521}
8522
8523/// Subnet in a private cloud. Either `management` subnets (such as vMotion) that
8524/// are read-only, or `userDefined`, which can also be updated.
8525#[serde_with::serde_as]
8526#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8527#[serde(default, rename_all = "camelCase")]
8528#[non_exhaustive]
8529pub struct Subnet {
8530    /// Output only. The resource name of this subnet.
8531    /// Resource names are schemeless URIs that follow the conventions in
8532    /// <https://cloud.google.com/apis/design/resource_names>.
8533    /// For example:
8534    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
8535    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8536    pub name: std::string::String,
8537
8538    /// The IP address range of the subnet in CIDR format '10.0.0.0/24'.
8539    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8540    pub ip_cidr_range: std::string::String,
8541
8542    /// The IP address of the gateway of this subnet.
8543    /// Must fall within the IP prefix defined above.
8544    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8545    pub gateway_ip: std::string::String,
8546
8547    /// Output only. The type of the subnet. For example "management" or
8548    /// "userDefined".
8549    #[serde(rename = "type")]
8550    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8551    pub r#type: std::string::String,
8552
8553    /// Output only. The state of the resource.
8554    pub state: crate::model::subnet::State,
8555
8556    /// Output only. VLAN ID of the VLAN on which the subnet is configured
8557    #[serde(skip_serializing_if = "wkt::internal::is_default")]
8558    pub vlan_id: i32,
8559
8560    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8561    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8562}
8563
8564impl Subnet {
8565    pub fn new() -> Self {
8566        std::default::Default::default()
8567    }
8568
8569    /// Sets the value of [name][crate::model::Subnet::name].
8570    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8571        self.name = v.into();
8572        self
8573    }
8574
8575    /// Sets the value of [ip_cidr_range][crate::model::Subnet::ip_cidr_range].
8576    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8577        self.ip_cidr_range = v.into();
8578        self
8579    }
8580
8581    /// Sets the value of [gateway_ip][crate::model::Subnet::gateway_ip].
8582    pub fn set_gateway_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8583        self.gateway_ip = v.into();
8584        self
8585    }
8586
8587    /// Sets the value of [r#type][crate::model::Subnet::type].
8588    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8589        self.r#type = v.into();
8590        self
8591    }
8592
8593    /// Sets the value of [state][crate::model::Subnet::state].
8594    pub fn set_state<T: std::convert::Into<crate::model::subnet::State>>(mut self, v: T) -> Self {
8595        self.state = v.into();
8596        self
8597    }
8598
8599    /// Sets the value of [vlan_id][crate::model::Subnet::vlan_id].
8600    pub fn set_vlan_id<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8601        self.vlan_id = v.into();
8602        self
8603    }
8604}
8605
8606impl wkt::message::Message for Subnet {
8607    fn typename() -> &'static str {
8608        "type.googleapis.com/google.cloud.vmwareengine.v1.Subnet"
8609    }
8610}
8611
8612/// Defines additional types related to [Subnet].
8613pub mod subnet {
8614    #[allow(unused_imports)]
8615    use super::*;
8616
8617    /// Defines possible states of subnets.
8618    ///
8619    /// # Working with unknown values
8620    ///
8621    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8622    /// additional enum variants at any time. Adding new variants is not considered
8623    /// a breaking change. Applications should write their code in anticipation of:
8624    ///
8625    /// - New values appearing in future releases of the client library, **and**
8626    /// - New values received dynamically, without application changes.
8627    ///
8628    /// Please consult the [Working with enums] section in the user guide for some
8629    /// guidelines.
8630    ///
8631    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8632    #[derive(Clone, Debug, PartialEq)]
8633    #[non_exhaustive]
8634    pub enum State {
8635        /// The default value. This value should never be used.
8636        Unspecified,
8637        /// The subnet is ready.
8638        Active,
8639        /// The subnet is being created.
8640        Creating,
8641        /// The subnet is being updated.
8642        Updating,
8643        /// The subnet is being deleted.
8644        Deleting,
8645        /// Changes requested in the last operation are being propagated.
8646        Reconciling,
8647        /// Last operation on the subnet did not succeed. Subnet's payload is
8648        /// reverted back to its most recent working state.
8649        Failed,
8650        /// If set, the enum was initialized with an unknown value.
8651        ///
8652        /// Applications can examine the value using [State::value] or
8653        /// [State::name].
8654        UnknownValue(state::UnknownValue),
8655    }
8656
8657    #[doc(hidden)]
8658    pub mod state {
8659        #[allow(unused_imports)]
8660        use super::*;
8661        #[derive(Clone, Debug, PartialEq)]
8662        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8663    }
8664
8665    impl State {
8666        /// Gets the enum value.
8667        ///
8668        /// Returns `None` if the enum contains an unknown value deserialized from
8669        /// the string representation of enums.
8670        pub fn value(&self) -> std::option::Option<i32> {
8671            match self {
8672                Self::Unspecified => std::option::Option::Some(0),
8673                Self::Active => std::option::Option::Some(1),
8674                Self::Creating => std::option::Option::Some(2),
8675                Self::Updating => std::option::Option::Some(3),
8676                Self::Deleting => std::option::Option::Some(4),
8677                Self::Reconciling => std::option::Option::Some(5),
8678                Self::Failed => std::option::Option::Some(6),
8679                Self::UnknownValue(u) => u.0.value(),
8680            }
8681        }
8682
8683        /// Gets the enum value as a string.
8684        ///
8685        /// Returns `None` if the enum contains an unknown value deserialized from
8686        /// the integer representation of enums.
8687        pub fn name(&self) -> std::option::Option<&str> {
8688            match self {
8689                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8690                Self::Active => std::option::Option::Some("ACTIVE"),
8691                Self::Creating => std::option::Option::Some("CREATING"),
8692                Self::Updating => std::option::Option::Some("UPDATING"),
8693                Self::Deleting => std::option::Option::Some("DELETING"),
8694                Self::Reconciling => std::option::Option::Some("RECONCILING"),
8695                Self::Failed => std::option::Option::Some("FAILED"),
8696                Self::UnknownValue(u) => u.0.name(),
8697            }
8698        }
8699    }
8700
8701    impl std::default::Default for State {
8702        fn default() -> Self {
8703            use std::convert::From;
8704            Self::from(0)
8705        }
8706    }
8707
8708    impl std::fmt::Display for State {
8709        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8710            wkt::internal::display_enum(f, self.name(), self.value())
8711        }
8712    }
8713
8714    impl std::convert::From<i32> for State {
8715        fn from(value: i32) -> Self {
8716            match value {
8717                0 => Self::Unspecified,
8718                1 => Self::Active,
8719                2 => Self::Creating,
8720                3 => Self::Updating,
8721                4 => Self::Deleting,
8722                5 => Self::Reconciling,
8723                6 => Self::Failed,
8724                _ => Self::UnknownValue(state::UnknownValue(
8725                    wkt::internal::UnknownEnumValue::Integer(value),
8726                )),
8727            }
8728        }
8729    }
8730
8731    impl std::convert::From<&str> for State {
8732        fn from(value: &str) -> Self {
8733            use std::string::ToString;
8734            match value {
8735                "STATE_UNSPECIFIED" => Self::Unspecified,
8736                "ACTIVE" => Self::Active,
8737                "CREATING" => Self::Creating,
8738                "UPDATING" => Self::Updating,
8739                "DELETING" => Self::Deleting,
8740                "RECONCILING" => Self::Reconciling,
8741                "FAILED" => Self::Failed,
8742                _ => Self::UnknownValue(state::UnknownValue(
8743                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8744                )),
8745            }
8746        }
8747    }
8748
8749    impl serde::ser::Serialize for State {
8750        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8751        where
8752            S: serde::Serializer,
8753        {
8754            match self {
8755                Self::Unspecified => serializer.serialize_i32(0),
8756                Self::Active => serializer.serialize_i32(1),
8757                Self::Creating => serializer.serialize_i32(2),
8758                Self::Updating => serializer.serialize_i32(3),
8759                Self::Deleting => serializer.serialize_i32(4),
8760                Self::Reconciling => serializer.serialize_i32(5),
8761                Self::Failed => serializer.serialize_i32(6),
8762                Self::UnknownValue(u) => u.0.serialize(serializer),
8763            }
8764        }
8765    }
8766
8767    impl<'de> serde::de::Deserialize<'de> for State {
8768        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8769        where
8770            D: serde::Deserializer<'de>,
8771        {
8772            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8773                ".google.cloud.vmwareengine.v1.Subnet.State",
8774            ))
8775        }
8776    }
8777}
8778
8779/// External access firewall rules for filtering incoming traffic destined to
8780/// `ExternalAddress` resources.
8781#[serde_with::serde_as]
8782#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8783#[serde(default, rename_all = "camelCase")]
8784#[non_exhaustive]
8785pub struct ExternalAccessRule {
8786    /// Output only. The resource name of this external access rule.
8787    /// Resource names are schemeless URIs that follow the conventions in
8788    /// <https://cloud.google.com/apis/design/resource_names>.
8789    /// For example:
8790    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
8791    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8792    pub name: std::string::String,
8793
8794    /// Output only. Creation time of this resource.
8795    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8796    pub create_time: std::option::Option<wkt::Timestamp>,
8797
8798    /// Output only. Last update time of this resource.
8799    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8800    pub update_time: std::option::Option<wkt::Timestamp>,
8801
8802    /// User-provided description for this external access rule.
8803    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8804    pub description: std::string::String,
8805
8806    /// External access rule priority, which determines the external access rule to
8807    /// use when multiple rules apply. If multiple rules have the same priority,
8808    /// their ordering is non-deterministic. If specific ordering is required,
8809    /// assign unique priorities to enforce such ordering. The external access rule
8810    /// priority is an integer from 100 to 4096, both inclusive. Lower integers
8811    /// indicate higher precedence. For example, a rule with priority `100` has
8812    /// higher precedence than a rule with priority `101`.
8813    #[serde(skip_serializing_if = "wkt::internal::is_default")]
8814    pub priority: i32,
8815
8816    /// The action that the external access rule performs.
8817    pub action: crate::model::external_access_rule::Action,
8818
8819    /// The IP protocol to which the external access rule applies. This value can
8820    /// be one of the following three protocol strings (not case-sensitive):
8821    /// `tcp`, `udp`, or `icmp`.
8822    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8823    pub ip_protocol: std::string::String,
8824
8825    /// If source ranges are specified, the external access rule applies only to
8826    /// traffic that has a source IP address in these ranges. These ranges can
8827    /// either be expressed in the CIDR format or as an IP address. As only inbound
8828    /// rules are supported, `ExternalAddress` resources cannot be the source IP
8829    /// addresses of an external access rule. To match all source addresses,
8830    /// specify `0.0.0.0/0`.
8831    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8832    pub source_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
8833
8834    /// A list of source ports to which the external access rule applies. This
8835    /// field is only applicable for the UDP or TCP protocol.
8836    /// Each entry must be either an integer or a range. For example: `["22"]`,
8837    /// `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify
8838    /// `["0-65535"]`.
8839    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8840    pub source_ports: std::vec::Vec<std::string::String>,
8841
8842    /// If destination ranges are specified, the external access rule applies only
8843    /// to the traffic that has a destination IP address in these ranges. The
8844    /// specified IP addresses must have reserved external IP addresses in the
8845    /// scope of the parent network policy. To match all external IP addresses in
8846    /// the scope of the parent network policy, specify `0.0.0.0/0`. To match a
8847    /// specific external IP address, specify it using the
8848    /// `IpRange.external_address` property.
8849    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8850    pub destination_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
8851
8852    /// A list of destination ports to which the external access rule applies. This
8853    /// field is only applicable for the UDP or TCP protocol.
8854    /// Each entry must be either an integer or a range. For example: `["22"]`,
8855    /// `["80","443"]`, or `["12345-12349"]`. To match all destination ports,
8856    /// specify `["0-65535"]`.
8857    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8858    pub destination_ports: std::vec::Vec<std::string::String>,
8859
8860    /// Output only. The state of the resource.
8861    pub state: crate::model::external_access_rule::State,
8862
8863    /// Output only. System-generated unique identifier for the resource.
8864    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8865    pub uid: std::string::String,
8866
8867    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8868    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8869}
8870
8871impl ExternalAccessRule {
8872    pub fn new() -> Self {
8873        std::default::Default::default()
8874    }
8875
8876    /// Sets the value of [name][crate::model::ExternalAccessRule::name].
8877    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8878        self.name = v.into();
8879        self
8880    }
8881
8882    /// Sets the value of [create_time][crate::model::ExternalAccessRule::create_time].
8883    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8884        mut self,
8885        v: T,
8886    ) -> Self {
8887        self.create_time = v.into();
8888        self
8889    }
8890
8891    /// Sets the value of [update_time][crate::model::ExternalAccessRule::update_time].
8892    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8893        mut self,
8894        v: T,
8895    ) -> Self {
8896        self.update_time = v.into();
8897        self
8898    }
8899
8900    /// Sets the value of [description][crate::model::ExternalAccessRule::description].
8901    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8902        self.description = v.into();
8903        self
8904    }
8905
8906    /// Sets the value of [priority][crate::model::ExternalAccessRule::priority].
8907    pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8908        self.priority = v.into();
8909        self
8910    }
8911
8912    /// Sets the value of [action][crate::model::ExternalAccessRule::action].
8913    pub fn set_action<T: std::convert::Into<crate::model::external_access_rule::Action>>(
8914        mut self,
8915        v: T,
8916    ) -> Self {
8917        self.action = v.into();
8918        self
8919    }
8920
8921    /// Sets the value of [ip_protocol][crate::model::ExternalAccessRule::ip_protocol].
8922    pub fn set_ip_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8923        self.ip_protocol = v.into();
8924        self
8925    }
8926
8927    /// Sets the value of [source_ip_ranges][crate::model::ExternalAccessRule::source_ip_ranges].
8928    pub fn set_source_ip_ranges<T, V>(mut self, v: T) -> Self
8929    where
8930        T: std::iter::IntoIterator<Item = V>,
8931        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
8932    {
8933        use std::iter::Iterator;
8934        self.source_ip_ranges = v.into_iter().map(|i| i.into()).collect();
8935        self
8936    }
8937
8938    /// Sets the value of [source_ports][crate::model::ExternalAccessRule::source_ports].
8939    pub fn set_source_ports<T, V>(mut self, v: T) -> Self
8940    where
8941        T: std::iter::IntoIterator<Item = V>,
8942        V: std::convert::Into<std::string::String>,
8943    {
8944        use std::iter::Iterator;
8945        self.source_ports = v.into_iter().map(|i| i.into()).collect();
8946        self
8947    }
8948
8949    /// Sets the value of [destination_ip_ranges][crate::model::ExternalAccessRule::destination_ip_ranges].
8950    pub fn set_destination_ip_ranges<T, V>(mut self, v: T) -> Self
8951    where
8952        T: std::iter::IntoIterator<Item = V>,
8953        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
8954    {
8955        use std::iter::Iterator;
8956        self.destination_ip_ranges = v.into_iter().map(|i| i.into()).collect();
8957        self
8958    }
8959
8960    /// Sets the value of [destination_ports][crate::model::ExternalAccessRule::destination_ports].
8961    pub fn set_destination_ports<T, V>(mut self, v: T) -> Self
8962    where
8963        T: std::iter::IntoIterator<Item = V>,
8964        V: std::convert::Into<std::string::String>,
8965    {
8966        use std::iter::Iterator;
8967        self.destination_ports = v.into_iter().map(|i| i.into()).collect();
8968        self
8969    }
8970
8971    /// Sets the value of [state][crate::model::ExternalAccessRule::state].
8972    pub fn set_state<T: std::convert::Into<crate::model::external_access_rule::State>>(
8973        mut self,
8974        v: T,
8975    ) -> Self {
8976        self.state = v.into();
8977        self
8978    }
8979
8980    /// Sets the value of [uid][crate::model::ExternalAccessRule::uid].
8981    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8982        self.uid = v.into();
8983        self
8984    }
8985}
8986
8987impl wkt::message::Message for ExternalAccessRule {
8988    fn typename() -> &'static str {
8989        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule"
8990    }
8991}
8992
8993/// Defines additional types related to [ExternalAccessRule].
8994pub mod external_access_rule {
8995    #[allow(unused_imports)]
8996    use super::*;
8997
8998    /// An IP range provided in any one of the supported formats.
8999    #[serde_with::serde_as]
9000    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9001    #[serde(default, rename_all = "camelCase")]
9002    #[non_exhaustive]
9003    pub struct IpRange {
9004        #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
9005        pub ip_range: std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
9006
9007        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9008        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9009    }
9010
9011    impl IpRange {
9012        pub fn new() -> Self {
9013            std::default::Default::default()
9014        }
9015
9016        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range].
9017        ///
9018        /// Note that all the setters affecting `ip_range` are mutually
9019        /// exclusive.
9020        pub fn set_ip_range<
9021            T: std::convert::Into<
9022                    std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
9023                >,
9024        >(
9025            mut self,
9026            v: T,
9027        ) -> Self {
9028            self.ip_range = v.into();
9029            self
9030        }
9031
9032        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
9033        /// if it holds a `IpAddress`, `None` if the field is not set or
9034        /// holds a different branch.
9035        pub fn ip_address(&self) -> std::option::Option<&std::string::String> {
9036            #[allow(unreachable_patterns)]
9037            self.ip_range.as_ref().and_then(|v| match v {
9038                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v) => {
9039                    std::option::Option::Some(v)
9040                }
9041                _ => std::option::Option::None,
9042            })
9043        }
9044
9045        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
9046        /// to hold a `IpAddress`.
9047        ///
9048        /// Note that all the setters affecting `ip_range` are
9049        /// mutually exclusive.
9050        pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9051            self.ip_range = std::option::Option::Some(
9052                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v.into()),
9053            );
9054            self
9055        }
9056
9057        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
9058        /// if it holds a `IpAddressRange`, `None` if the field is not set or
9059        /// holds a different branch.
9060        pub fn ip_address_range(&self) -> std::option::Option<&std::string::String> {
9061            #[allow(unreachable_patterns)]
9062            self.ip_range.as_ref().and_then(|v| match v {
9063                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v) => {
9064                    std::option::Option::Some(v)
9065                }
9066                _ => std::option::Option::None,
9067            })
9068        }
9069
9070        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
9071        /// to hold a `IpAddressRange`.
9072        ///
9073        /// Note that all the setters affecting `ip_range` are
9074        /// mutually exclusive.
9075        pub fn set_ip_address_range<T: std::convert::Into<std::string::String>>(
9076            mut self,
9077            v: T,
9078        ) -> Self {
9079            self.ip_range = std::option::Option::Some(
9080                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v.into()),
9081            );
9082            self
9083        }
9084
9085        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
9086        /// if it holds a `ExternalAddress`, `None` if the field is not set or
9087        /// holds a different branch.
9088        pub fn external_address(&self) -> std::option::Option<&std::string::String> {
9089            #[allow(unreachable_patterns)]
9090            self.ip_range.as_ref().and_then(|v| match v {
9091                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v) => {
9092                    std::option::Option::Some(v)
9093                }
9094                _ => std::option::Option::None,
9095            })
9096        }
9097
9098        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
9099        /// to hold a `ExternalAddress`.
9100        ///
9101        /// Note that all the setters affecting `ip_range` are
9102        /// mutually exclusive.
9103        pub fn set_external_address<T: std::convert::Into<std::string::String>>(
9104            mut self,
9105            v: T,
9106        ) -> Self {
9107            self.ip_range = std::option::Option::Some(
9108                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v.into()),
9109            );
9110            self
9111        }
9112    }
9113
9114    impl wkt::message::Message for IpRange {
9115        fn typename() -> &'static str {
9116            "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange"
9117        }
9118    }
9119
9120    /// Defines additional types related to [IpRange].
9121    pub mod ip_range {
9122        #[allow(unused_imports)]
9123        use super::*;
9124
9125        #[serde_with::serde_as]
9126        #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9127        #[serde(rename_all = "camelCase")]
9128        #[non_exhaustive]
9129        pub enum IpRange {
9130            /// A single IP address. For example: `10.0.0.5`.
9131            IpAddress(std::string::String),
9132            /// An IP address range in the CIDR format. For example: `10.0.0.0/24`.
9133            IpAddressRange(std::string::String),
9134            /// The name of an `ExternalAddress` resource. The external address must
9135            /// have been reserved in the scope of this external access rule's parent
9136            /// network policy.  Provide the external address name in the form of
9137            /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`.
9138            /// For example:
9139            /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`.
9140            ExternalAddress(std::string::String),
9141        }
9142    }
9143
9144    /// Action determines whether the external access rule permits or blocks
9145    /// traffic, subject to the other components of the rule matching the traffic.
9146    ///
9147    /// # Working with unknown values
9148    ///
9149    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9150    /// additional enum variants at any time. Adding new variants is not considered
9151    /// a breaking change. Applications should write their code in anticipation of:
9152    ///
9153    /// - New values appearing in future releases of the client library, **and**
9154    /// - New values received dynamically, without application changes.
9155    ///
9156    /// Please consult the [Working with enums] section in the user guide for some
9157    /// guidelines.
9158    ///
9159    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9160    #[derive(Clone, Debug, PartialEq)]
9161    #[non_exhaustive]
9162    pub enum Action {
9163        /// Defaults to allow.
9164        Unspecified,
9165        /// Allows connections that match the other specified components.
9166        Allow,
9167        /// Blocks connections that match the other specified components.
9168        Deny,
9169        /// If set, the enum was initialized with an unknown value.
9170        ///
9171        /// Applications can examine the value using [Action::value] or
9172        /// [Action::name].
9173        UnknownValue(action::UnknownValue),
9174    }
9175
9176    #[doc(hidden)]
9177    pub mod action {
9178        #[allow(unused_imports)]
9179        use super::*;
9180        #[derive(Clone, Debug, PartialEq)]
9181        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9182    }
9183
9184    impl Action {
9185        /// Gets the enum value.
9186        ///
9187        /// Returns `None` if the enum contains an unknown value deserialized from
9188        /// the string representation of enums.
9189        pub fn value(&self) -> std::option::Option<i32> {
9190            match self {
9191                Self::Unspecified => std::option::Option::Some(0),
9192                Self::Allow => std::option::Option::Some(1),
9193                Self::Deny => std::option::Option::Some(2),
9194                Self::UnknownValue(u) => u.0.value(),
9195            }
9196        }
9197
9198        /// Gets the enum value as a string.
9199        ///
9200        /// Returns `None` if the enum contains an unknown value deserialized from
9201        /// the integer representation of enums.
9202        pub fn name(&self) -> std::option::Option<&str> {
9203            match self {
9204                Self::Unspecified => std::option::Option::Some("ACTION_UNSPECIFIED"),
9205                Self::Allow => std::option::Option::Some("ALLOW"),
9206                Self::Deny => std::option::Option::Some("DENY"),
9207                Self::UnknownValue(u) => u.0.name(),
9208            }
9209        }
9210    }
9211
9212    impl std::default::Default for Action {
9213        fn default() -> Self {
9214            use std::convert::From;
9215            Self::from(0)
9216        }
9217    }
9218
9219    impl std::fmt::Display for Action {
9220        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9221            wkt::internal::display_enum(f, self.name(), self.value())
9222        }
9223    }
9224
9225    impl std::convert::From<i32> for Action {
9226        fn from(value: i32) -> Self {
9227            match value {
9228                0 => Self::Unspecified,
9229                1 => Self::Allow,
9230                2 => Self::Deny,
9231                _ => Self::UnknownValue(action::UnknownValue(
9232                    wkt::internal::UnknownEnumValue::Integer(value),
9233                )),
9234            }
9235        }
9236    }
9237
9238    impl std::convert::From<&str> for Action {
9239        fn from(value: &str) -> Self {
9240            use std::string::ToString;
9241            match value {
9242                "ACTION_UNSPECIFIED" => Self::Unspecified,
9243                "ALLOW" => Self::Allow,
9244                "DENY" => Self::Deny,
9245                _ => Self::UnknownValue(action::UnknownValue(
9246                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9247                )),
9248            }
9249        }
9250    }
9251
9252    impl serde::ser::Serialize for Action {
9253        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9254        where
9255            S: serde::Serializer,
9256        {
9257            match self {
9258                Self::Unspecified => serializer.serialize_i32(0),
9259                Self::Allow => serializer.serialize_i32(1),
9260                Self::Deny => serializer.serialize_i32(2),
9261                Self::UnknownValue(u) => u.0.serialize(serializer),
9262            }
9263        }
9264    }
9265
9266    impl<'de> serde::de::Deserialize<'de> for Action {
9267        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9268        where
9269            D: serde::Deserializer<'de>,
9270        {
9271            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
9272                ".google.cloud.vmwareengine.v1.ExternalAccessRule.Action",
9273            ))
9274        }
9275    }
9276
9277    /// Defines possible states of external access firewall rules.
9278    ///
9279    /// # Working with unknown values
9280    ///
9281    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9282    /// additional enum variants at any time. Adding new variants is not considered
9283    /// a breaking change. Applications should write their code in anticipation of:
9284    ///
9285    /// - New values appearing in future releases of the client library, **and**
9286    /// - New values received dynamically, without application changes.
9287    ///
9288    /// Please consult the [Working with enums] section in the user guide for some
9289    /// guidelines.
9290    ///
9291    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9292    #[derive(Clone, Debug, PartialEq)]
9293    #[non_exhaustive]
9294    pub enum State {
9295        /// The default value. This value is used if the state is omitted.
9296        Unspecified,
9297        /// The rule is ready.
9298        Active,
9299        /// The rule is being created.
9300        Creating,
9301        /// The rule is being updated.
9302        Updating,
9303        /// The rule is being deleted.
9304        Deleting,
9305        /// If set, the enum was initialized with an unknown value.
9306        ///
9307        /// Applications can examine the value using [State::value] or
9308        /// [State::name].
9309        UnknownValue(state::UnknownValue),
9310    }
9311
9312    #[doc(hidden)]
9313    pub mod state {
9314        #[allow(unused_imports)]
9315        use super::*;
9316        #[derive(Clone, Debug, PartialEq)]
9317        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9318    }
9319
9320    impl State {
9321        /// Gets the enum value.
9322        ///
9323        /// Returns `None` if the enum contains an unknown value deserialized from
9324        /// the string representation of enums.
9325        pub fn value(&self) -> std::option::Option<i32> {
9326            match self {
9327                Self::Unspecified => std::option::Option::Some(0),
9328                Self::Active => std::option::Option::Some(1),
9329                Self::Creating => std::option::Option::Some(2),
9330                Self::Updating => std::option::Option::Some(3),
9331                Self::Deleting => std::option::Option::Some(4),
9332                Self::UnknownValue(u) => u.0.value(),
9333            }
9334        }
9335
9336        /// Gets the enum value as a string.
9337        ///
9338        /// Returns `None` if the enum contains an unknown value deserialized from
9339        /// the integer representation of enums.
9340        pub fn name(&self) -> std::option::Option<&str> {
9341            match self {
9342                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
9343                Self::Active => std::option::Option::Some("ACTIVE"),
9344                Self::Creating => std::option::Option::Some("CREATING"),
9345                Self::Updating => std::option::Option::Some("UPDATING"),
9346                Self::Deleting => std::option::Option::Some("DELETING"),
9347                Self::UnknownValue(u) => u.0.name(),
9348            }
9349        }
9350    }
9351
9352    impl std::default::Default for State {
9353        fn default() -> Self {
9354            use std::convert::From;
9355            Self::from(0)
9356        }
9357    }
9358
9359    impl std::fmt::Display for State {
9360        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9361            wkt::internal::display_enum(f, self.name(), self.value())
9362        }
9363    }
9364
9365    impl std::convert::From<i32> for State {
9366        fn from(value: i32) -> Self {
9367            match value {
9368                0 => Self::Unspecified,
9369                1 => Self::Active,
9370                2 => Self::Creating,
9371                3 => Self::Updating,
9372                4 => Self::Deleting,
9373                _ => Self::UnknownValue(state::UnknownValue(
9374                    wkt::internal::UnknownEnumValue::Integer(value),
9375                )),
9376            }
9377        }
9378    }
9379
9380    impl std::convert::From<&str> for State {
9381        fn from(value: &str) -> Self {
9382            use std::string::ToString;
9383            match value {
9384                "STATE_UNSPECIFIED" => Self::Unspecified,
9385                "ACTIVE" => Self::Active,
9386                "CREATING" => Self::Creating,
9387                "UPDATING" => Self::Updating,
9388                "DELETING" => Self::Deleting,
9389                _ => Self::UnknownValue(state::UnknownValue(
9390                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9391                )),
9392            }
9393        }
9394    }
9395
9396    impl serde::ser::Serialize for State {
9397        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9398        where
9399            S: serde::Serializer,
9400        {
9401            match self {
9402                Self::Unspecified => serializer.serialize_i32(0),
9403                Self::Active => serializer.serialize_i32(1),
9404                Self::Creating => serializer.serialize_i32(2),
9405                Self::Updating => serializer.serialize_i32(3),
9406                Self::Deleting => serializer.serialize_i32(4),
9407                Self::UnknownValue(u) => u.0.serialize(serializer),
9408            }
9409        }
9410    }
9411
9412    impl<'de> serde::de::Deserialize<'de> for State {
9413        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9414        where
9415            D: serde::Deserializer<'de>,
9416        {
9417            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9418                ".google.cloud.vmwareengine.v1.ExternalAccessRule.State",
9419            ))
9420        }
9421    }
9422}
9423
9424/// Logging server to receive vCenter or ESXi logs.
9425#[serde_with::serde_as]
9426#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9427#[serde(default, rename_all = "camelCase")]
9428#[non_exhaustive]
9429pub struct LoggingServer {
9430    /// Output only. The resource name of this logging server.
9431    /// Resource names are schemeless URIs that follow the conventions in
9432    /// <https://cloud.google.com/apis/design/resource_names>.
9433    /// For example:
9434    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
9435    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9436    pub name: std::string::String,
9437
9438    /// Output only. Creation time of this resource.
9439    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9440    pub create_time: std::option::Option<wkt::Timestamp>,
9441
9442    /// Output only. Last update time of this resource.
9443    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9444    pub update_time: std::option::Option<wkt::Timestamp>,
9445
9446    /// Required. Fully-qualified domain name (FQDN) or IP Address of the logging
9447    /// server.
9448    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9449    pub hostname: std::string::String,
9450
9451    /// Required. Port number at which the logging server receives logs.
9452    #[serde(skip_serializing_if = "wkt::internal::is_default")]
9453    pub port: i32,
9454
9455    /// Required. Protocol used by vCenter to send logs to a logging server.
9456    pub protocol: crate::model::logging_server::Protocol,
9457
9458    /// Required. The type of component that produces logs that will be forwarded
9459    /// to this logging server.
9460    pub source_type: crate::model::logging_server::SourceType,
9461
9462    /// Output only. System-generated unique identifier for the resource.
9463    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9464    pub uid: std::string::String,
9465
9466    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9467    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9468}
9469
9470impl LoggingServer {
9471    pub fn new() -> Self {
9472        std::default::Default::default()
9473    }
9474
9475    /// Sets the value of [name][crate::model::LoggingServer::name].
9476    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9477        self.name = v.into();
9478        self
9479    }
9480
9481    /// Sets the value of [create_time][crate::model::LoggingServer::create_time].
9482    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9483        mut self,
9484        v: T,
9485    ) -> Self {
9486        self.create_time = v.into();
9487        self
9488    }
9489
9490    /// Sets the value of [update_time][crate::model::LoggingServer::update_time].
9491    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9492        mut self,
9493        v: T,
9494    ) -> Self {
9495        self.update_time = v.into();
9496        self
9497    }
9498
9499    /// Sets the value of [hostname][crate::model::LoggingServer::hostname].
9500    pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9501        self.hostname = v.into();
9502        self
9503    }
9504
9505    /// Sets the value of [port][crate::model::LoggingServer::port].
9506    pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9507        self.port = v.into();
9508        self
9509    }
9510
9511    /// Sets the value of [protocol][crate::model::LoggingServer::protocol].
9512    pub fn set_protocol<T: std::convert::Into<crate::model::logging_server::Protocol>>(
9513        mut self,
9514        v: T,
9515    ) -> Self {
9516        self.protocol = v.into();
9517        self
9518    }
9519
9520    /// Sets the value of [source_type][crate::model::LoggingServer::source_type].
9521    pub fn set_source_type<T: std::convert::Into<crate::model::logging_server::SourceType>>(
9522        mut self,
9523        v: T,
9524    ) -> Self {
9525        self.source_type = v.into();
9526        self
9527    }
9528
9529    /// Sets the value of [uid][crate::model::LoggingServer::uid].
9530    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9531        self.uid = v.into();
9532        self
9533    }
9534}
9535
9536impl wkt::message::Message for LoggingServer {
9537    fn typename() -> &'static str {
9538        "type.googleapis.com/google.cloud.vmwareengine.v1.LoggingServer"
9539    }
9540}
9541
9542/// Defines additional types related to [LoggingServer].
9543pub mod logging_server {
9544    #[allow(unused_imports)]
9545    use super::*;
9546
9547    /// Defines possible protocols used to send logs to
9548    /// a logging server.
9549    ///
9550    /// # Working with unknown values
9551    ///
9552    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9553    /// additional enum variants at any time. Adding new variants is not considered
9554    /// a breaking change. Applications should write their code in anticipation of:
9555    ///
9556    /// - New values appearing in future releases of the client library, **and**
9557    /// - New values received dynamically, without application changes.
9558    ///
9559    /// Please consult the [Working with enums] section in the user guide for some
9560    /// guidelines.
9561    ///
9562    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9563    #[derive(Clone, Debug, PartialEq)]
9564    #[non_exhaustive]
9565    pub enum Protocol {
9566        /// Unspecified communications protocol. This is the default value.
9567        Unspecified,
9568        /// UDP
9569        Udp,
9570        /// TCP
9571        Tcp,
9572        /// TLS
9573        Tls,
9574        /// SSL
9575        Ssl,
9576        /// RELP
9577        Relp,
9578        /// If set, the enum was initialized with an unknown value.
9579        ///
9580        /// Applications can examine the value using [Protocol::value] or
9581        /// [Protocol::name].
9582        UnknownValue(protocol::UnknownValue),
9583    }
9584
9585    #[doc(hidden)]
9586    pub mod protocol {
9587        #[allow(unused_imports)]
9588        use super::*;
9589        #[derive(Clone, Debug, PartialEq)]
9590        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9591    }
9592
9593    impl Protocol {
9594        /// Gets the enum value.
9595        ///
9596        /// Returns `None` if the enum contains an unknown value deserialized from
9597        /// the string representation of enums.
9598        pub fn value(&self) -> std::option::Option<i32> {
9599            match self {
9600                Self::Unspecified => std::option::Option::Some(0),
9601                Self::Udp => std::option::Option::Some(1),
9602                Self::Tcp => std::option::Option::Some(2),
9603                Self::Tls => std::option::Option::Some(3),
9604                Self::Ssl => std::option::Option::Some(4),
9605                Self::Relp => std::option::Option::Some(5),
9606                Self::UnknownValue(u) => u.0.value(),
9607            }
9608        }
9609
9610        /// Gets the enum value as a string.
9611        ///
9612        /// Returns `None` if the enum contains an unknown value deserialized from
9613        /// the integer representation of enums.
9614        pub fn name(&self) -> std::option::Option<&str> {
9615            match self {
9616                Self::Unspecified => std::option::Option::Some("PROTOCOL_UNSPECIFIED"),
9617                Self::Udp => std::option::Option::Some("UDP"),
9618                Self::Tcp => std::option::Option::Some("TCP"),
9619                Self::Tls => std::option::Option::Some("TLS"),
9620                Self::Ssl => std::option::Option::Some("SSL"),
9621                Self::Relp => std::option::Option::Some("RELP"),
9622                Self::UnknownValue(u) => u.0.name(),
9623            }
9624        }
9625    }
9626
9627    impl std::default::Default for Protocol {
9628        fn default() -> Self {
9629            use std::convert::From;
9630            Self::from(0)
9631        }
9632    }
9633
9634    impl std::fmt::Display for Protocol {
9635        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9636            wkt::internal::display_enum(f, self.name(), self.value())
9637        }
9638    }
9639
9640    impl std::convert::From<i32> for Protocol {
9641        fn from(value: i32) -> Self {
9642            match value {
9643                0 => Self::Unspecified,
9644                1 => Self::Udp,
9645                2 => Self::Tcp,
9646                3 => Self::Tls,
9647                4 => Self::Ssl,
9648                5 => Self::Relp,
9649                _ => Self::UnknownValue(protocol::UnknownValue(
9650                    wkt::internal::UnknownEnumValue::Integer(value),
9651                )),
9652            }
9653        }
9654    }
9655
9656    impl std::convert::From<&str> for Protocol {
9657        fn from(value: &str) -> Self {
9658            use std::string::ToString;
9659            match value {
9660                "PROTOCOL_UNSPECIFIED" => Self::Unspecified,
9661                "UDP" => Self::Udp,
9662                "TCP" => Self::Tcp,
9663                "TLS" => Self::Tls,
9664                "SSL" => Self::Ssl,
9665                "RELP" => Self::Relp,
9666                _ => Self::UnknownValue(protocol::UnknownValue(
9667                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9668                )),
9669            }
9670        }
9671    }
9672
9673    impl serde::ser::Serialize for Protocol {
9674        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9675        where
9676            S: serde::Serializer,
9677        {
9678            match self {
9679                Self::Unspecified => serializer.serialize_i32(0),
9680                Self::Udp => serializer.serialize_i32(1),
9681                Self::Tcp => serializer.serialize_i32(2),
9682                Self::Tls => serializer.serialize_i32(3),
9683                Self::Ssl => serializer.serialize_i32(4),
9684                Self::Relp => serializer.serialize_i32(5),
9685                Self::UnknownValue(u) => u.0.serialize(serializer),
9686            }
9687        }
9688    }
9689
9690    impl<'de> serde::de::Deserialize<'de> for Protocol {
9691        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9692        where
9693            D: serde::Deserializer<'de>,
9694        {
9695            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Protocol>::new(
9696                ".google.cloud.vmwareengine.v1.LoggingServer.Protocol",
9697            ))
9698        }
9699    }
9700
9701    /// Defines possible types of component that produces logs.
9702    ///
9703    /// # Working with unknown values
9704    ///
9705    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9706    /// additional enum variants at any time. Adding new variants is not considered
9707    /// a breaking change. Applications should write their code in anticipation of:
9708    ///
9709    /// - New values appearing in future releases of the client library, **and**
9710    /// - New values received dynamically, without application changes.
9711    ///
9712    /// Please consult the [Working with enums] section in the user guide for some
9713    /// guidelines.
9714    ///
9715    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9716    #[derive(Clone, Debug, PartialEq)]
9717    #[non_exhaustive]
9718    pub enum SourceType {
9719        /// The default value. This value should never be used.
9720        Unspecified,
9721        /// Logs produced by ESXI hosts
9722        Esxi,
9723        /// Logs produced by vCenter server
9724        Vcsa,
9725        /// If set, the enum was initialized with an unknown value.
9726        ///
9727        /// Applications can examine the value using [SourceType::value] or
9728        /// [SourceType::name].
9729        UnknownValue(source_type::UnknownValue),
9730    }
9731
9732    #[doc(hidden)]
9733    pub mod source_type {
9734        #[allow(unused_imports)]
9735        use super::*;
9736        #[derive(Clone, Debug, PartialEq)]
9737        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9738    }
9739
9740    impl SourceType {
9741        /// Gets the enum value.
9742        ///
9743        /// Returns `None` if the enum contains an unknown value deserialized from
9744        /// the string representation of enums.
9745        pub fn value(&self) -> std::option::Option<i32> {
9746            match self {
9747                Self::Unspecified => std::option::Option::Some(0),
9748                Self::Esxi => std::option::Option::Some(1),
9749                Self::Vcsa => std::option::Option::Some(2),
9750                Self::UnknownValue(u) => u.0.value(),
9751            }
9752        }
9753
9754        /// Gets the enum value as a string.
9755        ///
9756        /// Returns `None` if the enum contains an unknown value deserialized from
9757        /// the integer representation of enums.
9758        pub fn name(&self) -> std::option::Option<&str> {
9759            match self {
9760                Self::Unspecified => std::option::Option::Some("SOURCE_TYPE_UNSPECIFIED"),
9761                Self::Esxi => std::option::Option::Some("ESXI"),
9762                Self::Vcsa => std::option::Option::Some("VCSA"),
9763                Self::UnknownValue(u) => u.0.name(),
9764            }
9765        }
9766    }
9767
9768    impl std::default::Default for SourceType {
9769        fn default() -> Self {
9770            use std::convert::From;
9771            Self::from(0)
9772        }
9773    }
9774
9775    impl std::fmt::Display for SourceType {
9776        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9777            wkt::internal::display_enum(f, self.name(), self.value())
9778        }
9779    }
9780
9781    impl std::convert::From<i32> for SourceType {
9782        fn from(value: i32) -> Self {
9783            match value {
9784                0 => Self::Unspecified,
9785                1 => Self::Esxi,
9786                2 => Self::Vcsa,
9787                _ => Self::UnknownValue(source_type::UnknownValue(
9788                    wkt::internal::UnknownEnumValue::Integer(value),
9789                )),
9790            }
9791        }
9792    }
9793
9794    impl std::convert::From<&str> for SourceType {
9795        fn from(value: &str) -> Self {
9796            use std::string::ToString;
9797            match value {
9798                "SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
9799                "ESXI" => Self::Esxi,
9800                "VCSA" => Self::Vcsa,
9801                _ => Self::UnknownValue(source_type::UnknownValue(
9802                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9803                )),
9804            }
9805        }
9806    }
9807
9808    impl serde::ser::Serialize for SourceType {
9809        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9810        where
9811            S: serde::Serializer,
9812        {
9813            match self {
9814                Self::Unspecified => serializer.serialize_i32(0),
9815                Self::Esxi => serializer.serialize_i32(1),
9816                Self::Vcsa => serializer.serialize_i32(2),
9817                Self::UnknownValue(u) => u.0.serialize(serializer),
9818            }
9819        }
9820    }
9821
9822    impl<'de> serde::de::Deserialize<'de> for SourceType {
9823        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9824        where
9825            D: serde::Deserializer<'de>,
9826        {
9827            deserializer.deserialize_any(wkt::internal::EnumVisitor::<SourceType>::new(
9828                ".google.cloud.vmwareengine.v1.LoggingServer.SourceType",
9829            ))
9830        }
9831    }
9832}
9833
9834/// Describes node type.
9835#[serde_with::serde_as]
9836#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9837#[serde(default, rename_all = "camelCase")]
9838#[non_exhaustive]
9839pub struct NodeType {
9840    /// Output only. The resource name of this node type.
9841    /// Resource names are schemeless URIs that follow the conventions in
9842    /// <https://cloud.google.com/apis/design/resource_names>.
9843    /// For example:
9844    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
9845    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9846    pub name: std::string::String,
9847
9848    /// Output only. The canonical identifier of the node type
9849    /// (corresponds to the `NodeType`). For example: standard-72.
9850    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9851    pub node_type_id: std::string::String,
9852
9853    /// Output only. The friendly name for this node type.
9854    /// For example: ve1-standard-72
9855    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9856    pub display_name: std::string::String,
9857
9858    /// Output only. The total number of virtual CPUs in a single node.
9859    #[serde(skip_serializing_if = "wkt::internal::is_default")]
9860    pub virtual_cpu_count: i32,
9861
9862    /// Output only. The total number of CPU cores in a single node.
9863    #[serde(skip_serializing_if = "wkt::internal::is_default")]
9864    pub total_core_count: i32,
9865
9866    /// Output only. The amount of physical memory available, defined in GB.
9867    #[serde(skip_serializing_if = "wkt::internal::is_default")]
9868    pub memory_gb: i32,
9869
9870    /// Output only. The amount of storage available, defined in GB.
9871    #[serde(skip_serializing_if = "wkt::internal::is_default")]
9872    pub disk_size_gb: i32,
9873
9874    /// Output only. List of possible values of custom core count.
9875    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9876    pub available_custom_core_counts: std::vec::Vec<i32>,
9877
9878    /// Output only. The type of the resource.
9879    pub kind: crate::model::node_type::Kind,
9880
9881    /// Output only. Families of the node type.
9882    /// For node types to be in the same cluster
9883    /// they must share at least one element in the `families`.
9884    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9885    pub families: std::vec::Vec<std::string::String>,
9886
9887    /// Output only. Capabilities of this node type.
9888    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9889    pub capabilities: std::vec::Vec<crate::model::node_type::Capability>,
9890
9891    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9892    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9893}
9894
9895impl NodeType {
9896    pub fn new() -> Self {
9897        std::default::Default::default()
9898    }
9899
9900    /// Sets the value of [name][crate::model::NodeType::name].
9901    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9902        self.name = v.into();
9903        self
9904    }
9905
9906    /// Sets the value of [node_type_id][crate::model::NodeType::node_type_id].
9907    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9908        self.node_type_id = v.into();
9909        self
9910    }
9911
9912    /// Sets the value of [display_name][crate::model::NodeType::display_name].
9913    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9914        self.display_name = v.into();
9915        self
9916    }
9917
9918    /// Sets the value of [virtual_cpu_count][crate::model::NodeType::virtual_cpu_count].
9919    pub fn set_virtual_cpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9920        self.virtual_cpu_count = v.into();
9921        self
9922    }
9923
9924    /// Sets the value of [total_core_count][crate::model::NodeType::total_core_count].
9925    pub fn set_total_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9926        self.total_core_count = v.into();
9927        self
9928    }
9929
9930    /// Sets the value of [memory_gb][crate::model::NodeType::memory_gb].
9931    pub fn set_memory_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9932        self.memory_gb = v.into();
9933        self
9934    }
9935
9936    /// Sets the value of [disk_size_gb][crate::model::NodeType::disk_size_gb].
9937    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9938        self.disk_size_gb = v.into();
9939        self
9940    }
9941
9942    /// Sets the value of [available_custom_core_counts][crate::model::NodeType::available_custom_core_counts].
9943    pub fn set_available_custom_core_counts<T, V>(mut self, v: T) -> Self
9944    where
9945        T: std::iter::IntoIterator<Item = V>,
9946        V: std::convert::Into<i32>,
9947    {
9948        use std::iter::Iterator;
9949        self.available_custom_core_counts = v.into_iter().map(|i| i.into()).collect();
9950        self
9951    }
9952
9953    /// Sets the value of [kind][crate::model::NodeType::kind].
9954    pub fn set_kind<T: std::convert::Into<crate::model::node_type::Kind>>(mut self, v: T) -> Self {
9955        self.kind = v.into();
9956        self
9957    }
9958
9959    /// Sets the value of [families][crate::model::NodeType::families].
9960    pub fn set_families<T, V>(mut self, v: T) -> Self
9961    where
9962        T: std::iter::IntoIterator<Item = V>,
9963        V: std::convert::Into<std::string::String>,
9964    {
9965        use std::iter::Iterator;
9966        self.families = v.into_iter().map(|i| i.into()).collect();
9967        self
9968    }
9969
9970    /// Sets the value of [capabilities][crate::model::NodeType::capabilities].
9971    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
9972    where
9973        T: std::iter::IntoIterator<Item = V>,
9974        V: std::convert::Into<crate::model::node_type::Capability>,
9975    {
9976        use std::iter::Iterator;
9977        self.capabilities = v.into_iter().map(|i| i.into()).collect();
9978        self
9979    }
9980}
9981
9982impl wkt::message::Message for NodeType {
9983    fn typename() -> &'static str {
9984        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeType"
9985    }
9986}
9987
9988/// Defines additional types related to [NodeType].
9989pub mod node_type {
9990    #[allow(unused_imports)]
9991    use super::*;
9992
9993    /// Enum Kind defines possible types of a NodeType.
9994    ///
9995    /// # Working with unknown values
9996    ///
9997    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9998    /// additional enum variants at any time. Adding new variants is not considered
9999    /// a breaking change. Applications should write their code in anticipation of:
10000    ///
10001    /// - New values appearing in future releases of the client library, **and**
10002    /// - New values received dynamically, without application changes.
10003    ///
10004    /// Please consult the [Working with enums] section in the user guide for some
10005    /// guidelines.
10006    ///
10007    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10008    #[derive(Clone, Debug, PartialEq)]
10009    #[non_exhaustive]
10010    pub enum Kind {
10011        /// The default value. This value should never be used.
10012        Unspecified,
10013        /// Standard HCI node.
10014        Standard,
10015        /// Storage only Node.
10016        StorageOnly,
10017        /// If set, the enum was initialized with an unknown value.
10018        ///
10019        /// Applications can examine the value using [Kind::value] or
10020        /// [Kind::name].
10021        UnknownValue(kind::UnknownValue),
10022    }
10023
10024    #[doc(hidden)]
10025    pub mod kind {
10026        #[allow(unused_imports)]
10027        use super::*;
10028        #[derive(Clone, Debug, PartialEq)]
10029        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10030    }
10031
10032    impl Kind {
10033        /// Gets the enum value.
10034        ///
10035        /// Returns `None` if the enum contains an unknown value deserialized from
10036        /// the string representation of enums.
10037        pub fn value(&self) -> std::option::Option<i32> {
10038            match self {
10039                Self::Unspecified => std::option::Option::Some(0),
10040                Self::Standard => std::option::Option::Some(1),
10041                Self::StorageOnly => std::option::Option::Some(2),
10042                Self::UnknownValue(u) => u.0.value(),
10043            }
10044        }
10045
10046        /// Gets the enum value as a string.
10047        ///
10048        /// Returns `None` if the enum contains an unknown value deserialized from
10049        /// the integer representation of enums.
10050        pub fn name(&self) -> std::option::Option<&str> {
10051            match self {
10052                Self::Unspecified => std::option::Option::Some("KIND_UNSPECIFIED"),
10053                Self::Standard => std::option::Option::Some("STANDARD"),
10054                Self::StorageOnly => std::option::Option::Some("STORAGE_ONLY"),
10055                Self::UnknownValue(u) => u.0.name(),
10056            }
10057        }
10058    }
10059
10060    impl std::default::Default for Kind {
10061        fn default() -> Self {
10062            use std::convert::From;
10063            Self::from(0)
10064        }
10065    }
10066
10067    impl std::fmt::Display for Kind {
10068        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10069            wkt::internal::display_enum(f, self.name(), self.value())
10070        }
10071    }
10072
10073    impl std::convert::From<i32> for Kind {
10074        fn from(value: i32) -> Self {
10075            match value {
10076                0 => Self::Unspecified,
10077                1 => Self::Standard,
10078                2 => Self::StorageOnly,
10079                _ => Self::UnknownValue(kind::UnknownValue(
10080                    wkt::internal::UnknownEnumValue::Integer(value),
10081                )),
10082            }
10083        }
10084    }
10085
10086    impl std::convert::From<&str> for Kind {
10087        fn from(value: &str) -> Self {
10088            use std::string::ToString;
10089            match value {
10090                "KIND_UNSPECIFIED" => Self::Unspecified,
10091                "STANDARD" => Self::Standard,
10092                "STORAGE_ONLY" => Self::StorageOnly,
10093                _ => Self::UnknownValue(kind::UnknownValue(
10094                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10095                )),
10096            }
10097        }
10098    }
10099
10100    impl serde::ser::Serialize for Kind {
10101        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10102        where
10103            S: serde::Serializer,
10104        {
10105            match self {
10106                Self::Unspecified => serializer.serialize_i32(0),
10107                Self::Standard => serializer.serialize_i32(1),
10108                Self::StorageOnly => serializer.serialize_i32(2),
10109                Self::UnknownValue(u) => u.0.serialize(serializer),
10110            }
10111        }
10112    }
10113
10114    impl<'de> serde::de::Deserialize<'de> for Kind {
10115        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10116        where
10117            D: serde::Deserializer<'de>,
10118        {
10119            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Kind>::new(
10120                ".google.cloud.vmwareengine.v1.NodeType.Kind",
10121            ))
10122        }
10123    }
10124
10125    /// Capability of a node type.
10126    ///
10127    /// # Working with unknown values
10128    ///
10129    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10130    /// additional enum variants at any time. Adding new variants is not considered
10131    /// a breaking change. Applications should write their code in anticipation of:
10132    ///
10133    /// - New values appearing in future releases of the client library, **and**
10134    /// - New values received dynamically, without application changes.
10135    ///
10136    /// Please consult the [Working with enums] section in the user guide for some
10137    /// guidelines.
10138    ///
10139    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10140    #[derive(Clone, Debug, PartialEq)]
10141    #[non_exhaustive]
10142    pub enum Capability {
10143        /// The default value. This value is used if the capability is omitted or
10144        /// unknown.
10145        Unspecified,
10146        /// This node type supports stretch clusters.
10147        StretchedClusters,
10148        /// If set, the enum was initialized with an unknown value.
10149        ///
10150        /// Applications can examine the value using [Capability::value] or
10151        /// [Capability::name].
10152        UnknownValue(capability::UnknownValue),
10153    }
10154
10155    #[doc(hidden)]
10156    pub mod capability {
10157        #[allow(unused_imports)]
10158        use super::*;
10159        #[derive(Clone, Debug, PartialEq)]
10160        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10161    }
10162
10163    impl Capability {
10164        /// Gets the enum value.
10165        ///
10166        /// Returns `None` if the enum contains an unknown value deserialized from
10167        /// the string representation of enums.
10168        pub fn value(&self) -> std::option::Option<i32> {
10169            match self {
10170                Self::Unspecified => std::option::Option::Some(0),
10171                Self::StretchedClusters => std::option::Option::Some(1),
10172                Self::UnknownValue(u) => u.0.value(),
10173            }
10174        }
10175
10176        /// Gets the enum value as a string.
10177        ///
10178        /// Returns `None` if the enum contains an unknown value deserialized from
10179        /// the integer representation of enums.
10180        pub fn name(&self) -> std::option::Option<&str> {
10181            match self {
10182                Self::Unspecified => std::option::Option::Some("CAPABILITY_UNSPECIFIED"),
10183                Self::StretchedClusters => std::option::Option::Some("STRETCHED_CLUSTERS"),
10184                Self::UnknownValue(u) => u.0.name(),
10185            }
10186        }
10187    }
10188
10189    impl std::default::Default for Capability {
10190        fn default() -> Self {
10191            use std::convert::From;
10192            Self::from(0)
10193        }
10194    }
10195
10196    impl std::fmt::Display for Capability {
10197        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10198            wkt::internal::display_enum(f, self.name(), self.value())
10199        }
10200    }
10201
10202    impl std::convert::From<i32> for Capability {
10203        fn from(value: i32) -> Self {
10204            match value {
10205                0 => Self::Unspecified,
10206                1 => Self::StretchedClusters,
10207                _ => Self::UnknownValue(capability::UnknownValue(
10208                    wkt::internal::UnknownEnumValue::Integer(value),
10209                )),
10210            }
10211        }
10212    }
10213
10214    impl std::convert::From<&str> for Capability {
10215        fn from(value: &str) -> Self {
10216            use std::string::ToString;
10217            match value {
10218                "CAPABILITY_UNSPECIFIED" => Self::Unspecified,
10219                "STRETCHED_CLUSTERS" => Self::StretchedClusters,
10220                _ => Self::UnknownValue(capability::UnknownValue(
10221                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10222                )),
10223            }
10224        }
10225    }
10226
10227    impl serde::ser::Serialize for Capability {
10228        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10229        where
10230            S: serde::Serializer,
10231        {
10232            match self {
10233                Self::Unspecified => serializer.serialize_i32(0),
10234                Self::StretchedClusters => serializer.serialize_i32(1),
10235                Self::UnknownValue(u) => u.0.serialize(serializer),
10236            }
10237        }
10238    }
10239
10240    impl<'de> serde::de::Deserialize<'de> for Capability {
10241        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10242        where
10243            D: serde::Deserializer<'de>,
10244        {
10245            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Capability>::new(
10246                ".google.cloud.vmwareengine.v1.NodeType.Capability",
10247            ))
10248        }
10249    }
10250}
10251
10252/// Credentials for a private cloud.
10253#[serde_with::serde_as]
10254#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10255#[serde(default, rename_all = "camelCase")]
10256#[non_exhaustive]
10257pub struct Credentials {
10258    /// Initial username.
10259    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10260    pub username: std::string::String,
10261
10262    /// Initial password.
10263    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10264    pub password: std::string::String,
10265
10266    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10267    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10268}
10269
10270impl Credentials {
10271    pub fn new() -> Self {
10272        std::default::Default::default()
10273    }
10274
10275    /// Sets the value of [username][crate::model::Credentials::username].
10276    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10277        self.username = v.into();
10278        self
10279    }
10280
10281    /// Sets the value of [password][crate::model::Credentials::password].
10282    pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10283        self.password = v.into();
10284        self
10285    }
10286}
10287
10288impl wkt::message::Message for Credentials {
10289    fn typename() -> &'static str {
10290        "type.googleapis.com/google.cloud.vmwareengine.v1.Credentials"
10291    }
10292}
10293
10294/// HCX activation key. A default key is created during
10295/// private cloud provisioning, but this behavior is subject to change
10296/// and you should always verify active keys.
10297/// Use
10298/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
10299/// to retrieve existing keys and
10300/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
10301/// to create new ones.
10302///
10303/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
10304/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
10305#[serde_with::serde_as]
10306#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10307#[serde(default, rename_all = "camelCase")]
10308#[non_exhaustive]
10309pub struct HcxActivationKey {
10310    /// Output only. The resource name of this HcxActivationKey.
10311    /// Resource names are schemeless URIs that follow the conventions in
10312    /// <https://cloud.google.com/apis/design/resource_names>.
10313    /// For example:
10314    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
10315    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10316    pub name: std::string::String,
10317
10318    /// Output only. Creation time of HCX activation key.
10319    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10320    pub create_time: std::option::Option<wkt::Timestamp>,
10321
10322    /// Output only. State of HCX activation key.
10323    pub state: crate::model::hcx_activation_key::State,
10324
10325    /// Output only. HCX activation key.
10326    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10327    pub activation_key: std::string::String,
10328
10329    /// Output only. System-generated unique identifier for the resource.
10330    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10331    pub uid: std::string::String,
10332
10333    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10334    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10335}
10336
10337impl HcxActivationKey {
10338    pub fn new() -> Self {
10339        std::default::Default::default()
10340    }
10341
10342    /// Sets the value of [name][crate::model::HcxActivationKey::name].
10343    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10344        self.name = v.into();
10345        self
10346    }
10347
10348    /// Sets the value of [create_time][crate::model::HcxActivationKey::create_time].
10349    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10350        mut self,
10351        v: T,
10352    ) -> Self {
10353        self.create_time = v.into();
10354        self
10355    }
10356
10357    /// Sets the value of [state][crate::model::HcxActivationKey::state].
10358    pub fn set_state<T: std::convert::Into<crate::model::hcx_activation_key::State>>(
10359        mut self,
10360        v: T,
10361    ) -> Self {
10362        self.state = v.into();
10363        self
10364    }
10365
10366    /// Sets the value of [activation_key][crate::model::HcxActivationKey::activation_key].
10367    pub fn set_activation_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10368        self.activation_key = v.into();
10369        self
10370    }
10371
10372    /// Sets the value of [uid][crate::model::HcxActivationKey::uid].
10373    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10374        self.uid = v.into();
10375        self
10376    }
10377}
10378
10379impl wkt::message::Message for HcxActivationKey {
10380    fn typename() -> &'static str {
10381        "type.googleapis.com/google.cloud.vmwareengine.v1.HcxActivationKey"
10382    }
10383}
10384
10385/// Defines additional types related to [HcxActivationKey].
10386pub mod hcx_activation_key {
10387    #[allow(unused_imports)]
10388    use super::*;
10389
10390    /// State of HCX activation key
10391    ///
10392    /// # Working with unknown values
10393    ///
10394    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10395    /// additional enum variants at any time. Adding new variants is not considered
10396    /// a breaking change. Applications should write their code in anticipation of:
10397    ///
10398    /// - New values appearing in future releases of the client library, **and**
10399    /// - New values received dynamically, without application changes.
10400    ///
10401    /// Please consult the [Working with enums] section in the user guide for some
10402    /// guidelines.
10403    ///
10404    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10405    #[derive(Clone, Debug, PartialEq)]
10406    #[non_exhaustive]
10407    pub enum State {
10408        /// Unspecified state.
10409        Unspecified,
10410        /// State of a newly generated activation key.
10411        Available,
10412        /// State of key when it has been used to activate HCX appliance.
10413        Consumed,
10414        /// State of key when it is being created.
10415        Creating,
10416        /// If set, the enum was initialized with an unknown value.
10417        ///
10418        /// Applications can examine the value using [State::value] or
10419        /// [State::name].
10420        UnknownValue(state::UnknownValue),
10421    }
10422
10423    #[doc(hidden)]
10424    pub mod state {
10425        #[allow(unused_imports)]
10426        use super::*;
10427        #[derive(Clone, Debug, PartialEq)]
10428        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10429    }
10430
10431    impl State {
10432        /// Gets the enum value.
10433        ///
10434        /// Returns `None` if the enum contains an unknown value deserialized from
10435        /// the string representation of enums.
10436        pub fn value(&self) -> std::option::Option<i32> {
10437            match self {
10438                Self::Unspecified => std::option::Option::Some(0),
10439                Self::Available => std::option::Option::Some(1),
10440                Self::Consumed => std::option::Option::Some(2),
10441                Self::Creating => std::option::Option::Some(3),
10442                Self::UnknownValue(u) => u.0.value(),
10443            }
10444        }
10445
10446        /// Gets the enum value as a string.
10447        ///
10448        /// Returns `None` if the enum contains an unknown value deserialized from
10449        /// the integer representation of enums.
10450        pub fn name(&self) -> std::option::Option<&str> {
10451            match self {
10452                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10453                Self::Available => std::option::Option::Some("AVAILABLE"),
10454                Self::Consumed => std::option::Option::Some("CONSUMED"),
10455                Self::Creating => std::option::Option::Some("CREATING"),
10456                Self::UnknownValue(u) => u.0.name(),
10457            }
10458        }
10459    }
10460
10461    impl std::default::Default for State {
10462        fn default() -> Self {
10463            use std::convert::From;
10464            Self::from(0)
10465        }
10466    }
10467
10468    impl std::fmt::Display for State {
10469        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10470            wkt::internal::display_enum(f, self.name(), self.value())
10471        }
10472    }
10473
10474    impl std::convert::From<i32> for State {
10475        fn from(value: i32) -> Self {
10476            match value {
10477                0 => Self::Unspecified,
10478                1 => Self::Available,
10479                2 => Self::Consumed,
10480                3 => Self::Creating,
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                "AVAILABLE" => Self::Available,
10494                "CONSUMED" => Self::Consumed,
10495                "CREATING" => Self::Creating,
10496                _ => Self::UnknownValue(state::UnknownValue(
10497                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10498                )),
10499            }
10500        }
10501    }
10502
10503    impl serde::ser::Serialize for State {
10504        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10505        where
10506            S: serde::Serializer,
10507        {
10508            match self {
10509                Self::Unspecified => serializer.serialize_i32(0),
10510                Self::Available => serializer.serialize_i32(1),
10511                Self::Consumed => serializer.serialize_i32(2),
10512                Self::Creating => serializer.serialize_i32(3),
10513                Self::UnknownValue(u) => u.0.serialize(serializer),
10514            }
10515        }
10516    }
10517
10518    impl<'de> serde::de::Deserialize<'de> for State {
10519        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10520        where
10521            D: serde::Deserializer<'de>,
10522        {
10523            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10524                ".google.cloud.vmwareengine.v1.HcxActivationKey.State",
10525            ))
10526        }
10527    }
10528}
10529
10530/// Details about a HCX Cloud Manager appliance.
10531#[serde_with::serde_as]
10532#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10533#[serde(default, rename_all = "camelCase")]
10534#[non_exhaustive]
10535pub struct Hcx {
10536    /// Internal IP address of the appliance.
10537    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10538    pub internal_ip: std::string::String,
10539
10540    /// Version of the appliance.
10541    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10542    pub version: std::string::String,
10543
10544    /// Output only. The state of the appliance.
10545    pub state: crate::model::hcx::State,
10546
10547    /// Fully qualified domain name of the appliance.
10548    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10549    pub fqdn: std::string::String,
10550
10551    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10552    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10553}
10554
10555impl Hcx {
10556    pub fn new() -> Self {
10557        std::default::Default::default()
10558    }
10559
10560    /// Sets the value of [internal_ip][crate::model::Hcx::internal_ip].
10561    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10562        self.internal_ip = v.into();
10563        self
10564    }
10565
10566    /// Sets the value of [version][crate::model::Hcx::version].
10567    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10568        self.version = v.into();
10569        self
10570    }
10571
10572    /// Sets the value of [state][crate::model::Hcx::state].
10573    pub fn set_state<T: std::convert::Into<crate::model::hcx::State>>(mut self, v: T) -> Self {
10574        self.state = v.into();
10575        self
10576    }
10577
10578    /// Sets the value of [fqdn][crate::model::Hcx::fqdn].
10579    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10580        self.fqdn = v.into();
10581        self
10582    }
10583}
10584
10585impl wkt::message::Message for Hcx {
10586    fn typename() -> &'static str {
10587        "type.googleapis.com/google.cloud.vmwareengine.v1.Hcx"
10588    }
10589}
10590
10591/// Defines additional types related to [Hcx].
10592pub mod hcx {
10593    #[allow(unused_imports)]
10594    use super::*;
10595
10596    /// State of the appliance
10597    ///
10598    /// # Working with unknown values
10599    ///
10600    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10601    /// additional enum variants at any time. Adding new variants is not considered
10602    /// a breaking change. Applications should write their code in anticipation of:
10603    ///
10604    /// - New values appearing in future releases of the client library, **and**
10605    /// - New values received dynamically, without application changes.
10606    ///
10607    /// Please consult the [Working with enums] section in the user guide for some
10608    /// guidelines.
10609    ///
10610    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10611    #[derive(Clone, Debug, PartialEq)]
10612    #[non_exhaustive]
10613    pub enum State {
10614        /// Unspecified appliance state. This is the default value.
10615        Unspecified,
10616        /// The appliance is operational and can be used.
10617        Active,
10618        /// The appliance is being deployed.
10619        Creating,
10620        /// The appliance is being activated.
10621        Activating,
10622        /// If set, the enum was initialized with an unknown value.
10623        ///
10624        /// Applications can examine the value using [State::value] or
10625        /// [State::name].
10626        UnknownValue(state::UnknownValue),
10627    }
10628
10629    #[doc(hidden)]
10630    pub mod state {
10631        #[allow(unused_imports)]
10632        use super::*;
10633        #[derive(Clone, Debug, PartialEq)]
10634        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10635    }
10636
10637    impl State {
10638        /// Gets the enum value.
10639        ///
10640        /// Returns `None` if the enum contains an unknown value deserialized from
10641        /// the string representation of enums.
10642        pub fn value(&self) -> std::option::Option<i32> {
10643            match self {
10644                Self::Unspecified => std::option::Option::Some(0),
10645                Self::Active => std::option::Option::Some(1),
10646                Self::Creating => std::option::Option::Some(2),
10647                Self::Activating => std::option::Option::Some(3),
10648                Self::UnknownValue(u) => u.0.value(),
10649            }
10650        }
10651
10652        /// Gets the enum value as a string.
10653        ///
10654        /// Returns `None` if the enum contains an unknown value deserialized from
10655        /// the integer representation of enums.
10656        pub fn name(&self) -> std::option::Option<&str> {
10657            match self {
10658                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10659                Self::Active => std::option::Option::Some("ACTIVE"),
10660                Self::Creating => std::option::Option::Some("CREATING"),
10661                Self::Activating => std::option::Option::Some("ACTIVATING"),
10662                Self::UnknownValue(u) => u.0.name(),
10663            }
10664        }
10665    }
10666
10667    impl std::default::Default for State {
10668        fn default() -> Self {
10669            use std::convert::From;
10670            Self::from(0)
10671        }
10672    }
10673
10674    impl std::fmt::Display for State {
10675        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10676            wkt::internal::display_enum(f, self.name(), self.value())
10677        }
10678    }
10679
10680    impl std::convert::From<i32> for State {
10681        fn from(value: i32) -> Self {
10682            match value {
10683                0 => Self::Unspecified,
10684                1 => Self::Active,
10685                2 => Self::Creating,
10686                3 => Self::Activating,
10687                _ => Self::UnknownValue(state::UnknownValue(
10688                    wkt::internal::UnknownEnumValue::Integer(value),
10689                )),
10690            }
10691        }
10692    }
10693
10694    impl std::convert::From<&str> for State {
10695        fn from(value: &str) -> Self {
10696            use std::string::ToString;
10697            match value {
10698                "STATE_UNSPECIFIED" => Self::Unspecified,
10699                "ACTIVE" => Self::Active,
10700                "CREATING" => Self::Creating,
10701                "ACTIVATING" => Self::Activating,
10702                _ => Self::UnknownValue(state::UnknownValue(
10703                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10704                )),
10705            }
10706        }
10707    }
10708
10709    impl serde::ser::Serialize for State {
10710        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10711        where
10712            S: serde::Serializer,
10713        {
10714            match self {
10715                Self::Unspecified => serializer.serialize_i32(0),
10716                Self::Active => serializer.serialize_i32(1),
10717                Self::Creating => serializer.serialize_i32(2),
10718                Self::Activating => serializer.serialize_i32(3),
10719                Self::UnknownValue(u) => u.0.serialize(serializer),
10720            }
10721        }
10722    }
10723
10724    impl<'de> serde::de::Deserialize<'de> for State {
10725        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10726        where
10727            D: serde::Deserializer<'de>,
10728        {
10729            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10730                ".google.cloud.vmwareengine.v1.Hcx.State",
10731            ))
10732        }
10733    }
10734}
10735
10736/// Details about a NSX Manager appliance.
10737#[serde_with::serde_as]
10738#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10739#[serde(default, rename_all = "camelCase")]
10740#[non_exhaustive]
10741pub struct Nsx {
10742    /// Internal IP address of the appliance.
10743    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10744    pub internal_ip: std::string::String,
10745
10746    /// Version of the appliance.
10747    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10748    pub version: std::string::String,
10749
10750    /// Output only. The state of the appliance.
10751    pub state: crate::model::nsx::State,
10752
10753    /// Fully qualified domain name of the appliance.
10754    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10755    pub fqdn: std::string::String,
10756
10757    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10758    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10759}
10760
10761impl Nsx {
10762    pub fn new() -> Self {
10763        std::default::Default::default()
10764    }
10765
10766    /// Sets the value of [internal_ip][crate::model::Nsx::internal_ip].
10767    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10768        self.internal_ip = v.into();
10769        self
10770    }
10771
10772    /// Sets the value of [version][crate::model::Nsx::version].
10773    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10774        self.version = v.into();
10775        self
10776    }
10777
10778    /// Sets the value of [state][crate::model::Nsx::state].
10779    pub fn set_state<T: std::convert::Into<crate::model::nsx::State>>(mut self, v: T) -> Self {
10780        self.state = v.into();
10781        self
10782    }
10783
10784    /// Sets the value of [fqdn][crate::model::Nsx::fqdn].
10785    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10786        self.fqdn = v.into();
10787        self
10788    }
10789}
10790
10791impl wkt::message::Message for Nsx {
10792    fn typename() -> &'static str {
10793        "type.googleapis.com/google.cloud.vmwareengine.v1.Nsx"
10794    }
10795}
10796
10797/// Defines additional types related to [Nsx].
10798pub mod nsx {
10799    #[allow(unused_imports)]
10800    use super::*;
10801
10802    /// State of the appliance
10803    ///
10804    /// # Working with unknown values
10805    ///
10806    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10807    /// additional enum variants at any time. Adding new variants is not considered
10808    /// a breaking change. Applications should write their code in anticipation of:
10809    ///
10810    /// - New values appearing in future releases of the client library, **and**
10811    /// - New values received dynamically, without application changes.
10812    ///
10813    /// Please consult the [Working with enums] section in the user guide for some
10814    /// guidelines.
10815    ///
10816    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10817    #[derive(Clone, Debug, PartialEq)]
10818    #[non_exhaustive]
10819    pub enum State {
10820        /// Unspecified appliance state. This is the default value.
10821        Unspecified,
10822        /// The appliance is operational and can be used.
10823        Active,
10824        /// The appliance is being deployed.
10825        Creating,
10826        /// If set, the enum was initialized with an unknown value.
10827        ///
10828        /// Applications can examine the value using [State::value] or
10829        /// [State::name].
10830        UnknownValue(state::UnknownValue),
10831    }
10832
10833    #[doc(hidden)]
10834    pub mod state {
10835        #[allow(unused_imports)]
10836        use super::*;
10837        #[derive(Clone, Debug, PartialEq)]
10838        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10839    }
10840
10841    impl State {
10842        /// Gets the enum value.
10843        ///
10844        /// Returns `None` if the enum contains an unknown value deserialized from
10845        /// the string representation of enums.
10846        pub fn value(&self) -> std::option::Option<i32> {
10847            match self {
10848                Self::Unspecified => std::option::Option::Some(0),
10849                Self::Active => std::option::Option::Some(1),
10850                Self::Creating => std::option::Option::Some(2),
10851                Self::UnknownValue(u) => u.0.value(),
10852            }
10853        }
10854
10855        /// Gets the enum value as a string.
10856        ///
10857        /// Returns `None` if the enum contains an unknown value deserialized from
10858        /// the integer representation of enums.
10859        pub fn name(&self) -> std::option::Option<&str> {
10860            match self {
10861                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10862                Self::Active => std::option::Option::Some("ACTIVE"),
10863                Self::Creating => std::option::Option::Some("CREATING"),
10864                Self::UnknownValue(u) => u.0.name(),
10865            }
10866        }
10867    }
10868
10869    impl std::default::Default for State {
10870        fn default() -> Self {
10871            use std::convert::From;
10872            Self::from(0)
10873        }
10874    }
10875
10876    impl std::fmt::Display for State {
10877        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10878            wkt::internal::display_enum(f, self.name(), self.value())
10879        }
10880    }
10881
10882    impl std::convert::From<i32> for State {
10883        fn from(value: i32) -> Self {
10884            match value {
10885                0 => Self::Unspecified,
10886                1 => Self::Active,
10887                2 => Self::Creating,
10888                _ => Self::UnknownValue(state::UnknownValue(
10889                    wkt::internal::UnknownEnumValue::Integer(value),
10890                )),
10891            }
10892        }
10893    }
10894
10895    impl std::convert::From<&str> for State {
10896        fn from(value: &str) -> Self {
10897            use std::string::ToString;
10898            match value {
10899                "STATE_UNSPECIFIED" => Self::Unspecified,
10900                "ACTIVE" => Self::Active,
10901                "CREATING" => Self::Creating,
10902                _ => Self::UnknownValue(state::UnknownValue(
10903                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10904                )),
10905            }
10906        }
10907    }
10908
10909    impl serde::ser::Serialize for State {
10910        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10911        where
10912            S: serde::Serializer,
10913        {
10914            match self {
10915                Self::Unspecified => serializer.serialize_i32(0),
10916                Self::Active => serializer.serialize_i32(1),
10917                Self::Creating => serializer.serialize_i32(2),
10918                Self::UnknownValue(u) => u.0.serialize(serializer),
10919            }
10920        }
10921    }
10922
10923    impl<'de> serde::de::Deserialize<'de> for State {
10924        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10925        where
10926            D: serde::Deserializer<'de>,
10927        {
10928            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10929                ".google.cloud.vmwareengine.v1.Nsx.State",
10930            ))
10931        }
10932    }
10933}
10934
10935/// Details about a vCenter Server management appliance.
10936#[serde_with::serde_as]
10937#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10938#[serde(default, rename_all = "camelCase")]
10939#[non_exhaustive]
10940pub struct Vcenter {
10941    /// Internal IP address of the appliance.
10942    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10943    pub internal_ip: std::string::String,
10944
10945    /// Version of the appliance.
10946    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10947    pub version: std::string::String,
10948
10949    /// Output only. The state of the appliance.
10950    pub state: crate::model::vcenter::State,
10951
10952    /// Fully qualified domain name of the appliance.
10953    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10954    pub fqdn: std::string::String,
10955
10956    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10957    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10958}
10959
10960impl Vcenter {
10961    pub fn new() -> Self {
10962        std::default::Default::default()
10963    }
10964
10965    /// Sets the value of [internal_ip][crate::model::Vcenter::internal_ip].
10966    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10967        self.internal_ip = v.into();
10968        self
10969    }
10970
10971    /// Sets the value of [version][crate::model::Vcenter::version].
10972    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10973        self.version = v.into();
10974        self
10975    }
10976
10977    /// Sets the value of [state][crate::model::Vcenter::state].
10978    pub fn set_state<T: std::convert::Into<crate::model::vcenter::State>>(mut self, v: T) -> Self {
10979        self.state = v.into();
10980        self
10981    }
10982
10983    /// Sets the value of [fqdn][crate::model::Vcenter::fqdn].
10984    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10985        self.fqdn = v.into();
10986        self
10987    }
10988}
10989
10990impl wkt::message::Message for Vcenter {
10991    fn typename() -> &'static str {
10992        "type.googleapis.com/google.cloud.vmwareengine.v1.Vcenter"
10993    }
10994}
10995
10996/// Defines additional types related to [Vcenter].
10997pub mod vcenter {
10998    #[allow(unused_imports)]
10999    use super::*;
11000
11001    /// State of the appliance
11002    ///
11003    /// # Working with unknown values
11004    ///
11005    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11006    /// additional enum variants at any time. Adding new variants is not considered
11007    /// a breaking change. Applications should write their code in anticipation of:
11008    ///
11009    /// - New values appearing in future releases of the client library, **and**
11010    /// - New values received dynamically, without application changes.
11011    ///
11012    /// Please consult the [Working with enums] section in the user guide for some
11013    /// guidelines.
11014    ///
11015    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11016    #[derive(Clone, Debug, PartialEq)]
11017    #[non_exhaustive]
11018    pub enum State {
11019        /// Unspecified appliance state. This is the default value.
11020        Unspecified,
11021        /// The appliance is operational and can be used.
11022        Active,
11023        /// The appliance is being deployed.
11024        Creating,
11025        /// If set, the enum was initialized with an unknown value.
11026        ///
11027        /// Applications can examine the value using [State::value] or
11028        /// [State::name].
11029        UnknownValue(state::UnknownValue),
11030    }
11031
11032    #[doc(hidden)]
11033    pub mod state {
11034        #[allow(unused_imports)]
11035        use super::*;
11036        #[derive(Clone, Debug, PartialEq)]
11037        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11038    }
11039
11040    impl State {
11041        /// Gets the enum value.
11042        ///
11043        /// Returns `None` if the enum contains an unknown value deserialized from
11044        /// the string representation of enums.
11045        pub fn value(&self) -> std::option::Option<i32> {
11046            match self {
11047                Self::Unspecified => std::option::Option::Some(0),
11048                Self::Active => std::option::Option::Some(1),
11049                Self::Creating => std::option::Option::Some(2),
11050                Self::UnknownValue(u) => u.0.value(),
11051            }
11052        }
11053
11054        /// Gets the enum value as a string.
11055        ///
11056        /// Returns `None` if the enum contains an unknown value deserialized from
11057        /// the integer representation of enums.
11058        pub fn name(&self) -> std::option::Option<&str> {
11059            match self {
11060                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11061                Self::Active => std::option::Option::Some("ACTIVE"),
11062                Self::Creating => std::option::Option::Some("CREATING"),
11063                Self::UnknownValue(u) => u.0.name(),
11064            }
11065        }
11066    }
11067
11068    impl std::default::Default for State {
11069        fn default() -> Self {
11070            use std::convert::From;
11071            Self::from(0)
11072        }
11073    }
11074
11075    impl std::fmt::Display for State {
11076        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11077            wkt::internal::display_enum(f, self.name(), self.value())
11078        }
11079    }
11080
11081    impl std::convert::From<i32> for State {
11082        fn from(value: i32) -> Self {
11083            match value {
11084                0 => Self::Unspecified,
11085                1 => Self::Active,
11086                2 => Self::Creating,
11087                _ => Self::UnknownValue(state::UnknownValue(
11088                    wkt::internal::UnknownEnumValue::Integer(value),
11089                )),
11090            }
11091        }
11092    }
11093
11094    impl std::convert::From<&str> for State {
11095        fn from(value: &str) -> Self {
11096            use std::string::ToString;
11097            match value {
11098                "STATE_UNSPECIFIED" => Self::Unspecified,
11099                "ACTIVE" => Self::Active,
11100                "CREATING" => Self::Creating,
11101                _ => Self::UnknownValue(state::UnknownValue(
11102                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11103                )),
11104            }
11105        }
11106    }
11107
11108    impl serde::ser::Serialize for State {
11109        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11110        where
11111            S: serde::Serializer,
11112        {
11113            match self {
11114                Self::Unspecified => serializer.serialize_i32(0),
11115                Self::Active => serializer.serialize_i32(1),
11116                Self::Creating => serializer.serialize_i32(2),
11117                Self::UnknownValue(u) => u.0.serialize(serializer),
11118            }
11119        }
11120    }
11121
11122    impl<'de> serde::de::Deserialize<'de> for State {
11123        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11124        where
11125            D: serde::Deserializer<'de>,
11126        {
11127            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11128                ".google.cloud.vmwareengine.v1.Vcenter.State",
11129            ))
11130        }
11131    }
11132}
11133
11134/// Autoscaling settings define the rules used by VMware Engine to
11135/// automatically scale-out and scale-in the clusters in a private cloud.
11136#[serde_with::serde_as]
11137#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11138#[serde(default, rename_all = "camelCase")]
11139#[non_exhaustive]
11140pub struct AutoscalingSettings {
11141    /// Required. The map with autoscaling policies applied to the cluster.
11142    /// The key is the identifier of the policy.
11143    /// It must meet the following requirements:
11144    ///
11145    /// * Only contains 1-63 alphanumeric characters and hyphens
11146    /// * Begins with an alphabetical character
11147    /// * Ends with a non-hyphen character
11148    /// * Not formatted as a UUID
11149    /// * Complies with [RFC
11150    ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
11151    ///
11152    /// Currently there map must contain only one element
11153    /// that describes the autoscaling policy for compute nodes.
11154    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
11155    pub autoscaling_policies: std::collections::HashMap<
11156        std::string::String,
11157        crate::model::autoscaling_settings::AutoscalingPolicy,
11158    >,
11159
11160    /// Optional. Minimum number of nodes of any type in a cluster.
11161    /// If not specified the default limits apply.
11162    #[serde(skip_serializing_if = "wkt::internal::is_default")]
11163    pub min_cluster_node_count: i32,
11164
11165    /// Optional. Maximum number of nodes of any type in a cluster.
11166    /// If not specified the default limits apply.
11167    #[serde(skip_serializing_if = "wkt::internal::is_default")]
11168    pub max_cluster_node_count: i32,
11169
11170    /// Optional. The minimum duration between consecutive autoscale operations.
11171    /// It starts once addition or removal of nodes is fully completed.
11172    /// Defaults to 30 minutes if not specified. Cool down period must be in whole
11173    /// minutes (for example, 30, 31, 50, 180 minutes).
11174    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11175    pub cool_down_period: std::option::Option<wkt::Duration>,
11176
11177    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11178    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11179}
11180
11181impl AutoscalingSettings {
11182    pub fn new() -> Self {
11183        std::default::Default::default()
11184    }
11185
11186    /// Sets the value of [autoscaling_policies][crate::model::AutoscalingSettings::autoscaling_policies].
11187    pub fn set_autoscaling_policies<T, K, V>(mut self, v: T) -> Self
11188    where
11189        T: std::iter::IntoIterator<Item = (K, V)>,
11190        K: std::convert::Into<std::string::String>,
11191        V: std::convert::Into<crate::model::autoscaling_settings::AutoscalingPolicy>,
11192    {
11193        use std::iter::Iterator;
11194        self.autoscaling_policies = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
11195        self
11196    }
11197
11198    /// Sets the value of [min_cluster_node_count][crate::model::AutoscalingSettings::min_cluster_node_count].
11199    pub fn set_min_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11200        self.min_cluster_node_count = v.into();
11201        self
11202    }
11203
11204    /// Sets the value of [max_cluster_node_count][crate::model::AutoscalingSettings::max_cluster_node_count].
11205    pub fn set_max_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11206        self.max_cluster_node_count = v.into();
11207        self
11208    }
11209
11210    /// Sets the value of [cool_down_period][crate::model::AutoscalingSettings::cool_down_period].
11211    pub fn set_cool_down_period<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
11212        mut self,
11213        v: T,
11214    ) -> Self {
11215        self.cool_down_period = v.into();
11216        self
11217    }
11218}
11219
11220impl wkt::message::Message for AutoscalingSettings {
11221    fn typename() -> &'static str {
11222        "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings"
11223    }
11224}
11225
11226/// Defines additional types related to [AutoscalingSettings].
11227pub mod autoscaling_settings {
11228    #[allow(unused_imports)]
11229    use super::*;
11230
11231    /// Thresholds define the utilization of resources triggering
11232    /// scale-out and scale-in operations.
11233    #[serde_with::serde_as]
11234    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11235    #[serde(default, rename_all = "camelCase")]
11236    #[non_exhaustive]
11237    pub struct Thresholds {
11238        /// Required. The utilization triggering the scale-out operation in percent.
11239        #[serde(skip_serializing_if = "wkt::internal::is_default")]
11240        pub scale_out: i32,
11241
11242        /// Required. The utilization triggering the scale-in operation in percent.
11243        #[serde(skip_serializing_if = "wkt::internal::is_default")]
11244        pub scale_in: i32,
11245
11246        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11247        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11248    }
11249
11250    impl Thresholds {
11251        pub fn new() -> Self {
11252            std::default::Default::default()
11253        }
11254
11255        /// Sets the value of [scale_out][crate::model::autoscaling_settings::Thresholds::scale_out].
11256        pub fn set_scale_out<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11257            self.scale_out = v.into();
11258            self
11259        }
11260
11261        /// Sets the value of [scale_in][crate::model::autoscaling_settings::Thresholds::scale_in].
11262        pub fn set_scale_in<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11263            self.scale_in = v.into();
11264            self
11265        }
11266    }
11267
11268    impl wkt::message::Message for Thresholds {
11269        fn typename() -> &'static str {
11270            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds"
11271        }
11272    }
11273
11274    /// Autoscaling policy describes the behavior of the autoscaling
11275    /// with respect to the resource utilization.
11276    /// The scale-out operation is initiated if the utilization
11277    /// exceeds ANY of the respective thresholds.
11278    /// The scale-in operation is initiated if the utilization
11279    /// is below ALL of the respective thresholds.
11280    #[serde_with::serde_as]
11281    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11282    #[serde(default, rename_all = "camelCase")]
11283    #[non_exhaustive]
11284    pub struct AutoscalingPolicy {
11285        /// Required. The canonical identifier of the node type to add or remove.
11286        /// Corresponds to the `NodeType`.
11287        #[serde(skip_serializing_if = "std::string::String::is_empty")]
11288        pub node_type_id: std::string::String,
11289
11290        /// Required. Number of nodes to add to a cluster during a scale-out
11291        /// operation. Must be divisible by 2 for stretched clusters. During a
11292        /// scale-in operation only one node (or 2 for stretched clusters) are
11293        /// removed in a single iteration.
11294        #[serde(skip_serializing_if = "wkt::internal::is_default")]
11295        pub scale_out_size: i32,
11296
11297        /// Optional. Utilization thresholds pertaining to CPU utilization.
11298        #[serde(skip_serializing_if = "std::option::Option::is_none")]
11299        pub cpu_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
11300
11301        /// Optional. Utilization thresholds pertaining to amount of granted memory.
11302        #[serde(skip_serializing_if = "std::option::Option::is_none")]
11303        pub granted_memory_thresholds:
11304            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
11305
11306        /// Optional. Utilization thresholds pertaining to amount of consumed memory.
11307        #[serde(skip_serializing_if = "std::option::Option::is_none")]
11308        pub consumed_memory_thresholds:
11309            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
11310
11311        /// Optional. Utilization thresholds pertaining to amount of consumed
11312        /// storage.
11313        #[serde(skip_serializing_if = "std::option::Option::is_none")]
11314        pub storage_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
11315
11316        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11317        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11318    }
11319
11320    impl AutoscalingPolicy {
11321        pub fn new() -> Self {
11322            std::default::Default::default()
11323        }
11324
11325        /// Sets the value of [node_type_id][crate::model::autoscaling_settings::AutoscalingPolicy::node_type_id].
11326        pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(
11327            mut self,
11328            v: T,
11329        ) -> Self {
11330            self.node_type_id = v.into();
11331            self
11332        }
11333
11334        /// Sets the value of [scale_out_size][crate::model::autoscaling_settings::AutoscalingPolicy::scale_out_size].
11335        pub fn set_scale_out_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11336            self.scale_out_size = v.into();
11337            self
11338        }
11339
11340        /// Sets the value of [cpu_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::cpu_thresholds].
11341        pub fn set_cpu_thresholds<
11342            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
11343        >(
11344            mut self,
11345            v: T,
11346        ) -> Self {
11347            self.cpu_thresholds = v.into();
11348            self
11349        }
11350
11351        /// Sets the value of [granted_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::granted_memory_thresholds].
11352        pub fn set_granted_memory_thresholds<
11353            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
11354        >(
11355            mut self,
11356            v: T,
11357        ) -> Self {
11358            self.granted_memory_thresholds = v.into();
11359            self
11360        }
11361
11362        /// Sets the value of [consumed_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::consumed_memory_thresholds].
11363        pub fn set_consumed_memory_thresholds<
11364            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
11365        >(
11366            mut self,
11367            v: T,
11368        ) -> Self {
11369            self.consumed_memory_thresholds = v.into();
11370            self
11371        }
11372
11373        /// Sets the value of [storage_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::storage_thresholds].
11374        pub fn set_storage_thresholds<
11375            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
11376        >(
11377            mut self,
11378            v: T,
11379        ) -> Self {
11380            self.storage_thresholds = v.into();
11381            self
11382        }
11383    }
11384
11385    impl wkt::message::Message for AutoscalingPolicy {
11386        fn typename() -> &'static str {
11387            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.AutoscalingPolicy"
11388        }
11389    }
11390}
11391
11392/// DNS forwarding config.
11393/// This config defines a list of domain to name server mappings,
11394/// and is attached to the private cloud for custom domain resolution.
11395#[serde_with::serde_as]
11396#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11397#[serde(default, rename_all = "camelCase")]
11398#[non_exhaustive]
11399pub struct DnsForwarding {
11400    /// Output only. The resource name of this DNS profile.
11401    /// Resource names are schemeless URIs that follow the conventions in
11402    /// <https://cloud.google.com/apis/design/resource_names>.
11403    /// For example:
11404    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
11405    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11406    pub name: std::string::String,
11407
11408    /// Output only. Creation time of this resource.
11409    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11410    pub create_time: std::option::Option<wkt::Timestamp>,
11411
11412    /// Output only. Last update time of this resource.
11413    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11414    pub update_time: std::option::Option<wkt::Timestamp>,
11415
11416    /// Required. List of domain mappings to configure
11417    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11418    pub forwarding_rules: std::vec::Vec<crate::model::dns_forwarding::ForwardingRule>,
11419
11420    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11421    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11422}
11423
11424impl DnsForwarding {
11425    pub fn new() -> Self {
11426        std::default::Default::default()
11427    }
11428
11429    /// Sets the value of [name][crate::model::DnsForwarding::name].
11430    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11431        self.name = v.into();
11432        self
11433    }
11434
11435    /// Sets the value of [create_time][crate::model::DnsForwarding::create_time].
11436    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11437        mut self,
11438        v: T,
11439    ) -> Self {
11440        self.create_time = v.into();
11441        self
11442    }
11443
11444    /// Sets the value of [update_time][crate::model::DnsForwarding::update_time].
11445    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11446        mut self,
11447        v: T,
11448    ) -> Self {
11449        self.update_time = v.into();
11450        self
11451    }
11452
11453    /// Sets the value of [forwarding_rules][crate::model::DnsForwarding::forwarding_rules].
11454    pub fn set_forwarding_rules<T, V>(mut self, v: T) -> Self
11455    where
11456        T: std::iter::IntoIterator<Item = V>,
11457        V: std::convert::Into<crate::model::dns_forwarding::ForwardingRule>,
11458    {
11459        use std::iter::Iterator;
11460        self.forwarding_rules = v.into_iter().map(|i| i.into()).collect();
11461        self
11462    }
11463}
11464
11465impl wkt::message::Message for DnsForwarding {
11466    fn typename() -> &'static str {
11467        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding"
11468    }
11469}
11470
11471/// Defines additional types related to [DnsForwarding].
11472pub mod dns_forwarding {
11473    #[allow(unused_imports)]
11474    use super::*;
11475
11476    /// A forwarding rule is a mapping of a `domain` to `name_servers`.
11477    /// This mapping allows VMware Engine to resolve domains for attached private
11478    /// clouds by forwarding DNS requests for a given domain to the specified
11479    /// nameservers.
11480    #[serde_with::serde_as]
11481    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11482    #[serde(default, rename_all = "camelCase")]
11483    #[non_exhaustive]
11484    pub struct ForwardingRule {
11485        /// Required. Domain used to resolve a `name_servers` list.
11486        #[serde(skip_serializing_if = "std::string::String::is_empty")]
11487        pub domain: std::string::String,
11488
11489        /// Required. List of DNS servers to use for domain resolution
11490        #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11491        pub name_servers: std::vec::Vec<std::string::String>,
11492
11493        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11494        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11495    }
11496
11497    impl ForwardingRule {
11498        pub fn new() -> Self {
11499            std::default::Default::default()
11500        }
11501
11502        /// Sets the value of [domain][crate::model::dns_forwarding::ForwardingRule::domain].
11503        pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11504            self.domain = v.into();
11505            self
11506        }
11507
11508        /// Sets the value of [name_servers][crate::model::dns_forwarding::ForwardingRule::name_servers].
11509        pub fn set_name_servers<T, V>(mut self, v: T) -> Self
11510        where
11511            T: std::iter::IntoIterator<Item = V>,
11512            V: std::convert::Into<std::string::String>,
11513        {
11514            use std::iter::Iterator;
11515            self.name_servers = v.into_iter().map(|i| i.into()).collect();
11516            self
11517        }
11518    }
11519
11520    impl wkt::message::Message for ForwardingRule {
11521        fn typename() -> &'static str {
11522            "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule"
11523        }
11524    }
11525}
11526
11527/// Details of a network peering.
11528#[serde_with::serde_as]
11529#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11530#[serde(default, rename_all = "camelCase")]
11531#[non_exhaustive]
11532pub struct NetworkPeering {
11533    /// Output only. The resource name of the network peering. NetworkPeering is a
11534    /// global resource and location can only be global. Resource names are
11535    /// scheme-less URIs that follow the conventions in
11536    /// <https://cloud.google.com/apis/design/resource_names>.
11537    /// For example:
11538    /// `projects/my-project/locations/global/networkPeerings/my-peering`
11539    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11540    pub name: std::string::String,
11541
11542    /// Output only. Creation time of this resource.
11543    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11544    pub create_time: std::option::Option<wkt::Timestamp>,
11545
11546    /// Output only. Last update time of this resource.
11547    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11548    pub update_time: std::option::Option<wkt::Timestamp>,
11549
11550    /// Required. The relative resource name of the network to peer with
11551    /// a standard VMware Engine network. The provided network can be a
11552    /// consumer VPC network or another standard VMware Engine network. If the
11553    /// `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form:
11554    /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
11555    /// Otherwise specify the name in the form:
11556    /// `projects/{project}/global/networks/{network_id}`, where
11557    /// `{project}` can either be a project number or a project ID.
11558    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11559    pub peer_network: std::string::String,
11560
11561    /// Optional. True if custom routes are exported to the peered network;
11562    /// false otherwise. The default value is true.
11563    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11564    pub export_custom_routes: std::option::Option<bool>,
11565
11566    /// Optional. True if custom routes are imported from the peered network;
11567    /// false otherwise. The default value is true.
11568    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11569    pub import_custom_routes: std::option::Option<bool>,
11570
11571    /// Optional. True if full mesh connectivity is created and managed
11572    /// automatically between peered networks; false otherwise. Currently this
11573    /// field is always true because Google Compute Engine automatically creates
11574    /// and manages subnetwork routes between two VPC networks when peering state
11575    /// is 'ACTIVE'.
11576    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11577    pub exchange_subnet_routes: std::option::Option<bool>,
11578
11579    /// Optional. True if all subnet routes with a public IP address range are
11580    /// exported; false otherwise. The default value is true. IPv4 special-use
11581    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
11582    /// exported to peers and are not controlled by this field.
11583    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11584    pub export_custom_routes_with_public_ip: std::option::Option<bool>,
11585
11586    /// Optional. True if all subnet routes with public IP address range are
11587    /// imported; false otherwise. The default value is true. IPv4 special-use
11588    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
11589    /// imported to peers and are not controlled by this field.
11590    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11591    pub import_custom_routes_with_public_ip: std::option::Option<bool>,
11592
11593    /// Output only. State of the network peering. This field
11594    /// has a value of 'ACTIVE' when there's a matching configuration in the peer
11595    /// network. New values may be added to this enum when appropriate.
11596    pub state: crate::model::network_peering::State,
11597
11598    /// Output only. Output Only. Details about the current state of the network
11599    /// peering.
11600    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11601    pub state_details: std::string::String,
11602
11603    /// Optional. Maximum transmission unit (MTU) in bytes.
11604    /// The default value is `1500`. If a value of `0` is provided for this field,
11605    /// VMware Engine uses the default value instead.
11606    #[serde(skip_serializing_if = "wkt::internal::is_default")]
11607    pub peer_mtu: i32,
11608
11609    /// Required. The type of the network to peer with the VMware Engine network.
11610    pub peer_network_type: crate::model::network_peering::PeerNetworkType,
11611
11612    /// Output only. System-generated unique identifier for the resource.
11613    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11614    pub uid: std::string::String,
11615
11616    /// Required. The relative resource name of the VMware Engine network.
11617    /// Specify the name in the following form:
11618    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
11619    /// where `{project}` can either be a project number or a project ID.
11620    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11621    pub vmware_engine_network: std::string::String,
11622
11623    /// Optional. User-provided description for this network peering.
11624    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11625    pub description: std::string::String,
11626
11627    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11628    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11629}
11630
11631impl NetworkPeering {
11632    pub fn new() -> Self {
11633        std::default::Default::default()
11634    }
11635
11636    /// Sets the value of [name][crate::model::NetworkPeering::name].
11637    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11638        self.name = v.into();
11639        self
11640    }
11641
11642    /// Sets the value of [create_time][crate::model::NetworkPeering::create_time].
11643    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11644        mut self,
11645        v: T,
11646    ) -> Self {
11647        self.create_time = v.into();
11648        self
11649    }
11650
11651    /// Sets the value of [update_time][crate::model::NetworkPeering::update_time].
11652    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11653        mut self,
11654        v: T,
11655    ) -> Self {
11656        self.update_time = v.into();
11657        self
11658    }
11659
11660    /// Sets the value of [peer_network][crate::model::NetworkPeering::peer_network].
11661    pub fn set_peer_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11662        self.peer_network = v.into();
11663        self
11664    }
11665
11666    /// Sets the value of [export_custom_routes][crate::model::NetworkPeering::export_custom_routes].
11667    pub fn set_export_custom_routes<T: std::convert::Into<std::option::Option<bool>>>(
11668        mut self,
11669        v: T,
11670    ) -> Self {
11671        self.export_custom_routes = v.into();
11672        self
11673    }
11674
11675    /// Sets the value of [import_custom_routes][crate::model::NetworkPeering::import_custom_routes].
11676    pub fn set_import_custom_routes<T: std::convert::Into<std::option::Option<bool>>>(
11677        mut self,
11678        v: T,
11679    ) -> Self {
11680        self.import_custom_routes = v.into();
11681        self
11682    }
11683
11684    /// Sets the value of [exchange_subnet_routes][crate::model::NetworkPeering::exchange_subnet_routes].
11685    pub fn set_exchange_subnet_routes<T: std::convert::Into<std::option::Option<bool>>>(
11686        mut self,
11687        v: T,
11688    ) -> Self {
11689        self.exchange_subnet_routes = v.into();
11690        self
11691    }
11692
11693    /// Sets the value of [export_custom_routes_with_public_ip][crate::model::NetworkPeering::export_custom_routes_with_public_ip].
11694    pub fn set_export_custom_routes_with_public_ip<
11695        T: std::convert::Into<std::option::Option<bool>>,
11696    >(
11697        mut self,
11698        v: T,
11699    ) -> Self {
11700        self.export_custom_routes_with_public_ip = v.into();
11701        self
11702    }
11703
11704    /// Sets the value of [import_custom_routes_with_public_ip][crate::model::NetworkPeering::import_custom_routes_with_public_ip].
11705    pub fn set_import_custom_routes_with_public_ip<
11706        T: std::convert::Into<std::option::Option<bool>>,
11707    >(
11708        mut self,
11709        v: T,
11710    ) -> Self {
11711        self.import_custom_routes_with_public_ip = v.into();
11712        self
11713    }
11714
11715    /// Sets the value of [state][crate::model::NetworkPeering::state].
11716    pub fn set_state<T: std::convert::Into<crate::model::network_peering::State>>(
11717        mut self,
11718        v: T,
11719    ) -> Self {
11720        self.state = v.into();
11721        self
11722    }
11723
11724    /// Sets the value of [state_details][crate::model::NetworkPeering::state_details].
11725    pub fn set_state_details<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11726        self.state_details = v.into();
11727        self
11728    }
11729
11730    /// Sets the value of [peer_mtu][crate::model::NetworkPeering::peer_mtu].
11731    pub fn set_peer_mtu<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11732        self.peer_mtu = v.into();
11733        self
11734    }
11735
11736    /// Sets the value of [peer_network_type][crate::model::NetworkPeering::peer_network_type].
11737    pub fn set_peer_network_type<
11738        T: std::convert::Into<crate::model::network_peering::PeerNetworkType>,
11739    >(
11740        mut self,
11741        v: T,
11742    ) -> Self {
11743        self.peer_network_type = v.into();
11744        self
11745    }
11746
11747    /// Sets the value of [uid][crate::model::NetworkPeering::uid].
11748    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11749        self.uid = v.into();
11750        self
11751    }
11752
11753    /// Sets the value of [vmware_engine_network][crate::model::NetworkPeering::vmware_engine_network].
11754    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
11755        mut self,
11756        v: T,
11757    ) -> Self {
11758        self.vmware_engine_network = v.into();
11759        self
11760    }
11761
11762    /// Sets the value of [description][crate::model::NetworkPeering::description].
11763    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11764        self.description = v.into();
11765        self
11766    }
11767}
11768
11769impl wkt::message::Message for NetworkPeering {
11770    fn typename() -> &'static str {
11771        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPeering"
11772    }
11773}
11774
11775/// Defines additional types related to [NetworkPeering].
11776pub mod network_peering {
11777    #[allow(unused_imports)]
11778    use super::*;
11779
11780    /// Possible states of a network peering.
11781    ///
11782    /// # Working with unknown values
11783    ///
11784    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11785    /// additional enum variants at any time. Adding new variants is not considered
11786    /// a breaking change. Applications should write their code in anticipation of:
11787    ///
11788    /// - New values appearing in future releases of the client library, **and**
11789    /// - New values received dynamically, without application changes.
11790    ///
11791    /// Please consult the [Working with enums] section in the user guide for some
11792    /// guidelines.
11793    ///
11794    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11795    #[derive(Clone, Debug, PartialEq)]
11796    #[non_exhaustive]
11797    pub enum State {
11798        /// Unspecified network peering state. This is the default value.
11799        Unspecified,
11800        /// The peering is not active.
11801        Inactive,
11802        /// The peering is active.
11803        Active,
11804        /// The peering is being created.
11805        Creating,
11806        /// The peering is being deleted.
11807        Deleting,
11808        /// If set, the enum was initialized with an unknown value.
11809        ///
11810        /// Applications can examine the value using [State::value] or
11811        /// [State::name].
11812        UnknownValue(state::UnknownValue),
11813    }
11814
11815    #[doc(hidden)]
11816    pub mod state {
11817        #[allow(unused_imports)]
11818        use super::*;
11819        #[derive(Clone, Debug, PartialEq)]
11820        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11821    }
11822
11823    impl State {
11824        /// Gets the enum value.
11825        ///
11826        /// Returns `None` if the enum contains an unknown value deserialized from
11827        /// the string representation of enums.
11828        pub fn value(&self) -> std::option::Option<i32> {
11829            match self {
11830                Self::Unspecified => std::option::Option::Some(0),
11831                Self::Inactive => std::option::Option::Some(1),
11832                Self::Active => std::option::Option::Some(2),
11833                Self::Creating => std::option::Option::Some(3),
11834                Self::Deleting => std::option::Option::Some(4),
11835                Self::UnknownValue(u) => u.0.value(),
11836            }
11837        }
11838
11839        /// Gets the enum value as a string.
11840        ///
11841        /// Returns `None` if the enum contains an unknown value deserialized from
11842        /// the integer representation of enums.
11843        pub fn name(&self) -> std::option::Option<&str> {
11844            match self {
11845                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11846                Self::Inactive => std::option::Option::Some("INACTIVE"),
11847                Self::Active => std::option::Option::Some("ACTIVE"),
11848                Self::Creating => std::option::Option::Some("CREATING"),
11849                Self::Deleting => std::option::Option::Some("DELETING"),
11850                Self::UnknownValue(u) => u.0.name(),
11851            }
11852        }
11853    }
11854
11855    impl std::default::Default for State {
11856        fn default() -> Self {
11857            use std::convert::From;
11858            Self::from(0)
11859        }
11860    }
11861
11862    impl std::fmt::Display for State {
11863        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11864            wkt::internal::display_enum(f, self.name(), self.value())
11865        }
11866    }
11867
11868    impl std::convert::From<i32> for State {
11869        fn from(value: i32) -> Self {
11870            match value {
11871                0 => Self::Unspecified,
11872                1 => Self::Inactive,
11873                2 => Self::Active,
11874                3 => Self::Creating,
11875                4 => Self::Deleting,
11876                _ => Self::UnknownValue(state::UnknownValue(
11877                    wkt::internal::UnknownEnumValue::Integer(value),
11878                )),
11879            }
11880        }
11881    }
11882
11883    impl std::convert::From<&str> for State {
11884        fn from(value: &str) -> Self {
11885            use std::string::ToString;
11886            match value {
11887                "STATE_UNSPECIFIED" => Self::Unspecified,
11888                "INACTIVE" => Self::Inactive,
11889                "ACTIVE" => Self::Active,
11890                "CREATING" => Self::Creating,
11891                "DELETING" => Self::Deleting,
11892                _ => Self::UnknownValue(state::UnknownValue(
11893                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11894                )),
11895            }
11896        }
11897    }
11898
11899    impl serde::ser::Serialize for State {
11900        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11901        where
11902            S: serde::Serializer,
11903        {
11904            match self {
11905                Self::Unspecified => serializer.serialize_i32(0),
11906                Self::Inactive => serializer.serialize_i32(1),
11907                Self::Active => serializer.serialize_i32(2),
11908                Self::Creating => serializer.serialize_i32(3),
11909                Self::Deleting => serializer.serialize_i32(4),
11910                Self::UnknownValue(u) => u.0.serialize(serializer),
11911            }
11912        }
11913    }
11914
11915    impl<'de> serde::de::Deserialize<'de> for State {
11916        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11917        where
11918            D: serde::Deserializer<'de>,
11919        {
11920            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11921                ".google.cloud.vmwareengine.v1.NetworkPeering.State",
11922            ))
11923        }
11924    }
11925
11926    /// Type or purpose of the network peering connection.
11927    ///
11928    /// # Working with unknown values
11929    ///
11930    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11931    /// additional enum variants at any time. Adding new variants is not considered
11932    /// a breaking change. Applications should write their code in anticipation of:
11933    ///
11934    /// - New values appearing in future releases of the client library, **and**
11935    /// - New values received dynamically, without application changes.
11936    ///
11937    /// Please consult the [Working with enums] section in the user guide for some
11938    /// guidelines.
11939    ///
11940    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11941    #[derive(Clone, Debug, PartialEq)]
11942    #[non_exhaustive]
11943    pub enum PeerNetworkType {
11944        /// Unspecified
11945        Unspecified,
11946        /// Peering connection used for connecting to another VPC network established
11947        /// by the same user. For example, a peering connection to another VPC
11948        /// network in the same project or to an on-premises network.
11949        Standard,
11950        /// Peering connection used for connecting to another VMware Engine network.
11951        VmwareEngineNetwork,
11952        /// Peering connection used for establishing [private services
11953        /// access](https://cloud.google.com/vpc/docs/private-services-access).
11954        PrivateServicesAccess,
11955        /// Peering connection used for connecting to NetApp Cloud Volumes.
11956        NetappCloudVolumes,
11957        /// Peering connection used for connecting to third-party services. Most
11958        /// third-party services require manual setup of reverse peering on the VPC
11959        /// network associated with the third-party service.
11960        ThirdPartyService,
11961        /// Peering connection used for connecting to Dell PowerScale Filers
11962        DellPowerscale,
11963        /// Peering connection used for connecting to Google Cloud NetApp Volumes.
11964        GoogleCloudNetappVolumes,
11965        /// If set, the enum was initialized with an unknown value.
11966        ///
11967        /// Applications can examine the value using [PeerNetworkType::value] or
11968        /// [PeerNetworkType::name].
11969        UnknownValue(peer_network_type::UnknownValue),
11970    }
11971
11972    #[doc(hidden)]
11973    pub mod peer_network_type {
11974        #[allow(unused_imports)]
11975        use super::*;
11976        #[derive(Clone, Debug, PartialEq)]
11977        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11978    }
11979
11980    impl PeerNetworkType {
11981        /// Gets the enum value.
11982        ///
11983        /// Returns `None` if the enum contains an unknown value deserialized from
11984        /// the string representation of enums.
11985        pub fn value(&self) -> std::option::Option<i32> {
11986            match self {
11987                Self::Unspecified => std::option::Option::Some(0),
11988                Self::Standard => std::option::Option::Some(1),
11989                Self::VmwareEngineNetwork => std::option::Option::Some(2),
11990                Self::PrivateServicesAccess => std::option::Option::Some(3),
11991                Self::NetappCloudVolumes => std::option::Option::Some(4),
11992                Self::ThirdPartyService => std::option::Option::Some(5),
11993                Self::DellPowerscale => std::option::Option::Some(6),
11994                Self::GoogleCloudNetappVolumes => std::option::Option::Some(7),
11995                Self::UnknownValue(u) => u.0.value(),
11996            }
11997        }
11998
11999        /// Gets the enum value as a string.
12000        ///
12001        /// Returns `None` if the enum contains an unknown value deserialized from
12002        /// the integer representation of enums.
12003        pub fn name(&self) -> std::option::Option<&str> {
12004            match self {
12005                Self::Unspecified => std::option::Option::Some("PEER_NETWORK_TYPE_UNSPECIFIED"),
12006                Self::Standard => std::option::Option::Some("STANDARD"),
12007                Self::VmwareEngineNetwork => std::option::Option::Some("VMWARE_ENGINE_NETWORK"),
12008                Self::PrivateServicesAccess => std::option::Option::Some("PRIVATE_SERVICES_ACCESS"),
12009                Self::NetappCloudVolumes => std::option::Option::Some("NETAPP_CLOUD_VOLUMES"),
12010                Self::ThirdPartyService => std::option::Option::Some("THIRD_PARTY_SERVICE"),
12011                Self::DellPowerscale => std::option::Option::Some("DELL_POWERSCALE"),
12012                Self::GoogleCloudNetappVolumes => {
12013                    std::option::Option::Some("GOOGLE_CLOUD_NETAPP_VOLUMES")
12014                }
12015                Self::UnknownValue(u) => u.0.name(),
12016            }
12017        }
12018    }
12019
12020    impl std::default::Default for PeerNetworkType {
12021        fn default() -> Self {
12022            use std::convert::From;
12023            Self::from(0)
12024        }
12025    }
12026
12027    impl std::fmt::Display for PeerNetworkType {
12028        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12029            wkt::internal::display_enum(f, self.name(), self.value())
12030        }
12031    }
12032
12033    impl std::convert::From<i32> for PeerNetworkType {
12034        fn from(value: i32) -> Self {
12035            match value {
12036                0 => Self::Unspecified,
12037                1 => Self::Standard,
12038                2 => Self::VmwareEngineNetwork,
12039                3 => Self::PrivateServicesAccess,
12040                4 => Self::NetappCloudVolumes,
12041                5 => Self::ThirdPartyService,
12042                6 => Self::DellPowerscale,
12043                7 => Self::GoogleCloudNetappVolumes,
12044                _ => Self::UnknownValue(peer_network_type::UnknownValue(
12045                    wkt::internal::UnknownEnumValue::Integer(value),
12046                )),
12047            }
12048        }
12049    }
12050
12051    impl std::convert::From<&str> for PeerNetworkType {
12052        fn from(value: &str) -> Self {
12053            use std::string::ToString;
12054            match value {
12055                "PEER_NETWORK_TYPE_UNSPECIFIED" => Self::Unspecified,
12056                "STANDARD" => Self::Standard,
12057                "VMWARE_ENGINE_NETWORK" => Self::VmwareEngineNetwork,
12058                "PRIVATE_SERVICES_ACCESS" => Self::PrivateServicesAccess,
12059                "NETAPP_CLOUD_VOLUMES" => Self::NetappCloudVolumes,
12060                "THIRD_PARTY_SERVICE" => Self::ThirdPartyService,
12061                "DELL_POWERSCALE" => Self::DellPowerscale,
12062                "GOOGLE_CLOUD_NETAPP_VOLUMES" => Self::GoogleCloudNetappVolumes,
12063                _ => Self::UnknownValue(peer_network_type::UnknownValue(
12064                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12065                )),
12066            }
12067        }
12068    }
12069
12070    impl serde::ser::Serialize for PeerNetworkType {
12071        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12072        where
12073            S: serde::Serializer,
12074        {
12075            match self {
12076                Self::Unspecified => serializer.serialize_i32(0),
12077                Self::Standard => serializer.serialize_i32(1),
12078                Self::VmwareEngineNetwork => serializer.serialize_i32(2),
12079                Self::PrivateServicesAccess => serializer.serialize_i32(3),
12080                Self::NetappCloudVolumes => serializer.serialize_i32(4),
12081                Self::ThirdPartyService => serializer.serialize_i32(5),
12082                Self::DellPowerscale => serializer.serialize_i32(6),
12083                Self::GoogleCloudNetappVolumes => serializer.serialize_i32(7),
12084                Self::UnknownValue(u) => u.0.serialize(serializer),
12085            }
12086        }
12087    }
12088
12089    impl<'de> serde::de::Deserialize<'de> for PeerNetworkType {
12090        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12091        where
12092            D: serde::Deserializer<'de>,
12093        {
12094            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PeerNetworkType>::new(
12095                ".google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType",
12096            ))
12097        }
12098    }
12099}
12100
12101/// Exchanged network peering route.
12102#[serde_with::serde_as]
12103#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12104#[serde(default, rename_all = "camelCase")]
12105#[non_exhaustive]
12106pub struct PeeringRoute {
12107    /// Output only. Destination range of the peering route in CIDR notation.
12108    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12109    pub dest_range: std::string::String,
12110
12111    /// Output only. Type of the route in the peer VPC network.
12112    #[serde(rename = "type")]
12113    pub r#type: crate::model::peering_route::Type,
12114
12115    /// Output only. Region containing the next hop of the peering route. This
12116    /// field only applies to dynamic routes in the peer VPC network.
12117    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12118    pub next_hop_region: std::string::String,
12119
12120    /// Output only. The priority of the peering route.
12121    #[serde(skip_serializing_if = "wkt::internal::is_default")]
12122    #[serde_as(as = "serde_with::DisplayFromStr")]
12123    pub priority: i64,
12124
12125    /// Output only. True if the peering route has been imported from a peered
12126    /// VPC network; false otherwise. The import happens if the field
12127    /// `NetworkPeering.importCustomRoutes` is true for this network,
12128    /// `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and
12129    /// the import does not result in a route conflict.
12130    #[serde(skip_serializing_if = "wkt::internal::is_default")]
12131    pub imported: bool,
12132
12133    /// Output only. Direction of the routes exchanged with the peer network, from
12134    /// the VMware Engine network perspective:
12135    ///
12136    /// * Routes of direction `INCOMING` are imported from the peer network.
12137    /// * Routes of direction `OUTGOING` are exported from the intranet VPC network
12138    ///   of the VMware Engine network.
12139    pub direction: crate::model::peering_route::Direction,
12140
12141    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12142    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12143}
12144
12145impl PeeringRoute {
12146    pub fn new() -> Self {
12147        std::default::Default::default()
12148    }
12149
12150    /// Sets the value of [dest_range][crate::model::PeeringRoute::dest_range].
12151    pub fn set_dest_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12152        self.dest_range = v.into();
12153        self
12154    }
12155
12156    /// Sets the value of [r#type][crate::model::PeeringRoute::type].
12157    pub fn set_type<T: std::convert::Into<crate::model::peering_route::Type>>(
12158        mut self,
12159        v: T,
12160    ) -> Self {
12161        self.r#type = v.into();
12162        self
12163    }
12164
12165    /// Sets the value of [next_hop_region][crate::model::PeeringRoute::next_hop_region].
12166    pub fn set_next_hop_region<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12167        self.next_hop_region = v.into();
12168        self
12169    }
12170
12171    /// Sets the value of [priority][crate::model::PeeringRoute::priority].
12172    pub fn set_priority<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
12173        self.priority = v.into();
12174        self
12175    }
12176
12177    /// Sets the value of [imported][crate::model::PeeringRoute::imported].
12178    pub fn set_imported<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12179        self.imported = v.into();
12180        self
12181    }
12182
12183    /// Sets the value of [direction][crate::model::PeeringRoute::direction].
12184    pub fn set_direction<T: std::convert::Into<crate::model::peering_route::Direction>>(
12185        mut self,
12186        v: T,
12187    ) -> Self {
12188        self.direction = v.into();
12189        self
12190    }
12191}
12192
12193impl wkt::message::Message for PeeringRoute {
12194    fn typename() -> &'static str {
12195        "type.googleapis.com/google.cloud.vmwareengine.v1.PeeringRoute"
12196    }
12197}
12198
12199/// Defines additional types related to [PeeringRoute].
12200pub mod peering_route {
12201    #[allow(unused_imports)]
12202    use super::*;
12203
12204    /// The type of the peering route.
12205    ///
12206    /// # Working with unknown values
12207    ///
12208    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12209    /// additional enum variants at any time. Adding new variants is not considered
12210    /// a breaking change. Applications should write their code in anticipation of:
12211    ///
12212    /// - New values appearing in future releases of the client library, **and**
12213    /// - New values received dynamically, without application changes.
12214    ///
12215    /// Please consult the [Working with enums] section in the user guide for some
12216    /// guidelines.
12217    ///
12218    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12219    #[derive(Clone, Debug, PartialEq)]
12220    #[non_exhaustive]
12221    pub enum Type {
12222        /// Unspecified peering route type. This is the default value.
12223        Unspecified,
12224        /// Dynamic routes in the peer network.
12225        DynamicPeeringRoute,
12226        /// Static routes in the peer network.
12227        StaticPeeringRoute,
12228        /// Created, updated, and removed automatically by Google Cloud when subnets
12229        /// are created, modified, or deleted in the peer network.
12230        SubnetPeeringRoute,
12231        /// If set, the enum was initialized with an unknown value.
12232        ///
12233        /// Applications can examine the value using [Type::value] or
12234        /// [Type::name].
12235        UnknownValue(r#type::UnknownValue),
12236    }
12237
12238    #[doc(hidden)]
12239    pub mod r#type {
12240        #[allow(unused_imports)]
12241        use super::*;
12242        #[derive(Clone, Debug, PartialEq)]
12243        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12244    }
12245
12246    impl Type {
12247        /// Gets the enum value.
12248        ///
12249        /// Returns `None` if the enum contains an unknown value deserialized from
12250        /// the string representation of enums.
12251        pub fn value(&self) -> std::option::Option<i32> {
12252            match self {
12253                Self::Unspecified => std::option::Option::Some(0),
12254                Self::DynamicPeeringRoute => std::option::Option::Some(1),
12255                Self::StaticPeeringRoute => std::option::Option::Some(2),
12256                Self::SubnetPeeringRoute => std::option::Option::Some(3),
12257                Self::UnknownValue(u) => u.0.value(),
12258            }
12259        }
12260
12261        /// Gets the enum value as a string.
12262        ///
12263        /// Returns `None` if the enum contains an unknown value deserialized from
12264        /// the integer representation of enums.
12265        pub fn name(&self) -> std::option::Option<&str> {
12266            match self {
12267                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
12268                Self::DynamicPeeringRoute => std::option::Option::Some("DYNAMIC_PEERING_ROUTE"),
12269                Self::StaticPeeringRoute => std::option::Option::Some("STATIC_PEERING_ROUTE"),
12270                Self::SubnetPeeringRoute => std::option::Option::Some("SUBNET_PEERING_ROUTE"),
12271                Self::UnknownValue(u) => u.0.name(),
12272            }
12273        }
12274    }
12275
12276    impl std::default::Default for Type {
12277        fn default() -> Self {
12278            use std::convert::From;
12279            Self::from(0)
12280        }
12281    }
12282
12283    impl std::fmt::Display for Type {
12284        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12285            wkt::internal::display_enum(f, self.name(), self.value())
12286        }
12287    }
12288
12289    impl std::convert::From<i32> for Type {
12290        fn from(value: i32) -> Self {
12291            match value {
12292                0 => Self::Unspecified,
12293                1 => Self::DynamicPeeringRoute,
12294                2 => Self::StaticPeeringRoute,
12295                3 => Self::SubnetPeeringRoute,
12296                _ => Self::UnknownValue(r#type::UnknownValue(
12297                    wkt::internal::UnknownEnumValue::Integer(value),
12298                )),
12299            }
12300        }
12301    }
12302
12303    impl std::convert::From<&str> for Type {
12304        fn from(value: &str) -> Self {
12305            use std::string::ToString;
12306            match value {
12307                "TYPE_UNSPECIFIED" => Self::Unspecified,
12308                "DYNAMIC_PEERING_ROUTE" => Self::DynamicPeeringRoute,
12309                "STATIC_PEERING_ROUTE" => Self::StaticPeeringRoute,
12310                "SUBNET_PEERING_ROUTE" => Self::SubnetPeeringRoute,
12311                _ => Self::UnknownValue(r#type::UnknownValue(
12312                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12313                )),
12314            }
12315        }
12316    }
12317
12318    impl serde::ser::Serialize for Type {
12319        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12320        where
12321            S: serde::Serializer,
12322        {
12323            match self {
12324                Self::Unspecified => serializer.serialize_i32(0),
12325                Self::DynamicPeeringRoute => serializer.serialize_i32(1),
12326                Self::StaticPeeringRoute => serializer.serialize_i32(2),
12327                Self::SubnetPeeringRoute => serializer.serialize_i32(3),
12328                Self::UnknownValue(u) => u.0.serialize(serializer),
12329            }
12330        }
12331    }
12332
12333    impl<'de> serde::de::Deserialize<'de> for Type {
12334        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12335        where
12336            D: serde::Deserializer<'de>,
12337        {
12338            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
12339                ".google.cloud.vmwareengine.v1.PeeringRoute.Type",
12340            ))
12341        }
12342    }
12343
12344    /// The direction of the exchanged routes.
12345    ///
12346    /// # Working with unknown values
12347    ///
12348    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12349    /// additional enum variants at any time. Adding new variants is not considered
12350    /// a breaking change. Applications should write their code in anticipation of:
12351    ///
12352    /// - New values appearing in future releases of the client library, **and**
12353    /// - New values received dynamically, without application changes.
12354    ///
12355    /// Please consult the [Working with enums] section in the user guide for some
12356    /// guidelines.
12357    ///
12358    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12359    #[derive(Clone, Debug, PartialEq)]
12360    #[non_exhaustive]
12361    pub enum Direction {
12362        /// Unspecified exchanged routes direction. This is default.
12363        Unspecified,
12364        /// Routes imported from the peer network.
12365        Incoming,
12366        /// Routes exported to the peer network.
12367        Outgoing,
12368        /// If set, the enum was initialized with an unknown value.
12369        ///
12370        /// Applications can examine the value using [Direction::value] or
12371        /// [Direction::name].
12372        UnknownValue(direction::UnknownValue),
12373    }
12374
12375    #[doc(hidden)]
12376    pub mod direction {
12377        #[allow(unused_imports)]
12378        use super::*;
12379        #[derive(Clone, Debug, PartialEq)]
12380        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12381    }
12382
12383    impl Direction {
12384        /// Gets the enum value.
12385        ///
12386        /// Returns `None` if the enum contains an unknown value deserialized from
12387        /// the string representation of enums.
12388        pub fn value(&self) -> std::option::Option<i32> {
12389            match self {
12390                Self::Unspecified => std::option::Option::Some(0),
12391                Self::Incoming => std::option::Option::Some(1),
12392                Self::Outgoing => std::option::Option::Some(2),
12393                Self::UnknownValue(u) => u.0.value(),
12394            }
12395        }
12396
12397        /// Gets the enum value as a string.
12398        ///
12399        /// Returns `None` if the enum contains an unknown value deserialized from
12400        /// the integer representation of enums.
12401        pub fn name(&self) -> std::option::Option<&str> {
12402            match self {
12403                Self::Unspecified => std::option::Option::Some("DIRECTION_UNSPECIFIED"),
12404                Self::Incoming => std::option::Option::Some("INCOMING"),
12405                Self::Outgoing => std::option::Option::Some("OUTGOING"),
12406                Self::UnknownValue(u) => u.0.name(),
12407            }
12408        }
12409    }
12410
12411    impl std::default::Default for Direction {
12412        fn default() -> Self {
12413            use std::convert::From;
12414            Self::from(0)
12415        }
12416    }
12417
12418    impl std::fmt::Display for Direction {
12419        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12420            wkt::internal::display_enum(f, self.name(), self.value())
12421        }
12422    }
12423
12424    impl std::convert::From<i32> for Direction {
12425        fn from(value: i32) -> Self {
12426            match value {
12427                0 => Self::Unspecified,
12428                1 => Self::Incoming,
12429                2 => Self::Outgoing,
12430                _ => Self::UnknownValue(direction::UnknownValue(
12431                    wkt::internal::UnknownEnumValue::Integer(value),
12432                )),
12433            }
12434        }
12435    }
12436
12437    impl std::convert::From<&str> for Direction {
12438        fn from(value: &str) -> Self {
12439            use std::string::ToString;
12440            match value {
12441                "DIRECTION_UNSPECIFIED" => Self::Unspecified,
12442                "INCOMING" => Self::Incoming,
12443                "OUTGOING" => Self::Outgoing,
12444                _ => Self::UnknownValue(direction::UnknownValue(
12445                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12446                )),
12447            }
12448        }
12449    }
12450
12451    impl serde::ser::Serialize for Direction {
12452        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12453        where
12454            S: serde::Serializer,
12455        {
12456            match self {
12457                Self::Unspecified => serializer.serialize_i32(0),
12458                Self::Incoming => serializer.serialize_i32(1),
12459                Self::Outgoing => serializer.serialize_i32(2),
12460                Self::UnknownValue(u) => u.0.serialize(serializer),
12461            }
12462        }
12463    }
12464
12465    impl<'de> serde::de::Deserialize<'de> for Direction {
12466        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12467        where
12468            D: serde::Deserializer<'de>,
12469        {
12470            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Direction>::new(
12471                ".google.cloud.vmwareengine.v1.PeeringRoute.Direction",
12472            ))
12473        }
12474    }
12475}
12476
12477/// Represents a network policy resource. Network policies are regional
12478/// resources. You can use a network policy to enable or disable internet access
12479/// and external IP access. Network policies are associated with a VMware Engine
12480/// network, which might span across regions. For a given region, a network
12481/// policy applies to all private clouds in the VMware Engine network associated
12482/// with the policy.
12483#[serde_with::serde_as]
12484#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12485#[serde(default, rename_all = "camelCase")]
12486#[non_exhaustive]
12487pub struct NetworkPolicy {
12488    /// Output only. The resource name of this network policy.
12489    /// Resource names are schemeless URIs that follow the conventions in
12490    /// <https://cloud.google.com/apis/design/resource_names>.
12491    /// For example:
12492    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
12493    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12494    pub name: std::string::String,
12495
12496    /// Output only. Creation time of this resource.
12497    #[serde(skip_serializing_if = "std::option::Option::is_none")]
12498    pub create_time: std::option::Option<wkt::Timestamp>,
12499
12500    /// Output only. Last update time of this resource.
12501    #[serde(skip_serializing_if = "std::option::Option::is_none")]
12502    pub update_time: std::option::Option<wkt::Timestamp>,
12503
12504    /// Network service that allows VMware workloads to access the internet.
12505    #[serde(skip_serializing_if = "std::option::Option::is_none")]
12506    pub internet_access: std::option::Option<crate::model::network_policy::NetworkService>,
12507
12508    /// Network service that allows External IP addresses to be assigned to VMware
12509    /// workloads. This service can only be enabled when `internet_access` is also
12510    /// enabled.
12511    #[serde(skip_serializing_if = "std::option::Option::is_none")]
12512    pub external_ip: std::option::Option<crate::model::network_policy::NetworkService>,
12513
12514    /// Required. IP address range in CIDR notation used to create internet access
12515    /// and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is
12516    /// required. The range cannot overlap with any prefixes either in the consumer
12517    /// VPC network or in use by the private clouds attached to that VPC network.
12518    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12519    pub edge_services_cidr: std::string::String,
12520
12521    /// Output only. System-generated unique identifier for the resource.
12522    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12523    pub uid: std::string::String,
12524
12525    /// Optional. The relative resource name of the VMware Engine network.
12526    /// Specify the name in the following form:
12527    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
12528    /// where `{project}` can either be a project number or a project ID.
12529    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12530    pub vmware_engine_network: std::string::String,
12531
12532    /// Optional. User-provided description for this network policy.
12533    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12534    pub description: std::string::String,
12535
12536    /// Output only. The canonical name of the VMware Engine network in the form:
12537    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
12538    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12539    pub vmware_engine_network_canonical: std::string::String,
12540
12541    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12542    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12543}
12544
12545impl NetworkPolicy {
12546    pub fn new() -> Self {
12547        std::default::Default::default()
12548    }
12549
12550    /// Sets the value of [name][crate::model::NetworkPolicy::name].
12551    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12552        self.name = v.into();
12553        self
12554    }
12555
12556    /// Sets the value of [create_time][crate::model::NetworkPolicy::create_time].
12557    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
12558        mut self,
12559        v: T,
12560    ) -> Self {
12561        self.create_time = v.into();
12562        self
12563    }
12564
12565    /// Sets the value of [update_time][crate::model::NetworkPolicy::update_time].
12566    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
12567        mut self,
12568        v: T,
12569    ) -> Self {
12570        self.update_time = v.into();
12571        self
12572    }
12573
12574    /// Sets the value of [internet_access][crate::model::NetworkPolicy::internet_access].
12575    pub fn set_internet_access<
12576        T: std::convert::Into<std::option::Option<crate::model::network_policy::NetworkService>>,
12577    >(
12578        mut self,
12579        v: T,
12580    ) -> Self {
12581        self.internet_access = v.into();
12582        self
12583    }
12584
12585    /// Sets the value of [external_ip][crate::model::NetworkPolicy::external_ip].
12586    pub fn set_external_ip<
12587        T: std::convert::Into<std::option::Option<crate::model::network_policy::NetworkService>>,
12588    >(
12589        mut self,
12590        v: T,
12591    ) -> Self {
12592        self.external_ip = v.into();
12593        self
12594    }
12595
12596    /// Sets the value of [edge_services_cidr][crate::model::NetworkPolicy::edge_services_cidr].
12597    pub fn set_edge_services_cidr<T: std::convert::Into<std::string::String>>(
12598        mut self,
12599        v: T,
12600    ) -> Self {
12601        self.edge_services_cidr = v.into();
12602        self
12603    }
12604
12605    /// Sets the value of [uid][crate::model::NetworkPolicy::uid].
12606    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12607        self.uid = v.into();
12608        self
12609    }
12610
12611    /// Sets the value of [vmware_engine_network][crate::model::NetworkPolicy::vmware_engine_network].
12612    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
12613        mut self,
12614        v: T,
12615    ) -> Self {
12616        self.vmware_engine_network = v.into();
12617        self
12618    }
12619
12620    /// Sets the value of [description][crate::model::NetworkPolicy::description].
12621    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12622        self.description = v.into();
12623        self
12624    }
12625
12626    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkPolicy::vmware_engine_network_canonical].
12627    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
12628        mut self,
12629        v: T,
12630    ) -> Self {
12631        self.vmware_engine_network_canonical = v.into();
12632        self
12633    }
12634}
12635
12636impl wkt::message::Message for NetworkPolicy {
12637    fn typename() -> &'static str {
12638        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy"
12639    }
12640}
12641
12642/// Defines additional types related to [NetworkPolicy].
12643pub mod network_policy {
12644    #[allow(unused_imports)]
12645    use super::*;
12646
12647    /// Represents a network service that is managed by a `NetworkPolicy` resource.
12648    /// A network service provides a way to control an aspect of external access to
12649    /// VMware workloads. For example, whether the VMware workloads in the
12650    /// private clouds governed by a network policy can access or be accessed from
12651    /// the internet.
12652    #[serde_with::serde_as]
12653    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12654    #[serde(default, rename_all = "camelCase")]
12655    #[non_exhaustive]
12656    pub struct NetworkService {
12657        /// True if the service is enabled; false otherwise.
12658        #[serde(skip_serializing_if = "wkt::internal::is_default")]
12659        pub enabled: bool,
12660
12661        /// Output only. State of the service. New values may be added to this enum
12662        /// when appropriate.
12663        pub state: crate::model::network_policy::network_service::State,
12664
12665        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12666        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12667    }
12668
12669    impl NetworkService {
12670        pub fn new() -> Self {
12671            std::default::Default::default()
12672        }
12673
12674        /// Sets the value of [enabled][crate::model::network_policy::NetworkService::enabled].
12675        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12676            self.enabled = v.into();
12677            self
12678        }
12679
12680        /// Sets the value of [state][crate::model::network_policy::NetworkService::state].
12681        pub fn set_state<
12682            T: std::convert::Into<crate::model::network_policy::network_service::State>,
12683        >(
12684            mut self,
12685            v: T,
12686        ) -> Self {
12687            self.state = v.into();
12688            self
12689        }
12690    }
12691
12692    impl wkt::message::Message for NetworkService {
12693        fn typename() -> &'static str {
12694            "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService"
12695        }
12696    }
12697
12698    /// Defines additional types related to [NetworkService].
12699    pub mod network_service {
12700        #[allow(unused_imports)]
12701        use super::*;
12702
12703        /// Enum State defines possible states of a network policy controlled
12704        /// service.
12705        ///
12706        /// # Working with unknown values
12707        ///
12708        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12709        /// additional enum variants at any time. Adding new variants is not considered
12710        /// a breaking change. Applications should write their code in anticipation of:
12711        ///
12712        /// - New values appearing in future releases of the client library, **and**
12713        /// - New values received dynamically, without application changes.
12714        ///
12715        /// Please consult the [Working with enums] section in the user guide for some
12716        /// guidelines.
12717        ///
12718        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12719        #[derive(Clone, Debug, PartialEq)]
12720        #[non_exhaustive]
12721        pub enum State {
12722            /// Unspecified service state. This is the default value.
12723            Unspecified,
12724            /// Service is not provisioned.
12725            Unprovisioned,
12726            /// Service is in the process of being provisioned/deprovisioned.
12727            Reconciling,
12728            /// Service is active.
12729            Active,
12730            /// If set, the enum was initialized with an unknown value.
12731            ///
12732            /// Applications can examine the value using [State::value] or
12733            /// [State::name].
12734            UnknownValue(state::UnknownValue),
12735        }
12736
12737        #[doc(hidden)]
12738        pub mod state {
12739            #[allow(unused_imports)]
12740            use super::*;
12741            #[derive(Clone, Debug, PartialEq)]
12742            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12743        }
12744
12745        impl State {
12746            /// Gets the enum value.
12747            ///
12748            /// Returns `None` if the enum contains an unknown value deserialized from
12749            /// the string representation of enums.
12750            pub fn value(&self) -> std::option::Option<i32> {
12751                match self {
12752                    Self::Unspecified => std::option::Option::Some(0),
12753                    Self::Unprovisioned => std::option::Option::Some(1),
12754                    Self::Reconciling => std::option::Option::Some(2),
12755                    Self::Active => std::option::Option::Some(3),
12756                    Self::UnknownValue(u) => u.0.value(),
12757                }
12758            }
12759
12760            /// Gets the enum value as a string.
12761            ///
12762            /// Returns `None` if the enum contains an unknown value deserialized from
12763            /// the integer representation of enums.
12764            pub fn name(&self) -> std::option::Option<&str> {
12765                match self {
12766                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
12767                    Self::Unprovisioned => std::option::Option::Some("UNPROVISIONED"),
12768                    Self::Reconciling => std::option::Option::Some("RECONCILING"),
12769                    Self::Active => std::option::Option::Some("ACTIVE"),
12770                    Self::UnknownValue(u) => u.0.name(),
12771                }
12772            }
12773        }
12774
12775        impl std::default::Default for State {
12776            fn default() -> Self {
12777                use std::convert::From;
12778                Self::from(0)
12779            }
12780        }
12781
12782        impl std::fmt::Display for State {
12783            fn fmt(
12784                &self,
12785                f: &mut std::fmt::Formatter<'_>,
12786            ) -> std::result::Result<(), std::fmt::Error> {
12787                wkt::internal::display_enum(f, self.name(), self.value())
12788            }
12789        }
12790
12791        impl std::convert::From<i32> for State {
12792            fn from(value: i32) -> Self {
12793                match value {
12794                    0 => Self::Unspecified,
12795                    1 => Self::Unprovisioned,
12796                    2 => Self::Reconciling,
12797                    3 => Self::Active,
12798                    _ => Self::UnknownValue(state::UnknownValue(
12799                        wkt::internal::UnknownEnumValue::Integer(value),
12800                    )),
12801                }
12802            }
12803        }
12804
12805        impl std::convert::From<&str> for State {
12806            fn from(value: &str) -> Self {
12807                use std::string::ToString;
12808                match value {
12809                    "STATE_UNSPECIFIED" => Self::Unspecified,
12810                    "UNPROVISIONED" => Self::Unprovisioned,
12811                    "RECONCILING" => Self::Reconciling,
12812                    "ACTIVE" => Self::Active,
12813                    _ => Self::UnknownValue(state::UnknownValue(
12814                        wkt::internal::UnknownEnumValue::String(value.to_string()),
12815                    )),
12816                }
12817            }
12818        }
12819
12820        impl serde::ser::Serialize for State {
12821            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12822            where
12823                S: serde::Serializer,
12824            {
12825                match self {
12826                    Self::Unspecified => serializer.serialize_i32(0),
12827                    Self::Unprovisioned => serializer.serialize_i32(1),
12828                    Self::Reconciling => serializer.serialize_i32(2),
12829                    Self::Active => serializer.serialize_i32(3),
12830                    Self::UnknownValue(u) => u.0.serialize(serializer),
12831                }
12832            }
12833        }
12834
12835        impl<'de> serde::de::Deserialize<'de> for State {
12836            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12837            where
12838                D: serde::Deserializer<'de>,
12839            {
12840                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
12841                    ".google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State",
12842                ))
12843            }
12844        }
12845    }
12846}
12847
12848/// Represents a binding between a network and the management DNS zone.
12849/// A management DNS zone is the Cloud DNS cross-project binding zone that
12850/// VMware Engine creates for each private cloud. It contains FQDNs and
12851/// corresponding IP addresses for the private cloud's ESXi hosts and management
12852/// VM appliances like vCenter and NSX Manager.
12853#[serde_with::serde_as]
12854#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12855#[serde(default, rename_all = "camelCase")]
12856#[non_exhaustive]
12857pub struct ManagementDnsZoneBinding {
12858    /// Output only. The resource name of this binding.
12859    /// Resource names are schemeless URIs that follow the conventions in
12860    /// <https://cloud.google.com/apis/design/resource_names>.
12861    /// For example:
12862    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
12863    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12864    pub name: std::string::String,
12865
12866    /// Output only. Creation time of this resource.
12867    #[serde(skip_serializing_if = "std::option::Option::is_none")]
12868    pub create_time: std::option::Option<wkt::Timestamp>,
12869
12870    /// Output only. Last update time of this resource.
12871    #[serde(skip_serializing_if = "std::option::Option::is_none")]
12872    pub update_time: std::option::Option<wkt::Timestamp>,
12873
12874    /// Output only. The state of the resource.
12875    pub state: crate::model::management_dns_zone_binding::State,
12876
12877    /// User-provided description for this resource.
12878    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12879    pub description: std::string::String,
12880
12881    /// Output only. System-generated unique identifier for the resource.
12882    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12883    pub uid: std::string::String,
12884
12885    /// Required. The relative resource name of the network to bind to the
12886    /// management DNS zone. This network can be a consumer VPC network or a
12887    /// VMware engine network.
12888    #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
12889    pub bind_network: std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
12890
12891    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12892    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12893}
12894
12895impl ManagementDnsZoneBinding {
12896    pub fn new() -> Self {
12897        std::default::Default::default()
12898    }
12899
12900    /// Sets the value of [name][crate::model::ManagementDnsZoneBinding::name].
12901    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12902        self.name = v.into();
12903        self
12904    }
12905
12906    /// Sets the value of [create_time][crate::model::ManagementDnsZoneBinding::create_time].
12907    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
12908        mut self,
12909        v: T,
12910    ) -> Self {
12911        self.create_time = v.into();
12912        self
12913    }
12914
12915    /// Sets the value of [update_time][crate::model::ManagementDnsZoneBinding::update_time].
12916    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
12917        mut self,
12918        v: T,
12919    ) -> Self {
12920        self.update_time = v.into();
12921        self
12922    }
12923
12924    /// Sets the value of [state][crate::model::ManagementDnsZoneBinding::state].
12925    pub fn set_state<T: std::convert::Into<crate::model::management_dns_zone_binding::State>>(
12926        mut self,
12927        v: T,
12928    ) -> Self {
12929        self.state = v.into();
12930        self
12931    }
12932
12933    /// Sets the value of [description][crate::model::ManagementDnsZoneBinding::description].
12934    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12935        self.description = v.into();
12936        self
12937    }
12938
12939    /// Sets the value of [uid][crate::model::ManagementDnsZoneBinding::uid].
12940    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12941        self.uid = v.into();
12942        self
12943    }
12944
12945    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network].
12946    ///
12947    /// Note that all the setters affecting `bind_network` are mutually
12948    /// exclusive.
12949    pub fn set_bind_network<
12950        T: std::convert::Into<
12951                std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
12952            >,
12953    >(
12954        mut self,
12955        v: T,
12956    ) -> Self {
12957        self.bind_network = v.into();
12958        self
12959    }
12960
12961    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
12962    /// if it holds a `VpcNetwork`, `None` if the field is not set or
12963    /// holds a different branch.
12964    pub fn vpc_network(&self) -> std::option::Option<&std::string::String> {
12965        #[allow(unreachable_patterns)]
12966        self.bind_network.as_ref().and_then(|v| match v {
12967            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v) => {
12968                std::option::Option::Some(v)
12969            }
12970            _ => std::option::Option::None,
12971        })
12972    }
12973
12974    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
12975    /// to hold a `VpcNetwork`.
12976    ///
12977    /// Note that all the setters affecting `bind_network` are
12978    /// mutually exclusive.
12979    pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12980        self.bind_network = std::option::Option::Some(
12981            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v.into()),
12982        );
12983        self
12984    }
12985
12986    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
12987    /// if it holds a `VmwareEngineNetwork`, `None` if the field is not set or
12988    /// holds a different branch.
12989    pub fn vmware_engine_network(&self) -> std::option::Option<&std::string::String> {
12990        #[allow(unreachable_patterns)]
12991        self.bind_network.as_ref().and_then(|v| match v {
12992            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v) => {
12993                std::option::Option::Some(v)
12994            }
12995            _ => std::option::Option::None,
12996        })
12997    }
12998
12999    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
13000    /// to hold a `VmwareEngineNetwork`.
13001    ///
13002    /// Note that all the setters affecting `bind_network` are
13003    /// mutually exclusive.
13004    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
13005        mut self,
13006        v: T,
13007    ) -> Self {
13008        self.bind_network = std::option::Option::Some(
13009            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v.into()),
13010        );
13011        self
13012    }
13013}
13014
13015impl wkt::message::Message for ManagementDnsZoneBinding {
13016    fn typename() -> &'static str {
13017        "type.googleapis.com/google.cloud.vmwareengine.v1.ManagementDnsZoneBinding"
13018    }
13019}
13020
13021/// Defines additional types related to [ManagementDnsZoneBinding].
13022pub mod management_dns_zone_binding {
13023    #[allow(unused_imports)]
13024    use super::*;
13025
13026    /// Enum State defines possible states of binding between the consumer VPC
13027    /// network and the management DNS zone.
13028    ///
13029    /// # Working with unknown values
13030    ///
13031    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13032    /// additional enum variants at any time. Adding new variants is not considered
13033    /// a breaking change. Applications should write their code in anticipation of:
13034    ///
13035    /// - New values appearing in future releases of the client library, **and**
13036    /// - New values received dynamically, without application changes.
13037    ///
13038    /// Please consult the [Working with enums] section in the user guide for some
13039    /// guidelines.
13040    ///
13041    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13042    #[derive(Clone, Debug, PartialEq)]
13043    #[non_exhaustive]
13044    pub enum State {
13045        /// The default value. This value should never be used.
13046        Unspecified,
13047        /// The binding is ready.
13048        Active,
13049        /// The binding is being created.
13050        Creating,
13051        /// The binding is being updated.
13052        Updating,
13053        /// The binding is being deleted.
13054        Deleting,
13055        /// The binding has failed.
13056        Failed,
13057        /// If set, the enum was initialized with an unknown value.
13058        ///
13059        /// Applications can examine the value using [State::value] or
13060        /// [State::name].
13061        UnknownValue(state::UnknownValue),
13062    }
13063
13064    #[doc(hidden)]
13065    pub mod state {
13066        #[allow(unused_imports)]
13067        use super::*;
13068        #[derive(Clone, Debug, PartialEq)]
13069        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13070    }
13071
13072    impl State {
13073        /// Gets the enum value.
13074        ///
13075        /// Returns `None` if the enum contains an unknown value deserialized from
13076        /// the string representation of enums.
13077        pub fn value(&self) -> std::option::Option<i32> {
13078            match self {
13079                Self::Unspecified => std::option::Option::Some(0),
13080                Self::Active => std::option::Option::Some(1),
13081                Self::Creating => std::option::Option::Some(2),
13082                Self::Updating => std::option::Option::Some(3),
13083                Self::Deleting => std::option::Option::Some(4),
13084                Self::Failed => std::option::Option::Some(5),
13085                Self::UnknownValue(u) => u.0.value(),
13086            }
13087        }
13088
13089        /// Gets the enum value as a string.
13090        ///
13091        /// Returns `None` if the enum contains an unknown value deserialized from
13092        /// the integer representation of enums.
13093        pub fn name(&self) -> std::option::Option<&str> {
13094            match self {
13095                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13096                Self::Active => std::option::Option::Some("ACTIVE"),
13097                Self::Creating => std::option::Option::Some("CREATING"),
13098                Self::Updating => std::option::Option::Some("UPDATING"),
13099                Self::Deleting => std::option::Option::Some("DELETING"),
13100                Self::Failed => std::option::Option::Some("FAILED"),
13101                Self::UnknownValue(u) => u.0.name(),
13102            }
13103        }
13104    }
13105
13106    impl std::default::Default for State {
13107        fn default() -> Self {
13108            use std::convert::From;
13109            Self::from(0)
13110        }
13111    }
13112
13113    impl std::fmt::Display for State {
13114        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13115            wkt::internal::display_enum(f, self.name(), self.value())
13116        }
13117    }
13118
13119    impl std::convert::From<i32> for State {
13120        fn from(value: i32) -> Self {
13121            match value {
13122                0 => Self::Unspecified,
13123                1 => Self::Active,
13124                2 => Self::Creating,
13125                3 => Self::Updating,
13126                4 => Self::Deleting,
13127                5 => Self::Failed,
13128                _ => Self::UnknownValue(state::UnknownValue(
13129                    wkt::internal::UnknownEnumValue::Integer(value),
13130                )),
13131            }
13132        }
13133    }
13134
13135    impl std::convert::From<&str> for State {
13136        fn from(value: &str) -> Self {
13137            use std::string::ToString;
13138            match value {
13139                "STATE_UNSPECIFIED" => Self::Unspecified,
13140                "ACTIVE" => Self::Active,
13141                "CREATING" => Self::Creating,
13142                "UPDATING" => Self::Updating,
13143                "DELETING" => Self::Deleting,
13144                "FAILED" => Self::Failed,
13145                _ => Self::UnknownValue(state::UnknownValue(
13146                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13147                )),
13148            }
13149        }
13150    }
13151
13152    impl serde::ser::Serialize for State {
13153        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13154        where
13155            S: serde::Serializer,
13156        {
13157            match self {
13158                Self::Unspecified => serializer.serialize_i32(0),
13159                Self::Active => serializer.serialize_i32(1),
13160                Self::Creating => serializer.serialize_i32(2),
13161                Self::Updating => serializer.serialize_i32(3),
13162                Self::Deleting => serializer.serialize_i32(4),
13163                Self::Failed => serializer.serialize_i32(5),
13164                Self::UnknownValue(u) => u.0.serialize(serializer),
13165            }
13166        }
13167    }
13168
13169    impl<'de> serde::de::Deserialize<'de> for State {
13170        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13171        where
13172            D: serde::Deserializer<'de>,
13173        {
13174            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13175                ".google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State",
13176            ))
13177        }
13178    }
13179
13180    /// Required. The relative resource name of the network to bind to the
13181    /// management DNS zone. This network can be a consumer VPC network or a
13182    /// VMware engine network.
13183    #[serde_with::serde_as]
13184    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
13185    #[serde(rename_all = "camelCase")]
13186    #[non_exhaustive]
13187    pub enum BindNetwork {
13188        /// Network to bind is a standard consumer VPC.
13189        /// Specify the name in the following form for consumer
13190        /// VPC network: `projects/{project}/global/networks/{network_id}`.
13191        /// `{project}` can either be a project number or a project ID.
13192        VpcNetwork(std::string::String),
13193        /// Network to bind is a VMware Engine network.
13194        /// Specify the name in the following form for VMware engine network:
13195        /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
13196        /// `{project}` can either be a project number or a project ID.
13197        VmwareEngineNetwork(std::string::String),
13198    }
13199}
13200
13201/// VMware Engine network resource that provides connectivity for VMware Engine
13202/// private clouds.
13203#[serde_with::serde_as]
13204#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13205#[serde(default, rename_all = "camelCase")]
13206#[non_exhaustive]
13207pub struct VmwareEngineNetwork {
13208    /// Output only. The resource name of the VMware Engine network.
13209    /// Resource names are schemeless URIs that follow the conventions in
13210    /// <https://cloud.google.com/apis/design/resource_names>.
13211    /// For example:
13212    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
13213    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13214    pub name: std::string::String,
13215
13216    /// Output only. Creation time of this resource.
13217    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13218    pub create_time: std::option::Option<wkt::Timestamp>,
13219
13220    /// Output only. Last update time of this resource.
13221    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13222    pub update_time: std::option::Option<wkt::Timestamp>,
13223
13224    /// User-provided description for this VMware Engine network.
13225    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13226    pub description: std::string::String,
13227
13228    /// Output only. VMware Engine service VPC networks that provide connectivity
13229    /// from a private cloud to customer projects, the internet, and other Google
13230    /// Cloud services.
13231    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
13232    pub vpc_networks: std::vec::Vec<crate::model::vmware_engine_network::VpcNetwork>,
13233
13234    /// Output only. State of the VMware Engine network.
13235    pub state: crate::model::vmware_engine_network::State,
13236
13237    /// Required. VMware Engine network type.
13238    #[serde(rename = "type")]
13239    pub r#type: crate::model::vmware_engine_network::Type,
13240
13241    /// Output only. System-generated unique identifier for the resource.
13242    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13243    pub uid: std::string::String,
13244
13245    /// Checksum that may be sent on update and delete requests to ensure that the
13246    /// user-provided value is up to date before the server processes a request.
13247    /// The server computes checksums based on the value of other fields in the
13248    /// request.
13249    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13250    pub etag: std::string::String,
13251
13252    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13253    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13254}
13255
13256impl VmwareEngineNetwork {
13257    pub fn new() -> Self {
13258        std::default::Default::default()
13259    }
13260
13261    /// Sets the value of [name][crate::model::VmwareEngineNetwork::name].
13262    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13263        self.name = v.into();
13264        self
13265    }
13266
13267    /// Sets the value of [create_time][crate::model::VmwareEngineNetwork::create_time].
13268    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
13269        mut self,
13270        v: T,
13271    ) -> Self {
13272        self.create_time = v.into();
13273        self
13274    }
13275
13276    /// Sets the value of [update_time][crate::model::VmwareEngineNetwork::update_time].
13277    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
13278        mut self,
13279        v: T,
13280    ) -> Self {
13281        self.update_time = v.into();
13282        self
13283    }
13284
13285    /// Sets the value of [description][crate::model::VmwareEngineNetwork::description].
13286    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13287        self.description = v.into();
13288        self
13289    }
13290
13291    /// Sets the value of [vpc_networks][crate::model::VmwareEngineNetwork::vpc_networks].
13292    pub fn set_vpc_networks<T, V>(mut self, v: T) -> Self
13293    where
13294        T: std::iter::IntoIterator<Item = V>,
13295        V: std::convert::Into<crate::model::vmware_engine_network::VpcNetwork>,
13296    {
13297        use std::iter::Iterator;
13298        self.vpc_networks = v.into_iter().map(|i| i.into()).collect();
13299        self
13300    }
13301
13302    /// Sets the value of [state][crate::model::VmwareEngineNetwork::state].
13303    pub fn set_state<T: std::convert::Into<crate::model::vmware_engine_network::State>>(
13304        mut self,
13305        v: T,
13306    ) -> Self {
13307        self.state = v.into();
13308        self
13309    }
13310
13311    /// Sets the value of [r#type][crate::model::VmwareEngineNetwork::type].
13312    pub fn set_type<T: std::convert::Into<crate::model::vmware_engine_network::Type>>(
13313        mut self,
13314        v: T,
13315    ) -> Self {
13316        self.r#type = v.into();
13317        self
13318    }
13319
13320    /// Sets the value of [uid][crate::model::VmwareEngineNetwork::uid].
13321    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13322        self.uid = v.into();
13323        self
13324    }
13325
13326    /// Sets the value of [etag][crate::model::VmwareEngineNetwork::etag].
13327    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13328        self.etag = v.into();
13329        self
13330    }
13331}
13332
13333impl wkt::message::Message for VmwareEngineNetwork {
13334    fn typename() -> &'static str {
13335        "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork"
13336    }
13337}
13338
13339/// Defines additional types related to [VmwareEngineNetwork].
13340pub mod vmware_engine_network {
13341    #[allow(unused_imports)]
13342    use super::*;
13343
13344    /// Represents a VMware Engine VPC network that is managed by a
13345    /// VMware Engine network resource.
13346    #[serde_with::serde_as]
13347    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13348    #[serde(default, rename_all = "camelCase")]
13349    #[non_exhaustive]
13350    pub struct VpcNetwork {
13351        /// Output only. Type of VPC network (INTRANET, INTERNET, or
13352        /// GOOGLE_CLOUD)
13353        #[serde(rename = "type")]
13354        pub r#type: crate::model::vmware_engine_network::vpc_network::Type,
13355
13356        /// Output only. The relative resource name of the service VPC network this
13357        /// VMware Engine network is attached to. For example:
13358        /// `projects/123123/global/networks/my-network`
13359        #[serde(skip_serializing_if = "std::string::String::is_empty")]
13360        pub network: std::string::String,
13361
13362        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13363        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13364    }
13365
13366    impl VpcNetwork {
13367        pub fn new() -> Self {
13368            std::default::Default::default()
13369        }
13370
13371        /// Sets the value of [r#type][crate::model::vmware_engine_network::VpcNetwork::type].
13372        pub fn set_type<
13373            T: std::convert::Into<crate::model::vmware_engine_network::vpc_network::Type>,
13374        >(
13375            mut self,
13376            v: T,
13377        ) -> Self {
13378            self.r#type = v.into();
13379            self
13380        }
13381
13382        /// Sets the value of [network][crate::model::vmware_engine_network::VpcNetwork::network].
13383        pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13384            self.network = v.into();
13385            self
13386        }
13387    }
13388
13389    impl wkt::message::Message for VpcNetwork {
13390        fn typename() -> &'static str {
13391            "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork"
13392        }
13393    }
13394
13395    /// Defines additional types related to [VpcNetwork].
13396    pub mod vpc_network {
13397        #[allow(unused_imports)]
13398        use super::*;
13399
13400        /// Enum Type defines possible types of a VMware Engine network controlled
13401        /// service.
13402        ///
13403        /// # Working with unknown values
13404        ///
13405        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13406        /// additional enum variants at any time. Adding new variants is not considered
13407        /// a breaking change. Applications should write their code in anticipation of:
13408        ///
13409        /// - New values appearing in future releases of the client library, **and**
13410        /// - New values received dynamically, without application changes.
13411        ///
13412        /// Please consult the [Working with enums] section in the user guide for some
13413        /// guidelines.
13414        ///
13415        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13416        #[derive(Clone, Debug, PartialEq)]
13417        #[non_exhaustive]
13418        pub enum Type {
13419            /// The default value. This value should never be used.
13420            Unspecified,
13421            /// VPC network that will be peered with a consumer VPC network or the
13422            /// intranet VPC of another VMware Engine network. Access a private cloud
13423            /// through Compute Engine VMs on a peered VPC network or an on-premises
13424            /// resource connected to a peered consumer VPC network.
13425            Intranet,
13426            /// VPC network used for internet access to and from a private cloud.
13427            Internet,
13428            /// VPC network used for access to Google Cloud services like
13429            /// Cloud Storage.
13430            GoogleCloud,
13431            /// If set, the enum was initialized with an unknown value.
13432            ///
13433            /// Applications can examine the value using [Type::value] or
13434            /// [Type::name].
13435            UnknownValue(r#type::UnknownValue),
13436        }
13437
13438        #[doc(hidden)]
13439        pub mod r#type {
13440            #[allow(unused_imports)]
13441            use super::*;
13442            #[derive(Clone, Debug, PartialEq)]
13443            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13444        }
13445
13446        impl Type {
13447            /// Gets the enum value.
13448            ///
13449            /// Returns `None` if the enum contains an unknown value deserialized from
13450            /// the string representation of enums.
13451            pub fn value(&self) -> std::option::Option<i32> {
13452                match self {
13453                    Self::Unspecified => std::option::Option::Some(0),
13454                    Self::Intranet => std::option::Option::Some(1),
13455                    Self::Internet => std::option::Option::Some(2),
13456                    Self::GoogleCloud => std::option::Option::Some(3),
13457                    Self::UnknownValue(u) => u.0.value(),
13458                }
13459            }
13460
13461            /// Gets the enum value as a string.
13462            ///
13463            /// Returns `None` if the enum contains an unknown value deserialized from
13464            /// the integer representation of enums.
13465            pub fn name(&self) -> std::option::Option<&str> {
13466                match self {
13467                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
13468                    Self::Intranet => std::option::Option::Some("INTRANET"),
13469                    Self::Internet => std::option::Option::Some("INTERNET"),
13470                    Self::GoogleCloud => std::option::Option::Some("GOOGLE_CLOUD"),
13471                    Self::UnknownValue(u) => u.0.name(),
13472                }
13473            }
13474        }
13475
13476        impl std::default::Default for Type {
13477            fn default() -> Self {
13478                use std::convert::From;
13479                Self::from(0)
13480            }
13481        }
13482
13483        impl std::fmt::Display for Type {
13484            fn fmt(
13485                &self,
13486                f: &mut std::fmt::Formatter<'_>,
13487            ) -> std::result::Result<(), std::fmt::Error> {
13488                wkt::internal::display_enum(f, self.name(), self.value())
13489            }
13490        }
13491
13492        impl std::convert::From<i32> for Type {
13493            fn from(value: i32) -> Self {
13494                match value {
13495                    0 => Self::Unspecified,
13496                    1 => Self::Intranet,
13497                    2 => Self::Internet,
13498                    3 => Self::GoogleCloud,
13499                    _ => Self::UnknownValue(r#type::UnknownValue(
13500                        wkt::internal::UnknownEnumValue::Integer(value),
13501                    )),
13502                }
13503            }
13504        }
13505
13506        impl std::convert::From<&str> for Type {
13507            fn from(value: &str) -> Self {
13508                use std::string::ToString;
13509                match value {
13510                    "TYPE_UNSPECIFIED" => Self::Unspecified,
13511                    "INTRANET" => Self::Intranet,
13512                    "INTERNET" => Self::Internet,
13513                    "GOOGLE_CLOUD" => Self::GoogleCloud,
13514                    _ => Self::UnknownValue(r#type::UnknownValue(
13515                        wkt::internal::UnknownEnumValue::String(value.to_string()),
13516                    )),
13517                }
13518            }
13519        }
13520
13521        impl serde::ser::Serialize for Type {
13522            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13523            where
13524                S: serde::Serializer,
13525            {
13526                match self {
13527                    Self::Unspecified => serializer.serialize_i32(0),
13528                    Self::Intranet => serializer.serialize_i32(1),
13529                    Self::Internet => serializer.serialize_i32(2),
13530                    Self::GoogleCloud => serializer.serialize_i32(3),
13531                    Self::UnknownValue(u) => u.0.serialize(serializer),
13532                }
13533            }
13534        }
13535
13536        impl<'de> serde::de::Deserialize<'de> for Type {
13537            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13538            where
13539                D: serde::Deserializer<'de>,
13540            {
13541                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
13542                    ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type",
13543                ))
13544            }
13545        }
13546    }
13547
13548    /// Enum State defines possible states of VMware Engine network.
13549    ///
13550    /// # Working with unknown values
13551    ///
13552    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13553    /// additional enum variants at any time. Adding new variants is not considered
13554    /// a breaking change. Applications should write their code in anticipation of:
13555    ///
13556    /// - New values appearing in future releases of the client library, **and**
13557    /// - New values received dynamically, without application changes.
13558    ///
13559    /// Please consult the [Working with enums] section in the user guide for some
13560    /// guidelines.
13561    ///
13562    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13563    #[derive(Clone, Debug, PartialEq)]
13564    #[non_exhaustive]
13565    pub enum State {
13566        /// The default value. This value is used if the state is omitted.
13567        Unspecified,
13568        /// The VMware Engine network is being created.
13569        Creating,
13570        /// The VMware Engine network is ready.
13571        Active,
13572        /// The VMware Engine network is being updated.
13573        Updating,
13574        /// The VMware Engine network is being deleted.
13575        Deleting,
13576        /// If set, the enum was initialized with an unknown value.
13577        ///
13578        /// Applications can examine the value using [State::value] or
13579        /// [State::name].
13580        UnknownValue(state::UnknownValue),
13581    }
13582
13583    #[doc(hidden)]
13584    pub mod state {
13585        #[allow(unused_imports)]
13586        use super::*;
13587        #[derive(Clone, Debug, PartialEq)]
13588        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13589    }
13590
13591    impl State {
13592        /// Gets the enum value.
13593        ///
13594        /// Returns `None` if the enum contains an unknown value deserialized from
13595        /// the string representation of enums.
13596        pub fn value(&self) -> std::option::Option<i32> {
13597            match self {
13598                Self::Unspecified => std::option::Option::Some(0),
13599                Self::Creating => std::option::Option::Some(1),
13600                Self::Active => std::option::Option::Some(2),
13601                Self::Updating => std::option::Option::Some(3),
13602                Self::Deleting => std::option::Option::Some(4),
13603                Self::UnknownValue(u) => u.0.value(),
13604            }
13605        }
13606
13607        /// Gets the enum value as a string.
13608        ///
13609        /// Returns `None` if the enum contains an unknown value deserialized from
13610        /// the integer representation of enums.
13611        pub fn name(&self) -> std::option::Option<&str> {
13612            match self {
13613                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13614                Self::Creating => std::option::Option::Some("CREATING"),
13615                Self::Active => std::option::Option::Some("ACTIVE"),
13616                Self::Updating => std::option::Option::Some("UPDATING"),
13617                Self::Deleting => std::option::Option::Some("DELETING"),
13618                Self::UnknownValue(u) => u.0.name(),
13619            }
13620        }
13621    }
13622
13623    impl std::default::Default for State {
13624        fn default() -> Self {
13625            use std::convert::From;
13626            Self::from(0)
13627        }
13628    }
13629
13630    impl std::fmt::Display for State {
13631        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13632            wkt::internal::display_enum(f, self.name(), self.value())
13633        }
13634    }
13635
13636    impl std::convert::From<i32> for State {
13637        fn from(value: i32) -> Self {
13638            match value {
13639                0 => Self::Unspecified,
13640                1 => Self::Creating,
13641                2 => Self::Active,
13642                3 => Self::Updating,
13643                4 => Self::Deleting,
13644                _ => Self::UnknownValue(state::UnknownValue(
13645                    wkt::internal::UnknownEnumValue::Integer(value),
13646                )),
13647            }
13648        }
13649    }
13650
13651    impl std::convert::From<&str> for State {
13652        fn from(value: &str) -> Self {
13653            use std::string::ToString;
13654            match value {
13655                "STATE_UNSPECIFIED" => Self::Unspecified,
13656                "CREATING" => Self::Creating,
13657                "ACTIVE" => Self::Active,
13658                "UPDATING" => Self::Updating,
13659                "DELETING" => Self::Deleting,
13660                _ => Self::UnknownValue(state::UnknownValue(
13661                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13662                )),
13663            }
13664        }
13665    }
13666
13667    impl serde::ser::Serialize for State {
13668        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13669        where
13670            S: serde::Serializer,
13671        {
13672            match self {
13673                Self::Unspecified => serializer.serialize_i32(0),
13674                Self::Creating => serializer.serialize_i32(1),
13675                Self::Active => serializer.serialize_i32(2),
13676                Self::Updating => serializer.serialize_i32(3),
13677                Self::Deleting => serializer.serialize_i32(4),
13678                Self::UnknownValue(u) => u.0.serialize(serializer),
13679            }
13680        }
13681    }
13682
13683    impl<'de> serde::de::Deserialize<'de> for State {
13684        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13685        where
13686            D: serde::Deserializer<'de>,
13687        {
13688            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13689                ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.State",
13690            ))
13691        }
13692    }
13693
13694    /// Enum Type defines possible types of VMware Engine network.
13695    ///
13696    /// # Working with unknown values
13697    ///
13698    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13699    /// additional enum variants at any time. Adding new variants is not considered
13700    /// a breaking change. Applications should write their code in anticipation of:
13701    ///
13702    /// - New values appearing in future releases of the client library, **and**
13703    /// - New values received dynamically, without application changes.
13704    ///
13705    /// Please consult the [Working with enums] section in the user guide for some
13706    /// guidelines.
13707    ///
13708    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13709    #[derive(Clone, Debug, PartialEq)]
13710    #[non_exhaustive]
13711    pub enum Type {
13712        /// The default value. This value should never be used.
13713        Unspecified,
13714        /// Network type used by private clouds created in projects without a network
13715        /// of type `STANDARD`. This network type is no longer used for new VMware
13716        /// Engine private cloud deployments.
13717        Legacy,
13718        /// Standard network type used for private cloud connectivity.
13719        Standard,
13720        /// If set, the enum was initialized with an unknown value.
13721        ///
13722        /// Applications can examine the value using [Type::value] or
13723        /// [Type::name].
13724        UnknownValue(r#type::UnknownValue),
13725    }
13726
13727    #[doc(hidden)]
13728    pub mod r#type {
13729        #[allow(unused_imports)]
13730        use super::*;
13731        #[derive(Clone, Debug, PartialEq)]
13732        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13733    }
13734
13735    impl Type {
13736        /// Gets the enum value.
13737        ///
13738        /// Returns `None` if the enum contains an unknown value deserialized from
13739        /// the string representation of enums.
13740        pub fn value(&self) -> std::option::Option<i32> {
13741            match self {
13742                Self::Unspecified => std::option::Option::Some(0),
13743                Self::Legacy => std::option::Option::Some(1),
13744                Self::Standard => std::option::Option::Some(2),
13745                Self::UnknownValue(u) => u.0.value(),
13746            }
13747        }
13748
13749        /// Gets the enum value as a string.
13750        ///
13751        /// Returns `None` if the enum contains an unknown value deserialized from
13752        /// the integer representation of enums.
13753        pub fn name(&self) -> std::option::Option<&str> {
13754            match self {
13755                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
13756                Self::Legacy => std::option::Option::Some("LEGACY"),
13757                Self::Standard => std::option::Option::Some("STANDARD"),
13758                Self::UnknownValue(u) => u.0.name(),
13759            }
13760        }
13761    }
13762
13763    impl std::default::Default for Type {
13764        fn default() -> Self {
13765            use std::convert::From;
13766            Self::from(0)
13767        }
13768    }
13769
13770    impl std::fmt::Display for Type {
13771        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13772            wkt::internal::display_enum(f, self.name(), self.value())
13773        }
13774    }
13775
13776    impl std::convert::From<i32> for Type {
13777        fn from(value: i32) -> Self {
13778            match value {
13779                0 => Self::Unspecified,
13780                1 => Self::Legacy,
13781                2 => Self::Standard,
13782                _ => Self::UnknownValue(r#type::UnknownValue(
13783                    wkt::internal::UnknownEnumValue::Integer(value),
13784                )),
13785            }
13786        }
13787    }
13788
13789    impl std::convert::From<&str> for Type {
13790        fn from(value: &str) -> Self {
13791            use std::string::ToString;
13792            match value {
13793                "TYPE_UNSPECIFIED" => Self::Unspecified,
13794                "LEGACY" => Self::Legacy,
13795                "STANDARD" => Self::Standard,
13796                _ => Self::UnknownValue(r#type::UnknownValue(
13797                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13798                )),
13799            }
13800        }
13801    }
13802
13803    impl serde::ser::Serialize for Type {
13804        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13805        where
13806            S: serde::Serializer,
13807        {
13808            match self {
13809                Self::Unspecified => serializer.serialize_i32(0),
13810                Self::Legacy => serializer.serialize_i32(1),
13811                Self::Standard => serializer.serialize_i32(2),
13812                Self::UnknownValue(u) => u.0.serialize(serializer),
13813            }
13814        }
13815    }
13816
13817    impl<'de> serde::de::Deserialize<'de> for Type {
13818        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13819        where
13820            D: serde::Deserializer<'de>,
13821        {
13822            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
13823                ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type",
13824            ))
13825        }
13826    }
13827}
13828
13829/// Private connection resource that provides connectivity for VMware Engine
13830/// private clouds.
13831#[serde_with::serde_as]
13832#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
13833#[serde(default, rename_all = "camelCase")]
13834#[non_exhaustive]
13835pub struct PrivateConnection {
13836    /// Output only. The resource name of the private connection.
13837    /// Resource names are schemeless URIs that follow the conventions in
13838    /// <https://cloud.google.com/apis/design/resource_names>.
13839    /// For example:
13840    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
13841    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13842    pub name: std::string::String,
13843
13844    /// Output only. Creation time of this resource.
13845    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13846    pub create_time: std::option::Option<wkt::Timestamp>,
13847
13848    /// Output only. Last update time of this resource.
13849    #[serde(skip_serializing_if = "std::option::Option::is_none")]
13850    pub update_time: std::option::Option<wkt::Timestamp>,
13851
13852    /// Optional. User-provided description for this private connection.
13853    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13854    pub description: std::string::String,
13855
13856    /// Output only. State of the private connection.
13857    pub state: crate::model::private_connection::State,
13858
13859    /// Required. The relative resource name of Legacy VMware Engine network.
13860    /// Specify the name in the following form:
13861    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
13862    /// where `{project}`, `{location}` will be same as specified in private
13863    /// connection resource name and `{vmware_engine_network_id}` will be in the
13864    /// form of `{location}`-default e.g.
13865    /// projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default.
13866    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13867    pub vmware_engine_network: std::string::String,
13868
13869    /// Output only. The canonical name of the VMware Engine network in the form:
13870    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
13871    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13872    pub vmware_engine_network_canonical: std::string::String,
13873
13874    /// Required. Private connection type.
13875    #[serde(rename = "type")]
13876    pub r#type: crate::model::private_connection::Type,
13877
13878    /// Output only. VPC network peering id between given network VPC and
13879    /// VMwareEngineNetwork.
13880    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13881    pub peering_id: std::string::String,
13882
13883    /// Optional. Routing Mode.
13884    /// Default value is set to GLOBAL.
13885    /// For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or
13886    /// REGIONAL, for other types only GLOBAL is supported.
13887    pub routing_mode: crate::model::private_connection::RoutingMode,
13888
13889    /// Output only. System-generated unique identifier for the resource.
13890    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13891    pub uid: std::string::String,
13892
13893    /// Required. Service network to create private connection.
13894    /// Specify the name in the following form:
13895    /// `projects/{project}/global/networks/{network_id}`
13896    /// For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking
13897    /// VPC, e.g. projects/project-tp/global/networks/servicenetworking.
13898    /// For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC,
13899    /// e.g. projects/project-tp/global/networks/netapp-tenant-vpc.
13900    /// For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g.
13901    /// projects/project-tp/global/networks/dell-tenant-vpc.
13902    /// For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or
13903    /// any other producer VPC to which the VMware Engine Network needs to be
13904    /// connected, e.g. projects/project/global/networks/vpc.
13905    #[serde(skip_serializing_if = "std::string::String::is_empty")]
13906    pub service_network: std::string::String,
13907
13908    /// Output only. Peering state between service network and VMware Engine
13909    /// network.
13910    pub peering_state: crate::model::private_connection::PeeringState,
13911
13912    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
13913    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13914}
13915
13916impl PrivateConnection {
13917    pub fn new() -> Self {
13918        std::default::Default::default()
13919    }
13920
13921    /// Sets the value of [name][crate::model::PrivateConnection::name].
13922    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13923        self.name = v.into();
13924        self
13925    }
13926
13927    /// Sets the value of [create_time][crate::model::PrivateConnection::create_time].
13928    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
13929        mut self,
13930        v: T,
13931    ) -> Self {
13932        self.create_time = v.into();
13933        self
13934    }
13935
13936    /// Sets the value of [update_time][crate::model::PrivateConnection::update_time].
13937    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
13938        mut self,
13939        v: T,
13940    ) -> Self {
13941        self.update_time = v.into();
13942        self
13943    }
13944
13945    /// Sets the value of [description][crate::model::PrivateConnection::description].
13946    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13947        self.description = v.into();
13948        self
13949    }
13950
13951    /// Sets the value of [state][crate::model::PrivateConnection::state].
13952    pub fn set_state<T: std::convert::Into<crate::model::private_connection::State>>(
13953        mut self,
13954        v: T,
13955    ) -> Self {
13956        self.state = v.into();
13957        self
13958    }
13959
13960    /// Sets the value of [vmware_engine_network][crate::model::PrivateConnection::vmware_engine_network].
13961    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
13962        mut self,
13963        v: T,
13964    ) -> Self {
13965        self.vmware_engine_network = v.into();
13966        self
13967    }
13968
13969    /// Sets the value of [vmware_engine_network_canonical][crate::model::PrivateConnection::vmware_engine_network_canonical].
13970    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
13971        mut self,
13972        v: T,
13973    ) -> Self {
13974        self.vmware_engine_network_canonical = v.into();
13975        self
13976    }
13977
13978    /// Sets the value of [r#type][crate::model::PrivateConnection::type].
13979    pub fn set_type<T: std::convert::Into<crate::model::private_connection::Type>>(
13980        mut self,
13981        v: T,
13982    ) -> Self {
13983        self.r#type = v.into();
13984        self
13985    }
13986
13987    /// Sets the value of [peering_id][crate::model::PrivateConnection::peering_id].
13988    pub fn set_peering_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13989        self.peering_id = v.into();
13990        self
13991    }
13992
13993    /// Sets the value of [routing_mode][crate::model::PrivateConnection::routing_mode].
13994    pub fn set_routing_mode<
13995        T: std::convert::Into<crate::model::private_connection::RoutingMode>,
13996    >(
13997        mut self,
13998        v: T,
13999    ) -> Self {
14000        self.routing_mode = v.into();
14001        self
14002    }
14003
14004    /// Sets the value of [uid][crate::model::PrivateConnection::uid].
14005    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14006        self.uid = v.into();
14007        self
14008    }
14009
14010    /// Sets the value of [service_network][crate::model::PrivateConnection::service_network].
14011    pub fn set_service_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14012        self.service_network = v.into();
14013        self
14014    }
14015
14016    /// Sets the value of [peering_state][crate::model::PrivateConnection::peering_state].
14017    pub fn set_peering_state<
14018        T: std::convert::Into<crate::model::private_connection::PeeringState>,
14019    >(
14020        mut self,
14021        v: T,
14022    ) -> Self {
14023        self.peering_state = v.into();
14024        self
14025    }
14026}
14027
14028impl wkt::message::Message for PrivateConnection {
14029    fn typename() -> &'static str {
14030        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateConnection"
14031    }
14032}
14033
14034/// Defines additional types related to [PrivateConnection].
14035pub mod private_connection {
14036    #[allow(unused_imports)]
14037    use super::*;
14038
14039    /// Enum State defines possible states of private connection.
14040    ///
14041    /// # Working with unknown values
14042    ///
14043    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14044    /// additional enum variants at any time. Adding new variants is not considered
14045    /// a breaking change. Applications should write their code in anticipation of:
14046    ///
14047    /// - New values appearing in future releases of the client library, **and**
14048    /// - New values received dynamically, without application changes.
14049    ///
14050    /// Please consult the [Working with enums] section in the user guide for some
14051    /// guidelines.
14052    ///
14053    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14054    #[derive(Clone, Debug, PartialEq)]
14055    #[non_exhaustive]
14056    pub enum State {
14057        /// The default value. This value is used if the state is omitted.
14058        Unspecified,
14059        /// The private connection is being created.
14060        Creating,
14061        /// The private connection is ready.
14062        Active,
14063        /// The private connection is being updated.
14064        Updating,
14065        /// The private connection is being deleted.
14066        Deleting,
14067        /// The private connection is not provisioned, since no private cloud is
14068        /// present for which this private connection is needed.
14069        Unprovisioned,
14070        /// The private connection is in failed state.
14071        Failed,
14072        /// If set, the enum was initialized with an unknown value.
14073        ///
14074        /// Applications can examine the value using [State::value] or
14075        /// [State::name].
14076        UnknownValue(state::UnknownValue),
14077    }
14078
14079    #[doc(hidden)]
14080    pub mod state {
14081        #[allow(unused_imports)]
14082        use super::*;
14083        #[derive(Clone, Debug, PartialEq)]
14084        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14085    }
14086
14087    impl State {
14088        /// Gets the enum value.
14089        ///
14090        /// Returns `None` if the enum contains an unknown value deserialized from
14091        /// the string representation of enums.
14092        pub fn value(&self) -> std::option::Option<i32> {
14093            match self {
14094                Self::Unspecified => std::option::Option::Some(0),
14095                Self::Creating => std::option::Option::Some(1),
14096                Self::Active => std::option::Option::Some(2),
14097                Self::Updating => std::option::Option::Some(3),
14098                Self::Deleting => std::option::Option::Some(4),
14099                Self::Unprovisioned => std::option::Option::Some(5),
14100                Self::Failed => std::option::Option::Some(6),
14101                Self::UnknownValue(u) => u.0.value(),
14102            }
14103        }
14104
14105        /// Gets the enum value as a string.
14106        ///
14107        /// Returns `None` if the enum contains an unknown value deserialized from
14108        /// the integer representation of enums.
14109        pub fn name(&self) -> std::option::Option<&str> {
14110            match self {
14111                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
14112                Self::Creating => std::option::Option::Some("CREATING"),
14113                Self::Active => std::option::Option::Some("ACTIVE"),
14114                Self::Updating => std::option::Option::Some("UPDATING"),
14115                Self::Deleting => std::option::Option::Some("DELETING"),
14116                Self::Unprovisioned => std::option::Option::Some("UNPROVISIONED"),
14117                Self::Failed => std::option::Option::Some("FAILED"),
14118                Self::UnknownValue(u) => u.0.name(),
14119            }
14120        }
14121    }
14122
14123    impl std::default::Default for State {
14124        fn default() -> Self {
14125            use std::convert::From;
14126            Self::from(0)
14127        }
14128    }
14129
14130    impl std::fmt::Display for State {
14131        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14132            wkt::internal::display_enum(f, self.name(), self.value())
14133        }
14134    }
14135
14136    impl std::convert::From<i32> for State {
14137        fn from(value: i32) -> Self {
14138            match value {
14139                0 => Self::Unspecified,
14140                1 => Self::Creating,
14141                2 => Self::Active,
14142                3 => Self::Updating,
14143                4 => Self::Deleting,
14144                5 => Self::Unprovisioned,
14145                6 => Self::Failed,
14146                _ => Self::UnknownValue(state::UnknownValue(
14147                    wkt::internal::UnknownEnumValue::Integer(value),
14148                )),
14149            }
14150        }
14151    }
14152
14153    impl std::convert::From<&str> for State {
14154        fn from(value: &str) -> Self {
14155            use std::string::ToString;
14156            match value {
14157                "STATE_UNSPECIFIED" => Self::Unspecified,
14158                "CREATING" => Self::Creating,
14159                "ACTIVE" => Self::Active,
14160                "UPDATING" => Self::Updating,
14161                "DELETING" => Self::Deleting,
14162                "UNPROVISIONED" => Self::Unprovisioned,
14163                "FAILED" => Self::Failed,
14164                _ => Self::UnknownValue(state::UnknownValue(
14165                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14166                )),
14167            }
14168        }
14169    }
14170
14171    impl serde::ser::Serialize for State {
14172        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14173        where
14174            S: serde::Serializer,
14175        {
14176            match self {
14177                Self::Unspecified => serializer.serialize_i32(0),
14178                Self::Creating => serializer.serialize_i32(1),
14179                Self::Active => serializer.serialize_i32(2),
14180                Self::Updating => serializer.serialize_i32(3),
14181                Self::Deleting => serializer.serialize_i32(4),
14182                Self::Unprovisioned => serializer.serialize_i32(5),
14183                Self::Failed => serializer.serialize_i32(6),
14184                Self::UnknownValue(u) => u.0.serialize(serializer),
14185            }
14186        }
14187    }
14188
14189    impl<'de> serde::de::Deserialize<'de> for State {
14190        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14191        where
14192            D: serde::Deserializer<'de>,
14193        {
14194            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14195                ".google.cloud.vmwareengine.v1.PrivateConnection.State",
14196            ))
14197        }
14198    }
14199
14200    /// Enum Type defines possible types of private connection.
14201    ///
14202    /// # Working with unknown values
14203    ///
14204    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14205    /// additional enum variants at any time. Adding new variants is not considered
14206    /// a breaking change. Applications should write their code in anticipation of:
14207    ///
14208    /// - New values appearing in future releases of the client library, **and**
14209    /// - New values received dynamically, without application changes.
14210    ///
14211    /// Please consult the [Working with enums] section in the user guide for some
14212    /// guidelines.
14213    ///
14214    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14215    #[derive(Clone, Debug, PartialEq)]
14216    #[non_exhaustive]
14217    pub enum Type {
14218        /// The default value. This value should never be used.
14219        Unspecified,
14220        /// Connection used for establishing [private services
14221        /// access](https://cloud.google.com/vpc/docs/private-services-access).
14222        PrivateServiceAccess,
14223        /// Connection used for connecting to NetApp Cloud Volumes.
14224        NetappCloudVolumes,
14225        /// Connection used for connecting to Dell PowerScale.
14226        DellPowerscale,
14227        /// Connection used for connecting to third-party services.
14228        ThirdPartyService,
14229        /// If set, the enum was initialized with an unknown value.
14230        ///
14231        /// Applications can examine the value using [Type::value] or
14232        /// [Type::name].
14233        UnknownValue(r#type::UnknownValue),
14234    }
14235
14236    #[doc(hidden)]
14237    pub mod r#type {
14238        #[allow(unused_imports)]
14239        use super::*;
14240        #[derive(Clone, Debug, PartialEq)]
14241        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14242    }
14243
14244    impl Type {
14245        /// Gets the enum value.
14246        ///
14247        /// Returns `None` if the enum contains an unknown value deserialized from
14248        /// the string representation of enums.
14249        pub fn value(&self) -> std::option::Option<i32> {
14250            match self {
14251                Self::Unspecified => std::option::Option::Some(0),
14252                Self::PrivateServiceAccess => std::option::Option::Some(1),
14253                Self::NetappCloudVolumes => std::option::Option::Some(2),
14254                Self::DellPowerscale => std::option::Option::Some(3),
14255                Self::ThirdPartyService => std::option::Option::Some(4),
14256                Self::UnknownValue(u) => u.0.value(),
14257            }
14258        }
14259
14260        /// Gets the enum value as a string.
14261        ///
14262        /// Returns `None` if the enum contains an unknown value deserialized from
14263        /// the integer representation of enums.
14264        pub fn name(&self) -> std::option::Option<&str> {
14265            match self {
14266                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
14267                Self::PrivateServiceAccess => std::option::Option::Some("PRIVATE_SERVICE_ACCESS"),
14268                Self::NetappCloudVolumes => std::option::Option::Some("NETAPP_CLOUD_VOLUMES"),
14269                Self::DellPowerscale => std::option::Option::Some("DELL_POWERSCALE"),
14270                Self::ThirdPartyService => std::option::Option::Some("THIRD_PARTY_SERVICE"),
14271                Self::UnknownValue(u) => u.0.name(),
14272            }
14273        }
14274    }
14275
14276    impl std::default::Default for Type {
14277        fn default() -> Self {
14278            use std::convert::From;
14279            Self::from(0)
14280        }
14281    }
14282
14283    impl std::fmt::Display for Type {
14284        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14285            wkt::internal::display_enum(f, self.name(), self.value())
14286        }
14287    }
14288
14289    impl std::convert::From<i32> for Type {
14290        fn from(value: i32) -> Self {
14291            match value {
14292                0 => Self::Unspecified,
14293                1 => Self::PrivateServiceAccess,
14294                2 => Self::NetappCloudVolumes,
14295                3 => Self::DellPowerscale,
14296                4 => Self::ThirdPartyService,
14297                _ => Self::UnknownValue(r#type::UnknownValue(
14298                    wkt::internal::UnknownEnumValue::Integer(value),
14299                )),
14300            }
14301        }
14302    }
14303
14304    impl std::convert::From<&str> for Type {
14305        fn from(value: &str) -> Self {
14306            use std::string::ToString;
14307            match value {
14308                "TYPE_UNSPECIFIED" => Self::Unspecified,
14309                "PRIVATE_SERVICE_ACCESS" => Self::PrivateServiceAccess,
14310                "NETAPP_CLOUD_VOLUMES" => Self::NetappCloudVolumes,
14311                "DELL_POWERSCALE" => Self::DellPowerscale,
14312                "THIRD_PARTY_SERVICE" => Self::ThirdPartyService,
14313                _ => Self::UnknownValue(r#type::UnknownValue(
14314                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14315                )),
14316            }
14317        }
14318    }
14319
14320    impl serde::ser::Serialize for Type {
14321        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14322        where
14323            S: serde::Serializer,
14324        {
14325            match self {
14326                Self::Unspecified => serializer.serialize_i32(0),
14327                Self::PrivateServiceAccess => serializer.serialize_i32(1),
14328                Self::NetappCloudVolumes => serializer.serialize_i32(2),
14329                Self::DellPowerscale => serializer.serialize_i32(3),
14330                Self::ThirdPartyService => serializer.serialize_i32(4),
14331                Self::UnknownValue(u) => u.0.serialize(serializer),
14332            }
14333        }
14334    }
14335
14336    impl<'de> serde::de::Deserialize<'de> for Type {
14337        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14338        where
14339            D: serde::Deserializer<'de>,
14340        {
14341            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
14342                ".google.cloud.vmwareengine.v1.PrivateConnection.Type",
14343            ))
14344        }
14345    }
14346
14347    /// Possible types for RoutingMode
14348    ///
14349    /// # Working with unknown values
14350    ///
14351    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14352    /// additional enum variants at any time. Adding new variants is not considered
14353    /// a breaking change. Applications should write their code in anticipation of:
14354    ///
14355    /// - New values appearing in future releases of the client library, **and**
14356    /// - New values received dynamically, without application changes.
14357    ///
14358    /// Please consult the [Working with enums] section in the user guide for some
14359    /// guidelines.
14360    ///
14361    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14362    #[derive(Clone, Debug, PartialEq)]
14363    #[non_exhaustive]
14364    pub enum RoutingMode {
14365        /// The default value. This value should never be used.
14366        Unspecified,
14367        /// Global Routing Mode
14368        Global,
14369        /// Regional Routing Mode
14370        Regional,
14371        /// If set, the enum was initialized with an unknown value.
14372        ///
14373        /// Applications can examine the value using [RoutingMode::value] or
14374        /// [RoutingMode::name].
14375        UnknownValue(routing_mode::UnknownValue),
14376    }
14377
14378    #[doc(hidden)]
14379    pub mod routing_mode {
14380        #[allow(unused_imports)]
14381        use super::*;
14382        #[derive(Clone, Debug, PartialEq)]
14383        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14384    }
14385
14386    impl RoutingMode {
14387        /// Gets the enum value.
14388        ///
14389        /// Returns `None` if the enum contains an unknown value deserialized from
14390        /// the string representation of enums.
14391        pub fn value(&self) -> std::option::Option<i32> {
14392            match self {
14393                Self::Unspecified => std::option::Option::Some(0),
14394                Self::Global => std::option::Option::Some(1),
14395                Self::Regional => std::option::Option::Some(2),
14396                Self::UnknownValue(u) => u.0.value(),
14397            }
14398        }
14399
14400        /// Gets the enum value as a string.
14401        ///
14402        /// Returns `None` if the enum contains an unknown value deserialized from
14403        /// the integer representation of enums.
14404        pub fn name(&self) -> std::option::Option<&str> {
14405            match self {
14406                Self::Unspecified => std::option::Option::Some("ROUTING_MODE_UNSPECIFIED"),
14407                Self::Global => std::option::Option::Some("GLOBAL"),
14408                Self::Regional => std::option::Option::Some("REGIONAL"),
14409                Self::UnknownValue(u) => u.0.name(),
14410            }
14411        }
14412    }
14413
14414    impl std::default::Default for RoutingMode {
14415        fn default() -> Self {
14416            use std::convert::From;
14417            Self::from(0)
14418        }
14419    }
14420
14421    impl std::fmt::Display for RoutingMode {
14422        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14423            wkt::internal::display_enum(f, self.name(), self.value())
14424        }
14425    }
14426
14427    impl std::convert::From<i32> for RoutingMode {
14428        fn from(value: i32) -> Self {
14429            match value {
14430                0 => Self::Unspecified,
14431                1 => Self::Global,
14432                2 => Self::Regional,
14433                _ => Self::UnknownValue(routing_mode::UnknownValue(
14434                    wkt::internal::UnknownEnumValue::Integer(value),
14435                )),
14436            }
14437        }
14438    }
14439
14440    impl std::convert::From<&str> for RoutingMode {
14441        fn from(value: &str) -> Self {
14442            use std::string::ToString;
14443            match value {
14444                "ROUTING_MODE_UNSPECIFIED" => Self::Unspecified,
14445                "GLOBAL" => Self::Global,
14446                "REGIONAL" => Self::Regional,
14447                _ => Self::UnknownValue(routing_mode::UnknownValue(
14448                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14449                )),
14450            }
14451        }
14452    }
14453
14454    impl serde::ser::Serialize for RoutingMode {
14455        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14456        where
14457            S: serde::Serializer,
14458        {
14459            match self {
14460                Self::Unspecified => serializer.serialize_i32(0),
14461                Self::Global => serializer.serialize_i32(1),
14462                Self::Regional => serializer.serialize_i32(2),
14463                Self::UnknownValue(u) => u.0.serialize(serializer),
14464            }
14465        }
14466    }
14467
14468    impl<'de> serde::de::Deserialize<'de> for RoutingMode {
14469        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14470        where
14471            D: serde::Deserializer<'de>,
14472        {
14473            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RoutingMode>::new(
14474                ".google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode",
14475            ))
14476        }
14477    }
14478
14479    /// Enum PeeringState defines the possible states of peering between service
14480    /// network and the vpc network peered to service network
14481    ///
14482    /// # Working with unknown values
14483    ///
14484    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14485    /// additional enum variants at any time. Adding new variants is not considered
14486    /// a breaking change. Applications should write their code in anticipation of:
14487    ///
14488    /// - New values appearing in future releases of the client library, **and**
14489    /// - New values received dynamically, without application changes.
14490    ///
14491    /// Please consult the [Working with enums] section in the user guide for some
14492    /// guidelines.
14493    ///
14494    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14495    #[derive(Clone, Debug, PartialEq)]
14496    #[non_exhaustive]
14497    pub enum PeeringState {
14498        /// The default value. This value is used if the peering state is omitted or
14499        /// unknown.
14500        Unspecified,
14501        /// The peering is in active state.
14502        PeeringActive,
14503        /// The peering is in inactive state.
14504        PeeringInactive,
14505        /// If set, the enum was initialized with an unknown value.
14506        ///
14507        /// Applications can examine the value using [PeeringState::value] or
14508        /// [PeeringState::name].
14509        UnknownValue(peering_state::UnknownValue),
14510    }
14511
14512    #[doc(hidden)]
14513    pub mod peering_state {
14514        #[allow(unused_imports)]
14515        use super::*;
14516        #[derive(Clone, Debug, PartialEq)]
14517        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14518    }
14519
14520    impl PeeringState {
14521        /// Gets the enum value.
14522        ///
14523        /// Returns `None` if the enum contains an unknown value deserialized from
14524        /// the string representation of enums.
14525        pub fn value(&self) -> std::option::Option<i32> {
14526            match self {
14527                Self::Unspecified => std::option::Option::Some(0),
14528                Self::PeeringActive => std::option::Option::Some(1),
14529                Self::PeeringInactive => std::option::Option::Some(2),
14530                Self::UnknownValue(u) => u.0.value(),
14531            }
14532        }
14533
14534        /// Gets the enum value as a string.
14535        ///
14536        /// Returns `None` if the enum contains an unknown value deserialized from
14537        /// the integer representation of enums.
14538        pub fn name(&self) -> std::option::Option<&str> {
14539            match self {
14540                Self::Unspecified => std::option::Option::Some("PEERING_STATE_UNSPECIFIED"),
14541                Self::PeeringActive => std::option::Option::Some("PEERING_ACTIVE"),
14542                Self::PeeringInactive => std::option::Option::Some("PEERING_INACTIVE"),
14543                Self::UnknownValue(u) => u.0.name(),
14544            }
14545        }
14546    }
14547
14548    impl std::default::Default for PeeringState {
14549        fn default() -> Self {
14550            use std::convert::From;
14551            Self::from(0)
14552        }
14553    }
14554
14555    impl std::fmt::Display for PeeringState {
14556        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14557            wkt::internal::display_enum(f, self.name(), self.value())
14558        }
14559    }
14560
14561    impl std::convert::From<i32> for PeeringState {
14562        fn from(value: i32) -> Self {
14563            match value {
14564                0 => Self::Unspecified,
14565                1 => Self::PeeringActive,
14566                2 => Self::PeeringInactive,
14567                _ => Self::UnknownValue(peering_state::UnknownValue(
14568                    wkt::internal::UnknownEnumValue::Integer(value),
14569                )),
14570            }
14571        }
14572    }
14573
14574    impl std::convert::From<&str> for PeeringState {
14575        fn from(value: &str) -> Self {
14576            use std::string::ToString;
14577            match value {
14578                "PEERING_STATE_UNSPECIFIED" => Self::Unspecified,
14579                "PEERING_ACTIVE" => Self::PeeringActive,
14580                "PEERING_INACTIVE" => Self::PeeringInactive,
14581                _ => Self::UnknownValue(peering_state::UnknownValue(
14582                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14583                )),
14584            }
14585        }
14586    }
14587
14588    impl serde::ser::Serialize for PeeringState {
14589        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14590        where
14591            S: serde::Serializer,
14592        {
14593            match self {
14594                Self::Unspecified => serializer.serialize_i32(0),
14595                Self::PeeringActive => serializer.serialize_i32(1),
14596                Self::PeeringInactive => serializer.serialize_i32(2),
14597                Self::UnknownValue(u) => u.0.serialize(serializer),
14598            }
14599        }
14600    }
14601
14602    impl<'de> serde::de::Deserialize<'de> for PeeringState {
14603        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14604        where
14605            D: serde::Deserializer<'de>,
14606        {
14607            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PeeringState>::new(
14608                ".google.cloud.vmwareengine.v1.PrivateConnection.PeeringState",
14609            ))
14610        }
14611    }
14612}
14613
14614/// VmwareEngine specific metadata for the given
14615/// [google.cloud.location.Location][google.cloud.location.Location]. It is
14616/// returned as a content of the `google.cloud.location.Location.metadata` field.
14617///
14618/// [google.cloud.location.Location]: location::model::Location
14619#[serde_with::serde_as]
14620#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14621#[serde(default, rename_all = "camelCase")]
14622#[non_exhaustive]
14623pub struct LocationMetadata {
14624    /// Output only. Capabilities of this location.
14625    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
14626    pub capabilities: std::vec::Vec<crate::model::location_metadata::Capability>,
14627
14628    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14629    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14630}
14631
14632impl LocationMetadata {
14633    pub fn new() -> Self {
14634        std::default::Default::default()
14635    }
14636
14637    /// Sets the value of [capabilities][crate::model::LocationMetadata::capabilities].
14638    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
14639    where
14640        T: std::iter::IntoIterator<Item = V>,
14641        V: std::convert::Into<crate::model::location_metadata::Capability>,
14642    {
14643        use std::iter::Iterator;
14644        self.capabilities = v.into_iter().map(|i| i.into()).collect();
14645        self
14646    }
14647}
14648
14649impl wkt::message::Message for LocationMetadata {
14650    fn typename() -> &'static str {
14651        "type.googleapis.com/google.cloud.vmwareengine.v1.LocationMetadata"
14652    }
14653}
14654
14655/// Defines additional types related to [LocationMetadata].
14656pub mod location_metadata {
14657    #[allow(unused_imports)]
14658    use super::*;
14659
14660    /// Capability of a location.
14661    ///
14662    /// # Working with unknown values
14663    ///
14664    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14665    /// additional enum variants at any time. Adding new variants is not considered
14666    /// a breaking change. Applications should write their code in anticipation of:
14667    ///
14668    /// - New values appearing in future releases of the client library, **and**
14669    /// - New values received dynamically, without application changes.
14670    ///
14671    /// Please consult the [Working with enums] section in the user guide for some
14672    /// guidelines.
14673    ///
14674    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14675    #[derive(Clone, Debug, PartialEq)]
14676    #[non_exhaustive]
14677    pub enum Capability {
14678        /// The default value. This value is used if the capability is omitted or
14679        /// unknown.
14680        Unspecified,
14681        /// Stretch clusters are supported in this location.
14682        StretchedClusters,
14683        /// If set, the enum was initialized with an unknown value.
14684        ///
14685        /// Applications can examine the value using [Capability::value] or
14686        /// [Capability::name].
14687        UnknownValue(capability::UnknownValue),
14688    }
14689
14690    #[doc(hidden)]
14691    pub mod capability {
14692        #[allow(unused_imports)]
14693        use super::*;
14694        #[derive(Clone, Debug, PartialEq)]
14695        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14696    }
14697
14698    impl Capability {
14699        /// Gets the enum value.
14700        ///
14701        /// Returns `None` if the enum contains an unknown value deserialized from
14702        /// the string representation of enums.
14703        pub fn value(&self) -> std::option::Option<i32> {
14704            match self {
14705                Self::Unspecified => std::option::Option::Some(0),
14706                Self::StretchedClusters => std::option::Option::Some(1),
14707                Self::UnknownValue(u) => u.0.value(),
14708            }
14709        }
14710
14711        /// Gets the enum value as a string.
14712        ///
14713        /// Returns `None` if the enum contains an unknown value deserialized from
14714        /// the integer representation of enums.
14715        pub fn name(&self) -> std::option::Option<&str> {
14716            match self {
14717                Self::Unspecified => std::option::Option::Some("CAPABILITY_UNSPECIFIED"),
14718                Self::StretchedClusters => std::option::Option::Some("STRETCHED_CLUSTERS"),
14719                Self::UnknownValue(u) => u.0.name(),
14720            }
14721        }
14722    }
14723
14724    impl std::default::Default for Capability {
14725        fn default() -> Self {
14726            use std::convert::From;
14727            Self::from(0)
14728        }
14729    }
14730
14731    impl std::fmt::Display for Capability {
14732        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14733            wkt::internal::display_enum(f, self.name(), self.value())
14734        }
14735    }
14736
14737    impl std::convert::From<i32> for Capability {
14738        fn from(value: i32) -> Self {
14739            match value {
14740                0 => Self::Unspecified,
14741                1 => Self::StretchedClusters,
14742                _ => Self::UnknownValue(capability::UnknownValue(
14743                    wkt::internal::UnknownEnumValue::Integer(value),
14744                )),
14745            }
14746        }
14747    }
14748
14749    impl std::convert::From<&str> for Capability {
14750        fn from(value: &str) -> Self {
14751            use std::string::ToString;
14752            match value {
14753                "CAPABILITY_UNSPECIFIED" => Self::Unspecified,
14754                "STRETCHED_CLUSTERS" => Self::StretchedClusters,
14755                _ => Self::UnknownValue(capability::UnknownValue(
14756                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14757                )),
14758            }
14759        }
14760    }
14761
14762    impl serde::ser::Serialize for Capability {
14763        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14764        where
14765            S: serde::Serializer,
14766        {
14767            match self {
14768                Self::Unspecified => serializer.serialize_i32(0),
14769                Self::StretchedClusters => serializer.serialize_i32(1),
14770                Self::UnknownValue(u) => u.0.serialize(serializer),
14771            }
14772        }
14773    }
14774
14775    impl<'de> serde::de::Deserialize<'de> for Capability {
14776        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14777        where
14778            D: serde::Deserializer<'de>,
14779        {
14780            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Capability>::new(
14781                ".google.cloud.vmwareengine.v1.LocationMetadata.Capability",
14782            ))
14783        }
14784    }
14785}
14786
14787/// DnsBindPermission resource that contains the accounts having the consumer DNS
14788/// bind permission on the corresponding intranet VPC of the consumer project.
14789#[serde_with::serde_as]
14790#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14791#[serde(default, rename_all = "camelCase")]
14792#[non_exhaustive]
14793pub struct DnsBindPermission {
14794    /// Required. Output only. The name of the resource which stores the
14795    /// users/service accounts having the permission to bind to the corresponding
14796    /// intranet VPC of the consumer project. DnsBindPermission is a global
14797    /// resource and location can only be global. Resource names are schemeless
14798    /// URIs that follow the conventions in
14799    /// <https://cloud.google.com/apis/design/resource_names>. For example:
14800    /// `projects/my-project/locations/global/dnsBindPermission`
14801    #[serde(skip_serializing_if = "std::string::String::is_empty")]
14802    pub name: std::string::String,
14803
14804    /// Output only. Users/Service accounts which have access for binding on the
14805    /// intranet VPC project corresponding to the consumer project.
14806    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
14807    pub principals: std::vec::Vec<crate::model::Principal>,
14808
14809    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14810    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14811}
14812
14813impl DnsBindPermission {
14814    pub fn new() -> Self {
14815        std::default::Default::default()
14816    }
14817
14818    /// Sets the value of [name][crate::model::DnsBindPermission::name].
14819    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14820        self.name = v.into();
14821        self
14822    }
14823
14824    /// Sets the value of [principals][crate::model::DnsBindPermission::principals].
14825    pub fn set_principals<T, V>(mut self, v: T) -> Self
14826    where
14827        T: std::iter::IntoIterator<Item = V>,
14828        V: std::convert::Into<crate::model::Principal>,
14829    {
14830        use std::iter::Iterator;
14831        self.principals = v.into_iter().map(|i| i.into()).collect();
14832        self
14833    }
14834}
14835
14836impl wkt::message::Message for DnsBindPermission {
14837    fn typename() -> &'static str {
14838        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsBindPermission"
14839    }
14840}
14841
14842/// Users/Service accounts which have access for DNS binding on the intranet
14843/// VPC corresponding to the consumer project.
14844#[serde_with::serde_as]
14845#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
14846#[serde(default, rename_all = "camelCase")]
14847#[non_exhaustive]
14848pub struct Principal {
14849    /// The consumer provided user/service account which needs to be
14850    /// granted permission to DNS bind with the intranet VPC corresponding to the
14851    /// consumer project.
14852    #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
14853    pub principal: std::option::Option<crate::model::principal::Principal>,
14854
14855    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
14856    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14857}
14858
14859impl Principal {
14860    pub fn new() -> Self {
14861        std::default::Default::default()
14862    }
14863
14864    /// Sets the value of [principal][crate::model::Principal::principal].
14865    ///
14866    /// Note that all the setters affecting `principal` are mutually
14867    /// exclusive.
14868    pub fn set_principal<
14869        T: std::convert::Into<std::option::Option<crate::model::principal::Principal>>,
14870    >(
14871        mut self,
14872        v: T,
14873    ) -> Self {
14874        self.principal = v.into();
14875        self
14876    }
14877
14878    /// The value of [principal][crate::model::Principal::principal]
14879    /// if it holds a `User`, `None` if the field is not set or
14880    /// holds a different branch.
14881    pub fn user(&self) -> std::option::Option<&std::string::String> {
14882        #[allow(unreachable_patterns)]
14883        self.principal.as_ref().and_then(|v| match v {
14884            crate::model::principal::Principal::User(v) => std::option::Option::Some(v),
14885            _ => std::option::Option::None,
14886        })
14887    }
14888
14889    /// Sets the value of [principal][crate::model::Principal::principal]
14890    /// to hold a `User`.
14891    ///
14892    /// Note that all the setters affecting `principal` are
14893    /// mutually exclusive.
14894    pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14895        self.principal =
14896            std::option::Option::Some(crate::model::principal::Principal::User(v.into()));
14897        self
14898    }
14899
14900    /// The value of [principal][crate::model::Principal::principal]
14901    /// if it holds a `ServiceAccount`, `None` if the field is not set or
14902    /// holds a different branch.
14903    pub fn service_account(&self) -> std::option::Option<&std::string::String> {
14904        #[allow(unreachable_patterns)]
14905        self.principal.as_ref().and_then(|v| match v {
14906            crate::model::principal::Principal::ServiceAccount(v) => std::option::Option::Some(v),
14907            _ => std::option::Option::None,
14908        })
14909    }
14910
14911    /// Sets the value of [principal][crate::model::Principal::principal]
14912    /// to hold a `ServiceAccount`.
14913    ///
14914    /// Note that all the setters affecting `principal` are
14915    /// mutually exclusive.
14916    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14917        self.principal =
14918            std::option::Option::Some(crate::model::principal::Principal::ServiceAccount(v.into()));
14919        self
14920    }
14921}
14922
14923impl wkt::message::Message for Principal {
14924    fn typename() -> &'static str {
14925        "type.googleapis.com/google.cloud.vmwareengine.v1.Principal"
14926    }
14927}
14928
14929/// Defines additional types related to [Principal].
14930pub mod principal {
14931    #[allow(unused_imports)]
14932    use super::*;
14933
14934    /// The consumer provided user/service account which needs to be
14935    /// granted permission to DNS bind with the intranet VPC corresponding to the
14936    /// consumer project.
14937    #[serde_with::serde_as]
14938    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
14939    #[serde(rename_all = "camelCase")]
14940    #[non_exhaustive]
14941    pub enum Principal {
14942        /// The user who needs to be granted permission.
14943        User(std::string::String),
14944        /// The service account which needs to be granted the permission.
14945        ServiceAccount(std::string::String),
14946    }
14947}