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 iam_v1;
24extern crate lazy_static;
25extern crate location;
26extern crate longrunning;
27extern crate lro;
28extern crate reqwest;
29extern crate serde;
30extern crate serde_json;
31extern crate serde_with;
32extern crate std;
33extern crate tracing;
34extern crate wkt;
35
36/// Request message for
37/// [VmwareEngine.ListPrivateClouds][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]
38///
39/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]: crate::client::VmwareEngine::list_private_clouds
40#[serde_with::serde_as]
41#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
42#[serde(default, rename_all = "camelCase")]
43#[non_exhaustive]
44pub struct ListPrivateCloudsRequest {
45    /// Required. The resource name of the private cloud to be queried for
46    /// clusters. Resource names are schemeless URIs that follow the conventions in
47    /// <https://cloud.google.com/apis/design/resource_names>.
48    /// For example:
49    /// `projects/my-project/locations/us-central1-a`
50    #[serde(skip_serializing_if = "std::string::String::is_empty")]
51    pub parent: std::string::String,
52
53    /// The maximum number of private clouds to return in one page.
54    /// The service may return fewer than this value.
55    /// The maximum value is coerced to 1000.
56    /// The default value of this field is 500.
57    pub page_size: i32,
58
59    /// A page token, received from a previous `ListPrivateClouds` call.
60    /// Provide this to retrieve the subsequent page.
61    ///
62    /// When paginating, all other parameters provided to `ListPrivateClouds` must
63    /// match the call that provided the page token.
64    #[serde(skip_serializing_if = "std::string::String::is_empty")]
65    pub page_token: std::string::String,
66
67    /// A filter expression that matches resources returned in the response.
68    /// The expression must specify the field name, a comparison operator, and the
69    /// value that you want to use for filtering. The value must be a string, a
70    /// number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or
71    /// `<`.
72    ///
73    /// For example, if you are filtering a list of private clouds, you can exclude
74    /// the ones named `example-pc` by specifying `name != "example-pc"`.
75    ///
76    /// You can also filter nested fields. For example, you could specify
77    /// `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds
78    /// only if they have a matching address in their network configuration.
79    ///
80    /// To filter on multiple expressions, provide each separate expression within
81    /// parentheses. For example:
82    ///
83    /// ```norust
84    /// (name = "example-pc")
85    /// (createTime > "2021-04-12T08:15:10.40Z")
86    /// ```
87    ///
88    /// By default, each expression is an `AND` expression. However, you can
89    /// include `AND` and `OR` expressions explicitly. For example:
90    ///
91    /// ```norust
92    /// (name = "private-cloud-1") AND
93    /// (createTime > "2021-04-12T08:15:10.40Z") OR
94    /// (name = "private-cloud-2")
95    /// ```
96    #[serde(skip_serializing_if = "std::string::String::is_empty")]
97    pub filter: std::string::String,
98
99    /// Sorts list results by a certain order. By default, returned results are
100    /// ordered by `name` in ascending order. You can also sort results in
101    /// descending order based on the `name` value using `orderBy="name desc"`.
102    /// Currently, only ordering by `name` is supported.
103    #[serde(skip_serializing_if = "std::string::String::is_empty")]
104    pub order_by: std::string::String,
105}
106
107impl ListPrivateCloudsRequest {
108    pub fn new() -> Self {
109        std::default::Default::default()
110    }
111
112    /// Sets the value of [parent][crate::model::ListPrivateCloudsRequest::parent].
113    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
114        self.parent = v.into();
115        self
116    }
117
118    /// Sets the value of [page_size][crate::model::ListPrivateCloudsRequest::page_size].
119    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
120        self.page_size = v.into();
121        self
122    }
123
124    /// Sets the value of [page_token][crate::model::ListPrivateCloudsRequest::page_token].
125    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
126        self.page_token = v.into();
127        self
128    }
129
130    /// Sets the value of [filter][crate::model::ListPrivateCloudsRequest::filter].
131    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
132        self.filter = v.into();
133        self
134    }
135
136    /// Sets the value of [order_by][crate::model::ListPrivateCloudsRequest::order_by].
137    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
138        self.order_by = v.into();
139        self
140    }
141}
142
143impl wkt::message::Message for ListPrivateCloudsRequest {
144    fn typename() -> &'static str {
145        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsRequest"
146    }
147}
148
149/// Response message for
150/// [VmwareEngine.ListPrivateClouds][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]
151///
152/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]: crate::client::VmwareEngine::list_private_clouds
153#[serde_with::serde_as]
154#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
155#[serde(default, rename_all = "camelCase")]
156#[non_exhaustive]
157pub struct ListPrivateCloudsResponse {
158    /// A list of private clouds.
159    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
160    pub private_clouds: std::vec::Vec<crate::model::PrivateCloud>,
161
162    /// A token, which can be sent as `page_token` to retrieve the next page.
163    /// If this field is omitted, there are no subsequent pages.
164    #[serde(skip_serializing_if = "std::string::String::is_empty")]
165    pub next_page_token: std::string::String,
166
167    /// Locations that could not be reached when making an aggregated query using
168    /// wildcards.
169    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
170    pub unreachable: std::vec::Vec<std::string::String>,
171}
172
173impl ListPrivateCloudsResponse {
174    pub fn new() -> Self {
175        std::default::Default::default()
176    }
177
178    /// Sets the value of [next_page_token][crate::model::ListPrivateCloudsResponse::next_page_token].
179    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
180        self.next_page_token = v.into();
181        self
182    }
183
184    /// Sets the value of [private_clouds][crate::model::ListPrivateCloudsResponse::private_clouds].
185    pub fn set_private_clouds<T, V>(mut self, v: T) -> Self
186    where
187        T: std::iter::IntoIterator<Item = V>,
188        V: std::convert::Into<crate::model::PrivateCloud>,
189    {
190        use std::iter::Iterator;
191        self.private_clouds = v.into_iter().map(|i| i.into()).collect();
192        self
193    }
194
195    /// Sets the value of [unreachable][crate::model::ListPrivateCloudsResponse::unreachable].
196    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
197    where
198        T: std::iter::IntoIterator<Item = V>,
199        V: std::convert::Into<std::string::String>,
200    {
201        use std::iter::Iterator;
202        self.unreachable = v.into_iter().map(|i| i.into()).collect();
203        self
204    }
205}
206
207impl wkt::message::Message for ListPrivateCloudsResponse {
208    fn typename() -> &'static str {
209        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsResponse"
210    }
211}
212
213#[cfg(feature = "unstable-stream")]
214impl gax::paginator::PageableResponse for ListPrivateCloudsResponse {
215    type PageItem = crate::model::PrivateCloud;
216
217    fn items(self) -> std::vec::Vec<Self::PageItem> {
218        self.private_clouds
219    }
220
221    fn next_page_token(&self) -> std::string::String {
222        gax::paginator::extract_token(&self.next_page_token)
223    }
224}
225
226/// Request message for
227/// [VmwareEngine.GetPrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateCloud]
228///
229/// [google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateCloud]: crate::client::VmwareEngine::get_private_cloud
230#[serde_with::serde_as]
231#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
232#[serde(default, rename_all = "camelCase")]
233#[non_exhaustive]
234pub struct GetPrivateCloudRequest {
235    /// Required. The resource name of the private cloud to retrieve.
236    /// Resource names are schemeless URIs that follow the conventions in
237    /// <https://cloud.google.com/apis/design/resource_names>.
238    /// For example:
239    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
240    #[serde(skip_serializing_if = "std::string::String::is_empty")]
241    pub name: std::string::String,
242}
243
244impl GetPrivateCloudRequest {
245    pub fn new() -> Self {
246        std::default::Default::default()
247    }
248
249    /// Sets the value of [name][crate::model::GetPrivateCloudRequest::name].
250    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
251        self.name = v.into();
252        self
253    }
254}
255
256impl wkt::message::Message for GetPrivateCloudRequest {
257    fn typename() -> &'static str {
258        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateCloudRequest"
259    }
260}
261
262/// Request message for
263/// [VmwareEngine.CreatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]
264///
265/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]: crate::client::VmwareEngine::create_private_cloud
266#[serde_with::serde_as]
267#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
268#[serde(default, rename_all = "camelCase")]
269#[non_exhaustive]
270pub struct CreatePrivateCloudRequest {
271    /// Required. The resource name of the location to create the new
272    /// private cloud in. Resource names are schemeless URIs that follow the
273    /// conventions in <https://cloud.google.com/apis/design/resource_names>.
274    /// For example:
275    /// `projects/my-project/locations/us-central1-a`
276    #[serde(skip_serializing_if = "std::string::String::is_empty")]
277    pub parent: std::string::String,
278
279    /// Required. The user-provided identifier of the private cloud to be created.
280    /// This identifier must be unique among each `PrivateCloud` within the parent
281    /// and becomes the final token in the name URI.
282    /// The identifier must meet the following requirements:
283    ///
284    /// * Only contains 1-63 alphanumeric characters and hyphens
285    /// * Begins with an alphabetical character
286    /// * Ends with a non-hyphen character
287    /// * Not formatted as a UUID
288    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
289    ///   (section 3.5)
290    #[serde(skip_serializing_if = "std::string::String::is_empty")]
291    pub private_cloud_id: std::string::String,
292
293    /// Required. The initial description of the new private cloud.
294    #[serde(skip_serializing_if = "std::option::Option::is_none")]
295    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
296
297    /// Optional. The request ID must be a valid UUID with the exception that zero
298    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
299    #[serde(skip_serializing_if = "std::string::String::is_empty")]
300    pub request_id: std::string::String,
301
302    /// Optional. True if you want the request to be validated and not executed;
303    /// false otherwise.
304    pub validate_only: bool,
305}
306
307impl CreatePrivateCloudRequest {
308    pub fn new() -> Self {
309        std::default::Default::default()
310    }
311
312    /// Sets the value of [parent][crate::model::CreatePrivateCloudRequest::parent].
313    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
314        self.parent = v.into();
315        self
316    }
317
318    /// Sets the value of [private_cloud_id][crate::model::CreatePrivateCloudRequest::private_cloud_id].
319    pub fn set_private_cloud_id<T: std::convert::Into<std::string::String>>(
320        mut self,
321        v: T,
322    ) -> Self {
323        self.private_cloud_id = v.into();
324        self
325    }
326
327    /// Sets the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
328    pub fn set_private_cloud<
329        T: std::convert::Into<std::option::Option<crate::model::PrivateCloud>>,
330    >(
331        mut self,
332        v: T,
333    ) -> Self {
334        self.private_cloud = v.into();
335        self
336    }
337
338    /// Sets the value of [request_id][crate::model::CreatePrivateCloudRequest::request_id].
339    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
340        self.request_id = v.into();
341        self
342    }
343
344    /// Sets the value of [validate_only][crate::model::CreatePrivateCloudRequest::validate_only].
345    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
346        self.validate_only = v.into();
347        self
348    }
349}
350
351impl wkt::message::Message for CreatePrivateCloudRequest {
352    fn typename() -> &'static str {
353        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateCloudRequest"
354    }
355}
356
357/// Request message for
358/// [VmwareEngine.UpdatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]
359///
360/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]: crate::client::VmwareEngine::update_private_cloud
361#[serde_with::serde_as]
362#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
363#[serde(default, rename_all = "camelCase")]
364#[non_exhaustive]
365pub struct UpdatePrivateCloudRequest {
366    /// Required. Private cloud description.
367    #[serde(skip_serializing_if = "std::option::Option::is_none")]
368    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
369
370    /// Required. Field mask is used to specify the fields to be overwritten in the
371    /// `PrivateCloud` resource by the update. The fields specified in `updateMask`
372    /// are relative to the resource, not the full request. A field will be
373    /// overwritten if it is in the mask. If the user does not provide a mask then
374    /// all fields will be overwritten.
375    #[serde(skip_serializing_if = "std::option::Option::is_none")]
376    pub update_mask: std::option::Option<wkt::FieldMask>,
377
378    /// Optional. The request ID must be a valid UUID with the exception that zero
379    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
380    #[serde(skip_serializing_if = "std::string::String::is_empty")]
381    pub request_id: std::string::String,
382}
383
384impl UpdatePrivateCloudRequest {
385    pub fn new() -> Self {
386        std::default::Default::default()
387    }
388
389    /// Sets the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
390    pub fn set_private_cloud<
391        T: std::convert::Into<std::option::Option<crate::model::PrivateCloud>>,
392    >(
393        mut self,
394        v: T,
395    ) -> Self {
396        self.private_cloud = v.into();
397        self
398    }
399
400    /// Sets the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
401    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
402        mut self,
403        v: T,
404    ) -> Self {
405        self.update_mask = v.into();
406        self
407    }
408
409    /// Sets the value of [request_id][crate::model::UpdatePrivateCloudRequest::request_id].
410    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
411        self.request_id = v.into();
412        self
413    }
414}
415
416impl wkt::message::Message for UpdatePrivateCloudRequest {
417    fn typename() -> &'static str {
418        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest"
419    }
420}
421
422/// Request message for
423/// [VmwareEngine.DeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]
424///
425/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]: crate::client::VmwareEngine::delete_private_cloud
426#[serde_with::serde_as]
427#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
428#[serde(default, rename_all = "camelCase")]
429#[non_exhaustive]
430pub struct DeletePrivateCloudRequest {
431    /// Required. The resource name of the private cloud to delete.
432    /// Resource names are schemeless URIs that follow the conventions in
433    /// <https://cloud.google.com/apis/design/resource_names>.
434    /// For example:
435    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
436    #[serde(skip_serializing_if = "std::string::String::is_empty")]
437    pub name: std::string::String,
438
439    /// Optional. The request ID must be a valid UUID with the exception that zero
440    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
441    #[serde(skip_serializing_if = "std::string::String::is_empty")]
442    pub request_id: std::string::String,
443
444    /// Optional. If set to true, cascade delete is enabled and all children of
445    /// this private cloud resource are also deleted. When this flag is set to
446    /// false, the private cloud will not be deleted if there are any children
447    /// other than the management cluster. The management cluster is always
448    /// deleted.
449    pub force: bool,
450
451    /// Optional. Time delay of the deletion specified in hours. The default value
452    /// is `3`. Specifying a non-zero value for this field changes the value of
453    /// `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned
454    /// deletion time. Deletion can be cancelled before `expire_time` elapses using
455    /// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud].
456    /// Specifying a value of `0` for this field instead begins the deletion
457    /// process and ceases billing immediately. During the final deletion process,
458    /// the value of `PrivateCloud.state` becomes `PURGING`.
459    ///
460    /// [google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]: crate::client::VmwareEngine::undelete_private_cloud
461    #[serde(skip_serializing_if = "std::option::Option::is_none")]
462    pub delay_hours: std::option::Option<i32>,
463}
464
465impl DeletePrivateCloudRequest {
466    pub fn new() -> Self {
467        std::default::Default::default()
468    }
469
470    /// Sets the value of [name][crate::model::DeletePrivateCloudRequest::name].
471    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
472        self.name = v.into();
473        self
474    }
475
476    /// Sets the value of [request_id][crate::model::DeletePrivateCloudRequest::request_id].
477    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
478        self.request_id = v.into();
479        self
480    }
481
482    /// Sets the value of [force][crate::model::DeletePrivateCloudRequest::force].
483    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
484        self.force = v.into();
485        self
486    }
487
488    /// Sets the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
489    pub fn set_delay_hours<T: std::convert::Into<std::option::Option<i32>>>(
490        mut self,
491        v: T,
492    ) -> Self {
493        self.delay_hours = v.into();
494        self
495    }
496}
497
498impl wkt::message::Message for DeletePrivateCloudRequest {
499    fn typename() -> &'static str {
500        "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateCloudRequest"
501    }
502}
503
504/// Request message for
505/// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]
506///
507/// [google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]: crate::client::VmwareEngine::undelete_private_cloud
508#[serde_with::serde_as]
509#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
510#[serde(default, rename_all = "camelCase")]
511#[non_exhaustive]
512pub struct UndeletePrivateCloudRequest {
513    /// Required. The resource name of the private cloud scheduled for deletion.
514    /// Resource names are schemeless URIs that follow the conventions in
515    /// <https://cloud.google.com/apis/design/resource_names>.
516    /// For example:
517    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
518    #[serde(skip_serializing_if = "std::string::String::is_empty")]
519    pub name: std::string::String,
520
521    /// Optional. The request ID must be a valid UUID with the exception that zero
522    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
523    #[serde(skip_serializing_if = "std::string::String::is_empty")]
524    pub request_id: std::string::String,
525}
526
527impl UndeletePrivateCloudRequest {
528    pub fn new() -> Self {
529        std::default::Default::default()
530    }
531
532    /// Sets the value of [name][crate::model::UndeletePrivateCloudRequest::name].
533    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
534        self.name = v.into();
535        self
536    }
537
538    /// Sets the value of [request_id][crate::model::UndeletePrivateCloudRequest::request_id].
539    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
540        self.request_id = v.into();
541        self
542    }
543}
544
545impl wkt::message::Message for UndeletePrivateCloudRequest {
546    fn typename() -> &'static str {
547        "type.googleapis.com/google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest"
548    }
549}
550
551/// Request message for
552/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
553///
554/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
555#[serde_with::serde_as]
556#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
557#[serde(default, rename_all = "camelCase")]
558#[non_exhaustive]
559pub struct ListClustersRequest {
560    /// Required. The resource name of the private cloud to query for clusters.
561    /// Resource names are schemeless URIs that follow the conventions in
562    /// <https://cloud.google.com/apis/design/resource_names>.
563    /// For example:
564    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
565    #[serde(skip_serializing_if = "std::string::String::is_empty")]
566    pub parent: std::string::String,
567
568    /// The maximum number of clusters to return in one page.
569    /// The service may return fewer than this value.
570    /// The maximum value is coerced to 1000.
571    /// The default value of this field is 500.
572    pub page_size: i32,
573
574    /// A page token, received from a previous `ListClusters` call.
575    /// Provide this to retrieve the subsequent page.
576    ///
577    /// When paginating, all other parameters provided to `ListClusters`
578    /// must match the call that provided the page token.
579    #[serde(skip_serializing_if = "std::string::String::is_empty")]
580    pub page_token: std::string::String,
581
582    /// To filter on multiple expressions, provide each separate expression within
583    /// parentheses. For example:
584    ///
585    /// ```norust
586    /// (name = "example-cluster")
587    /// (nodeCount = "3")
588    /// ```
589    ///
590    /// By default, each expression is an `AND` expression. However, you can
591    /// include `AND` and `OR` expressions explicitly. For example:
592    ///
593    /// ```norust
594    /// (name = "example-cluster-1") AND
595    /// (createTime > "2021-04-12T08:15:10.40Z") OR
596    /// (name = "example-cluster-2")
597    /// ```
598    #[serde(skip_serializing_if = "std::string::String::is_empty")]
599    pub filter: std::string::String,
600
601    /// Sorts list results by a certain order. By default, returned results are
602    /// ordered by `name` in ascending order. You can also sort results in
603    /// descending order based on the `name` value using `orderBy="name desc"`.
604    /// Currently, only ordering by `name` is supported.
605    #[serde(skip_serializing_if = "std::string::String::is_empty")]
606    pub order_by: std::string::String,
607}
608
609impl ListClustersRequest {
610    pub fn new() -> Self {
611        std::default::Default::default()
612    }
613
614    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
615    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
616        self.parent = v.into();
617        self
618    }
619
620    /// Sets the value of [page_size][crate::model::ListClustersRequest::page_size].
621    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
622        self.page_size = v.into();
623        self
624    }
625
626    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
627    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
628        self.page_token = v.into();
629        self
630    }
631
632    /// Sets the value of [filter][crate::model::ListClustersRequest::filter].
633    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
634        self.filter = v.into();
635        self
636    }
637
638    /// Sets the value of [order_by][crate::model::ListClustersRequest::order_by].
639    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
640        self.order_by = v.into();
641        self
642    }
643}
644
645impl wkt::message::Message for ListClustersRequest {
646    fn typename() -> &'static str {
647        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersRequest"
648    }
649}
650
651/// Response message for
652/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
653///
654/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
655#[serde_with::serde_as]
656#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
657#[serde(default, rename_all = "camelCase")]
658#[non_exhaustive]
659pub struct ListClustersResponse {
660    /// A list of private cloud clusters.
661    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
662    pub clusters: std::vec::Vec<crate::model::Cluster>,
663
664    /// A token, which can be sent as `page_token` to retrieve the next page.
665    /// If this field is omitted, there are no subsequent pages.
666    #[serde(skip_serializing_if = "std::string::String::is_empty")]
667    pub next_page_token: std::string::String,
668
669    /// Locations that could not be reached when making an aggregated query using
670    /// wildcards.
671    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
672    pub unreachable: std::vec::Vec<std::string::String>,
673}
674
675impl ListClustersResponse {
676    pub fn new() -> Self {
677        std::default::Default::default()
678    }
679
680    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
681    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
682        self.next_page_token = v.into();
683        self
684    }
685
686    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
687    pub fn set_clusters<T, V>(mut self, v: T) -> Self
688    where
689        T: std::iter::IntoIterator<Item = V>,
690        V: std::convert::Into<crate::model::Cluster>,
691    {
692        use std::iter::Iterator;
693        self.clusters = v.into_iter().map(|i| i.into()).collect();
694        self
695    }
696
697    /// Sets the value of [unreachable][crate::model::ListClustersResponse::unreachable].
698    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
699    where
700        T: std::iter::IntoIterator<Item = V>,
701        V: std::convert::Into<std::string::String>,
702    {
703        use std::iter::Iterator;
704        self.unreachable = v.into_iter().map(|i| i.into()).collect();
705        self
706    }
707}
708
709impl wkt::message::Message for ListClustersResponse {
710    fn typename() -> &'static str {
711        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersResponse"
712    }
713}
714
715#[cfg(feature = "unstable-stream")]
716impl gax::paginator::PageableResponse for ListClustersResponse {
717    type PageItem = crate::model::Cluster;
718
719    fn items(self) -> std::vec::Vec<Self::PageItem> {
720        self.clusters
721    }
722
723    fn next_page_token(&self) -> std::string::String {
724        gax::paginator::extract_token(&self.next_page_token)
725    }
726}
727
728/// Request message for
729/// [VmwareEngine.GetCluster][google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]
730///
731/// [google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]: crate::client::VmwareEngine::get_cluster
732#[serde_with::serde_as]
733#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
734#[serde(default, rename_all = "camelCase")]
735#[non_exhaustive]
736pub struct GetClusterRequest {
737    /// Required. The cluster resource name to retrieve.
738    /// Resource names are schemeless URIs that follow the conventions in
739    /// <https://cloud.google.com/apis/design/resource_names>.
740    /// For example:
741    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
742    #[serde(skip_serializing_if = "std::string::String::is_empty")]
743    pub name: std::string::String,
744}
745
746impl GetClusterRequest {
747    pub fn new() -> Self {
748        std::default::Default::default()
749    }
750
751    /// Sets the value of [name][crate::model::GetClusterRequest::name].
752    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
753        self.name = v.into();
754        self
755    }
756}
757
758impl wkt::message::Message for GetClusterRequest {
759    fn typename() -> &'static str {
760        "type.googleapis.com/google.cloud.vmwareengine.v1.GetClusterRequest"
761    }
762}
763
764/// Request message for
765/// [VmwareEngine.CreateCluster][google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]
766///
767/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]: crate::client::VmwareEngine::create_cluster
768#[serde_with::serde_as]
769#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
770#[serde(default, rename_all = "camelCase")]
771#[non_exhaustive]
772pub struct CreateClusterRequest {
773    /// Required. The resource name of the private cloud to create a new cluster
774    /// in. Resource names are schemeless URIs that follow the conventions in
775    /// <https://cloud.google.com/apis/design/resource_names>.
776    /// For example:
777    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
778    #[serde(skip_serializing_if = "std::string::String::is_empty")]
779    pub parent: std::string::String,
780
781    /// Required. The user-provided identifier of the new `Cluster`.
782    /// This identifier must be unique among clusters within the parent and becomes
783    /// the final token in the name URI.
784    /// The identifier must meet the following requirements:
785    ///
786    /// * Only contains 1-63 alphanumeric characters and hyphens
787    /// * Begins with an alphabetical character
788    /// * Ends with a non-hyphen character
789    /// * Not formatted as a UUID
790    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
791    ///   (section 3.5)
792    #[serde(skip_serializing_if = "std::string::String::is_empty")]
793    pub cluster_id: std::string::String,
794
795    /// Required. The initial description of the new cluster.
796    #[serde(skip_serializing_if = "std::option::Option::is_none")]
797    pub cluster: std::option::Option<crate::model::Cluster>,
798
799    /// Optional. The request ID must be a valid UUID with the exception that zero
800    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
801    #[serde(skip_serializing_if = "std::string::String::is_empty")]
802    pub request_id: std::string::String,
803
804    /// Optional. True if you want the request to be validated and not executed;
805    /// false otherwise.
806    pub validate_only: bool,
807}
808
809impl CreateClusterRequest {
810    pub fn new() -> Self {
811        std::default::Default::default()
812    }
813
814    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
815    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
816        self.parent = v.into();
817        self
818    }
819
820    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
821    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
822        self.cluster_id = v.into();
823        self
824    }
825
826    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
827    pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
828        mut self,
829        v: T,
830    ) -> Self {
831        self.cluster = v.into();
832        self
833    }
834
835    /// Sets the value of [request_id][crate::model::CreateClusterRequest::request_id].
836    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
837        self.request_id = v.into();
838        self
839    }
840
841    /// Sets the value of [validate_only][crate::model::CreateClusterRequest::validate_only].
842    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
843        self.validate_only = v.into();
844        self
845    }
846}
847
848impl wkt::message::Message for CreateClusterRequest {
849    fn typename() -> &'static str {
850        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateClusterRequest"
851    }
852}
853
854/// Request message for
855/// [VmwareEngine.UpdateCluster][google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]
856///
857/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]: crate::client::VmwareEngine::update_cluster
858#[serde_with::serde_as]
859#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
860#[serde(default, rename_all = "camelCase")]
861#[non_exhaustive]
862pub struct UpdateClusterRequest {
863    /// Required. Field mask is used to specify the fields to be overwritten in the
864    /// `Cluster` resource by the update. The fields specified in the `updateMask`
865    /// are relative to the resource, not the full request. A field will be
866    /// overwritten if it is in the mask. If the user does not provide a mask then
867    /// all fields will be overwritten.
868    #[serde(skip_serializing_if = "std::option::Option::is_none")]
869    pub update_mask: std::option::Option<wkt::FieldMask>,
870
871    /// Required. The description of the cluster.
872    #[serde(skip_serializing_if = "std::option::Option::is_none")]
873    pub cluster: std::option::Option<crate::model::Cluster>,
874
875    /// Optional. The request ID must be a valid UUID with the exception that
876    /// zero UUID is not supported (00000000-0000-0000-0000-000000000000).
877    #[serde(skip_serializing_if = "std::string::String::is_empty")]
878    pub request_id: std::string::String,
879
880    /// Optional. True if you want the request to be validated and not executed;
881    /// false otherwise.
882    pub validate_only: bool,
883}
884
885impl UpdateClusterRequest {
886    pub fn new() -> Self {
887        std::default::Default::default()
888    }
889
890    /// Sets the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
891    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
892        mut self,
893        v: T,
894    ) -> Self {
895        self.update_mask = v.into();
896        self
897    }
898
899    /// Sets the value of [cluster][crate::model::UpdateClusterRequest::cluster].
900    pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
901        mut self,
902        v: T,
903    ) -> Self {
904        self.cluster = v.into();
905        self
906    }
907
908    /// Sets the value of [request_id][crate::model::UpdateClusterRequest::request_id].
909    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
910        self.request_id = v.into();
911        self
912    }
913
914    /// Sets the value of [validate_only][crate::model::UpdateClusterRequest::validate_only].
915    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
916        self.validate_only = v.into();
917        self
918    }
919}
920
921impl wkt::message::Message for UpdateClusterRequest {
922    fn typename() -> &'static str {
923        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateClusterRequest"
924    }
925}
926
927/// Request message for
928/// [VmwareEngine.DeleteCluster][google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]
929///
930/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]: crate::client::VmwareEngine::delete_cluster
931#[serde_with::serde_as]
932#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
933#[serde(default, rename_all = "camelCase")]
934#[non_exhaustive]
935pub struct DeleteClusterRequest {
936    /// Required. The resource name of the cluster to delete.
937    /// Resource names are schemeless URIs that follow the conventions in
938    /// <https://cloud.google.com/apis/design/resource_names>.
939    /// For example:
940    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
941    #[serde(skip_serializing_if = "std::string::String::is_empty")]
942    pub name: std::string::String,
943
944    /// Optional. The request ID must be a valid UUID with the exception that zero
945    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
946    #[serde(skip_serializing_if = "std::string::String::is_empty")]
947    pub request_id: std::string::String,
948}
949
950impl DeleteClusterRequest {
951    pub fn new() -> Self {
952        std::default::Default::default()
953    }
954
955    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
956    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
957        self.name = v.into();
958        self
959    }
960
961    /// Sets the value of [request_id][crate::model::DeleteClusterRequest::request_id].
962    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
963        self.request_id = v.into();
964        self
965    }
966}
967
968impl wkt::message::Message for DeleteClusterRequest {
969    fn typename() -> &'static str {
970        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteClusterRequest"
971    }
972}
973
974/// Request message for
975/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
976///
977/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
978#[serde_with::serde_as]
979#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
980#[serde(default, rename_all = "camelCase")]
981#[non_exhaustive]
982pub struct ListNodesRequest {
983    /// Required. The resource name of the cluster to be queried for nodes.
984    /// Resource names are schemeless URIs that follow the conventions in
985    /// <https://cloud.google.com/apis/design/resource_names>.
986    /// For example:
987    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
988    #[serde(skip_serializing_if = "std::string::String::is_empty")]
989    pub parent: std::string::String,
990
991    /// The maximum number of nodes to return in one page.
992    /// The service may return fewer than this value.
993    /// The maximum value is coerced to 1000.
994    /// The default value of this field is 500.
995    pub page_size: i32,
996
997    /// A page token, received from a previous `ListNodes` call.
998    /// Provide this to retrieve the subsequent page.
999    ///
1000    /// When paginating, all other parameters provided to
1001    /// `ListNodes` must match the call that provided the page
1002    /// token.
1003    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1004    pub page_token: std::string::String,
1005}
1006
1007impl ListNodesRequest {
1008    pub fn new() -> Self {
1009        std::default::Default::default()
1010    }
1011
1012    /// Sets the value of [parent][crate::model::ListNodesRequest::parent].
1013    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1014        self.parent = v.into();
1015        self
1016    }
1017
1018    /// Sets the value of [page_size][crate::model::ListNodesRequest::page_size].
1019    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1020        self.page_size = v.into();
1021        self
1022    }
1023
1024    /// Sets the value of [page_token][crate::model::ListNodesRequest::page_token].
1025    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1026        self.page_token = v.into();
1027        self
1028    }
1029}
1030
1031impl wkt::message::Message for ListNodesRequest {
1032    fn typename() -> &'static str {
1033        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesRequest"
1034    }
1035}
1036
1037/// Response message for
1038/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
1039///
1040/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
1041#[serde_with::serde_as]
1042#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1043#[serde(default, rename_all = "camelCase")]
1044#[non_exhaustive]
1045pub struct ListNodesResponse {
1046    /// The nodes.
1047    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1048    pub nodes: std::vec::Vec<crate::model::Node>,
1049
1050    /// A token, which can be sent as `page_token` to retrieve the next page.
1051    /// If this field is omitted, there are no subsequent pages.
1052    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1053    pub next_page_token: std::string::String,
1054}
1055
1056impl ListNodesResponse {
1057    pub fn new() -> Self {
1058        std::default::Default::default()
1059    }
1060
1061    /// Sets the value of [next_page_token][crate::model::ListNodesResponse::next_page_token].
1062    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1063        self.next_page_token = v.into();
1064        self
1065    }
1066
1067    /// Sets the value of [nodes][crate::model::ListNodesResponse::nodes].
1068    pub fn set_nodes<T, V>(mut self, v: T) -> Self
1069    where
1070        T: std::iter::IntoIterator<Item = V>,
1071        V: std::convert::Into<crate::model::Node>,
1072    {
1073        use std::iter::Iterator;
1074        self.nodes = v.into_iter().map(|i| i.into()).collect();
1075        self
1076    }
1077}
1078
1079impl wkt::message::Message for ListNodesResponse {
1080    fn typename() -> &'static str {
1081        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesResponse"
1082    }
1083}
1084
1085#[cfg(feature = "unstable-stream")]
1086impl gax::paginator::PageableResponse for ListNodesResponse {
1087    type PageItem = crate::model::Node;
1088
1089    fn items(self) -> std::vec::Vec<Self::PageItem> {
1090        self.nodes
1091    }
1092
1093    fn next_page_token(&self) -> std::string::String {
1094        gax::paginator::extract_token(&self.next_page_token)
1095    }
1096}
1097
1098/// Request message for
1099/// [VmwareEngine.GetNode][google.cloud.vmwareengine.v1.VmwareEngine.GetNode]
1100///
1101/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNode]: crate::client::VmwareEngine::get_node
1102#[serde_with::serde_as]
1103#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1104#[serde(default, rename_all = "camelCase")]
1105#[non_exhaustive]
1106pub struct GetNodeRequest {
1107    /// Required. The resource name of the node to retrieve.
1108    /// For example:
1109    /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}`
1110    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1111    pub name: std::string::String,
1112}
1113
1114impl GetNodeRequest {
1115    pub fn new() -> Self {
1116        std::default::Default::default()
1117    }
1118
1119    /// Sets the value of [name][crate::model::GetNodeRequest::name].
1120    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1121        self.name = v.into();
1122        self
1123    }
1124}
1125
1126impl wkt::message::Message for GetNodeRequest {
1127    fn typename() -> &'static str {
1128        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeRequest"
1129    }
1130}
1131
1132/// Request message for
1133/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1134///
1135/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1136#[serde_with::serde_as]
1137#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1138#[serde(default, rename_all = "camelCase")]
1139#[non_exhaustive]
1140pub struct ListExternalAddressesRequest {
1141    /// Required. The resource name of the private cloud to be queried for
1142    /// external IP addresses.
1143    /// Resource names are schemeless URIs that follow the conventions in
1144    /// <https://cloud.google.com/apis/design/resource_names>.
1145    /// For example:
1146    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1147    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1148    pub parent: std::string::String,
1149
1150    /// The maximum number of external IP addresses to return in one page.
1151    /// The service may return fewer than this value.
1152    /// The maximum value is coerced to 1000.
1153    /// The default value of this field is 500.
1154    pub page_size: i32,
1155
1156    /// A page token, received from a previous `ListExternalAddresses` call.
1157    /// Provide this to retrieve the subsequent page.
1158    ///
1159    /// When paginating, all other parameters provided to
1160    /// `ListExternalAddresses` must match the call that provided the page token.
1161    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1162    pub page_token: std::string::String,
1163
1164    /// A filter expression that matches resources returned in the response.
1165    /// The expression must specify the field name, a comparison
1166    /// operator, and the value that you want to use for filtering. The value
1167    /// must be a string, a number, or a boolean. The comparison operator
1168    /// must be `=`, `!=`, `>`, or `<`.
1169    ///
1170    /// For example, if you are filtering a list of IP addresses, you can
1171    /// exclude the ones named `example-ip` by specifying
1172    /// `name != "example-ip"`.
1173    ///
1174    /// To filter on multiple expressions, provide each separate expression within
1175    /// parentheses. For example:
1176    ///
1177    /// ```norust
1178    /// (name = "example-ip")
1179    /// (createTime > "2021-04-12T08:15:10.40Z")
1180    /// ```
1181    ///
1182    /// By default, each expression is an `AND` expression. However, you
1183    /// can include `AND` and `OR` expressions explicitly.
1184    /// For example:
1185    ///
1186    /// ```norust
1187    /// (name = "example-ip-1") AND
1188    /// (createTime > "2021-04-12T08:15:10.40Z") OR
1189    /// (name = "example-ip-2")
1190    /// ```
1191    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1192    pub filter: std::string::String,
1193
1194    /// Sorts list results by a certain order. By default, returned results
1195    /// are ordered by `name` in ascending order.
1196    /// You can also sort results in descending order based on the `name` value
1197    /// using `orderBy="name desc"`.
1198    /// Currently, only ordering by `name` is supported.
1199    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1200    pub order_by: std::string::String,
1201}
1202
1203impl ListExternalAddressesRequest {
1204    pub fn new() -> Self {
1205        std::default::Default::default()
1206    }
1207
1208    /// Sets the value of [parent][crate::model::ListExternalAddressesRequest::parent].
1209    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1210        self.parent = v.into();
1211        self
1212    }
1213
1214    /// Sets the value of [page_size][crate::model::ListExternalAddressesRequest::page_size].
1215    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1216        self.page_size = v.into();
1217        self
1218    }
1219
1220    /// Sets the value of [page_token][crate::model::ListExternalAddressesRequest::page_token].
1221    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1222        self.page_token = v.into();
1223        self
1224    }
1225
1226    /// Sets the value of [filter][crate::model::ListExternalAddressesRequest::filter].
1227    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1228        self.filter = v.into();
1229        self
1230    }
1231
1232    /// Sets the value of [order_by][crate::model::ListExternalAddressesRequest::order_by].
1233    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1234        self.order_by = v.into();
1235        self
1236    }
1237}
1238
1239impl wkt::message::Message for ListExternalAddressesRequest {
1240    fn typename() -> &'static str {
1241        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesRequest"
1242    }
1243}
1244
1245/// Response message for
1246/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1247///
1248/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1249#[serde_with::serde_as]
1250#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1251#[serde(default, rename_all = "camelCase")]
1252#[non_exhaustive]
1253pub struct ListExternalAddressesResponse {
1254    /// A list of external IP addresses.
1255    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1256    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1257
1258    /// A token, which can be sent as `page_token` to retrieve the next page.
1259    /// If this field is omitted, there are no subsequent pages.
1260    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1261    pub next_page_token: std::string::String,
1262
1263    /// Locations that could not be reached when making an aggregated query using
1264    /// wildcards.
1265    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1266    pub unreachable: std::vec::Vec<std::string::String>,
1267}
1268
1269impl ListExternalAddressesResponse {
1270    pub fn new() -> Self {
1271        std::default::Default::default()
1272    }
1273
1274    /// Sets the value of [next_page_token][crate::model::ListExternalAddressesResponse::next_page_token].
1275    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1276        self.next_page_token = v.into();
1277        self
1278    }
1279
1280    /// Sets the value of [external_addresses][crate::model::ListExternalAddressesResponse::external_addresses].
1281    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1282    where
1283        T: std::iter::IntoIterator<Item = V>,
1284        V: std::convert::Into<crate::model::ExternalAddress>,
1285    {
1286        use std::iter::Iterator;
1287        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1288        self
1289    }
1290
1291    /// Sets the value of [unreachable][crate::model::ListExternalAddressesResponse::unreachable].
1292    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1293    where
1294        T: std::iter::IntoIterator<Item = V>,
1295        V: std::convert::Into<std::string::String>,
1296    {
1297        use std::iter::Iterator;
1298        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1299        self
1300    }
1301}
1302
1303impl wkt::message::Message for ListExternalAddressesResponse {
1304    fn typename() -> &'static str {
1305        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesResponse"
1306    }
1307}
1308
1309#[cfg(feature = "unstable-stream")]
1310impl gax::paginator::PageableResponse for ListExternalAddressesResponse {
1311    type PageItem = crate::model::ExternalAddress;
1312
1313    fn items(self) -> std::vec::Vec<Self::PageItem> {
1314        self.external_addresses
1315    }
1316
1317    fn next_page_token(&self) -> std::string::String {
1318        gax::paginator::extract_token(&self.next_page_token)
1319    }
1320}
1321
1322/// Request message for
1323/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1324///
1325/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
1326#[serde_with::serde_as]
1327#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1328#[serde(default, rename_all = "camelCase")]
1329#[non_exhaustive]
1330pub struct FetchNetworkPolicyExternalAddressesRequest {
1331    /// Required. The resource name of the network policy to query for assigned
1332    /// external IP addresses. Resource names are schemeless URIs that follow the
1333    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
1334    /// example:
1335    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
1336    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1337    pub network_policy: std::string::String,
1338
1339    /// The maximum number of external IP addresses to return in one page.
1340    /// The service may return fewer than this value.
1341    /// The maximum value is coerced to 1000.
1342    /// The default value of this field is 500.
1343    pub page_size: i32,
1344
1345    /// A page token, received from a previous
1346    /// `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the
1347    /// subsequent page.
1348    ///
1349    /// When paginating, all parameters provided to
1350    /// `FetchNetworkPolicyExternalAddresses`, except for `page_size` and
1351    /// `page_token`, must match the call that provided the page token.
1352    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1353    pub page_token: std::string::String,
1354}
1355
1356impl FetchNetworkPolicyExternalAddressesRequest {
1357    pub fn new() -> Self {
1358        std::default::Default::default()
1359    }
1360
1361    /// Sets the value of [network_policy][crate::model::FetchNetworkPolicyExternalAddressesRequest::network_policy].
1362    pub fn set_network_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1363        self.network_policy = v.into();
1364        self
1365    }
1366
1367    /// Sets the value of [page_size][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_size].
1368    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1369        self.page_size = v.into();
1370        self
1371    }
1372
1373    /// Sets the value of [page_token][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_token].
1374    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1375        self.page_token = v.into();
1376        self
1377    }
1378}
1379
1380impl wkt::message::Message for FetchNetworkPolicyExternalAddressesRequest {
1381    fn typename() -> &'static str {
1382        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest"
1383    }
1384}
1385
1386/// Response message for
1387/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1388///
1389/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
1390#[serde_with::serde_as]
1391#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1392#[serde(default, rename_all = "camelCase")]
1393#[non_exhaustive]
1394pub struct FetchNetworkPolicyExternalAddressesResponse {
1395    /// A list of external IP addresses assigned to VMware workload VMs within the
1396    /// scope of the given network policy.
1397    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1398    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1399
1400    /// A token, which can be sent as `page_token` to retrieve the next page.
1401    /// If this field is omitted, there are no subsequent pages.
1402    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1403    pub next_page_token: std::string::String,
1404}
1405
1406impl FetchNetworkPolicyExternalAddressesResponse {
1407    pub fn new() -> Self {
1408        std::default::Default::default()
1409    }
1410
1411    /// Sets the value of [next_page_token][crate::model::FetchNetworkPolicyExternalAddressesResponse::next_page_token].
1412    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1413        self.next_page_token = v.into();
1414        self
1415    }
1416
1417    /// Sets the value of [external_addresses][crate::model::FetchNetworkPolicyExternalAddressesResponse::external_addresses].
1418    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1419    where
1420        T: std::iter::IntoIterator<Item = V>,
1421        V: std::convert::Into<crate::model::ExternalAddress>,
1422    {
1423        use std::iter::Iterator;
1424        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1425        self
1426    }
1427}
1428
1429impl wkt::message::Message for FetchNetworkPolicyExternalAddressesResponse {
1430    fn typename() -> &'static str {
1431        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesResponse"
1432    }
1433}
1434
1435#[cfg(feature = "unstable-stream")]
1436impl gax::paginator::PageableResponse for FetchNetworkPolicyExternalAddressesResponse {
1437    type PageItem = crate::model::ExternalAddress;
1438
1439    fn items(self) -> std::vec::Vec<Self::PageItem> {
1440        self.external_addresses
1441    }
1442
1443    fn next_page_token(&self) -> std::string::String {
1444        gax::paginator::extract_token(&self.next_page_token)
1445    }
1446}
1447
1448/// Request message for
1449/// [VmwareEngine.GetExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]
1450///
1451/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]: crate::client::VmwareEngine::get_external_address
1452#[serde_with::serde_as]
1453#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1454#[serde(default, rename_all = "camelCase")]
1455#[non_exhaustive]
1456pub struct GetExternalAddressRequest {
1457    /// Required. The resource name of the external IP address to retrieve.
1458    /// Resource names are schemeless URIs that follow the conventions in
1459    /// <https://cloud.google.com/apis/design/resource_names>.
1460    /// For example:
1461    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
1462    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1463    pub name: std::string::String,
1464}
1465
1466impl GetExternalAddressRequest {
1467    pub fn new() -> Self {
1468        std::default::Default::default()
1469    }
1470
1471    /// Sets the value of [name][crate::model::GetExternalAddressRequest::name].
1472    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1473        self.name = v.into();
1474        self
1475    }
1476}
1477
1478impl wkt::message::Message for GetExternalAddressRequest {
1479    fn typename() -> &'static str {
1480        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAddressRequest"
1481    }
1482}
1483
1484/// Request message for
1485/// [VmwareEngine.CreateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]
1486///
1487/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]: crate::client::VmwareEngine::create_external_address
1488#[serde_with::serde_as]
1489#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1490#[serde(default, rename_all = "camelCase")]
1491#[non_exhaustive]
1492pub struct CreateExternalAddressRequest {
1493    /// Required. The resource name of the private cloud
1494    /// to create a new external IP address in.
1495    /// Resource names are schemeless URIs that follow the conventions in
1496    /// <https://cloud.google.com/apis/design/resource_names>.
1497    /// For example:
1498    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1499    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1500    pub parent: std::string::String,
1501
1502    /// Required. The initial description of a new external IP address.
1503    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1504    pub external_address: std::option::Option<crate::model::ExternalAddress>,
1505
1506    /// Required. The user-provided identifier of the `ExternalAddress` to be
1507    /// created. This identifier must be unique among `ExternalAddress` resources
1508    /// within the parent and becomes the final token in the name URI. The
1509    /// identifier must meet the following requirements:
1510    ///
1511    /// * Only contains 1-63 alphanumeric characters and hyphens
1512    /// * Begins with an alphabetical character
1513    /// * Ends with a non-hyphen character
1514    /// * Not formatted as a UUID
1515    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
1516    ///   (section 3.5)
1517    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1518    pub external_address_id: std::string::String,
1519
1520    /// Optional. A request ID to identify requests. Specify a unique request ID
1521    /// so that if you must retry your request, the server will know to ignore
1522    /// the request if it has already been completed. The server guarantees that a
1523    /// request doesn't result in creation of duplicate commitments for at least 60
1524    /// minutes.
1525    ///
1526    /// For example, consider a situation where you make an initial request and the
1527    /// request times out. If you make the request again with the same request ID,
1528    /// the server can check if the original operation with the same request ID was
1529    /// received, and if so, will ignore the second request. This prevents clients
1530    /// from accidentally creating duplicate commitments.
1531    ///
1532    /// The request ID must be a valid UUID with the exception that zero UUID is
1533    /// not supported (00000000-0000-0000-0000-000000000000).
1534    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1535    pub request_id: std::string::String,
1536}
1537
1538impl CreateExternalAddressRequest {
1539    pub fn new() -> Self {
1540        std::default::Default::default()
1541    }
1542
1543    /// Sets the value of [parent][crate::model::CreateExternalAddressRequest::parent].
1544    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1545        self.parent = v.into();
1546        self
1547    }
1548
1549    /// Sets the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
1550    pub fn set_external_address<
1551        T: std::convert::Into<std::option::Option<crate::model::ExternalAddress>>,
1552    >(
1553        mut self,
1554        v: T,
1555    ) -> Self {
1556        self.external_address = v.into();
1557        self
1558    }
1559
1560    /// Sets the value of [external_address_id][crate::model::CreateExternalAddressRequest::external_address_id].
1561    pub fn set_external_address_id<T: std::convert::Into<std::string::String>>(
1562        mut self,
1563        v: T,
1564    ) -> Self {
1565        self.external_address_id = v.into();
1566        self
1567    }
1568
1569    /// Sets the value of [request_id][crate::model::CreateExternalAddressRequest::request_id].
1570    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1571        self.request_id = v.into();
1572        self
1573    }
1574}
1575
1576impl wkt::message::Message for CreateExternalAddressRequest {
1577    fn typename() -> &'static str {
1578        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAddressRequest"
1579    }
1580}
1581
1582/// Request message for
1583/// [VmwareEngine.UpdateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]
1584///
1585/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]: crate::client::VmwareEngine::update_external_address
1586#[serde_with::serde_as]
1587#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1588#[serde(default, rename_all = "camelCase")]
1589#[non_exhaustive]
1590pub struct UpdateExternalAddressRequest {
1591    /// Required. Field mask is used to specify the fields to be overwritten in the
1592    /// `ExternalAddress` resource by the update.
1593    /// The fields specified in the `update_mask` are relative to the resource, not
1594    /// the full request. A field will be overwritten if it is in the mask. If the
1595    /// user does not provide a mask then all fields will be overwritten.
1596    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1597    pub update_mask: std::option::Option<wkt::FieldMask>,
1598
1599    /// Required. External IP address description.
1600    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1601    pub external_address: std::option::Option<crate::model::ExternalAddress>,
1602
1603    /// Optional. A request ID to identify requests. Specify a unique request ID
1604    /// so that if you must retry your request, the server will know to ignore
1605    /// the request if it has already been completed. The server guarantees that a
1606    /// request doesn't result in creation of duplicate commitments for at least 60
1607    /// minutes.
1608    ///
1609    /// For example, consider a situation where you make an initial request and the
1610    /// request times out. If you make the request again with the same request ID,
1611    /// the server can check if the original operation with the same request ID was
1612    /// received, and if so, will ignore the second request. This prevents clients
1613    /// from accidentally creating duplicate commitments.
1614    ///
1615    /// The request ID must be a valid UUID with the exception that zero UUID is
1616    /// not supported (00000000-0000-0000-0000-000000000000).
1617    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1618    pub request_id: std::string::String,
1619}
1620
1621impl UpdateExternalAddressRequest {
1622    pub fn new() -> Self {
1623        std::default::Default::default()
1624    }
1625
1626    /// Sets the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
1627    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
1628        mut self,
1629        v: T,
1630    ) -> Self {
1631        self.update_mask = v.into();
1632        self
1633    }
1634
1635    /// Sets the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
1636    pub fn set_external_address<
1637        T: std::convert::Into<std::option::Option<crate::model::ExternalAddress>>,
1638    >(
1639        mut self,
1640        v: T,
1641    ) -> Self {
1642        self.external_address = v.into();
1643        self
1644    }
1645
1646    /// Sets the value of [request_id][crate::model::UpdateExternalAddressRequest::request_id].
1647    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1648        self.request_id = v.into();
1649        self
1650    }
1651}
1652
1653impl wkt::message::Message for UpdateExternalAddressRequest {
1654    fn typename() -> &'static str {
1655        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAddressRequest"
1656    }
1657}
1658
1659/// Request message for
1660/// [VmwareEngine.DeleteExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]
1661///
1662/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]: crate::client::VmwareEngine::delete_external_address
1663#[serde_with::serde_as]
1664#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1665#[serde(default, rename_all = "camelCase")]
1666#[non_exhaustive]
1667pub struct DeleteExternalAddressRequest {
1668    /// Required. The resource name of the external IP address to delete.
1669    /// Resource names are schemeless URIs that follow the conventions in
1670    /// <https://cloud.google.com/apis/design/resource_names>.
1671    /// For example:
1672    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
1673    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1674    pub name: std::string::String,
1675
1676    /// Optional. A request ID to identify requests. Specify a unique request ID
1677    /// so that if you must retry your request, the server will know to ignore
1678    /// the request if it has already been completed. The server guarantees that a
1679    /// request doesn't result in creation of duplicate commitments for at least 60
1680    /// minutes.
1681    ///
1682    /// For example, consider a situation where you make an initial request and the
1683    /// request times out. If you make the request again with the same request
1684    /// ID, the server can check if the original operation with the same request ID
1685    /// was received, and if so, will ignore the second request. This prevents
1686    /// clients from accidentally creating duplicate commitments.
1687    ///
1688    /// The request ID must be a valid UUID with the exception that zero UUID is
1689    /// not supported (00000000-0000-0000-0000-000000000000).
1690    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1691    pub request_id: std::string::String,
1692}
1693
1694impl DeleteExternalAddressRequest {
1695    pub fn new() -> Self {
1696        std::default::Default::default()
1697    }
1698
1699    /// Sets the value of [name][crate::model::DeleteExternalAddressRequest::name].
1700    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1701        self.name = v.into();
1702        self
1703    }
1704
1705    /// Sets the value of [request_id][crate::model::DeleteExternalAddressRequest::request_id].
1706    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1707        self.request_id = v.into();
1708        self
1709    }
1710}
1711
1712impl wkt::message::Message for DeleteExternalAddressRequest {
1713    fn typename() -> &'static str {
1714        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAddressRequest"
1715    }
1716}
1717
1718/// Request message for
1719/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
1720///
1721/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
1722#[serde_with::serde_as]
1723#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1724#[serde(default, rename_all = "camelCase")]
1725#[non_exhaustive]
1726pub struct ListSubnetsRequest {
1727    /// Required. The resource name of the private cloud to be queried for
1728    /// subnets.
1729    /// Resource names are schemeless URIs that follow the conventions in
1730    /// <https://cloud.google.com/apis/design/resource_names>.
1731    /// For example:
1732    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1733    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1734    pub parent: std::string::String,
1735
1736    /// The maximum number of subnets to return in one page.
1737    /// The service may return fewer than this value.
1738    /// The maximum value is coerced to 1000.
1739    /// The default value of this field is 500.
1740    pub page_size: i32,
1741
1742    /// A page token, received from a previous `ListSubnetsRequest` call.
1743    /// Provide this to retrieve the subsequent page.
1744    ///
1745    /// When paginating, all other parameters provided to
1746    /// `ListSubnetsRequest` must match the call that provided the page token.
1747    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1748    pub page_token: std::string::String,
1749}
1750
1751impl ListSubnetsRequest {
1752    pub fn new() -> Self {
1753        std::default::Default::default()
1754    }
1755
1756    /// Sets the value of [parent][crate::model::ListSubnetsRequest::parent].
1757    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1758        self.parent = v.into();
1759        self
1760    }
1761
1762    /// Sets the value of [page_size][crate::model::ListSubnetsRequest::page_size].
1763    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1764        self.page_size = v.into();
1765        self
1766    }
1767
1768    /// Sets the value of [page_token][crate::model::ListSubnetsRequest::page_token].
1769    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1770        self.page_token = v.into();
1771        self
1772    }
1773}
1774
1775impl wkt::message::Message for ListSubnetsRequest {
1776    fn typename() -> &'static str {
1777        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsRequest"
1778    }
1779}
1780
1781/// Response message for
1782/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
1783///
1784/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
1785#[serde_with::serde_as]
1786#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1787#[serde(default, rename_all = "camelCase")]
1788#[non_exhaustive]
1789pub struct ListSubnetsResponse {
1790    /// A list of subnets.
1791    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1792    pub subnets: std::vec::Vec<crate::model::Subnet>,
1793
1794    /// A token, which can be sent as `page_token` to retrieve the next page.
1795    /// If this field is omitted, there are no subsequent pages.
1796    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1797    pub next_page_token: std::string::String,
1798
1799    /// Locations that could not be reached when making an aggregated query using
1800    /// wildcards.
1801    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1802    pub unreachable: std::vec::Vec<std::string::String>,
1803}
1804
1805impl ListSubnetsResponse {
1806    pub fn new() -> Self {
1807        std::default::Default::default()
1808    }
1809
1810    /// Sets the value of [next_page_token][crate::model::ListSubnetsResponse::next_page_token].
1811    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1812        self.next_page_token = v.into();
1813        self
1814    }
1815
1816    /// Sets the value of [subnets][crate::model::ListSubnetsResponse::subnets].
1817    pub fn set_subnets<T, V>(mut self, v: T) -> Self
1818    where
1819        T: std::iter::IntoIterator<Item = V>,
1820        V: std::convert::Into<crate::model::Subnet>,
1821    {
1822        use std::iter::Iterator;
1823        self.subnets = v.into_iter().map(|i| i.into()).collect();
1824        self
1825    }
1826
1827    /// Sets the value of [unreachable][crate::model::ListSubnetsResponse::unreachable].
1828    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1829    where
1830        T: std::iter::IntoIterator<Item = V>,
1831        V: std::convert::Into<std::string::String>,
1832    {
1833        use std::iter::Iterator;
1834        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1835        self
1836    }
1837}
1838
1839impl wkt::message::Message for ListSubnetsResponse {
1840    fn typename() -> &'static str {
1841        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsResponse"
1842    }
1843}
1844
1845#[cfg(feature = "unstable-stream")]
1846impl gax::paginator::PageableResponse for ListSubnetsResponse {
1847    type PageItem = crate::model::Subnet;
1848
1849    fn items(self) -> std::vec::Vec<Self::PageItem> {
1850        self.subnets
1851    }
1852
1853    fn next_page_token(&self) -> std::string::String {
1854        gax::paginator::extract_token(&self.next_page_token)
1855    }
1856}
1857
1858/// Request message for
1859/// [VmwareEngine.GetSubnet][google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]
1860///
1861/// [google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]: crate::client::VmwareEngine::get_subnet
1862#[serde_with::serde_as]
1863#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1864#[serde(default, rename_all = "camelCase")]
1865#[non_exhaustive]
1866pub struct GetSubnetRequest {
1867    /// Required. The resource name of the subnet to retrieve.
1868    /// Resource names are schemeless URIs that follow the conventions in
1869    /// <https://cloud.google.com/apis/design/resource_names>.
1870    /// For example:
1871    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
1872    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1873    pub name: std::string::String,
1874}
1875
1876impl GetSubnetRequest {
1877    pub fn new() -> Self {
1878        std::default::Default::default()
1879    }
1880
1881    /// Sets the value of [name][crate::model::GetSubnetRequest::name].
1882    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1883        self.name = v.into();
1884        self
1885    }
1886}
1887
1888impl wkt::message::Message for GetSubnetRequest {
1889    fn typename() -> &'static str {
1890        "type.googleapis.com/google.cloud.vmwareengine.v1.GetSubnetRequest"
1891    }
1892}
1893
1894/// Request message for
1895/// [VmwareEngine.UpdateSubnet][google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]
1896///
1897/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]: crate::client::VmwareEngine::update_subnet
1898#[serde_with::serde_as]
1899#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1900#[serde(default, rename_all = "camelCase")]
1901#[non_exhaustive]
1902pub struct UpdateSubnetRequest {
1903    /// Required. Field mask is used to specify the fields to be overwritten in the
1904    /// `Subnet` resource by the update.
1905    /// The fields specified in the `update_mask` are relative to the resource, not
1906    /// the full request. A field will be overwritten if it is in the mask. If the
1907    /// user does not provide a mask then all fields will be overwritten.
1908    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1909    pub update_mask: std::option::Option<wkt::FieldMask>,
1910
1911    /// Required. Subnet description.
1912    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1913    pub subnet: std::option::Option<crate::model::Subnet>,
1914}
1915
1916impl UpdateSubnetRequest {
1917    pub fn new() -> Self {
1918        std::default::Default::default()
1919    }
1920
1921    /// Sets the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
1922    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
1923        mut self,
1924        v: T,
1925    ) -> Self {
1926        self.update_mask = v.into();
1927        self
1928    }
1929
1930    /// Sets the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
1931    pub fn set_subnet<T: std::convert::Into<std::option::Option<crate::model::Subnet>>>(
1932        mut self,
1933        v: T,
1934    ) -> Self {
1935        self.subnet = v.into();
1936        self
1937    }
1938}
1939
1940impl wkt::message::Message for UpdateSubnetRequest {
1941    fn typename() -> &'static str {
1942        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateSubnetRequest"
1943    }
1944}
1945
1946/// Request message for
1947/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
1948///
1949/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
1950#[serde_with::serde_as]
1951#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1952#[serde(default, rename_all = "camelCase")]
1953#[non_exhaustive]
1954pub struct ListExternalAccessRulesRequest {
1955    /// Required. The resource name of the network policy to query for external
1956    /// access firewall rules. Resource names are schemeless URIs that follow the
1957    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
1958    /// example:
1959    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
1960    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1961    pub parent: std::string::String,
1962
1963    /// The maximum number of external access rules to return in one page.
1964    /// The service may return fewer than this value.
1965    /// The maximum value is coerced to 1000.
1966    /// The default value of this field is 500.
1967    pub page_size: i32,
1968
1969    /// A page token, received from a previous `ListExternalAccessRulesRequest`
1970    /// call. Provide this to retrieve the subsequent page.
1971    ///
1972    /// When paginating, all other parameters provided to
1973    /// `ListExternalAccessRulesRequest` must match the call that provided the page
1974    /// token.
1975    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1976    pub page_token: std::string::String,
1977
1978    /// A filter expression that matches resources returned in the response.
1979    /// The expression must specify the field name, a comparison
1980    /// operator, and the value that you want to use for filtering. The value
1981    /// must be a string, a number, or a boolean. The comparison operator
1982    /// must be `=`, `!=`, `>`, or `<`.
1983    ///
1984    /// For example, if you are filtering a list of external access rules, you can
1985    /// exclude the ones named `example-rule` by specifying
1986    /// `name != "example-rule"`.
1987    ///
1988    /// To filter on multiple expressions, provide each separate expression within
1989    /// parentheses. For example:
1990    ///
1991    /// ```norust
1992    /// (name = "example-rule")
1993    /// (createTime > "2021-04-12T08:15:10.40Z")
1994    /// ```
1995    ///
1996    /// By default, each expression is an `AND` expression. However, you
1997    /// can include `AND` and `OR` expressions explicitly.
1998    /// For example:
1999    ///
2000    /// ```norust
2001    /// (name = "example-rule-1") AND
2002    /// (createTime > "2021-04-12T08:15:10.40Z") OR
2003    /// (name = "example-rule-2")
2004    /// ```
2005    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2006    pub filter: std::string::String,
2007
2008    /// Sorts list results by a certain order. By default, returned results
2009    /// are ordered by `name` in ascending order.
2010    /// You can also sort results in descending order based on the `name` value
2011    /// using `orderBy="name desc"`.
2012    /// Currently, only ordering by `name` is supported.
2013    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2014    pub order_by: std::string::String,
2015}
2016
2017impl ListExternalAccessRulesRequest {
2018    pub fn new() -> Self {
2019        std::default::Default::default()
2020    }
2021
2022    /// Sets the value of [parent][crate::model::ListExternalAccessRulesRequest::parent].
2023    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2024        self.parent = v.into();
2025        self
2026    }
2027
2028    /// Sets the value of [page_size][crate::model::ListExternalAccessRulesRequest::page_size].
2029    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2030        self.page_size = v.into();
2031        self
2032    }
2033
2034    /// Sets the value of [page_token][crate::model::ListExternalAccessRulesRequest::page_token].
2035    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2036        self.page_token = v.into();
2037        self
2038    }
2039
2040    /// Sets the value of [filter][crate::model::ListExternalAccessRulesRequest::filter].
2041    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2042        self.filter = v.into();
2043        self
2044    }
2045
2046    /// Sets the value of [order_by][crate::model::ListExternalAccessRulesRequest::order_by].
2047    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2048        self.order_by = v.into();
2049        self
2050    }
2051}
2052
2053impl wkt::message::Message for ListExternalAccessRulesRequest {
2054    fn typename() -> &'static str {
2055        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest"
2056    }
2057}
2058
2059/// Response message for
2060/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
2061///
2062/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
2063#[serde_with::serde_as]
2064#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2065#[serde(default, rename_all = "camelCase")]
2066#[non_exhaustive]
2067pub struct ListExternalAccessRulesResponse {
2068    /// A list of external access firewall rules.
2069    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2070    pub external_access_rules: std::vec::Vec<crate::model::ExternalAccessRule>,
2071
2072    /// A token, which can be sent as `page_token` to retrieve the next page.
2073    /// If this field is omitted, there are no subsequent pages.
2074    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2075    pub next_page_token: std::string::String,
2076
2077    /// Locations that could not be reached when making an aggregated query using
2078    /// wildcards.
2079    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2080    pub unreachable: std::vec::Vec<std::string::String>,
2081}
2082
2083impl ListExternalAccessRulesResponse {
2084    pub fn new() -> Self {
2085        std::default::Default::default()
2086    }
2087
2088    /// Sets the value of [next_page_token][crate::model::ListExternalAccessRulesResponse::next_page_token].
2089    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2090        self.next_page_token = v.into();
2091        self
2092    }
2093
2094    /// Sets the value of [external_access_rules][crate::model::ListExternalAccessRulesResponse::external_access_rules].
2095    pub fn set_external_access_rules<T, V>(mut self, v: T) -> Self
2096    where
2097        T: std::iter::IntoIterator<Item = V>,
2098        V: std::convert::Into<crate::model::ExternalAccessRule>,
2099    {
2100        use std::iter::Iterator;
2101        self.external_access_rules = v.into_iter().map(|i| i.into()).collect();
2102        self
2103    }
2104
2105    /// Sets the value of [unreachable][crate::model::ListExternalAccessRulesResponse::unreachable].
2106    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2107    where
2108        T: std::iter::IntoIterator<Item = V>,
2109        V: std::convert::Into<std::string::String>,
2110    {
2111        use std::iter::Iterator;
2112        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2113        self
2114    }
2115}
2116
2117impl wkt::message::Message for ListExternalAccessRulesResponse {
2118    fn typename() -> &'static str {
2119        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesResponse"
2120    }
2121}
2122
2123#[cfg(feature = "unstable-stream")]
2124impl gax::paginator::PageableResponse for ListExternalAccessRulesResponse {
2125    type PageItem = crate::model::ExternalAccessRule;
2126
2127    fn items(self) -> std::vec::Vec<Self::PageItem> {
2128        self.external_access_rules
2129    }
2130
2131    fn next_page_token(&self) -> std::string::String {
2132        gax::paginator::extract_token(&self.next_page_token)
2133    }
2134}
2135
2136/// Request message for
2137/// [VmwareEngine.GetExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]
2138///
2139/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]: crate::client::VmwareEngine::get_external_access_rule
2140#[serde_with::serde_as]
2141#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2142#[serde(default, rename_all = "camelCase")]
2143#[non_exhaustive]
2144pub struct GetExternalAccessRuleRequest {
2145    /// Required. The resource name of the external access firewall rule to
2146    /// retrieve. Resource names are schemeless URIs that follow the conventions in
2147    /// <https://cloud.google.com/apis/design/resource_names>.
2148    /// For example:
2149    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
2150    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2151    pub name: std::string::String,
2152}
2153
2154impl GetExternalAccessRuleRequest {
2155    pub fn new() -> Self {
2156        std::default::Default::default()
2157    }
2158
2159    /// Sets the value of [name][crate::model::GetExternalAccessRuleRequest::name].
2160    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2161        self.name = v.into();
2162        self
2163    }
2164}
2165
2166impl wkt::message::Message for GetExternalAccessRuleRequest {
2167    fn typename() -> &'static str {
2168        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest"
2169    }
2170}
2171
2172/// Request message for
2173/// [VmwareEngine.CreateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]
2174///
2175/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]: crate::client::VmwareEngine::create_external_access_rule
2176#[serde_with::serde_as]
2177#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2178#[serde(default, rename_all = "camelCase")]
2179#[non_exhaustive]
2180pub struct CreateExternalAccessRuleRequest {
2181    /// Required. The resource name of the network policy
2182    /// to create a new external access firewall rule in.
2183    /// Resource names are schemeless URIs that follow the conventions in
2184    /// <https://cloud.google.com/apis/design/resource_names>.
2185    /// For example:
2186    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
2187    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2188    pub parent: std::string::String,
2189
2190    /// Required. The initial description of a new external access rule.
2191    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2192    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2193
2194    /// Required. The user-provided identifier of the `ExternalAccessRule` to be
2195    /// created. This identifier must be unique among `ExternalAccessRule`
2196    /// resources within the parent and becomes the final token in the name URI.
2197    /// The identifier must meet the following requirements:
2198    ///
2199    /// * Only contains 1-63 alphanumeric characters and hyphens
2200    /// * Begins with an alphabetical character
2201    /// * Ends with a non-hyphen character
2202    /// * Not formatted as a UUID
2203    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
2204    ///   (section 3.5)
2205    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2206    pub external_access_rule_id: std::string::String,
2207
2208    /// A request ID to identify requests. Specify a unique request ID
2209    /// so that if you must retry your request, the server will know to ignore
2210    /// the request if it has already been completed. The server guarantees that a
2211    /// request doesn't result in creation of duplicate commitments for at least 60
2212    /// minutes.
2213    ///
2214    /// For example, consider a situation where you make an initial request and the
2215    /// request times out. If you make the request again with the same request ID,
2216    /// the server can check if the original operation with the same request ID was
2217    /// received, and if so, will ignore the second request. This prevents clients
2218    /// from accidentally creating duplicate commitments.
2219    ///
2220    /// The request ID must be a valid UUID with the exception that zero UUID is
2221    /// not supported (00000000-0000-0000-0000-000000000000).
2222    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2223    pub request_id: std::string::String,
2224}
2225
2226impl CreateExternalAccessRuleRequest {
2227    pub fn new() -> Self {
2228        std::default::Default::default()
2229    }
2230
2231    /// Sets the value of [parent][crate::model::CreateExternalAccessRuleRequest::parent].
2232    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2233        self.parent = v.into();
2234        self
2235    }
2236
2237    /// Sets the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
2238    pub fn set_external_access_rule<
2239        T: std::convert::Into<std::option::Option<crate::model::ExternalAccessRule>>,
2240    >(
2241        mut self,
2242        v: T,
2243    ) -> Self {
2244        self.external_access_rule = v.into();
2245        self
2246    }
2247
2248    /// Sets the value of [external_access_rule_id][crate::model::CreateExternalAccessRuleRequest::external_access_rule_id].
2249    pub fn set_external_access_rule_id<T: std::convert::Into<std::string::String>>(
2250        mut self,
2251        v: T,
2252    ) -> Self {
2253        self.external_access_rule_id = v.into();
2254        self
2255    }
2256
2257    /// Sets the value of [request_id][crate::model::CreateExternalAccessRuleRequest::request_id].
2258    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2259        self.request_id = v.into();
2260        self
2261    }
2262}
2263
2264impl wkt::message::Message for CreateExternalAccessRuleRequest {
2265    fn typename() -> &'static str {
2266        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest"
2267    }
2268}
2269
2270/// Request message for
2271/// [VmwareEngine.UpdateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]
2272///
2273/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]: crate::client::VmwareEngine::update_external_access_rule
2274#[serde_with::serde_as]
2275#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2276#[serde(default, rename_all = "camelCase")]
2277#[non_exhaustive]
2278pub struct UpdateExternalAccessRuleRequest {
2279    /// Required. Field mask is used to specify the fields to be overwritten in the
2280    /// `ExternalAccessRule` resource by the update.
2281    /// The fields specified in the `update_mask` are relative to the resource, not
2282    /// the full request. A field will be overwritten if it is in the mask. If the
2283    /// user does not provide a mask then all fields will be overwritten.
2284    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2285    pub update_mask: std::option::Option<wkt::FieldMask>,
2286
2287    /// Required. Description of the external access rule.
2288    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2289    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2290
2291    /// Optional. A request ID to identify requests. Specify a unique request ID
2292    /// so that if you must retry your request, the server will know to ignore
2293    /// the request if it has already been completed. The server guarantees that a
2294    /// request doesn't result in creation of duplicate commitments for at least 60
2295    /// minutes.
2296    ///
2297    /// For example, consider a situation where you make an initial request and the
2298    /// request times out. If you make the request again with the same request ID,
2299    /// the server can check if the original operation with the same request ID was
2300    /// received, and if so, will ignore the second request. This prevents clients
2301    /// from accidentally creating duplicate commitments.
2302    ///
2303    /// The request ID must be a valid UUID with the exception that zero UUID is
2304    /// not supported (00000000-0000-0000-0000-000000000000).
2305    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2306    pub request_id: std::string::String,
2307}
2308
2309impl UpdateExternalAccessRuleRequest {
2310    pub fn new() -> Self {
2311        std::default::Default::default()
2312    }
2313
2314    /// Sets the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
2315    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2316        mut self,
2317        v: T,
2318    ) -> Self {
2319        self.update_mask = v.into();
2320        self
2321    }
2322
2323    /// Sets the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
2324    pub fn set_external_access_rule<
2325        T: std::convert::Into<std::option::Option<crate::model::ExternalAccessRule>>,
2326    >(
2327        mut self,
2328        v: T,
2329    ) -> Self {
2330        self.external_access_rule = v.into();
2331        self
2332    }
2333
2334    /// Sets the value of [request_id][crate::model::UpdateExternalAccessRuleRequest::request_id].
2335    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2336        self.request_id = v.into();
2337        self
2338    }
2339}
2340
2341impl wkt::message::Message for UpdateExternalAccessRuleRequest {
2342    fn typename() -> &'static str {
2343        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest"
2344    }
2345}
2346
2347/// Request message for
2348/// [VmwareEngine.DeleteExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]
2349///
2350/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]: crate::client::VmwareEngine::delete_external_access_rule
2351#[serde_with::serde_as]
2352#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2353#[serde(default, rename_all = "camelCase")]
2354#[non_exhaustive]
2355pub struct DeleteExternalAccessRuleRequest {
2356    /// Required. The resource name of the external access firewall rule to delete.
2357    /// Resource names are schemeless URIs that follow the conventions in
2358    /// <https://cloud.google.com/apis/design/resource_names>.
2359    /// For example:
2360    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
2361    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2362    pub name: std::string::String,
2363
2364    /// Optional. A request ID to identify requests. Specify a unique request ID
2365    /// so that if you must retry your request, the server will know to ignore
2366    /// the request if it has already been completed. The server guarantees that a
2367    /// request doesn't result in creation of duplicate commitments for at least 60
2368    /// minutes.
2369    ///
2370    /// For example, consider a situation where you make an initial request and the
2371    /// request times out. If you make the request again with the same request
2372    /// ID, the server can check if the original operation with the same request ID
2373    /// was received, and if so, will ignore the second request. This prevents
2374    /// clients from accidentally creating duplicate commitments.
2375    ///
2376    /// The request ID must be a valid UUID with the exception that zero UUID is
2377    /// not supported (00000000-0000-0000-0000-000000000000).
2378    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2379    pub request_id: std::string::String,
2380}
2381
2382impl DeleteExternalAccessRuleRequest {
2383    pub fn new() -> Self {
2384        std::default::Default::default()
2385    }
2386
2387    /// Sets the value of [name][crate::model::DeleteExternalAccessRuleRequest::name].
2388    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2389        self.name = v.into();
2390        self
2391    }
2392
2393    /// Sets the value of [request_id][crate::model::DeleteExternalAccessRuleRequest::request_id].
2394    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2395        self.request_id = v.into();
2396        self
2397    }
2398}
2399
2400impl wkt::message::Message for DeleteExternalAccessRuleRequest {
2401    fn typename() -> &'static str {
2402        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest"
2403    }
2404}
2405
2406/// Request message for
2407/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
2408///
2409/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
2410#[serde_with::serde_as]
2411#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2412#[serde(default, rename_all = "camelCase")]
2413#[non_exhaustive]
2414pub struct ListLoggingServersRequest {
2415    /// Required. The resource name of the private cloud to be queried for
2416    /// logging servers.
2417    /// Resource names are schemeless URIs that follow the conventions in
2418    /// <https://cloud.google.com/apis/design/resource_names>.
2419    /// For example:
2420    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
2421    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2422    pub parent: std::string::String,
2423
2424    /// The maximum number of logging servers to return in one page.
2425    /// The service may return fewer than this value.
2426    /// The maximum value is coerced to 1000.
2427    /// The default value of this field is 500.
2428    pub page_size: i32,
2429
2430    /// A page token, received from a previous `ListLoggingServersRequest` call.
2431    /// Provide this to retrieve the subsequent page.
2432    ///
2433    /// When paginating, all other parameters provided to
2434    /// `ListLoggingServersRequest` must match the call that provided the page
2435    /// token.
2436    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2437    pub page_token: std::string::String,
2438
2439    /// A filter expression that matches resources returned in the response.
2440    /// The expression must specify the field name, a comparison
2441    /// operator, and the value that you want to use for filtering. The value
2442    /// must be a string, a number, or a boolean. The comparison operator
2443    /// must be `=`, `!=`, `>`, or `<`.
2444    ///
2445    /// For example, if you are filtering a list of logging servers, you can
2446    /// exclude the ones named `example-server` by specifying
2447    /// `name != "example-server"`.
2448    ///
2449    /// To filter on multiple expressions, provide each separate expression within
2450    /// parentheses. For example:
2451    ///
2452    /// ```norust
2453    /// (name = "example-server")
2454    /// (createTime > "2021-04-12T08:15:10.40Z")
2455    /// ```
2456    ///
2457    /// By default, each expression is an `AND` expression. However, you
2458    /// can include `AND` and `OR` expressions explicitly.
2459    /// For example:
2460    ///
2461    /// ```norust
2462    /// (name = "example-server-1") AND
2463    /// (createTime > "2021-04-12T08:15:10.40Z") OR
2464    /// (name = "example-server-2")
2465    /// ```
2466    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2467    pub filter: std::string::String,
2468
2469    /// Sorts list results by a certain order. By default, returned results
2470    /// are ordered by `name` in ascending order.
2471    /// You can also sort results in descending order based on the `name` value
2472    /// using `orderBy="name desc"`.
2473    /// Currently, only ordering by `name` is supported.
2474    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2475    pub order_by: std::string::String,
2476}
2477
2478impl ListLoggingServersRequest {
2479    pub fn new() -> Self {
2480        std::default::Default::default()
2481    }
2482
2483    /// Sets the value of [parent][crate::model::ListLoggingServersRequest::parent].
2484    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2485        self.parent = v.into();
2486        self
2487    }
2488
2489    /// Sets the value of [page_size][crate::model::ListLoggingServersRequest::page_size].
2490    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2491        self.page_size = v.into();
2492        self
2493    }
2494
2495    /// Sets the value of [page_token][crate::model::ListLoggingServersRequest::page_token].
2496    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2497        self.page_token = v.into();
2498        self
2499    }
2500
2501    /// Sets the value of [filter][crate::model::ListLoggingServersRequest::filter].
2502    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2503        self.filter = v.into();
2504        self
2505    }
2506
2507    /// Sets the value of [order_by][crate::model::ListLoggingServersRequest::order_by].
2508    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2509        self.order_by = v.into();
2510        self
2511    }
2512}
2513
2514impl wkt::message::Message for ListLoggingServersRequest {
2515    fn typename() -> &'static str {
2516        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersRequest"
2517    }
2518}
2519
2520/// Response message for
2521/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
2522///
2523/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
2524#[serde_with::serde_as]
2525#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2526#[serde(default, rename_all = "camelCase")]
2527#[non_exhaustive]
2528pub struct ListLoggingServersResponse {
2529    /// A list of Logging Servers.
2530    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2531    pub logging_servers: std::vec::Vec<crate::model::LoggingServer>,
2532
2533    /// A token, which can be send as `page_token` to retrieve the next page.
2534    /// If this field is omitted, there are no subsequent pages.
2535    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2536    pub next_page_token: std::string::String,
2537
2538    /// Locations that could not be reached when making an aggregated query using
2539    /// wildcards.
2540    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2541    pub unreachable: std::vec::Vec<std::string::String>,
2542}
2543
2544impl ListLoggingServersResponse {
2545    pub fn new() -> Self {
2546        std::default::Default::default()
2547    }
2548
2549    /// Sets the value of [next_page_token][crate::model::ListLoggingServersResponse::next_page_token].
2550    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2551        self.next_page_token = v.into();
2552        self
2553    }
2554
2555    /// Sets the value of [logging_servers][crate::model::ListLoggingServersResponse::logging_servers].
2556    pub fn set_logging_servers<T, V>(mut self, v: T) -> Self
2557    where
2558        T: std::iter::IntoIterator<Item = V>,
2559        V: std::convert::Into<crate::model::LoggingServer>,
2560    {
2561        use std::iter::Iterator;
2562        self.logging_servers = v.into_iter().map(|i| i.into()).collect();
2563        self
2564    }
2565
2566    /// Sets the value of [unreachable][crate::model::ListLoggingServersResponse::unreachable].
2567    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2568    where
2569        T: std::iter::IntoIterator<Item = V>,
2570        V: std::convert::Into<std::string::String>,
2571    {
2572        use std::iter::Iterator;
2573        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2574        self
2575    }
2576}
2577
2578impl wkt::message::Message for ListLoggingServersResponse {
2579    fn typename() -> &'static str {
2580        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersResponse"
2581    }
2582}
2583
2584#[cfg(feature = "unstable-stream")]
2585impl gax::paginator::PageableResponse for ListLoggingServersResponse {
2586    type PageItem = crate::model::LoggingServer;
2587
2588    fn items(self) -> std::vec::Vec<Self::PageItem> {
2589        self.logging_servers
2590    }
2591
2592    fn next_page_token(&self) -> std::string::String {
2593        gax::paginator::extract_token(&self.next_page_token)
2594    }
2595}
2596
2597/// Request message for
2598/// [VmwareEngine.GetLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]
2599///
2600/// [google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]: crate::client::VmwareEngine::get_logging_server
2601#[serde_with::serde_as]
2602#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2603#[serde(default, rename_all = "camelCase")]
2604#[non_exhaustive]
2605pub struct GetLoggingServerRequest {
2606    /// Required. The resource name of the Logging Server to retrieve.
2607    /// Resource names are schemeless URIs that follow the conventions in
2608    /// <https://cloud.google.com/apis/design/resource_names>.
2609    /// For example:
2610    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
2611    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2612    pub name: std::string::String,
2613}
2614
2615impl GetLoggingServerRequest {
2616    pub fn new() -> Self {
2617        std::default::Default::default()
2618    }
2619
2620    /// Sets the value of [name][crate::model::GetLoggingServerRequest::name].
2621    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2622        self.name = v.into();
2623        self
2624    }
2625}
2626
2627impl wkt::message::Message for GetLoggingServerRequest {
2628    fn typename() -> &'static str {
2629        "type.googleapis.com/google.cloud.vmwareengine.v1.GetLoggingServerRequest"
2630    }
2631}
2632
2633/// Request message for
2634/// [VmwareEngine.CreateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]
2635///
2636/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]: crate::client::VmwareEngine::create_logging_server
2637#[serde_with::serde_as]
2638#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2639#[serde(default, rename_all = "camelCase")]
2640#[non_exhaustive]
2641pub struct CreateLoggingServerRequest {
2642    /// Required. The resource name of the private cloud
2643    /// to create a new Logging Server in.
2644    /// Resource names are schemeless URIs that follow the conventions in
2645    /// <https://cloud.google.com/apis/design/resource_names>.
2646    /// For example:
2647    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
2648    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2649    pub parent: std::string::String,
2650
2651    /// Required. The initial description of a new logging server.
2652    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2653    pub logging_server: std::option::Option<crate::model::LoggingServer>,
2654
2655    /// Required. The user-provided identifier of the `LoggingServer` to be
2656    /// created. This identifier must be unique among `LoggingServer` resources
2657    /// within the parent and becomes the final token in the name URI.
2658    /// The identifier must meet the following requirements:
2659    ///
2660    /// * Only contains 1-63 alphanumeric characters and hyphens
2661    /// * Begins with an alphabetical character
2662    /// * Ends with a non-hyphen character
2663    /// * Not formatted as a UUID
2664    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
2665    ///   (section 3.5)
2666    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2667    pub logging_server_id: std::string::String,
2668
2669    /// Optional. A request ID to identify requests. Specify a unique request ID
2670    /// so that if you must retry your request, the server will know to ignore
2671    /// the request if it has already been completed. The server guarantees that a
2672    /// request doesn't result in creation of duplicate commitments for at least 60
2673    /// minutes.
2674    ///
2675    /// For example, consider a situation where you make an initial request and the
2676    /// request times out. If you make the request again with the same request ID,
2677    /// the server can check if original operation with the same request ID was
2678    /// received, and if so, will ignore the second request. This prevents clients
2679    /// from accidentally creating duplicate commitments.
2680    ///
2681    /// The request ID must be a valid UUID with the exception that zero UUID is
2682    /// not supported (00000000-0000-0000-0000-000000000000).
2683    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2684    pub request_id: std::string::String,
2685}
2686
2687impl CreateLoggingServerRequest {
2688    pub fn new() -> Self {
2689        std::default::Default::default()
2690    }
2691
2692    /// Sets the value of [parent][crate::model::CreateLoggingServerRequest::parent].
2693    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2694        self.parent = v.into();
2695        self
2696    }
2697
2698    /// Sets the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
2699    pub fn set_logging_server<
2700        T: std::convert::Into<std::option::Option<crate::model::LoggingServer>>,
2701    >(
2702        mut self,
2703        v: T,
2704    ) -> Self {
2705        self.logging_server = v.into();
2706        self
2707    }
2708
2709    /// Sets the value of [logging_server_id][crate::model::CreateLoggingServerRequest::logging_server_id].
2710    pub fn set_logging_server_id<T: std::convert::Into<std::string::String>>(
2711        mut self,
2712        v: T,
2713    ) -> Self {
2714        self.logging_server_id = v.into();
2715        self
2716    }
2717
2718    /// Sets the value of [request_id][crate::model::CreateLoggingServerRequest::request_id].
2719    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2720        self.request_id = v.into();
2721        self
2722    }
2723}
2724
2725impl wkt::message::Message for CreateLoggingServerRequest {
2726    fn typename() -> &'static str {
2727        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateLoggingServerRequest"
2728    }
2729}
2730
2731/// Request message for
2732/// [VmwareEngine.UpdateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]
2733///
2734/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]: crate::client::VmwareEngine::update_logging_server
2735#[serde_with::serde_as]
2736#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2737#[serde(default, rename_all = "camelCase")]
2738#[non_exhaustive]
2739pub struct UpdateLoggingServerRequest {
2740    /// Required. Field mask is used to specify the fields to be overwritten in the
2741    /// `LoggingServer` resource by the update.
2742    /// The fields specified in the `update_mask` are relative to the resource, not
2743    /// the full request. A field will be overwritten if it is in the mask. If the
2744    /// user does not provide a mask then all fields will be overwritten.
2745    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2746    pub update_mask: std::option::Option<wkt::FieldMask>,
2747
2748    /// Required. Logging server description.
2749    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2750    pub logging_server: std::option::Option<crate::model::LoggingServer>,
2751
2752    /// Optional. A request ID to identify requests. Specify a unique request ID
2753    /// so that if you must retry your request, the server will know to ignore
2754    /// the request if it has already been completed. The server guarantees that a
2755    /// request doesn't result in creation of duplicate commitments for at least 60
2756    /// minutes.
2757    ///
2758    /// For example, consider a situation where you make an initial request and the
2759    /// request times out. If you make the request again with the same request ID,
2760    /// the server can check if original operation with the same request ID was
2761    /// received, and if so, will ignore the second request. This prevents clients
2762    /// from accidentally creating duplicate commitments.
2763    ///
2764    /// The request ID must be a valid UUID with the exception that zero UUID is
2765    /// not supported (00000000-0000-0000-0000-000000000000).
2766    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2767    pub request_id: std::string::String,
2768}
2769
2770impl UpdateLoggingServerRequest {
2771    pub fn new() -> Self {
2772        std::default::Default::default()
2773    }
2774
2775    /// Sets the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
2776    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2777        mut self,
2778        v: T,
2779    ) -> Self {
2780        self.update_mask = v.into();
2781        self
2782    }
2783
2784    /// Sets the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
2785    pub fn set_logging_server<
2786        T: std::convert::Into<std::option::Option<crate::model::LoggingServer>>,
2787    >(
2788        mut self,
2789        v: T,
2790    ) -> Self {
2791        self.logging_server = v.into();
2792        self
2793    }
2794
2795    /// Sets the value of [request_id][crate::model::UpdateLoggingServerRequest::request_id].
2796    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2797        self.request_id = v.into();
2798        self
2799    }
2800}
2801
2802impl wkt::message::Message for UpdateLoggingServerRequest {
2803    fn typename() -> &'static str {
2804        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateLoggingServerRequest"
2805    }
2806}
2807
2808/// Request message for
2809/// [VmwareEngine.DeleteLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]
2810///
2811/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]: crate::client::VmwareEngine::delete_logging_server
2812#[serde_with::serde_as]
2813#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2814#[serde(default, rename_all = "camelCase")]
2815#[non_exhaustive]
2816pub struct DeleteLoggingServerRequest {
2817    /// Required. The resource name of the logging server to delete.
2818    /// Resource names are schemeless URIs that follow the conventions in
2819    /// <https://cloud.google.com/apis/design/resource_names>.
2820    /// For example:
2821    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
2822    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2823    pub name: std::string::String,
2824
2825    /// Optional. A request ID to identify requests. Specify a unique request ID
2826    /// so that if you must retry your request, the server will know to ignore
2827    /// the request if it has already been completed. The server guarantees that a
2828    /// request doesn't result in creation of duplicate commitments for at least 60
2829    /// minutes.
2830    ///
2831    /// For example, consider a situation where you make an initial request and the
2832    /// request times out. If you make the request again with the same request
2833    /// ID, the server can check if original operation with the same request ID
2834    /// was received, and if so, will ignore the second request. This prevents
2835    /// clients from accidentally creating duplicate commitments.
2836    ///
2837    /// The request ID must be a valid UUID with the exception that zero UUID is
2838    /// not supported (00000000-0000-0000-0000-000000000000).
2839    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2840    pub request_id: std::string::String,
2841}
2842
2843impl DeleteLoggingServerRequest {
2844    pub fn new() -> Self {
2845        std::default::Default::default()
2846    }
2847
2848    /// Sets the value of [name][crate::model::DeleteLoggingServerRequest::name].
2849    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2850        self.name = v.into();
2851        self
2852    }
2853
2854    /// Sets the value of [request_id][crate::model::DeleteLoggingServerRequest::request_id].
2855    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2856        self.request_id = v.into();
2857        self
2858    }
2859}
2860
2861impl wkt::message::Message for DeleteLoggingServerRequest {
2862    fn typename() -> &'static str {
2863        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteLoggingServerRequest"
2864    }
2865}
2866
2867/// Represents the metadata of the long-running operation.
2868#[serde_with::serde_as]
2869#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2870#[serde(default, rename_all = "camelCase")]
2871#[non_exhaustive]
2872pub struct OperationMetadata {
2873    /// Output only. The time the operation was created.
2874    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2875    pub create_time: std::option::Option<wkt::Timestamp>,
2876
2877    /// Output only. The time the operation finished running.
2878    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2879    pub end_time: std::option::Option<wkt::Timestamp>,
2880
2881    /// Output only. Server-defined resource path for the target of the operation.
2882    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2883    pub target: std::string::String,
2884
2885    /// Output only. Name of the verb executed by the operation.
2886    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2887    pub verb: std::string::String,
2888
2889    /// Output only. Human-readable status of the operation, if any.
2890    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2891    pub status_message: std::string::String,
2892
2893    /// Output only. True if the user has requested cancellation
2894    /// of the operation; false otherwise.
2895    /// Operations that have successfully been cancelled
2896    /// have [Operation.error][] value with a
2897    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
2898    /// `Code.CANCELLED`.
2899    ///
2900    /// [google.rpc.Status.code]: rpc::model::Status::code
2901    pub requested_cancellation: bool,
2902
2903    /// Output only. API version used to start the operation.
2904    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2905    pub api_version: std::string::String,
2906}
2907
2908impl OperationMetadata {
2909    pub fn new() -> Self {
2910        std::default::Default::default()
2911    }
2912
2913    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
2914    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2915        mut self,
2916        v: T,
2917    ) -> Self {
2918        self.create_time = v.into();
2919        self
2920    }
2921
2922    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
2923    pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
2924        mut self,
2925        v: T,
2926    ) -> Self {
2927        self.end_time = v.into();
2928        self
2929    }
2930
2931    /// Sets the value of [target][crate::model::OperationMetadata::target].
2932    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2933        self.target = v.into();
2934        self
2935    }
2936
2937    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
2938    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2939        self.verb = v.into();
2940        self
2941    }
2942
2943    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
2944    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2945        self.status_message = v.into();
2946        self
2947    }
2948
2949    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
2950    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2951        self.requested_cancellation = v.into();
2952        self
2953    }
2954
2955    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
2956    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2957        self.api_version = v.into();
2958        self
2959    }
2960}
2961
2962impl wkt::message::Message for OperationMetadata {
2963    fn typename() -> &'static str {
2964        "type.googleapis.com/google.cloud.vmwareengine.v1.OperationMetadata"
2965    }
2966}
2967
2968/// Request message for
2969/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
2970///
2971/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
2972#[serde_with::serde_as]
2973#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2974#[serde(default, rename_all = "camelCase")]
2975#[non_exhaustive]
2976pub struct ListNodeTypesRequest {
2977    /// Required. The resource name of the location to be queried for node types.
2978    /// Resource names are schemeless URIs that follow the conventions in
2979    /// <https://cloud.google.com/apis/design/resource_names>.
2980    /// For example:
2981    /// `projects/my-project/locations/us-central1-a`
2982    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2983    pub parent: std::string::String,
2984
2985    /// The maximum number of node types to return in one page.
2986    /// The service may return fewer than this value.
2987    /// The maximum value is coerced to 1000.
2988    /// The default value of this field is 500.
2989    pub page_size: i32,
2990
2991    /// A page token, received from a previous `ListNodeTypes` call.
2992    /// Provide this to retrieve the subsequent page.
2993    ///
2994    /// When paginating, all other parameters provided to
2995    /// `ListNodeTypes` must match the call that provided the page token.
2996    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2997    pub page_token: std::string::String,
2998
2999    /// A filter expression that matches resources returned in the response.
3000    /// The expression must specify the field name, a comparison
3001    /// operator, and the value that you want to use for filtering. The value
3002    /// must be a string, a number, or a boolean. The comparison operator
3003    /// must be `=`, `!=`, `>`, or `<`.
3004    ///
3005    /// For example, if you are filtering a list of node types, you can
3006    /// exclude the ones named `standard-72` by specifying
3007    /// `name != "standard-72"`.
3008    ///
3009    /// To filter on multiple expressions, provide each separate expression within
3010    /// parentheses. For example:
3011    ///
3012    /// ```norust
3013    /// (name = "standard-72")
3014    /// (virtual_cpu_count > 2)
3015    /// ```
3016    ///
3017    /// By default, each expression is an `AND` expression. However, you
3018    /// can include `AND` and `OR` expressions explicitly.
3019    /// For example:
3020    ///
3021    /// ```norust
3022    /// (name = "standard-96") AND
3023    /// (virtual_cpu_count > 2) OR
3024    /// (name = "standard-72")
3025    /// ```
3026    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3027    pub filter: std::string::String,
3028}
3029
3030impl ListNodeTypesRequest {
3031    pub fn new() -> Self {
3032        std::default::Default::default()
3033    }
3034
3035    /// Sets the value of [parent][crate::model::ListNodeTypesRequest::parent].
3036    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3037        self.parent = v.into();
3038        self
3039    }
3040
3041    /// Sets the value of [page_size][crate::model::ListNodeTypesRequest::page_size].
3042    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3043        self.page_size = v.into();
3044        self
3045    }
3046
3047    /// Sets the value of [page_token][crate::model::ListNodeTypesRequest::page_token].
3048    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3049        self.page_token = v.into();
3050        self
3051    }
3052
3053    /// Sets the value of [filter][crate::model::ListNodeTypesRequest::filter].
3054    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3055        self.filter = v.into();
3056        self
3057    }
3058}
3059
3060impl wkt::message::Message for ListNodeTypesRequest {
3061    fn typename() -> &'static str {
3062        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesRequest"
3063    }
3064}
3065
3066/// Response message for
3067/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
3068///
3069/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
3070#[serde_with::serde_as]
3071#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3072#[serde(default, rename_all = "camelCase")]
3073#[non_exhaustive]
3074pub struct ListNodeTypesResponse {
3075    /// A list of Node Types.
3076    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3077    pub node_types: std::vec::Vec<crate::model::NodeType>,
3078
3079    /// A token, which can be sent as `page_token` to retrieve the next page.
3080    /// If this field is omitted, there are no subsequent pages.
3081    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3082    pub next_page_token: std::string::String,
3083
3084    /// Locations that could not be reached when making an aggregated query using
3085    /// wildcards.
3086    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3087    pub unreachable: std::vec::Vec<std::string::String>,
3088}
3089
3090impl ListNodeTypesResponse {
3091    pub fn new() -> Self {
3092        std::default::Default::default()
3093    }
3094
3095    /// Sets the value of [next_page_token][crate::model::ListNodeTypesResponse::next_page_token].
3096    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3097        self.next_page_token = v.into();
3098        self
3099    }
3100
3101    /// Sets the value of [node_types][crate::model::ListNodeTypesResponse::node_types].
3102    pub fn set_node_types<T, V>(mut self, v: T) -> Self
3103    where
3104        T: std::iter::IntoIterator<Item = V>,
3105        V: std::convert::Into<crate::model::NodeType>,
3106    {
3107        use std::iter::Iterator;
3108        self.node_types = v.into_iter().map(|i| i.into()).collect();
3109        self
3110    }
3111
3112    /// Sets the value of [unreachable][crate::model::ListNodeTypesResponse::unreachable].
3113    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3114    where
3115        T: std::iter::IntoIterator<Item = V>,
3116        V: std::convert::Into<std::string::String>,
3117    {
3118        use std::iter::Iterator;
3119        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3120        self
3121    }
3122}
3123
3124impl wkt::message::Message for ListNodeTypesResponse {
3125    fn typename() -> &'static str {
3126        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesResponse"
3127    }
3128}
3129
3130#[cfg(feature = "unstable-stream")]
3131impl gax::paginator::PageableResponse for ListNodeTypesResponse {
3132    type PageItem = crate::model::NodeType;
3133
3134    fn items(self) -> std::vec::Vec<Self::PageItem> {
3135        self.node_types
3136    }
3137
3138    fn next_page_token(&self) -> std::string::String {
3139        gax::paginator::extract_token(&self.next_page_token)
3140    }
3141}
3142
3143/// Request message for
3144/// [VmwareEngine.GetNodeType][google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]
3145///
3146/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]: crate::client::VmwareEngine::get_node_type
3147#[serde_with::serde_as]
3148#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3149#[serde(default, rename_all = "camelCase")]
3150#[non_exhaustive]
3151pub struct GetNodeTypeRequest {
3152    /// Required. The resource name of the node type to retrieve.
3153    /// Resource names are schemeless URIs that follow the conventions in
3154    /// <https://cloud.google.com/apis/design/resource_names>.
3155    /// For example:
3156    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
3157    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3158    pub name: std::string::String,
3159}
3160
3161impl GetNodeTypeRequest {
3162    pub fn new() -> Self {
3163        std::default::Default::default()
3164    }
3165
3166    /// Sets the value of [name][crate::model::GetNodeTypeRequest::name].
3167    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3168        self.name = v.into();
3169        self
3170    }
3171}
3172
3173impl wkt::message::Message for GetNodeTypeRequest {
3174    fn typename() -> &'static str {
3175        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeTypeRequest"
3176    }
3177}
3178
3179/// Request message for
3180/// [VmwareEngine.ShowNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]
3181///
3182/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]: crate::client::VmwareEngine::show_nsx_credentials
3183#[serde_with::serde_as]
3184#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3185#[serde(default, rename_all = "camelCase")]
3186#[non_exhaustive]
3187pub struct ShowNsxCredentialsRequest {
3188    /// Required. The resource name of the private cloud
3189    /// to be queried for credentials.
3190    /// Resource names are schemeless URIs that follow the conventions in
3191    /// <https://cloud.google.com/apis/design/resource_names>.
3192    /// For example:
3193    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3194    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3195    pub private_cloud: std::string::String,
3196}
3197
3198impl ShowNsxCredentialsRequest {
3199    pub fn new() -> Self {
3200        std::default::Default::default()
3201    }
3202
3203    /// Sets the value of [private_cloud][crate::model::ShowNsxCredentialsRequest::private_cloud].
3204    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3205        self.private_cloud = v.into();
3206        self
3207    }
3208}
3209
3210impl wkt::message::Message for ShowNsxCredentialsRequest {
3211    fn typename() -> &'static str {
3212        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest"
3213    }
3214}
3215
3216/// Request message for
3217/// [VmwareEngine.ShowVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]
3218///
3219/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]: crate::client::VmwareEngine::show_vcenter_credentials
3220#[serde_with::serde_as]
3221#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3222#[serde(default, rename_all = "camelCase")]
3223#[non_exhaustive]
3224pub struct ShowVcenterCredentialsRequest {
3225    /// Required. The resource name of the private cloud
3226    /// to be queried for credentials.
3227    /// Resource names are schemeless URIs that follow the conventions in
3228    /// <https://cloud.google.com/apis/design/resource_names>.
3229    /// For example:
3230    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3231    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3232    pub private_cloud: std::string::String,
3233
3234    /// Optional. The username of the user to be queried for credentials.
3235    /// The default value of this field is CloudOwner@gve.local.
3236    /// The provided value must be one of the following:
3237    /// CloudOwner@gve.local,
3238    /// solution-user-01@gve.local,
3239    /// solution-user-02@gve.local,
3240    /// solution-user-03@gve.local,
3241    /// solution-user-04@gve.local,
3242    /// solution-user-05@gve.local,
3243    /// zertoadmin@gve.local.
3244    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3245    pub username: std::string::String,
3246}
3247
3248impl ShowVcenterCredentialsRequest {
3249    pub fn new() -> Self {
3250        std::default::Default::default()
3251    }
3252
3253    /// Sets the value of [private_cloud][crate::model::ShowVcenterCredentialsRequest::private_cloud].
3254    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3255        self.private_cloud = v.into();
3256        self
3257    }
3258
3259    /// Sets the value of [username][crate::model::ShowVcenterCredentialsRequest::username].
3260    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3261        self.username = v.into();
3262        self
3263    }
3264}
3265
3266impl wkt::message::Message for ShowVcenterCredentialsRequest {
3267    fn typename() -> &'static str {
3268        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest"
3269    }
3270}
3271
3272/// Request message for
3273/// [VmwareEngine.ResetNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]
3274///
3275/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]: crate::client::VmwareEngine::reset_nsx_credentials
3276#[serde_with::serde_as]
3277#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3278#[serde(default, rename_all = "camelCase")]
3279#[non_exhaustive]
3280pub struct ResetNsxCredentialsRequest {
3281    /// Required. The resource name of the private cloud
3282    /// to reset credentials for.
3283    /// Resource names are schemeless URIs that follow the conventions in
3284    /// <https://cloud.google.com/apis/design/resource_names>.
3285    /// For example:
3286    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3287    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3288    pub private_cloud: std::string::String,
3289
3290    /// Optional. A request ID to identify requests. Specify a unique request ID
3291    /// so that if you must retry your request, the server will know to ignore
3292    /// the request if it has already been completed. The server guarantees that a
3293    /// request doesn't result in creation of duplicate commitments for at least 60
3294    /// minutes.
3295    ///
3296    /// For example, consider a situation where you make an initial request and the
3297    /// request times out. If you make the request again with the same request
3298    /// ID, the server can check if original operation with the same request ID
3299    /// was received, and if so, will ignore the second request. This prevents
3300    /// clients from accidentally creating duplicate commitments.
3301    ///
3302    /// The request ID must be a valid UUID with the exception that zero UUID is
3303    /// not supported (00000000-0000-0000-0000-000000000000).
3304    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3305    pub request_id: std::string::String,
3306}
3307
3308impl ResetNsxCredentialsRequest {
3309    pub fn new() -> Self {
3310        std::default::Default::default()
3311    }
3312
3313    /// Sets the value of [private_cloud][crate::model::ResetNsxCredentialsRequest::private_cloud].
3314    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3315        self.private_cloud = v.into();
3316        self
3317    }
3318
3319    /// Sets the value of [request_id][crate::model::ResetNsxCredentialsRequest::request_id].
3320    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3321        self.request_id = v.into();
3322        self
3323    }
3324}
3325
3326impl wkt::message::Message for ResetNsxCredentialsRequest {
3327    fn typename() -> &'static str {
3328        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest"
3329    }
3330}
3331
3332/// Request message for
3333/// [VmwareEngine.ResetVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]
3334///
3335/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]: crate::client::VmwareEngine::reset_vcenter_credentials
3336#[serde_with::serde_as]
3337#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3338#[serde(default, rename_all = "camelCase")]
3339#[non_exhaustive]
3340pub struct ResetVcenterCredentialsRequest {
3341    /// Required. The resource name of the private cloud
3342    /// to reset credentials for.
3343    /// Resource names are schemeless URIs that follow the conventions in
3344    /// <https://cloud.google.com/apis/design/resource_names>.
3345    /// For example:
3346    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3347    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3348    pub private_cloud: std::string::String,
3349
3350    /// Optional. A request ID to identify requests. Specify a unique request ID
3351    /// so that if you must retry your request, the server will know to ignore
3352    /// the request if it has already been completed. The server guarantees that a
3353    /// request doesn't result in creation of duplicate commitments for at least 60
3354    /// minutes.
3355    ///
3356    /// For example, consider a situation where you make an initial request and the
3357    /// request times out. If you make the request again with the same request
3358    /// ID, the server can check if original operation with the same request ID
3359    /// was received, and if so, will ignore the second request. This prevents
3360    /// clients from accidentally creating duplicate commitments.
3361    ///
3362    /// The request ID must be a valid UUID with the exception that zero UUID is
3363    /// not supported (00000000-0000-0000-0000-000000000000).
3364    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3365    pub request_id: std::string::String,
3366
3367    /// Optional. The username of the user to be to reset the credentials.
3368    /// The default value of this field is CloudOwner@gve.local.
3369    /// The provided value should be one of the following:
3370    /// solution-user-01@gve.local,
3371    /// solution-user-02@gve.local,
3372    /// solution-user-03@gve.local,
3373    /// solution-user-04@gve.local,
3374    /// solution-user-05@gve.local,
3375    /// zertoadmin@gve.local.
3376    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3377    pub username: std::string::String,
3378}
3379
3380impl ResetVcenterCredentialsRequest {
3381    pub fn new() -> Self {
3382        std::default::Default::default()
3383    }
3384
3385    /// Sets the value of [private_cloud][crate::model::ResetVcenterCredentialsRequest::private_cloud].
3386    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3387        self.private_cloud = v.into();
3388        self
3389    }
3390
3391    /// Sets the value of [request_id][crate::model::ResetVcenterCredentialsRequest::request_id].
3392    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3393        self.request_id = v.into();
3394        self
3395    }
3396
3397    /// Sets the value of [username][crate::model::ResetVcenterCredentialsRequest::username].
3398    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3399        self.username = v.into();
3400        self
3401    }
3402}
3403
3404impl wkt::message::Message for ResetVcenterCredentialsRequest {
3405    fn typename() -> &'static str {
3406        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest"
3407    }
3408}
3409
3410/// Response message for
3411/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
3412///
3413/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
3414#[serde_with::serde_as]
3415#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3416#[serde(default, rename_all = "camelCase")]
3417#[non_exhaustive]
3418pub struct ListHcxActivationKeysResponse {
3419    /// List of HCX activation keys.
3420    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3421    pub hcx_activation_keys: std::vec::Vec<crate::model::HcxActivationKey>,
3422
3423    /// A token, which can be sent as `page_token` to retrieve the next page.
3424    /// If this field is omitted, there are no subsequent pages.
3425    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3426    pub next_page_token: std::string::String,
3427
3428    /// Locations that could not be reached when making an aggregated query using
3429    /// wildcards.
3430    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3431    pub unreachable: std::vec::Vec<std::string::String>,
3432}
3433
3434impl ListHcxActivationKeysResponse {
3435    pub fn new() -> Self {
3436        std::default::Default::default()
3437    }
3438
3439    /// Sets the value of [next_page_token][crate::model::ListHcxActivationKeysResponse::next_page_token].
3440    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3441        self.next_page_token = v.into();
3442        self
3443    }
3444
3445    /// Sets the value of [hcx_activation_keys][crate::model::ListHcxActivationKeysResponse::hcx_activation_keys].
3446    pub fn set_hcx_activation_keys<T, V>(mut self, v: T) -> Self
3447    where
3448        T: std::iter::IntoIterator<Item = V>,
3449        V: std::convert::Into<crate::model::HcxActivationKey>,
3450    {
3451        use std::iter::Iterator;
3452        self.hcx_activation_keys = v.into_iter().map(|i| i.into()).collect();
3453        self
3454    }
3455
3456    /// Sets the value of [unreachable][crate::model::ListHcxActivationKeysResponse::unreachable].
3457    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3458    where
3459        T: std::iter::IntoIterator<Item = V>,
3460        V: std::convert::Into<std::string::String>,
3461    {
3462        use std::iter::Iterator;
3463        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3464        self
3465    }
3466}
3467
3468impl wkt::message::Message for ListHcxActivationKeysResponse {
3469    fn typename() -> &'static str {
3470        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse"
3471    }
3472}
3473
3474#[cfg(feature = "unstable-stream")]
3475impl gax::paginator::PageableResponse for ListHcxActivationKeysResponse {
3476    type PageItem = crate::model::HcxActivationKey;
3477
3478    fn items(self) -> std::vec::Vec<Self::PageItem> {
3479        self.hcx_activation_keys
3480    }
3481
3482    fn next_page_token(&self) -> std::string::String {
3483        gax::paginator::extract_token(&self.next_page_token)
3484    }
3485}
3486
3487/// Request message for
3488/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
3489///
3490/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
3491#[serde_with::serde_as]
3492#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3493#[serde(default, rename_all = "camelCase")]
3494#[non_exhaustive]
3495pub struct ListHcxActivationKeysRequest {
3496    /// Required. The resource name of the private cloud
3497    /// to be queried for HCX activation keys.
3498    /// Resource names are schemeless URIs that follow the conventions in
3499    /// <https://cloud.google.com/apis/design/resource_names>.
3500    /// For example:
3501    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
3502    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3503    pub parent: std::string::String,
3504
3505    /// The maximum number of HCX activation keys to return in one page.
3506    /// The service may return fewer than this value.
3507    /// The maximum value is coerced to 1000.
3508    /// The default value of this field is 500.
3509    pub page_size: i32,
3510
3511    /// A page token, received from a previous `ListHcxActivationKeys` call.
3512    /// Provide this to retrieve the subsequent page.
3513    ///
3514    /// When paginating, all other parameters provided to
3515    /// `ListHcxActivationKeys` must match the call that provided the page
3516    /// token.
3517    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3518    pub page_token: std::string::String,
3519}
3520
3521impl ListHcxActivationKeysRequest {
3522    pub fn new() -> Self {
3523        std::default::Default::default()
3524    }
3525
3526    /// Sets the value of [parent][crate::model::ListHcxActivationKeysRequest::parent].
3527    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3528        self.parent = v.into();
3529        self
3530    }
3531
3532    /// Sets the value of [page_size][crate::model::ListHcxActivationKeysRequest::page_size].
3533    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3534        self.page_size = v.into();
3535        self
3536    }
3537
3538    /// Sets the value of [page_token][crate::model::ListHcxActivationKeysRequest::page_token].
3539    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3540        self.page_token = v.into();
3541        self
3542    }
3543}
3544
3545impl wkt::message::Message for ListHcxActivationKeysRequest {
3546    fn typename() -> &'static str {
3547        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest"
3548    }
3549}
3550
3551/// Request message for [VmwareEngine.GetHcxActivationKeys][]
3552#[serde_with::serde_as]
3553#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3554#[serde(default, rename_all = "camelCase")]
3555#[non_exhaustive]
3556pub struct GetHcxActivationKeyRequest {
3557    /// Required. The resource name of the HCX activation key to retrieve.
3558    /// Resource names are schemeless URIs that follow the conventions in
3559    /// <https://cloud.google.com/apis/design/resource_names>.
3560    /// For example:
3561    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
3562    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3563    pub name: std::string::String,
3564}
3565
3566impl GetHcxActivationKeyRequest {
3567    pub fn new() -> Self {
3568        std::default::Default::default()
3569    }
3570
3571    /// Sets the value of [name][crate::model::GetHcxActivationKeyRequest::name].
3572    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3573        self.name = v.into();
3574        self
3575    }
3576}
3577
3578impl wkt::message::Message for GetHcxActivationKeyRequest {
3579    fn typename() -> &'static str {
3580        "type.googleapis.com/google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest"
3581    }
3582}
3583
3584/// Request message for
3585/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
3586///
3587/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
3588#[serde_with::serde_as]
3589#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3590#[serde(default, rename_all = "camelCase")]
3591#[non_exhaustive]
3592pub struct CreateHcxActivationKeyRequest {
3593    /// Required. The resource name of the private cloud to create the key for.
3594    /// Resource names are schemeless URIs that follow the conventions in
3595    /// <https://cloud.google.com/apis/design/resource_names>.
3596    /// For example:
3597    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
3598    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3599    pub parent: std::string::String,
3600
3601    /// Required. The initial description of a new HCX activation key. When
3602    /// creating a new key, this field must be an empty object.
3603    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3604    pub hcx_activation_key: std::option::Option<crate::model::HcxActivationKey>,
3605
3606    /// Required. The user-provided identifier of the `HcxActivationKey` to be
3607    /// created. This identifier must be unique among `HcxActivationKey` resources
3608    /// within the parent and becomes the final token in the name URI.
3609    /// The identifier must meet the following requirements:
3610    ///
3611    /// * Only contains 1-63 alphanumeric characters and hyphens
3612    /// * Begins with an alphabetical character
3613    /// * Ends with a non-hyphen character
3614    /// * Not formatted as a UUID
3615    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
3616    ///   (section 3.5)
3617    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3618    pub hcx_activation_key_id: std::string::String,
3619
3620    /// A request ID to identify requests. Specify a unique request ID
3621    /// so that if you must retry your request, the server will know to ignore
3622    /// the request if it has already been completed. The server guarantees that a
3623    /// request doesn't result in creation of duplicate commitments for at least 60
3624    /// minutes.
3625    ///
3626    /// For example, consider a situation where you make an initial request and the
3627    /// request times out. If you make the request again with the same request ID,
3628    /// the server can check if original operation with the same request ID was
3629    /// received, and if so, will ignore the second request. This prevents clients
3630    /// from accidentally creating duplicate commitments.
3631    ///
3632    /// The request ID must be a valid UUID with the exception that zero UUID is
3633    /// not supported (00000000-0000-0000-0000-000000000000).
3634    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3635    pub request_id: std::string::String,
3636}
3637
3638impl CreateHcxActivationKeyRequest {
3639    pub fn new() -> Self {
3640        std::default::Default::default()
3641    }
3642
3643    /// Sets the value of [parent][crate::model::CreateHcxActivationKeyRequest::parent].
3644    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3645        self.parent = v.into();
3646        self
3647    }
3648
3649    /// Sets the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
3650    pub fn set_hcx_activation_key<
3651        T: std::convert::Into<std::option::Option<crate::model::HcxActivationKey>>,
3652    >(
3653        mut self,
3654        v: T,
3655    ) -> Self {
3656        self.hcx_activation_key = v.into();
3657        self
3658    }
3659
3660    /// Sets the value of [hcx_activation_key_id][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key_id].
3661    pub fn set_hcx_activation_key_id<T: std::convert::Into<std::string::String>>(
3662        mut self,
3663        v: T,
3664    ) -> Self {
3665        self.hcx_activation_key_id = v.into();
3666        self
3667    }
3668
3669    /// Sets the value of [request_id][crate::model::CreateHcxActivationKeyRequest::request_id].
3670    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3671        self.request_id = v.into();
3672        self
3673    }
3674}
3675
3676impl wkt::message::Message for CreateHcxActivationKeyRequest {
3677    fn typename() -> &'static str {
3678        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest"
3679    }
3680}
3681
3682/// Request message for
3683/// [VmwareEngine.GetDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]
3684///
3685/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]: crate::client::VmwareEngine::get_dns_forwarding
3686#[serde_with::serde_as]
3687#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3688#[serde(default, rename_all = "camelCase")]
3689#[non_exhaustive]
3690pub struct GetDnsForwardingRequest {
3691    /// Required. The resource name of a `DnsForwarding` to retrieve.
3692    /// Resource names are schemeless URIs that follow the conventions in
3693    /// <https://cloud.google.com/apis/design/resource_names>.
3694    /// For example:
3695    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
3696    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3697    pub name: std::string::String,
3698}
3699
3700impl GetDnsForwardingRequest {
3701    pub fn new() -> Self {
3702        std::default::Default::default()
3703    }
3704
3705    /// Sets the value of [name][crate::model::GetDnsForwardingRequest::name].
3706    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3707        self.name = v.into();
3708        self
3709    }
3710}
3711
3712impl wkt::message::Message for GetDnsForwardingRequest {
3713    fn typename() -> &'static str {
3714        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsForwardingRequest"
3715    }
3716}
3717
3718/// Request message for
3719/// [VmwareEngine.UpdateDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]
3720///
3721/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]: crate::client::VmwareEngine::update_dns_forwarding
3722#[serde_with::serde_as]
3723#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3724#[serde(default, rename_all = "camelCase")]
3725#[non_exhaustive]
3726pub struct UpdateDnsForwardingRequest {
3727    /// Required. DnsForwarding config details.
3728    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3729    pub dns_forwarding: std::option::Option<crate::model::DnsForwarding>,
3730
3731    /// Required. Field mask is used to specify the fields to be overwritten in the
3732    /// `DnsForwarding` resource by the update.
3733    /// The fields specified in the `update_mask` are relative to the resource, not
3734    /// the full request. A field will be overwritten if it is in the mask. If the
3735    /// user does not provide a mask then all fields will be overwritten.
3736    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3737    pub update_mask: std::option::Option<wkt::FieldMask>,
3738
3739    /// Optional. A request ID to identify requests. Specify a unique request ID
3740    /// so that if you must retry your request, the server will know to ignore
3741    /// the request if it has already been completed. The server guarantees that a
3742    /// request doesn't result in creation of duplicate commitments for at least 60
3743    /// minutes.
3744    ///
3745    /// For example, consider a situation where you make an initial request and the
3746    /// request times out. If you make the request again with the same request ID,
3747    /// the server can check if original operation with the same request ID was
3748    /// received, and if so, will ignore the second request. This prevents clients
3749    /// from accidentally creating duplicate commitments.
3750    ///
3751    /// The request ID must be a valid UUID with the exception that zero UUID is
3752    /// not supported (00000000-0000-0000-0000-000000000000).
3753    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3754    pub request_id: std::string::String,
3755}
3756
3757impl UpdateDnsForwardingRequest {
3758    pub fn new() -> Self {
3759        std::default::Default::default()
3760    }
3761
3762    /// Sets the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
3763    pub fn set_dns_forwarding<
3764        T: std::convert::Into<std::option::Option<crate::model::DnsForwarding>>,
3765    >(
3766        mut self,
3767        v: T,
3768    ) -> Self {
3769        self.dns_forwarding = v.into();
3770        self
3771    }
3772
3773    /// Sets the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
3774    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
3775        mut self,
3776        v: T,
3777    ) -> Self {
3778        self.update_mask = v.into();
3779        self
3780    }
3781
3782    /// Sets the value of [request_id][crate::model::UpdateDnsForwardingRequest::request_id].
3783    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3784        self.request_id = v.into();
3785        self
3786    }
3787}
3788
3789impl wkt::message::Message for UpdateDnsForwardingRequest {
3790    fn typename() -> &'static str {
3791        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest"
3792    }
3793}
3794
3795/// Request message for
3796/// [VmwareEngine.CreateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]
3797///
3798/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]: crate::client::VmwareEngine::create_network_peering
3799#[serde_with::serde_as]
3800#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3801#[serde(default, rename_all = "camelCase")]
3802#[non_exhaustive]
3803pub struct CreateNetworkPeeringRequest {
3804    /// Required. The resource name of the location to create the new network
3805    /// peering in. This value is always `global`, because `NetworkPeering` is a
3806    /// global resource. Resource names are schemeless URIs that follow the
3807    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
3808    /// example: `projects/my-project/locations/global`
3809    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3810    pub parent: std::string::String,
3811
3812    /// Required. The user-provided identifier of the new `NetworkPeering`.
3813    /// This identifier must be unique among `NetworkPeering` resources within the
3814    /// parent and becomes the final token in the name URI.
3815    /// The identifier must meet the following requirements:
3816    ///
3817    /// * Only contains 1-63 alphanumeric characters and hyphens
3818    /// * Begins with an alphabetical character
3819    /// * Ends with a non-hyphen character
3820    /// * Not formatted as a UUID
3821    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
3822    ///   (section 3.5)
3823    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3824    pub network_peering_id: std::string::String,
3825
3826    /// Required. The initial description of the new network peering.
3827    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3828    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
3829
3830    /// Optional. A request ID to identify requests. Specify a unique request ID
3831    /// so that if you must retry your request, the server will know to ignore
3832    /// the request if it has already been completed. The server guarantees that a
3833    /// request doesn't result in creation of duplicate commitments for at least 60
3834    /// minutes.
3835    ///
3836    /// For example, consider a situation where you make an initial request and the
3837    /// request times out. If you make the request again with the same request
3838    /// ID, the server can check if original operation with the same request ID
3839    /// was received, and if so, will ignore the second request. This prevents
3840    /// clients from accidentally creating duplicate commitments.
3841    ///
3842    /// The request ID must be a valid UUID with the exception that zero UUID is
3843    /// not supported (00000000-0000-0000-0000-000000000000).
3844    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3845    pub request_id: std::string::String,
3846}
3847
3848impl CreateNetworkPeeringRequest {
3849    pub fn new() -> Self {
3850        std::default::Default::default()
3851    }
3852
3853    /// Sets the value of [parent][crate::model::CreateNetworkPeeringRequest::parent].
3854    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3855        self.parent = v.into();
3856        self
3857    }
3858
3859    /// Sets the value of [network_peering_id][crate::model::CreateNetworkPeeringRequest::network_peering_id].
3860    pub fn set_network_peering_id<T: std::convert::Into<std::string::String>>(
3861        mut self,
3862        v: T,
3863    ) -> Self {
3864        self.network_peering_id = v.into();
3865        self
3866    }
3867
3868    /// Sets the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
3869    pub fn set_network_peering<
3870        T: std::convert::Into<std::option::Option<crate::model::NetworkPeering>>,
3871    >(
3872        mut self,
3873        v: T,
3874    ) -> Self {
3875        self.network_peering = v.into();
3876        self
3877    }
3878
3879    /// Sets the value of [request_id][crate::model::CreateNetworkPeeringRequest::request_id].
3880    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3881        self.request_id = v.into();
3882        self
3883    }
3884}
3885
3886impl wkt::message::Message for CreateNetworkPeeringRequest {
3887    fn typename() -> &'static str {
3888        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest"
3889    }
3890}
3891
3892/// Request message for
3893/// [VmwareEngine.DeleteNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]
3894///
3895/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]: crate::client::VmwareEngine::delete_network_peering
3896#[serde_with::serde_as]
3897#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3898#[serde(default, rename_all = "camelCase")]
3899#[non_exhaustive]
3900pub struct DeleteNetworkPeeringRequest {
3901    /// Required. The resource name of the network peering to be deleted.
3902    /// Resource names are schemeless URIs that follow the conventions in
3903    /// <https://cloud.google.com/apis/design/resource_names>.
3904    /// For example:
3905    /// `projects/my-project/locations/global/networkPeerings/my-peering`
3906    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3907    pub name: std::string::String,
3908
3909    /// Optional. A request ID to identify requests. Specify a unique request ID
3910    /// so that if you must retry your request, the server will know to ignore
3911    /// the request if it has already been completed. The server guarantees that a
3912    /// request doesn't result in creation of duplicate commitments for at least 60
3913    /// minutes.
3914    ///
3915    /// For example, consider a situation where you make an initial request and the
3916    /// request times out. If you make the request again with the same request
3917    /// ID, the server can check if original operation with the same request ID
3918    /// was received, and if so, will ignore the second request. This prevents
3919    /// clients from accidentally creating duplicate commitments.
3920    ///
3921    /// The request ID must be a valid UUID with the exception that zero UUID is
3922    /// not supported (00000000-0000-0000-0000-000000000000).
3923    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3924    pub request_id: std::string::String,
3925}
3926
3927impl DeleteNetworkPeeringRequest {
3928    pub fn new() -> Self {
3929        std::default::Default::default()
3930    }
3931
3932    /// Sets the value of [name][crate::model::DeleteNetworkPeeringRequest::name].
3933    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3934        self.name = v.into();
3935        self
3936    }
3937
3938    /// Sets the value of [request_id][crate::model::DeleteNetworkPeeringRequest::request_id].
3939    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3940        self.request_id = v.into();
3941        self
3942    }
3943}
3944
3945impl wkt::message::Message for DeleteNetworkPeeringRequest {
3946    fn typename() -> &'static str {
3947        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest"
3948    }
3949}
3950
3951/// Request message for
3952/// [VmwareEngine.GetNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]
3953///
3954/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]: crate::client::VmwareEngine::get_network_peering
3955#[serde_with::serde_as]
3956#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3957#[serde(default, rename_all = "camelCase")]
3958#[non_exhaustive]
3959pub struct GetNetworkPeeringRequest {
3960    /// Required. The resource name of the network peering to retrieve.
3961    /// Resource names are schemeless URIs that follow the conventions in
3962    /// <https://cloud.google.com/apis/design/resource_names>.
3963    /// For example:
3964    /// `projects/my-project/locations/global/networkPeerings/my-peering`
3965    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3966    pub name: std::string::String,
3967}
3968
3969impl GetNetworkPeeringRequest {
3970    pub fn new() -> Self {
3971        std::default::Default::default()
3972    }
3973
3974    /// Sets the value of [name][crate::model::GetNetworkPeeringRequest::name].
3975    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3976        self.name = v.into();
3977        self
3978    }
3979}
3980
3981impl wkt::message::Message for GetNetworkPeeringRequest {
3982    fn typename() -> &'static str {
3983        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPeeringRequest"
3984    }
3985}
3986
3987/// Request message for
3988/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
3989///
3990/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
3991#[serde_with::serde_as]
3992#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3993#[serde(default, rename_all = "camelCase")]
3994#[non_exhaustive]
3995pub struct ListNetworkPeeringsRequest {
3996    /// Required. The resource name of the location (global) to query for
3997    /// network peerings. Resource names are schemeless URIs that follow the
3998    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
3999    /// example: `projects/my-project/locations/global`
4000    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4001    pub parent: std::string::String,
4002
4003    /// The maximum number of network peerings to return in one page.
4004    /// The maximum value is coerced to 1000.
4005    /// The default value of this field is 500.
4006    pub page_size: i32,
4007
4008    /// A page token, received from a previous `ListNetworkPeerings` call.
4009    /// Provide this to retrieve the subsequent page.
4010    ///
4011    /// When paginating, all other parameters provided to
4012    /// `ListNetworkPeerings` must match the call that provided the page
4013    /// token.
4014    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4015    pub page_token: std::string::String,
4016
4017    /// A filter expression that matches resources returned in the response.
4018    /// The expression must specify the field name, a comparison
4019    /// operator, and the value that you want to use for filtering. The value
4020    /// must be a string, a number, or a boolean. The comparison operator
4021    /// must be `=`, `!=`, `>`, or `<`.
4022    ///
4023    /// For example, if you are filtering a list of network peerings, you can
4024    /// exclude the ones named `example-peering` by specifying
4025    /// `name != "example-peering"`.
4026    ///
4027    /// To filter on multiple expressions, provide each separate expression within
4028    /// parentheses. For example:
4029    ///
4030    /// ```norust
4031    /// (name = "example-peering")
4032    /// (createTime > "2021-04-12T08:15:10.40Z")
4033    /// ```
4034    ///
4035    /// By default, each expression is an `AND` expression. However, you
4036    /// can include `AND` and `OR` expressions explicitly.
4037    /// For example:
4038    ///
4039    /// ```norust
4040    /// (name = "example-peering-1") AND
4041    /// (createTime > "2021-04-12T08:15:10.40Z") OR
4042    /// (name = "example-peering-2")
4043    /// ```
4044    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4045    pub filter: std::string::String,
4046
4047    /// Sorts list results by a certain order. By default, returned results
4048    /// are ordered by `name` in ascending order.
4049    /// You can also sort results in descending order based on the `name` value
4050    /// using `orderBy="name desc"`.
4051    /// Currently, only ordering by `name` is supported.
4052    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4053    pub order_by: std::string::String,
4054}
4055
4056impl ListNetworkPeeringsRequest {
4057    pub fn new() -> Self {
4058        std::default::Default::default()
4059    }
4060
4061    /// Sets the value of [parent][crate::model::ListNetworkPeeringsRequest::parent].
4062    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4063        self.parent = v.into();
4064        self
4065    }
4066
4067    /// Sets the value of [page_size][crate::model::ListNetworkPeeringsRequest::page_size].
4068    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4069        self.page_size = v.into();
4070        self
4071    }
4072
4073    /// Sets the value of [page_token][crate::model::ListNetworkPeeringsRequest::page_token].
4074    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4075        self.page_token = v.into();
4076        self
4077    }
4078
4079    /// Sets the value of [filter][crate::model::ListNetworkPeeringsRequest::filter].
4080    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4081        self.filter = v.into();
4082        self
4083    }
4084
4085    /// Sets the value of [order_by][crate::model::ListNetworkPeeringsRequest::order_by].
4086    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4087        self.order_by = v.into();
4088        self
4089    }
4090}
4091
4092impl wkt::message::Message for ListNetworkPeeringsRequest {
4093    fn typename() -> &'static str {
4094        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest"
4095    }
4096}
4097
4098/// Request message for
4099/// [VmwareEngine.UpdateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]
4100///
4101/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]: crate::client::VmwareEngine::update_network_peering
4102#[serde_with::serde_as]
4103#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4104#[serde(default, rename_all = "camelCase")]
4105#[non_exhaustive]
4106pub struct UpdateNetworkPeeringRequest {
4107    /// Required. Network peering description.
4108    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4109    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
4110
4111    /// Required. Field mask is used to specify the fields to be overwritten in the
4112    /// `NetworkPeering` resource by the update.
4113    /// The fields specified in the `update_mask` are relative to the resource, not
4114    /// the full request. A field will be overwritten if it is in the mask. If the
4115    /// user does not provide a mask then all fields will be overwritten.
4116    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4117    pub update_mask: std::option::Option<wkt::FieldMask>,
4118
4119    /// Optional. A request ID to identify requests. Specify a unique request ID
4120    /// so that if you must retry your request, the server will know to ignore
4121    /// the request if it has already been completed. The server guarantees that a
4122    /// request doesn't result in creation of duplicate commitments for at least 60
4123    /// minutes.
4124    ///
4125    /// For example, consider a situation where you make an initial request and the
4126    /// request times out. If you make the request again with the same request
4127    /// ID, the server can check if original operation with the same request ID
4128    /// was received, and if so, will ignore the second request. This prevents
4129    /// clients from accidentally creating duplicate commitments.
4130    ///
4131    /// The request ID must be a valid UUID with the exception that zero UUID is
4132    /// not supported (00000000-0000-0000-0000-000000000000).
4133    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4134    pub request_id: std::string::String,
4135}
4136
4137impl UpdateNetworkPeeringRequest {
4138    pub fn new() -> Self {
4139        std::default::Default::default()
4140    }
4141
4142    /// Sets the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
4143    pub fn set_network_peering<
4144        T: std::convert::Into<std::option::Option<crate::model::NetworkPeering>>,
4145    >(
4146        mut self,
4147        v: T,
4148    ) -> Self {
4149        self.network_peering = v.into();
4150        self
4151    }
4152
4153    /// Sets the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
4154    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4155        mut self,
4156        v: T,
4157    ) -> Self {
4158        self.update_mask = v.into();
4159        self
4160    }
4161
4162    /// Sets the value of [request_id][crate::model::UpdateNetworkPeeringRequest::request_id].
4163    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4164        self.request_id = v.into();
4165        self
4166    }
4167}
4168
4169impl wkt::message::Message for UpdateNetworkPeeringRequest {
4170    fn typename() -> &'static str {
4171        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest"
4172    }
4173}
4174
4175/// Response message for
4176/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
4177///
4178/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
4179#[serde_with::serde_as]
4180#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4181#[serde(default, rename_all = "camelCase")]
4182#[non_exhaustive]
4183pub struct ListNetworkPeeringsResponse {
4184    /// A list of network peerings.
4185    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4186    pub network_peerings: std::vec::Vec<crate::model::NetworkPeering>,
4187
4188    /// A token, which can be sent as `page_token` to retrieve the next page.
4189    /// If this field is omitted, there are no subsequent pages.
4190    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4191    pub next_page_token: std::string::String,
4192
4193    /// Unreachable resources.
4194    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4195    pub unreachable: std::vec::Vec<std::string::String>,
4196}
4197
4198impl ListNetworkPeeringsResponse {
4199    pub fn new() -> Self {
4200        std::default::Default::default()
4201    }
4202
4203    /// Sets the value of [next_page_token][crate::model::ListNetworkPeeringsResponse::next_page_token].
4204    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4205        self.next_page_token = v.into();
4206        self
4207    }
4208
4209    /// Sets the value of [network_peerings][crate::model::ListNetworkPeeringsResponse::network_peerings].
4210    pub fn set_network_peerings<T, V>(mut self, v: T) -> Self
4211    where
4212        T: std::iter::IntoIterator<Item = V>,
4213        V: std::convert::Into<crate::model::NetworkPeering>,
4214    {
4215        use std::iter::Iterator;
4216        self.network_peerings = v.into_iter().map(|i| i.into()).collect();
4217        self
4218    }
4219
4220    /// Sets the value of [unreachable][crate::model::ListNetworkPeeringsResponse::unreachable].
4221    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4222    where
4223        T: std::iter::IntoIterator<Item = V>,
4224        V: std::convert::Into<std::string::String>,
4225    {
4226        use std::iter::Iterator;
4227        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4228        self
4229    }
4230}
4231
4232impl wkt::message::Message for ListNetworkPeeringsResponse {
4233    fn typename() -> &'static str {
4234        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsResponse"
4235    }
4236}
4237
4238#[cfg(feature = "unstable-stream")]
4239impl gax::paginator::PageableResponse for ListNetworkPeeringsResponse {
4240    type PageItem = crate::model::NetworkPeering;
4241
4242    fn items(self) -> std::vec::Vec<Self::PageItem> {
4243        self.network_peerings
4244    }
4245
4246    fn next_page_token(&self) -> std::string::String {
4247        gax::paginator::extract_token(&self.next_page_token)
4248    }
4249}
4250
4251/// Request message for
4252/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
4253///
4254/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
4255#[serde_with::serde_as]
4256#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4257#[serde(default, rename_all = "camelCase")]
4258#[non_exhaustive]
4259pub struct ListPeeringRoutesRequest {
4260    /// Required. The resource name of the network peering to retrieve peering
4261    /// routes from. Resource names are schemeless URIs that follow the conventions
4262    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
4263    /// `projects/my-project/locations/global/networkPeerings/my-peering`
4264    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4265    pub parent: std::string::String,
4266
4267    /// The maximum number of peering routes to return in one page.
4268    /// The service may return fewer than this value.
4269    /// The maximum value is coerced to 1000.
4270    /// The default value of this field is 500.
4271    pub page_size: i32,
4272
4273    /// A page token, received from a previous `ListPeeringRoutes` call.
4274    /// Provide this to retrieve the subsequent page.
4275    /// When paginating, all other parameters provided to `ListPeeringRoutes` must
4276    /// match the call that provided the page token.
4277    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4278    pub page_token: std::string::String,
4279
4280    /// A filter expression that matches resources returned in the response.
4281    /// Currently, only filtering on the `direction` field is supported. To return
4282    /// routes imported from the peer network, provide "direction=INCOMING". To
4283    /// return routes exported from the VMware Engine network, provide
4284    /// "direction=OUTGOING". Other filter expressions return an error.
4285    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4286    pub filter: std::string::String,
4287}
4288
4289impl ListPeeringRoutesRequest {
4290    pub fn new() -> Self {
4291        std::default::Default::default()
4292    }
4293
4294    /// Sets the value of [parent][crate::model::ListPeeringRoutesRequest::parent].
4295    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4296        self.parent = v.into();
4297        self
4298    }
4299
4300    /// Sets the value of [page_size][crate::model::ListPeeringRoutesRequest::page_size].
4301    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4302        self.page_size = v.into();
4303        self
4304    }
4305
4306    /// Sets the value of [page_token][crate::model::ListPeeringRoutesRequest::page_token].
4307    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4308        self.page_token = v.into();
4309        self
4310    }
4311
4312    /// Sets the value of [filter][crate::model::ListPeeringRoutesRequest::filter].
4313    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4314        self.filter = v.into();
4315        self
4316    }
4317}
4318
4319impl wkt::message::Message for ListPeeringRoutesRequest {
4320    fn typename() -> &'static str {
4321        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesRequest"
4322    }
4323}
4324
4325/// Response message for
4326/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
4327///
4328/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
4329#[serde_with::serde_as]
4330#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4331#[serde(default, rename_all = "camelCase")]
4332#[non_exhaustive]
4333pub struct ListPeeringRoutesResponse {
4334    /// A list of peering routes.
4335    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4336    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
4337
4338    /// A token, which can be sent as `page_token` to retrieve the next page.
4339    /// If this field is omitted, there are no subsequent pages.
4340    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4341    pub next_page_token: std::string::String,
4342}
4343
4344impl ListPeeringRoutesResponse {
4345    pub fn new() -> Self {
4346        std::default::Default::default()
4347    }
4348
4349    /// Sets the value of [next_page_token][crate::model::ListPeeringRoutesResponse::next_page_token].
4350    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4351        self.next_page_token = v.into();
4352        self
4353    }
4354
4355    /// Sets the value of [peering_routes][crate::model::ListPeeringRoutesResponse::peering_routes].
4356    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
4357    where
4358        T: std::iter::IntoIterator<Item = V>,
4359        V: std::convert::Into<crate::model::PeeringRoute>,
4360    {
4361        use std::iter::Iterator;
4362        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
4363        self
4364    }
4365}
4366
4367impl wkt::message::Message for ListPeeringRoutesResponse {
4368    fn typename() -> &'static str {
4369        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesResponse"
4370    }
4371}
4372
4373#[cfg(feature = "unstable-stream")]
4374impl gax::paginator::PageableResponse for ListPeeringRoutesResponse {
4375    type PageItem = crate::model::PeeringRoute;
4376
4377    fn items(self) -> std::vec::Vec<Self::PageItem> {
4378        self.peering_routes
4379    }
4380
4381    fn next_page_token(&self) -> std::string::String {
4382        gax::paginator::extract_token(&self.next_page_token)
4383    }
4384}
4385
4386/// Request message for
4387/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
4388///
4389/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
4390#[serde_with::serde_as]
4391#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4392#[serde(default, rename_all = "camelCase")]
4393#[non_exhaustive]
4394pub struct ListNetworkPoliciesRequest {
4395    /// Required. The resource name of the location (region) to query for
4396    /// network policies. Resource names are schemeless URIs that follow the
4397    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
4398    /// example: `projects/my-project/locations/us-central1`
4399    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4400    pub parent: std::string::String,
4401
4402    /// The maximum number of network policies to return in one page.
4403    /// The service may return fewer than this value.
4404    /// The maximum value is coerced to 1000.
4405    /// The default value of this field is 500.
4406    pub page_size: i32,
4407
4408    /// A page token, received from a previous `ListNetworkPolicies` call.
4409    /// Provide this to retrieve the subsequent page.
4410    ///
4411    /// When paginating, all other parameters provided to
4412    /// `ListNetworkPolicies` must match the call that provided the page
4413    /// token.
4414    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4415    pub page_token: std::string::String,
4416
4417    /// A filter expression that matches resources returned in the response.
4418    /// The expression must specify the field name, a comparison
4419    /// operator, and the value that you want to use for filtering. The value
4420    /// must be a string, a number, or a boolean. The comparison operator
4421    /// must be `=`, `!=`, `>`, or `<`.
4422    ///
4423    /// For example, if you are filtering a list of network policies, you can
4424    /// exclude the ones named `example-policy` by specifying
4425    /// `name != "example-policy"`.
4426    ///
4427    /// To filter on multiple expressions, provide each separate expression within
4428    /// parentheses. For example:
4429    ///
4430    /// ```norust
4431    /// (name = "example-policy")
4432    /// (createTime > "2021-04-12T08:15:10.40Z")
4433    /// ```
4434    ///
4435    /// By default, each expression is an `AND` expression. However, you
4436    /// can include `AND` and `OR` expressions explicitly.
4437    /// For example:
4438    ///
4439    /// ```norust
4440    /// (name = "example-policy-1") AND
4441    /// (createTime > "2021-04-12T08:15:10.40Z") OR
4442    /// (name = "example-policy-2")
4443    /// ```
4444    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4445    pub filter: std::string::String,
4446
4447    /// Sorts list results by a certain order. By default, returned results
4448    /// are ordered by `name` in ascending order.
4449    /// You can also sort results in descending order based on the `name` value
4450    /// using `orderBy="name desc"`.
4451    /// Currently, only ordering by `name` is supported.
4452    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4453    pub order_by: std::string::String,
4454}
4455
4456impl ListNetworkPoliciesRequest {
4457    pub fn new() -> Self {
4458        std::default::Default::default()
4459    }
4460
4461    /// Sets the value of [parent][crate::model::ListNetworkPoliciesRequest::parent].
4462    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4463        self.parent = v.into();
4464        self
4465    }
4466
4467    /// Sets the value of [page_size][crate::model::ListNetworkPoliciesRequest::page_size].
4468    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4469        self.page_size = v.into();
4470        self
4471    }
4472
4473    /// Sets the value of [page_token][crate::model::ListNetworkPoliciesRequest::page_token].
4474    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4475        self.page_token = v.into();
4476        self
4477    }
4478
4479    /// Sets the value of [filter][crate::model::ListNetworkPoliciesRequest::filter].
4480    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4481        self.filter = v.into();
4482        self
4483    }
4484
4485    /// Sets the value of [order_by][crate::model::ListNetworkPoliciesRequest::order_by].
4486    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4487        self.order_by = v.into();
4488        self
4489    }
4490}
4491
4492impl wkt::message::Message for ListNetworkPoliciesRequest {
4493    fn typename() -> &'static str {
4494        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest"
4495    }
4496}
4497
4498/// Response message for
4499/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
4500///
4501/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
4502#[serde_with::serde_as]
4503#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4504#[serde(default, rename_all = "camelCase")]
4505#[non_exhaustive]
4506pub struct ListNetworkPoliciesResponse {
4507    /// A list of network policies.
4508    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4509    pub network_policies: std::vec::Vec<crate::model::NetworkPolicy>,
4510
4511    /// A token, which can be send as `page_token` to retrieve the next page.
4512    /// If this field is omitted, there are no subsequent pages.
4513    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4514    pub next_page_token: std::string::String,
4515
4516    /// Locations that could not be reached when making an aggregated query using
4517    /// wildcards.
4518    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4519    pub unreachable: std::vec::Vec<std::string::String>,
4520}
4521
4522impl ListNetworkPoliciesResponse {
4523    pub fn new() -> Self {
4524        std::default::Default::default()
4525    }
4526
4527    /// Sets the value of [next_page_token][crate::model::ListNetworkPoliciesResponse::next_page_token].
4528    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4529        self.next_page_token = v.into();
4530        self
4531    }
4532
4533    /// Sets the value of [network_policies][crate::model::ListNetworkPoliciesResponse::network_policies].
4534    pub fn set_network_policies<T, V>(mut self, v: T) -> Self
4535    where
4536        T: std::iter::IntoIterator<Item = V>,
4537        V: std::convert::Into<crate::model::NetworkPolicy>,
4538    {
4539        use std::iter::Iterator;
4540        self.network_policies = v.into_iter().map(|i| i.into()).collect();
4541        self
4542    }
4543
4544    /// Sets the value of [unreachable][crate::model::ListNetworkPoliciesResponse::unreachable].
4545    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4546    where
4547        T: std::iter::IntoIterator<Item = V>,
4548        V: std::convert::Into<std::string::String>,
4549    {
4550        use std::iter::Iterator;
4551        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4552        self
4553    }
4554}
4555
4556impl wkt::message::Message for ListNetworkPoliciesResponse {
4557    fn typename() -> &'static str {
4558        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse"
4559    }
4560}
4561
4562#[cfg(feature = "unstable-stream")]
4563impl gax::paginator::PageableResponse for ListNetworkPoliciesResponse {
4564    type PageItem = crate::model::NetworkPolicy;
4565
4566    fn items(self) -> std::vec::Vec<Self::PageItem> {
4567        self.network_policies
4568    }
4569
4570    fn next_page_token(&self) -> std::string::String {
4571        gax::paginator::extract_token(&self.next_page_token)
4572    }
4573}
4574
4575/// Request message for
4576/// [VmwareEngine.GetNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]
4577///
4578/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]: crate::client::VmwareEngine::get_network_policy
4579#[serde_with::serde_as]
4580#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4581#[serde(default, rename_all = "camelCase")]
4582#[non_exhaustive]
4583pub struct GetNetworkPolicyRequest {
4584    /// Required. The resource name of the network policy to retrieve.
4585    /// Resource names are schemeless URIs that follow the conventions in
4586    /// <https://cloud.google.com/apis/design/resource_names>.
4587    /// For example:
4588    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
4589    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4590    pub name: std::string::String,
4591}
4592
4593impl GetNetworkPolicyRequest {
4594    pub fn new() -> Self {
4595        std::default::Default::default()
4596    }
4597
4598    /// Sets the value of [name][crate::model::GetNetworkPolicyRequest::name].
4599    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4600        self.name = v.into();
4601        self
4602    }
4603}
4604
4605impl wkt::message::Message for GetNetworkPolicyRequest {
4606    fn typename() -> &'static str {
4607        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPolicyRequest"
4608    }
4609}
4610
4611/// Request message for
4612/// [VmwareEngine.UpdateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]
4613///
4614/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]: crate::client::VmwareEngine::update_network_policy
4615#[serde_with::serde_as]
4616#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4617#[serde(default, rename_all = "camelCase")]
4618#[non_exhaustive]
4619pub struct UpdateNetworkPolicyRequest {
4620    /// Required. Network policy description.
4621    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4622    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
4623
4624    /// Required. Field mask is used to specify the fields to be overwritten in the
4625    /// `NetworkPolicy` resource by the update.
4626    /// The fields specified in the `update_mask` are relative to the resource, not
4627    /// the full request. A field will be overwritten if it is in the mask. If the
4628    /// user does not provide a mask then all fields will be overwritten.
4629    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4630    pub update_mask: std::option::Option<wkt::FieldMask>,
4631
4632    /// Optional. A request ID to identify requests. Specify a unique request ID
4633    /// so that if you must retry your request, the server will know to ignore
4634    /// the request if it has already been completed. The server guarantees that a
4635    /// request doesn't result in creation of duplicate commitments for at least 60
4636    /// minutes.
4637    ///
4638    /// For example, consider a situation where you make an initial request and the
4639    /// request times out. If you make the request again with the same request
4640    /// ID, the server can check if original operation with the same request ID
4641    /// was received, and if so, will ignore the second request. This prevents
4642    /// clients from accidentally creating duplicate commitments.
4643    ///
4644    /// The request ID must be a valid UUID with the exception that zero UUID is
4645    /// not supported (00000000-0000-0000-0000-000000000000).
4646    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4647    pub request_id: std::string::String,
4648}
4649
4650impl UpdateNetworkPolicyRequest {
4651    pub fn new() -> Self {
4652        std::default::Default::default()
4653    }
4654
4655    /// Sets the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
4656    pub fn set_network_policy<
4657        T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
4658    >(
4659        mut self,
4660        v: T,
4661    ) -> Self {
4662        self.network_policy = v.into();
4663        self
4664    }
4665
4666    /// Sets the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
4667    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4668        mut self,
4669        v: T,
4670    ) -> Self {
4671        self.update_mask = v.into();
4672        self
4673    }
4674
4675    /// Sets the value of [request_id][crate::model::UpdateNetworkPolicyRequest::request_id].
4676    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4677        self.request_id = v.into();
4678        self
4679    }
4680}
4681
4682impl wkt::message::Message for UpdateNetworkPolicyRequest {
4683    fn typename() -> &'static str {
4684        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest"
4685    }
4686}
4687
4688/// Request message for
4689/// [VmwareEngine.CreateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]
4690///
4691/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]: crate::client::VmwareEngine::create_network_policy
4692#[serde_with::serde_as]
4693#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4694#[serde(default, rename_all = "camelCase")]
4695#[non_exhaustive]
4696pub struct CreateNetworkPolicyRequest {
4697    /// Required. The resource name of the location (region)
4698    /// to create the new network policy in.
4699    /// Resource names are schemeless URIs that follow the conventions in
4700    /// <https://cloud.google.com/apis/design/resource_names>.
4701    /// For example:
4702    /// `projects/my-project/locations/us-central1`
4703    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4704    pub parent: std::string::String,
4705
4706    /// Required. The user-provided identifier of the network policy to be created.
4707    /// This identifier must be unique within parent
4708    /// `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes
4709    /// the final token in the name URI.
4710    /// The identifier must meet the following requirements:
4711    ///
4712    /// * Only contains 1-63 alphanumeric characters and hyphens
4713    /// * Begins with an alphabetical character
4714    /// * Ends with a non-hyphen character
4715    /// * Not formatted as a UUID
4716    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
4717    ///   (section 3.5)
4718    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4719    pub network_policy_id: std::string::String,
4720
4721    /// Required. The network policy configuration to use in the request.
4722    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4723    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
4724
4725    /// Optional. A request ID to identify requests. Specify a unique request ID
4726    /// so that if you must retry your request, the server will know to ignore
4727    /// the request if it has already been completed. The server guarantees that a
4728    /// request doesn't result in creation of duplicate commitments for at least 60
4729    /// minutes.
4730    ///
4731    /// For example, consider a situation where you make an initial request and the
4732    /// request times out. If you make the request again with the same request
4733    /// ID, the server can check if original operation with the same request ID
4734    /// was received, and if so, will ignore the second request. This prevents
4735    /// clients from accidentally creating duplicate commitments.
4736    ///
4737    /// The request ID must be a valid UUID with the exception that zero UUID is
4738    /// not supported (00000000-0000-0000-0000-000000000000).
4739    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4740    pub request_id: std::string::String,
4741}
4742
4743impl CreateNetworkPolicyRequest {
4744    pub fn new() -> Self {
4745        std::default::Default::default()
4746    }
4747
4748    /// Sets the value of [parent][crate::model::CreateNetworkPolicyRequest::parent].
4749    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4750        self.parent = v.into();
4751        self
4752    }
4753
4754    /// Sets the value of [network_policy_id][crate::model::CreateNetworkPolicyRequest::network_policy_id].
4755    pub fn set_network_policy_id<T: std::convert::Into<std::string::String>>(
4756        mut self,
4757        v: T,
4758    ) -> Self {
4759        self.network_policy_id = v.into();
4760        self
4761    }
4762
4763    /// Sets the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
4764    pub fn set_network_policy<
4765        T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
4766    >(
4767        mut self,
4768        v: T,
4769    ) -> Self {
4770        self.network_policy = v.into();
4771        self
4772    }
4773
4774    /// Sets the value of [request_id][crate::model::CreateNetworkPolicyRequest::request_id].
4775    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4776        self.request_id = v.into();
4777        self
4778    }
4779}
4780
4781impl wkt::message::Message for CreateNetworkPolicyRequest {
4782    fn typename() -> &'static str {
4783        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest"
4784    }
4785}
4786
4787/// Request message for
4788/// [VmwareEngine.DeleteNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]
4789///
4790/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]: crate::client::VmwareEngine::delete_network_policy
4791#[serde_with::serde_as]
4792#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4793#[serde(default, rename_all = "camelCase")]
4794#[non_exhaustive]
4795pub struct DeleteNetworkPolicyRequest {
4796    /// Required. The resource name of the network policy to delete.
4797    /// Resource names are schemeless URIs that follow the conventions in
4798    /// <https://cloud.google.com/apis/design/resource_names>.
4799    /// For example:
4800    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
4801    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4802    pub name: std::string::String,
4803
4804    /// Optional. A request ID to identify requests. Specify a unique request ID
4805    /// so that if you must retry your request, the server will know to ignore
4806    /// the request if it has already been completed. The server guarantees that a
4807    /// request doesn't result in creation of duplicate commitments for at least 60
4808    /// minutes.
4809    ///
4810    /// For example, consider a situation where you make an initial request and the
4811    /// request times out. If you make the request again with the same request
4812    /// ID, the server can check if original operation with the same request ID
4813    /// was received, and if so, will ignore the second request. This prevents
4814    /// clients from accidentally creating duplicate commitments.
4815    ///
4816    /// The request ID must be a valid UUID with the exception that zero UUID is
4817    /// not supported (00000000-0000-0000-0000-000000000000).
4818    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4819    pub request_id: std::string::String,
4820}
4821
4822impl DeleteNetworkPolicyRequest {
4823    pub fn new() -> Self {
4824        std::default::Default::default()
4825    }
4826
4827    /// Sets the value of [name][crate::model::DeleteNetworkPolicyRequest::name].
4828    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4829        self.name = v.into();
4830        self
4831    }
4832
4833    /// Sets the value of [request_id][crate::model::DeleteNetworkPolicyRequest::request_id].
4834    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4835        self.request_id = v.into();
4836        self
4837    }
4838}
4839
4840impl wkt::message::Message for DeleteNetworkPolicyRequest {
4841    fn typename() -> &'static str {
4842        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest"
4843    }
4844}
4845
4846/// Request message for
4847/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
4848///
4849/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
4850#[serde_with::serde_as]
4851#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4852#[serde(default, rename_all = "camelCase")]
4853#[non_exhaustive]
4854pub struct ListManagementDnsZoneBindingsRequest {
4855    /// Required. The resource name of the private cloud to be queried for
4856    /// management DNS zone bindings.
4857    /// Resource names are schemeless URIs that follow the conventions in
4858    /// <https://cloud.google.com/apis/design/resource_names>.
4859    /// For example:
4860    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
4861    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4862    pub parent: std::string::String,
4863
4864    /// The maximum number of management DNS zone bindings to return in one page.
4865    /// The service may return fewer than this value.
4866    /// The maximum value is coerced to 1000.
4867    /// The default value of this field is 500.
4868    pub page_size: i32,
4869
4870    /// A page token, received from a previous `ListManagementDnsZoneBindings`
4871    /// call. Provide this to retrieve the subsequent page.
4872    ///
4873    /// When paginating, all other parameters provided to
4874    /// `ListManagementDnsZoneBindings` must match the call that provided the page
4875    /// token.
4876    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4877    pub page_token: std::string::String,
4878
4879    /// A filter expression that matches resources returned in the response.
4880    /// The expression must specify the field name, a comparison
4881    /// operator, and the value that you want to use for filtering. The value
4882    /// must be a string, a number, or a boolean. The comparison operator
4883    /// must be `=`, `!=`, `>`, or `<`.
4884    ///
4885    /// For example, if you are filtering a list of Management DNS Zone Bindings,
4886    /// you can exclude the ones named `example-management-dns-zone-binding` by
4887    /// specifying `name != "example-management-dns-zone-binding"`.
4888    ///
4889    /// To filter on multiple expressions, provide each separate expression within
4890    /// parentheses. For example:
4891    ///
4892    /// ```norust
4893    /// (name = "example-management-dns-zone-binding")
4894    /// (createTime > "2021-04-12T08:15:10.40Z")
4895    /// ```
4896    ///
4897    /// By default, each expression is an `AND` expression. However, you
4898    /// can include `AND` and `OR` expressions explicitly.
4899    /// For example:
4900    ///
4901    /// ```norust
4902    /// (name = "example-management-dns-zone-binding-1") AND
4903    /// (createTime > "2021-04-12T08:15:10.40Z") OR
4904    /// (name = "example-management-dns-zone-binding-2")
4905    /// ```
4906    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4907    pub filter: std::string::String,
4908
4909    /// Sorts list results by a certain order. By default, returned results
4910    /// are ordered by `name` in ascending order.
4911    /// You can also sort results in descending order based on the `name` value
4912    /// using `orderBy="name desc"`.
4913    /// Currently, only ordering by `name` is supported.
4914    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4915    pub order_by: std::string::String,
4916}
4917
4918impl ListManagementDnsZoneBindingsRequest {
4919    pub fn new() -> Self {
4920        std::default::Default::default()
4921    }
4922
4923    /// Sets the value of [parent][crate::model::ListManagementDnsZoneBindingsRequest::parent].
4924    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4925        self.parent = v.into();
4926        self
4927    }
4928
4929    /// Sets the value of [page_size][crate::model::ListManagementDnsZoneBindingsRequest::page_size].
4930    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4931        self.page_size = v.into();
4932        self
4933    }
4934
4935    /// Sets the value of [page_token][crate::model::ListManagementDnsZoneBindingsRequest::page_token].
4936    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4937        self.page_token = v.into();
4938        self
4939    }
4940
4941    /// Sets the value of [filter][crate::model::ListManagementDnsZoneBindingsRequest::filter].
4942    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4943        self.filter = v.into();
4944        self
4945    }
4946
4947    /// Sets the value of [order_by][crate::model::ListManagementDnsZoneBindingsRequest::order_by].
4948    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4949        self.order_by = v.into();
4950        self
4951    }
4952}
4953
4954impl wkt::message::Message for ListManagementDnsZoneBindingsRequest {
4955    fn typename() -> &'static str {
4956        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest"
4957    }
4958}
4959
4960/// Response message for
4961/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
4962///
4963/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
4964#[serde_with::serde_as]
4965#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4966#[serde(default, rename_all = "camelCase")]
4967#[non_exhaustive]
4968pub struct ListManagementDnsZoneBindingsResponse {
4969    /// A list of management DNS zone bindings.
4970    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4971    pub management_dns_zone_bindings: std::vec::Vec<crate::model::ManagementDnsZoneBinding>,
4972
4973    /// A token, which can be sent as `page_token` to retrieve the next page.
4974    /// If this field is omitted, there are no subsequent pages.
4975    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4976    pub next_page_token: std::string::String,
4977
4978    /// Locations that could not be reached when making an aggregated query using
4979    /// wildcards.
4980    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4981    pub unreachable: std::vec::Vec<std::string::String>,
4982}
4983
4984impl ListManagementDnsZoneBindingsResponse {
4985    pub fn new() -> Self {
4986        std::default::Default::default()
4987    }
4988
4989    /// Sets the value of [next_page_token][crate::model::ListManagementDnsZoneBindingsResponse::next_page_token].
4990    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4991        self.next_page_token = v.into();
4992        self
4993    }
4994
4995    /// Sets the value of [management_dns_zone_bindings][crate::model::ListManagementDnsZoneBindingsResponse::management_dns_zone_bindings].
4996    pub fn set_management_dns_zone_bindings<T, V>(mut self, v: T) -> Self
4997    where
4998        T: std::iter::IntoIterator<Item = V>,
4999        V: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
5000    {
5001        use std::iter::Iterator;
5002        self.management_dns_zone_bindings = v.into_iter().map(|i| i.into()).collect();
5003        self
5004    }
5005
5006    /// Sets the value of [unreachable][crate::model::ListManagementDnsZoneBindingsResponse::unreachable].
5007    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5008    where
5009        T: std::iter::IntoIterator<Item = V>,
5010        V: std::convert::Into<std::string::String>,
5011    {
5012        use std::iter::Iterator;
5013        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5014        self
5015    }
5016}
5017
5018impl wkt::message::Message for ListManagementDnsZoneBindingsResponse {
5019    fn typename() -> &'static str {
5020        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsResponse"
5021    }
5022}
5023
5024#[cfg(feature = "unstable-stream")]
5025impl gax::paginator::PageableResponse for ListManagementDnsZoneBindingsResponse {
5026    type PageItem = crate::model::ManagementDnsZoneBinding;
5027
5028    fn items(self) -> std::vec::Vec<Self::PageItem> {
5029        self.management_dns_zone_bindings
5030    }
5031
5032    fn next_page_token(&self) -> std::string::String {
5033        gax::paginator::extract_token(&self.next_page_token)
5034    }
5035}
5036
5037/// Request message for
5038/// [VmwareEngine.GetManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]
5039///
5040/// [google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]: crate::client::VmwareEngine::get_management_dns_zone_binding
5041#[serde_with::serde_as]
5042#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5043#[serde(default, rename_all = "camelCase")]
5044#[non_exhaustive]
5045pub struct GetManagementDnsZoneBindingRequest {
5046    /// Required. The resource name of the management DNS zone binding to
5047    /// retrieve. Resource names are schemeless URIs that follow the conventions in
5048    /// <https://cloud.google.com/apis/design/resource_names>.
5049    /// For example:
5050    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5051    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5052    pub name: std::string::String,
5053}
5054
5055impl GetManagementDnsZoneBindingRequest {
5056    pub fn new() -> Self {
5057        std::default::Default::default()
5058    }
5059
5060    /// Sets the value of [name][crate::model::GetManagementDnsZoneBindingRequest::name].
5061    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5062        self.name = v.into();
5063        self
5064    }
5065}
5066
5067impl wkt::message::Message for GetManagementDnsZoneBindingRequest {
5068    fn typename() -> &'static str {
5069        "type.googleapis.com/google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest"
5070    }
5071}
5072
5073/// Request message for [VmwareEngine.CreateManagementDnsZoneBindings][]
5074#[serde_with::serde_as]
5075#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5076#[serde(default, rename_all = "camelCase")]
5077#[non_exhaustive]
5078pub struct CreateManagementDnsZoneBindingRequest {
5079    /// Required. The resource name of the private cloud
5080    /// to create a new management DNS zone binding for.
5081    /// Resource names are schemeless URIs that follow the conventions in
5082    /// <https://cloud.google.com/apis/design/resource_names>.
5083    /// For example:
5084    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
5085    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5086    pub parent: std::string::String,
5087
5088    /// Required. The initial values for a new management DNS zone binding.
5089    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5090    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
5091
5092    /// Required. The user-provided identifier of the `ManagementDnsZoneBinding`
5093    /// resource to be created. This identifier must be unique among
5094    /// `ManagementDnsZoneBinding` resources within the parent and becomes the
5095    /// final token in the name URI. The identifier must meet the following
5096    /// requirements:
5097    ///
5098    /// * Only contains 1-63 alphanumeric characters and hyphens
5099    /// * Begins with an alphabetical character
5100    /// * Ends with a non-hyphen character
5101    /// * Not formatted as a UUID
5102    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5103    ///   (section 3.5)
5104    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5105    pub management_dns_zone_binding_id: std::string::String,
5106
5107    /// Optional. A request ID to identify requests. Specify a unique request ID
5108    /// so that if you must retry your request, the server will know to ignore
5109    /// the request if it has already been completed. The server guarantees that a
5110    /// request doesn't result in creation of duplicate commitments for at least 60
5111    /// minutes.
5112    ///
5113    /// For example, consider a situation where you make an initial request and the
5114    /// request times out. If you make the request again with the same request ID,
5115    /// the server can check if the original operation with the same request ID was
5116    /// received, and if so, will ignore the second request. This prevents clients
5117    /// from accidentally creating duplicate commitments.
5118    ///
5119    /// The request ID must be a valid UUID with the exception that zero UUID is
5120    /// not supported (00000000-0000-0000-0000-000000000000).
5121    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5122    pub request_id: std::string::String,
5123}
5124
5125impl CreateManagementDnsZoneBindingRequest {
5126    pub fn new() -> Self {
5127        std::default::Default::default()
5128    }
5129
5130    /// Sets the value of [parent][crate::model::CreateManagementDnsZoneBindingRequest::parent].
5131    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5132        self.parent = v.into();
5133        self
5134    }
5135
5136    /// Sets the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
5137    pub fn set_management_dns_zone_binding<
5138        T: std::convert::Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
5139    >(
5140        mut self,
5141        v: T,
5142    ) -> Self {
5143        self.management_dns_zone_binding = v.into();
5144        self
5145    }
5146
5147    /// Sets the value of [management_dns_zone_binding_id][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding_id].
5148    pub fn set_management_dns_zone_binding_id<T: std::convert::Into<std::string::String>>(
5149        mut self,
5150        v: T,
5151    ) -> Self {
5152        self.management_dns_zone_binding_id = v.into();
5153        self
5154    }
5155
5156    /// Sets the value of [request_id][crate::model::CreateManagementDnsZoneBindingRequest::request_id].
5157    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5158        self.request_id = v.into();
5159        self
5160    }
5161}
5162
5163impl wkt::message::Message for CreateManagementDnsZoneBindingRequest {
5164    fn typename() -> &'static str {
5165        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest"
5166    }
5167}
5168
5169/// Request message for
5170/// [VmwareEngine.UpdateManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]
5171///
5172/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]: crate::client::VmwareEngine::update_management_dns_zone_binding
5173#[serde_with::serde_as]
5174#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5175#[serde(default, rename_all = "camelCase")]
5176#[non_exhaustive]
5177pub struct UpdateManagementDnsZoneBindingRequest {
5178    /// Required. Field mask is used to specify the fields to be overwritten in the
5179    /// `ManagementDnsZoneBinding` resource by the update.
5180    /// The fields specified in the `update_mask` are relative to the resource, not
5181    /// the full request. A field will be overwritten if it is in the mask. If the
5182    /// user does not provide a mask then all fields will be overwritten.
5183    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5184    pub update_mask: std::option::Option<wkt::FieldMask>,
5185
5186    /// Required. New values to update the management DNS zone binding with.
5187    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5188    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
5189
5190    /// Optional. A request ID to identify requests. Specify a unique request ID
5191    /// so that if you must retry your request, the server will know to ignore
5192    /// the request if it has already been completed. The server guarantees that a
5193    /// request doesn't result in creation of duplicate commitments for at least 60
5194    /// minutes.
5195    ///
5196    /// For example, consider a situation where you make an initial request and the
5197    /// request times out. If you make the request again with the same request ID,
5198    /// the server can check if the original operation with the same request ID was
5199    /// received, and if so, will ignore the second request. This prevents clients
5200    /// from accidentally creating duplicate commitments.
5201    ///
5202    /// The request ID must be a valid UUID with the exception that zero UUID is
5203    /// not supported (00000000-0000-0000-0000-000000000000).
5204    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5205    pub request_id: std::string::String,
5206}
5207
5208impl UpdateManagementDnsZoneBindingRequest {
5209    pub fn new() -> Self {
5210        std::default::Default::default()
5211    }
5212
5213    /// Sets the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
5214    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
5215        mut self,
5216        v: T,
5217    ) -> Self {
5218        self.update_mask = v.into();
5219        self
5220    }
5221
5222    /// Sets the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
5223    pub fn set_management_dns_zone_binding<
5224        T: std::convert::Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
5225    >(
5226        mut self,
5227        v: T,
5228    ) -> Self {
5229        self.management_dns_zone_binding = v.into();
5230        self
5231    }
5232
5233    /// Sets the value of [request_id][crate::model::UpdateManagementDnsZoneBindingRequest::request_id].
5234    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5235        self.request_id = v.into();
5236        self
5237    }
5238}
5239
5240impl wkt::message::Message for UpdateManagementDnsZoneBindingRequest {
5241    fn typename() -> &'static str {
5242        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest"
5243    }
5244}
5245
5246/// Request message for
5247/// [VmwareEngine.DeleteManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]
5248///
5249/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]: crate::client::VmwareEngine::delete_management_dns_zone_binding
5250#[serde_with::serde_as]
5251#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5252#[serde(default, rename_all = "camelCase")]
5253#[non_exhaustive]
5254pub struct DeleteManagementDnsZoneBindingRequest {
5255    /// Required. The resource name of the management DNS zone binding to delete.
5256    /// Resource names are schemeless URIs that follow the conventions in
5257    /// <https://cloud.google.com/apis/design/resource_names>.
5258    /// For example:
5259    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5260    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5261    pub name: std::string::String,
5262
5263    /// Optional. A request ID to identify requests. Specify a unique request ID
5264    /// so that if you must retry your request, the server will know to ignore
5265    /// the request if it has already been completed. The server guarantees that a
5266    /// request doesn't result in creation of duplicate commitments for at least 60
5267    /// minutes.
5268    ///
5269    /// For example, consider a situation where you make an initial request and the
5270    /// request times out. If you make the request again with the same request
5271    /// ID, the server can check if the original operation with the same request ID
5272    /// was received, and if so, will ignore the second request. This prevents
5273    /// clients from accidentally creating duplicate commitments.
5274    ///
5275    /// The request ID must be a valid UUID with the exception that zero UUID is
5276    /// not supported (00000000-0000-0000-0000-000000000000).
5277    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5278    pub request_id: std::string::String,
5279}
5280
5281impl DeleteManagementDnsZoneBindingRequest {
5282    pub fn new() -> Self {
5283        std::default::Default::default()
5284    }
5285
5286    /// Sets the value of [name][crate::model::DeleteManagementDnsZoneBindingRequest::name].
5287    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5288        self.name = v.into();
5289        self
5290    }
5291
5292    /// Sets the value of [request_id][crate::model::DeleteManagementDnsZoneBindingRequest::request_id].
5293    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5294        self.request_id = v.into();
5295        self
5296    }
5297}
5298
5299impl wkt::message::Message for DeleteManagementDnsZoneBindingRequest {
5300    fn typename() -> &'static str {
5301        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest"
5302    }
5303}
5304
5305/// Request message for [VmwareEngine.RepairManagementDnsZoneBindings][]
5306#[serde_with::serde_as]
5307#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5308#[serde(default, rename_all = "camelCase")]
5309#[non_exhaustive]
5310pub struct RepairManagementDnsZoneBindingRequest {
5311    /// Required. The resource name of the management DNS zone binding to repair.
5312    /// Resource names are schemeless URIs that follow the conventions in
5313    /// <https://cloud.google.com/apis/design/resource_names>.
5314    /// For example:
5315    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5316    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5317    pub name: std::string::String,
5318
5319    /// Optional. A request ID to identify requests. Specify a unique request ID
5320    /// so that if you must retry your request, the server will know to ignore
5321    /// the request if it has already been completed. The server guarantees that a
5322    /// request doesn't result in creation of duplicate commitments for at least 60
5323    /// minutes.
5324    ///
5325    /// For example, consider a situation where you make an initial request and the
5326    /// request times out. If you make the request again with the same request ID,
5327    /// the server can check if the original operation with the same request ID was
5328    /// received, and if so, will ignore the second request. This prevents clients
5329    /// from accidentally creating duplicate commitments.
5330    ///
5331    /// The request ID must be a valid UUID with the exception that zero UUID is
5332    /// not supported (00000000-0000-0000-0000-000000000000).
5333    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5334    pub request_id: std::string::String,
5335}
5336
5337impl RepairManagementDnsZoneBindingRequest {
5338    pub fn new() -> Self {
5339        std::default::Default::default()
5340    }
5341
5342    /// Sets the value of [name][crate::model::RepairManagementDnsZoneBindingRequest::name].
5343    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5344        self.name = v.into();
5345        self
5346    }
5347
5348    /// Sets the value of [request_id][crate::model::RepairManagementDnsZoneBindingRequest::request_id].
5349    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5350        self.request_id = v.into();
5351        self
5352    }
5353}
5354
5355impl wkt::message::Message for RepairManagementDnsZoneBindingRequest {
5356    fn typename() -> &'static str {
5357        "type.googleapis.com/google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest"
5358    }
5359}
5360
5361/// Request message for
5362/// [VmwareEngine.CreateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]
5363///
5364/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]: crate::client::VmwareEngine::create_vmware_engine_network
5365#[serde_with::serde_as]
5366#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5367#[serde(default, rename_all = "camelCase")]
5368#[non_exhaustive]
5369pub struct CreateVmwareEngineNetworkRequest {
5370    /// Required. The resource name of the location to create the new VMware Engine
5371    /// network in. A VMware Engine network of type
5372    /// `LEGACY` is a regional resource, and a VMware
5373    /// Engine network of type `STANDARD` is a global resource.
5374    /// Resource names are schemeless URIs that follow the conventions in
5375    /// <https://cloud.google.com/apis/design/resource_names>. For example:
5376    /// `projects/my-project/locations/global`
5377    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5378    pub parent: std::string::String,
5379
5380    /// Required. The user-provided identifier of the new VMware Engine network.
5381    /// This identifier must be unique among VMware Engine network resources
5382    /// within the parent and becomes the final token in the name URI. The
5383    /// identifier must meet the following requirements:
5384    ///
5385    /// * For networks of type LEGACY, adheres to the format:
5386    ///   `{region-id}-default`. Replace `{region-id}` with the region where you want
5387    ///   to create the VMware Engine network. For example, "us-central1-default".
5388    /// * Only contains 1-63 alphanumeric characters and hyphens
5389    /// * Begins with an alphabetical character
5390    /// * Ends with a non-hyphen character
5391    /// * Not formatted as a UUID
5392    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5393    ///   (section 3.5)
5394    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5395    pub vmware_engine_network_id: std::string::String,
5396
5397    /// Required. The initial description of the new VMware Engine network.
5398    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5399    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
5400
5401    /// Optional. A request ID to identify requests. Specify a unique request ID
5402    /// so that if you must retry your request, the server will know to ignore
5403    /// the request if it has already been completed. The server guarantees that a
5404    /// request doesn't result in creation of duplicate commitments for at least 60
5405    /// minutes.
5406    ///
5407    /// For example, consider a situation where you make an initial request and the
5408    /// request times out. If you make the request again with the same request
5409    /// ID, the server can check if original operation with the same request ID
5410    /// was received, and if so, will ignore the second request. This prevents
5411    /// clients from accidentally creating duplicate commitments.
5412    ///
5413    /// The request ID must be a valid UUID with the exception that zero UUID is
5414    /// not supported (00000000-0000-0000-0000-000000000000).
5415    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5416    pub request_id: std::string::String,
5417}
5418
5419impl CreateVmwareEngineNetworkRequest {
5420    pub fn new() -> Self {
5421        std::default::Default::default()
5422    }
5423
5424    /// Sets the value of [parent][crate::model::CreateVmwareEngineNetworkRequest::parent].
5425    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5426        self.parent = v.into();
5427        self
5428    }
5429
5430    /// Sets the value of [vmware_engine_network_id][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network_id].
5431    pub fn set_vmware_engine_network_id<T: std::convert::Into<std::string::String>>(
5432        mut self,
5433        v: T,
5434    ) -> Self {
5435        self.vmware_engine_network_id = v.into();
5436        self
5437    }
5438
5439    /// Sets the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
5440    pub fn set_vmware_engine_network<
5441        T: std::convert::Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
5442    >(
5443        mut self,
5444        v: T,
5445    ) -> Self {
5446        self.vmware_engine_network = v.into();
5447        self
5448    }
5449
5450    /// Sets the value of [request_id][crate::model::CreateVmwareEngineNetworkRequest::request_id].
5451    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5452        self.request_id = v.into();
5453        self
5454    }
5455}
5456
5457impl wkt::message::Message for CreateVmwareEngineNetworkRequest {
5458    fn typename() -> &'static str {
5459        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest"
5460    }
5461}
5462
5463/// Request message for
5464/// [VmwareEngine.UpdateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]
5465///
5466/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]: crate::client::VmwareEngine::update_vmware_engine_network
5467#[serde_with::serde_as]
5468#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5469#[serde(default, rename_all = "camelCase")]
5470#[non_exhaustive]
5471pub struct UpdateVmwareEngineNetworkRequest {
5472    /// Required. VMware Engine network description.
5473    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5474    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
5475
5476    /// Required. Field mask is used to specify the fields to be overwritten in the
5477    /// VMware Engine network resource by the update.
5478    /// The fields specified in the `update_mask` are relative to the resource, not
5479    /// the full request. A field will be overwritten if it is in the mask. If the
5480    /// user does not provide a mask then all fields will be overwritten. Only the
5481    /// following fields can be updated: `description`.
5482    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5483    pub update_mask: std::option::Option<wkt::FieldMask>,
5484
5485    /// Optional. A request ID to identify requests. Specify a unique request ID
5486    /// so that if you must retry your request, the server will know to ignore
5487    /// the request if it has already been completed. The server guarantees that a
5488    /// request doesn't result in creation of duplicate commitments for at least 60
5489    /// minutes.
5490    ///
5491    /// For example, consider a situation where you make an initial request and the
5492    /// request times out. If you make the request again with the same request
5493    /// ID, the server can check if original operation with the same request ID
5494    /// was received, and if so, will ignore the second request. This prevents
5495    /// clients from accidentally creating duplicate commitments.
5496    ///
5497    /// The request ID must be a valid UUID with the exception that zero UUID is
5498    /// not supported (00000000-0000-0000-0000-000000000000).
5499    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5500    pub request_id: std::string::String,
5501}
5502
5503impl UpdateVmwareEngineNetworkRequest {
5504    pub fn new() -> Self {
5505        std::default::Default::default()
5506    }
5507
5508    /// Sets the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
5509    pub fn set_vmware_engine_network<
5510        T: std::convert::Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
5511    >(
5512        mut self,
5513        v: T,
5514    ) -> Self {
5515        self.vmware_engine_network = v.into();
5516        self
5517    }
5518
5519    /// Sets the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
5520    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
5521        mut self,
5522        v: T,
5523    ) -> Self {
5524        self.update_mask = v.into();
5525        self
5526    }
5527
5528    /// Sets the value of [request_id][crate::model::UpdateVmwareEngineNetworkRequest::request_id].
5529    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5530        self.request_id = v.into();
5531        self
5532    }
5533}
5534
5535impl wkt::message::Message for UpdateVmwareEngineNetworkRequest {
5536    fn typename() -> &'static str {
5537        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest"
5538    }
5539}
5540
5541/// Request message for
5542/// [VmwareEngine.DeleteVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]
5543///
5544/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]: crate::client::VmwareEngine::delete_vmware_engine_network
5545#[serde_with::serde_as]
5546#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5547#[serde(default, rename_all = "camelCase")]
5548#[non_exhaustive]
5549pub struct DeleteVmwareEngineNetworkRequest {
5550    /// Required. The resource name of the VMware Engine network to be deleted.
5551    /// Resource names are schemeless URIs that follow the conventions in
5552    /// <https://cloud.google.com/apis/design/resource_names>.
5553    /// For example:
5554    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
5555    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5556    pub name: std::string::String,
5557
5558    /// Optional. A request ID to identify requests. Specify a unique request ID
5559    /// so that if you must retry your request, the server will know to ignore
5560    /// the request if it has already been completed. The server guarantees that a
5561    /// request doesn't result in creation of duplicate commitments for at least 60
5562    /// minutes.
5563    ///
5564    /// For example, consider a situation where you make an initial request and the
5565    /// request times out. If you make the request again with the same request
5566    /// ID, the server can check if original operation with the same request ID
5567    /// was received, and if so, will ignore the second request. This prevents
5568    /// clients from accidentally creating duplicate commitments.
5569    ///
5570    /// The request ID must be a valid UUID with the exception that zero UUID is
5571    /// not supported (00000000-0000-0000-0000-000000000000).
5572    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5573    pub request_id: std::string::String,
5574
5575    /// Optional. Checksum used to ensure that the user-provided value is up to
5576    /// date before the server processes the request. The server compares provided
5577    /// checksum with the current checksum of the resource. If the user-provided
5578    /// value is out of date, this request returns an `ABORTED` error.
5579    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5580    pub etag: std::string::String,
5581}
5582
5583impl DeleteVmwareEngineNetworkRequest {
5584    pub fn new() -> Self {
5585        std::default::Default::default()
5586    }
5587
5588    /// Sets the value of [name][crate::model::DeleteVmwareEngineNetworkRequest::name].
5589    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5590        self.name = v.into();
5591        self
5592    }
5593
5594    /// Sets the value of [request_id][crate::model::DeleteVmwareEngineNetworkRequest::request_id].
5595    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5596        self.request_id = v.into();
5597        self
5598    }
5599
5600    /// Sets the value of [etag][crate::model::DeleteVmwareEngineNetworkRequest::etag].
5601    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5602        self.etag = v.into();
5603        self
5604    }
5605}
5606
5607impl wkt::message::Message for DeleteVmwareEngineNetworkRequest {
5608    fn typename() -> &'static str {
5609        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest"
5610    }
5611}
5612
5613/// Request message for
5614/// [VmwareEngine.GetVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]
5615///
5616/// [google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]: crate::client::VmwareEngine::get_vmware_engine_network
5617#[serde_with::serde_as]
5618#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5619#[serde(default, rename_all = "camelCase")]
5620#[non_exhaustive]
5621pub struct GetVmwareEngineNetworkRequest {
5622    /// Required. The resource name of the VMware Engine network to retrieve.
5623    /// Resource names are schemeless URIs that follow the conventions in
5624    /// <https://cloud.google.com/apis/design/resource_names>.
5625    /// For example:
5626    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
5627    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5628    pub name: std::string::String,
5629}
5630
5631impl GetVmwareEngineNetworkRequest {
5632    pub fn new() -> Self {
5633        std::default::Default::default()
5634    }
5635
5636    /// Sets the value of [name][crate::model::GetVmwareEngineNetworkRequest::name].
5637    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5638        self.name = v.into();
5639        self
5640    }
5641}
5642
5643impl wkt::message::Message for GetVmwareEngineNetworkRequest {
5644    fn typename() -> &'static str {
5645        "type.googleapis.com/google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest"
5646    }
5647}
5648
5649/// Request message for
5650/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
5651///
5652/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
5653#[serde_with::serde_as]
5654#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5655#[serde(default, rename_all = "camelCase")]
5656#[non_exhaustive]
5657pub struct ListVmwareEngineNetworksRequest {
5658    /// Required. The resource name of the location to query for
5659    /// VMware Engine networks. Resource names are schemeless URIs that follow the
5660    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
5661    /// example: `projects/my-project/locations/global`
5662    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5663    pub parent: std::string::String,
5664
5665    /// The maximum number of results to return in one page.
5666    /// The maximum value is coerced to 1000.
5667    /// The default value of this field is 500.
5668    pub page_size: i32,
5669
5670    /// A page token, received from a previous `ListVmwareEngineNetworks` call.
5671    /// Provide this to retrieve the subsequent page.
5672    ///
5673    /// When paginating, all other parameters provided to
5674    /// `ListVmwareEngineNetworks` must match the call that provided the page
5675    /// token.
5676    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5677    pub page_token: std::string::String,
5678
5679    /// A filter expression that matches resources returned in the response.
5680    /// The expression must specify the field name, a comparison
5681    /// operator, and the value that you want to use for filtering. The value
5682    /// must be a string, a number, or a boolean. The comparison operator
5683    /// must be `=`, `!=`, `>`, or `<`.
5684    ///
5685    /// For example, if you are filtering a list of network peerings, you can
5686    /// exclude the ones named `example-network` by specifying
5687    /// `name != "example-network"`.
5688    ///
5689    /// To filter on multiple expressions, provide each separate expression within
5690    /// parentheses. For example:
5691    ///
5692    /// ```norust
5693    /// (name = "example-network")
5694    /// (createTime > "2021-04-12T08:15:10.40Z")
5695    /// ```
5696    ///
5697    /// By default, each expression is an `AND` expression. However, you
5698    /// can include `AND` and `OR` expressions explicitly.
5699    /// For example:
5700    ///
5701    /// ```norust
5702    /// (name = "example-network-1") AND
5703    /// (createTime > "2021-04-12T08:15:10.40Z") OR
5704    /// (name = "example-network-2")
5705    /// ```
5706    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5707    pub filter: std::string::String,
5708
5709    /// Sorts list results by a certain order. By default, returned results
5710    /// are ordered by `name` in ascending order.
5711    /// You can also sort results in descending order based on the `name` value
5712    /// using `orderBy="name desc"`.
5713    /// Currently, only ordering by `name` is supported.
5714    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5715    pub order_by: std::string::String,
5716}
5717
5718impl ListVmwareEngineNetworksRequest {
5719    pub fn new() -> Self {
5720        std::default::Default::default()
5721    }
5722
5723    /// Sets the value of [parent][crate::model::ListVmwareEngineNetworksRequest::parent].
5724    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5725        self.parent = v.into();
5726        self
5727    }
5728
5729    /// Sets the value of [page_size][crate::model::ListVmwareEngineNetworksRequest::page_size].
5730    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5731        self.page_size = v.into();
5732        self
5733    }
5734
5735    /// Sets the value of [page_token][crate::model::ListVmwareEngineNetworksRequest::page_token].
5736    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5737        self.page_token = v.into();
5738        self
5739    }
5740
5741    /// Sets the value of [filter][crate::model::ListVmwareEngineNetworksRequest::filter].
5742    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5743        self.filter = v.into();
5744        self
5745    }
5746
5747    /// Sets the value of [order_by][crate::model::ListVmwareEngineNetworksRequest::order_by].
5748    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5749        self.order_by = v.into();
5750        self
5751    }
5752}
5753
5754impl wkt::message::Message for ListVmwareEngineNetworksRequest {
5755    fn typename() -> &'static str {
5756        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest"
5757    }
5758}
5759
5760/// Response message for
5761/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
5762///
5763/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
5764#[serde_with::serde_as]
5765#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5766#[serde(default, rename_all = "camelCase")]
5767#[non_exhaustive]
5768pub struct ListVmwareEngineNetworksResponse {
5769    /// A list of VMware Engine networks.
5770    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5771    pub vmware_engine_networks: std::vec::Vec<crate::model::VmwareEngineNetwork>,
5772
5773    /// A token, which can be sent as `page_token` to retrieve the next page.
5774    /// If this field is omitted, there are no subsequent pages.
5775    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5776    pub next_page_token: std::string::String,
5777
5778    /// Unreachable resources.
5779    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5780    pub unreachable: std::vec::Vec<std::string::String>,
5781}
5782
5783impl ListVmwareEngineNetworksResponse {
5784    pub fn new() -> Self {
5785        std::default::Default::default()
5786    }
5787
5788    /// Sets the value of [next_page_token][crate::model::ListVmwareEngineNetworksResponse::next_page_token].
5789    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5790        self.next_page_token = v.into();
5791        self
5792    }
5793
5794    /// Sets the value of [vmware_engine_networks][crate::model::ListVmwareEngineNetworksResponse::vmware_engine_networks].
5795    pub fn set_vmware_engine_networks<T, V>(mut self, v: T) -> Self
5796    where
5797        T: std::iter::IntoIterator<Item = V>,
5798        V: std::convert::Into<crate::model::VmwareEngineNetwork>,
5799    {
5800        use std::iter::Iterator;
5801        self.vmware_engine_networks = v.into_iter().map(|i| i.into()).collect();
5802        self
5803    }
5804
5805    /// Sets the value of [unreachable][crate::model::ListVmwareEngineNetworksResponse::unreachable].
5806    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5807    where
5808        T: std::iter::IntoIterator<Item = V>,
5809        V: std::convert::Into<std::string::String>,
5810    {
5811        use std::iter::Iterator;
5812        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5813        self
5814    }
5815}
5816
5817impl wkt::message::Message for ListVmwareEngineNetworksResponse {
5818    fn typename() -> &'static str {
5819        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse"
5820    }
5821}
5822
5823#[cfg(feature = "unstable-stream")]
5824impl gax::paginator::PageableResponse for ListVmwareEngineNetworksResponse {
5825    type PageItem = crate::model::VmwareEngineNetwork;
5826
5827    fn items(self) -> std::vec::Vec<Self::PageItem> {
5828        self.vmware_engine_networks
5829    }
5830
5831    fn next_page_token(&self) -> std::string::String {
5832        gax::paginator::extract_token(&self.next_page_token)
5833    }
5834}
5835
5836/// Request message for
5837/// [VmwareEngine.CreatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]
5838///
5839/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]: crate::client::VmwareEngine::create_private_connection
5840#[serde_with::serde_as]
5841#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5842#[serde(default, rename_all = "camelCase")]
5843#[non_exhaustive]
5844pub struct CreatePrivateConnectionRequest {
5845    /// Required. The resource name of the location to create the new private
5846    /// connection in. Private connection is a regional resource.
5847    /// Resource names are schemeless URIs that follow the conventions in
5848    /// <https://cloud.google.com/apis/design/resource_names>. For example:
5849    /// `projects/my-project/locations/us-central1`
5850    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5851    pub parent: std::string::String,
5852
5853    /// Required. The user-provided identifier of the new private connection.
5854    /// This identifier must be unique among private connection resources
5855    /// within the parent and becomes the final token in the name URI. The
5856    /// identifier must meet the following requirements:
5857    ///
5858    /// * Only contains 1-63 alphanumeric characters and hyphens
5859    /// * Begins with an alphabetical character
5860    /// * Ends with a non-hyphen character
5861    /// * Not formatted as a UUID
5862    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5863    ///   (section 3.5)
5864    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5865    pub private_connection_id: std::string::String,
5866
5867    /// Required. The initial description of the new private connection.
5868    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5869    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
5870
5871    /// Optional. A request ID to identify requests. Specify a unique request ID
5872    /// so that if you must retry your request, the server will know to ignore
5873    /// the request if it has already been completed. The server guarantees that a
5874    /// request doesn't result in creation of duplicate commitments for at least 60
5875    /// minutes.
5876    ///
5877    /// For example, consider a situation where you make an initial request and the
5878    /// request times out. If you make the request again with the same request
5879    /// ID, the server can check if original operation with the same request ID
5880    /// was received, and if so, will ignore the second request. This prevents
5881    /// clients from accidentally creating duplicate commitments.
5882    ///
5883    /// The request ID must be a valid UUID with the exception that zero UUID is
5884    /// not supported (00000000-0000-0000-0000-000000000000).
5885    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5886    pub request_id: std::string::String,
5887}
5888
5889impl CreatePrivateConnectionRequest {
5890    pub fn new() -> Self {
5891        std::default::Default::default()
5892    }
5893
5894    /// Sets the value of [parent][crate::model::CreatePrivateConnectionRequest::parent].
5895    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5896        self.parent = v.into();
5897        self
5898    }
5899
5900    /// Sets the value of [private_connection_id][crate::model::CreatePrivateConnectionRequest::private_connection_id].
5901    pub fn set_private_connection_id<T: std::convert::Into<std::string::String>>(
5902        mut self,
5903        v: T,
5904    ) -> Self {
5905        self.private_connection_id = v.into();
5906        self
5907    }
5908
5909    /// Sets the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
5910    pub fn set_private_connection<
5911        T: std::convert::Into<std::option::Option<crate::model::PrivateConnection>>,
5912    >(
5913        mut self,
5914        v: T,
5915    ) -> Self {
5916        self.private_connection = v.into();
5917        self
5918    }
5919
5920    /// Sets the value of [request_id][crate::model::CreatePrivateConnectionRequest::request_id].
5921    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5922        self.request_id = v.into();
5923        self
5924    }
5925}
5926
5927impl wkt::message::Message for CreatePrivateConnectionRequest {
5928    fn typename() -> &'static str {
5929        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest"
5930    }
5931}
5932
5933/// Request message for
5934/// [VmwareEngine.GetPrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]
5935///
5936/// [google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]: crate::client::VmwareEngine::get_private_connection
5937#[serde_with::serde_as]
5938#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5939#[serde(default, rename_all = "camelCase")]
5940#[non_exhaustive]
5941pub struct GetPrivateConnectionRequest {
5942    /// Required. The resource name of the private connection to retrieve.
5943    /// Resource names are schemeless URIs that follow the conventions in
5944    /// <https://cloud.google.com/apis/design/resource_names>.
5945    /// For example:
5946    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
5947    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5948    pub name: std::string::String,
5949}
5950
5951impl GetPrivateConnectionRequest {
5952    pub fn new() -> Self {
5953        std::default::Default::default()
5954    }
5955
5956    /// Sets the value of [name][crate::model::GetPrivateConnectionRequest::name].
5957    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5958        self.name = v.into();
5959        self
5960    }
5961}
5962
5963impl wkt::message::Message for GetPrivateConnectionRequest {
5964    fn typename() -> &'static str {
5965        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateConnectionRequest"
5966    }
5967}
5968
5969/// Request message for
5970/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
5971///
5972/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
5973#[serde_with::serde_as]
5974#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5975#[serde(default, rename_all = "camelCase")]
5976#[non_exhaustive]
5977pub struct ListPrivateConnectionsRequest {
5978    /// Required. The resource name of the location to query for
5979    /// private connections. Resource names are schemeless URIs that follow the
5980    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
5981    /// example: `projects/my-project/locations/us-central1`
5982    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5983    pub parent: std::string::String,
5984
5985    /// The maximum number of private connections to return in one page.
5986    /// The maximum value is coerced to 1000.
5987    /// The default value of this field is 500.
5988    pub page_size: i32,
5989
5990    /// A page token, received from a previous `ListPrivateConnections` call.
5991    /// Provide this to retrieve the subsequent page.
5992    ///
5993    /// When paginating, all other parameters provided to
5994    /// `ListPrivateConnections` must match the call that provided the page
5995    /// token.
5996    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5997    pub page_token: std::string::String,
5998
5999    /// A filter expression that matches resources returned in the response.
6000    /// The expression must specify the field name, a comparison
6001    /// operator, and the value that you want to use for filtering. The value
6002    /// must be a string, a number, or a boolean. The comparison operator
6003    /// must be `=`, `!=`, `>`, or `<`.
6004    ///
6005    /// For example, if you are filtering a list of private connections, you can
6006    /// exclude the ones named `example-connection` by specifying
6007    /// `name != "example-connection"`.
6008    ///
6009    /// To filter on multiple expressions, provide each separate expression within
6010    /// parentheses. For example:
6011    ///
6012    /// ```norust
6013    /// (name = "example-connection")
6014    /// (createTime > "2022-09-22T08:15:10.40Z")
6015    /// ```
6016    ///
6017    /// By default, each expression is an `AND` expression. However, you
6018    /// can include `AND` and `OR` expressions explicitly.
6019    /// For example:
6020    ///
6021    /// ```norust
6022    /// (name = "example-connection-1") AND
6023    /// (createTime > "2021-04-12T08:15:10.40Z") OR
6024    /// (name = "example-connection-2")
6025    /// ```
6026    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6027    pub filter: std::string::String,
6028
6029    /// Sorts list results by a certain order. By default, returned results
6030    /// are ordered by `name` in ascending order.
6031    /// You can also sort results in descending order based on the `name` value
6032    /// using `orderBy="name desc"`.
6033    /// Currently, only ordering by `name` is supported.
6034    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6035    pub order_by: std::string::String,
6036}
6037
6038impl ListPrivateConnectionsRequest {
6039    pub fn new() -> Self {
6040        std::default::Default::default()
6041    }
6042
6043    /// Sets the value of [parent][crate::model::ListPrivateConnectionsRequest::parent].
6044    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6045        self.parent = v.into();
6046        self
6047    }
6048
6049    /// Sets the value of [page_size][crate::model::ListPrivateConnectionsRequest::page_size].
6050    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6051        self.page_size = v.into();
6052        self
6053    }
6054
6055    /// Sets the value of [page_token][crate::model::ListPrivateConnectionsRequest::page_token].
6056    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6057        self.page_token = v.into();
6058        self
6059    }
6060
6061    /// Sets the value of [filter][crate::model::ListPrivateConnectionsRequest::filter].
6062    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6063        self.filter = v.into();
6064        self
6065    }
6066
6067    /// Sets the value of [order_by][crate::model::ListPrivateConnectionsRequest::order_by].
6068    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6069        self.order_by = v.into();
6070        self
6071    }
6072}
6073
6074impl wkt::message::Message for ListPrivateConnectionsRequest {
6075    fn typename() -> &'static str {
6076        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest"
6077    }
6078}
6079
6080/// Response message for
6081/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
6082///
6083/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
6084#[serde_with::serde_as]
6085#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6086#[serde(default, rename_all = "camelCase")]
6087#[non_exhaustive]
6088pub struct ListPrivateConnectionsResponse {
6089    /// A list of private connections.
6090    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6091    pub private_connections: std::vec::Vec<crate::model::PrivateConnection>,
6092
6093    /// A token, which can be sent as `page_token` to retrieve the next page.
6094    /// If this field is omitted, there are no subsequent pages.
6095    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6096    pub next_page_token: std::string::String,
6097
6098    /// Unreachable resources.
6099    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6100    pub unreachable: std::vec::Vec<std::string::String>,
6101}
6102
6103impl ListPrivateConnectionsResponse {
6104    pub fn new() -> Self {
6105        std::default::Default::default()
6106    }
6107
6108    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionsResponse::next_page_token].
6109    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6110        self.next_page_token = v.into();
6111        self
6112    }
6113
6114    /// Sets the value of [private_connections][crate::model::ListPrivateConnectionsResponse::private_connections].
6115    pub fn set_private_connections<T, V>(mut self, v: T) -> Self
6116    where
6117        T: std::iter::IntoIterator<Item = V>,
6118        V: std::convert::Into<crate::model::PrivateConnection>,
6119    {
6120        use std::iter::Iterator;
6121        self.private_connections = v.into_iter().map(|i| i.into()).collect();
6122        self
6123    }
6124
6125    /// Sets the value of [unreachable][crate::model::ListPrivateConnectionsResponse::unreachable].
6126    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6127    where
6128        T: std::iter::IntoIterator<Item = V>,
6129        V: std::convert::Into<std::string::String>,
6130    {
6131        use std::iter::Iterator;
6132        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6133        self
6134    }
6135}
6136
6137impl wkt::message::Message for ListPrivateConnectionsResponse {
6138    fn typename() -> &'static str {
6139        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsResponse"
6140    }
6141}
6142
6143#[cfg(feature = "unstable-stream")]
6144impl gax::paginator::PageableResponse for ListPrivateConnectionsResponse {
6145    type PageItem = crate::model::PrivateConnection;
6146
6147    fn items(self) -> std::vec::Vec<Self::PageItem> {
6148        self.private_connections
6149    }
6150
6151    fn next_page_token(&self) -> std::string::String {
6152        gax::paginator::extract_token(&self.next_page_token)
6153    }
6154}
6155
6156/// Request message for
6157/// [VmwareEngine.UpdatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]
6158///
6159/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]: crate::client::VmwareEngine::update_private_connection
6160#[serde_with::serde_as]
6161#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6162#[serde(default, rename_all = "camelCase")]
6163#[non_exhaustive]
6164pub struct UpdatePrivateConnectionRequest {
6165    /// Required. Private connection description.
6166    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6167    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
6168
6169    /// Required. Field mask is used to specify the fields to be overwritten in the
6170    /// `PrivateConnection` resource by the update.
6171    /// The fields specified in the `update_mask` are relative to the resource, not
6172    /// the full request. A field will be overwritten if it is in the mask. If the
6173    /// user does not provide a mask then all fields will be overwritten.
6174    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6175    pub update_mask: std::option::Option<wkt::FieldMask>,
6176
6177    /// Optional. A request ID to identify requests. Specify a unique request ID
6178    /// so that if you must retry your request, the server will know to ignore
6179    /// the request if it has already been completed. The server guarantees that a
6180    /// request doesn't result in creation of duplicate commitments for at least 60
6181    /// minutes.
6182    ///
6183    /// For example, consider a situation where you make an initial request and the
6184    /// request times out. If you make the request again with the same request
6185    /// ID, the server can check if original operation with the same request ID
6186    /// was received, and if so, will ignore the second request. This prevents
6187    /// clients from accidentally creating duplicate commitments.
6188    ///
6189    /// The request ID must be a valid UUID with the exception that zero UUID is
6190    /// not supported (00000000-0000-0000-0000-000000000000).
6191    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6192    pub request_id: std::string::String,
6193}
6194
6195impl UpdatePrivateConnectionRequest {
6196    pub fn new() -> Self {
6197        std::default::Default::default()
6198    }
6199
6200    /// Sets the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
6201    pub fn set_private_connection<
6202        T: std::convert::Into<std::option::Option<crate::model::PrivateConnection>>,
6203    >(
6204        mut self,
6205        v: T,
6206    ) -> Self {
6207        self.private_connection = v.into();
6208        self
6209    }
6210
6211    /// Sets the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
6212    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
6213        mut self,
6214        v: T,
6215    ) -> Self {
6216        self.update_mask = v.into();
6217        self
6218    }
6219
6220    /// Sets the value of [request_id][crate::model::UpdatePrivateConnectionRequest::request_id].
6221    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6222        self.request_id = v.into();
6223        self
6224    }
6225}
6226
6227impl wkt::message::Message for UpdatePrivateConnectionRequest {
6228    fn typename() -> &'static str {
6229        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest"
6230    }
6231}
6232
6233/// Request message for
6234/// [VmwareEngine.DeletePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]
6235///
6236/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]: crate::client::VmwareEngine::delete_private_connection
6237#[serde_with::serde_as]
6238#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6239#[serde(default, rename_all = "camelCase")]
6240#[non_exhaustive]
6241pub struct DeletePrivateConnectionRequest {
6242    /// Required. The resource name of the private connection to be deleted.
6243    /// Resource names are schemeless URIs that follow the conventions in
6244    /// <https://cloud.google.com/apis/design/resource_names>.
6245    /// For example:
6246    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
6247    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6248    pub name: std::string::String,
6249
6250    /// Optional. A request ID to identify requests. Specify a unique request ID
6251    /// so that if you must retry your request, the server will know to ignore
6252    /// the request if it has already been completed. The server guarantees that a
6253    /// request doesn't result in creation of duplicate commitments for at least 60
6254    /// minutes.
6255    ///
6256    /// For example, consider a situation where you make an initial request and the
6257    /// request times out. If you make the request again with the same request
6258    /// ID, the server can check if original operation with the same request ID
6259    /// was received, and if so, will ignore the second request. This prevents
6260    /// clients from accidentally creating duplicate commitments.
6261    ///
6262    /// The request ID must be a valid UUID with the exception that zero UUID is
6263    /// not supported (00000000-0000-0000-0000-000000000000).
6264    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6265    pub request_id: std::string::String,
6266}
6267
6268impl DeletePrivateConnectionRequest {
6269    pub fn new() -> Self {
6270        std::default::Default::default()
6271    }
6272
6273    /// Sets the value of [name][crate::model::DeletePrivateConnectionRequest::name].
6274    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6275        self.name = v.into();
6276        self
6277    }
6278
6279    /// Sets the value of [request_id][crate::model::DeletePrivateConnectionRequest::request_id].
6280    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6281        self.request_id = v.into();
6282        self
6283    }
6284}
6285
6286impl wkt::message::Message for DeletePrivateConnectionRequest {
6287    fn typename() -> &'static str {
6288        "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest"
6289    }
6290}
6291
6292/// Request message for
6293/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
6294///
6295/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
6296#[serde_with::serde_as]
6297#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6298#[serde(default, rename_all = "camelCase")]
6299#[non_exhaustive]
6300pub struct ListPrivateConnectionPeeringRoutesRequest {
6301    /// Required. The resource name of the private connection to retrieve peering
6302    /// routes from. Resource names are schemeless URIs that follow the conventions
6303    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
6304    /// `projects/my-project/locations/us-west1/privateConnections/my-connection`
6305    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6306    pub parent: std::string::String,
6307
6308    /// The maximum number of peering routes to return in one page.
6309    /// The service may return fewer than this value.
6310    /// The maximum value is coerced to 1000.
6311    /// The default value of this field is 500.
6312    pub page_size: i32,
6313
6314    /// A page token, received from a previous `ListPrivateConnectionPeeringRoutes`
6315    /// call. Provide this to retrieve the subsequent page. When paginating, all
6316    /// other parameters provided to `ListPrivateConnectionPeeringRoutes` must
6317    /// match the call that provided the page token.
6318    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6319    pub page_token: std::string::String,
6320}
6321
6322impl ListPrivateConnectionPeeringRoutesRequest {
6323    pub fn new() -> Self {
6324        std::default::Default::default()
6325    }
6326
6327    /// Sets the value of [parent][crate::model::ListPrivateConnectionPeeringRoutesRequest::parent].
6328    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6329        self.parent = v.into();
6330        self
6331    }
6332
6333    /// Sets the value of [page_size][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_size].
6334    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6335        self.page_size = v.into();
6336        self
6337    }
6338
6339    /// Sets the value of [page_token][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_token].
6340    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6341        self.page_token = v.into();
6342        self
6343    }
6344}
6345
6346impl wkt::message::Message for ListPrivateConnectionPeeringRoutesRequest {
6347    fn typename() -> &'static str {
6348        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest"
6349    }
6350}
6351
6352/// Response message for
6353/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
6354///
6355/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
6356#[serde_with::serde_as]
6357#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6358#[serde(default, rename_all = "camelCase")]
6359#[non_exhaustive]
6360pub struct ListPrivateConnectionPeeringRoutesResponse {
6361    /// A list of peering routes.
6362    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6363    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
6364
6365    /// A token, which can be sent as `page_token` to retrieve the next page.
6366    /// If this field is omitted, there are no subsequent pages.
6367    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6368    pub next_page_token: std::string::String,
6369}
6370
6371impl ListPrivateConnectionPeeringRoutesResponse {
6372    pub fn new() -> Self {
6373        std::default::Default::default()
6374    }
6375
6376    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionPeeringRoutesResponse::next_page_token].
6377    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6378        self.next_page_token = v.into();
6379        self
6380    }
6381
6382    /// Sets the value of [peering_routes][crate::model::ListPrivateConnectionPeeringRoutesResponse::peering_routes].
6383    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
6384    where
6385        T: std::iter::IntoIterator<Item = V>,
6386        V: std::convert::Into<crate::model::PeeringRoute>,
6387    {
6388        use std::iter::Iterator;
6389        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
6390        self
6391    }
6392}
6393
6394impl wkt::message::Message for ListPrivateConnectionPeeringRoutesResponse {
6395    fn typename() -> &'static str {
6396        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesResponse"
6397    }
6398}
6399
6400#[cfg(feature = "unstable-stream")]
6401impl gax::paginator::PageableResponse for ListPrivateConnectionPeeringRoutesResponse {
6402    type PageItem = crate::model::PeeringRoute;
6403
6404    fn items(self) -> std::vec::Vec<Self::PageItem> {
6405        self.peering_routes
6406    }
6407
6408    fn next_page_token(&self) -> std::string::String {
6409        gax::paginator::extract_token(&self.next_page_token)
6410    }
6411}
6412
6413/// Request message for
6414/// [VmwareEngine.GrantDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]
6415///
6416/// [google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]: crate::client::VmwareEngine::grant_dns_bind_permission
6417#[serde_with::serde_as]
6418#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6419#[serde(default, rename_all = "camelCase")]
6420#[non_exhaustive]
6421pub struct GrantDnsBindPermissionRequest {
6422    /// Required. The name of the resource which stores the users/service accounts
6423    /// having the permission to bind to the corresponding intranet VPC of the
6424    /// consumer project. DnsBindPermission is a global resource. Resource names
6425    /// are schemeless URIs that follow the conventions in
6426    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6427    /// `projects/my-project/locations/global/dnsBindPermission`
6428    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6429    pub name: std::string::String,
6430
6431    /// Required. The consumer provided user/service account which needs to be
6432    /// granted permission to bind with the intranet VPC corresponding to the
6433    /// consumer project.
6434    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6435    pub principal: std::option::Option<crate::model::Principal>,
6436
6437    /// Optional. A request ID to identify requests. Specify a unique request ID
6438    /// so that if you must retry your request, the server will know to ignore
6439    /// the request if it has already been completed. The server guarantees that a
6440    /// request doesn't result in creation of duplicate commitments for at least 60
6441    /// minutes.
6442    ///
6443    /// For example, consider a situation where you make an initial request and the
6444    /// request times out. If you make the request again with the same request
6445    /// ID, the server can check if original operation with the same request ID
6446    /// was received, and if so, will ignore the second request. This prevents
6447    /// clients from accidentally creating duplicate commitments.
6448    ///
6449    /// The request ID must be a valid UUID with the exception that zero UUID is
6450    /// not supported (00000000-0000-0000-0000-000000000000).
6451    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6452    pub request_id: std::string::String,
6453}
6454
6455impl GrantDnsBindPermissionRequest {
6456    pub fn new() -> Self {
6457        std::default::Default::default()
6458    }
6459
6460    /// Sets the value of [name][crate::model::GrantDnsBindPermissionRequest::name].
6461    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6462        self.name = v.into();
6463        self
6464    }
6465
6466    /// Sets the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
6467    pub fn set_principal<T: std::convert::Into<std::option::Option<crate::model::Principal>>>(
6468        mut self,
6469        v: T,
6470    ) -> Self {
6471        self.principal = v.into();
6472        self
6473    }
6474
6475    /// Sets the value of [request_id][crate::model::GrantDnsBindPermissionRequest::request_id].
6476    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6477        self.request_id = v.into();
6478        self
6479    }
6480}
6481
6482impl wkt::message::Message for GrantDnsBindPermissionRequest {
6483    fn typename() -> &'static str {
6484        "type.googleapis.com/google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest"
6485    }
6486}
6487
6488/// Request message for
6489/// [VmwareEngine.RevokeDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]
6490///
6491/// [google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]: crate::client::VmwareEngine::revoke_dns_bind_permission
6492#[serde_with::serde_as]
6493#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6494#[serde(default, rename_all = "camelCase")]
6495#[non_exhaustive]
6496pub struct RevokeDnsBindPermissionRequest {
6497    /// Required. The name of the resource which stores the users/service accounts
6498    /// having the permission to bind to the corresponding intranet VPC of the
6499    /// consumer project. DnsBindPermission is a global resource. Resource names
6500    /// are schemeless URIs that follow the conventions in
6501    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6502    /// `projects/my-project/locations/global/dnsBindPermission`
6503    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6504    pub name: std::string::String,
6505
6506    /// Required. The consumer provided user/service account which needs to be
6507    /// granted permission to bind with the intranet VPC corresponding to the
6508    /// consumer project.
6509    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6510    pub principal: std::option::Option<crate::model::Principal>,
6511
6512    /// Optional. A request ID to identify requests. Specify a unique request ID
6513    /// so that if you must retry your request, the server will know to ignore
6514    /// the request if it has already been completed. The server guarantees that a
6515    /// request doesn't result in creation of duplicate commitments for at least 60
6516    /// minutes.
6517    ///
6518    /// For example, consider a situation where you make an initial request and the
6519    /// request times out. If you make the request again with the same request
6520    /// ID, the server can check if original operation with the same request ID
6521    /// was received, and if so, will ignore the second request. This prevents
6522    /// clients from accidentally creating duplicate commitments.
6523    ///
6524    /// The request ID must be a valid UUID with the exception that zero UUID is
6525    /// not supported (00000000-0000-0000-0000-000000000000).
6526    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6527    pub request_id: std::string::String,
6528}
6529
6530impl RevokeDnsBindPermissionRequest {
6531    pub fn new() -> Self {
6532        std::default::Default::default()
6533    }
6534
6535    /// Sets the value of [name][crate::model::RevokeDnsBindPermissionRequest::name].
6536    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6537        self.name = v.into();
6538        self
6539    }
6540
6541    /// Sets the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
6542    pub fn set_principal<T: std::convert::Into<std::option::Option<crate::model::Principal>>>(
6543        mut self,
6544        v: T,
6545    ) -> Self {
6546        self.principal = v.into();
6547        self
6548    }
6549
6550    /// Sets the value of [request_id][crate::model::RevokeDnsBindPermissionRequest::request_id].
6551    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6552        self.request_id = v.into();
6553        self
6554    }
6555}
6556
6557impl wkt::message::Message for RevokeDnsBindPermissionRequest {
6558    fn typename() -> &'static str {
6559        "type.googleapis.com/google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest"
6560    }
6561}
6562
6563/// Request message for
6564/// [VmwareEngine.GetDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]
6565///
6566/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]: crate::client::VmwareEngine::get_dns_bind_permission
6567#[serde_with::serde_as]
6568#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6569#[serde(default, rename_all = "camelCase")]
6570#[non_exhaustive]
6571pub struct GetDnsBindPermissionRequest {
6572    /// Required. The name of the resource which stores the users/service accounts
6573    /// having the permission to bind to the corresponding intranet VPC of the
6574    /// consumer project. DnsBindPermission is a global resource. Resource names
6575    /// are schemeless URIs that follow the conventions in
6576    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6577    /// `projects/my-project/locations/global/dnsBindPermission`
6578    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6579    pub name: std::string::String,
6580}
6581
6582impl GetDnsBindPermissionRequest {
6583    pub fn new() -> Self {
6584        std::default::Default::default()
6585    }
6586
6587    /// Sets the value of [name][crate::model::GetDnsBindPermissionRequest::name].
6588    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6589        self.name = v.into();
6590        self
6591    }
6592}
6593
6594impl wkt::message::Message for GetDnsBindPermissionRequest {
6595    fn typename() -> &'static str {
6596        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest"
6597    }
6598}
6599
6600/// Network configuration in the consumer project
6601/// with which the peering has to be done.
6602#[serde_with::serde_as]
6603#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6604#[serde(default, rename_all = "camelCase")]
6605#[non_exhaustive]
6606pub struct NetworkConfig {
6607    /// Required. Management CIDR used by VMware management appliances.
6608    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6609    pub management_cidr: std::string::String,
6610
6611    /// Optional. The relative resource name of the VMware Engine network attached
6612    /// to the private cloud. Specify the name in the following form:
6613    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
6614    /// where `{project}` can either be a project number or a project ID.
6615    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6616    pub vmware_engine_network: std::string::String,
6617
6618    /// Output only. The canonical name of the VMware Engine network in the form:
6619    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
6620    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6621    pub vmware_engine_network_canonical: std::string::String,
6622
6623    /// Output only. The IP address layout version of the management IP address
6624    /// range. Possible versions include:
6625    ///
6626    /// * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address
6627    ///   layout used by some existing private clouds. This is no longer supported
6628    ///   for new private clouds as it does not support all features.
6629    /// * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address
6630    ///   layout used by all newly created private clouds. This version supports all
6631    ///   current features.
6632    pub management_ip_address_layout_version: i32,
6633
6634    /// Output only. DNS Server IP of the Private Cloud.
6635    /// All DNS queries can be forwarded to this address for name resolution of
6636    /// Private Cloud's management entities like vCenter, NSX-T Manager and
6637    /// ESXi hosts.
6638    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6639    pub dns_server_ip: std::string::String,
6640}
6641
6642impl NetworkConfig {
6643    pub fn new() -> Self {
6644        std::default::Default::default()
6645    }
6646
6647    /// Sets the value of [management_cidr][crate::model::NetworkConfig::management_cidr].
6648    pub fn set_management_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6649        self.management_cidr = v.into();
6650        self
6651    }
6652
6653    /// Sets the value of [vmware_engine_network][crate::model::NetworkConfig::vmware_engine_network].
6654    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
6655        mut self,
6656        v: T,
6657    ) -> Self {
6658        self.vmware_engine_network = v.into();
6659        self
6660    }
6661
6662    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkConfig::vmware_engine_network_canonical].
6663    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
6664        mut self,
6665        v: T,
6666    ) -> Self {
6667        self.vmware_engine_network_canonical = v.into();
6668        self
6669    }
6670
6671    /// Sets the value of [management_ip_address_layout_version][crate::model::NetworkConfig::management_ip_address_layout_version].
6672    pub fn set_management_ip_address_layout_version<T: std::convert::Into<i32>>(
6673        mut self,
6674        v: T,
6675    ) -> Self {
6676        self.management_ip_address_layout_version = v.into();
6677        self
6678    }
6679
6680    /// Sets the value of [dns_server_ip][crate::model::NetworkConfig::dns_server_ip].
6681    pub fn set_dns_server_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6682        self.dns_server_ip = v.into();
6683        self
6684    }
6685}
6686
6687impl wkt::message::Message for NetworkConfig {
6688    fn typename() -> &'static str {
6689        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkConfig"
6690    }
6691}
6692
6693/// Information about the type and number of nodes associated with the cluster.
6694#[serde_with::serde_as]
6695#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6696#[serde(default, rename_all = "camelCase")]
6697#[non_exhaustive]
6698pub struct NodeTypeConfig {
6699    /// Required. The number of nodes of this type in the cluster
6700    pub node_count: i32,
6701
6702    /// Optional. Customized number of cores available to each node of the type.
6703    /// This number must always be one of `nodeType.availableCustomCoreCounts`.
6704    /// If zero is provided max value from `nodeType.availableCustomCoreCounts`
6705    /// will be used.
6706    pub custom_core_count: i32,
6707}
6708
6709impl NodeTypeConfig {
6710    pub fn new() -> Self {
6711        std::default::Default::default()
6712    }
6713
6714    /// Sets the value of [node_count][crate::model::NodeTypeConfig::node_count].
6715    pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6716        self.node_count = v.into();
6717        self
6718    }
6719
6720    /// Sets the value of [custom_core_count][crate::model::NodeTypeConfig::custom_core_count].
6721    pub fn set_custom_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6722        self.custom_core_count = v.into();
6723        self
6724    }
6725}
6726
6727impl wkt::message::Message for NodeTypeConfig {
6728    fn typename() -> &'static str {
6729        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeTypeConfig"
6730    }
6731}
6732
6733/// Configuration of a stretched cluster.
6734#[serde_with::serde_as]
6735#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6736#[serde(default, rename_all = "camelCase")]
6737#[non_exhaustive]
6738pub struct StretchedClusterConfig {
6739    /// Required. Zone that will remain operational when connection between the two
6740    /// zones is lost. Specify the resource name of a zone that belongs to the
6741    /// region of the private cloud. For example:
6742    /// `projects/{project}/locations/europe-west3-a` where `{project}` can either
6743    /// be a project number or a project ID.
6744    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6745    pub preferred_location: std::string::String,
6746
6747    /// Required. Additional zone for a higher level of availability and load
6748    /// balancing. Specify the resource name of a zone that belongs to the region
6749    /// of the private cloud. For example:
6750    /// `projects/{project}/locations/europe-west3-b` where `{project}` can either
6751    /// be a project number or a project ID.
6752    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6753    pub secondary_location: std::string::String,
6754}
6755
6756impl StretchedClusterConfig {
6757    pub fn new() -> Self {
6758        std::default::Default::default()
6759    }
6760
6761    /// Sets the value of [preferred_location][crate::model::StretchedClusterConfig::preferred_location].
6762    pub fn set_preferred_location<T: std::convert::Into<std::string::String>>(
6763        mut self,
6764        v: T,
6765    ) -> Self {
6766        self.preferred_location = v.into();
6767        self
6768    }
6769
6770    /// Sets the value of [secondary_location][crate::model::StretchedClusterConfig::secondary_location].
6771    pub fn set_secondary_location<T: std::convert::Into<std::string::String>>(
6772        mut self,
6773        v: T,
6774    ) -> Self {
6775        self.secondary_location = v.into();
6776        self
6777    }
6778}
6779
6780impl wkt::message::Message for StretchedClusterConfig {
6781    fn typename() -> &'static str {
6782        "type.googleapis.com/google.cloud.vmwareengine.v1.StretchedClusterConfig"
6783    }
6784}
6785
6786/// Represents a private cloud resource. Private clouds of type `STANDARD` and
6787/// `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are
6788/// regional.
6789#[serde_with::serde_as]
6790#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6791#[serde(default, rename_all = "camelCase")]
6792#[non_exhaustive]
6793pub struct PrivateCloud {
6794    /// Output only. The resource name of this private cloud.
6795    /// Resource names are schemeless URIs that follow the conventions in
6796    /// <https://cloud.google.com/apis/design/resource_names>.
6797    /// For example:
6798    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
6799    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6800    pub name: std::string::String,
6801
6802    /// Output only. Creation time of this resource.
6803    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6804    pub create_time: std::option::Option<wkt::Timestamp>,
6805
6806    /// Output only. Last update time of this resource.
6807    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6808    pub update_time: std::option::Option<wkt::Timestamp>,
6809
6810    /// Output only. Time when the resource was scheduled for deletion.
6811    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6812    pub delete_time: std::option::Option<wkt::Timestamp>,
6813
6814    /// Output only. Time when the resource will be irreversibly deleted.
6815    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6816    pub expire_time: std::option::Option<wkt::Timestamp>,
6817
6818    /// Output only. State of the resource. New values may be added to this enum
6819    /// when appropriate.
6820    pub state: crate::model::private_cloud::State,
6821
6822    /// Required. Network configuration of the private cloud.
6823    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6824    pub network_config: std::option::Option<crate::model::NetworkConfig>,
6825
6826    /// Required. Input only. The management cluster for this private cloud.
6827    /// This field is required during creation of the private cloud to provide
6828    /// details for the default cluster.
6829    ///
6830    /// The following fields can't be changed after private cloud creation:
6831    /// `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`.
6832    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6833    pub management_cluster: std::option::Option<crate::model::private_cloud::ManagementCluster>,
6834
6835    /// User-provided description for this private cloud.
6836    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6837    pub description: std::string::String,
6838
6839    /// Output only. HCX appliance.
6840    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6841    pub hcx: std::option::Option<crate::model::Hcx>,
6842
6843    /// Output only. NSX appliance.
6844    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6845    pub nsx: std::option::Option<crate::model::Nsx>,
6846
6847    /// Output only. Vcenter appliance.
6848    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6849    pub vcenter: std::option::Option<crate::model::Vcenter>,
6850
6851    /// Output only. System-generated unique identifier for the resource.
6852    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6853    pub uid: std::string::String,
6854
6855    /// Optional. Type of the private cloud. Defaults to STANDARD.
6856    #[serde(rename = "type")]
6857    pub r#type: crate::model::private_cloud::Type,
6858}
6859
6860impl PrivateCloud {
6861    pub fn new() -> Self {
6862        std::default::Default::default()
6863    }
6864
6865    /// Sets the value of [name][crate::model::PrivateCloud::name].
6866    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6867        self.name = v.into();
6868        self
6869    }
6870
6871    /// Sets the value of [create_time][crate::model::PrivateCloud::create_time].
6872    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6873        mut self,
6874        v: T,
6875    ) -> Self {
6876        self.create_time = v.into();
6877        self
6878    }
6879
6880    /// Sets the value of [update_time][crate::model::PrivateCloud::update_time].
6881    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6882        mut self,
6883        v: T,
6884    ) -> Self {
6885        self.update_time = v.into();
6886        self
6887    }
6888
6889    /// Sets the value of [delete_time][crate::model::PrivateCloud::delete_time].
6890    pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6891        mut self,
6892        v: T,
6893    ) -> Self {
6894        self.delete_time = v.into();
6895        self
6896    }
6897
6898    /// Sets the value of [expire_time][crate::model::PrivateCloud::expire_time].
6899    pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
6900        mut self,
6901        v: T,
6902    ) -> Self {
6903        self.expire_time = v.into();
6904        self
6905    }
6906
6907    /// Sets the value of [state][crate::model::PrivateCloud::state].
6908    pub fn set_state<T: std::convert::Into<crate::model::private_cloud::State>>(
6909        mut self,
6910        v: T,
6911    ) -> Self {
6912        self.state = v.into();
6913        self
6914    }
6915
6916    /// Sets the value of [network_config][crate::model::PrivateCloud::network_config].
6917    pub fn set_network_config<
6918        T: std::convert::Into<std::option::Option<crate::model::NetworkConfig>>,
6919    >(
6920        mut self,
6921        v: T,
6922    ) -> Self {
6923        self.network_config = v.into();
6924        self
6925    }
6926
6927    /// Sets the value of [management_cluster][crate::model::PrivateCloud::management_cluster].
6928    pub fn set_management_cluster<
6929        T: std::convert::Into<std::option::Option<crate::model::private_cloud::ManagementCluster>>,
6930    >(
6931        mut self,
6932        v: T,
6933    ) -> Self {
6934        self.management_cluster = v.into();
6935        self
6936    }
6937
6938    /// Sets the value of [description][crate::model::PrivateCloud::description].
6939    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6940        self.description = v.into();
6941        self
6942    }
6943
6944    /// Sets the value of [hcx][crate::model::PrivateCloud::hcx].
6945    pub fn set_hcx<T: std::convert::Into<std::option::Option<crate::model::Hcx>>>(
6946        mut self,
6947        v: T,
6948    ) -> Self {
6949        self.hcx = v.into();
6950        self
6951    }
6952
6953    /// Sets the value of [nsx][crate::model::PrivateCloud::nsx].
6954    pub fn set_nsx<T: std::convert::Into<std::option::Option<crate::model::Nsx>>>(
6955        mut self,
6956        v: T,
6957    ) -> Self {
6958        self.nsx = v.into();
6959        self
6960    }
6961
6962    /// Sets the value of [vcenter][crate::model::PrivateCloud::vcenter].
6963    pub fn set_vcenter<T: std::convert::Into<std::option::Option<crate::model::Vcenter>>>(
6964        mut self,
6965        v: T,
6966    ) -> Self {
6967        self.vcenter = v.into();
6968        self
6969    }
6970
6971    /// Sets the value of [uid][crate::model::PrivateCloud::uid].
6972    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6973        self.uid = v.into();
6974        self
6975    }
6976
6977    /// Sets the value of [r#type][crate::model::PrivateCloud::type].
6978    pub fn set_type<T: std::convert::Into<crate::model::private_cloud::Type>>(
6979        mut self,
6980        v: T,
6981    ) -> Self {
6982        self.r#type = v.into();
6983        self
6984    }
6985}
6986
6987impl wkt::message::Message for PrivateCloud {
6988    fn typename() -> &'static str {
6989        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud"
6990    }
6991}
6992
6993/// Defines additional types related to PrivateCloud
6994pub mod private_cloud {
6995    #[allow(unused_imports)]
6996    use super::*;
6997
6998    /// Management cluster configuration.
6999    #[serde_with::serde_as]
7000    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7001    #[serde(default, rename_all = "camelCase")]
7002    #[non_exhaustive]
7003    pub struct ManagementCluster {
7004        /// Required. The user-provided identifier of the new `Cluster`.
7005        /// The identifier must meet the following requirements:
7006        ///
7007        /// * Only contains 1-63 alphanumeric characters and hyphens
7008        /// * Begins with an alphabetical character
7009        /// * Ends with a non-hyphen character
7010        /// * Not formatted as a UUID
7011        /// * Complies with [RFC
7012        ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
7013        #[serde(skip_serializing_if = "std::string::String::is_empty")]
7014        pub cluster_id: std::string::String,
7015
7016        /// Required. The map of cluster node types in this cluster, where the key is
7017        /// canonical identifier of the node type (corresponds to the `NodeType`).
7018        #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
7019        pub node_type_configs:
7020            std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
7021
7022        /// Optional. Configuration of a stretched cluster. Required for STRETCHED
7023        /// private clouds.
7024        #[serde(skip_serializing_if = "std::option::Option::is_none")]
7025        pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
7026    }
7027
7028    impl ManagementCluster {
7029        pub fn new() -> Self {
7030            std::default::Default::default()
7031        }
7032
7033        /// Sets the value of [cluster_id][crate::model::private_cloud::ManagementCluster::cluster_id].
7034        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7035            self.cluster_id = v.into();
7036            self
7037        }
7038
7039        /// Sets the value of [stretched_cluster_config][crate::model::private_cloud::ManagementCluster::stretched_cluster_config].
7040        pub fn set_stretched_cluster_config<
7041            T: std::convert::Into<std::option::Option<crate::model::StretchedClusterConfig>>,
7042        >(
7043            mut self,
7044            v: T,
7045        ) -> Self {
7046            self.stretched_cluster_config = v.into();
7047            self
7048        }
7049
7050        /// Sets the value of [node_type_configs][crate::model::private_cloud::ManagementCluster::node_type_configs].
7051        pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
7052        where
7053            T: std::iter::IntoIterator<Item = (K, V)>,
7054            K: std::convert::Into<std::string::String>,
7055            V: std::convert::Into<crate::model::NodeTypeConfig>,
7056        {
7057            use std::iter::Iterator;
7058            self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7059            self
7060        }
7061    }
7062
7063    impl wkt::message::Message for ManagementCluster {
7064        fn typename() -> &'static str {
7065            "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster"
7066        }
7067    }
7068
7069    /// Enum State defines possible states of private clouds.
7070    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7071    pub struct State(std::borrow::Cow<'static, str>);
7072
7073    impl State {
7074        /// Creates a new State instance.
7075        pub const fn new(v: &'static str) -> Self {
7076            Self(std::borrow::Cow::Borrowed(v))
7077        }
7078
7079        /// Gets the enum value.
7080        pub fn value(&self) -> &str {
7081            &self.0
7082        }
7083    }
7084
7085    /// Useful constants to work with [State](State)
7086    pub mod state {
7087        use super::State;
7088
7089        /// The default value. This value should never be used.
7090        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
7091
7092        /// The private cloud is ready.
7093        pub const ACTIVE: State = State::new("ACTIVE");
7094
7095        /// The private cloud is being created.
7096        pub const CREATING: State = State::new("CREATING");
7097
7098        /// The private cloud is being updated.
7099        pub const UPDATING: State = State::new("UPDATING");
7100
7101        /// The private cloud is in failed state.
7102        pub const FAILED: State = State::new("FAILED");
7103
7104        /// The private cloud is scheduled for deletion. The deletion process can be
7105        /// cancelled by using the corresponding undelete method.
7106        pub const DELETED: State = State::new("DELETED");
7107
7108        /// The private cloud is irreversibly deleted and is being removed from the
7109        /// system.
7110        pub const PURGING: State = State::new("PURGING");
7111    }
7112
7113    impl std::convert::From<std::string::String> for State {
7114        fn from(value: std::string::String) -> Self {
7115            Self(std::borrow::Cow::Owned(value))
7116        }
7117    }
7118
7119    /// Enum Type defines private cloud type.
7120    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7121    pub struct Type(std::borrow::Cow<'static, str>);
7122
7123    impl Type {
7124        /// Creates a new Type instance.
7125        pub const fn new(v: &'static str) -> Self {
7126            Self(std::borrow::Cow::Borrowed(v))
7127        }
7128
7129        /// Gets the enum value.
7130        pub fn value(&self) -> &str {
7131            &self.0
7132        }
7133    }
7134
7135    /// Useful constants to work with [Type](Type)
7136    pub mod r#type {
7137        use super::Type;
7138
7139        /// Standard private is a zonal resource, with 3+ nodes. Default type.
7140        pub const STANDARD: Type = Type::new("STANDARD");
7141
7142        /// Time limited private cloud is a zonal resource, can have only 1 node and
7143        /// has limited life span. Will be deleted after defined period of time,
7144        /// can be converted into standard private cloud by expanding it up to 3
7145        /// or more nodes.
7146        pub const TIME_LIMITED: Type = Type::new("TIME_LIMITED");
7147
7148        /// Stretched private cloud is a regional resource with redundancy,
7149        /// with a minimum of 6 nodes, nodes count has to be even.
7150        pub const STRETCHED: Type = Type::new("STRETCHED");
7151    }
7152
7153    impl std::convert::From<std::string::String> for Type {
7154        fn from(value: std::string::String) -> Self {
7155            Self(std::borrow::Cow::Owned(value))
7156        }
7157    }
7158}
7159
7160/// A cluster in a private cloud.
7161#[serde_with::serde_as]
7162#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7163#[serde(default, rename_all = "camelCase")]
7164#[non_exhaustive]
7165pub struct Cluster {
7166    /// Output only. The resource name of this cluster.
7167    /// Resource names are schemeless URIs that follow the conventions in
7168    /// <https://cloud.google.com/apis/design/resource_names>.
7169    /// For example:
7170    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
7171    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7172    pub name: std::string::String,
7173
7174    /// Output only. Creation time of this resource.
7175    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7176    pub create_time: std::option::Option<wkt::Timestamp>,
7177
7178    /// Output only. Last update time of this resource.
7179    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7180    pub update_time: std::option::Option<wkt::Timestamp>,
7181
7182    /// Output only. State of the resource.
7183    pub state: crate::model::cluster::State,
7184
7185    /// Output only. True if the cluster is a management cluster; false otherwise.
7186    /// There can only be one management cluster in a private cloud
7187    /// and it has to be the first one.
7188    pub management: bool,
7189
7190    /// Optional. Configuration of the autoscaling applied to this cluster.
7191    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7192    pub autoscaling_settings: std::option::Option<crate::model::AutoscalingSettings>,
7193
7194    /// Output only. System-generated unique identifier for the resource.
7195    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7196    pub uid: std::string::String,
7197
7198    /// Required. The map of cluster node types in this cluster, where the key is
7199    /// canonical identifier of the node type (corresponds to the `NodeType`).
7200    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
7201    pub node_type_configs:
7202        std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
7203
7204    /// Optional. Configuration of a stretched cluster. Required for clusters that
7205    /// belong to a STRETCHED private cloud.
7206    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7207    pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
7208}
7209
7210impl Cluster {
7211    pub fn new() -> Self {
7212        std::default::Default::default()
7213    }
7214
7215    /// Sets the value of [name][crate::model::Cluster::name].
7216    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7217        self.name = v.into();
7218        self
7219    }
7220
7221    /// Sets the value of [create_time][crate::model::Cluster::create_time].
7222    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7223        mut self,
7224        v: T,
7225    ) -> Self {
7226        self.create_time = v.into();
7227        self
7228    }
7229
7230    /// Sets the value of [update_time][crate::model::Cluster::update_time].
7231    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7232        mut self,
7233        v: T,
7234    ) -> Self {
7235        self.update_time = v.into();
7236        self
7237    }
7238
7239    /// Sets the value of [state][crate::model::Cluster::state].
7240    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
7241        self.state = v.into();
7242        self
7243    }
7244
7245    /// Sets the value of [management][crate::model::Cluster::management].
7246    pub fn set_management<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7247        self.management = v.into();
7248        self
7249    }
7250
7251    /// Sets the value of [autoscaling_settings][crate::model::Cluster::autoscaling_settings].
7252    pub fn set_autoscaling_settings<
7253        T: std::convert::Into<std::option::Option<crate::model::AutoscalingSettings>>,
7254    >(
7255        mut self,
7256        v: T,
7257    ) -> Self {
7258        self.autoscaling_settings = v.into();
7259        self
7260    }
7261
7262    /// Sets the value of [uid][crate::model::Cluster::uid].
7263    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7264        self.uid = v.into();
7265        self
7266    }
7267
7268    /// Sets the value of [stretched_cluster_config][crate::model::Cluster::stretched_cluster_config].
7269    pub fn set_stretched_cluster_config<
7270        T: std::convert::Into<std::option::Option<crate::model::StretchedClusterConfig>>,
7271    >(
7272        mut self,
7273        v: T,
7274    ) -> Self {
7275        self.stretched_cluster_config = v.into();
7276        self
7277    }
7278
7279    /// Sets the value of [node_type_configs][crate::model::Cluster::node_type_configs].
7280    pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
7281    where
7282        T: std::iter::IntoIterator<Item = (K, V)>,
7283        K: std::convert::Into<std::string::String>,
7284        V: std::convert::Into<crate::model::NodeTypeConfig>,
7285    {
7286        use std::iter::Iterator;
7287        self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7288        self
7289    }
7290}
7291
7292impl wkt::message::Message for Cluster {
7293    fn typename() -> &'static str {
7294        "type.googleapis.com/google.cloud.vmwareengine.v1.Cluster"
7295    }
7296}
7297
7298/// Defines additional types related to Cluster
7299pub mod cluster {
7300    #[allow(unused_imports)]
7301    use super::*;
7302
7303    /// Enum State defines possible states of private cloud clusters.
7304    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7305    pub struct State(std::borrow::Cow<'static, str>);
7306
7307    impl State {
7308        /// Creates a new State instance.
7309        pub const fn new(v: &'static str) -> Self {
7310            Self(std::borrow::Cow::Borrowed(v))
7311        }
7312
7313        /// Gets the enum value.
7314        pub fn value(&self) -> &str {
7315            &self.0
7316        }
7317    }
7318
7319    /// Useful constants to work with [State](State)
7320    pub mod state {
7321        use super::State;
7322
7323        /// The default value. This value should never be used.
7324        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
7325
7326        /// The Cluster is operational and can be used by the user.
7327        pub const ACTIVE: State = State::new("ACTIVE");
7328
7329        /// The Cluster is being deployed.
7330        pub const CREATING: State = State::new("CREATING");
7331
7332        /// Adding or removing of a node to the cluster, any other cluster specific
7333        /// updates.
7334        pub const UPDATING: State = State::new("UPDATING");
7335
7336        /// The Cluster is being deleted.
7337        pub const DELETING: State = State::new("DELETING");
7338
7339        /// The Cluster is undergoing maintenance, for example: a failed node is
7340        /// getting replaced.
7341        pub const REPAIRING: State = State::new("REPAIRING");
7342    }
7343
7344    impl std::convert::From<std::string::String> for State {
7345        fn from(value: std::string::String) -> Self {
7346            Self(std::borrow::Cow::Owned(value))
7347        }
7348    }
7349}
7350
7351/// Node in a cluster.
7352#[serde_with::serde_as]
7353#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7354#[serde(default, rename_all = "camelCase")]
7355#[non_exhaustive]
7356pub struct Node {
7357    /// Output only. The resource name of this node.
7358    /// Resource names are schemeless URIs that follow the conventions in
7359    /// <https://cloud.google.com/apis/design/resource_names>.
7360    /// For example:
7361    /// projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node
7362    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7363    pub name: std::string::String,
7364
7365    /// Output only. Fully qualified domain name of the node.
7366    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7367    pub fqdn: std::string::String,
7368
7369    /// Output only. Internal IP address of the node.
7370    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7371    pub internal_ip: std::string::String,
7372
7373    /// Output only. The canonical identifier of the node type (corresponds to the
7374    /// `NodeType`).
7375    /// For example: standard-72.
7376    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7377    pub node_type_id: std::string::String,
7378
7379    /// Output only. The version number of the VMware ESXi
7380    /// management component in this cluster.
7381    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7382    pub version: std::string::String,
7383
7384    /// Output only. Customized number of cores
7385    #[serde_as(as = "serde_with::DisplayFromStr")]
7386    pub custom_core_count: i64,
7387
7388    /// Output only. The state of the appliance.
7389    pub state: crate::model::node::State,
7390}
7391
7392impl Node {
7393    pub fn new() -> Self {
7394        std::default::Default::default()
7395    }
7396
7397    /// Sets the value of [name][crate::model::Node::name].
7398    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7399        self.name = v.into();
7400        self
7401    }
7402
7403    /// Sets the value of [fqdn][crate::model::Node::fqdn].
7404    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7405        self.fqdn = v.into();
7406        self
7407    }
7408
7409    /// Sets the value of [internal_ip][crate::model::Node::internal_ip].
7410    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7411        self.internal_ip = v.into();
7412        self
7413    }
7414
7415    /// Sets the value of [node_type_id][crate::model::Node::node_type_id].
7416    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7417        self.node_type_id = v.into();
7418        self
7419    }
7420
7421    /// Sets the value of [version][crate::model::Node::version].
7422    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7423        self.version = v.into();
7424        self
7425    }
7426
7427    /// Sets the value of [custom_core_count][crate::model::Node::custom_core_count].
7428    pub fn set_custom_core_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7429        self.custom_core_count = v.into();
7430        self
7431    }
7432
7433    /// Sets the value of [state][crate::model::Node::state].
7434    pub fn set_state<T: std::convert::Into<crate::model::node::State>>(mut self, v: T) -> Self {
7435        self.state = v.into();
7436        self
7437    }
7438}
7439
7440impl wkt::message::Message for Node {
7441    fn typename() -> &'static str {
7442        "type.googleapis.com/google.cloud.vmwareengine.v1.Node"
7443    }
7444}
7445
7446/// Defines additional types related to Node
7447pub mod node {
7448    #[allow(unused_imports)]
7449    use super::*;
7450
7451    /// Enum State defines possible states of a node in a cluster.
7452    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7453    pub struct State(std::borrow::Cow<'static, str>);
7454
7455    impl State {
7456        /// Creates a new State instance.
7457        pub const fn new(v: &'static str) -> Self {
7458            Self(std::borrow::Cow::Borrowed(v))
7459        }
7460
7461        /// Gets the enum value.
7462        pub fn value(&self) -> &str {
7463            &self.0
7464        }
7465    }
7466
7467    /// Useful constants to work with [State](State)
7468    pub mod state {
7469        use super::State;
7470
7471        /// The default value. This value should never be used.
7472        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
7473
7474        /// Node is operational and can be used by the user.
7475        pub const ACTIVE: State = State::new("ACTIVE");
7476
7477        /// Node is being provisioned.
7478        pub const CREATING: State = State::new("CREATING");
7479
7480        /// Node is in a failed state.
7481        pub const FAILED: State = State::new("FAILED");
7482
7483        /// Node is undergoing maintenance, e.g.: during private cloud upgrade.
7484        pub const UPGRADING: State = State::new("UPGRADING");
7485    }
7486
7487    impl std::convert::From<std::string::String> for State {
7488        fn from(value: std::string::String) -> Self {
7489            Self(std::borrow::Cow::Owned(value))
7490        }
7491    }
7492}
7493
7494/// Represents an allocated external IP address and its corresponding internal IP
7495/// address in a private cloud.
7496#[serde_with::serde_as]
7497#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7498#[serde(default, rename_all = "camelCase")]
7499#[non_exhaustive]
7500pub struct ExternalAddress {
7501    /// Output only. The resource name of this external IP address.
7502    /// Resource names are schemeless URIs that follow the conventions in
7503    /// <https://cloud.google.com/apis/design/resource_names>.
7504    /// For example:
7505    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`
7506    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7507    pub name: std::string::String,
7508
7509    /// Output only. Creation time of this resource.
7510    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7511    pub create_time: std::option::Option<wkt::Timestamp>,
7512
7513    /// Output only. Last update time of this resource.
7514    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7515    pub update_time: std::option::Option<wkt::Timestamp>,
7516
7517    /// The internal IP address of a workload VM.
7518    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7519    pub internal_ip: std::string::String,
7520
7521    /// Output only. The external IP address of a workload VM.
7522    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7523    pub external_ip: std::string::String,
7524
7525    /// Output only. The state of the resource.
7526    pub state: crate::model::external_address::State,
7527
7528    /// Output only. System-generated unique identifier for the resource.
7529    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7530    pub uid: std::string::String,
7531
7532    /// User-provided description for this resource.
7533    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7534    pub description: std::string::String,
7535}
7536
7537impl ExternalAddress {
7538    pub fn new() -> Self {
7539        std::default::Default::default()
7540    }
7541
7542    /// Sets the value of [name][crate::model::ExternalAddress::name].
7543    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7544        self.name = v.into();
7545        self
7546    }
7547
7548    /// Sets the value of [create_time][crate::model::ExternalAddress::create_time].
7549    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7550        mut self,
7551        v: T,
7552    ) -> Self {
7553        self.create_time = v.into();
7554        self
7555    }
7556
7557    /// Sets the value of [update_time][crate::model::ExternalAddress::update_time].
7558    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7559        mut self,
7560        v: T,
7561    ) -> Self {
7562        self.update_time = v.into();
7563        self
7564    }
7565
7566    /// Sets the value of [internal_ip][crate::model::ExternalAddress::internal_ip].
7567    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7568        self.internal_ip = v.into();
7569        self
7570    }
7571
7572    /// Sets the value of [external_ip][crate::model::ExternalAddress::external_ip].
7573    pub fn set_external_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7574        self.external_ip = v.into();
7575        self
7576    }
7577
7578    /// Sets the value of [state][crate::model::ExternalAddress::state].
7579    pub fn set_state<T: std::convert::Into<crate::model::external_address::State>>(
7580        mut self,
7581        v: T,
7582    ) -> Self {
7583        self.state = v.into();
7584        self
7585    }
7586
7587    /// Sets the value of [uid][crate::model::ExternalAddress::uid].
7588    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7589        self.uid = v.into();
7590        self
7591    }
7592
7593    /// Sets the value of [description][crate::model::ExternalAddress::description].
7594    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7595        self.description = v.into();
7596        self
7597    }
7598}
7599
7600impl wkt::message::Message for ExternalAddress {
7601    fn typename() -> &'static str {
7602        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAddress"
7603    }
7604}
7605
7606/// Defines additional types related to ExternalAddress
7607pub mod external_address {
7608    #[allow(unused_imports)]
7609    use super::*;
7610
7611    /// Enum State defines possible states of external addresses.
7612    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7613    pub struct State(std::borrow::Cow<'static, str>);
7614
7615    impl State {
7616        /// Creates a new State instance.
7617        pub const fn new(v: &'static str) -> Self {
7618            Self(std::borrow::Cow::Borrowed(v))
7619        }
7620
7621        /// Gets the enum value.
7622        pub fn value(&self) -> &str {
7623            &self.0
7624        }
7625    }
7626
7627    /// Useful constants to work with [State](State)
7628    pub mod state {
7629        use super::State;
7630
7631        /// The default value. This value should never be used.
7632        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
7633
7634        /// The address is ready.
7635        pub const ACTIVE: State = State::new("ACTIVE");
7636
7637        /// The address is being created.
7638        pub const CREATING: State = State::new("CREATING");
7639
7640        /// The address is being updated.
7641        pub const UPDATING: State = State::new("UPDATING");
7642
7643        /// The address is being deleted.
7644        pub const DELETING: State = State::new("DELETING");
7645    }
7646
7647    impl std::convert::From<std::string::String> for State {
7648        fn from(value: std::string::String) -> Self {
7649            Self(std::borrow::Cow::Owned(value))
7650        }
7651    }
7652}
7653
7654/// Subnet in a private cloud. Either `management` subnets (such as vMotion) that
7655/// are read-only, or `userDefined`, which can also be updated.
7656#[serde_with::serde_as]
7657#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7658#[serde(default, rename_all = "camelCase")]
7659#[non_exhaustive]
7660pub struct Subnet {
7661    /// Output only. The resource name of this subnet.
7662    /// Resource names are schemeless URIs that follow the conventions in
7663    /// <https://cloud.google.com/apis/design/resource_names>.
7664    /// For example:
7665    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
7666    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7667    pub name: std::string::String,
7668
7669    /// The IP address range of the subnet in CIDR format '10.0.0.0/24'.
7670    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7671    pub ip_cidr_range: std::string::String,
7672
7673    /// The IP address of the gateway of this subnet.
7674    /// Must fall within the IP prefix defined above.
7675    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7676    pub gateway_ip: std::string::String,
7677
7678    /// Output only. The type of the subnet. For example "management" or
7679    /// "userDefined".
7680    #[serde(rename = "type")]
7681    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7682    pub r#type: std::string::String,
7683
7684    /// Output only. The state of the resource.
7685    pub state: crate::model::subnet::State,
7686
7687    /// Output only. VLAN ID of the VLAN on which the subnet is configured
7688    pub vlan_id: i32,
7689}
7690
7691impl Subnet {
7692    pub fn new() -> Self {
7693        std::default::Default::default()
7694    }
7695
7696    /// Sets the value of [name][crate::model::Subnet::name].
7697    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7698        self.name = v.into();
7699        self
7700    }
7701
7702    /// Sets the value of [ip_cidr_range][crate::model::Subnet::ip_cidr_range].
7703    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7704        self.ip_cidr_range = v.into();
7705        self
7706    }
7707
7708    /// Sets the value of [gateway_ip][crate::model::Subnet::gateway_ip].
7709    pub fn set_gateway_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7710        self.gateway_ip = v.into();
7711        self
7712    }
7713
7714    /// Sets the value of [r#type][crate::model::Subnet::type].
7715    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7716        self.r#type = v.into();
7717        self
7718    }
7719
7720    /// Sets the value of [state][crate::model::Subnet::state].
7721    pub fn set_state<T: std::convert::Into<crate::model::subnet::State>>(mut self, v: T) -> Self {
7722        self.state = v.into();
7723        self
7724    }
7725
7726    /// Sets the value of [vlan_id][crate::model::Subnet::vlan_id].
7727    pub fn set_vlan_id<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7728        self.vlan_id = v.into();
7729        self
7730    }
7731}
7732
7733impl wkt::message::Message for Subnet {
7734    fn typename() -> &'static str {
7735        "type.googleapis.com/google.cloud.vmwareengine.v1.Subnet"
7736    }
7737}
7738
7739/// Defines additional types related to Subnet
7740pub mod subnet {
7741    #[allow(unused_imports)]
7742    use super::*;
7743
7744    /// Defines possible states of subnets.
7745    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7746    pub struct State(std::borrow::Cow<'static, str>);
7747
7748    impl State {
7749        /// Creates a new State instance.
7750        pub const fn new(v: &'static str) -> Self {
7751            Self(std::borrow::Cow::Borrowed(v))
7752        }
7753
7754        /// Gets the enum value.
7755        pub fn value(&self) -> &str {
7756            &self.0
7757        }
7758    }
7759
7760    /// Useful constants to work with [State](State)
7761    pub mod state {
7762        use super::State;
7763
7764        /// The default value. This value should never be used.
7765        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
7766
7767        /// The subnet is ready.
7768        pub const ACTIVE: State = State::new("ACTIVE");
7769
7770        /// The subnet is being created.
7771        pub const CREATING: State = State::new("CREATING");
7772
7773        /// The subnet is being updated.
7774        pub const UPDATING: State = State::new("UPDATING");
7775
7776        /// The subnet is being deleted.
7777        pub const DELETING: State = State::new("DELETING");
7778
7779        /// Changes requested in the last operation are being propagated.
7780        pub const RECONCILING: State = State::new("RECONCILING");
7781
7782        /// Last operation on the subnet did not succeed. Subnet's payload is
7783        /// reverted back to its most recent working state.
7784        pub const FAILED: State = State::new("FAILED");
7785    }
7786
7787    impl std::convert::From<std::string::String> for State {
7788        fn from(value: std::string::String) -> Self {
7789            Self(std::borrow::Cow::Owned(value))
7790        }
7791    }
7792}
7793
7794/// External access firewall rules for filtering incoming traffic destined to
7795/// `ExternalAddress` resources.
7796#[serde_with::serde_as]
7797#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7798#[serde(default, rename_all = "camelCase")]
7799#[non_exhaustive]
7800pub struct ExternalAccessRule {
7801    /// Output only. The resource name of this external access rule.
7802    /// Resource names are schemeless URIs that follow the conventions in
7803    /// <https://cloud.google.com/apis/design/resource_names>.
7804    /// For example:
7805    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
7806    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7807    pub name: std::string::String,
7808
7809    /// Output only. Creation time of this resource.
7810    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7811    pub create_time: std::option::Option<wkt::Timestamp>,
7812
7813    /// Output only. Last update time of this resource.
7814    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7815    pub update_time: std::option::Option<wkt::Timestamp>,
7816
7817    /// User-provided description for this external access rule.
7818    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7819    pub description: std::string::String,
7820
7821    /// External access rule priority, which determines the external access rule to
7822    /// use when multiple rules apply. If multiple rules have the same priority,
7823    /// their ordering is non-deterministic. If specific ordering is required,
7824    /// assign unique priorities to enforce such ordering. The external access rule
7825    /// priority is an integer from 100 to 4096, both inclusive. Lower integers
7826    /// indicate higher precedence. For example, a rule with priority `100` has
7827    /// higher precedence than a rule with priority `101`.
7828    pub priority: i32,
7829
7830    /// The action that the external access rule performs.
7831    pub action: crate::model::external_access_rule::Action,
7832
7833    /// The IP protocol to which the external access rule applies. This value can
7834    /// be one of the following three protocol strings (not case-sensitive):
7835    /// `tcp`, `udp`, or `icmp`.
7836    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7837    pub ip_protocol: std::string::String,
7838
7839    /// If source ranges are specified, the external access rule applies only to
7840    /// traffic that has a source IP address in these ranges. These ranges can
7841    /// either be expressed in the CIDR format or as an IP address. As only inbound
7842    /// rules are supported, `ExternalAddress` resources cannot be the source IP
7843    /// addresses of an external access rule. To match all source addresses,
7844    /// specify `0.0.0.0/0`.
7845    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7846    pub source_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
7847
7848    /// A list of source ports to which the external access rule applies. This
7849    /// field is only applicable for the UDP or TCP protocol.
7850    /// Each entry must be either an integer or a range. For example: `["22"]`,
7851    /// `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify
7852    /// `["0-65535"]`.
7853    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7854    pub source_ports: std::vec::Vec<std::string::String>,
7855
7856    /// If destination ranges are specified, the external access rule applies only
7857    /// to the traffic that has a destination IP address in these ranges. The
7858    /// specified IP addresses must have reserved external IP addresses in the
7859    /// scope of the parent network policy. To match all external IP addresses in
7860    /// the scope of the parent network policy, specify `0.0.0.0/0`. To match a
7861    /// specific external IP address, specify it using the
7862    /// `IpRange.external_address` property.
7863    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7864    pub destination_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
7865
7866    /// A list of destination ports to which the external access rule applies. This
7867    /// field is only applicable for the UDP or TCP protocol.
7868    /// Each entry must be either an integer or a range. For example: `["22"]`,
7869    /// `["80","443"]`, or `["12345-12349"]`. To match all destination ports,
7870    /// specify `["0-65535"]`.
7871    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
7872    pub destination_ports: std::vec::Vec<std::string::String>,
7873
7874    /// Output only. The state of the resource.
7875    pub state: crate::model::external_access_rule::State,
7876
7877    /// Output only. System-generated unique identifier for the resource.
7878    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7879    pub uid: std::string::String,
7880}
7881
7882impl ExternalAccessRule {
7883    pub fn new() -> Self {
7884        std::default::Default::default()
7885    }
7886
7887    /// Sets the value of [name][crate::model::ExternalAccessRule::name].
7888    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7889        self.name = v.into();
7890        self
7891    }
7892
7893    /// Sets the value of [create_time][crate::model::ExternalAccessRule::create_time].
7894    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7895        mut self,
7896        v: T,
7897    ) -> Self {
7898        self.create_time = v.into();
7899        self
7900    }
7901
7902    /// Sets the value of [update_time][crate::model::ExternalAccessRule::update_time].
7903    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7904        mut self,
7905        v: T,
7906    ) -> Self {
7907        self.update_time = v.into();
7908        self
7909    }
7910
7911    /// Sets the value of [description][crate::model::ExternalAccessRule::description].
7912    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7913        self.description = v.into();
7914        self
7915    }
7916
7917    /// Sets the value of [priority][crate::model::ExternalAccessRule::priority].
7918    pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7919        self.priority = v.into();
7920        self
7921    }
7922
7923    /// Sets the value of [action][crate::model::ExternalAccessRule::action].
7924    pub fn set_action<T: std::convert::Into<crate::model::external_access_rule::Action>>(
7925        mut self,
7926        v: T,
7927    ) -> Self {
7928        self.action = v.into();
7929        self
7930    }
7931
7932    /// Sets the value of [ip_protocol][crate::model::ExternalAccessRule::ip_protocol].
7933    pub fn set_ip_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7934        self.ip_protocol = v.into();
7935        self
7936    }
7937
7938    /// Sets the value of [state][crate::model::ExternalAccessRule::state].
7939    pub fn set_state<T: std::convert::Into<crate::model::external_access_rule::State>>(
7940        mut self,
7941        v: T,
7942    ) -> Self {
7943        self.state = v.into();
7944        self
7945    }
7946
7947    /// Sets the value of [uid][crate::model::ExternalAccessRule::uid].
7948    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7949        self.uid = v.into();
7950        self
7951    }
7952
7953    /// Sets the value of [source_ip_ranges][crate::model::ExternalAccessRule::source_ip_ranges].
7954    pub fn set_source_ip_ranges<T, V>(mut self, v: T) -> Self
7955    where
7956        T: std::iter::IntoIterator<Item = V>,
7957        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
7958    {
7959        use std::iter::Iterator;
7960        self.source_ip_ranges = v.into_iter().map(|i| i.into()).collect();
7961        self
7962    }
7963
7964    /// Sets the value of [source_ports][crate::model::ExternalAccessRule::source_ports].
7965    pub fn set_source_ports<T, V>(mut self, v: T) -> Self
7966    where
7967        T: std::iter::IntoIterator<Item = V>,
7968        V: std::convert::Into<std::string::String>,
7969    {
7970        use std::iter::Iterator;
7971        self.source_ports = v.into_iter().map(|i| i.into()).collect();
7972        self
7973    }
7974
7975    /// Sets the value of [destination_ip_ranges][crate::model::ExternalAccessRule::destination_ip_ranges].
7976    pub fn set_destination_ip_ranges<T, V>(mut self, v: T) -> Self
7977    where
7978        T: std::iter::IntoIterator<Item = V>,
7979        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
7980    {
7981        use std::iter::Iterator;
7982        self.destination_ip_ranges = v.into_iter().map(|i| i.into()).collect();
7983        self
7984    }
7985
7986    /// Sets the value of [destination_ports][crate::model::ExternalAccessRule::destination_ports].
7987    pub fn set_destination_ports<T, V>(mut self, v: T) -> Self
7988    where
7989        T: std::iter::IntoIterator<Item = V>,
7990        V: std::convert::Into<std::string::String>,
7991    {
7992        use std::iter::Iterator;
7993        self.destination_ports = v.into_iter().map(|i| i.into()).collect();
7994        self
7995    }
7996}
7997
7998impl wkt::message::Message for ExternalAccessRule {
7999    fn typename() -> &'static str {
8000        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule"
8001    }
8002}
8003
8004/// Defines additional types related to ExternalAccessRule
8005pub mod external_access_rule {
8006    #[allow(unused_imports)]
8007    use super::*;
8008
8009    /// An IP range provided in any one of the supported formats.
8010    #[serde_with::serde_as]
8011    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8012    #[serde(default, rename_all = "camelCase")]
8013    #[non_exhaustive]
8014    pub struct IpRange {
8015        #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
8016        pub ip_range: std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
8017    }
8018
8019    impl IpRange {
8020        pub fn new() -> Self {
8021            std::default::Default::default()
8022        }
8023
8024        /// Sets the value of `ip_range`.
8025        pub fn set_ip_range<
8026            T: std::convert::Into<
8027                std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
8028            >,
8029        >(
8030            mut self,
8031            v: T,
8032        ) -> Self {
8033            self.ip_range = v.into();
8034            self
8035        }
8036
8037        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8038        /// if it holds a `IpAddress`, `None` if the field is not set or
8039        /// holds a different branch.
8040        pub fn get_ip_address(&self) -> std::option::Option<&std::string::String> {
8041            #[allow(unreachable_patterns)]
8042            self.ip_range.as_ref().and_then(|v| match v {
8043                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v) => {
8044                    std::option::Option::Some(v)
8045                }
8046                _ => std::option::Option::None,
8047            })
8048        }
8049
8050        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8051        /// if it holds a `IpAddressRange`, `None` if the field is not set or
8052        /// holds a different branch.
8053        pub fn get_ip_address_range(&self) -> std::option::Option<&std::string::String> {
8054            #[allow(unreachable_patterns)]
8055            self.ip_range.as_ref().and_then(|v| match v {
8056                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v) => {
8057                    std::option::Option::Some(v)
8058                }
8059                _ => std::option::Option::None,
8060            })
8061        }
8062
8063        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8064        /// if it holds a `ExternalAddress`, `None` if the field is not set or
8065        /// holds a different branch.
8066        pub fn get_external_address(&self) -> std::option::Option<&std::string::String> {
8067            #[allow(unreachable_patterns)]
8068            self.ip_range.as_ref().and_then(|v| match v {
8069                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v) => {
8070                    std::option::Option::Some(v)
8071                }
8072                _ => std::option::Option::None,
8073            })
8074        }
8075
8076        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8077        /// to hold a `IpAddress`.
8078        ///
8079        /// Note that all the setters affecting `ip_range` are
8080        /// mutually exclusive.
8081        pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8082            self.ip_range = std::option::Option::Some(
8083                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v.into()),
8084            );
8085            self
8086        }
8087
8088        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8089        /// to hold a `IpAddressRange`.
8090        ///
8091        /// Note that all the setters affecting `ip_range` are
8092        /// mutually exclusive.
8093        pub fn set_ip_address_range<T: std::convert::Into<std::string::String>>(
8094            mut self,
8095            v: T,
8096        ) -> Self {
8097            self.ip_range = std::option::Option::Some(
8098                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v.into()),
8099            );
8100            self
8101        }
8102
8103        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8104        /// to hold a `ExternalAddress`.
8105        ///
8106        /// Note that all the setters affecting `ip_range` are
8107        /// mutually exclusive.
8108        pub fn set_external_address<T: std::convert::Into<std::string::String>>(
8109            mut self,
8110            v: T,
8111        ) -> Self {
8112            self.ip_range = std::option::Option::Some(
8113                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v.into()),
8114            );
8115            self
8116        }
8117    }
8118
8119    impl wkt::message::Message for IpRange {
8120        fn typename() -> &'static str {
8121            "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange"
8122        }
8123    }
8124
8125    /// Defines additional types related to IpRange
8126    pub mod ip_range {
8127        #[allow(unused_imports)]
8128        use super::*;
8129
8130        #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8131        #[serde(rename_all = "camelCase")]
8132        #[non_exhaustive]
8133        pub enum IpRange {
8134            /// A single IP address. For example: `10.0.0.5`.
8135            IpAddress(std::string::String),
8136            /// An IP address range in the CIDR format. For example: `10.0.0.0/24`.
8137            IpAddressRange(std::string::String),
8138            /// The name of an `ExternalAddress` resource. The external address must
8139            /// have been reserved in the scope of this external access rule's parent
8140            /// network policy.  Provide the external address name in the form of
8141            /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`.
8142            /// For example:
8143            /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`.
8144            ExternalAddress(std::string::String),
8145        }
8146    }
8147
8148    /// Action determines whether the external access rule permits or blocks
8149    /// traffic, subject to the other components of the rule matching the traffic.
8150    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8151    pub struct Action(std::borrow::Cow<'static, str>);
8152
8153    impl Action {
8154        /// Creates a new Action instance.
8155        pub const fn new(v: &'static str) -> Self {
8156            Self(std::borrow::Cow::Borrowed(v))
8157        }
8158
8159        /// Gets the enum value.
8160        pub fn value(&self) -> &str {
8161            &self.0
8162        }
8163    }
8164
8165    /// Useful constants to work with [Action](Action)
8166    pub mod action {
8167        use super::Action;
8168
8169        /// Defaults to allow.
8170        pub const ACTION_UNSPECIFIED: Action = Action::new("ACTION_UNSPECIFIED");
8171
8172        /// Allows connections that match the other specified components.
8173        pub const ALLOW: Action = Action::new("ALLOW");
8174
8175        /// Blocks connections that match the other specified components.
8176        pub const DENY: Action = Action::new("DENY");
8177    }
8178
8179    impl std::convert::From<std::string::String> for Action {
8180        fn from(value: std::string::String) -> Self {
8181            Self(std::borrow::Cow::Owned(value))
8182        }
8183    }
8184
8185    /// Defines possible states of external access firewall rules.
8186    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8187    pub struct State(std::borrow::Cow<'static, str>);
8188
8189    impl State {
8190        /// Creates a new State instance.
8191        pub const fn new(v: &'static str) -> Self {
8192            Self(std::borrow::Cow::Borrowed(v))
8193        }
8194
8195        /// Gets the enum value.
8196        pub fn value(&self) -> &str {
8197            &self.0
8198        }
8199    }
8200
8201    /// Useful constants to work with [State](State)
8202    pub mod state {
8203        use super::State;
8204
8205        /// The default value. This value is used if the state is omitted.
8206        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
8207
8208        /// The rule is ready.
8209        pub const ACTIVE: State = State::new("ACTIVE");
8210
8211        /// The rule is being created.
8212        pub const CREATING: State = State::new("CREATING");
8213
8214        /// The rule is being updated.
8215        pub const UPDATING: State = State::new("UPDATING");
8216
8217        /// The rule is being deleted.
8218        pub const DELETING: State = State::new("DELETING");
8219    }
8220
8221    impl std::convert::From<std::string::String> for State {
8222        fn from(value: std::string::String) -> Self {
8223            Self(std::borrow::Cow::Owned(value))
8224        }
8225    }
8226}
8227
8228/// Logging server to receive vCenter or ESXi logs.
8229#[serde_with::serde_as]
8230#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8231#[serde(default, rename_all = "camelCase")]
8232#[non_exhaustive]
8233pub struct LoggingServer {
8234    /// Output only. The resource name of this logging server.
8235    /// Resource names are schemeless URIs that follow the conventions in
8236    /// <https://cloud.google.com/apis/design/resource_names>.
8237    /// For example:
8238    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
8239    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8240    pub name: std::string::String,
8241
8242    /// Output only. Creation time of this resource.
8243    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8244    pub create_time: std::option::Option<wkt::Timestamp>,
8245
8246    /// Output only. Last update time of this resource.
8247    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8248    pub update_time: std::option::Option<wkt::Timestamp>,
8249
8250    /// Required. Fully-qualified domain name (FQDN) or IP Address of the logging
8251    /// server.
8252    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8253    pub hostname: std::string::String,
8254
8255    /// Required. Port number at which the logging server receives logs.
8256    pub port: i32,
8257
8258    /// Required. Protocol used by vCenter to send logs to a logging server.
8259    pub protocol: crate::model::logging_server::Protocol,
8260
8261    /// Required. The type of component that produces logs that will be forwarded
8262    /// to this logging server.
8263    pub source_type: crate::model::logging_server::SourceType,
8264
8265    /// Output only. System-generated unique identifier for the resource.
8266    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8267    pub uid: std::string::String,
8268}
8269
8270impl LoggingServer {
8271    pub fn new() -> Self {
8272        std::default::Default::default()
8273    }
8274
8275    /// Sets the value of [name][crate::model::LoggingServer::name].
8276    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8277        self.name = v.into();
8278        self
8279    }
8280
8281    /// Sets the value of [create_time][crate::model::LoggingServer::create_time].
8282    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8283        mut self,
8284        v: T,
8285    ) -> Self {
8286        self.create_time = v.into();
8287        self
8288    }
8289
8290    /// Sets the value of [update_time][crate::model::LoggingServer::update_time].
8291    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8292        mut self,
8293        v: T,
8294    ) -> Self {
8295        self.update_time = v.into();
8296        self
8297    }
8298
8299    /// Sets the value of [hostname][crate::model::LoggingServer::hostname].
8300    pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8301        self.hostname = v.into();
8302        self
8303    }
8304
8305    /// Sets the value of [port][crate::model::LoggingServer::port].
8306    pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8307        self.port = v.into();
8308        self
8309    }
8310
8311    /// Sets the value of [protocol][crate::model::LoggingServer::protocol].
8312    pub fn set_protocol<T: std::convert::Into<crate::model::logging_server::Protocol>>(
8313        mut self,
8314        v: T,
8315    ) -> Self {
8316        self.protocol = v.into();
8317        self
8318    }
8319
8320    /// Sets the value of [source_type][crate::model::LoggingServer::source_type].
8321    pub fn set_source_type<T: std::convert::Into<crate::model::logging_server::SourceType>>(
8322        mut self,
8323        v: T,
8324    ) -> Self {
8325        self.source_type = v.into();
8326        self
8327    }
8328
8329    /// Sets the value of [uid][crate::model::LoggingServer::uid].
8330    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8331        self.uid = v.into();
8332        self
8333    }
8334}
8335
8336impl wkt::message::Message for LoggingServer {
8337    fn typename() -> &'static str {
8338        "type.googleapis.com/google.cloud.vmwareengine.v1.LoggingServer"
8339    }
8340}
8341
8342/// Defines additional types related to LoggingServer
8343pub mod logging_server {
8344    #[allow(unused_imports)]
8345    use super::*;
8346
8347    /// Defines possible protocols used to send logs to
8348    /// a logging server.
8349    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8350    pub struct Protocol(std::borrow::Cow<'static, str>);
8351
8352    impl Protocol {
8353        /// Creates a new Protocol instance.
8354        pub const fn new(v: &'static str) -> Self {
8355            Self(std::borrow::Cow::Borrowed(v))
8356        }
8357
8358        /// Gets the enum value.
8359        pub fn value(&self) -> &str {
8360            &self.0
8361        }
8362    }
8363
8364    /// Useful constants to work with [Protocol](Protocol)
8365    pub mod protocol {
8366        use super::Protocol;
8367
8368        /// Unspecified communications protocol. This is the default value.
8369        pub const PROTOCOL_UNSPECIFIED: Protocol = Protocol::new("PROTOCOL_UNSPECIFIED");
8370
8371        /// UDP
8372        pub const UDP: Protocol = Protocol::new("UDP");
8373
8374        /// TCP
8375        pub const TCP: Protocol = Protocol::new("TCP");
8376
8377        /// TLS
8378        pub const TLS: Protocol = Protocol::new("TLS");
8379
8380        /// SSL
8381        pub const SSL: Protocol = Protocol::new("SSL");
8382
8383        /// RELP
8384        pub const RELP: Protocol = Protocol::new("RELP");
8385    }
8386
8387    impl std::convert::From<std::string::String> for Protocol {
8388        fn from(value: std::string::String) -> Self {
8389            Self(std::borrow::Cow::Owned(value))
8390        }
8391    }
8392
8393    /// Defines possible types of component that produces logs.
8394    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8395    pub struct SourceType(std::borrow::Cow<'static, str>);
8396
8397    impl SourceType {
8398        /// Creates a new SourceType instance.
8399        pub const fn new(v: &'static str) -> Self {
8400            Self(std::borrow::Cow::Borrowed(v))
8401        }
8402
8403        /// Gets the enum value.
8404        pub fn value(&self) -> &str {
8405            &self.0
8406        }
8407    }
8408
8409    /// Useful constants to work with [SourceType](SourceType)
8410    pub mod source_type {
8411        use super::SourceType;
8412
8413        /// The default value. This value should never be used.
8414        pub const SOURCE_TYPE_UNSPECIFIED: SourceType = SourceType::new("SOURCE_TYPE_UNSPECIFIED");
8415
8416        /// Logs produced by ESXI hosts
8417        pub const ESXI: SourceType = SourceType::new("ESXI");
8418
8419        /// Logs produced by vCenter server
8420        pub const VCSA: SourceType = SourceType::new("VCSA");
8421    }
8422
8423    impl std::convert::From<std::string::String> for SourceType {
8424        fn from(value: std::string::String) -> Self {
8425            Self(std::borrow::Cow::Owned(value))
8426        }
8427    }
8428}
8429
8430/// Describes node type.
8431#[serde_with::serde_as]
8432#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8433#[serde(default, rename_all = "camelCase")]
8434#[non_exhaustive]
8435pub struct NodeType {
8436    /// Output only. The resource name of this node type.
8437    /// Resource names are schemeless URIs that follow the conventions in
8438    /// <https://cloud.google.com/apis/design/resource_names>.
8439    /// For example:
8440    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
8441    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8442    pub name: std::string::String,
8443
8444    /// Output only. The canonical identifier of the node type
8445    /// (corresponds to the `NodeType`). For example: standard-72.
8446    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8447    pub node_type_id: std::string::String,
8448
8449    /// Output only. The friendly name for this node type.
8450    /// For example: ve1-standard-72
8451    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8452    pub display_name: std::string::String,
8453
8454    /// Output only. The total number of virtual CPUs in a single node.
8455    pub virtual_cpu_count: i32,
8456
8457    /// Output only. The total number of CPU cores in a single node.
8458    pub total_core_count: i32,
8459
8460    /// Output only. The amount of physical memory available, defined in GB.
8461    pub memory_gb: i32,
8462
8463    /// Output only. The amount of storage available, defined in GB.
8464    pub disk_size_gb: i32,
8465
8466    /// Output only. List of possible values of custom core count.
8467    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8468    pub available_custom_core_counts: std::vec::Vec<i32>,
8469
8470    /// Output only. The type of the resource.
8471    pub kind: crate::model::node_type::Kind,
8472
8473    /// Output only. Families of the node type.
8474    /// For node types to be in the same cluster
8475    /// they must share at least one element in the `families`.
8476    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8477    pub families: std::vec::Vec<std::string::String>,
8478
8479    /// Output only. Capabilities of this node type.
8480    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8481    pub capabilities: std::vec::Vec<crate::model::node_type::Capability>,
8482}
8483
8484impl NodeType {
8485    pub fn new() -> Self {
8486        std::default::Default::default()
8487    }
8488
8489    /// Sets the value of [name][crate::model::NodeType::name].
8490    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8491        self.name = v.into();
8492        self
8493    }
8494
8495    /// Sets the value of [node_type_id][crate::model::NodeType::node_type_id].
8496    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8497        self.node_type_id = v.into();
8498        self
8499    }
8500
8501    /// Sets the value of [display_name][crate::model::NodeType::display_name].
8502    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8503        self.display_name = v.into();
8504        self
8505    }
8506
8507    /// Sets the value of [virtual_cpu_count][crate::model::NodeType::virtual_cpu_count].
8508    pub fn set_virtual_cpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8509        self.virtual_cpu_count = v.into();
8510        self
8511    }
8512
8513    /// Sets the value of [total_core_count][crate::model::NodeType::total_core_count].
8514    pub fn set_total_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8515        self.total_core_count = v.into();
8516        self
8517    }
8518
8519    /// Sets the value of [memory_gb][crate::model::NodeType::memory_gb].
8520    pub fn set_memory_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8521        self.memory_gb = v.into();
8522        self
8523    }
8524
8525    /// Sets the value of [disk_size_gb][crate::model::NodeType::disk_size_gb].
8526    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8527        self.disk_size_gb = v.into();
8528        self
8529    }
8530
8531    /// Sets the value of [kind][crate::model::NodeType::kind].
8532    pub fn set_kind<T: std::convert::Into<crate::model::node_type::Kind>>(mut self, v: T) -> Self {
8533        self.kind = v.into();
8534        self
8535    }
8536
8537    /// Sets the value of [available_custom_core_counts][crate::model::NodeType::available_custom_core_counts].
8538    pub fn set_available_custom_core_counts<T, V>(mut self, v: T) -> Self
8539    where
8540        T: std::iter::IntoIterator<Item = V>,
8541        V: std::convert::Into<i32>,
8542    {
8543        use std::iter::Iterator;
8544        self.available_custom_core_counts = v.into_iter().map(|i| i.into()).collect();
8545        self
8546    }
8547
8548    /// Sets the value of [families][crate::model::NodeType::families].
8549    pub fn set_families<T, V>(mut self, v: T) -> Self
8550    where
8551        T: std::iter::IntoIterator<Item = V>,
8552        V: std::convert::Into<std::string::String>,
8553    {
8554        use std::iter::Iterator;
8555        self.families = v.into_iter().map(|i| i.into()).collect();
8556        self
8557    }
8558
8559    /// Sets the value of [capabilities][crate::model::NodeType::capabilities].
8560    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
8561    where
8562        T: std::iter::IntoIterator<Item = V>,
8563        V: std::convert::Into<crate::model::node_type::Capability>,
8564    {
8565        use std::iter::Iterator;
8566        self.capabilities = v.into_iter().map(|i| i.into()).collect();
8567        self
8568    }
8569}
8570
8571impl wkt::message::Message for NodeType {
8572    fn typename() -> &'static str {
8573        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeType"
8574    }
8575}
8576
8577/// Defines additional types related to NodeType
8578pub mod node_type {
8579    #[allow(unused_imports)]
8580    use super::*;
8581
8582    /// Enum Kind defines possible types of a NodeType.
8583    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8584    pub struct Kind(std::borrow::Cow<'static, str>);
8585
8586    impl Kind {
8587        /// Creates a new Kind instance.
8588        pub const fn new(v: &'static str) -> Self {
8589            Self(std::borrow::Cow::Borrowed(v))
8590        }
8591
8592        /// Gets the enum value.
8593        pub fn value(&self) -> &str {
8594            &self.0
8595        }
8596    }
8597
8598    /// Useful constants to work with [Kind](Kind)
8599    pub mod kind {
8600        use super::Kind;
8601
8602        /// The default value. This value should never be used.
8603        pub const KIND_UNSPECIFIED: Kind = Kind::new("KIND_UNSPECIFIED");
8604
8605        /// Standard HCI node.
8606        pub const STANDARD: Kind = Kind::new("STANDARD");
8607
8608        /// Storage only Node.
8609        pub const STORAGE_ONLY: Kind = Kind::new("STORAGE_ONLY");
8610    }
8611
8612    impl std::convert::From<std::string::String> for Kind {
8613        fn from(value: std::string::String) -> Self {
8614            Self(std::borrow::Cow::Owned(value))
8615        }
8616    }
8617
8618    /// Capability of a node type.
8619    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8620    pub struct Capability(std::borrow::Cow<'static, str>);
8621
8622    impl Capability {
8623        /// Creates a new Capability instance.
8624        pub const fn new(v: &'static str) -> Self {
8625            Self(std::borrow::Cow::Borrowed(v))
8626        }
8627
8628        /// Gets the enum value.
8629        pub fn value(&self) -> &str {
8630            &self.0
8631        }
8632    }
8633
8634    /// Useful constants to work with [Capability](Capability)
8635    pub mod capability {
8636        use super::Capability;
8637
8638        /// The default value. This value is used if the capability is omitted or
8639        /// unknown.
8640        pub const CAPABILITY_UNSPECIFIED: Capability = Capability::new("CAPABILITY_UNSPECIFIED");
8641
8642        /// This node type supports stretch clusters.
8643        pub const STRETCHED_CLUSTERS: Capability = Capability::new("STRETCHED_CLUSTERS");
8644    }
8645
8646    impl std::convert::From<std::string::String> for Capability {
8647        fn from(value: std::string::String) -> Self {
8648            Self(std::borrow::Cow::Owned(value))
8649        }
8650    }
8651}
8652
8653/// Credentials for a private cloud.
8654#[serde_with::serde_as]
8655#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8656#[serde(default, rename_all = "camelCase")]
8657#[non_exhaustive]
8658pub struct Credentials {
8659    /// Initial username.
8660    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8661    pub username: std::string::String,
8662
8663    /// Initial password.
8664    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8665    pub password: std::string::String,
8666}
8667
8668impl Credentials {
8669    pub fn new() -> Self {
8670        std::default::Default::default()
8671    }
8672
8673    /// Sets the value of [username][crate::model::Credentials::username].
8674    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8675        self.username = v.into();
8676        self
8677    }
8678
8679    /// Sets the value of [password][crate::model::Credentials::password].
8680    pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8681        self.password = v.into();
8682        self
8683    }
8684}
8685
8686impl wkt::message::Message for Credentials {
8687    fn typename() -> &'static str {
8688        "type.googleapis.com/google.cloud.vmwareengine.v1.Credentials"
8689    }
8690}
8691
8692/// HCX activation key. A default key is created during
8693/// private cloud provisioning, but this behavior is subject to change
8694/// and you should always verify active keys.
8695/// Use
8696/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
8697/// to retrieve existing keys and
8698/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
8699/// to create new ones.
8700///
8701/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
8702/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
8703#[serde_with::serde_as]
8704#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8705#[serde(default, rename_all = "camelCase")]
8706#[non_exhaustive]
8707pub struct HcxActivationKey {
8708    /// Output only. The resource name of this HcxActivationKey.
8709    /// Resource names are schemeless URIs that follow the conventions in
8710    /// <https://cloud.google.com/apis/design/resource_names>.
8711    /// For example:
8712    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
8713    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8714    pub name: std::string::String,
8715
8716    /// Output only. Creation time of HCX activation key.
8717    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8718    pub create_time: std::option::Option<wkt::Timestamp>,
8719
8720    /// Output only. State of HCX activation key.
8721    pub state: crate::model::hcx_activation_key::State,
8722
8723    /// Output only. HCX activation key.
8724    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8725    pub activation_key: std::string::String,
8726
8727    /// Output only. System-generated unique identifier for the resource.
8728    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8729    pub uid: std::string::String,
8730}
8731
8732impl HcxActivationKey {
8733    pub fn new() -> Self {
8734        std::default::Default::default()
8735    }
8736
8737    /// Sets the value of [name][crate::model::HcxActivationKey::name].
8738    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8739        self.name = v.into();
8740        self
8741    }
8742
8743    /// Sets the value of [create_time][crate::model::HcxActivationKey::create_time].
8744    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8745        mut self,
8746        v: T,
8747    ) -> Self {
8748        self.create_time = v.into();
8749        self
8750    }
8751
8752    /// Sets the value of [state][crate::model::HcxActivationKey::state].
8753    pub fn set_state<T: std::convert::Into<crate::model::hcx_activation_key::State>>(
8754        mut self,
8755        v: T,
8756    ) -> Self {
8757        self.state = v.into();
8758        self
8759    }
8760
8761    /// Sets the value of [activation_key][crate::model::HcxActivationKey::activation_key].
8762    pub fn set_activation_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8763        self.activation_key = v.into();
8764        self
8765    }
8766
8767    /// Sets the value of [uid][crate::model::HcxActivationKey::uid].
8768    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8769        self.uid = v.into();
8770        self
8771    }
8772}
8773
8774impl wkt::message::Message for HcxActivationKey {
8775    fn typename() -> &'static str {
8776        "type.googleapis.com/google.cloud.vmwareengine.v1.HcxActivationKey"
8777    }
8778}
8779
8780/// Defines additional types related to HcxActivationKey
8781pub mod hcx_activation_key {
8782    #[allow(unused_imports)]
8783    use super::*;
8784
8785    /// State of HCX activation key
8786    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8787    pub struct State(std::borrow::Cow<'static, str>);
8788
8789    impl State {
8790        /// Creates a new State instance.
8791        pub const fn new(v: &'static str) -> Self {
8792            Self(std::borrow::Cow::Borrowed(v))
8793        }
8794
8795        /// Gets the enum value.
8796        pub fn value(&self) -> &str {
8797            &self.0
8798        }
8799    }
8800
8801    /// Useful constants to work with [State](State)
8802    pub mod state {
8803        use super::State;
8804
8805        /// Unspecified state.
8806        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
8807
8808        /// State of a newly generated activation key.
8809        pub const AVAILABLE: State = State::new("AVAILABLE");
8810
8811        /// State of key when it has been used to activate HCX appliance.
8812        pub const CONSUMED: State = State::new("CONSUMED");
8813
8814        /// State of key when it is being created.
8815        pub const CREATING: State = State::new("CREATING");
8816    }
8817
8818    impl std::convert::From<std::string::String> for State {
8819        fn from(value: std::string::String) -> Self {
8820            Self(std::borrow::Cow::Owned(value))
8821        }
8822    }
8823}
8824
8825/// Details about a HCX Cloud Manager appliance.
8826#[serde_with::serde_as]
8827#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8828#[serde(default, rename_all = "camelCase")]
8829#[non_exhaustive]
8830pub struct Hcx {
8831    /// Internal IP address of the appliance.
8832    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8833    pub internal_ip: std::string::String,
8834
8835    /// Version of the appliance.
8836    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8837    pub version: std::string::String,
8838
8839    /// Output only. The state of the appliance.
8840    pub state: crate::model::hcx::State,
8841
8842    /// Fully qualified domain name of the appliance.
8843    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8844    pub fqdn: std::string::String,
8845}
8846
8847impl Hcx {
8848    pub fn new() -> Self {
8849        std::default::Default::default()
8850    }
8851
8852    /// Sets the value of [internal_ip][crate::model::Hcx::internal_ip].
8853    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8854        self.internal_ip = v.into();
8855        self
8856    }
8857
8858    /// Sets the value of [version][crate::model::Hcx::version].
8859    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8860        self.version = v.into();
8861        self
8862    }
8863
8864    /// Sets the value of [state][crate::model::Hcx::state].
8865    pub fn set_state<T: std::convert::Into<crate::model::hcx::State>>(mut self, v: T) -> Self {
8866        self.state = v.into();
8867        self
8868    }
8869
8870    /// Sets the value of [fqdn][crate::model::Hcx::fqdn].
8871    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8872        self.fqdn = v.into();
8873        self
8874    }
8875}
8876
8877impl wkt::message::Message for Hcx {
8878    fn typename() -> &'static str {
8879        "type.googleapis.com/google.cloud.vmwareengine.v1.Hcx"
8880    }
8881}
8882
8883/// Defines additional types related to Hcx
8884pub mod hcx {
8885    #[allow(unused_imports)]
8886    use super::*;
8887
8888    /// State of the appliance
8889    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8890    pub struct State(std::borrow::Cow<'static, str>);
8891
8892    impl State {
8893        /// Creates a new State instance.
8894        pub const fn new(v: &'static str) -> Self {
8895            Self(std::borrow::Cow::Borrowed(v))
8896        }
8897
8898        /// Gets the enum value.
8899        pub fn value(&self) -> &str {
8900            &self.0
8901        }
8902    }
8903
8904    /// Useful constants to work with [State](State)
8905    pub mod state {
8906        use super::State;
8907
8908        /// Unspecified appliance state. This is the default value.
8909        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
8910
8911        /// The appliance is operational and can be used.
8912        pub const ACTIVE: State = State::new("ACTIVE");
8913
8914        /// The appliance is being deployed.
8915        pub const CREATING: State = State::new("CREATING");
8916
8917        /// The appliance is being activated.
8918        pub const ACTIVATING: State = State::new("ACTIVATING");
8919    }
8920
8921    impl std::convert::From<std::string::String> for State {
8922        fn from(value: std::string::String) -> Self {
8923            Self(std::borrow::Cow::Owned(value))
8924        }
8925    }
8926}
8927
8928/// Details about a NSX Manager appliance.
8929#[serde_with::serde_as]
8930#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8931#[serde(default, rename_all = "camelCase")]
8932#[non_exhaustive]
8933pub struct Nsx {
8934    /// Internal IP address of the appliance.
8935    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8936    pub internal_ip: std::string::String,
8937
8938    /// Version of the appliance.
8939    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8940    pub version: std::string::String,
8941
8942    /// Output only. The state of the appliance.
8943    pub state: crate::model::nsx::State,
8944
8945    /// Fully qualified domain name of the appliance.
8946    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8947    pub fqdn: std::string::String,
8948}
8949
8950impl Nsx {
8951    pub fn new() -> Self {
8952        std::default::Default::default()
8953    }
8954
8955    /// Sets the value of [internal_ip][crate::model::Nsx::internal_ip].
8956    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8957        self.internal_ip = v.into();
8958        self
8959    }
8960
8961    /// Sets the value of [version][crate::model::Nsx::version].
8962    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8963        self.version = v.into();
8964        self
8965    }
8966
8967    /// Sets the value of [state][crate::model::Nsx::state].
8968    pub fn set_state<T: std::convert::Into<crate::model::nsx::State>>(mut self, v: T) -> Self {
8969        self.state = v.into();
8970        self
8971    }
8972
8973    /// Sets the value of [fqdn][crate::model::Nsx::fqdn].
8974    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8975        self.fqdn = v.into();
8976        self
8977    }
8978}
8979
8980impl wkt::message::Message for Nsx {
8981    fn typename() -> &'static str {
8982        "type.googleapis.com/google.cloud.vmwareengine.v1.Nsx"
8983    }
8984}
8985
8986/// Defines additional types related to Nsx
8987pub mod nsx {
8988    #[allow(unused_imports)]
8989    use super::*;
8990
8991    /// State of the appliance
8992    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8993    pub struct State(std::borrow::Cow<'static, str>);
8994
8995    impl State {
8996        /// Creates a new State instance.
8997        pub const fn new(v: &'static str) -> Self {
8998            Self(std::borrow::Cow::Borrowed(v))
8999        }
9000
9001        /// Gets the enum value.
9002        pub fn value(&self) -> &str {
9003            &self.0
9004        }
9005    }
9006
9007    /// Useful constants to work with [State](State)
9008    pub mod state {
9009        use super::State;
9010
9011        /// Unspecified appliance state. This is the default value.
9012        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
9013
9014        /// The appliance is operational and can be used.
9015        pub const ACTIVE: State = State::new("ACTIVE");
9016
9017        /// The appliance is being deployed.
9018        pub const CREATING: State = State::new("CREATING");
9019    }
9020
9021    impl std::convert::From<std::string::String> for State {
9022        fn from(value: std::string::String) -> Self {
9023            Self(std::borrow::Cow::Owned(value))
9024        }
9025    }
9026}
9027
9028/// Details about a vCenter Server management appliance.
9029#[serde_with::serde_as]
9030#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9031#[serde(default, rename_all = "camelCase")]
9032#[non_exhaustive]
9033pub struct Vcenter {
9034    /// Internal IP address of the appliance.
9035    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9036    pub internal_ip: std::string::String,
9037
9038    /// Version of the appliance.
9039    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9040    pub version: std::string::String,
9041
9042    /// Output only. The state of the appliance.
9043    pub state: crate::model::vcenter::State,
9044
9045    /// Fully qualified domain name of the appliance.
9046    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9047    pub fqdn: std::string::String,
9048}
9049
9050impl Vcenter {
9051    pub fn new() -> Self {
9052        std::default::Default::default()
9053    }
9054
9055    /// Sets the value of [internal_ip][crate::model::Vcenter::internal_ip].
9056    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9057        self.internal_ip = v.into();
9058        self
9059    }
9060
9061    /// Sets the value of [version][crate::model::Vcenter::version].
9062    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9063        self.version = v.into();
9064        self
9065    }
9066
9067    /// Sets the value of [state][crate::model::Vcenter::state].
9068    pub fn set_state<T: std::convert::Into<crate::model::vcenter::State>>(mut self, v: T) -> Self {
9069        self.state = v.into();
9070        self
9071    }
9072
9073    /// Sets the value of [fqdn][crate::model::Vcenter::fqdn].
9074    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9075        self.fqdn = v.into();
9076        self
9077    }
9078}
9079
9080impl wkt::message::Message for Vcenter {
9081    fn typename() -> &'static str {
9082        "type.googleapis.com/google.cloud.vmwareengine.v1.Vcenter"
9083    }
9084}
9085
9086/// Defines additional types related to Vcenter
9087pub mod vcenter {
9088    #[allow(unused_imports)]
9089    use super::*;
9090
9091    /// State of the appliance
9092    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9093    pub struct State(std::borrow::Cow<'static, str>);
9094
9095    impl State {
9096        /// Creates a new State instance.
9097        pub const fn new(v: &'static str) -> Self {
9098            Self(std::borrow::Cow::Borrowed(v))
9099        }
9100
9101        /// Gets the enum value.
9102        pub fn value(&self) -> &str {
9103            &self.0
9104        }
9105    }
9106
9107    /// Useful constants to work with [State](State)
9108    pub mod state {
9109        use super::State;
9110
9111        /// Unspecified appliance state. This is the default value.
9112        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
9113
9114        /// The appliance is operational and can be used.
9115        pub const ACTIVE: State = State::new("ACTIVE");
9116
9117        /// The appliance is being deployed.
9118        pub const CREATING: State = State::new("CREATING");
9119    }
9120
9121    impl std::convert::From<std::string::String> for State {
9122        fn from(value: std::string::String) -> Self {
9123            Self(std::borrow::Cow::Owned(value))
9124        }
9125    }
9126}
9127
9128/// Autoscaling settings define the rules used by VMware Engine to
9129/// automatically scale-out and scale-in the clusters in a private cloud.
9130#[serde_with::serde_as]
9131#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9132#[serde(default, rename_all = "camelCase")]
9133#[non_exhaustive]
9134pub struct AutoscalingSettings {
9135    /// Required. The map with autoscaling policies applied to the cluster.
9136    /// The key is the identifier of the policy.
9137    /// It must meet the following requirements:
9138    ///
9139    /// * Only contains 1-63 alphanumeric characters and hyphens
9140    /// * Begins with an alphabetical character
9141    /// * Ends with a non-hyphen character
9142    /// * Not formatted as a UUID
9143    /// * Complies with [RFC
9144    ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
9145    ///
9146    /// Currently there map must contain only one element
9147    /// that describes the autoscaling policy for compute nodes.
9148    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
9149    pub autoscaling_policies: std::collections::HashMap<
9150        std::string::String,
9151        crate::model::autoscaling_settings::AutoscalingPolicy,
9152    >,
9153
9154    /// Optional. Minimum number of nodes of any type in a cluster.
9155    /// If not specified the default limits apply.
9156    pub min_cluster_node_count: i32,
9157
9158    /// Optional. Maximum number of nodes of any type in a cluster.
9159    /// If not specified the default limits apply.
9160    pub max_cluster_node_count: i32,
9161
9162    /// Optional. The minimum duration between consecutive autoscale operations.
9163    /// It starts once addition or removal of nodes is fully completed.
9164    /// Defaults to 30 minutes if not specified. Cool down period must be in whole
9165    /// minutes (for example, 30, 31, 50, 180 minutes).
9166    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9167    pub cool_down_period: std::option::Option<wkt::Duration>,
9168}
9169
9170impl AutoscalingSettings {
9171    pub fn new() -> Self {
9172        std::default::Default::default()
9173    }
9174
9175    /// Sets the value of [min_cluster_node_count][crate::model::AutoscalingSettings::min_cluster_node_count].
9176    pub fn set_min_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9177        self.min_cluster_node_count = v.into();
9178        self
9179    }
9180
9181    /// Sets the value of [max_cluster_node_count][crate::model::AutoscalingSettings::max_cluster_node_count].
9182    pub fn set_max_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9183        self.max_cluster_node_count = v.into();
9184        self
9185    }
9186
9187    /// Sets the value of [cool_down_period][crate::model::AutoscalingSettings::cool_down_period].
9188    pub fn set_cool_down_period<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
9189        mut self,
9190        v: T,
9191    ) -> Self {
9192        self.cool_down_period = v.into();
9193        self
9194    }
9195
9196    /// Sets the value of [autoscaling_policies][crate::model::AutoscalingSettings::autoscaling_policies].
9197    pub fn set_autoscaling_policies<T, K, V>(mut self, v: T) -> Self
9198    where
9199        T: std::iter::IntoIterator<Item = (K, V)>,
9200        K: std::convert::Into<std::string::String>,
9201        V: std::convert::Into<crate::model::autoscaling_settings::AutoscalingPolicy>,
9202    {
9203        use std::iter::Iterator;
9204        self.autoscaling_policies = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9205        self
9206    }
9207}
9208
9209impl wkt::message::Message for AutoscalingSettings {
9210    fn typename() -> &'static str {
9211        "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings"
9212    }
9213}
9214
9215/// Defines additional types related to AutoscalingSettings
9216pub mod autoscaling_settings {
9217    #[allow(unused_imports)]
9218    use super::*;
9219
9220    /// Thresholds define the utilization of resources triggering
9221    /// scale-out and scale-in operations.
9222    #[serde_with::serde_as]
9223    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9224    #[serde(default, rename_all = "camelCase")]
9225    #[non_exhaustive]
9226    pub struct Thresholds {
9227        /// Required. The utilization triggering the scale-out operation in percent.
9228        pub scale_out: i32,
9229
9230        /// Required. The utilization triggering the scale-in operation in percent.
9231        pub scale_in: i32,
9232    }
9233
9234    impl Thresholds {
9235        pub fn new() -> Self {
9236            std::default::Default::default()
9237        }
9238
9239        /// Sets the value of [scale_out][crate::model::autoscaling_settings::Thresholds::scale_out].
9240        pub fn set_scale_out<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9241            self.scale_out = v.into();
9242            self
9243        }
9244
9245        /// Sets the value of [scale_in][crate::model::autoscaling_settings::Thresholds::scale_in].
9246        pub fn set_scale_in<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9247            self.scale_in = v.into();
9248            self
9249        }
9250    }
9251
9252    impl wkt::message::Message for Thresholds {
9253        fn typename() -> &'static str {
9254            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds"
9255        }
9256    }
9257
9258    /// Autoscaling policy describes the behavior of the autoscaling
9259    /// with respect to the resource utilization.
9260    /// The scale-out operation is initiated if the utilization
9261    /// exceeds ANY of the respective thresholds.
9262    /// The scale-in operation is initiated if the utilization
9263    /// is below ALL of the respective thresholds.
9264    #[serde_with::serde_as]
9265    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9266    #[serde(default, rename_all = "camelCase")]
9267    #[non_exhaustive]
9268    pub struct AutoscalingPolicy {
9269        /// Required. The canonical identifier of the node type to add or remove.
9270        /// Corresponds to the `NodeType`.
9271        #[serde(skip_serializing_if = "std::string::String::is_empty")]
9272        pub node_type_id: std::string::String,
9273
9274        /// Required. Number of nodes to add to a cluster during a scale-out
9275        /// operation. Must be divisible by 2 for stretched clusters. During a
9276        /// scale-in operation only one node (or 2 for stretched clusters) are
9277        /// removed in a single iteration.
9278        pub scale_out_size: i32,
9279
9280        /// Optional. Utilization thresholds pertaining to CPU utilization.
9281        #[serde(skip_serializing_if = "std::option::Option::is_none")]
9282        pub cpu_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
9283
9284        /// Optional. Utilization thresholds pertaining to amount of granted memory.
9285        #[serde(skip_serializing_if = "std::option::Option::is_none")]
9286        pub granted_memory_thresholds:
9287            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
9288
9289        /// Optional. Utilization thresholds pertaining to amount of consumed memory.
9290        #[serde(skip_serializing_if = "std::option::Option::is_none")]
9291        pub consumed_memory_thresholds:
9292            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
9293
9294        /// Optional. Utilization thresholds pertaining to amount of consumed
9295        /// storage.
9296        #[serde(skip_serializing_if = "std::option::Option::is_none")]
9297        pub storage_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
9298    }
9299
9300    impl AutoscalingPolicy {
9301        pub fn new() -> Self {
9302            std::default::Default::default()
9303        }
9304
9305        /// Sets the value of [node_type_id][crate::model::autoscaling_settings::AutoscalingPolicy::node_type_id].
9306        pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(
9307            mut self,
9308            v: T,
9309        ) -> Self {
9310            self.node_type_id = v.into();
9311            self
9312        }
9313
9314        /// Sets the value of [scale_out_size][crate::model::autoscaling_settings::AutoscalingPolicy::scale_out_size].
9315        pub fn set_scale_out_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9316            self.scale_out_size = v.into();
9317            self
9318        }
9319
9320        /// Sets the value of [cpu_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::cpu_thresholds].
9321        pub fn set_cpu_thresholds<
9322            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
9323        >(
9324            mut self,
9325            v: T,
9326        ) -> Self {
9327            self.cpu_thresholds = v.into();
9328            self
9329        }
9330
9331        /// Sets the value of [granted_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::granted_memory_thresholds].
9332        pub fn set_granted_memory_thresholds<
9333            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
9334        >(
9335            mut self,
9336            v: T,
9337        ) -> Self {
9338            self.granted_memory_thresholds = v.into();
9339            self
9340        }
9341
9342        /// Sets the value of [consumed_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::consumed_memory_thresholds].
9343        pub fn set_consumed_memory_thresholds<
9344            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
9345        >(
9346            mut self,
9347            v: T,
9348        ) -> Self {
9349            self.consumed_memory_thresholds = v.into();
9350            self
9351        }
9352
9353        /// Sets the value of [storage_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::storage_thresholds].
9354        pub fn set_storage_thresholds<
9355            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
9356        >(
9357            mut self,
9358            v: T,
9359        ) -> Self {
9360            self.storage_thresholds = v.into();
9361            self
9362        }
9363    }
9364
9365    impl wkt::message::Message for AutoscalingPolicy {
9366        fn typename() -> &'static str {
9367            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.AutoscalingPolicy"
9368        }
9369    }
9370}
9371
9372/// DNS forwarding config.
9373/// This config defines a list of domain to name server mappings,
9374/// and is attached to the private cloud for custom domain resolution.
9375#[serde_with::serde_as]
9376#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9377#[serde(default, rename_all = "camelCase")]
9378#[non_exhaustive]
9379pub struct DnsForwarding {
9380    /// Output only. The resource name of this DNS profile.
9381    /// Resource names are schemeless URIs that follow the conventions in
9382    /// <https://cloud.google.com/apis/design/resource_names>.
9383    /// For example:
9384    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
9385    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9386    pub name: std::string::String,
9387
9388    /// Output only. Creation time of this resource.
9389    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9390    pub create_time: std::option::Option<wkt::Timestamp>,
9391
9392    /// Output only. Last update time of this resource.
9393    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9394    pub update_time: std::option::Option<wkt::Timestamp>,
9395
9396    /// Required. List of domain mappings to configure
9397    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9398    pub forwarding_rules: std::vec::Vec<crate::model::dns_forwarding::ForwardingRule>,
9399}
9400
9401impl DnsForwarding {
9402    pub fn new() -> Self {
9403        std::default::Default::default()
9404    }
9405
9406    /// Sets the value of [name][crate::model::DnsForwarding::name].
9407    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9408        self.name = v.into();
9409        self
9410    }
9411
9412    /// Sets the value of [create_time][crate::model::DnsForwarding::create_time].
9413    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9414        mut self,
9415        v: T,
9416    ) -> Self {
9417        self.create_time = v.into();
9418        self
9419    }
9420
9421    /// Sets the value of [update_time][crate::model::DnsForwarding::update_time].
9422    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9423        mut self,
9424        v: T,
9425    ) -> Self {
9426        self.update_time = v.into();
9427        self
9428    }
9429
9430    /// Sets the value of [forwarding_rules][crate::model::DnsForwarding::forwarding_rules].
9431    pub fn set_forwarding_rules<T, V>(mut self, v: T) -> Self
9432    where
9433        T: std::iter::IntoIterator<Item = V>,
9434        V: std::convert::Into<crate::model::dns_forwarding::ForwardingRule>,
9435    {
9436        use std::iter::Iterator;
9437        self.forwarding_rules = v.into_iter().map(|i| i.into()).collect();
9438        self
9439    }
9440}
9441
9442impl wkt::message::Message for DnsForwarding {
9443    fn typename() -> &'static str {
9444        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding"
9445    }
9446}
9447
9448/// Defines additional types related to DnsForwarding
9449pub mod dns_forwarding {
9450    #[allow(unused_imports)]
9451    use super::*;
9452
9453    /// A forwarding rule is a mapping of a `domain` to `name_servers`.
9454    /// This mapping allows VMware Engine to resolve domains for attached private
9455    /// clouds by forwarding DNS requests for a given domain to the specified
9456    /// nameservers.
9457    #[serde_with::serde_as]
9458    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9459    #[serde(default, rename_all = "camelCase")]
9460    #[non_exhaustive]
9461    pub struct ForwardingRule {
9462        /// Required. Domain used to resolve a `name_servers` list.
9463        #[serde(skip_serializing_if = "std::string::String::is_empty")]
9464        pub domain: std::string::String,
9465
9466        /// Required. List of DNS servers to use for domain resolution
9467        #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9468        pub name_servers: std::vec::Vec<std::string::String>,
9469    }
9470
9471    impl ForwardingRule {
9472        pub fn new() -> Self {
9473            std::default::Default::default()
9474        }
9475
9476        /// Sets the value of [domain][crate::model::dns_forwarding::ForwardingRule::domain].
9477        pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9478            self.domain = v.into();
9479            self
9480        }
9481
9482        /// Sets the value of [name_servers][crate::model::dns_forwarding::ForwardingRule::name_servers].
9483        pub fn set_name_servers<T, V>(mut self, v: T) -> Self
9484        where
9485            T: std::iter::IntoIterator<Item = V>,
9486            V: std::convert::Into<std::string::String>,
9487        {
9488            use std::iter::Iterator;
9489            self.name_servers = v.into_iter().map(|i| i.into()).collect();
9490            self
9491        }
9492    }
9493
9494    impl wkt::message::Message for ForwardingRule {
9495        fn typename() -> &'static str {
9496            "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule"
9497        }
9498    }
9499}
9500
9501/// Details of a network peering.
9502#[serde_with::serde_as]
9503#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9504#[serde(default, rename_all = "camelCase")]
9505#[non_exhaustive]
9506pub struct NetworkPeering {
9507    /// Output only. The resource name of the network peering. NetworkPeering is a
9508    /// global resource and location can only be global. Resource names are
9509    /// scheme-less URIs that follow the conventions in
9510    /// <https://cloud.google.com/apis/design/resource_names>.
9511    /// For example:
9512    /// `projects/my-project/locations/global/networkPeerings/my-peering`
9513    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9514    pub name: std::string::String,
9515
9516    /// Output only. Creation time of this resource.
9517    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9518    pub create_time: std::option::Option<wkt::Timestamp>,
9519
9520    /// Output only. Last update time of this resource.
9521    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9522    pub update_time: std::option::Option<wkt::Timestamp>,
9523
9524    /// Required. The relative resource name of the network to peer with
9525    /// a standard VMware Engine network. The provided network can be a
9526    /// consumer VPC network or another standard VMware Engine network. If the
9527    /// `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form:
9528    /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
9529    /// Otherwise specify the name in the form:
9530    /// `projects/{project}/global/networks/{network_id}`, where
9531    /// `{project}` can either be a project number or a project ID.
9532    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9533    pub peer_network: std::string::String,
9534
9535    /// Optional. True if custom routes are exported to the peered network;
9536    /// false otherwise. The default value is true.
9537    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9538    pub export_custom_routes: std::option::Option<bool>,
9539
9540    /// Optional. True if custom routes are imported from the peered network;
9541    /// false otherwise. The default value is true.
9542    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9543    pub import_custom_routes: std::option::Option<bool>,
9544
9545    /// Optional. True if full mesh connectivity is created and managed
9546    /// automatically between peered networks; false otherwise. Currently this
9547    /// field is always true because Google Compute Engine automatically creates
9548    /// and manages subnetwork routes between two VPC networks when peering state
9549    /// is 'ACTIVE'.
9550    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9551    pub exchange_subnet_routes: std::option::Option<bool>,
9552
9553    /// Optional. True if all subnet routes with a public IP address range are
9554    /// exported; false otherwise. The default value is true. IPv4 special-use
9555    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
9556    /// exported to peers and are not controlled by this field.
9557    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9558    pub export_custom_routes_with_public_ip: std::option::Option<bool>,
9559
9560    /// Optional. True if all subnet routes with public IP address range are
9561    /// imported; false otherwise. The default value is true. IPv4 special-use
9562    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
9563    /// imported to peers and are not controlled by this field.
9564    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9565    pub import_custom_routes_with_public_ip: std::option::Option<bool>,
9566
9567    /// Output only. State of the network peering. This field
9568    /// has a value of 'ACTIVE' when there's a matching configuration in the peer
9569    /// network. New values may be added to this enum when appropriate.
9570    pub state: crate::model::network_peering::State,
9571
9572    /// Output only. Output Only. Details about the current state of the network
9573    /// peering.
9574    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9575    pub state_details: std::string::String,
9576
9577    /// Optional. Maximum transmission unit (MTU) in bytes.
9578    /// The default value is `1500`. If a value of `0` is provided for this field,
9579    /// VMware Engine uses the default value instead.
9580    pub peer_mtu: i32,
9581
9582    /// Required. The type of the network to peer with the VMware Engine network.
9583    pub peer_network_type: crate::model::network_peering::PeerNetworkType,
9584
9585    /// Output only. System-generated unique identifier for the resource.
9586    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9587    pub uid: std::string::String,
9588
9589    /// Required. The relative resource name of the VMware Engine network.
9590    /// Specify the name in the following form:
9591    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
9592    /// where `{project}` can either be a project number or a project ID.
9593    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9594    pub vmware_engine_network: std::string::String,
9595
9596    /// Optional. User-provided description for this network peering.
9597    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9598    pub description: std::string::String,
9599}
9600
9601impl NetworkPeering {
9602    pub fn new() -> Self {
9603        std::default::Default::default()
9604    }
9605
9606    /// Sets the value of [name][crate::model::NetworkPeering::name].
9607    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9608        self.name = v.into();
9609        self
9610    }
9611
9612    /// Sets the value of [create_time][crate::model::NetworkPeering::create_time].
9613    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9614        mut self,
9615        v: T,
9616    ) -> Self {
9617        self.create_time = v.into();
9618        self
9619    }
9620
9621    /// Sets the value of [update_time][crate::model::NetworkPeering::update_time].
9622    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9623        mut self,
9624        v: T,
9625    ) -> Self {
9626        self.update_time = v.into();
9627        self
9628    }
9629
9630    /// Sets the value of [peer_network][crate::model::NetworkPeering::peer_network].
9631    pub fn set_peer_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9632        self.peer_network = v.into();
9633        self
9634    }
9635
9636    /// Sets the value of [export_custom_routes][crate::model::NetworkPeering::export_custom_routes].
9637    pub fn set_export_custom_routes<T: std::convert::Into<std::option::Option<bool>>>(
9638        mut self,
9639        v: T,
9640    ) -> Self {
9641        self.export_custom_routes = v.into();
9642        self
9643    }
9644
9645    /// Sets the value of [import_custom_routes][crate::model::NetworkPeering::import_custom_routes].
9646    pub fn set_import_custom_routes<T: std::convert::Into<std::option::Option<bool>>>(
9647        mut self,
9648        v: T,
9649    ) -> Self {
9650        self.import_custom_routes = v.into();
9651        self
9652    }
9653
9654    /// Sets the value of [exchange_subnet_routes][crate::model::NetworkPeering::exchange_subnet_routes].
9655    pub fn set_exchange_subnet_routes<T: std::convert::Into<std::option::Option<bool>>>(
9656        mut self,
9657        v: T,
9658    ) -> Self {
9659        self.exchange_subnet_routes = v.into();
9660        self
9661    }
9662
9663    /// Sets the value of [export_custom_routes_with_public_ip][crate::model::NetworkPeering::export_custom_routes_with_public_ip].
9664    pub fn set_export_custom_routes_with_public_ip<
9665        T: std::convert::Into<std::option::Option<bool>>,
9666    >(
9667        mut self,
9668        v: T,
9669    ) -> Self {
9670        self.export_custom_routes_with_public_ip = v.into();
9671        self
9672    }
9673
9674    /// Sets the value of [import_custom_routes_with_public_ip][crate::model::NetworkPeering::import_custom_routes_with_public_ip].
9675    pub fn set_import_custom_routes_with_public_ip<
9676        T: std::convert::Into<std::option::Option<bool>>,
9677    >(
9678        mut self,
9679        v: T,
9680    ) -> Self {
9681        self.import_custom_routes_with_public_ip = v.into();
9682        self
9683    }
9684
9685    /// Sets the value of [state][crate::model::NetworkPeering::state].
9686    pub fn set_state<T: std::convert::Into<crate::model::network_peering::State>>(
9687        mut self,
9688        v: T,
9689    ) -> Self {
9690        self.state = v.into();
9691        self
9692    }
9693
9694    /// Sets the value of [state_details][crate::model::NetworkPeering::state_details].
9695    pub fn set_state_details<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9696        self.state_details = v.into();
9697        self
9698    }
9699
9700    /// Sets the value of [peer_mtu][crate::model::NetworkPeering::peer_mtu].
9701    pub fn set_peer_mtu<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9702        self.peer_mtu = v.into();
9703        self
9704    }
9705
9706    /// Sets the value of [peer_network_type][crate::model::NetworkPeering::peer_network_type].
9707    pub fn set_peer_network_type<
9708        T: std::convert::Into<crate::model::network_peering::PeerNetworkType>,
9709    >(
9710        mut self,
9711        v: T,
9712    ) -> Self {
9713        self.peer_network_type = v.into();
9714        self
9715    }
9716
9717    /// Sets the value of [uid][crate::model::NetworkPeering::uid].
9718    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9719        self.uid = v.into();
9720        self
9721    }
9722
9723    /// Sets the value of [vmware_engine_network][crate::model::NetworkPeering::vmware_engine_network].
9724    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
9725        mut self,
9726        v: T,
9727    ) -> Self {
9728        self.vmware_engine_network = v.into();
9729        self
9730    }
9731
9732    /// Sets the value of [description][crate::model::NetworkPeering::description].
9733    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9734        self.description = v.into();
9735        self
9736    }
9737}
9738
9739impl wkt::message::Message for NetworkPeering {
9740    fn typename() -> &'static str {
9741        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPeering"
9742    }
9743}
9744
9745/// Defines additional types related to NetworkPeering
9746pub mod network_peering {
9747    #[allow(unused_imports)]
9748    use super::*;
9749
9750    /// Possible states of a network peering.
9751    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9752    pub struct State(std::borrow::Cow<'static, str>);
9753
9754    impl State {
9755        /// Creates a new State instance.
9756        pub const fn new(v: &'static str) -> Self {
9757            Self(std::borrow::Cow::Borrowed(v))
9758        }
9759
9760        /// Gets the enum value.
9761        pub fn value(&self) -> &str {
9762            &self.0
9763        }
9764    }
9765
9766    /// Useful constants to work with [State](State)
9767    pub mod state {
9768        use super::State;
9769
9770        /// Unspecified network peering state. This is the default value.
9771        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
9772
9773        /// The peering is not active.
9774        pub const INACTIVE: State = State::new("INACTIVE");
9775
9776        /// The peering is active.
9777        pub const ACTIVE: State = State::new("ACTIVE");
9778
9779        /// The peering is being created.
9780        pub const CREATING: State = State::new("CREATING");
9781
9782        /// The peering is being deleted.
9783        pub const DELETING: State = State::new("DELETING");
9784    }
9785
9786    impl std::convert::From<std::string::String> for State {
9787        fn from(value: std::string::String) -> Self {
9788            Self(std::borrow::Cow::Owned(value))
9789        }
9790    }
9791
9792    /// Type or purpose of the network peering connection.
9793    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9794    pub struct PeerNetworkType(std::borrow::Cow<'static, str>);
9795
9796    impl PeerNetworkType {
9797        /// Creates a new PeerNetworkType instance.
9798        pub const fn new(v: &'static str) -> Self {
9799            Self(std::borrow::Cow::Borrowed(v))
9800        }
9801
9802        /// Gets the enum value.
9803        pub fn value(&self) -> &str {
9804            &self.0
9805        }
9806    }
9807
9808    /// Useful constants to work with [PeerNetworkType](PeerNetworkType)
9809    pub mod peer_network_type {
9810        use super::PeerNetworkType;
9811
9812        /// Unspecified
9813        pub const PEER_NETWORK_TYPE_UNSPECIFIED: PeerNetworkType =
9814            PeerNetworkType::new("PEER_NETWORK_TYPE_UNSPECIFIED");
9815
9816        /// Peering connection used for connecting to another VPC network established
9817        /// by the same user. For example, a peering connection to another VPC
9818        /// network in the same project or to an on-premises network.
9819        pub const STANDARD: PeerNetworkType = PeerNetworkType::new("STANDARD");
9820
9821        /// Peering connection used for connecting to another VMware Engine network.
9822        pub const VMWARE_ENGINE_NETWORK: PeerNetworkType =
9823            PeerNetworkType::new("VMWARE_ENGINE_NETWORK");
9824
9825        /// Peering connection used for establishing [private services
9826        /// access](https://cloud.google.com/vpc/docs/private-services-access).
9827        pub const PRIVATE_SERVICES_ACCESS: PeerNetworkType =
9828            PeerNetworkType::new("PRIVATE_SERVICES_ACCESS");
9829
9830        /// Peering connection used for connecting to NetApp Cloud Volumes.
9831        pub const NETAPP_CLOUD_VOLUMES: PeerNetworkType =
9832            PeerNetworkType::new("NETAPP_CLOUD_VOLUMES");
9833
9834        /// Peering connection used for connecting to third-party services. Most
9835        /// third-party services require manual setup of reverse peering on the VPC
9836        /// network associated with the third-party service.
9837        pub const THIRD_PARTY_SERVICE: PeerNetworkType =
9838            PeerNetworkType::new("THIRD_PARTY_SERVICE");
9839
9840        /// Peering connection used for connecting to Dell PowerScale Filers
9841        pub const DELL_POWERSCALE: PeerNetworkType = PeerNetworkType::new("DELL_POWERSCALE");
9842
9843        /// Peering connection used for connecting to Google Cloud NetApp Volumes.
9844        pub const GOOGLE_CLOUD_NETAPP_VOLUMES: PeerNetworkType =
9845            PeerNetworkType::new("GOOGLE_CLOUD_NETAPP_VOLUMES");
9846    }
9847
9848    impl std::convert::From<std::string::String> for PeerNetworkType {
9849        fn from(value: std::string::String) -> Self {
9850            Self(std::borrow::Cow::Owned(value))
9851        }
9852    }
9853}
9854
9855/// Exchanged network peering route.
9856#[serde_with::serde_as]
9857#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9858#[serde(default, rename_all = "camelCase")]
9859#[non_exhaustive]
9860pub struct PeeringRoute {
9861    /// Output only. Destination range of the peering route in CIDR notation.
9862    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9863    pub dest_range: std::string::String,
9864
9865    /// Output only. Type of the route in the peer VPC network.
9866    #[serde(rename = "type")]
9867    pub r#type: crate::model::peering_route::Type,
9868
9869    /// Output only. Region containing the next hop of the peering route. This
9870    /// field only applies to dynamic routes in the peer VPC network.
9871    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9872    pub next_hop_region: std::string::String,
9873
9874    /// Output only. The priority of the peering route.
9875    #[serde_as(as = "serde_with::DisplayFromStr")]
9876    pub priority: i64,
9877
9878    /// Output only. True if the peering route has been imported from a peered
9879    /// VPC network; false otherwise. The import happens if the field
9880    /// `NetworkPeering.importCustomRoutes` is true for this network,
9881    /// `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and
9882    /// the import does not result in a route conflict.
9883    pub imported: bool,
9884
9885    /// Output only. Direction of the routes exchanged with the peer network, from
9886    /// the VMware Engine network perspective:
9887    ///
9888    /// * Routes of direction `INCOMING` are imported from the peer network.
9889    /// * Routes of direction `OUTGOING` are exported from the intranet VPC network
9890    ///   of the VMware Engine network.
9891    pub direction: crate::model::peering_route::Direction,
9892}
9893
9894impl PeeringRoute {
9895    pub fn new() -> Self {
9896        std::default::Default::default()
9897    }
9898
9899    /// Sets the value of [dest_range][crate::model::PeeringRoute::dest_range].
9900    pub fn set_dest_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9901        self.dest_range = v.into();
9902        self
9903    }
9904
9905    /// Sets the value of [r#type][crate::model::PeeringRoute::type].
9906    pub fn set_type<T: std::convert::Into<crate::model::peering_route::Type>>(
9907        mut self,
9908        v: T,
9909    ) -> Self {
9910        self.r#type = v.into();
9911        self
9912    }
9913
9914    /// Sets the value of [next_hop_region][crate::model::PeeringRoute::next_hop_region].
9915    pub fn set_next_hop_region<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9916        self.next_hop_region = v.into();
9917        self
9918    }
9919
9920    /// Sets the value of [priority][crate::model::PeeringRoute::priority].
9921    pub fn set_priority<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
9922        self.priority = v.into();
9923        self
9924    }
9925
9926    /// Sets the value of [imported][crate::model::PeeringRoute::imported].
9927    pub fn set_imported<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
9928        self.imported = v.into();
9929        self
9930    }
9931
9932    /// Sets the value of [direction][crate::model::PeeringRoute::direction].
9933    pub fn set_direction<T: std::convert::Into<crate::model::peering_route::Direction>>(
9934        mut self,
9935        v: T,
9936    ) -> Self {
9937        self.direction = v.into();
9938        self
9939    }
9940}
9941
9942impl wkt::message::Message for PeeringRoute {
9943    fn typename() -> &'static str {
9944        "type.googleapis.com/google.cloud.vmwareengine.v1.PeeringRoute"
9945    }
9946}
9947
9948/// Defines additional types related to PeeringRoute
9949pub mod peering_route {
9950    #[allow(unused_imports)]
9951    use super::*;
9952
9953    /// The type of the peering route.
9954    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9955    pub struct Type(std::borrow::Cow<'static, str>);
9956
9957    impl Type {
9958        /// Creates a new Type instance.
9959        pub const fn new(v: &'static str) -> Self {
9960            Self(std::borrow::Cow::Borrowed(v))
9961        }
9962
9963        /// Gets the enum value.
9964        pub fn value(&self) -> &str {
9965            &self.0
9966        }
9967    }
9968
9969    /// Useful constants to work with [Type](Type)
9970    pub mod r#type {
9971        use super::Type;
9972
9973        /// Unspecified peering route type. This is the default value.
9974        pub const TYPE_UNSPECIFIED: Type = Type::new("TYPE_UNSPECIFIED");
9975
9976        /// Dynamic routes in the peer network.
9977        pub const DYNAMIC_PEERING_ROUTE: Type = Type::new("DYNAMIC_PEERING_ROUTE");
9978
9979        /// Static routes in the peer network.
9980        pub const STATIC_PEERING_ROUTE: Type = Type::new("STATIC_PEERING_ROUTE");
9981
9982        /// Created, updated, and removed automatically by Google Cloud when subnets
9983        /// are created, modified, or deleted in the peer network.
9984        pub const SUBNET_PEERING_ROUTE: Type = Type::new("SUBNET_PEERING_ROUTE");
9985    }
9986
9987    impl std::convert::From<std::string::String> for Type {
9988        fn from(value: std::string::String) -> Self {
9989            Self(std::borrow::Cow::Owned(value))
9990        }
9991    }
9992
9993    /// The direction of the exchanged routes.
9994    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9995    pub struct Direction(std::borrow::Cow<'static, str>);
9996
9997    impl Direction {
9998        /// Creates a new Direction instance.
9999        pub const fn new(v: &'static str) -> Self {
10000            Self(std::borrow::Cow::Borrowed(v))
10001        }
10002
10003        /// Gets the enum value.
10004        pub fn value(&self) -> &str {
10005            &self.0
10006        }
10007    }
10008
10009    /// Useful constants to work with [Direction](Direction)
10010    pub mod direction {
10011        use super::Direction;
10012
10013        /// Unspecified exchanged routes direction. This is default.
10014        pub const DIRECTION_UNSPECIFIED: Direction = Direction::new("DIRECTION_UNSPECIFIED");
10015
10016        /// Routes imported from the peer network.
10017        pub const INCOMING: Direction = Direction::new("INCOMING");
10018
10019        /// Routes exported to the peer network.
10020        pub const OUTGOING: Direction = Direction::new("OUTGOING");
10021    }
10022
10023    impl std::convert::From<std::string::String> for Direction {
10024        fn from(value: std::string::String) -> Self {
10025            Self(std::borrow::Cow::Owned(value))
10026        }
10027    }
10028}
10029
10030/// Represents a network policy resource. Network policies are regional
10031/// resources. You can use a network policy to enable or disable internet access
10032/// and external IP access. Network policies are associated with a VMware Engine
10033/// network, which might span across regions. For a given region, a network
10034/// policy applies to all private clouds in the VMware Engine network associated
10035/// with the policy.
10036#[serde_with::serde_as]
10037#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10038#[serde(default, rename_all = "camelCase")]
10039#[non_exhaustive]
10040pub struct NetworkPolicy {
10041    /// Output only. The resource name of this network policy.
10042    /// Resource names are schemeless URIs that follow the conventions in
10043    /// <https://cloud.google.com/apis/design/resource_names>.
10044    /// For example:
10045    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
10046    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10047    pub name: std::string::String,
10048
10049    /// Output only. Creation time of this resource.
10050    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10051    pub create_time: std::option::Option<wkt::Timestamp>,
10052
10053    /// Output only. Last update time of this resource.
10054    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10055    pub update_time: std::option::Option<wkt::Timestamp>,
10056
10057    /// Network service that allows VMware workloads to access the internet.
10058    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10059    pub internet_access: std::option::Option<crate::model::network_policy::NetworkService>,
10060
10061    /// Network service that allows External IP addresses to be assigned to VMware
10062    /// workloads. This service can only be enabled when `internet_access` is also
10063    /// enabled.
10064    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10065    pub external_ip: std::option::Option<crate::model::network_policy::NetworkService>,
10066
10067    /// Required. IP address range in CIDR notation used to create internet access
10068    /// and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is
10069    /// required. The range cannot overlap with any prefixes either in the consumer
10070    /// VPC network or in use by the private clouds attached to that VPC network.
10071    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10072    pub edge_services_cidr: std::string::String,
10073
10074    /// Output only. System-generated unique identifier for the resource.
10075    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10076    pub uid: std::string::String,
10077
10078    /// Optional. The relative resource name of the VMware Engine network.
10079    /// Specify the name in the following form:
10080    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
10081    /// where `{project}` can either be a project number or a project ID.
10082    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10083    pub vmware_engine_network: std::string::String,
10084
10085    /// Optional. User-provided description for this network policy.
10086    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10087    pub description: std::string::String,
10088
10089    /// Output only. The canonical name of the VMware Engine network in the form:
10090    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
10091    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10092    pub vmware_engine_network_canonical: std::string::String,
10093}
10094
10095impl NetworkPolicy {
10096    pub fn new() -> Self {
10097        std::default::Default::default()
10098    }
10099
10100    /// Sets the value of [name][crate::model::NetworkPolicy::name].
10101    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10102        self.name = v.into();
10103        self
10104    }
10105
10106    /// Sets the value of [create_time][crate::model::NetworkPolicy::create_time].
10107    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10108        mut self,
10109        v: T,
10110    ) -> Self {
10111        self.create_time = v.into();
10112        self
10113    }
10114
10115    /// Sets the value of [update_time][crate::model::NetworkPolicy::update_time].
10116    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10117        mut self,
10118        v: T,
10119    ) -> Self {
10120        self.update_time = v.into();
10121        self
10122    }
10123
10124    /// Sets the value of [internet_access][crate::model::NetworkPolicy::internet_access].
10125    pub fn set_internet_access<
10126        T: std::convert::Into<std::option::Option<crate::model::network_policy::NetworkService>>,
10127    >(
10128        mut self,
10129        v: T,
10130    ) -> Self {
10131        self.internet_access = v.into();
10132        self
10133    }
10134
10135    /// Sets the value of [external_ip][crate::model::NetworkPolicy::external_ip].
10136    pub fn set_external_ip<
10137        T: std::convert::Into<std::option::Option<crate::model::network_policy::NetworkService>>,
10138    >(
10139        mut self,
10140        v: T,
10141    ) -> Self {
10142        self.external_ip = v.into();
10143        self
10144    }
10145
10146    /// Sets the value of [edge_services_cidr][crate::model::NetworkPolicy::edge_services_cidr].
10147    pub fn set_edge_services_cidr<T: std::convert::Into<std::string::String>>(
10148        mut self,
10149        v: T,
10150    ) -> Self {
10151        self.edge_services_cidr = v.into();
10152        self
10153    }
10154
10155    /// Sets the value of [uid][crate::model::NetworkPolicy::uid].
10156    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10157        self.uid = v.into();
10158        self
10159    }
10160
10161    /// Sets the value of [vmware_engine_network][crate::model::NetworkPolicy::vmware_engine_network].
10162    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
10163        mut self,
10164        v: T,
10165    ) -> Self {
10166        self.vmware_engine_network = v.into();
10167        self
10168    }
10169
10170    /// Sets the value of [description][crate::model::NetworkPolicy::description].
10171    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10172        self.description = v.into();
10173        self
10174    }
10175
10176    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkPolicy::vmware_engine_network_canonical].
10177    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
10178        mut self,
10179        v: T,
10180    ) -> Self {
10181        self.vmware_engine_network_canonical = v.into();
10182        self
10183    }
10184}
10185
10186impl wkt::message::Message for NetworkPolicy {
10187    fn typename() -> &'static str {
10188        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy"
10189    }
10190}
10191
10192/// Defines additional types related to NetworkPolicy
10193pub mod network_policy {
10194    #[allow(unused_imports)]
10195    use super::*;
10196
10197    /// Represents a network service that is managed by a `NetworkPolicy` resource.
10198    /// A network service provides a way to control an aspect of external access to
10199    /// VMware workloads. For example, whether the VMware workloads in the
10200    /// private clouds governed by a network policy can access or be accessed from
10201    /// the internet.
10202    #[serde_with::serde_as]
10203    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10204    #[serde(default, rename_all = "camelCase")]
10205    #[non_exhaustive]
10206    pub struct NetworkService {
10207        /// True if the service is enabled; false otherwise.
10208        pub enabled: bool,
10209
10210        /// Output only. State of the service. New values may be added to this enum
10211        /// when appropriate.
10212        pub state: crate::model::network_policy::network_service::State,
10213    }
10214
10215    impl NetworkService {
10216        pub fn new() -> Self {
10217            std::default::Default::default()
10218        }
10219
10220        /// Sets the value of [enabled][crate::model::network_policy::NetworkService::enabled].
10221        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10222            self.enabled = v.into();
10223            self
10224        }
10225
10226        /// Sets the value of [state][crate::model::network_policy::NetworkService::state].
10227        pub fn set_state<
10228            T: std::convert::Into<crate::model::network_policy::network_service::State>,
10229        >(
10230            mut self,
10231            v: T,
10232        ) -> Self {
10233            self.state = v.into();
10234            self
10235        }
10236    }
10237
10238    impl wkt::message::Message for NetworkService {
10239        fn typename() -> &'static str {
10240            "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService"
10241        }
10242    }
10243
10244    /// Defines additional types related to NetworkService
10245    pub mod network_service {
10246        #[allow(unused_imports)]
10247        use super::*;
10248
10249        /// Enum State defines possible states of a network policy controlled
10250        /// service.
10251        #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10252        pub struct State(std::borrow::Cow<'static, str>);
10253
10254        impl State {
10255            /// Creates a new State instance.
10256            pub const fn new(v: &'static str) -> Self {
10257                Self(std::borrow::Cow::Borrowed(v))
10258            }
10259
10260            /// Gets the enum value.
10261            pub fn value(&self) -> &str {
10262                &self.0
10263            }
10264        }
10265
10266        /// Useful constants to work with [State](State)
10267        pub mod state {
10268            use super::State;
10269
10270            /// Unspecified service state. This is the default value.
10271            pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
10272
10273            /// Service is not provisioned.
10274            pub const UNPROVISIONED: State = State::new("UNPROVISIONED");
10275
10276            /// Service is in the process of being provisioned/deprovisioned.
10277            pub const RECONCILING: State = State::new("RECONCILING");
10278
10279            /// Service is active.
10280            pub const ACTIVE: State = State::new("ACTIVE");
10281        }
10282
10283        impl std::convert::From<std::string::String> for State {
10284            fn from(value: std::string::String) -> Self {
10285                Self(std::borrow::Cow::Owned(value))
10286            }
10287        }
10288    }
10289}
10290
10291/// Represents a binding between a network and the management DNS zone.
10292/// A management DNS zone is the Cloud DNS cross-project binding zone that
10293/// VMware Engine creates for each private cloud. It contains FQDNs and
10294/// corresponding IP addresses for the private cloud's ESXi hosts and management
10295/// VM appliances like vCenter and NSX Manager.
10296#[serde_with::serde_as]
10297#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10298#[serde(default, rename_all = "camelCase")]
10299#[non_exhaustive]
10300pub struct ManagementDnsZoneBinding {
10301    /// Output only. The resource name of this binding.
10302    /// Resource names are schemeless URIs that follow the conventions in
10303    /// <https://cloud.google.com/apis/design/resource_names>.
10304    /// For example:
10305    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
10306    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10307    pub name: std::string::String,
10308
10309    /// Output only. Creation time of this resource.
10310    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10311    pub create_time: std::option::Option<wkt::Timestamp>,
10312
10313    /// Output only. Last update time of this resource.
10314    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10315    pub update_time: std::option::Option<wkt::Timestamp>,
10316
10317    /// Output only. The state of the resource.
10318    pub state: crate::model::management_dns_zone_binding::State,
10319
10320    /// User-provided description for this resource.
10321    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10322    pub description: std::string::String,
10323
10324    /// Output only. System-generated unique identifier for the resource.
10325    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10326    pub uid: std::string::String,
10327
10328    /// Required. The relative resource name of the network to bind to the
10329    /// management DNS zone. This network can be a consumer VPC network or a
10330    /// VMware engine network.
10331    #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
10332    pub bind_network: std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
10333}
10334
10335impl ManagementDnsZoneBinding {
10336    pub fn new() -> Self {
10337        std::default::Default::default()
10338    }
10339
10340    /// Sets the value of [name][crate::model::ManagementDnsZoneBinding::name].
10341    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10342        self.name = v.into();
10343        self
10344    }
10345
10346    /// Sets the value of [create_time][crate::model::ManagementDnsZoneBinding::create_time].
10347    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10348        mut self,
10349        v: T,
10350    ) -> Self {
10351        self.create_time = v.into();
10352        self
10353    }
10354
10355    /// Sets the value of [update_time][crate::model::ManagementDnsZoneBinding::update_time].
10356    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10357        mut self,
10358        v: T,
10359    ) -> Self {
10360        self.update_time = v.into();
10361        self
10362    }
10363
10364    /// Sets the value of [state][crate::model::ManagementDnsZoneBinding::state].
10365    pub fn set_state<T: std::convert::Into<crate::model::management_dns_zone_binding::State>>(
10366        mut self,
10367        v: T,
10368    ) -> Self {
10369        self.state = v.into();
10370        self
10371    }
10372
10373    /// Sets the value of [description][crate::model::ManagementDnsZoneBinding::description].
10374    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10375        self.description = v.into();
10376        self
10377    }
10378
10379    /// Sets the value of [uid][crate::model::ManagementDnsZoneBinding::uid].
10380    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10381        self.uid = v.into();
10382        self
10383    }
10384
10385    /// Sets the value of `bind_network`.
10386    pub fn set_bind_network<
10387        T: std::convert::Into<
10388            std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
10389        >,
10390    >(
10391        mut self,
10392        v: T,
10393    ) -> Self {
10394        self.bind_network = v.into();
10395        self
10396    }
10397
10398    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
10399    /// if it holds a `VpcNetwork`, `None` if the field is not set or
10400    /// holds a different branch.
10401    pub fn get_vpc_network(&self) -> std::option::Option<&std::string::String> {
10402        #[allow(unreachable_patterns)]
10403        self.bind_network.as_ref().and_then(|v| match v {
10404            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v) => {
10405                std::option::Option::Some(v)
10406            }
10407            _ => std::option::Option::None,
10408        })
10409    }
10410
10411    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
10412    /// if it holds a `VmwareEngineNetwork`, `None` if the field is not set or
10413    /// holds a different branch.
10414    pub fn get_vmware_engine_network(&self) -> std::option::Option<&std::string::String> {
10415        #[allow(unreachable_patterns)]
10416        self.bind_network.as_ref().and_then(|v| match v {
10417            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v) => {
10418                std::option::Option::Some(v)
10419            }
10420            _ => std::option::Option::None,
10421        })
10422    }
10423
10424    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
10425    /// to hold a `VpcNetwork`.
10426    ///
10427    /// Note that all the setters affecting `bind_network` are
10428    /// mutually exclusive.
10429    pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10430        self.bind_network = std::option::Option::Some(
10431            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v.into()),
10432        );
10433        self
10434    }
10435
10436    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
10437    /// to hold a `VmwareEngineNetwork`.
10438    ///
10439    /// Note that all the setters affecting `bind_network` are
10440    /// mutually exclusive.
10441    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
10442        mut self,
10443        v: T,
10444    ) -> Self {
10445        self.bind_network = std::option::Option::Some(
10446            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v.into()),
10447        );
10448        self
10449    }
10450}
10451
10452impl wkt::message::Message for ManagementDnsZoneBinding {
10453    fn typename() -> &'static str {
10454        "type.googleapis.com/google.cloud.vmwareengine.v1.ManagementDnsZoneBinding"
10455    }
10456}
10457
10458/// Defines additional types related to ManagementDnsZoneBinding
10459pub mod management_dns_zone_binding {
10460    #[allow(unused_imports)]
10461    use super::*;
10462
10463    /// Enum State defines possible states of binding between the consumer VPC
10464    /// network and the management DNS zone.
10465    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10466    pub struct State(std::borrow::Cow<'static, str>);
10467
10468    impl State {
10469        /// Creates a new State instance.
10470        pub const fn new(v: &'static str) -> Self {
10471            Self(std::borrow::Cow::Borrowed(v))
10472        }
10473
10474        /// Gets the enum value.
10475        pub fn value(&self) -> &str {
10476            &self.0
10477        }
10478    }
10479
10480    /// Useful constants to work with [State](State)
10481    pub mod state {
10482        use super::State;
10483
10484        /// The default value. This value should never be used.
10485        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
10486
10487        /// The binding is ready.
10488        pub const ACTIVE: State = State::new("ACTIVE");
10489
10490        /// The binding is being created.
10491        pub const CREATING: State = State::new("CREATING");
10492
10493        /// The binding is being updated.
10494        pub const UPDATING: State = State::new("UPDATING");
10495
10496        /// The binding is being deleted.
10497        pub const DELETING: State = State::new("DELETING");
10498
10499        /// The binding has failed.
10500        pub const FAILED: State = State::new("FAILED");
10501    }
10502
10503    impl std::convert::From<std::string::String> for State {
10504        fn from(value: std::string::String) -> Self {
10505            Self(std::borrow::Cow::Owned(value))
10506        }
10507    }
10508
10509    /// Required. The relative resource name of the network to bind to the
10510    /// management DNS zone. This network can be a consumer VPC network or a
10511    /// VMware engine network.
10512    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10513    #[serde(rename_all = "camelCase")]
10514    #[non_exhaustive]
10515    pub enum BindNetwork {
10516        /// Network to bind is a standard consumer VPC.
10517        /// Specify the name in the following form for consumer
10518        /// VPC network: `projects/{project}/global/networks/{network_id}`.
10519        /// `{project}` can either be a project number or a project ID.
10520        VpcNetwork(std::string::String),
10521        /// Network to bind is a VMware Engine network.
10522        /// Specify the name in the following form for VMware engine network:
10523        /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
10524        /// `{project}` can either be a project number or a project ID.
10525        VmwareEngineNetwork(std::string::String),
10526    }
10527}
10528
10529/// VMware Engine network resource that provides connectivity for VMware Engine
10530/// private clouds.
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 VmwareEngineNetwork {
10536    /// Output only. The resource name of the VMware Engine network.
10537    /// Resource names are schemeless URIs that follow the conventions in
10538    /// <https://cloud.google.com/apis/design/resource_names>.
10539    /// For example:
10540    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
10541    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10542    pub name: std::string::String,
10543
10544    /// Output only. Creation time of this resource.
10545    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10546    pub create_time: std::option::Option<wkt::Timestamp>,
10547
10548    /// Output only. Last update time of this resource.
10549    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10550    pub update_time: std::option::Option<wkt::Timestamp>,
10551
10552    /// User-provided description for this VMware Engine network.
10553    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10554    pub description: std::string::String,
10555
10556    /// Output only. VMware Engine service VPC networks that provide connectivity
10557    /// from a private cloud to customer projects, the internet, and other Google
10558    /// Cloud services.
10559    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10560    pub vpc_networks: std::vec::Vec<crate::model::vmware_engine_network::VpcNetwork>,
10561
10562    /// Output only. State of the VMware Engine network.
10563    pub state: crate::model::vmware_engine_network::State,
10564
10565    /// Required. VMware Engine network type.
10566    #[serde(rename = "type")]
10567    pub r#type: crate::model::vmware_engine_network::Type,
10568
10569    /// Output only. System-generated unique identifier for the resource.
10570    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10571    pub uid: std::string::String,
10572
10573    /// Checksum that may be sent on update and delete requests to ensure that the
10574    /// user-provided value is up to date before the server processes a request.
10575    /// The server computes checksums based on the value of other fields in the
10576    /// request.
10577    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10578    pub etag: std::string::String,
10579}
10580
10581impl VmwareEngineNetwork {
10582    pub fn new() -> Self {
10583        std::default::Default::default()
10584    }
10585
10586    /// Sets the value of [name][crate::model::VmwareEngineNetwork::name].
10587    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10588        self.name = v.into();
10589        self
10590    }
10591
10592    /// Sets the value of [create_time][crate::model::VmwareEngineNetwork::create_time].
10593    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10594        mut self,
10595        v: T,
10596    ) -> Self {
10597        self.create_time = v.into();
10598        self
10599    }
10600
10601    /// Sets the value of [update_time][crate::model::VmwareEngineNetwork::update_time].
10602    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10603        mut self,
10604        v: T,
10605    ) -> Self {
10606        self.update_time = v.into();
10607        self
10608    }
10609
10610    /// Sets the value of [description][crate::model::VmwareEngineNetwork::description].
10611    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10612        self.description = v.into();
10613        self
10614    }
10615
10616    /// Sets the value of [state][crate::model::VmwareEngineNetwork::state].
10617    pub fn set_state<T: std::convert::Into<crate::model::vmware_engine_network::State>>(
10618        mut self,
10619        v: T,
10620    ) -> Self {
10621        self.state = v.into();
10622        self
10623    }
10624
10625    /// Sets the value of [r#type][crate::model::VmwareEngineNetwork::type].
10626    pub fn set_type<T: std::convert::Into<crate::model::vmware_engine_network::Type>>(
10627        mut self,
10628        v: T,
10629    ) -> Self {
10630        self.r#type = v.into();
10631        self
10632    }
10633
10634    /// Sets the value of [uid][crate::model::VmwareEngineNetwork::uid].
10635    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10636        self.uid = v.into();
10637        self
10638    }
10639
10640    /// Sets the value of [etag][crate::model::VmwareEngineNetwork::etag].
10641    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10642        self.etag = v.into();
10643        self
10644    }
10645
10646    /// Sets the value of [vpc_networks][crate::model::VmwareEngineNetwork::vpc_networks].
10647    pub fn set_vpc_networks<T, V>(mut self, v: T) -> Self
10648    where
10649        T: std::iter::IntoIterator<Item = V>,
10650        V: std::convert::Into<crate::model::vmware_engine_network::VpcNetwork>,
10651    {
10652        use std::iter::Iterator;
10653        self.vpc_networks = v.into_iter().map(|i| i.into()).collect();
10654        self
10655    }
10656}
10657
10658impl wkt::message::Message for VmwareEngineNetwork {
10659    fn typename() -> &'static str {
10660        "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork"
10661    }
10662}
10663
10664/// Defines additional types related to VmwareEngineNetwork
10665pub mod vmware_engine_network {
10666    #[allow(unused_imports)]
10667    use super::*;
10668
10669    /// Represents a VMware Engine VPC network that is managed by a
10670    /// VMware Engine network resource.
10671    #[serde_with::serde_as]
10672    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10673    #[serde(default, rename_all = "camelCase")]
10674    #[non_exhaustive]
10675    pub struct VpcNetwork {
10676        /// Output only. Type of VPC network (INTRANET, INTERNET, or
10677        /// GOOGLE_CLOUD)
10678        #[serde(rename = "type")]
10679        pub r#type: crate::model::vmware_engine_network::vpc_network::Type,
10680
10681        /// Output only. The relative resource name of the service VPC network this
10682        /// VMware Engine network is attached to. For example:
10683        /// `projects/123123/global/networks/my-network`
10684        #[serde(skip_serializing_if = "std::string::String::is_empty")]
10685        pub network: std::string::String,
10686    }
10687
10688    impl VpcNetwork {
10689        pub fn new() -> Self {
10690            std::default::Default::default()
10691        }
10692
10693        /// Sets the value of [r#type][crate::model::vmware_engine_network::VpcNetwork::type].
10694        pub fn set_type<
10695            T: std::convert::Into<crate::model::vmware_engine_network::vpc_network::Type>,
10696        >(
10697            mut self,
10698            v: T,
10699        ) -> Self {
10700            self.r#type = v.into();
10701            self
10702        }
10703
10704        /// Sets the value of [network][crate::model::vmware_engine_network::VpcNetwork::network].
10705        pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10706            self.network = v.into();
10707            self
10708        }
10709    }
10710
10711    impl wkt::message::Message for VpcNetwork {
10712        fn typename() -> &'static str {
10713            "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork"
10714        }
10715    }
10716
10717    /// Defines additional types related to VpcNetwork
10718    pub mod vpc_network {
10719        #[allow(unused_imports)]
10720        use super::*;
10721
10722        /// Enum Type defines possible types of a VMware Engine network controlled
10723        /// service.
10724        #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10725        pub struct Type(std::borrow::Cow<'static, str>);
10726
10727        impl Type {
10728            /// Creates a new Type instance.
10729            pub const fn new(v: &'static str) -> Self {
10730                Self(std::borrow::Cow::Borrowed(v))
10731            }
10732
10733            /// Gets the enum value.
10734            pub fn value(&self) -> &str {
10735                &self.0
10736            }
10737        }
10738
10739        /// Useful constants to work with [Type](Type)
10740        pub mod r#type {
10741            use super::Type;
10742
10743            /// The default value. This value should never be used.
10744            pub const TYPE_UNSPECIFIED: Type = Type::new("TYPE_UNSPECIFIED");
10745
10746            /// VPC network that will be peered with a consumer VPC network or the
10747            /// intranet VPC of another VMware Engine network. Access a private cloud
10748            /// through Compute Engine VMs on a peered VPC network or an on-premises
10749            /// resource connected to a peered consumer VPC network.
10750            pub const INTRANET: Type = Type::new("INTRANET");
10751
10752            /// VPC network used for internet access to and from a private cloud.
10753            pub const INTERNET: Type = Type::new("INTERNET");
10754
10755            /// VPC network used for access to Google Cloud services like
10756            /// Cloud Storage.
10757            pub const GOOGLE_CLOUD: Type = Type::new("GOOGLE_CLOUD");
10758        }
10759
10760        impl std::convert::From<std::string::String> for Type {
10761            fn from(value: std::string::String) -> Self {
10762                Self(std::borrow::Cow::Owned(value))
10763            }
10764        }
10765    }
10766
10767    /// Enum State defines possible states of VMware Engine network.
10768    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10769    pub struct State(std::borrow::Cow<'static, str>);
10770
10771    impl State {
10772        /// Creates a new State instance.
10773        pub const fn new(v: &'static str) -> Self {
10774            Self(std::borrow::Cow::Borrowed(v))
10775        }
10776
10777        /// Gets the enum value.
10778        pub fn value(&self) -> &str {
10779            &self.0
10780        }
10781    }
10782
10783    /// Useful constants to work with [State](State)
10784    pub mod state {
10785        use super::State;
10786
10787        /// The default value. This value is used if the state is omitted.
10788        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
10789
10790        /// The VMware Engine network is being created.
10791        pub const CREATING: State = State::new("CREATING");
10792
10793        /// The VMware Engine network is ready.
10794        pub const ACTIVE: State = State::new("ACTIVE");
10795
10796        /// The VMware Engine network is being updated.
10797        pub const UPDATING: State = State::new("UPDATING");
10798
10799        /// The VMware Engine network is being deleted.
10800        pub const DELETING: State = State::new("DELETING");
10801    }
10802
10803    impl std::convert::From<std::string::String> for State {
10804        fn from(value: std::string::String) -> Self {
10805            Self(std::borrow::Cow::Owned(value))
10806        }
10807    }
10808
10809    /// Enum Type defines possible types of VMware Engine network.
10810    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10811    pub struct Type(std::borrow::Cow<'static, str>);
10812
10813    impl Type {
10814        /// Creates a new Type instance.
10815        pub const fn new(v: &'static str) -> Self {
10816            Self(std::borrow::Cow::Borrowed(v))
10817        }
10818
10819        /// Gets the enum value.
10820        pub fn value(&self) -> &str {
10821            &self.0
10822        }
10823    }
10824
10825    /// Useful constants to work with [Type](Type)
10826    pub mod r#type {
10827        use super::Type;
10828
10829        /// The default value. This value should never be used.
10830        pub const TYPE_UNSPECIFIED: Type = Type::new("TYPE_UNSPECIFIED");
10831
10832        /// Network type used by private clouds created in projects without a network
10833        /// of type `STANDARD`. This network type is no longer used for new VMware
10834        /// Engine private cloud deployments.
10835        pub const LEGACY: Type = Type::new("LEGACY");
10836
10837        /// Standard network type used for private cloud connectivity.
10838        pub const STANDARD: Type = Type::new("STANDARD");
10839    }
10840
10841    impl std::convert::From<std::string::String> for Type {
10842        fn from(value: std::string::String) -> Self {
10843            Self(std::borrow::Cow::Owned(value))
10844        }
10845    }
10846}
10847
10848/// Private connection resource that provides connectivity for VMware Engine
10849/// private clouds.
10850#[serde_with::serde_as]
10851#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10852#[serde(default, rename_all = "camelCase")]
10853#[non_exhaustive]
10854pub struct PrivateConnection {
10855    /// Output only. The resource name of the private connection.
10856    /// Resource names are schemeless URIs that follow the conventions in
10857    /// <https://cloud.google.com/apis/design/resource_names>.
10858    /// For example:
10859    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
10860    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10861    pub name: std::string::String,
10862
10863    /// Output only. Creation time of this resource.
10864    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10865    pub create_time: std::option::Option<wkt::Timestamp>,
10866
10867    /// Output only. Last update time of this resource.
10868    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10869    pub update_time: std::option::Option<wkt::Timestamp>,
10870
10871    /// Optional. User-provided description for this private connection.
10872    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10873    pub description: std::string::String,
10874
10875    /// Output only. State of the private connection.
10876    pub state: crate::model::private_connection::State,
10877
10878    /// Required. The relative resource name of Legacy VMware Engine network.
10879    /// Specify the name in the following form:
10880    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
10881    /// where `{project}`, `{location}` will be same as specified in private
10882    /// connection resource name and `{vmware_engine_network_id}` will be in the
10883    /// form of `{location}`-default e.g.
10884    /// projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default.
10885    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10886    pub vmware_engine_network: std::string::String,
10887
10888    /// Output only. The canonical name of the VMware Engine network in the form:
10889    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
10890    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10891    pub vmware_engine_network_canonical: std::string::String,
10892
10893    /// Required. Private connection type.
10894    #[serde(rename = "type")]
10895    pub r#type: crate::model::private_connection::Type,
10896
10897    /// Output only. VPC network peering id between given network VPC and
10898    /// VMwareEngineNetwork.
10899    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10900    pub peering_id: std::string::String,
10901
10902    /// Optional. Routing Mode.
10903    /// Default value is set to GLOBAL.
10904    /// For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or
10905    /// REGIONAL, for other types only GLOBAL is supported.
10906    pub routing_mode: crate::model::private_connection::RoutingMode,
10907
10908    /// Output only. System-generated unique identifier for the resource.
10909    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10910    pub uid: std::string::String,
10911
10912    /// Required. Service network to create private connection.
10913    /// Specify the name in the following form:
10914    /// `projects/{project}/global/networks/{network_id}`
10915    /// For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking
10916    /// VPC, e.g. projects/project-tp/global/networks/servicenetworking.
10917    /// For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC,
10918    /// e.g. projects/project-tp/global/networks/netapp-tenant-vpc.
10919    /// For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g.
10920    /// projects/project-tp/global/networks/dell-tenant-vpc.
10921    /// For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or
10922    /// any other producer VPC to which the VMware Engine Network needs to be
10923    /// connected, e.g. projects/project/global/networks/vpc.
10924    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10925    pub service_network: std::string::String,
10926
10927    /// Output only. Peering state between service network and VMware Engine
10928    /// network.
10929    pub peering_state: crate::model::private_connection::PeeringState,
10930}
10931
10932impl PrivateConnection {
10933    pub fn new() -> Self {
10934        std::default::Default::default()
10935    }
10936
10937    /// Sets the value of [name][crate::model::PrivateConnection::name].
10938    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10939        self.name = v.into();
10940        self
10941    }
10942
10943    /// Sets the value of [create_time][crate::model::PrivateConnection::create_time].
10944    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10945        mut self,
10946        v: T,
10947    ) -> Self {
10948        self.create_time = v.into();
10949        self
10950    }
10951
10952    /// Sets the value of [update_time][crate::model::PrivateConnection::update_time].
10953    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10954        mut self,
10955        v: T,
10956    ) -> Self {
10957        self.update_time = v.into();
10958        self
10959    }
10960
10961    /// Sets the value of [description][crate::model::PrivateConnection::description].
10962    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10963        self.description = v.into();
10964        self
10965    }
10966
10967    /// Sets the value of [state][crate::model::PrivateConnection::state].
10968    pub fn set_state<T: std::convert::Into<crate::model::private_connection::State>>(
10969        mut self,
10970        v: T,
10971    ) -> Self {
10972        self.state = v.into();
10973        self
10974    }
10975
10976    /// Sets the value of [vmware_engine_network][crate::model::PrivateConnection::vmware_engine_network].
10977    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
10978        mut self,
10979        v: T,
10980    ) -> Self {
10981        self.vmware_engine_network = v.into();
10982        self
10983    }
10984
10985    /// Sets the value of [vmware_engine_network_canonical][crate::model::PrivateConnection::vmware_engine_network_canonical].
10986    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
10987        mut self,
10988        v: T,
10989    ) -> Self {
10990        self.vmware_engine_network_canonical = v.into();
10991        self
10992    }
10993
10994    /// Sets the value of [r#type][crate::model::PrivateConnection::type].
10995    pub fn set_type<T: std::convert::Into<crate::model::private_connection::Type>>(
10996        mut self,
10997        v: T,
10998    ) -> Self {
10999        self.r#type = v.into();
11000        self
11001    }
11002
11003    /// Sets the value of [peering_id][crate::model::PrivateConnection::peering_id].
11004    pub fn set_peering_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11005        self.peering_id = v.into();
11006        self
11007    }
11008
11009    /// Sets the value of [routing_mode][crate::model::PrivateConnection::routing_mode].
11010    pub fn set_routing_mode<
11011        T: std::convert::Into<crate::model::private_connection::RoutingMode>,
11012    >(
11013        mut self,
11014        v: T,
11015    ) -> Self {
11016        self.routing_mode = v.into();
11017        self
11018    }
11019
11020    /// Sets the value of [uid][crate::model::PrivateConnection::uid].
11021    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11022        self.uid = v.into();
11023        self
11024    }
11025
11026    /// Sets the value of [service_network][crate::model::PrivateConnection::service_network].
11027    pub fn set_service_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11028        self.service_network = v.into();
11029        self
11030    }
11031
11032    /// Sets the value of [peering_state][crate::model::PrivateConnection::peering_state].
11033    pub fn set_peering_state<
11034        T: std::convert::Into<crate::model::private_connection::PeeringState>,
11035    >(
11036        mut self,
11037        v: T,
11038    ) -> Self {
11039        self.peering_state = v.into();
11040        self
11041    }
11042}
11043
11044impl wkt::message::Message for PrivateConnection {
11045    fn typename() -> &'static str {
11046        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateConnection"
11047    }
11048}
11049
11050/// Defines additional types related to PrivateConnection
11051pub mod private_connection {
11052    #[allow(unused_imports)]
11053    use super::*;
11054
11055    /// Enum State defines possible states of private connection.
11056    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11057    pub struct State(std::borrow::Cow<'static, str>);
11058
11059    impl State {
11060        /// Creates a new State instance.
11061        pub const fn new(v: &'static str) -> Self {
11062            Self(std::borrow::Cow::Borrowed(v))
11063        }
11064
11065        /// Gets the enum value.
11066        pub fn value(&self) -> &str {
11067            &self.0
11068        }
11069    }
11070
11071    /// Useful constants to work with [State](State)
11072    pub mod state {
11073        use super::State;
11074
11075        /// The default value. This value is used if the state is omitted.
11076        pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
11077
11078        /// The private connection is being created.
11079        pub const CREATING: State = State::new("CREATING");
11080
11081        /// The private connection is ready.
11082        pub const ACTIVE: State = State::new("ACTIVE");
11083
11084        /// The private connection is being updated.
11085        pub const UPDATING: State = State::new("UPDATING");
11086
11087        /// The private connection is being deleted.
11088        pub const DELETING: State = State::new("DELETING");
11089
11090        /// The private connection is not provisioned, since no private cloud is
11091        /// present for which this private connection is needed.
11092        pub const UNPROVISIONED: State = State::new("UNPROVISIONED");
11093
11094        /// The private connection is in failed state.
11095        pub const FAILED: State = State::new("FAILED");
11096    }
11097
11098    impl std::convert::From<std::string::String> for State {
11099        fn from(value: std::string::String) -> Self {
11100            Self(std::borrow::Cow::Owned(value))
11101        }
11102    }
11103
11104    /// Enum Type defines possible types of private connection.
11105    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11106    pub struct Type(std::borrow::Cow<'static, str>);
11107
11108    impl Type {
11109        /// Creates a new Type instance.
11110        pub const fn new(v: &'static str) -> Self {
11111            Self(std::borrow::Cow::Borrowed(v))
11112        }
11113
11114        /// Gets the enum value.
11115        pub fn value(&self) -> &str {
11116            &self.0
11117        }
11118    }
11119
11120    /// Useful constants to work with [Type](Type)
11121    pub mod r#type {
11122        use super::Type;
11123
11124        /// The default value. This value should never be used.
11125        pub const TYPE_UNSPECIFIED: Type = Type::new("TYPE_UNSPECIFIED");
11126
11127        /// Connection used for establishing [private services
11128        /// access](https://cloud.google.com/vpc/docs/private-services-access).
11129        pub const PRIVATE_SERVICE_ACCESS: Type = Type::new("PRIVATE_SERVICE_ACCESS");
11130
11131        /// Connection used for connecting to NetApp Cloud Volumes.
11132        pub const NETAPP_CLOUD_VOLUMES: Type = Type::new("NETAPP_CLOUD_VOLUMES");
11133
11134        /// Connection used for connecting to Dell PowerScale.
11135        pub const DELL_POWERSCALE: Type = Type::new("DELL_POWERSCALE");
11136
11137        /// Connection used for connecting to third-party services.
11138        pub const THIRD_PARTY_SERVICE: Type = Type::new("THIRD_PARTY_SERVICE");
11139    }
11140
11141    impl std::convert::From<std::string::String> for Type {
11142        fn from(value: std::string::String) -> Self {
11143            Self(std::borrow::Cow::Owned(value))
11144        }
11145    }
11146
11147    /// Possible types for RoutingMode
11148    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11149    pub struct RoutingMode(std::borrow::Cow<'static, str>);
11150
11151    impl RoutingMode {
11152        /// Creates a new RoutingMode instance.
11153        pub const fn new(v: &'static str) -> Self {
11154            Self(std::borrow::Cow::Borrowed(v))
11155        }
11156
11157        /// Gets the enum value.
11158        pub fn value(&self) -> &str {
11159            &self.0
11160        }
11161    }
11162
11163    /// Useful constants to work with [RoutingMode](RoutingMode)
11164    pub mod routing_mode {
11165        use super::RoutingMode;
11166
11167        /// The default value. This value should never be used.
11168        pub const ROUTING_MODE_UNSPECIFIED: RoutingMode =
11169            RoutingMode::new("ROUTING_MODE_UNSPECIFIED");
11170
11171        /// Global Routing Mode
11172        pub const GLOBAL: RoutingMode = RoutingMode::new("GLOBAL");
11173
11174        /// Regional Routing Mode
11175        pub const REGIONAL: RoutingMode = RoutingMode::new("REGIONAL");
11176    }
11177
11178    impl std::convert::From<std::string::String> for RoutingMode {
11179        fn from(value: std::string::String) -> Self {
11180            Self(std::borrow::Cow::Owned(value))
11181        }
11182    }
11183
11184    /// Enum PeeringState defines the possible states of peering between service
11185    /// network and the vpc network peered to service network
11186    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11187    pub struct PeeringState(std::borrow::Cow<'static, str>);
11188
11189    impl PeeringState {
11190        /// Creates a new PeeringState instance.
11191        pub const fn new(v: &'static str) -> Self {
11192            Self(std::borrow::Cow::Borrowed(v))
11193        }
11194
11195        /// Gets the enum value.
11196        pub fn value(&self) -> &str {
11197            &self.0
11198        }
11199    }
11200
11201    /// Useful constants to work with [PeeringState](PeeringState)
11202    pub mod peering_state {
11203        use super::PeeringState;
11204
11205        /// The default value. This value is used if the peering state is omitted or
11206        /// unknown.
11207        pub const PEERING_STATE_UNSPECIFIED: PeeringState =
11208            PeeringState::new("PEERING_STATE_UNSPECIFIED");
11209
11210        /// The peering is in active state.
11211        pub const PEERING_ACTIVE: PeeringState = PeeringState::new("PEERING_ACTIVE");
11212
11213        /// The peering is in inactive state.
11214        pub const PEERING_INACTIVE: PeeringState = PeeringState::new("PEERING_INACTIVE");
11215    }
11216
11217    impl std::convert::From<std::string::String> for PeeringState {
11218        fn from(value: std::string::String) -> Self {
11219            Self(std::borrow::Cow::Owned(value))
11220        }
11221    }
11222}
11223
11224/// VmwareEngine specific metadata for the given
11225/// [google.cloud.location.Location][google.cloud.location.Location]. It is
11226/// returned as a content of the `google.cloud.location.Location.metadata` field.
11227///
11228/// [google.cloud.location.Location]: location::model::Location
11229#[serde_with::serde_as]
11230#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11231#[serde(default, rename_all = "camelCase")]
11232#[non_exhaustive]
11233pub struct LocationMetadata {
11234    /// Output only. Capabilities of this location.
11235    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11236    pub capabilities: std::vec::Vec<crate::model::location_metadata::Capability>,
11237}
11238
11239impl LocationMetadata {
11240    pub fn new() -> Self {
11241        std::default::Default::default()
11242    }
11243
11244    /// Sets the value of [capabilities][crate::model::LocationMetadata::capabilities].
11245    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
11246    where
11247        T: std::iter::IntoIterator<Item = V>,
11248        V: std::convert::Into<crate::model::location_metadata::Capability>,
11249    {
11250        use std::iter::Iterator;
11251        self.capabilities = v.into_iter().map(|i| i.into()).collect();
11252        self
11253    }
11254}
11255
11256impl wkt::message::Message for LocationMetadata {
11257    fn typename() -> &'static str {
11258        "type.googleapis.com/google.cloud.vmwareengine.v1.LocationMetadata"
11259    }
11260}
11261
11262/// Defines additional types related to LocationMetadata
11263pub mod location_metadata {
11264    #[allow(unused_imports)]
11265    use super::*;
11266
11267    /// Capability of a location.
11268    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11269    pub struct Capability(std::borrow::Cow<'static, str>);
11270
11271    impl Capability {
11272        /// Creates a new Capability instance.
11273        pub const fn new(v: &'static str) -> Self {
11274            Self(std::borrow::Cow::Borrowed(v))
11275        }
11276
11277        /// Gets the enum value.
11278        pub fn value(&self) -> &str {
11279            &self.0
11280        }
11281    }
11282
11283    /// Useful constants to work with [Capability](Capability)
11284    pub mod capability {
11285        use super::Capability;
11286
11287        /// The default value. This value is used if the capability is omitted or
11288        /// unknown.
11289        pub const CAPABILITY_UNSPECIFIED: Capability = Capability::new("CAPABILITY_UNSPECIFIED");
11290
11291        /// Stretch clusters are supported in this location.
11292        pub const STRETCHED_CLUSTERS: Capability = Capability::new("STRETCHED_CLUSTERS");
11293    }
11294
11295    impl std::convert::From<std::string::String> for Capability {
11296        fn from(value: std::string::String) -> Self {
11297            Self(std::borrow::Cow::Owned(value))
11298        }
11299    }
11300}
11301
11302/// DnsBindPermission resource that contains the accounts having the consumer DNS
11303/// bind permission on the corresponding intranet VPC of the consumer project.
11304#[serde_with::serde_as]
11305#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11306#[serde(default, rename_all = "camelCase")]
11307#[non_exhaustive]
11308pub struct DnsBindPermission {
11309    /// Required. Output only. The name of the resource which stores the
11310    /// users/service accounts having the permission to bind to the corresponding
11311    /// intranet VPC of the consumer project. DnsBindPermission is a global
11312    /// resource and location can only be global. Resource names are schemeless
11313    /// URIs that follow the conventions in
11314    /// <https://cloud.google.com/apis/design/resource_names>. For example:
11315    /// `projects/my-project/locations/global/dnsBindPermission`
11316    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11317    pub name: std::string::String,
11318
11319    /// Output only. Users/Service accounts which have access for binding on the
11320    /// intranet VPC project corresponding to the consumer project.
11321    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11322    pub principals: std::vec::Vec<crate::model::Principal>,
11323}
11324
11325impl DnsBindPermission {
11326    pub fn new() -> Self {
11327        std::default::Default::default()
11328    }
11329
11330    /// Sets the value of [name][crate::model::DnsBindPermission::name].
11331    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11332        self.name = v.into();
11333        self
11334    }
11335
11336    /// Sets the value of [principals][crate::model::DnsBindPermission::principals].
11337    pub fn set_principals<T, V>(mut self, v: T) -> Self
11338    where
11339        T: std::iter::IntoIterator<Item = V>,
11340        V: std::convert::Into<crate::model::Principal>,
11341    {
11342        use std::iter::Iterator;
11343        self.principals = v.into_iter().map(|i| i.into()).collect();
11344        self
11345    }
11346}
11347
11348impl wkt::message::Message for DnsBindPermission {
11349    fn typename() -> &'static str {
11350        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsBindPermission"
11351    }
11352}
11353
11354/// Users/Service accounts which have access for DNS binding on the intranet
11355/// VPC corresponding to the consumer project.
11356#[serde_with::serde_as]
11357#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11358#[serde(default, rename_all = "camelCase")]
11359#[non_exhaustive]
11360pub struct Principal {
11361    /// The consumer provided user/service account which needs to be
11362    /// granted permission to DNS bind with the intranet VPC corresponding to the
11363    /// consumer project.
11364    #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
11365    pub principal: std::option::Option<crate::model::principal::Principal>,
11366}
11367
11368impl Principal {
11369    pub fn new() -> Self {
11370        std::default::Default::default()
11371    }
11372
11373    /// Sets the value of `principal`.
11374    pub fn set_principal<
11375        T: std::convert::Into<std::option::Option<crate::model::principal::Principal>>,
11376    >(
11377        mut self,
11378        v: T,
11379    ) -> Self {
11380        self.principal = v.into();
11381        self
11382    }
11383
11384    /// The value of [principal][crate::model::Principal::principal]
11385    /// if it holds a `User`, `None` if the field is not set or
11386    /// holds a different branch.
11387    pub fn get_user(&self) -> std::option::Option<&std::string::String> {
11388        #[allow(unreachable_patterns)]
11389        self.principal.as_ref().and_then(|v| match v {
11390            crate::model::principal::Principal::User(v) => std::option::Option::Some(v),
11391            _ => std::option::Option::None,
11392        })
11393    }
11394
11395    /// The value of [principal][crate::model::Principal::principal]
11396    /// if it holds a `ServiceAccount`, `None` if the field is not set or
11397    /// holds a different branch.
11398    pub fn get_service_account(&self) -> std::option::Option<&std::string::String> {
11399        #[allow(unreachable_patterns)]
11400        self.principal.as_ref().and_then(|v| match v {
11401            crate::model::principal::Principal::ServiceAccount(v) => std::option::Option::Some(v),
11402            _ => std::option::Option::None,
11403        })
11404    }
11405
11406    /// Sets the value of [principal][crate::model::Principal::principal]
11407    /// to hold a `User`.
11408    ///
11409    /// Note that all the setters affecting `principal` are
11410    /// mutually exclusive.
11411    pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11412        self.principal =
11413            std::option::Option::Some(crate::model::principal::Principal::User(v.into()));
11414        self
11415    }
11416
11417    /// Sets the value of [principal][crate::model::Principal::principal]
11418    /// to hold a `ServiceAccount`.
11419    ///
11420    /// Note that all the setters affecting `principal` are
11421    /// mutually exclusive.
11422    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11423        self.principal =
11424            std::option::Option::Some(crate::model::principal::Principal::ServiceAccount(v.into()));
11425        self
11426    }
11427}
11428
11429impl wkt::message::Message for Principal {
11430    fn typename() -> &'static str {
11431        "type.googleapis.com/google.cloud.vmwareengine.v1.Principal"
11432    }
11433}
11434
11435/// Defines additional types related to Principal
11436pub mod principal {
11437    #[allow(unused_imports)]
11438    use super::*;
11439
11440    /// The consumer provided user/service account which needs to be
11441    /// granted permission to DNS bind with the intranet VPC corresponding to the
11442    /// consumer project.
11443    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11444    #[serde(rename_all = "camelCase")]
11445    #[non_exhaustive]
11446    pub enum Principal {
11447        /// The user who needs to be granted permission.
11448        User(std::string::String),
11449        /// The service account which needs to be granted the permission.
11450        ServiceAccount(std::string::String),
11451    }
11452}