google_cloud_vmwareengine_v1/
model.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::redundant_explicit_links)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![no_implicit_prelude]
20extern crate async_trait;
21extern crate bytes;
22extern crate gax;
23extern crate gaxi;
24extern crate iam_v1;
25extern crate lazy_static;
26extern crate location;
27extern crate longrunning;
28extern crate lro;
29extern crate reqwest;
30extern crate serde;
31extern crate serde_json;
32extern crate serde_with;
33extern crate std;
34extern crate tracing;
35extern crate wkt;
36
37/// Request message for
38/// [VmwareEngine.ListPrivateClouds][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]
39///
40/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]: crate::client::VmwareEngine::list_private_clouds
41#[serde_with::serde_as]
42#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
43#[serde(default, rename_all = "camelCase")]
44#[non_exhaustive]
45pub struct ListPrivateCloudsRequest {
46    /// Required. The resource name of the private cloud to be queried for
47    /// clusters. Resource names are schemeless URIs that follow the conventions in
48    /// <https://cloud.google.com/apis/design/resource_names>.
49    /// For example:
50    /// `projects/my-project/locations/us-central1-a`
51    #[serde(skip_serializing_if = "std::string::String::is_empty")]
52    pub parent: std::string::String,
53
54    /// The maximum number of private clouds to return in one page.
55    /// The service may return fewer than this value.
56    /// The maximum value is coerced to 1000.
57    /// The default value of this field is 500.
58    pub page_size: i32,
59
60    /// A page token, received from a previous `ListPrivateClouds` call.
61    /// Provide this to retrieve the subsequent page.
62    ///
63    /// When paginating, all other parameters provided to `ListPrivateClouds` must
64    /// match the call that provided the page token.
65    #[serde(skip_serializing_if = "std::string::String::is_empty")]
66    pub page_token: std::string::String,
67
68    /// A filter expression that matches resources returned in the response.
69    /// The expression must specify the field name, a comparison operator, and the
70    /// value that you want to use for filtering. The value must be a string, a
71    /// number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or
72    /// `<`.
73    ///
74    /// For example, if you are filtering a list of private clouds, you can exclude
75    /// the ones named `example-pc` by specifying `name != "example-pc"`.
76    ///
77    /// You can also filter nested fields. For example, you could specify
78    /// `networkConfig.managementCidr = "192.168.0.0/24"` to include private clouds
79    /// only if they have a matching address in their network configuration.
80    ///
81    /// To filter on multiple expressions, provide each separate expression within
82    /// parentheses. For example:
83    ///
84    /// ```norust
85    /// (name = "example-pc")
86    /// (createTime > "2021-04-12T08:15:10.40Z")
87    /// ```
88    ///
89    /// By default, each expression is an `AND` expression. However, you can
90    /// include `AND` and `OR` expressions explicitly. For example:
91    ///
92    /// ```norust
93    /// (name = "private-cloud-1") AND
94    /// (createTime > "2021-04-12T08:15:10.40Z") OR
95    /// (name = "private-cloud-2")
96    /// ```
97    #[serde(skip_serializing_if = "std::string::String::is_empty")]
98    pub filter: std::string::String,
99
100    /// Sorts list results by a certain order. By default, returned results are
101    /// ordered by `name` in ascending order. You can also sort results in
102    /// descending order based on the `name` value using `orderBy="name desc"`.
103    /// Currently, only ordering by `name` is supported.
104    #[serde(skip_serializing_if = "std::string::String::is_empty")]
105    pub order_by: std::string::String,
106
107    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
108    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
109}
110
111impl ListPrivateCloudsRequest {
112    pub fn new() -> Self {
113        std::default::Default::default()
114    }
115
116    /// Sets the value of [parent][crate::model::ListPrivateCloudsRequest::parent].
117    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
118        self.parent = v.into();
119        self
120    }
121
122    /// Sets the value of [page_size][crate::model::ListPrivateCloudsRequest::page_size].
123    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
124        self.page_size = v.into();
125        self
126    }
127
128    /// Sets the value of [page_token][crate::model::ListPrivateCloudsRequest::page_token].
129    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
130        self.page_token = v.into();
131        self
132    }
133
134    /// Sets the value of [filter][crate::model::ListPrivateCloudsRequest::filter].
135    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
136        self.filter = v.into();
137        self
138    }
139
140    /// Sets the value of [order_by][crate::model::ListPrivateCloudsRequest::order_by].
141    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
142        self.order_by = v.into();
143        self
144    }
145}
146
147impl wkt::message::Message for ListPrivateCloudsRequest {
148    fn typename() -> &'static str {
149        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsRequest"
150    }
151}
152
153/// Response message for
154/// [VmwareEngine.ListPrivateClouds][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]
155///
156/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]: crate::client::VmwareEngine::list_private_clouds
157#[serde_with::serde_as]
158#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
159#[serde(default, rename_all = "camelCase")]
160#[non_exhaustive]
161pub struct ListPrivateCloudsResponse {
162    /// A list of private clouds.
163    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
164    pub private_clouds: std::vec::Vec<crate::model::PrivateCloud>,
165
166    /// A token, which can be sent as `page_token` to retrieve the next page.
167    /// If this field is omitted, there are no subsequent pages.
168    #[serde(skip_serializing_if = "std::string::String::is_empty")]
169    pub next_page_token: std::string::String,
170
171    /// Locations that could not be reached when making an aggregated query using
172    /// wildcards.
173    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
174    pub unreachable: std::vec::Vec<std::string::String>,
175
176    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
177    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
178}
179
180impl ListPrivateCloudsResponse {
181    pub fn new() -> Self {
182        std::default::Default::default()
183    }
184
185    /// Sets the value of [next_page_token][crate::model::ListPrivateCloudsResponse::next_page_token].
186    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
187        self.next_page_token = v.into();
188        self
189    }
190
191    /// Sets the value of [private_clouds][crate::model::ListPrivateCloudsResponse::private_clouds].
192    pub fn set_private_clouds<T, V>(mut self, v: T) -> Self
193    where
194        T: std::iter::IntoIterator<Item = V>,
195        V: std::convert::Into<crate::model::PrivateCloud>,
196    {
197        use std::iter::Iterator;
198        self.private_clouds = v.into_iter().map(|i| i.into()).collect();
199        self
200    }
201
202    /// Sets the value of [unreachable][crate::model::ListPrivateCloudsResponse::unreachable].
203    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
204    where
205        T: std::iter::IntoIterator<Item = V>,
206        V: std::convert::Into<std::string::String>,
207    {
208        use std::iter::Iterator;
209        self.unreachable = v.into_iter().map(|i| i.into()).collect();
210        self
211    }
212}
213
214impl wkt::message::Message for ListPrivateCloudsResponse {
215    fn typename() -> &'static str {
216        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsResponse"
217    }
218}
219
220#[doc(hidden)]
221impl gax::paginator::internal::PageableResponse for ListPrivateCloudsResponse {
222    type PageItem = crate::model::PrivateCloud;
223
224    fn items(self) -> std::vec::Vec<Self::PageItem> {
225        self.private_clouds
226    }
227
228    fn next_page_token(&self) -> std::string::String {
229        use std::clone::Clone;
230        self.next_page_token.clone()
231    }
232}
233
234/// Request message for
235/// [VmwareEngine.GetPrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateCloud]
236///
237/// [google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateCloud]: crate::client::VmwareEngine::get_private_cloud
238#[serde_with::serde_as]
239#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
240#[serde(default, rename_all = "camelCase")]
241#[non_exhaustive]
242pub struct GetPrivateCloudRequest {
243    /// Required. The resource name of the private cloud to retrieve.
244    /// Resource names are schemeless URIs that follow the conventions in
245    /// <https://cloud.google.com/apis/design/resource_names>.
246    /// For example:
247    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
248    #[serde(skip_serializing_if = "std::string::String::is_empty")]
249    pub name: std::string::String,
250
251    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
252    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
253}
254
255impl GetPrivateCloudRequest {
256    pub fn new() -> Self {
257        std::default::Default::default()
258    }
259
260    /// Sets the value of [name][crate::model::GetPrivateCloudRequest::name].
261    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
262        self.name = v.into();
263        self
264    }
265}
266
267impl wkt::message::Message for GetPrivateCloudRequest {
268    fn typename() -> &'static str {
269        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateCloudRequest"
270    }
271}
272
273/// Request message for
274/// [VmwareEngine.CreatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]
275///
276/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]: crate::client::VmwareEngine::create_private_cloud
277#[serde_with::serde_as]
278#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
279#[serde(default, rename_all = "camelCase")]
280#[non_exhaustive]
281pub struct CreatePrivateCloudRequest {
282    /// Required. The resource name of the location to create the new
283    /// private cloud in. Resource names are schemeless URIs that follow the
284    /// conventions in <https://cloud.google.com/apis/design/resource_names>.
285    /// For example:
286    /// `projects/my-project/locations/us-central1-a`
287    #[serde(skip_serializing_if = "std::string::String::is_empty")]
288    pub parent: std::string::String,
289
290    /// Required. The user-provided identifier of the private cloud to be created.
291    /// This identifier must be unique among each `PrivateCloud` within the parent
292    /// and becomes the final token in the name URI.
293    /// The identifier must meet the following requirements:
294    ///
295    /// * Only contains 1-63 alphanumeric characters and hyphens
296    /// * Begins with an alphabetical character
297    /// * Ends with a non-hyphen character
298    /// * Not formatted as a UUID
299    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
300    ///   (section 3.5)
301    #[serde(skip_serializing_if = "std::string::String::is_empty")]
302    pub private_cloud_id: std::string::String,
303
304    /// Required. The initial description of the new private cloud.
305    #[serde(skip_serializing_if = "std::option::Option::is_none")]
306    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
307
308    /// Optional. The request ID must be a valid UUID with the exception that zero
309    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
310    #[serde(skip_serializing_if = "std::string::String::is_empty")]
311    pub request_id: std::string::String,
312
313    /// Optional. True if you want the request to be validated and not executed;
314    /// false otherwise.
315    pub validate_only: bool,
316
317    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
318    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
319}
320
321impl CreatePrivateCloudRequest {
322    pub fn new() -> Self {
323        std::default::Default::default()
324    }
325
326    /// Sets the value of [parent][crate::model::CreatePrivateCloudRequest::parent].
327    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
328        self.parent = v.into();
329        self
330    }
331
332    /// Sets the value of [private_cloud_id][crate::model::CreatePrivateCloudRequest::private_cloud_id].
333    pub fn set_private_cloud_id<T: std::convert::Into<std::string::String>>(
334        mut self,
335        v: T,
336    ) -> Self {
337        self.private_cloud_id = v.into();
338        self
339    }
340
341    /// Sets the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
342    pub fn set_private_cloud<
343        T: std::convert::Into<std::option::Option<crate::model::PrivateCloud>>,
344    >(
345        mut self,
346        v: T,
347    ) -> Self {
348        self.private_cloud = v.into();
349        self
350    }
351
352    /// Sets the value of [request_id][crate::model::CreatePrivateCloudRequest::request_id].
353    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
354        self.request_id = v.into();
355        self
356    }
357
358    /// Sets the value of [validate_only][crate::model::CreatePrivateCloudRequest::validate_only].
359    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
360        self.validate_only = v.into();
361        self
362    }
363}
364
365impl wkt::message::Message for CreatePrivateCloudRequest {
366    fn typename() -> &'static str {
367        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateCloudRequest"
368    }
369}
370
371/// Request message for
372/// [VmwareEngine.UpdatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]
373///
374/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]: crate::client::VmwareEngine::update_private_cloud
375#[serde_with::serde_as]
376#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
377#[serde(default, rename_all = "camelCase")]
378#[non_exhaustive]
379pub struct UpdatePrivateCloudRequest {
380    /// Required. Private cloud description.
381    #[serde(skip_serializing_if = "std::option::Option::is_none")]
382    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
383
384    /// Required. Field mask is used to specify the fields to be overwritten in the
385    /// `PrivateCloud` resource by the update. The fields specified in `updateMask`
386    /// are relative to the resource, not the full request. A field will be
387    /// overwritten if it is in the mask. If the user does not provide a mask then
388    /// all fields will be overwritten.
389    #[serde(skip_serializing_if = "std::option::Option::is_none")]
390    pub update_mask: std::option::Option<wkt::FieldMask>,
391
392    /// Optional. The request ID must be a valid UUID with the exception that zero
393    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
394    #[serde(skip_serializing_if = "std::string::String::is_empty")]
395    pub request_id: std::string::String,
396
397    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
398    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
399}
400
401impl UpdatePrivateCloudRequest {
402    pub fn new() -> Self {
403        std::default::Default::default()
404    }
405
406    /// Sets the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
407    pub fn set_private_cloud<
408        T: std::convert::Into<std::option::Option<crate::model::PrivateCloud>>,
409    >(
410        mut self,
411        v: T,
412    ) -> Self {
413        self.private_cloud = v.into();
414        self
415    }
416
417    /// Sets the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
418    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
419        mut self,
420        v: T,
421    ) -> Self {
422        self.update_mask = v.into();
423        self
424    }
425
426    /// Sets the value of [request_id][crate::model::UpdatePrivateCloudRequest::request_id].
427    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
428        self.request_id = v.into();
429        self
430    }
431}
432
433impl wkt::message::Message for UpdatePrivateCloudRequest {
434    fn typename() -> &'static str {
435        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest"
436    }
437}
438
439/// Request message for
440/// [VmwareEngine.DeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]
441///
442/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]: crate::client::VmwareEngine::delete_private_cloud
443#[serde_with::serde_as]
444#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
445#[serde(default, rename_all = "camelCase")]
446#[non_exhaustive]
447pub struct DeletePrivateCloudRequest {
448    /// Required. The resource name of the private cloud to delete.
449    /// Resource names are schemeless URIs that follow the conventions in
450    /// <https://cloud.google.com/apis/design/resource_names>.
451    /// For example:
452    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
453    #[serde(skip_serializing_if = "std::string::String::is_empty")]
454    pub name: std::string::String,
455
456    /// Optional. The request ID must be a valid UUID with the exception that zero
457    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
458    #[serde(skip_serializing_if = "std::string::String::is_empty")]
459    pub request_id: std::string::String,
460
461    /// Optional. If set to true, cascade delete is enabled and all children of
462    /// this private cloud resource are also deleted. When this flag is set to
463    /// false, the private cloud will not be deleted if there are any children
464    /// other than the management cluster. The management cluster is always
465    /// deleted.
466    pub force: bool,
467
468    /// Optional. Time delay of the deletion specified in hours. The default value
469    /// is `3`. Specifying a non-zero value for this field changes the value of
470    /// `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned
471    /// deletion time. Deletion can be cancelled before `expire_time` elapses using
472    /// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud].
473    /// Specifying a value of `0` for this field instead begins the deletion
474    /// process and ceases billing immediately. During the final deletion process,
475    /// the value of `PrivateCloud.state` becomes `PURGING`.
476    ///
477    /// [google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]: crate::client::VmwareEngine::undelete_private_cloud
478    #[serde(skip_serializing_if = "std::option::Option::is_none")]
479    pub delay_hours: std::option::Option<i32>,
480
481    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
482    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
483}
484
485impl DeletePrivateCloudRequest {
486    pub fn new() -> Self {
487        std::default::Default::default()
488    }
489
490    /// Sets the value of [name][crate::model::DeletePrivateCloudRequest::name].
491    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
492        self.name = v.into();
493        self
494    }
495
496    /// Sets the value of [request_id][crate::model::DeletePrivateCloudRequest::request_id].
497    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
498        self.request_id = v.into();
499        self
500    }
501
502    /// Sets the value of [force][crate::model::DeletePrivateCloudRequest::force].
503    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
504        self.force = v.into();
505        self
506    }
507
508    /// Sets the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
509    pub fn set_delay_hours<T: std::convert::Into<std::option::Option<i32>>>(
510        mut self,
511        v: T,
512    ) -> Self {
513        self.delay_hours = v.into();
514        self
515    }
516}
517
518impl wkt::message::Message for DeletePrivateCloudRequest {
519    fn typename() -> &'static str {
520        "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateCloudRequest"
521    }
522}
523
524/// Request message for
525/// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]
526///
527/// [google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]: crate::client::VmwareEngine::undelete_private_cloud
528#[serde_with::serde_as]
529#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
530#[serde(default, rename_all = "camelCase")]
531#[non_exhaustive]
532pub struct UndeletePrivateCloudRequest {
533    /// Required. The resource name of the private cloud scheduled for deletion.
534    /// Resource names are schemeless URIs that follow the conventions in
535    /// <https://cloud.google.com/apis/design/resource_names>.
536    /// For example:
537    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
538    #[serde(skip_serializing_if = "std::string::String::is_empty")]
539    pub name: std::string::String,
540
541    /// Optional. The request ID must be a valid UUID with the exception that zero
542    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
543    #[serde(skip_serializing_if = "std::string::String::is_empty")]
544    pub request_id: std::string::String,
545
546    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
547    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
548}
549
550impl UndeletePrivateCloudRequest {
551    pub fn new() -> Self {
552        std::default::Default::default()
553    }
554
555    /// Sets the value of [name][crate::model::UndeletePrivateCloudRequest::name].
556    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
557        self.name = v.into();
558        self
559    }
560
561    /// Sets the value of [request_id][crate::model::UndeletePrivateCloudRequest::request_id].
562    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
563        self.request_id = v.into();
564        self
565    }
566}
567
568impl wkt::message::Message for UndeletePrivateCloudRequest {
569    fn typename() -> &'static str {
570        "type.googleapis.com/google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest"
571    }
572}
573
574/// Request message for
575/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
576///
577/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
578#[serde_with::serde_as]
579#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
580#[serde(default, rename_all = "camelCase")]
581#[non_exhaustive]
582pub struct ListClustersRequest {
583    /// Required. The resource name of the private cloud to query for clusters.
584    /// Resource names are schemeless URIs that follow the conventions in
585    /// <https://cloud.google.com/apis/design/resource_names>.
586    /// For example:
587    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
588    #[serde(skip_serializing_if = "std::string::String::is_empty")]
589    pub parent: std::string::String,
590
591    /// The maximum number of clusters to return in one page.
592    /// The service may return fewer than this value.
593    /// The maximum value is coerced to 1000.
594    /// The default value of this field is 500.
595    pub page_size: i32,
596
597    /// A page token, received from a previous `ListClusters` call.
598    /// Provide this to retrieve the subsequent page.
599    ///
600    /// When paginating, all other parameters provided to `ListClusters`
601    /// must match the call that provided the page token.
602    #[serde(skip_serializing_if = "std::string::String::is_empty")]
603    pub page_token: std::string::String,
604
605    /// To filter on multiple expressions, provide each separate expression within
606    /// parentheses. For example:
607    ///
608    /// ```norust
609    /// (name = "example-cluster")
610    /// (nodeCount = "3")
611    /// ```
612    ///
613    /// By default, each expression is an `AND` expression. However, you can
614    /// include `AND` and `OR` expressions explicitly. For example:
615    ///
616    /// ```norust
617    /// (name = "example-cluster-1") AND
618    /// (createTime > "2021-04-12T08:15:10.40Z") OR
619    /// (name = "example-cluster-2")
620    /// ```
621    #[serde(skip_serializing_if = "std::string::String::is_empty")]
622    pub filter: std::string::String,
623
624    /// Sorts list results by a certain order. By default, returned results are
625    /// ordered by `name` in ascending order. You can also sort results in
626    /// descending order based on the `name` value using `orderBy="name desc"`.
627    /// Currently, only ordering by `name` is supported.
628    #[serde(skip_serializing_if = "std::string::String::is_empty")]
629    pub order_by: std::string::String,
630
631    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
632    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
633}
634
635impl ListClustersRequest {
636    pub fn new() -> Self {
637        std::default::Default::default()
638    }
639
640    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
641    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
642        self.parent = v.into();
643        self
644    }
645
646    /// Sets the value of [page_size][crate::model::ListClustersRequest::page_size].
647    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
648        self.page_size = v.into();
649        self
650    }
651
652    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
653    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
654        self.page_token = v.into();
655        self
656    }
657
658    /// Sets the value of [filter][crate::model::ListClustersRequest::filter].
659    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
660        self.filter = v.into();
661        self
662    }
663
664    /// Sets the value of [order_by][crate::model::ListClustersRequest::order_by].
665    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
666        self.order_by = v.into();
667        self
668    }
669}
670
671impl wkt::message::Message for ListClustersRequest {
672    fn typename() -> &'static str {
673        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersRequest"
674    }
675}
676
677/// Response message for
678/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
679///
680/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
681#[serde_with::serde_as]
682#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
683#[serde(default, rename_all = "camelCase")]
684#[non_exhaustive]
685pub struct ListClustersResponse {
686    /// A list of private cloud clusters.
687    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
688    pub clusters: std::vec::Vec<crate::model::Cluster>,
689
690    /// A token, which can be sent as `page_token` to retrieve the next page.
691    /// If this field is omitted, there are no subsequent pages.
692    #[serde(skip_serializing_if = "std::string::String::is_empty")]
693    pub next_page_token: std::string::String,
694
695    /// Locations that could not be reached when making an aggregated query using
696    /// wildcards.
697    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
698    pub unreachable: std::vec::Vec<std::string::String>,
699
700    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
701    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
702}
703
704impl ListClustersResponse {
705    pub fn new() -> Self {
706        std::default::Default::default()
707    }
708
709    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
710    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
711        self.next_page_token = v.into();
712        self
713    }
714
715    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
716    pub fn set_clusters<T, V>(mut self, v: T) -> Self
717    where
718        T: std::iter::IntoIterator<Item = V>,
719        V: std::convert::Into<crate::model::Cluster>,
720    {
721        use std::iter::Iterator;
722        self.clusters = v.into_iter().map(|i| i.into()).collect();
723        self
724    }
725
726    /// Sets the value of [unreachable][crate::model::ListClustersResponse::unreachable].
727    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
728    where
729        T: std::iter::IntoIterator<Item = V>,
730        V: std::convert::Into<std::string::String>,
731    {
732        use std::iter::Iterator;
733        self.unreachable = v.into_iter().map(|i| i.into()).collect();
734        self
735    }
736}
737
738impl wkt::message::Message for ListClustersResponse {
739    fn typename() -> &'static str {
740        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersResponse"
741    }
742}
743
744#[doc(hidden)]
745impl gax::paginator::internal::PageableResponse for ListClustersResponse {
746    type PageItem = crate::model::Cluster;
747
748    fn items(self) -> std::vec::Vec<Self::PageItem> {
749        self.clusters
750    }
751
752    fn next_page_token(&self) -> std::string::String {
753        use std::clone::Clone;
754        self.next_page_token.clone()
755    }
756}
757
758/// Request message for
759/// [VmwareEngine.GetCluster][google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]
760///
761/// [google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]: crate::client::VmwareEngine::get_cluster
762#[serde_with::serde_as]
763#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
764#[serde(default, rename_all = "camelCase")]
765#[non_exhaustive]
766pub struct GetClusterRequest {
767    /// Required. The cluster resource name to retrieve.
768    /// Resource names are schemeless URIs that follow the conventions in
769    /// <https://cloud.google.com/apis/design/resource_names>.
770    /// For example:
771    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
772    #[serde(skip_serializing_if = "std::string::String::is_empty")]
773    pub name: std::string::String,
774
775    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
776    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
777}
778
779impl GetClusterRequest {
780    pub fn new() -> Self {
781        std::default::Default::default()
782    }
783
784    /// Sets the value of [name][crate::model::GetClusterRequest::name].
785    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
786        self.name = v.into();
787        self
788    }
789}
790
791impl wkt::message::Message for GetClusterRequest {
792    fn typename() -> &'static str {
793        "type.googleapis.com/google.cloud.vmwareengine.v1.GetClusterRequest"
794    }
795}
796
797/// Request message for
798/// [VmwareEngine.CreateCluster][google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]
799///
800/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]: crate::client::VmwareEngine::create_cluster
801#[serde_with::serde_as]
802#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
803#[serde(default, rename_all = "camelCase")]
804#[non_exhaustive]
805pub struct CreateClusterRequest {
806    /// Required. The resource name of the private cloud to create a new cluster
807    /// in. Resource names are schemeless URIs that follow the conventions in
808    /// <https://cloud.google.com/apis/design/resource_names>.
809    /// For example:
810    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
811    #[serde(skip_serializing_if = "std::string::String::is_empty")]
812    pub parent: std::string::String,
813
814    /// Required. The user-provided identifier of the new `Cluster`.
815    /// This identifier must be unique among clusters within the parent and becomes
816    /// the final token in the name URI.
817    /// The identifier must meet the following requirements:
818    ///
819    /// * Only contains 1-63 alphanumeric characters and hyphens
820    /// * Begins with an alphabetical character
821    /// * Ends with a non-hyphen character
822    /// * Not formatted as a UUID
823    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
824    ///   (section 3.5)
825    #[serde(skip_serializing_if = "std::string::String::is_empty")]
826    pub cluster_id: std::string::String,
827
828    /// Required. The initial description of the new cluster.
829    #[serde(skip_serializing_if = "std::option::Option::is_none")]
830    pub cluster: std::option::Option<crate::model::Cluster>,
831
832    /// Optional. The request ID must be a valid UUID with the exception that zero
833    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
834    #[serde(skip_serializing_if = "std::string::String::is_empty")]
835    pub request_id: std::string::String,
836
837    /// Optional. True if you want the request to be validated and not executed;
838    /// false otherwise.
839    pub validate_only: bool,
840
841    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
842    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
843}
844
845impl CreateClusterRequest {
846    pub fn new() -> Self {
847        std::default::Default::default()
848    }
849
850    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
851    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
852        self.parent = v.into();
853        self
854    }
855
856    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
857    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
858        self.cluster_id = v.into();
859        self
860    }
861
862    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
863    pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
864        mut self,
865        v: T,
866    ) -> Self {
867        self.cluster = v.into();
868        self
869    }
870
871    /// Sets the value of [request_id][crate::model::CreateClusterRequest::request_id].
872    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
873        self.request_id = v.into();
874        self
875    }
876
877    /// Sets the value of [validate_only][crate::model::CreateClusterRequest::validate_only].
878    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
879        self.validate_only = v.into();
880        self
881    }
882}
883
884impl wkt::message::Message for CreateClusterRequest {
885    fn typename() -> &'static str {
886        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateClusterRequest"
887    }
888}
889
890/// Request message for
891/// [VmwareEngine.UpdateCluster][google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]
892///
893/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]: crate::client::VmwareEngine::update_cluster
894#[serde_with::serde_as]
895#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
896#[serde(default, rename_all = "camelCase")]
897#[non_exhaustive]
898pub struct UpdateClusterRequest {
899    /// Required. Field mask is used to specify the fields to be overwritten in the
900    /// `Cluster` resource by the update. The fields specified in the `updateMask`
901    /// are relative to the resource, not the full request. A field will be
902    /// overwritten if it is in the mask. If the user does not provide a mask then
903    /// all fields will be overwritten.
904    #[serde(skip_serializing_if = "std::option::Option::is_none")]
905    pub update_mask: std::option::Option<wkt::FieldMask>,
906
907    /// Required. The description of the cluster.
908    #[serde(skip_serializing_if = "std::option::Option::is_none")]
909    pub cluster: std::option::Option<crate::model::Cluster>,
910
911    /// Optional. The request ID must be a valid UUID with the exception that
912    /// zero UUID is not supported (00000000-0000-0000-0000-000000000000).
913    #[serde(skip_serializing_if = "std::string::String::is_empty")]
914    pub request_id: std::string::String,
915
916    /// Optional. True if you want the request to be validated and not executed;
917    /// false otherwise.
918    pub validate_only: bool,
919
920    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
921    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
922}
923
924impl UpdateClusterRequest {
925    pub fn new() -> Self {
926        std::default::Default::default()
927    }
928
929    /// Sets the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
930    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
931        mut self,
932        v: T,
933    ) -> Self {
934        self.update_mask = v.into();
935        self
936    }
937
938    /// Sets the value of [cluster][crate::model::UpdateClusterRequest::cluster].
939    pub fn set_cluster<T: std::convert::Into<std::option::Option<crate::model::Cluster>>>(
940        mut self,
941        v: T,
942    ) -> Self {
943        self.cluster = v.into();
944        self
945    }
946
947    /// Sets the value of [request_id][crate::model::UpdateClusterRequest::request_id].
948    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
949        self.request_id = v.into();
950        self
951    }
952
953    /// Sets the value of [validate_only][crate::model::UpdateClusterRequest::validate_only].
954    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
955        self.validate_only = v.into();
956        self
957    }
958}
959
960impl wkt::message::Message for UpdateClusterRequest {
961    fn typename() -> &'static str {
962        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateClusterRequest"
963    }
964}
965
966/// Request message for
967/// [VmwareEngine.DeleteCluster][google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]
968///
969/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]: crate::client::VmwareEngine::delete_cluster
970#[serde_with::serde_as]
971#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
972#[serde(default, rename_all = "camelCase")]
973#[non_exhaustive]
974pub struct DeleteClusterRequest {
975    /// Required. The resource name of the cluster to delete.
976    /// Resource names are schemeless URIs that follow the conventions in
977    /// <https://cloud.google.com/apis/design/resource_names>.
978    /// For example:
979    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
980    #[serde(skip_serializing_if = "std::string::String::is_empty")]
981    pub name: std::string::String,
982
983    /// Optional. The request ID must be a valid UUID with the exception that zero
984    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
985    #[serde(skip_serializing_if = "std::string::String::is_empty")]
986    pub request_id: std::string::String,
987
988    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
989    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
990}
991
992impl DeleteClusterRequest {
993    pub fn new() -> Self {
994        std::default::Default::default()
995    }
996
997    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
998    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
999        self.name = v.into();
1000        self
1001    }
1002
1003    /// Sets the value of [request_id][crate::model::DeleteClusterRequest::request_id].
1004    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1005        self.request_id = v.into();
1006        self
1007    }
1008}
1009
1010impl wkt::message::Message for DeleteClusterRequest {
1011    fn typename() -> &'static str {
1012        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteClusterRequest"
1013    }
1014}
1015
1016/// Request message for
1017/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
1018///
1019/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
1020#[serde_with::serde_as]
1021#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1022#[serde(default, rename_all = "camelCase")]
1023#[non_exhaustive]
1024pub struct ListNodesRequest {
1025    /// Required. The resource name of the cluster to be queried for nodes.
1026    /// Resource names are schemeless URIs that follow the conventions in
1027    /// <https://cloud.google.com/apis/design/resource_names>.
1028    /// For example:
1029    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
1030    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1031    pub parent: std::string::String,
1032
1033    /// The maximum number of nodes to return in one page.
1034    /// The service may return fewer than this value.
1035    /// The maximum value is coerced to 1000.
1036    /// The default value of this field is 500.
1037    pub page_size: i32,
1038
1039    /// A page token, received from a previous `ListNodes` call.
1040    /// Provide this to retrieve the subsequent page.
1041    ///
1042    /// When paginating, all other parameters provided to
1043    /// `ListNodes` must match the call that provided the page
1044    /// token.
1045    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1046    pub page_token: std::string::String,
1047
1048    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1049    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1050}
1051
1052impl ListNodesRequest {
1053    pub fn new() -> Self {
1054        std::default::Default::default()
1055    }
1056
1057    /// Sets the value of [parent][crate::model::ListNodesRequest::parent].
1058    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1059        self.parent = v.into();
1060        self
1061    }
1062
1063    /// Sets the value of [page_size][crate::model::ListNodesRequest::page_size].
1064    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1065        self.page_size = v.into();
1066        self
1067    }
1068
1069    /// Sets the value of [page_token][crate::model::ListNodesRequest::page_token].
1070    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1071        self.page_token = v.into();
1072        self
1073    }
1074}
1075
1076impl wkt::message::Message for ListNodesRequest {
1077    fn typename() -> &'static str {
1078        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesRequest"
1079    }
1080}
1081
1082/// Response message for
1083/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
1084///
1085/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
1086#[serde_with::serde_as]
1087#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1088#[serde(default, rename_all = "camelCase")]
1089#[non_exhaustive]
1090pub struct ListNodesResponse {
1091    /// The nodes.
1092    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1093    pub nodes: std::vec::Vec<crate::model::Node>,
1094
1095    /// A token, which can be sent as `page_token` to retrieve the next page.
1096    /// If this field is omitted, there are no subsequent pages.
1097    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1098    pub next_page_token: std::string::String,
1099
1100    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1101    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1102}
1103
1104impl ListNodesResponse {
1105    pub fn new() -> Self {
1106        std::default::Default::default()
1107    }
1108
1109    /// Sets the value of [next_page_token][crate::model::ListNodesResponse::next_page_token].
1110    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1111        self.next_page_token = v.into();
1112        self
1113    }
1114
1115    /// Sets the value of [nodes][crate::model::ListNodesResponse::nodes].
1116    pub fn set_nodes<T, V>(mut self, v: T) -> Self
1117    where
1118        T: std::iter::IntoIterator<Item = V>,
1119        V: std::convert::Into<crate::model::Node>,
1120    {
1121        use std::iter::Iterator;
1122        self.nodes = v.into_iter().map(|i| i.into()).collect();
1123        self
1124    }
1125}
1126
1127impl wkt::message::Message for ListNodesResponse {
1128    fn typename() -> &'static str {
1129        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesResponse"
1130    }
1131}
1132
1133#[doc(hidden)]
1134impl gax::paginator::internal::PageableResponse for ListNodesResponse {
1135    type PageItem = crate::model::Node;
1136
1137    fn items(self) -> std::vec::Vec<Self::PageItem> {
1138        self.nodes
1139    }
1140
1141    fn next_page_token(&self) -> std::string::String {
1142        use std::clone::Clone;
1143        self.next_page_token.clone()
1144    }
1145}
1146
1147/// Request message for
1148/// [VmwareEngine.GetNode][google.cloud.vmwareengine.v1.VmwareEngine.GetNode]
1149///
1150/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNode]: crate::client::VmwareEngine::get_node
1151#[serde_with::serde_as]
1152#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1153#[serde(default, rename_all = "camelCase")]
1154#[non_exhaustive]
1155pub struct GetNodeRequest {
1156    /// Required. The resource name of the node to retrieve.
1157    /// For example:
1158    /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}`
1159    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1160    pub name: std::string::String,
1161
1162    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1163    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1164}
1165
1166impl GetNodeRequest {
1167    pub fn new() -> Self {
1168        std::default::Default::default()
1169    }
1170
1171    /// Sets the value of [name][crate::model::GetNodeRequest::name].
1172    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1173        self.name = v.into();
1174        self
1175    }
1176}
1177
1178impl wkt::message::Message for GetNodeRequest {
1179    fn typename() -> &'static str {
1180        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeRequest"
1181    }
1182}
1183
1184/// Request message for
1185/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1186///
1187/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1188#[serde_with::serde_as]
1189#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1190#[serde(default, rename_all = "camelCase")]
1191#[non_exhaustive]
1192pub struct ListExternalAddressesRequest {
1193    /// Required. The resource name of the private cloud to be queried for
1194    /// external IP addresses.
1195    /// Resource names are schemeless URIs that follow the conventions in
1196    /// <https://cloud.google.com/apis/design/resource_names>.
1197    /// For example:
1198    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1199    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1200    pub parent: std::string::String,
1201
1202    /// The maximum number of external IP addresses to return in one page.
1203    /// The service may return fewer than this value.
1204    /// The maximum value is coerced to 1000.
1205    /// The default value of this field is 500.
1206    pub page_size: i32,
1207
1208    /// A page token, received from a previous `ListExternalAddresses` call.
1209    /// Provide this to retrieve the subsequent page.
1210    ///
1211    /// When paginating, all other parameters provided to
1212    /// `ListExternalAddresses` must match the call that provided the page token.
1213    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1214    pub page_token: std::string::String,
1215
1216    /// A filter expression that matches resources returned in the response.
1217    /// The expression must specify the field name, a comparison
1218    /// operator, and the value that you want to use for filtering. The value
1219    /// must be a string, a number, or a boolean. The comparison operator
1220    /// must be `=`, `!=`, `>`, or `<`.
1221    ///
1222    /// For example, if you are filtering a list of IP addresses, you can
1223    /// exclude the ones named `example-ip` by specifying
1224    /// `name != "example-ip"`.
1225    ///
1226    /// To filter on multiple expressions, provide each separate expression within
1227    /// parentheses. For example:
1228    ///
1229    /// ```norust
1230    /// (name = "example-ip")
1231    /// (createTime > "2021-04-12T08:15:10.40Z")
1232    /// ```
1233    ///
1234    /// By default, each expression is an `AND` expression. However, you
1235    /// can include `AND` and `OR` expressions explicitly.
1236    /// For example:
1237    ///
1238    /// ```norust
1239    /// (name = "example-ip-1") AND
1240    /// (createTime > "2021-04-12T08:15:10.40Z") OR
1241    /// (name = "example-ip-2")
1242    /// ```
1243    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1244    pub filter: std::string::String,
1245
1246    /// Sorts list results by a certain order. By default, returned results
1247    /// are ordered by `name` in ascending order.
1248    /// You can also sort results in descending order based on the `name` value
1249    /// using `orderBy="name desc"`.
1250    /// Currently, only ordering by `name` is supported.
1251    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1252    pub order_by: std::string::String,
1253
1254    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1255    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1256}
1257
1258impl ListExternalAddressesRequest {
1259    pub fn new() -> Self {
1260        std::default::Default::default()
1261    }
1262
1263    /// Sets the value of [parent][crate::model::ListExternalAddressesRequest::parent].
1264    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1265        self.parent = v.into();
1266        self
1267    }
1268
1269    /// Sets the value of [page_size][crate::model::ListExternalAddressesRequest::page_size].
1270    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1271        self.page_size = v.into();
1272        self
1273    }
1274
1275    /// Sets the value of [page_token][crate::model::ListExternalAddressesRequest::page_token].
1276    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1277        self.page_token = v.into();
1278        self
1279    }
1280
1281    /// Sets the value of [filter][crate::model::ListExternalAddressesRequest::filter].
1282    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1283        self.filter = v.into();
1284        self
1285    }
1286
1287    /// Sets the value of [order_by][crate::model::ListExternalAddressesRequest::order_by].
1288    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1289        self.order_by = v.into();
1290        self
1291    }
1292}
1293
1294impl wkt::message::Message for ListExternalAddressesRequest {
1295    fn typename() -> &'static str {
1296        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesRequest"
1297    }
1298}
1299
1300/// Response message for
1301/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1302///
1303/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1304#[serde_with::serde_as]
1305#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1306#[serde(default, rename_all = "camelCase")]
1307#[non_exhaustive]
1308pub struct ListExternalAddressesResponse {
1309    /// A list of external IP addresses.
1310    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1311    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1312
1313    /// A token, which can be sent as `page_token` to retrieve the next page.
1314    /// If this field is omitted, there are no subsequent pages.
1315    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1316    pub next_page_token: std::string::String,
1317
1318    /// Locations that could not be reached when making an aggregated query using
1319    /// wildcards.
1320    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1321    pub unreachable: std::vec::Vec<std::string::String>,
1322
1323    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1324    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1325}
1326
1327impl ListExternalAddressesResponse {
1328    pub fn new() -> Self {
1329        std::default::Default::default()
1330    }
1331
1332    /// Sets the value of [next_page_token][crate::model::ListExternalAddressesResponse::next_page_token].
1333    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1334        self.next_page_token = v.into();
1335        self
1336    }
1337
1338    /// Sets the value of [external_addresses][crate::model::ListExternalAddressesResponse::external_addresses].
1339    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1340    where
1341        T: std::iter::IntoIterator<Item = V>,
1342        V: std::convert::Into<crate::model::ExternalAddress>,
1343    {
1344        use std::iter::Iterator;
1345        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1346        self
1347    }
1348
1349    /// Sets the value of [unreachable][crate::model::ListExternalAddressesResponse::unreachable].
1350    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1351    where
1352        T: std::iter::IntoIterator<Item = V>,
1353        V: std::convert::Into<std::string::String>,
1354    {
1355        use std::iter::Iterator;
1356        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1357        self
1358    }
1359}
1360
1361impl wkt::message::Message for ListExternalAddressesResponse {
1362    fn typename() -> &'static str {
1363        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesResponse"
1364    }
1365}
1366
1367#[doc(hidden)]
1368impl gax::paginator::internal::PageableResponse for ListExternalAddressesResponse {
1369    type PageItem = crate::model::ExternalAddress;
1370
1371    fn items(self) -> std::vec::Vec<Self::PageItem> {
1372        self.external_addresses
1373    }
1374
1375    fn next_page_token(&self) -> std::string::String {
1376        use std::clone::Clone;
1377        self.next_page_token.clone()
1378    }
1379}
1380
1381/// Request message for
1382/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1383///
1384/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
1385#[serde_with::serde_as]
1386#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1387#[serde(default, rename_all = "camelCase")]
1388#[non_exhaustive]
1389pub struct FetchNetworkPolicyExternalAddressesRequest {
1390    /// Required. The resource name of the network policy to query for assigned
1391    /// external IP addresses. Resource names are schemeless URIs that follow the
1392    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
1393    /// example:
1394    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
1395    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1396    pub network_policy: std::string::String,
1397
1398    /// The maximum number of external IP addresses to return in one page.
1399    /// The service may return fewer than this value.
1400    /// The maximum value is coerced to 1000.
1401    /// The default value of this field is 500.
1402    pub page_size: i32,
1403
1404    /// A page token, received from a previous
1405    /// `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the
1406    /// subsequent page.
1407    ///
1408    /// When paginating, all parameters provided to
1409    /// `FetchNetworkPolicyExternalAddresses`, except for `page_size` and
1410    /// `page_token`, must match the call that provided the page token.
1411    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1412    pub page_token: std::string::String,
1413
1414    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1415    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1416}
1417
1418impl FetchNetworkPolicyExternalAddressesRequest {
1419    pub fn new() -> Self {
1420        std::default::Default::default()
1421    }
1422
1423    /// Sets the value of [network_policy][crate::model::FetchNetworkPolicyExternalAddressesRequest::network_policy].
1424    pub fn set_network_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1425        self.network_policy = v.into();
1426        self
1427    }
1428
1429    /// Sets the value of [page_size][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_size].
1430    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1431        self.page_size = v.into();
1432        self
1433    }
1434
1435    /// Sets the value of [page_token][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_token].
1436    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1437        self.page_token = v.into();
1438        self
1439    }
1440}
1441
1442impl wkt::message::Message for FetchNetworkPolicyExternalAddressesRequest {
1443    fn typename() -> &'static str {
1444        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest"
1445    }
1446}
1447
1448/// Response message for
1449/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1450///
1451/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
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 FetchNetworkPolicyExternalAddressesResponse {
1457    /// A list of external IP addresses assigned to VMware workload VMs within the
1458    /// scope of the given network policy.
1459    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1460    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1461
1462    /// A token, which can be sent as `page_token` to retrieve the next page.
1463    /// If this field is omitted, there are no subsequent pages.
1464    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1465    pub next_page_token: std::string::String,
1466
1467    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1468    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1469}
1470
1471impl FetchNetworkPolicyExternalAddressesResponse {
1472    pub fn new() -> Self {
1473        std::default::Default::default()
1474    }
1475
1476    /// Sets the value of [next_page_token][crate::model::FetchNetworkPolicyExternalAddressesResponse::next_page_token].
1477    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1478        self.next_page_token = v.into();
1479        self
1480    }
1481
1482    /// Sets the value of [external_addresses][crate::model::FetchNetworkPolicyExternalAddressesResponse::external_addresses].
1483    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1484    where
1485        T: std::iter::IntoIterator<Item = V>,
1486        V: std::convert::Into<crate::model::ExternalAddress>,
1487    {
1488        use std::iter::Iterator;
1489        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1490        self
1491    }
1492}
1493
1494impl wkt::message::Message for FetchNetworkPolicyExternalAddressesResponse {
1495    fn typename() -> &'static str {
1496        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesResponse"
1497    }
1498}
1499
1500#[doc(hidden)]
1501impl gax::paginator::internal::PageableResponse for FetchNetworkPolicyExternalAddressesResponse {
1502    type PageItem = crate::model::ExternalAddress;
1503
1504    fn items(self) -> std::vec::Vec<Self::PageItem> {
1505        self.external_addresses
1506    }
1507
1508    fn next_page_token(&self) -> std::string::String {
1509        use std::clone::Clone;
1510        self.next_page_token.clone()
1511    }
1512}
1513
1514/// Request message for
1515/// [VmwareEngine.GetExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]
1516///
1517/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]: crate::client::VmwareEngine::get_external_address
1518#[serde_with::serde_as]
1519#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1520#[serde(default, rename_all = "camelCase")]
1521#[non_exhaustive]
1522pub struct GetExternalAddressRequest {
1523    /// Required. The resource name of the external IP address to retrieve.
1524    /// Resource names are schemeless URIs that follow the conventions in
1525    /// <https://cloud.google.com/apis/design/resource_names>.
1526    /// For example:
1527    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
1528    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1529    pub name: std::string::String,
1530
1531    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1532    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1533}
1534
1535impl GetExternalAddressRequest {
1536    pub fn new() -> Self {
1537        std::default::Default::default()
1538    }
1539
1540    /// Sets the value of [name][crate::model::GetExternalAddressRequest::name].
1541    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1542        self.name = v.into();
1543        self
1544    }
1545}
1546
1547impl wkt::message::Message for GetExternalAddressRequest {
1548    fn typename() -> &'static str {
1549        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAddressRequest"
1550    }
1551}
1552
1553/// Request message for
1554/// [VmwareEngine.CreateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]
1555///
1556/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]: crate::client::VmwareEngine::create_external_address
1557#[serde_with::serde_as]
1558#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1559#[serde(default, rename_all = "camelCase")]
1560#[non_exhaustive]
1561pub struct CreateExternalAddressRequest {
1562    /// Required. The resource name of the private cloud
1563    /// to create a new external IP address in.
1564    /// Resource names are schemeless URIs that follow the conventions in
1565    /// <https://cloud.google.com/apis/design/resource_names>.
1566    /// For example:
1567    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1568    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1569    pub parent: std::string::String,
1570
1571    /// Required. The initial description of a new external IP address.
1572    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1573    pub external_address: std::option::Option<crate::model::ExternalAddress>,
1574
1575    /// Required. The user-provided identifier of the `ExternalAddress` to be
1576    /// created. This identifier must be unique among `ExternalAddress` resources
1577    /// within the parent and becomes the final token in the name URI. The
1578    /// identifier must meet the following requirements:
1579    ///
1580    /// * Only contains 1-63 alphanumeric characters and hyphens
1581    /// * Begins with an alphabetical character
1582    /// * Ends with a non-hyphen character
1583    /// * Not formatted as a UUID
1584    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
1585    ///   (section 3.5)
1586    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1587    pub external_address_id: std::string::String,
1588
1589    /// Optional. A request ID to identify requests. Specify a unique request ID
1590    /// so that if you must retry your request, the server will know to ignore
1591    /// the request if it has already been completed. The server guarantees that a
1592    /// request doesn't result in creation of duplicate commitments for at least 60
1593    /// minutes.
1594    ///
1595    /// For example, consider a situation where you make an initial request and the
1596    /// request times out. If you make the request again with the same request ID,
1597    /// the server can check if the original operation with the same request ID was
1598    /// received, and if so, will ignore the second request. This prevents clients
1599    /// from accidentally creating duplicate commitments.
1600    ///
1601    /// The request ID must be a valid UUID with the exception that zero UUID is
1602    /// not supported (00000000-0000-0000-0000-000000000000).
1603    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1604    pub request_id: std::string::String,
1605
1606    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1607    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1608}
1609
1610impl CreateExternalAddressRequest {
1611    pub fn new() -> Self {
1612        std::default::Default::default()
1613    }
1614
1615    /// Sets the value of [parent][crate::model::CreateExternalAddressRequest::parent].
1616    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1617        self.parent = v.into();
1618        self
1619    }
1620
1621    /// Sets the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
1622    pub fn set_external_address<
1623        T: std::convert::Into<std::option::Option<crate::model::ExternalAddress>>,
1624    >(
1625        mut self,
1626        v: T,
1627    ) -> Self {
1628        self.external_address = v.into();
1629        self
1630    }
1631
1632    /// Sets the value of [external_address_id][crate::model::CreateExternalAddressRequest::external_address_id].
1633    pub fn set_external_address_id<T: std::convert::Into<std::string::String>>(
1634        mut self,
1635        v: T,
1636    ) -> Self {
1637        self.external_address_id = v.into();
1638        self
1639    }
1640
1641    /// Sets the value of [request_id][crate::model::CreateExternalAddressRequest::request_id].
1642    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1643        self.request_id = v.into();
1644        self
1645    }
1646}
1647
1648impl wkt::message::Message for CreateExternalAddressRequest {
1649    fn typename() -> &'static str {
1650        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAddressRequest"
1651    }
1652}
1653
1654/// Request message for
1655/// [VmwareEngine.UpdateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]
1656///
1657/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]: crate::client::VmwareEngine::update_external_address
1658#[serde_with::serde_as]
1659#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1660#[serde(default, rename_all = "camelCase")]
1661#[non_exhaustive]
1662pub struct UpdateExternalAddressRequest {
1663    /// Required. Field mask is used to specify the fields to be overwritten in the
1664    /// `ExternalAddress` resource by the update.
1665    /// The fields specified in the `update_mask` are relative to the resource, not
1666    /// the full request. A field will be overwritten if it is in the mask. If the
1667    /// user does not provide a mask then all fields will be overwritten.
1668    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1669    pub update_mask: std::option::Option<wkt::FieldMask>,
1670
1671    /// Required. External IP address description.
1672    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1673    pub external_address: std::option::Option<crate::model::ExternalAddress>,
1674
1675    /// Optional. A request ID to identify requests. Specify a unique request ID
1676    /// so that if you must retry your request, the server will know to ignore
1677    /// the request if it has already been completed. The server guarantees that a
1678    /// request doesn't result in creation of duplicate commitments for at least 60
1679    /// minutes.
1680    ///
1681    /// For example, consider a situation where you make an initial request and the
1682    /// request times out. If you make the request again with the same request ID,
1683    /// the server can check if the original operation with the same request ID was
1684    /// received, and if so, will ignore the second request. This prevents clients
1685    /// from accidentally creating duplicate commitments.
1686    ///
1687    /// The request ID must be a valid UUID with the exception that zero UUID is
1688    /// not supported (00000000-0000-0000-0000-000000000000).
1689    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1690    pub request_id: std::string::String,
1691
1692    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1693    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1694}
1695
1696impl UpdateExternalAddressRequest {
1697    pub fn new() -> Self {
1698        std::default::Default::default()
1699    }
1700
1701    /// Sets the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
1702    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
1703        mut self,
1704        v: T,
1705    ) -> Self {
1706        self.update_mask = v.into();
1707        self
1708    }
1709
1710    /// Sets the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
1711    pub fn set_external_address<
1712        T: std::convert::Into<std::option::Option<crate::model::ExternalAddress>>,
1713    >(
1714        mut self,
1715        v: T,
1716    ) -> Self {
1717        self.external_address = v.into();
1718        self
1719    }
1720
1721    /// Sets the value of [request_id][crate::model::UpdateExternalAddressRequest::request_id].
1722    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1723        self.request_id = v.into();
1724        self
1725    }
1726}
1727
1728impl wkt::message::Message for UpdateExternalAddressRequest {
1729    fn typename() -> &'static str {
1730        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAddressRequest"
1731    }
1732}
1733
1734/// Request message for
1735/// [VmwareEngine.DeleteExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]
1736///
1737/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]: crate::client::VmwareEngine::delete_external_address
1738#[serde_with::serde_as]
1739#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1740#[serde(default, rename_all = "camelCase")]
1741#[non_exhaustive]
1742pub struct DeleteExternalAddressRequest {
1743    /// Required. The resource name of the external IP address to delete.
1744    /// Resource names are schemeless URIs that follow the conventions in
1745    /// <https://cloud.google.com/apis/design/resource_names>.
1746    /// For example:
1747    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
1748    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1749    pub name: std::string::String,
1750
1751    /// Optional. A request ID to identify requests. Specify a unique request ID
1752    /// so that if you must retry your request, the server will know to ignore
1753    /// the request if it has already been completed. The server guarantees that a
1754    /// request doesn't result in creation of duplicate commitments for at least 60
1755    /// minutes.
1756    ///
1757    /// For example, consider a situation where you make an initial request and the
1758    /// request times out. If you make the request again with the same request
1759    /// ID, the server can check if the original operation with the same request ID
1760    /// was received, and if so, will ignore the second request. This prevents
1761    /// clients from accidentally creating duplicate commitments.
1762    ///
1763    /// The request ID must be a valid UUID with the exception that zero UUID is
1764    /// not supported (00000000-0000-0000-0000-000000000000).
1765    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1766    pub request_id: std::string::String,
1767
1768    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1769    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1770}
1771
1772impl DeleteExternalAddressRequest {
1773    pub fn new() -> Self {
1774        std::default::Default::default()
1775    }
1776
1777    /// Sets the value of [name][crate::model::DeleteExternalAddressRequest::name].
1778    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1779        self.name = v.into();
1780        self
1781    }
1782
1783    /// Sets the value of [request_id][crate::model::DeleteExternalAddressRequest::request_id].
1784    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1785        self.request_id = v.into();
1786        self
1787    }
1788}
1789
1790impl wkt::message::Message for DeleteExternalAddressRequest {
1791    fn typename() -> &'static str {
1792        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAddressRequest"
1793    }
1794}
1795
1796/// Request message for
1797/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
1798///
1799/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
1800#[serde_with::serde_as]
1801#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1802#[serde(default, rename_all = "camelCase")]
1803#[non_exhaustive]
1804pub struct ListSubnetsRequest {
1805    /// Required. The resource name of the private cloud to be queried for
1806    /// subnets.
1807    /// Resource names are schemeless URIs that follow the conventions in
1808    /// <https://cloud.google.com/apis/design/resource_names>.
1809    /// For example:
1810    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1811    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1812    pub parent: std::string::String,
1813
1814    /// The maximum number of subnets to return in one page.
1815    /// The service may return fewer than this value.
1816    /// The maximum value is coerced to 1000.
1817    /// The default value of this field is 500.
1818    pub page_size: i32,
1819
1820    /// A page token, received from a previous `ListSubnetsRequest` call.
1821    /// Provide this to retrieve the subsequent page.
1822    ///
1823    /// When paginating, all other parameters provided to
1824    /// `ListSubnetsRequest` must match the call that provided the page token.
1825    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1826    pub page_token: std::string::String,
1827
1828    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1829    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1830}
1831
1832impl ListSubnetsRequest {
1833    pub fn new() -> Self {
1834        std::default::Default::default()
1835    }
1836
1837    /// Sets the value of [parent][crate::model::ListSubnetsRequest::parent].
1838    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1839        self.parent = v.into();
1840        self
1841    }
1842
1843    /// Sets the value of [page_size][crate::model::ListSubnetsRequest::page_size].
1844    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1845        self.page_size = v.into();
1846        self
1847    }
1848
1849    /// Sets the value of [page_token][crate::model::ListSubnetsRequest::page_token].
1850    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1851        self.page_token = v.into();
1852        self
1853    }
1854}
1855
1856impl wkt::message::Message for ListSubnetsRequest {
1857    fn typename() -> &'static str {
1858        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsRequest"
1859    }
1860}
1861
1862/// Response message for
1863/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
1864///
1865/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
1866#[serde_with::serde_as]
1867#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1868#[serde(default, rename_all = "camelCase")]
1869#[non_exhaustive]
1870pub struct ListSubnetsResponse {
1871    /// A list of subnets.
1872    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1873    pub subnets: std::vec::Vec<crate::model::Subnet>,
1874
1875    /// A token, which can be sent as `page_token` to retrieve the next page.
1876    /// If this field is omitted, there are no subsequent pages.
1877    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1878    pub next_page_token: std::string::String,
1879
1880    /// Locations that could not be reached when making an aggregated query using
1881    /// wildcards.
1882    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
1883    pub unreachable: std::vec::Vec<std::string::String>,
1884
1885    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1886    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1887}
1888
1889impl ListSubnetsResponse {
1890    pub fn new() -> Self {
1891        std::default::Default::default()
1892    }
1893
1894    /// Sets the value of [next_page_token][crate::model::ListSubnetsResponse::next_page_token].
1895    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1896        self.next_page_token = v.into();
1897        self
1898    }
1899
1900    /// Sets the value of [subnets][crate::model::ListSubnetsResponse::subnets].
1901    pub fn set_subnets<T, V>(mut self, v: T) -> Self
1902    where
1903        T: std::iter::IntoIterator<Item = V>,
1904        V: std::convert::Into<crate::model::Subnet>,
1905    {
1906        use std::iter::Iterator;
1907        self.subnets = v.into_iter().map(|i| i.into()).collect();
1908        self
1909    }
1910
1911    /// Sets the value of [unreachable][crate::model::ListSubnetsResponse::unreachable].
1912    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1913    where
1914        T: std::iter::IntoIterator<Item = V>,
1915        V: std::convert::Into<std::string::String>,
1916    {
1917        use std::iter::Iterator;
1918        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1919        self
1920    }
1921}
1922
1923impl wkt::message::Message for ListSubnetsResponse {
1924    fn typename() -> &'static str {
1925        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsResponse"
1926    }
1927}
1928
1929#[doc(hidden)]
1930impl gax::paginator::internal::PageableResponse for ListSubnetsResponse {
1931    type PageItem = crate::model::Subnet;
1932
1933    fn items(self) -> std::vec::Vec<Self::PageItem> {
1934        self.subnets
1935    }
1936
1937    fn next_page_token(&self) -> std::string::String {
1938        use std::clone::Clone;
1939        self.next_page_token.clone()
1940    }
1941}
1942
1943/// Request message for
1944/// [VmwareEngine.GetSubnet][google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]
1945///
1946/// [google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]: crate::client::VmwareEngine::get_subnet
1947#[serde_with::serde_as]
1948#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1949#[serde(default, rename_all = "camelCase")]
1950#[non_exhaustive]
1951pub struct GetSubnetRequest {
1952    /// Required. The resource name of the subnet to retrieve.
1953    /// Resource names are schemeless URIs that follow the conventions in
1954    /// <https://cloud.google.com/apis/design/resource_names>.
1955    /// For example:
1956    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
1957    #[serde(skip_serializing_if = "std::string::String::is_empty")]
1958    pub name: std::string::String,
1959
1960    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
1961    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1962}
1963
1964impl GetSubnetRequest {
1965    pub fn new() -> Self {
1966        std::default::Default::default()
1967    }
1968
1969    /// Sets the value of [name][crate::model::GetSubnetRequest::name].
1970    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1971        self.name = v.into();
1972        self
1973    }
1974}
1975
1976impl wkt::message::Message for GetSubnetRequest {
1977    fn typename() -> &'static str {
1978        "type.googleapis.com/google.cloud.vmwareengine.v1.GetSubnetRequest"
1979    }
1980}
1981
1982/// Request message for
1983/// [VmwareEngine.UpdateSubnet][google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]
1984///
1985/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]: crate::client::VmwareEngine::update_subnet
1986#[serde_with::serde_as]
1987#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
1988#[serde(default, rename_all = "camelCase")]
1989#[non_exhaustive]
1990pub struct UpdateSubnetRequest {
1991    /// Required. Field mask is used to specify the fields to be overwritten in the
1992    /// `Subnet` resource by the update.
1993    /// The fields specified in the `update_mask` are relative to the resource, not
1994    /// the full request. A field will be overwritten if it is in the mask. If the
1995    /// user does not provide a mask then all fields will be overwritten.
1996    #[serde(skip_serializing_if = "std::option::Option::is_none")]
1997    pub update_mask: std::option::Option<wkt::FieldMask>,
1998
1999    /// Required. Subnet description.
2000    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2001    pub subnet: std::option::Option<crate::model::Subnet>,
2002
2003    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2004    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2005}
2006
2007impl UpdateSubnetRequest {
2008    pub fn new() -> Self {
2009        std::default::Default::default()
2010    }
2011
2012    /// Sets the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
2013    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2014        mut self,
2015        v: T,
2016    ) -> Self {
2017        self.update_mask = v.into();
2018        self
2019    }
2020
2021    /// Sets the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
2022    pub fn set_subnet<T: std::convert::Into<std::option::Option<crate::model::Subnet>>>(
2023        mut self,
2024        v: T,
2025    ) -> Self {
2026        self.subnet = v.into();
2027        self
2028    }
2029}
2030
2031impl wkt::message::Message for UpdateSubnetRequest {
2032    fn typename() -> &'static str {
2033        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateSubnetRequest"
2034    }
2035}
2036
2037/// Request message for
2038/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
2039///
2040/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
2041#[serde_with::serde_as]
2042#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2043#[serde(default, rename_all = "camelCase")]
2044#[non_exhaustive]
2045pub struct ListExternalAccessRulesRequest {
2046    /// Required. The resource name of the network policy to query for external
2047    /// access firewall rules. Resource names are schemeless URIs that follow the
2048    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
2049    /// example:
2050    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
2051    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2052    pub parent: std::string::String,
2053
2054    /// The maximum number of external access rules to return in one page.
2055    /// The service may return fewer than this value.
2056    /// The maximum value is coerced to 1000.
2057    /// The default value of this field is 500.
2058    pub page_size: i32,
2059
2060    /// A page token, received from a previous `ListExternalAccessRulesRequest`
2061    /// call. Provide this to retrieve the subsequent page.
2062    ///
2063    /// When paginating, all other parameters provided to
2064    /// `ListExternalAccessRulesRequest` must match the call that provided the page
2065    /// token.
2066    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2067    pub page_token: std::string::String,
2068
2069    /// A filter expression that matches resources returned in the response.
2070    /// The expression must specify the field name, a comparison
2071    /// operator, and the value that you want to use for filtering. The value
2072    /// must be a string, a number, or a boolean. The comparison operator
2073    /// must be `=`, `!=`, `>`, or `<`.
2074    ///
2075    /// For example, if you are filtering a list of external access rules, you can
2076    /// exclude the ones named `example-rule` by specifying
2077    /// `name != "example-rule"`.
2078    ///
2079    /// To filter on multiple expressions, provide each separate expression within
2080    /// parentheses. For example:
2081    ///
2082    /// ```norust
2083    /// (name = "example-rule")
2084    /// (createTime > "2021-04-12T08:15:10.40Z")
2085    /// ```
2086    ///
2087    /// By default, each expression is an `AND` expression. However, you
2088    /// can include `AND` and `OR` expressions explicitly.
2089    /// For example:
2090    ///
2091    /// ```norust
2092    /// (name = "example-rule-1") AND
2093    /// (createTime > "2021-04-12T08:15:10.40Z") OR
2094    /// (name = "example-rule-2")
2095    /// ```
2096    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2097    pub filter: std::string::String,
2098
2099    /// Sorts list results by a certain order. By default, returned results
2100    /// are ordered by `name` in ascending order.
2101    /// You can also sort results in descending order based on the `name` value
2102    /// using `orderBy="name desc"`.
2103    /// Currently, only ordering by `name` is supported.
2104    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2105    pub order_by: std::string::String,
2106
2107    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2108    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2109}
2110
2111impl ListExternalAccessRulesRequest {
2112    pub fn new() -> Self {
2113        std::default::Default::default()
2114    }
2115
2116    /// Sets the value of [parent][crate::model::ListExternalAccessRulesRequest::parent].
2117    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2118        self.parent = v.into();
2119        self
2120    }
2121
2122    /// Sets the value of [page_size][crate::model::ListExternalAccessRulesRequest::page_size].
2123    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2124        self.page_size = v.into();
2125        self
2126    }
2127
2128    /// Sets the value of [page_token][crate::model::ListExternalAccessRulesRequest::page_token].
2129    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2130        self.page_token = v.into();
2131        self
2132    }
2133
2134    /// Sets the value of [filter][crate::model::ListExternalAccessRulesRequest::filter].
2135    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2136        self.filter = v.into();
2137        self
2138    }
2139
2140    /// Sets the value of [order_by][crate::model::ListExternalAccessRulesRequest::order_by].
2141    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2142        self.order_by = v.into();
2143        self
2144    }
2145}
2146
2147impl wkt::message::Message for ListExternalAccessRulesRequest {
2148    fn typename() -> &'static str {
2149        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest"
2150    }
2151}
2152
2153/// Response message for
2154/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
2155///
2156/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
2157#[serde_with::serde_as]
2158#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2159#[serde(default, rename_all = "camelCase")]
2160#[non_exhaustive]
2161pub struct ListExternalAccessRulesResponse {
2162    /// A list of external access firewall rules.
2163    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2164    pub external_access_rules: std::vec::Vec<crate::model::ExternalAccessRule>,
2165
2166    /// A token, which can be sent as `page_token` to retrieve the next page.
2167    /// If this field is omitted, there are no subsequent pages.
2168    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2169    pub next_page_token: std::string::String,
2170
2171    /// Locations that could not be reached when making an aggregated query using
2172    /// wildcards.
2173    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2174    pub unreachable: std::vec::Vec<std::string::String>,
2175
2176    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2177    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2178}
2179
2180impl ListExternalAccessRulesResponse {
2181    pub fn new() -> Self {
2182        std::default::Default::default()
2183    }
2184
2185    /// Sets the value of [next_page_token][crate::model::ListExternalAccessRulesResponse::next_page_token].
2186    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2187        self.next_page_token = v.into();
2188        self
2189    }
2190
2191    /// Sets the value of [external_access_rules][crate::model::ListExternalAccessRulesResponse::external_access_rules].
2192    pub fn set_external_access_rules<T, V>(mut self, v: T) -> Self
2193    where
2194        T: std::iter::IntoIterator<Item = V>,
2195        V: std::convert::Into<crate::model::ExternalAccessRule>,
2196    {
2197        use std::iter::Iterator;
2198        self.external_access_rules = v.into_iter().map(|i| i.into()).collect();
2199        self
2200    }
2201
2202    /// Sets the value of [unreachable][crate::model::ListExternalAccessRulesResponse::unreachable].
2203    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2204    where
2205        T: std::iter::IntoIterator<Item = V>,
2206        V: std::convert::Into<std::string::String>,
2207    {
2208        use std::iter::Iterator;
2209        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2210        self
2211    }
2212}
2213
2214impl wkt::message::Message for ListExternalAccessRulesResponse {
2215    fn typename() -> &'static str {
2216        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesResponse"
2217    }
2218}
2219
2220#[doc(hidden)]
2221impl gax::paginator::internal::PageableResponse for ListExternalAccessRulesResponse {
2222    type PageItem = crate::model::ExternalAccessRule;
2223
2224    fn items(self) -> std::vec::Vec<Self::PageItem> {
2225        self.external_access_rules
2226    }
2227
2228    fn next_page_token(&self) -> std::string::String {
2229        use std::clone::Clone;
2230        self.next_page_token.clone()
2231    }
2232}
2233
2234/// Request message for
2235/// [VmwareEngine.GetExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]
2236///
2237/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]: crate::client::VmwareEngine::get_external_access_rule
2238#[serde_with::serde_as]
2239#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2240#[serde(default, rename_all = "camelCase")]
2241#[non_exhaustive]
2242pub struct GetExternalAccessRuleRequest {
2243    /// Required. The resource name of the external access firewall rule to
2244    /// retrieve. Resource names are schemeless URIs that follow the conventions in
2245    /// <https://cloud.google.com/apis/design/resource_names>.
2246    /// For example:
2247    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
2248    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2249    pub name: std::string::String,
2250
2251    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2252    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2253}
2254
2255impl GetExternalAccessRuleRequest {
2256    pub fn new() -> Self {
2257        std::default::Default::default()
2258    }
2259
2260    /// Sets the value of [name][crate::model::GetExternalAccessRuleRequest::name].
2261    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2262        self.name = v.into();
2263        self
2264    }
2265}
2266
2267impl wkt::message::Message for GetExternalAccessRuleRequest {
2268    fn typename() -> &'static str {
2269        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest"
2270    }
2271}
2272
2273/// Request message for
2274/// [VmwareEngine.CreateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]
2275///
2276/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]: crate::client::VmwareEngine::create_external_access_rule
2277#[serde_with::serde_as]
2278#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2279#[serde(default, rename_all = "camelCase")]
2280#[non_exhaustive]
2281pub struct CreateExternalAccessRuleRequest {
2282    /// Required. The resource name of the network policy
2283    /// to create a new external access firewall rule in.
2284    /// Resource names are schemeless URIs that follow the conventions in
2285    /// <https://cloud.google.com/apis/design/resource_names>.
2286    /// For example:
2287    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
2288    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2289    pub parent: std::string::String,
2290
2291    /// Required. The initial description of a new external access rule.
2292    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2293    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2294
2295    /// Required. The user-provided identifier of the `ExternalAccessRule` to be
2296    /// created. This identifier must be unique among `ExternalAccessRule`
2297    /// resources within the parent and becomes the final token in the name URI.
2298    /// The identifier must meet the following requirements:
2299    ///
2300    /// * Only contains 1-63 alphanumeric characters and hyphens
2301    /// * Begins with an alphabetical character
2302    /// * Ends with a non-hyphen character
2303    /// * Not formatted as a UUID
2304    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
2305    ///   (section 3.5)
2306    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2307    pub external_access_rule_id: std::string::String,
2308
2309    /// A request ID to identify requests. Specify a unique request ID
2310    /// so that if you must retry your request, the server will know to ignore
2311    /// the request if it has already been completed. The server guarantees that a
2312    /// request doesn't result in creation of duplicate commitments for at least 60
2313    /// minutes.
2314    ///
2315    /// For example, consider a situation where you make an initial request and the
2316    /// request times out. If you make the request again with the same request ID,
2317    /// the server can check if the original operation with the same request ID was
2318    /// received, and if so, will ignore the second request. This prevents clients
2319    /// from accidentally creating duplicate commitments.
2320    ///
2321    /// The request ID must be a valid UUID with the exception that zero UUID is
2322    /// not supported (00000000-0000-0000-0000-000000000000).
2323    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2324    pub request_id: std::string::String,
2325
2326    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2327    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2328}
2329
2330impl CreateExternalAccessRuleRequest {
2331    pub fn new() -> Self {
2332        std::default::Default::default()
2333    }
2334
2335    /// Sets the value of [parent][crate::model::CreateExternalAccessRuleRequest::parent].
2336    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2337        self.parent = v.into();
2338        self
2339    }
2340
2341    /// Sets the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
2342    pub fn set_external_access_rule<
2343        T: std::convert::Into<std::option::Option<crate::model::ExternalAccessRule>>,
2344    >(
2345        mut self,
2346        v: T,
2347    ) -> Self {
2348        self.external_access_rule = v.into();
2349        self
2350    }
2351
2352    /// Sets the value of [external_access_rule_id][crate::model::CreateExternalAccessRuleRequest::external_access_rule_id].
2353    pub fn set_external_access_rule_id<T: std::convert::Into<std::string::String>>(
2354        mut self,
2355        v: T,
2356    ) -> Self {
2357        self.external_access_rule_id = v.into();
2358        self
2359    }
2360
2361    /// Sets the value of [request_id][crate::model::CreateExternalAccessRuleRequest::request_id].
2362    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2363        self.request_id = v.into();
2364        self
2365    }
2366}
2367
2368impl wkt::message::Message for CreateExternalAccessRuleRequest {
2369    fn typename() -> &'static str {
2370        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest"
2371    }
2372}
2373
2374/// Request message for
2375/// [VmwareEngine.UpdateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]
2376///
2377/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]: crate::client::VmwareEngine::update_external_access_rule
2378#[serde_with::serde_as]
2379#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2380#[serde(default, rename_all = "camelCase")]
2381#[non_exhaustive]
2382pub struct UpdateExternalAccessRuleRequest {
2383    /// Required. Field mask is used to specify the fields to be overwritten in the
2384    /// `ExternalAccessRule` resource by the update.
2385    /// The fields specified in the `update_mask` are relative to the resource, not
2386    /// the full request. A field will be overwritten if it is in the mask. If the
2387    /// user does not provide a mask then all fields will be overwritten.
2388    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2389    pub update_mask: std::option::Option<wkt::FieldMask>,
2390
2391    /// Required. Description of the external access rule.
2392    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2393    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2394
2395    /// Optional. A request ID to identify requests. Specify a unique request ID
2396    /// so that if you must retry your request, the server will know to ignore
2397    /// the request if it has already been completed. The server guarantees that a
2398    /// request doesn't result in creation of duplicate commitments for at least 60
2399    /// minutes.
2400    ///
2401    /// For example, consider a situation where you make an initial request and the
2402    /// request times out. If you make the request again with the same request ID,
2403    /// the server can check if the original operation with the same request ID was
2404    /// received, and if so, will ignore the second request. This prevents clients
2405    /// from accidentally creating duplicate commitments.
2406    ///
2407    /// The request ID must be a valid UUID with the exception that zero UUID is
2408    /// not supported (00000000-0000-0000-0000-000000000000).
2409    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2410    pub request_id: std::string::String,
2411
2412    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2413    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2414}
2415
2416impl UpdateExternalAccessRuleRequest {
2417    pub fn new() -> Self {
2418        std::default::Default::default()
2419    }
2420
2421    /// Sets the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
2422    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2423        mut self,
2424        v: T,
2425    ) -> Self {
2426        self.update_mask = v.into();
2427        self
2428    }
2429
2430    /// Sets the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
2431    pub fn set_external_access_rule<
2432        T: std::convert::Into<std::option::Option<crate::model::ExternalAccessRule>>,
2433    >(
2434        mut self,
2435        v: T,
2436    ) -> Self {
2437        self.external_access_rule = v.into();
2438        self
2439    }
2440
2441    /// Sets the value of [request_id][crate::model::UpdateExternalAccessRuleRequest::request_id].
2442    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2443        self.request_id = v.into();
2444        self
2445    }
2446}
2447
2448impl wkt::message::Message for UpdateExternalAccessRuleRequest {
2449    fn typename() -> &'static str {
2450        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest"
2451    }
2452}
2453
2454/// Request message for
2455/// [VmwareEngine.DeleteExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]
2456///
2457/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]: crate::client::VmwareEngine::delete_external_access_rule
2458#[serde_with::serde_as]
2459#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2460#[serde(default, rename_all = "camelCase")]
2461#[non_exhaustive]
2462pub struct DeleteExternalAccessRuleRequest {
2463    /// Required. The resource name of the external access firewall rule to delete.
2464    /// Resource names are schemeless URIs that follow the conventions in
2465    /// <https://cloud.google.com/apis/design/resource_names>.
2466    /// For example:
2467    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
2468    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2469    pub name: std::string::String,
2470
2471    /// Optional. A request ID to identify requests. Specify a unique request ID
2472    /// so that if you must retry your request, the server will know to ignore
2473    /// the request if it has already been completed. The server guarantees that a
2474    /// request doesn't result in creation of duplicate commitments for at least 60
2475    /// minutes.
2476    ///
2477    /// For example, consider a situation where you make an initial request and the
2478    /// request times out. If you make the request again with the same request
2479    /// ID, the server can check if the original operation with the same request ID
2480    /// was received, and if so, will ignore the second request. This prevents
2481    /// clients from accidentally creating duplicate commitments.
2482    ///
2483    /// The request ID must be a valid UUID with the exception that zero UUID is
2484    /// not supported (00000000-0000-0000-0000-000000000000).
2485    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2486    pub request_id: std::string::String,
2487
2488    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2489    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2490}
2491
2492impl DeleteExternalAccessRuleRequest {
2493    pub fn new() -> Self {
2494        std::default::Default::default()
2495    }
2496
2497    /// Sets the value of [name][crate::model::DeleteExternalAccessRuleRequest::name].
2498    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2499        self.name = v.into();
2500        self
2501    }
2502
2503    /// Sets the value of [request_id][crate::model::DeleteExternalAccessRuleRequest::request_id].
2504    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2505        self.request_id = v.into();
2506        self
2507    }
2508}
2509
2510impl wkt::message::Message for DeleteExternalAccessRuleRequest {
2511    fn typename() -> &'static str {
2512        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest"
2513    }
2514}
2515
2516/// Request message for
2517/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
2518///
2519/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
2520#[serde_with::serde_as]
2521#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2522#[serde(default, rename_all = "camelCase")]
2523#[non_exhaustive]
2524pub struct ListLoggingServersRequest {
2525    /// Required. The resource name of the private cloud to be queried for
2526    /// logging servers.
2527    /// Resource names are schemeless URIs that follow the conventions in
2528    /// <https://cloud.google.com/apis/design/resource_names>.
2529    /// For example:
2530    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
2531    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2532    pub parent: std::string::String,
2533
2534    /// The maximum number of logging servers to return in one page.
2535    /// The service may return fewer than this value.
2536    /// The maximum value is coerced to 1000.
2537    /// The default value of this field is 500.
2538    pub page_size: i32,
2539
2540    /// A page token, received from a previous `ListLoggingServersRequest` call.
2541    /// Provide this to retrieve the subsequent page.
2542    ///
2543    /// When paginating, all other parameters provided to
2544    /// `ListLoggingServersRequest` must match the call that provided the page
2545    /// token.
2546    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2547    pub page_token: std::string::String,
2548
2549    /// A filter expression that matches resources returned in the response.
2550    /// The expression must specify the field name, a comparison
2551    /// operator, and the value that you want to use for filtering. The value
2552    /// must be a string, a number, or a boolean. The comparison operator
2553    /// must be `=`, `!=`, `>`, or `<`.
2554    ///
2555    /// For example, if you are filtering a list of logging servers, you can
2556    /// exclude the ones named `example-server` by specifying
2557    /// `name != "example-server"`.
2558    ///
2559    /// To filter on multiple expressions, provide each separate expression within
2560    /// parentheses. For example:
2561    ///
2562    /// ```norust
2563    /// (name = "example-server")
2564    /// (createTime > "2021-04-12T08:15:10.40Z")
2565    /// ```
2566    ///
2567    /// By default, each expression is an `AND` expression. However, you
2568    /// can include `AND` and `OR` expressions explicitly.
2569    /// For example:
2570    ///
2571    /// ```norust
2572    /// (name = "example-server-1") AND
2573    /// (createTime > "2021-04-12T08:15:10.40Z") OR
2574    /// (name = "example-server-2")
2575    /// ```
2576    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2577    pub filter: std::string::String,
2578
2579    /// Sorts list results by a certain order. By default, returned results
2580    /// are ordered by `name` in ascending order.
2581    /// You can also sort results in descending order based on the `name` value
2582    /// using `orderBy="name desc"`.
2583    /// Currently, only ordering by `name` is supported.
2584    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2585    pub order_by: std::string::String,
2586
2587    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2588    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2589}
2590
2591impl ListLoggingServersRequest {
2592    pub fn new() -> Self {
2593        std::default::Default::default()
2594    }
2595
2596    /// Sets the value of [parent][crate::model::ListLoggingServersRequest::parent].
2597    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2598        self.parent = v.into();
2599        self
2600    }
2601
2602    /// Sets the value of [page_size][crate::model::ListLoggingServersRequest::page_size].
2603    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2604        self.page_size = v.into();
2605        self
2606    }
2607
2608    /// Sets the value of [page_token][crate::model::ListLoggingServersRequest::page_token].
2609    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2610        self.page_token = v.into();
2611        self
2612    }
2613
2614    /// Sets the value of [filter][crate::model::ListLoggingServersRequest::filter].
2615    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2616        self.filter = v.into();
2617        self
2618    }
2619
2620    /// Sets the value of [order_by][crate::model::ListLoggingServersRequest::order_by].
2621    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2622        self.order_by = v.into();
2623        self
2624    }
2625}
2626
2627impl wkt::message::Message for ListLoggingServersRequest {
2628    fn typename() -> &'static str {
2629        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersRequest"
2630    }
2631}
2632
2633/// Response message for
2634/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
2635///
2636/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
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 ListLoggingServersResponse {
2642    /// A list of Logging Servers.
2643    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2644    pub logging_servers: std::vec::Vec<crate::model::LoggingServer>,
2645
2646    /// A token, which can be send as `page_token` to retrieve the next page.
2647    /// If this field is omitted, there are no subsequent pages.
2648    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2649    pub next_page_token: std::string::String,
2650
2651    /// Locations that could not be reached when making an aggregated query using
2652    /// wildcards.
2653    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
2654    pub unreachable: std::vec::Vec<std::string::String>,
2655
2656    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2657    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2658}
2659
2660impl ListLoggingServersResponse {
2661    pub fn new() -> Self {
2662        std::default::Default::default()
2663    }
2664
2665    /// Sets the value of [next_page_token][crate::model::ListLoggingServersResponse::next_page_token].
2666    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2667        self.next_page_token = v.into();
2668        self
2669    }
2670
2671    /// Sets the value of [logging_servers][crate::model::ListLoggingServersResponse::logging_servers].
2672    pub fn set_logging_servers<T, V>(mut self, v: T) -> Self
2673    where
2674        T: std::iter::IntoIterator<Item = V>,
2675        V: std::convert::Into<crate::model::LoggingServer>,
2676    {
2677        use std::iter::Iterator;
2678        self.logging_servers = v.into_iter().map(|i| i.into()).collect();
2679        self
2680    }
2681
2682    /// Sets the value of [unreachable][crate::model::ListLoggingServersResponse::unreachable].
2683    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2684    where
2685        T: std::iter::IntoIterator<Item = V>,
2686        V: std::convert::Into<std::string::String>,
2687    {
2688        use std::iter::Iterator;
2689        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2690        self
2691    }
2692}
2693
2694impl wkt::message::Message for ListLoggingServersResponse {
2695    fn typename() -> &'static str {
2696        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersResponse"
2697    }
2698}
2699
2700#[doc(hidden)]
2701impl gax::paginator::internal::PageableResponse for ListLoggingServersResponse {
2702    type PageItem = crate::model::LoggingServer;
2703
2704    fn items(self) -> std::vec::Vec<Self::PageItem> {
2705        self.logging_servers
2706    }
2707
2708    fn next_page_token(&self) -> std::string::String {
2709        use std::clone::Clone;
2710        self.next_page_token.clone()
2711    }
2712}
2713
2714/// Request message for
2715/// [VmwareEngine.GetLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]
2716///
2717/// [google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]: crate::client::VmwareEngine::get_logging_server
2718#[serde_with::serde_as]
2719#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2720#[serde(default, rename_all = "camelCase")]
2721#[non_exhaustive]
2722pub struct GetLoggingServerRequest {
2723    /// Required. The resource name of the Logging Server to retrieve.
2724    /// Resource names are schemeless URIs that follow the conventions in
2725    /// <https://cloud.google.com/apis/design/resource_names>.
2726    /// For example:
2727    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
2728    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2729    pub name: std::string::String,
2730
2731    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2732    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2733}
2734
2735impl GetLoggingServerRequest {
2736    pub fn new() -> Self {
2737        std::default::Default::default()
2738    }
2739
2740    /// Sets the value of [name][crate::model::GetLoggingServerRequest::name].
2741    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2742        self.name = v.into();
2743        self
2744    }
2745}
2746
2747impl wkt::message::Message for GetLoggingServerRequest {
2748    fn typename() -> &'static str {
2749        "type.googleapis.com/google.cloud.vmwareengine.v1.GetLoggingServerRequest"
2750    }
2751}
2752
2753/// Request message for
2754/// [VmwareEngine.CreateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]
2755///
2756/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]: crate::client::VmwareEngine::create_logging_server
2757#[serde_with::serde_as]
2758#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2759#[serde(default, rename_all = "camelCase")]
2760#[non_exhaustive]
2761pub struct CreateLoggingServerRequest {
2762    /// Required. The resource name of the private cloud
2763    /// to create a new Logging Server in.
2764    /// Resource names are schemeless URIs that follow the conventions in
2765    /// <https://cloud.google.com/apis/design/resource_names>.
2766    /// For example:
2767    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
2768    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2769    pub parent: std::string::String,
2770
2771    /// Required. The initial description of a new logging server.
2772    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2773    pub logging_server: std::option::Option<crate::model::LoggingServer>,
2774
2775    /// Required. The user-provided identifier of the `LoggingServer` to be
2776    /// created. This identifier must be unique among `LoggingServer` resources
2777    /// within the parent and becomes the final token in the name URI.
2778    /// The identifier must meet the following requirements:
2779    ///
2780    /// * Only contains 1-63 alphanumeric characters and hyphens
2781    /// * Begins with an alphabetical character
2782    /// * Ends with a non-hyphen character
2783    /// * Not formatted as a UUID
2784    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
2785    ///   (section 3.5)
2786    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2787    pub logging_server_id: std::string::String,
2788
2789    /// Optional. A request ID to identify requests. Specify a unique request ID
2790    /// so that if you must retry your request, the server will know to ignore
2791    /// the request if it has already been completed. The server guarantees that a
2792    /// request doesn't result in creation of duplicate commitments for at least 60
2793    /// minutes.
2794    ///
2795    /// For example, consider a situation where you make an initial request and the
2796    /// request times out. If you make the request again with the same request ID,
2797    /// the server can check if original operation with the same request ID was
2798    /// received, and if so, will ignore the second request. This prevents clients
2799    /// from accidentally creating duplicate commitments.
2800    ///
2801    /// The request ID must be a valid UUID with the exception that zero UUID is
2802    /// not supported (00000000-0000-0000-0000-000000000000).
2803    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2804    pub request_id: std::string::String,
2805
2806    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2807    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2808}
2809
2810impl CreateLoggingServerRequest {
2811    pub fn new() -> Self {
2812        std::default::Default::default()
2813    }
2814
2815    /// Sets the value of [parent][crate::model::CreateLoggingServerRequest::parent].
2816    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2817        self.parent = v.into();
2818        self
2819    }
2820
2821    /// Sets the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
2822    pub fn set_logging_server<
2823        T: std::convert::Into<std::option::Option<crate::model::LoggingServer>>,
2824    >(
2825        mut self,
2826        v: T,
2827    ) -> Self {
2828        self.logging_server = v.into();
2829        self
2830    }
2831
2832    /// Sets the value of [logging_server_id][crate::model::CreateLoggingServerRequest::logging_server_id].
2833    pub fn set_logging_server_id<T: std::convert::Into<std::string::String>>(
2834        mut self,
2835        v: T,
2836    ) -> Self {
2837        self.logging_server_id = v.into();
2838        self
2839    }
2840
2841    /// Sets the value of [request_id][crate::model::CreateLoggingServerRequest::request_id].
2842    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2843        self.request_id = v.into();
2844        self
2845    }
2846}
2847
2848impl wkt::message::Message for CreateLoggingServerRequest {
2849    fn typename() -> &'static str {
2850        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateLoggingServerRequest"
2851    }
2852}
2853
2854/// Request message for
2855/// [VmwareEngine.UpdateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]
2856///
2857/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]: crate::client::VmwareEngine::update_logging_server
2858#[serde_with::serde_as]
2859#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2860#[serde(default, rename_all = "camelCase")]
2861#[non_exhaustive]
2862pub struct UpdateLoggingServerRequest {
2863    /// Required. Field mask is used to specify the fields to be overwritten in the
2864    /// `LoggingServer` resource by the update.
2865    /// The fields specified in the `update_mask` are relative to the resource, not
2866    /// the full request. A field will be overwritten if it is in the mask. If the
2867    /// user does not provide a mask then all fields will be overwritten.
2868    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2869    pub update_mask: std::option::Option<wkt::FieldMask>,
2870
2871    /// Required. Logging server description.
2872    #[serde(skip_serializing_if = "std::option::Option::is_none")]
2873    pub logging_server: std::option::Option<crate::model::LoggingServer>,
2874
2875    /// Optional. A request ID to identify requests. Specify a unique request ID
2876    /// so that if you must retry your request, the server will know to ignore
2877    /// the request if it has already been completed. The server guarantees that a
2878    /// request doesn't result in creation of duplicate commitments for at least 60
2879    /// minutes.
2880    ///
2881    /// For example, consider a situation where you make an initial request and the
2882    /// request times out. If you make the request again with the same request ID,
2883    /// the server can check if original operation with the same request ID was
2884    /// received, and if so, will ignore the second request. This prevents clients
2885    /// from accidentally creating duplicate commitments.
2886    ///
2887    /// The request ID must be a valid UUID with the exception that zero UUID is
2888    /// not supported (00000000-0000-0000-0000-000000000000).
2889    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2890    pub request_id: std::string::String,
2891
2892    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2893    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2894}
2895
2896impl UpdateLoggingServerRequest {
2897    pub fn new() -> Self {
2898        std::default::Default::default()
2899    }
2900
2901    /// Sets the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
2902    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
2903        mut self,
2904        v: T,
2905    ) -> Self {
2906        self.update_mask = v.into();
2907        self
2908    }
2909
2910    /// Sets the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
2911    pub fn set_logging_server<
2912        T: std::convert::Into<std::option::Option<crate::model::LoggingServer>>,
2913    >(
2914        mut self,
2915        v: T,
2916    ) -> Self {
2917        self.logging_server = v.into();
2918        self
2919    }
2920
2921    /// Sets the value of [request_id][crate::model::UpdateLoggingServerRequest::request_id].
2922    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2923        self.request_id = v.into();
2924        self
2925    }
2926}
2927
2928impl wkt::message::Message for UpdateLoggingServerRequest {
2929    fn typename() -> &'static str {
2930        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateLoggingServerRequest"
2931    }
2932}
2933
2934/// Request message for
2935/// [VmwareEngine.DeleteLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]
2936///
2937/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]: crate::client::VmwareEngine::delete_logging_server
2938#[serde_with::serde_as]
2939#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2940#[serde(default, rename_all = "camelCase")]
2941#[non_exhaustive]
2942pub struct DeleteLoggingServerRequest {
2943    /// Required. The resource name of the logging server to delete.
2944    /// Resource names are schemeless URIs that follow the conventions in
2945    /// <https://cloud.google.com/apis/design/resource_names>.
2946    /// For example:
2947    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
2948    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2949    pub name: std::string::String,
2950
2951    /// Optional. A request ID to identify requests. Specify a unique request ID
2952    /// so that if you must retry your request, the server will know to ignore
2953    /// the request if it has already been completed. The server guarantees that a
2954    /// request doesn't result in creation of duplicate commitments for at least 60
2955    /// minutes.
2956    ///
2957    /// For example, consider a situation where you make an initial request and the
2958    /// request times out. If you make the request again with the same request
2959    /// ID, the server can check if original operation with the same request ID
2960    /// was received, and if so, will ignore the second request. This prevents
2961    /// clients from accidentally creating duplicate commitments.
2962    ///
2963    /// The request ID must be a valid UUID with the exception that zero UUID is
2964    /// not supported (00000000-0000-0000-0000-000000000000).
2965    #[serde(skip_serializing_if = "std::string::String::is_empty")]
2966    pub request_id: std::string::String,
2967
2968    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
2969    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2970}
2971
2972impl DeleteLoggingServerRequest {
2973    pub fn new() -> Self {
2974        std::default::Default::default()
2975    }
2976
2977    /// Sets the value of [name][crate::model::DeleteLoggingServerRequest::name].
2978    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2979        self.name = v.into();
2980        self
2981    }
2982
2983    /// Sets the value of [request_id][crate::model::DeleteLoggingServerRequest::request_id].
2984    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2985        self.request_id = v.into();
2986        self
2987    }
2988}
2989
2990impl wkt::message::Message for DeleteLoggingServerRequest {
2991    fn typename() -> &'static str {
2992        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteLoggingServerRequest"
2993    }
2994}
2995
2996/// Represents the metadata of the long-running operation.
2997#[serde_with::serde_as]
2998#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
2999#[serde(default, rename_all = "camelCase")]
3000#[non_exhaustive]
3001pub struct OperationMetadata {
3002    /// Output only. The time the operation was created.
3003    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3004    pub create_time: std::option::Option<wkt::Timestamp>,
3005
3006    /// Output only. The time the operation finished running.
3007    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3008    pub end_time: std::option::Option<wkt::Timestamp>,
3009
3010    /// Output only. Server-defined resource path for the target of the operation.
3011    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3012    pub target: std::string::String,
3013
3014    /// Output only. Name of the verb executed by the operation.
3015    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3016    pub verb: std::string::String,
3017
3018    /// Output only. Human-readable status of the operation, if any.
3019    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3020    pub status_message: std::string::String,
3021
3022    /// Output only. True if the user has requested cancellation
3023    /// of the operation; false otherwise.
3024    /// Operations that have successfully been cancelled
3025    /// have [Operation.error][] value with a
3026    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
3027    /// `Code.CANCELLED`.
3028    ///
3029    /// [google.rpc.Status.code]: rpc::model::Status::code
3030    pub requested_cancellation: bool,
3031
3032    /// Output only. API version used to start the operation.
3033    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3034    pub api_version: std::string::String,
3035
3036    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3037    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3038}
3039
3040impl OperationMetadata {
3041    pub fn new() -> Self {
3042        std::default::Default::default()
3043    }
3044
3045    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
3046    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3047        mut self,
3048        v: T,
3049    ) -> Self {
3050        self.create_time = v.into();
3051        self
3052    }
3053
3054    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
3055    pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
3056        mut self,
3057        v: T,
3058    ) -> Self {
3059        self.end_time = v.into();
3060        self
3061    }
3062
3063    /// Sets the value of [target][crate::model::OperationMetadata::target].
3064    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3065        self.target = v.into();
3066        self
3067    }
3068
3069    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
3070    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3071        self.verb = v.into();
3072        self
3073    }
3074
3075    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
3076    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3077        self.status_message = v.into();
3078        self
3079    }
3080
3081    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
3082    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3083        self.requested_cancellation = v.into();
3084        self
3085    }
3086
3087    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
3088    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3089        self.api_version = v.into();
3090        self
3091    }
3092}
3093
3094impl wkt::message::Message for OperationMetadata {
3095    fn typename() -> &'static str {
3096        "type.googleapis.com/google.cloud.vmwareengine.v1.OperationMetadata"
3097    }
3098}
3099
3100/// Request message for
3101/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
3102///
3103/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
3104#[serde_with::serde_as]
3105#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3106#[serde(default, rename_all = "camelCase")]
3107#[non_exhaustive]
3108pub struct ListNodeTypesRequest {
3109    /// Required. The resource name of the location to be queried for node types.
3110    /// Resource names are schemeless URIs that follow the conventions in
3111    /// <https://cloud.google.com/apis/design/resource_names>.
3112    /// For example:
3113    /// `projects/my-project/locations/us-central1-a`
3114    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3115    pub parent: std::string::String,
3116
3117    /// The maximum number of node types to return in one page.
3118    /// The service may return fewer than this value.
3119    /// The maximum value is coerced to 1000.
3120    /// The default value of this field is 500.
3121    pub page_size: i32,
3122
3123    /// A page token, received from a previous `ListNodeTypes` call.
3124    /// Provide this to retrieve the subsequent page.
3125    ///
3126    /// When paginating, all other parameters provided to
3127    /// `ListNodeTypes` must match the call that provided the page token.
3128    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3129    pub page_token: std::string::String,
3130
3131    /// A filter expression that matches resources returned in the response.
3132    /// The expression must specify the field name, a comparison
3133    /// operator, and the value that you want to use for filtering. The value
3134    /// must be a string, a number, or a boolean. The comparison operator
3135    /// must be `=`, `!=`, `>`, or `<`.
3136    ///
3137    /// For example, if you are filtering a list of node types, you can
3138    /// exclude the ones named `standard-72` by specifying
3139    /// `name != "standard-72"`.
3140    ///
3141    /// To filter on multiple expressions, provide each separate expression within
3142    /// parentheses. For example:
3143    ///
3144    /// ```norust
3145    /// (name = "standard-72")
3146    /// (virtual_cpu_count > 2)
3147    /// ```
3148    ///
3149    /// By default, each expression is an `AND` expression. However, you
3150    /// can include `AND` and `OR` expressions explicitly.
3151    /// For example:
3152    ///
3153    /// ```norust
3154    /// (name = "standard-96") AND
3155    /// (virtual_cpu_count > 2) OR
3156    /// (name = "standard-72")
3157    /// ```
3158    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3159    pub filter: std::string::String,
3160
3161    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3162    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3163}
3164
3165impl ListNodeTypesRequest {
3166    pub fn new() -> Self {
3167        std::default::Default::default()
3168    }
3169
3170    /// Sets the value of [parent][crate::model::ListNodeTypesRequest::parent].
3171    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3172        self.parent = v.into();
3173        self
3174    }
3175
3176    /// Sets the value of [page_size][crate::model::ListNodeTypesRequest::page_size].
3177    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3178        self.page_size = v.into();
3179        self
3180    }
3181
3182    /// Sets the value of [page_token][crate::model::ListNodeTypesRequest::page_token].
3183    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3184        self.page_token = v.into();
3185        self
3186    }
3187
3188    /// Sets the value of [filter][crate::model::ListNodeTypesRequest::filter].
3189    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3190        self.filter = v.into();
3191        self
3192    }
3193}
3194
3195impl wkt::message::Message for ListNodeTypesRequest {
3196    fn typename() -> &'static str {
3197        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesRequest"
3198    }
3199}
3200
3201/// Response message for
3202/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
3203///
3204/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
3205#[serde_with::serde_as]
3206#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3207#[serde(default, rename_all = "camelCase")]
3208#[non_exhaustive]
3209pub struct ListNodeTypesResponse {
3210    /// A list of Node Types.
3211    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3212    pub node_types: std::vec::Vec<crate::model::NodeType>,
3213
3214    /// A token, which can be sent as `page_token` to retrieve the next page.
3215    /// If this field is omitted, there are no subsequent pages.
3216    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3217    pub next_page_token: std::string::String,
3218
3219    /// Locations that could not be reached when making an aggregated query using
3220    /// wildcards.
3221    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3222    pub unreachable: std::vec::Vec<std::string::String>,
3223
3224    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3225    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3226}
3227
3228impl ListNodeTypesResponse {
3229    pub fn new() -> Self {
3230        std::default::Default::default()
3231    }
3232
3233    /// Sets the value of [next_page_token][crate::model::ListNodeTypesResponse::next_page_token].
3234    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3235        self.next_page_token = v.into();
3236        self
3237    }
3238
3239    /// Sets the value of [node_types][crate::model::ListNodeTypesResponse::node_types].
3240    pub fn set_node_types<T, V>(mut self, v: T) -> Self
3241    where
3242        T: std::iter::IntoIterator<Item = V>,
3243        V: std::convert::Into<crate::model::NodeType>,
3244    {
3245        use std::iter::Iterator;
3246        self.node_types = v.into_iter().map(|i| i.into()).collect();
3247        self
3248    }
3249
3250    /// Sets the value of [unreachable][crate::model::ListNodeTypesResponse::unreachable].
3251    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3252    where
3253        T: std::iter::IntoIterator<Item = V>,
3254        V: std::convert::Into<std::string::String>,
3255    {
3256        use std::iter::Iterator;
3257        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3258        self
3259    }
3260}
3261
3262impl wkt::message::Message for ListNodeTypesResponse {
3263    fn typename() -> &'static str {
3264        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesResponse"
3265    }
3266}
3267
3268#[doc(hidden)]
3269impl gax::paginator::internal::PageableResponse for ListNodeTypesResponse {
3270    type PageItem = crate::model::NodeType;
3271
3272    fn items(self) -> std::vec::Vec<Self::PageItem> {
3273        self.node_types
3274    }
3275
3276    fn next_page_token(&self) -> std::string::String {
3277        use std::clone::Clone;
3278        self.next_page_token.clone()
3279    }
3280}
3281
3282/// Request message for
3283/// [VmwareEngine.GetNodeType][google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]
3284///
3285/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]: crate::client::VmwareEngine::get_node_type
3286#[serde_with::serde_as]
3287#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3288#[serde(default, rename_all = "camelCase")]
3289#[non_exhaustive]
3290pub struct GetNodeTypeRequest {
3291    /// Required. The resource name of the node type to retrieve.
3292    /// Resource names are schemeless URIs that follow the conventions in
3293    /// <https://cloud.google.com/apis/design/resource_names>.
3294    /// For example:
3295    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
3296    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3297    pub name: std::string::String,
3298
3299    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3300    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3301}
3302
3303impl GetNodeTypeRequest {
3304    pub fn new() -> Self {
3305        std::default::Default::default()
3306    }
3307
3308    /// Sets the value of [name][crate::model::GetNodeTypeRequest::name].
3309    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3310        self.name = v.into();
3311        self
3312    }
3313}
3314
3315impl wkt::message::Message for GetNodeTypeRequest {
3316    fn typename() -> &'static str {
3317        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeTypeRequest"
3318    }
3319}
3320
3321/// Request message for
3322/// [VmwareEngine.ShowNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]
3323///
3324/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]: crate::client::VmwareEngine::show_nsx_credentials
3325#[serde_with::serde_as]
3326#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3327#[serde(default, rename_all = "camelCase")]
3328#[non_exhaustive]
3329pub struct ShowNsxCredentialsRequest {
3330    /// Required. The resource name of the private cloud
3331    /// to be queried for credentials.
3332    /// Resource names are schemeless URIs that follow the conventions in
3333    /// <https://cloud.google.com/apis/design/resource_names>.
3334    /// For example:
3335    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3336    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3337    pub private_cloud: std::string::String,
3338
3339    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3340    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3341}
3342
3343impl ShowNsxCredentialsRequest {
3344    pub fn new() -> Self {
3345        std::default::Default::default()
3346    }
3347
3348    /// Sets the value of [private_cloud][crate::model::ShowNsxCredentialsRequest::private_cloud].
3349    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3350        self.private_cloud = v.into();
3351        self
3352    }
3353}
3354
3355impl wkt::message::Message for ShowNsxCredentialsRequest {
3356    fn typename() -> &'static str {
3357        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest"
3358    }
3359}
3360
3361/// Request message for
3362/// [VmwareEngine.ShowVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]
3363///
3364/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]: crate::client::VmwareEngine::show_vcenter_credentials
3365#[serde_with::serde_as]
3366#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3367#[serde(default, rename_all = "camelCase")]
3368#[non_exhaustive]
3369pub struct ShowVcenterCredentialsRequest {
3370    /// Required. The resource name of the private cloud
3371    /// to be queried for credentials.
3372    /// Resource names are schemeless URIs that follow the conventions in
3373    /// <https://cloud.google.com/apis/design/resource_names>.
3374    /// For example:
3375    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3376    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3377    pub private_cloud: std::string::String,
3378
3379    /// Optional. The username of the user to be queried for credentials.
3380    /// The default value of this field is CloudOwner@gve.local.
3381    /// The provided value must be one of the following:
3382    /// CloudOwner@gve.local,
3383    /// solution-user-01@gve.local,
3384    /// solution-user-02@gve.local,
3385    /// solution-user-03@gve.local,
3386    /// solution-user-04@gve.local,
3387    /// solution-user-05@gve.local,
3388    /// zertoadmin@gve.local.
3389    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3390    pub username: std::string::String,
3391
3392    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3393    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3394}
3395
3396impl ShowVcenterCredentialsRequest {
3397    pub fn new() -> Self {
3398        std::default::Default::default()
3399    }
3400
3401    /// Sets the value of [private_cloud][crate::model::ShowVcenterCredentialsRequest::private_cloud].
3402    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3403        self.private_cloud = v.into();
3404        self
3405    }
3406
3407    /// Sets the value of [username][crate::model::ShowVcenterCredentialsRequest::username].
3408    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3409        self.username = v.into();
3410        self
3411    }
3412}
3413
3414impl wkt::message::Message for ShowVcenterCredentialsRequest {
3415    fn typename() -> &'static str {
3416        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest"
3417    }
3418}
3419
3420/// Request message for
3421/// [VmwareEngine.ResetNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]
3422///
3423/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]: crate::client::VmwareEngine::reset_nsx_credentials
3424#[serde_with::serde_as]
3425#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3426#[serde(default, rename_all = "camelCase")]
3427#[non_exhaustive]
3428pub struct ResetNsxCredentialsRequest {
3429    /// Required. The resource name of the private cloud
3430    /// to reset credentials for.
3431    /// Resource names are schemeless URIs that follow the conventions in
3432    /// <https://cloud.google.com/apis/design/resource_names>.
3433    /// For example:
3434    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3435    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3436    pub private_cloud: std::string::String,
3437
3438    /// Optional. A request ID to identify requests. Specify a unique request ID
3439    /// so that if you must retry your request, the server will know to ignore
3440    /// the request if it has already been completed. The server guarantees that a
3441    /// request doesn't result in creation of duplicate commitments for at least 60
3442    /// minutes.
3443    ///
3444    /// For example, consider a situation where you make an initial request and the
3445    /// request times out. If you make the request again with the same request
3446    /// ID, the server can check if original operation with the same request ID
3447    /// was received, and if so, will ignore the second request. This prevents
3448    /// clients from accidentally creating duplicate commitments.
3449    ///
3450    /// The request ID must be a valid UUID with the exception that zero UUID is
3451    /// not supported (00000000-0000-0000-0000-000000000000).
3452    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3453    pub request_id: std::string::String,
3454
3455    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3456    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3457}
3458
3459impl ResetNsxCredentialsRequest {
3460    pub fn new() -> Self {
3461        std::default::Default::default()
3462    }
3463
3464    /// Sets the value of [private_cloud][crate::model::ResetNsxCredentialsRequest::private_cloud].
3465    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3466        self.private_cloud = v.into();
3467        self
3468    }
3469
3470    /// Sets the value of [request_id][crate::model::ResetNsxCredentialsRequest::request_id].
3471    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3472        self.request_id = v.into();
3473        self
3474    }
3475}
3476
3477impl wkt::message::Message for ResetNsxCredentialsRequest {
3478    fn typename() -> &'static str {
3479        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest"
3480    }
3481}
3482
3483/// Request message for
3484/// [VmwareEngine.ResetVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]
3485///
3486/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]: crate::client::VmwareEngine::reset_vcenter_credentials
3487#[serde_with::serde_as]
3488#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3489#[serde(default, rename_all = "camelCase")]
3490#[non_exhaustive]
3491pub struct ResetVcenterCredentialsRequest {
3492    /// Required. The resource name of the private cloud
3493    /// to reset credentials for.
3494    /// Resource names are schemeless URIs that follow the conventions in
3495    /// <https://cloud.google.com/apis/design/resource_names>.
3496    /// For example:
3497    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3498    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3499    pub private_cloud: std::string::String,
3500
3501    /// Optional. A request ID to identify requests. Specify a unique request ID
3502    /// so that if you must retry your request, the server will know to ignore
3503    /// the request if it has already been completed. The server guarantees that a
3504    /// request doesn't result in creation of duplicate commitments for at least 60
3505    /// minutes.
3506    ///
3507    /// For example, consider a situation where you make an initial request and the
3508    /// request times out. If you make the request again with the same request
3509    /// ID, the server can check if original operation with the same request ID
3510    /// was received, and if so, will ignore the second request. This prevents
3511    /// clients from accidentally creating duplicate commitments.
3512    ///
3513    /// The request ID must be a valid UUID with the exception that zero UUID is
3514    /// not supported (00000000-0000-0000-0000-000000000000).
3515    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3516    pub request_id: std::string::String,
3517
3518    /// Optional. The username of the user to be to reset the credentials.
3519    /// The default value of this field is CloudOwner@gve.local.
3520    /// The provided value should be one of the following:
3521    /// solution-user-01@gve.local,
3522    /// solution-user-02@gve.local,
3523    /// solution-user-03@gve.local,
3524    /// solution-user-04@gve.local,
3525    /// solution-user-05@gve.local,
3526    /// zertoadmin@gve.local.
3527    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3528    pub username: std::string::String,
3529
3530    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3531    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3532}
3533
3534impl ResetVcenterCredentialsRequest {
3535    pub fn new() -> Self {
3536        std::default::Default::default()
3537    }
3538
3539    /// Sets the value of [private_cloud][crate::model::ResetVcenterCredentialsRequest::private_cloud].
3540    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3541        self.private_cloud = v.into();
3542        self
3543    }
3544
3545    /// Sets the value of [request_id][crate::model::ResetVcenterCredentialsRequest::request_id].
3546    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3547        self.request_id = v.into();
3548        self
3549    }
3550
3551    /// Sets the value of [username][crate::model::ResetVcenterCredentialsRequest::username].
3552    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3553        self.username = v.into();
3554        self
3555    }
3556}
3557
3558impl wkt::message::Message for ResetVcenterCredentialsRequest {
3559    fn typename() -> &'static str {
3560        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest"
3561    }
3562}
3563
3564/// Response message for
3565/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
3566///
3567/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
3568#[serde_with::serde_as]
3569#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3570#[serde(default, rename_all = "camelCase")]
3571#[non_exhaustive]
3572pub struct ListHcxActivationKeysResponse {
3573    /// List of HCX activation keys.
3574    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3575    pub hcx_activation_keys: std::vec::Vec<crate::model::HcxActivationKey>,
3576
3577    /// A token, which can be sent as `page_token` to retrieve the next page.
3578    /// If this field is omitted, there are no subsequent pages.
3579    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3580    pub next_page_token: std::string::String,
3581
3582    /// Locations that could not be reached when making an aggregated query using
3583    /// wildcards.
3584    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
3585    pub unreachable: std::vec::Vec<std::string::String>,
3586
3587    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3588    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3589}
3590
3591impl ListHcxActivationKeysResponse {
3592    pub fn new() -> Self {
3593        std::default::Default::default()
3594    }
3595
3596    /// Sets the value of [next_page_token][crate::model::ListHcxActivationKeysResponse::next_page_token].
3597    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3598        self.next_page_token = v.into();
3599        self
3600    }
3601
3602    /// Sets the value of [hcx_activation_keys][crate::model::ListHcxActivationKeysResponse::hcx_activation_keys].
3603    pub fn set_hcx_activation_keys<T, V>(mut self, v: T) -> Self
3604    where
3605        T: std::iter::IntoIterator<Item = V>,
3606        V: std::convert::Into<crate::model::HcxActivationKey>,
3607    {
3608        use std::iter::Iterator;
3609        self.hcx_activation_keys = v.into_iter().map(|i| i.into()).collect();
3610        self
3611    }
3612
3613    /// Sets the value of [unreachable][crate::model::ListHcxActivationKeysResponse::unreachable].
3614    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3615    where
3616        T: std::iter::IntoIterator<Item = V>,
3617        V: std::convert::Into<std::string::String>,
3618    {
3619        use std::iter::Iterator;
3620        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3621        self
3622    }
3623}
3624
3625impl wkt::message::Message for ListHcxActivationKeysResponse {
3626    fn typename() -> &'static str {
3627        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse"
3628    }
3629}
3630
3631#[doc(hidden)]
3632impl gax::paginator::internal::PageableResponse for ListHcxActivationKeysResponse {
3633    type PageItem = crate::model::HcxActivationKey;
3634
3635    fn items(self) -> std::vec::Vec<Self::PageItem> {
3636        self.hcx_activation_keys
3637    }
3638
3639    fn next_page_token(&self) -> std::string::String {
3640        use std::clone::Clone;
3641        self.next_page_token.clone()
3642    }
3643}
3644
3645/// Request message for
3646/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
3647///
3648/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
3649#[serde_with::serde_as]
3650#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3651#[serde(default, rename_all = "camelCase")]
3652#[non_exhaustive]
3653pub struct ListHcxActivationKeysRequest {
3654    /// Required. The resource name of the private cloud
3655    /// to be queried for HCX activation keys.
3656    /// Resource names are schemeless URIs that follow the conventions in
3657    /// <https://cloud.google.com/apis/design/resource_names>.
3658    /// For example:
3659    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
3660    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3661    pub parent: std::string::String,
3662
3663    /// The maximum number of HCX activation keys to return in one page.
3664    /// The service may return fewer than this value.
3665    /// The maximum value is coerced to 1000.
3666    /// The default value of this field is 500.
3667    pub page_size: i32,
3668
3669    /// A page token, received from a previous `ListHcxActivationKeys` call.
3670    /// Provide this to retrieve the subsequent page.
3671    ///
3672    /// When paginating, all other parameters provided to
3673    /// `ListHcxActivationKeys` must match the call that provided the page
3674    /// token.
3675    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3676    pub page_token: std::string::String,
3677
3678    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3679    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3680}
3681
3682impl ListHcxActivationKeysRequest {
3683    pub fn new() -> Self {
3684        std::default::Default::default()
3685    }
3686
3687    /// Sets the value of [parent][crate::model::ListHcxActivationKeysRequest::parent].
3688    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3689        self.parent = v.into();
3690        self
3691    }
3692
3693    /// Sets the value of [page_size][crate::model::ListHcxActivationKeysRequest::page_size].
3694    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3695        self.page_size = v.into();
3696        self
3697    }
3698
3699    /// Sets the value of [page_token][crate::model::ListHcxActivationKeysRequest::page_token].
3700    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3701        self.page_token = v.into();
3702        self
3703    }
3704}
3705
3706impl wkt::message::Message for ListHcxActivationKeysRequest {
3707    fn typename() -> &'static str {
3708        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest"
3709    }
3710}
3711
3712/// Request message for [VmwareEngine.GetHcxActivationKeys][]
3713#[serde_with::serde_as]
3714#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3715#[serde(default, rename_all = "camelCase")]
3716#[non_exhaustive]
3717pub struct GetHcxActivationKeyRequest {
3718    /// Required. The resource name of the HCX activation key to retrieve.
3719    /// Resource names are schemeless URIs that follow the conventions in
3720    /// <https://cloud.google.com/apis/design/resource_names>.
3721    /// For example:
3722    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
3723    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3724    pub name: std::string::String,
3725
3726    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3727    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3728}
3729
3730impl GetHcxActivationKeyRequest {
3731    pub fn new() -> Self {
3732        std::default::Default::default()
3733    }
3734
3735    /// Sets the value of [name][crate::model::GetHcxActivationKeyRequest::name].
3736    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3737        self.name = v.into();
3738        self
3739    }
3740}
3741
3742impl wkt::message::Message for GetHcxActivationKeyRequest {
3743    fn typename() -> &'static str {
3744        "type.googleapis.com/google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest"
3745    }
3746}
3747
3748/// Request message for
3749/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
3750///
3751/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
3752#[serde_with::serde_as]
3753#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3754#[serde(default, rename_all = "camelCase")]
3755#[non_exhaustive]
3756pub struct CreateHcxActivationKeyRequest {
3757    /// Required. The resource name of the private cloud to create the key for.
3758    /// Resource names are schemeless URIs that follow the conventions in
3759    /// <https://cloud.google.com/apis/design/resource_names>.
3760    /// For example:
3761    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
3762    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3763    pub parent: std::string::String,
3764
3765    /// Required. The initial description of a new HCX activation key. When
3766    /// creating a new key, this field must be an empty object.
3767    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3768    pub hcx_activation_key: std::option::Option<crate::model::HcxActivationKey>,
3769
3770    /// Required. The user-provided identifier of the `HcxActivationKey` to be
3771    /// created. This identifier must be unique among `HcxActivationKey` resources
3772    /// within the parent and becomes the final token in the name URI.
3773    /// The identifier must meet the following requirements:
3774    ///
3775    /// * Only contains 1-63 alphanumeric characters and hyphens
3776    /// * Begins with an alphabetical character
3777    /// * Ends with a non-hyphen character
3778    /// * Not formatted as a UUID
3779    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
3780    ///   (section 3.5)
3781    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3782    pub hcx_activation_key_id: std::string::String,
3783
3784    /// A request ID to identify requests. Specify a unique request ID
3785    /// so that if you must retry your request, the server will know to ignore
3786    /// the request if it has already been completed. The server guarantees that a
3787    /// request doesn't result in creation of duplicate commitments for at least 60
3788    /// minutes.
3789    ///
3790    /// For example, consider a situation where you make an initial request and the
3791    /// request times out. If you make the request again with the same request ID,
3792    /// the server can check if original operation with the same request ID was
3793    /// received, and if so, will ignore the second request. This prevents clients
3794    /// from accidentally creating duplicate commitments.
3795    ///
3796    /// The request ID must be a valid UUID with the exception that zero UUID is
3797    /// not supported (00000000-0000-0000-0000-000000000000).
3798    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3799    pub request_id: std::string::String,
3800
3801    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3802    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3803}
3804
3805impl CreateHcxActivationKeyRequest {
3806    pub fn new() -> Self {
3807        std::default::Default::default()
3808    }
3809
3810    /// Sets the value of [parent][crate::model::CreateHcxActivationKeyRequest::parent].
3811    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3812        self.parent = v.into();
3813        self
3814    }
3815
3816    /// Sets the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
3817    pub fn set_hcx_activation_key<
3818        T: std::convert::Into<std::option::Option<crate::model::HcxActivationKey>>,
3819    >(
3820        mut self,
3821        v: T,
3822    ) -> Self {
3823        self.hcx_activation_key = v.into();
3824        self
3825    }
3826
3827    /// Sets the value of [hcx_activation_key_id][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key_id].
3828    pub fn set_hcx_activation_key_id<T: std::convert::Into<std::string::String>>(
3829        mut self,
3830        v: T,
3831    ) -> Self {
3832        self.hcx_activation_key_id = v.into();
3833        self
3834    }
3835
3836    /// Sets the value of [request_id][crate::model::CreateHcxActivationKeyRequest::request_id].
3837    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3838        self.request_id = v.into();
3839        self
3840    }
3841}
3842
3843impl wkt::message::Message for CreateHcxActivationKeyRequest {
3844    fn typename() -> &'static str {
3845        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest"
3846    }
3847}
3848
3849/// Request message for
3850/// [VmwareEngine.GetDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]
3851///
3852/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]: crate::client::VmwareEngine::get_dns_forwarding
3853#[serde_with::serde_as]
3854#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3855#[serde(default, rename_all = "camelCase")]
3856#[non_exhaustive]
3857pub struct GetDnsForwardingRequest {
3858    /// Required. The resource name of a `DnsForwarding` to retrieve.
3859    /// Resource names are schemeless URIs that follow the conventions in
3860    /// <https://cloud.google.com/apis/design/resource_names>.
3861    /// For example:
3862    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
3863    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3864    pub name: std::string::String,
3865
3866    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3867    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3868}
3869
3870impl GetDnsForwardingRequest {
3871    pub fn new() -> Self {
3872        std::default::Default::default()
3873    }
3874
3875    /// Sets the value of [name][crate::model::GetDnsForwardingRequest::name].
3876    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3877        self.name = v.into();
3878        self
3879    }
3880}
3881
3882impl wkt::message::Message for GetDnsForwardingRequest {
3883    fn typename() -> &'static str {
3884        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsForwardingRequest"
3885    }
3886}
3887
3888/// Request message for
3889/// [VmwareEngine.UpdateDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]
3890///
3891/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]: crate::client::VmwareEngine::update_dns_forwarding
3892#[serde_with::serde_as]
3893#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3894#[serde(default, rename_all = "camelCase")]
3895#[non_exhaustive]
3896pub struct UpdateDnsForwardingRequest {
3897    /// Required. DnsForwarding config details.
3898    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3899    pub dns_forwarding: std::option::Option<crate::model::DnsForwarding>,
3900
3901    /// Required. Field mask is used to specify the fields to be overwritten in the
3902    /// `DnsForwarding` resource by the update.
3903    /// The fields specified in the `update_mask` are relative to the resource, not
3904    /// the full request. A field will be overwritten if it is in the mask. If the
3905    /// user does not provide a mask then all fields will be overwritten.
3906    #[serde(skip_serializing_if = "std::option::Option::is_none")]
3907    pub update_mask: std::option::Option<wkt::FieldMask>,
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 ID,
3917    /// the server can check if original operation with the same request ID was
3918    /// received, and if so, will ignore the second request. This prevents clients
3919    /// 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    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
3927    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3928}
3929
3930impl UpdateDnsForwardingRequest {
3931    pub fn new() -> Self {
3932        std::default::Default::default()
3933    }
3934
3935    /// Sets the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
3936    pub fn set_dns_forwarding<
3937        T: std::convert::Into<std::option::Option<crate::model::DnsForwarding>>,
3938    >(
3939        mut self,
3940        v: T,
3941    ) -> Self {
3942        self.dns_forwarding = v.into();
3943        self
3944    }
3945
3946    /// Sets the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
3947    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
3948        mut self,
3949        v: T,
3950    ) -> Self {
3951        self.update_mask = v.into();
3952        self
3953    }
3954
3955    /// Sets the value of [request_id][crate::model::UpdateDnsForwardingRequest::request_id].
3956    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3957        self.request_id = v.into();
3958        self
3959    }
3960}
3961
3962impl wkt::message::Message for UpdateDnsForwardingRequest {
3963    fn typename() -> &'static str {
3964        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest"
3965    }
3966}
3967
3968/// Request message for
3969/// [VmwareEngine.CreateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]
3970///
3971/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]: crate::client::VmwareEngine::create_network_peering
3972#[serde_with::serde_as]
3973#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
3974#[serde(default, rename_all = "camelCase")]
3975#[non_exhaustive]
3976pub struct CreateNetworkPeeringRequest {
3977    /// Required. The resource name of the location to create the new network
3978    /// peering in. This value is always `global`, because `NetworkPeering` is a
3979    /// global resource. Resource names are schemeless URIs that follow the
3980    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
3981    /// example: `projects/my-project/locations/global`
3982    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3983    pub parent: std::string::String,
3984
3985    /// Required. The user-provided identifier of the new `NetworkPeering`.
3986    /// This identifier must be unique among `NetworkPeering` resources within the
3987    /// parent and becomes the final token in the name URI.
3988    /// The identifier must meet the following requirements:
3989    ///
3990    /// * Only contains 1-63 alphanumeric characters and hyphens
3991    /// * Begins with an alphabetical character
3992    /// * Ends with a non-hyphen character
3993    /// * Not formatted as a UUID
3994    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
3995    ///   (section 3.5)
3996    #[serde(skip_serializing_if = "std::string::String::is_empty")]
3997    pub network_peering_id: std::string::String,
3998
3999    /// Required. The initial description of the new network peering.
4000    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4001    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
4002
4003    /// Optional. A request ID to identify requests. Specify a unique request ID
4004    /// so that if you must retry your request, the server will know to ignore
4005    /// the request if it has already been completed. The server guarantees that a
4006    /// request doesn't result in creation of duplicate commitments for at least 60
4007    /// minutes.
4008    ///
4009    /// For example, consider a situation where you make an initial request and the
4010    /// request times out. If you make the request again with the same request
4011    /// ID, the server can check if original operation with the same request ID
4012    /// was received, and if so, will ignore the second request. This prevents
4013    /// clients from accidentally creating duplicate commitments.
4014    ///
4015    /// The request ID must be a valid UUID with the exception that zero UUID is
4016    /// not supported (00000000-0000-0000-0000-000000000000).
4017    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4018    pub request_id: std::string::String,
4019
4020    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4021    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4022}
4023
4024impl CreateNetworkPeeringRequest {
4025    pub fn new() -> Self {
4026        std::default::Default::default()
4027    }
4028
4029    /// Sets the value of [parent][crate::model::CreateNetworkPeeringRequest::parent].
4030    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4031        self.parent = v.into();
4032        self
4033    }
4034
4035    /// Sets the value of [network_peering_id][crate::model::CreateNetworkPeeringRequest::network_peering_id].
4036    pub fn set_network_peering_id<T: std::convert::Into<std::string::String>>(
4037        mut self,
4038        v: T,
4039    ) -> Self {
4040        self.network_peering_id = v.into();
4041        self
4042    }
4043
4044    /// Sets the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
4045    pub fn set_network_peering<
4046        T: std::convert::Into<std::option::Option<crate::model::NetworkPeering>>,
4047    >(
4048        mut self,
4049        v: T,
4050    ) -> Self {
4051        self.network_peering = v.into();
4052        self
4053    }
4054
4055    /// Sets the value of [request_id][crate::model::CreateNetworkPeeringRequest::request_id].
4056    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4057        self.request_id = v.into();
4058        self
4059    }
4060}
4061
4062impl wkt::message::Message for CreateNetworkPeeringRequest {
4063    fn typename() -> &'static str {
4064        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest"
4065    }
4066}
4067
4068/// Request message for
4069/// [VmwareEngine.DeleteNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]
4070///
4071/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]: crate::client::VmwareEngine::delete_network_peering
4072#[serde_with::serde_as]
4073#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4074#[serde(default, rename_all = "camelCase")]
4075#[non_exhaustive]
4076pub struct DeleteNetworkPeeringRequest {
4077    /// Required. The resource name of the network peering to be deleted.
4078    /// Resource names are schemeless URIs that follow the conventions in
4079    /// <https://cloud.google.com/apis/design/resource_names>.
4080    /// For example:
4081    /// `projects/my-project/locations/global/networkPeerings/my-peering`
4082    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4083    pub name: std::string::String,
4084
4085    /// Optional. A request ID to identify requests. Specify a unique request ID
4086    /// so that if you must retry your request, the server will know to ignore
4087    /// the request if it has already been completed. The server guarantees that a
4088    /// request doesn't result in creation of duplicate commitments for at least 60
4089    /// minutes.
4090    ///
4091    /// For example, consider a situation where you make an initial request and the
4092    /// request times out. If you make the request again with the same request
4093    /// ID, the server can check if original operation with the same request ID
4094    /// was received, and if so, will ignore the second request. This prevents
4095    /// clients from accidentally creating duplicate commitments.
4096    ///
4097    /// The request ID must be a valid UUID with the exception that zero UUID is
4098    /// not supported (00000000-0000-0000-0000-000000000000).
4099    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4100    pub request_id: std::string::String,
4101
4102    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4103    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4104}
4105
4106impl DeleteNetworkPeeringRequest {
4107    pub fn new() -> Self {
4108        std::default::Default::default()
4109    }
4110
4111    /// Sets the value of [name][crate::model::DeleteNetworkPeeringRequest::name].
4112    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4113        self.name = v.into();
4114        self
4115    }
4116
4117    /// Sets the value of [request_id][crate::model::DeleteNetworkPeeringRequest::request_id].
4118    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4119        self.request_id = v.into();
4120        self
4121    }
4122}
4123
4124impl wkt::message::Message for DeleteNetworkPeeringRequest {
4125    fn typename() -> &'static str {
4126        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest"
4127    }
4128}
4129
4130/// Request message for
4131/// [VmwareEngine.GetNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]
4132///
4133/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]: crate::client::VmwareEngine::get_network_peering
4134#[serde_with::serde_as]
4135#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4136#[serde(default, rename_all = "camelCase")]
4137#[non_exhaustive]
4138pub struct GetNetworkPeeringRequest {
4139    /// Required. The resource name of the network peering to retrieve.
4140    /// Resource names are schemeless URIs that follow the conventions in
4141    /// <https://cloud.google.com/apis/design/resource_names>.
4142    /// For example:
4143    /// `projects/my-project/locations/global/networkPeerings/my-peering`
4144    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4145    pub name: std::string::String,
4146
4147    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4148    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4149}
4150
4151impl GetNetworkPeeringRequest {
4152    pub fn new() -> Self {
4153        std::default::Default::default()
4154    }
4155
4156    /// Sets the value of [name][crate::model::GetNetworkPeeringRequest::name].
4157    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4158        self.name = v.into();
4159        self
4160    }
4161}
4162
4163impl wkt::message::Message for GetNetworkPeeringRequest {
4164    fn typename() -> &'static str {
4165        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPeeringRequest"
4166    }
4167}
4168
4169/// Request message for
4170/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
4171///
4172/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
4173#[serde_with::serde_as]
4174#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4175#[serde(default, rename_all = "camelCase")]
4176#[non_exhaustive]
4177pub struct ListNetworkPeeringsRequest {
4178    /// Required. The resource name of the location (global) to query for
4179    /// network peerings. Resource names are schemeless URIs that follow the
4180    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
4181    /// example: `projects/my-project/locations/global`
4182    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4183    pub parent: std::string::String,
4184
4185    /// The maximum number of network peerings to return in one page.
4186    /// The maximum value is coerced to 1000.
4187    /// The default value of this field is 500.
4188    pub page_size: i32,
4189
4190    /// A page token, received from a previous `ListNetworkPeerings` call.
4191    /// Provide this to retrieve the subsequent page.
4192    ///
4193    /// When paginating, all other parameters provided to
4194    /// `ListNetworkPeerings` must match the call that provided the page
4195    /// token.
4196    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4197    pub page_token: std::string::String,
4198
4199    /// A filter expression that matches resources returned in the response.
4200    /// The expression must specify the field name, a comparison
4201    /// operator, and the value that you want to use for filtering. The value
4202    /// must be a string, a number, or a boolean. The comparison operator
4203    /// must be `=`, `!=`, `>`, or `<`.
4204    ///
4205    /// For example, if you are filtering a list of network peerings, you can
4206    /// exclude the ones named `example-peering` by specifying
4207    /// `name != "example-peering"`.
4208    ///
4209    /// To filter on multiple expressions, provide each separate expression within
4210    /// parentheses. For example:
4211    ///
4212    /// ```norust
4213    /// (name = "example-peering")
4214    /// (createTime > "2021-04-12T08:15:10.40Z")
4215    /// ```
4216    ///
4217    /// By default, each expression is an `AND` expression. However, you
4218    /// can include `AND` and `OR` expressions explicitly.
4219    /// For example:
4220    ///
4221    /// ```norust
4222    /// (name = "example-peering-1") AND
4223    /// (createTime > "2021-04-12T08:15:10.40Z") OR
4224    /// (name = "example-peering-2")
4225    /// ```
4226    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4227    pub filter: std::string::String,
4228
4229    /// Sorts list results by a certain order. By default, returned results
4230    /// are ordered by `name` in ascending order.
4231    /// You can also sort results in descending order based on the `name` value
4232    /// using `orderBy="name desc"`.
4233    /// Currently, only ordering by `name` is supported.
4234    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4235    pub order_by: std::string::String,
4236
4237    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4238    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4239}
4240
4241impl ListNetworkPeeringsRequest {
4242    pub fn new() -> Self {
4243        std::default::Default::default()
4244    }
4245
4246    /// Sets the value of [parent][crate::model::ListNetworkPeeringsRequest::parent].
4247    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4248        self.parent = v.into();
4249        self
4250    }
4251
4252    /// Sets the value of [page_size][crate::model::ListNetworkPeeringsRequest::page_size].
4253    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4254        self.page_size = v.into();
4255        self
4256    }
4257
4258    /// Sets the value of [page_token][crate::model::ListNetworkPeeringsRequest::page_token].
4259    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4260        self.page_token = v.into();
4261        self
4262    }
4263
4264    /// Sets the value of [filter][crate::model::ListNetworkPeeringsRequest::filter].
4265    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4266        self.filter = v.into();
4267        self
4268    }
4269
4270    /// Sets the value of [order_by][crate::model::ListNetworkPeeringsRequest::order_by].
4271    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4272        self.order_by = v.into();
4273        self
4274    }
4275}
4276
4277impl wkt::message::Message for ListNetworkPeeringsRequest {
4278    fn typename() -> &'static str {
4279        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest"
4280    }
4281}
4282
4283/// Request message for
4284/// [VmwareEngine.UpdateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]
4285///
4286/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]: crate::client::VmwareEngine::update_network_peering
4287#[serde_with::serde_as]
4288#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4289#[serde(default, rename_all = "camelCase")]
4290#[non_exhaustive]
4291pub struct UpdateNetworkPeeringRequest {
4292    /// Required. Network peering description.
4293    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4294    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
4295
4296    /// Required. Field mask is used to specify the fields to be overwritten in the
4297    /// `NetworkPeering` resource by the update.
4298    /// The fields specified in the `update_mask` are relative to the resource, not
4299    /// the full request. A field will be overwritten if it is in the mask. If the
4300    /// user does not provide a mask then all fields will be overwritten.
4301    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4302    pub update_mask: std::option::Option<wkt::FieldMask>,
4303
4304    /// Optional. A request ID to identify requests. Specify a unique request ID
4305    /// so that if you must retry your request, the server will know to ignore
4306    /// the request if it has already been completed. The server guarantees that a
4307    /// request doesn't result in creation of duplicate commitments for at least 60
4308    /// minutes.
4309    ///
4310    /// For example, consider a situation where you make an initial request and the
4311    /// request times out. If you make the request again with the same request
4312    /// ID, the server can check if original operation with the same request ID
4313    /// was received, and if so, will ignore the second request. This prevents
4314    /// clients from accidentally creating duplicate commitments.
4315    ///
4316    /// The request ID must be a valid UUID with the exception that zero UUID is
4317    /// not supported (00000000-0000-0000-0000-000000000000).
4318    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4319    pub request_id: std::string::String,
4320
4321    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4322    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4323}
4324
4325impl UpdateNetworkPeeringRequest {
4326    pub fn new() -> Self {
4327        std::default::Default::default()
4328    }
4329
4330    /// Sets the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
4331    pub fn set_network_peering<
4332        T: std::convert::Into<std::option::Option<crate::model::NetworkPeering>>,
4333    >(
4334        mut self,
4335        v: T,
4336    ) -> Self {
4337        self.network_peering = v.into();
4338        self
4339    }
4340
4341    /// Sets the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
4342    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4343        mut self,
4344        v: T,
4345    ) -> Self {
4346        self.update_mask = v.into();
4347        self
4348    }
4349
4350    /// Sets the value of [request_id][crate::model::UpdateNetworkPeeringRequest::request_id].
4351    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4352        self.request_id = v.into();
4353        self
4354    }
4355}
4356
4357impl wkt::message::Message for UpdateNetworkPeeringRequest {
4358    fn typename() -> &'static str {
4359        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest"
4360    }
4361}
4362
4363/// Response message for
4364/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
4365///
4366/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
4367#[serde_with::serde_as]
4368#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4369#[serde(default, rename_all = "camelCase")]
4370#[non_exhaustive]
4371pub struct ListNetworkPeeringsResponse {
4372    /// A list of network peerings.
4373    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4374    pub network_peerings: std::vec::Vec<crate::model::NetworkPeering>,
4375
4376    /// A token, which can be sent as `page_token` to retrieve the next page.
4377    /// If this field is omitted, there are no subsequent pages.
4378    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4379    pub next_page_token: std::string::String,
4380
4381    /// Unreachable resources.
4382    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4383    pub unreachable: std::vec::Vec<std::string::String>,
4384
4385    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4386    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4387}
4388
4389impl ListNetworkPeeringsResponse {
4390    pub fn new() -> Self {
4391        std::default::Default::default()
4392    }
4393
4394    /// Sets the value of [next_page_token][crate::model::ListNetworkPeeringsResponse::next_page_token].
4395    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4396        self.next_page_token = v.into();
4397        self
4398    }
4399
4400    /// Sets the value of [network_peerings][crate::model::ListNetworkPeeringsResponse::network_peerings].
4401    pub fn set_network_peerings<T, V>(mut self, v: T) -> Self
4402    where
4403        T: std::iter::IntoIterator<Item = V>,
4404        V: std::convert::Into<crate::model::NetworkPeering>,
4405    {
4406        use std::iter::Iterator;
4407        self.network_peerings = v.into_iter().map(|i| i.into()).collect();
4408        self
4409    }
4410
4411    /// Sets the value of [unreachable][crate::model::ListNetworkPeeringsResponse::unreachable].
4412    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4413    where
4414        T: std::iter::IntoIterator<Item = V>,
4415        V: std::convert::Into<std::string::String>,
4416    {
4417        use std::iter::Iterator;
4418        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4419        self
4420    }
4421}
4422
4423impl wkt::message::Message for ListNetworkPeeringsResponse {
4424    fn typename() -> &'static str {
4425        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsResponse"
4426    }
4427}
4428
4429#[doc(hidden)]
4430impl gax::paginator::internal::PageableResponse for ListNetworkPeeringsResponse {
4431    type PageItem = crate::model::NetworkPeering;
4432
4433    fn items(self) -> std::vec::Vec<Self::PageItem> {
4434        self.network_peerings
4435    }
4436
4437    fn next_page_token(&self) -> std::string::String {
4438        use std::clone::Clone;
4439        self.next_page_token.clone()
4440    }
4441}
4442
4443/// Request message for
4444/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
4445///
4446/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
4447#[serde_with::serde_as]
4448#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4449#[serde(default, rename_all = "camelCase")]
4450#[non_exhaustive]
4451pub struct ListPeeringRoutesRequest {
4452    /// Required. The resource name of the network peering to retrieve peering
4453    /// routes from. Resource names are schemeless URIs that follow the conventions
4454    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
4455    /// `projects/my-project/locations/global/networkPeerings/my-peering`
4456    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4457    pub parent: std::string::String,
4458
4459    /// The maximum number of peering routes to return in one page.
4460    /// The service may return fewer than this value.
4461    /// The maximum value is coerced to 1000.
4462    /// The default value of this field is 500.
4463    pub page_size: i32,
4464
4465    /// A page token, received from a previous `ListPeeringRoutes` call.
4466    /// Provide this to retrieve the subsequent page.
4467    /// When paginating, all other parameters provided to `ListPeeringRoutes` must
4468    /// match the call that provided the page token.
4469    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4470    pub page_token: std::string::String,
4471
4472    /// A filter expression that matches resources returned in the response.
4473    /// Currently, only filtering on the `direction` field is supported. To return
4474    /// routes imported from the peer network, provide "direction=INCOMING". To
4475    /// return routes exported from the VMware Engine network, provide
4476    /// "direction=OUTGOING". Other filter expressions return an error.
4477    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4478    pub filter: std::string::String,
4479
4480    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4481    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4482}
4483
4484impl ListPeeringRoutesRequest {
4485    pub fn new() -> Self {
4486        std::default::Default::default()
4487    }
4488
4489    /// Sets the value of [parent][crate::model::ListPeeringRoutesRequest::parent].
4490    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4491        self.parent = v.into();
4492        self
4493    }
4494
4495    /// Sets the value of [page_size][crate::model::ListPeeringRoutesRequest::page_size].
4496    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4497        self.page_size = v.into();
4498        self
4499    }
4500
4501    /// Sets the value of [page_token][crate::model::ListPeeringRoutesRequest::page_token].
4502    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4503        self.page_token = v.into();
4504        self
4505    }
4506
4507    /// Sets the value of [filter][crate::model::ListPeeringRoutesRequest::filter].
4508    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4509        self.filter = v.into();
4510        self
4511    }
4512}
4513
4514impl wkt::message::Message for ListPeeringRoutesRequest {
4515    fn typename() -> &'static str {
4516        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesRequest"
4517    }
4518}
4519
4520/// Response message for
4521/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
4522///
4523/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
4524#[serde_with::serde_as]
4525#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4526#[serde(default, rename_all = "camelCase")]
4527#[non_exhaustive]
4528pub struct ListPeeringRoutesResponse {
4529    /// A list of peering routes.
4530    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4531    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
4532
4533    /// A token, which can be sent as `page_token` to retrieve the next page.
4534    /// If this field is omitted, there are no subsequent pages.
4535    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4536    pub next_page_token: std::string::String,
4537
4538    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4539    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4540}
4541
4542impl ListPeeringRoutesResponse {
4543    pub fn new() -> Self {
4544        std::default::Default::default()
4545    }
4546
4547    /// Sets the value of [next_page_token][crate::model::ListPeeringRoutesResponse::next_page_token].
4548    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4549        self.next_page_token = v.into();
4550        self
4551    }
4552
4553    /// Sets the value of [peering_routes][crate::model::ListPeeringRoutesResponse::peering_routes].
4554    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
4555    where
4556        T: std::iter::IntoIterator<Item = V>,
4557        V: std::convert::Into<crate::model::PeeringRoute>,
4558    {
4559        use std::iter::Iterator;
4560        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
4561        self
4562    }
4563}
4564
4565impl wkt::message::Message for ListPeeringRoutesResponse {
4566    fn typename() -> &'static str {
4567        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesResponse"
4568    }
4569}
4570
4571#[doc(hidden)]
4572impl gax::paginator::internal::PageableResponse for ListPeeringRoutesResponse {
4573    type PageItem = crate::model::PeeringRoute;
4574
4575    fn items(self) -> std::vec::Vec<Self::PageItem> {
4576        self.peering_routes
4577    }
4578
4579    fn next_page_token(&self) -> std::string::String {
4580        use std::clone::Clone;
4581        self.next_page_token.clone()
4582    }
4583}
4584
4585/// Request message for
4586/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
4587///
4588/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
4589#[serde_with::serde_as]
4590#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4591#[serde(default, rename_all = "camelCase")]
4592#[non_exhaustive]
4593pub struct ListNetworkPoliciesRequest {
4594    /// Required. The resource name of the location (region) to query for
4595    /// network policies. Resource names are schemeless URIs that follow the
4596    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
4597    /// example: `projects/my-project/locations/us-central1`
4598    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4599    pub parent: std::string::String,
4600
4601    /// The maximum number of network policies to return in one page.
4602    /// The service may return fewer than this value.
4603    /// The maximum value is coerced to 1000.
4604    /// The default value of this field is 500.
4605    pub page_size: i32,
4606
4607    /// A page token, received from a previous `ListNetworkPolicies` call.
4608    /// Provide this to retrieve the subsequent page.
4609    ///
4610    /// When paginating, all other parameters provided to
4611    /// `ListNetworkPolicies` must match the call that provided the page
4612    /// token.
4613    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4614    pub page_token: std::string::String,
4615
4616    /// A filter expression that matches resources returned in the response.
4617    /// The expression must specify the field name, a comparison
4618    /// operator, and the value that you want to use for filtering. The value
4619    /// must be a string, a number, or a boolean. The comparison operator
4620    /// must be `=`, `!=`, `>`, or `<`.
4621    ///
4622    /// For example, if you are filtering a list of network policies, you can
4623    /// exclude the ones named `example-policy` by specifying
4624    /// `name != "example-policy"`.
4625    ///
4626    /// To filter on multiple expressions, provide each separate expression within
4627    /// parentheses. For example:
4628    ///
4629    /// ```norust
4630    /// (name = "example-policy")
4631    /// (createTime > "2021-04-12T08:15:10.40Z")
4632    /// ```
4633    ///
4634    /// By default, each expression is an `AND` expression. However, you
4635    /// can include `AND` and `OR` expressions explicitly.
4636    /// For example:
4637    ///
4638    /// ```norust
4639    /// (name = "example-policy-1") AND
4640    /// (createTime > "2021-04-12T08:15:10.40Z") OR
4641    /// (name = "example-policy-2")
4642    /// ```
4643    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4644    pub filter: std::string::String,
4645
4646    /// Sorts list results by a certain order. By default, returned results
4647    /// are ordered by `name` in ascending order.
4648    /// You can also sort results in descending order based on the `name` value
4649    /// using `orderBy="name desc"`.
4650    /// Currently, only ordering by `name` is supported.
4651    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4652    pub order_by: std::string::String,
4653
4654    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4655    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4656}
4657
4658impl ListNetworkPoliciesRequest {
4659    pub fn new() -> Self {
4660        std::default::Default::default()
4661    }
4662
4663    /// Sets the value of [parent][crate::model::ListNetworkPoliciesRequest::parent].
4664    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4665        self.parent = v.into();
4666        self
4667    }
4668
4669    /// Sets the value of [page_size][crate::model::ListNetworkPoliciesRequest::page_size].
4670    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4671        self.page_size = v.into();
4672        self
4673    }
4674
4675    /// Sets the value of [page_token][crate::model::ListNetworkPoliciesRequest::page_token].
4676    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4677        self.page_token = v.into();
4678        self
4679    }
4680
4681    /// Sets the value of [filter][crate::model::ListNetworkPoliciesRequest::filter].
4682    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4683        self.filter = v.into();
4684        self
4685    }
4686
4687    /// Sets the value of [order_by][crate::model::ListNetworkPoliciesRequest::order_by].
4688    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4689        self.order_by = v.into();
4690        self
4691    }
4692}
4693
4694impl wkt::message::Message for ListNetworkPoliciesRequest {
4695    fn typename() -> &'static str {
4696        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest"
4697    }
4698}
4699
4700/// Response message for
4701/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
4702///
4703/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
4704#[serde_with::serde_as]
4705#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4706#[serde(default, rename_all = "camelCase")]
4707#[non_exhaustive]
4708pub struct ListNetworkPoliciesResponse {
4709    /// A list of network policies.
4710    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4711    pub network_policies: std::vec::Vec<crate::model::NetworkPolicy>,
4712
4713    /// A token, which can be send as `page_token` to retrieve the next page.
4714    /// If this field is omitted, there are no subsequent pages.
4715    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4716    pub next_page_token: std::string::String,
4717
4718    /// Locations that could not be reached when making an aggregated query using
4719    /// wildcards.
4720    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
4721    pub unreachable: std::vec::Vec<std::string::String>,
4722
4723    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4724    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4725}
4726
4727impl ListNetworkPoliciesResponse {
4728    pub fn new() -> Self {
4729        std::default::Default::default()
4730    }
4731
4732    /// Sets the value of [next_page_token][crate::model::ListNetworkPoliciesResponse::next_page_token].
4733    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4734        self.next_page_token = v.into();
4735        self
4736    }
4737
4738    /// Sets the value of [network_policies][crate::model::ListNetworkPoliciesResponse::network_policies].
4739    pub fn set_network_policies<T, V>(mut self, v: T) -> Self
4740    where
4741        T: std::iter::IntoIterator<Item = V>,
4742        V: std::convert::Into<crate::model::NetworkPolicy>,
4743    {
4744        use std::iter::Iterator;
4745        self.network_policies = v.into_iter().map(|i| i.into()).collect();
4746        self
4747    }
4748
4749    /// Sets the value of [unreachable][crate::model::ListNetworkPoliciesResponse::unreachable].
4750    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4751    where
4752        T: std::iter::IntoIterator<Item = V>,
4753        V: std::convert::Into<std::string::String>,
4754    {
4755        use std::iter::Iterator;
4756        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4757        self
4758    }
4759}
4760
4761impl wkt::message::Message for ListNetworkPoliciesResponse {
4762    fn typename() -> &'static str {
4763        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse"
4764    }
4765}
4766
4767#[doc(hidden)]
4768impl gax::paginator::internal::PageableResponse for ListNetworkPoliciesResponse {
4769    type PageItem = crate::model::NetworkPolicy;
4770
4771    fn items(self) -> std::vec::Vec<Self::PageItem> {
4772        self.network_policies
4773    }
4774
4775    fn next_page_token(&self) -> std::string::String {
4776        use std::clone::Clone;
4777        self.next_page_token.clone()
4778    }
4779}
4780
4781/// Request message for
4782/// [VmwareEngine.GetNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]
4783///
4784/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]: crate::client::VmwareEngine::get_network_policy
4785#[serde_with::serde_as]
4786#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4787#[serde(default, rename_all = "camelCase")]
4788#[non_exhaustive]
4789pub struct GetNetworkPolicyRequest {
4790    /// Required. The resource name of the network policy to retrieve.
4791    /// Resource names are schemeless URIs that follow the conventions in
4792    /// <https://cloud.google.com/apis/design/resource_names>.
4793    /// For example:
4794    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
4795    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4796    pub name: std::string::String,
4797
4798    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4799    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4800}
4801
4802impl GetNetworkPolicyRequest {
4803    pub fn new() -> Self {
4804        std::default::Default::default()
4805    }
4806
4807    /// Sets the value of [name][crate::model::GetNetworkPolicyRequest::name].
4808    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4809        self.name = v.into();
4810        self
4811    }
4812}
4813
4814impl wkt::message::Message for GetNetworkPolicyRequest {
4815    fn typename() -> &'static str {
4816        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPolicyRequest"
4817    }
4818}
4819
4820/// Request message for
4821/// [VmwareEngine.UpdateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]
4822///
4823/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]: crate::client::VmwareEngine::update_network_policy
4824#[serde_with::serde_as]
4825#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4826#[serde(default, rename_all = "camelCase")]
4827#[non_exhaustive]
4828pub struct UpdateNetworkPolicyRequest {
4829    /// Required. Network policy description.
4830    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4831    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
4832
4833    /// Required. Field mask is used to specify the fields to be overwritten in the
4834    /// `NetworkPolicy` resource by the update.
4835    /// The fields specified in the `update_mask` are relative to the resource, not
4836    /// the full request. A field will be overwritten if it is in the mask. If the
4837    /// user does not provide a mask then all fields will be overwritten.
4838    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4839    pub update_mask: std::option::Option<wkt::FieldMask>,
4840
4841    /// Optional. A request ID to identify requests. Specify a unique request ID
4842    /// so that if you must retry your request, the server will know to ignore
4843    /// the request if it has already been completed. The server guarantees that a
4844    /// request doesn't result in creation of duplicate commitments for at least 60
4845    /// minutes.
4846    ///
4847    /// For example, consider a situation where you make an initial request and the
4848    /// request times out. If you make the request again with the same request
4849    /// ID, the server can check if original operation with the same request ID
4850    /// was received, and if so, will ignore the second request. This prevents
4851    /// clients from accidentally creating duplicate commitments.
4852    ///
4853    /// The request ID must be a valid UUID with the exception that zero UUID is
4854    /// not supported (00000000-0000-0000-0000-000000000000).
4855    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4856    pub request_id: std::string::String,
4857
4858    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4859    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4860}
4861
4862impl UpdateNetworkPolicyRequest {
4863    pub fn new() -> Self {
4864        std::default::Default::default()
4865    }
4866
4867    /// Sets the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
4868    pub fn set_network_policy<
4869        T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
4870    >(
4871        mut self,
4872        v: T,
4873    ) -> Self {
4874        self.network_policy = v.into();
4875        self
4876    }
4877
4878    /// Sets the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
4879    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
4880        mut self,
4881        v: T,
4882    ) -> Self {
4883        self.update_mask = v.into();
4884        self
4885    }
4886
4887    /// Sets the value of [request_id][crate::model::UpdateNetworkPolicyRequest::request_id].
4888    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4889        self.request_id = v.into();
4890        self
4891    }
4892}
4893
4894impl wkt::message::Message for UpdateNetworkPolicyRequest {
4895    fn typename() -> &'static str {
4896        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest"
4897    }
4898}
4899
4900/// Request message for
4901/// [VmwareEngine.CreateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]
4902///
4903/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]: crate::client::VmwareEngine::create_network_policy
4904#[serde_with::serde_as]
4905#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
4906#[serde(default, rename_all = "camelCase")]
4907#[non_exhaustive]
4908pub struct CreateNetworkPolicyRequest {
4909    /// Required. The resource name of the location (region)
4910    /// to create the new network policy in.
4911    /// Resource names are schemeless URIs that follow the conventions in
4912    /// <https://cloud.google.com/apis/design/resource_names>.
4913    /// For example:
4914    /// `projects/my-project/locations/us-central1`
4915    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4916    pub parent: std::string::String,
4917
4918    /// Required. The user-provided identifier of the network policy to be created.
4919    /// This identifier must be unique within parent
4920    /// `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes
4921    /// the final token in the name URI.
4922    /// The identifier must meet the following requirements:
4923    ///
4924    /// * Only contains 1-63 alphanumeric characters and hyphens
4925    /// * Begins with an alphabetical character
4926    /// * Ends with a non-hyphen character
4927    /// * Not formatted as a UUID
4928    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
4929    ///   (section 3.5)
4930    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4931    pub network_policy_id: std::string::String,
4932
4933    /// Required. The network policy configuration to use in the request.
4934    #[serde(skip_serializing_if = "std::option::Option::is_none")]
4935    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
4936
4937    /// Optional. A request ID to identify requests. Specify a unique request ID
4938    /// so that if you must retry your request, the server will know to ignore
4939    /// the request if it has already been completed. The server guarantees that a
4940    /// request doesn't result in creation of duplicate commitments for at least 60
4941    /// minutes.
4942    ///
4943    /// For example, consider a situation where you make an initial request and the
4944    /// request times out. If you make the request again with the same request
4945    /// ID, the server can check if original operation with the same request ID
4946    /// was received, and if so, will ignore the second request. This prevents
4947    /// clients from accidentally creating duplicate commitments.
4948    ///
4949    /// The request ID must be a valid UUID with the exception that zero UUID is
4950    /// not supported (00000000-0000-0000-0000-000000000000).
4951    #[serde(skip_serializing_if = "std::string::String::is_empty")]
4952    pub request_id: std::string::String,
4953
4954    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
4955    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4956}
4957
4958impl CreateNetworkPolicyRequest {
4959    pub fn new() -> Self {
4960        std::default::Default::default()
4961    }
4962
4963    /// Sets the value of [parent][crate::model::CreateNetworkPolicyRequest::parent].
4964    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4965        self.parent = v.into();
4966        self
4967    }
4968
4969    /// Sets the value of [network_policy_id][crate::model::CreateNetworkPolicyRequest::network_policy_id].
4970    pub fn set_network_policy_id<T: std::convert::Into<std::string::String>>(
4971        mut self,
4972        v: T,
4973    ) -> Self {
4974        self.network_policy_id = v.into();
4975        self
4976    }
4977
4978    /// Sets the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
4979    pub fn set_network_policy<
4980        T: std::convert::Into<std::option::Option<crate::model::NetworkPolicy>>,
4981    >(
4982        mut self,
4983        v: T,
4984    ) -> Self {
4985        self.network_policy = v.into();
4986        self
4987    }
4988
4989    /// Sets the value of [request_id][crate::model::CreateNetworkPolicyRequest::request_id].
4990    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4991        self.request_id = v.into();
4992        self
4993    }
4994}
4995
4996impl wkt::message::Message for CreateNetworkPolicyRequest {
4997    fn typename() -> &'static str {
4998        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest"
4999    }
5000}
5001
5002/// Request message for
5003/// [VmwareEngine.DeleteNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]
5004///
5005/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]: crate::client::VmwareEngine::delete_network_policy
5006#[serde_with::serde_as]
5007#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5008#[serde(default, rename_all = "camelCase")]
5009#[non_exhaustive]
5010pub struct DeleteNetworkPolicyRequest {
5011    /// Required. The resource name of the network policy to delete.
5012    /// Resource names are schemeless URIs that follow the conventions in
5013    /// <https://cloud.google.com/apis/design/resource_names>.
5014    /// For example:
5015    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
5016    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5017    pub name: std::string::String,
5018
5019    /// Optional. A request ID to identify requests. Specify a unique request ID
5020    /// so that if you must retry your request, the server will know to ignore
5021    /// the request if it has already been completed. The server guarantees that a
5022    /// request doesn't result in creation of duplicate commitments for at least 60
5023    /// minutes.
5024    ///
5025    /// For example, consider a situation where you make an initial request and the
5026    /// request times out. If you make the request again with the same request
5027    /// ID, the server can check if original operation with the same request ID
5028    /// was received, and if so, will ignore the second request. This prevents
5029    /// clients from accidentally creating duplicate commitments.
5030    ///
5031    /// The request ID must be a valid UUID with the exception that zero UUID is
5032    /// not supported (00000000-0000-0000-0000-000000000000).
5033    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5034    pub request_id: std::string::String,
5035
5036    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5037    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5038}
5039
5040impl DeleteNetworkPolicyRequest {
5041    pub fn new() -> Self {
5042        std::default::Default::default()
5043    }
5044
5045    /// Sets the value of [name][crate::model::DeleteNetworkPolicyRequest::name].
5046    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5047        self.name = v.into();
5048        self
5049    }
5050
5051    /// Sets the value of [request_id][crate::model::DeleteNetworkPolicyRequest::request_id].
5052    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5053        self.request_id = v.into();
5054        self
5055    }
5056}
5057
5058impl wkt::message::Message for DeleteNetworkPolicyRequest {
5059    fn typename() -> &'static str {
5060        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest"
5061    }
5062}
5063
5064/// Request message for
5065/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
5066///
5067/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
5068#[serde_with::serde_as]
5069#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5070#[serde(default, rename_all = "camelCase")]
5071#[non_exhaustive]
5072pub struct ListManagementDnsZoneBindingsRequest {
5073    /// Required. The resource name of the private cloud to be queried for
5074    /// management DNS zone bindings.
5075    /// Resource names are schemeless URIs that follow the conventions in
5076    /// <https://cloud.google.com/apis/design/resource_names>.
5077    /// For example:
5078    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
5079    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5080    pub parent: std::string::String,
5081
5082    /// The maximum number of management DNS zone bindings to return in one page.
5083    /// The service may return fewer than this value.
5084    /// The maximum value is coerced to 1000.
5085    /// The default value of this field is 500.
5086    pub page_size: i32,
5087
5088    /// A page token, received from a previous `ListManagementDnsZoneBindings`
5089    /// call. Provide this to retrieve the subsequent page.
5090    ///
5091    /// When paginating, all other parameters provided to
5092    /// `ListManagementDnsZoneBindings` must match the call that provided the page
5093    /// token.
5094    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5095    pub page_token: std::string::String,
5096
5097    /// A filter expression that matches resources returned in the response.
5098    /// The expression must specify the field name, a comparison
5099    /// operator, and the value that you want to use for filtering. The value
5100    /// must be a string, a number, or a boolean. The comparison operator
5101    /// must be `=`, `!=`, `>`, or `<`.
5102    ///
5103    /// For example, if you are filtering a list of Management DNS Zone Bindings,
5104    /// you can exclude the ones named `example-management-dns-zone-binding` by
5105    /// specifying `name != "example-management-dns-zone-binding"`.
5106    ///
5107    /// To filter on multiple expressions, provide each separate expression within
5108    /// parentheses. For example:
5109    ///
5110    /// ```norust
5111    /// (name = "example-management-dns-zone-binding")
5112    /// (createTime > "2021-04-12T08:15:10.40Z")
5113    /// ```
5114    ///
5115    /// By default, each expression is an `AND` expression. However, you
5116    /// can include `AND` and `OR` expressions explicitly.
5117    /// For example:
5118    ///
5119    /// ```norust
5120    /// (name = "example-management-dns-zone-binding-1") AND
5121    /// (createTime > "2021-04-12T08:15:10.40Z") OR
5122    /// (name = "example-management-dns-zone-binding-2")
5123    /// ```
5124    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5125    pub filter: std::string::String,
5126
5127    /// Sorts list results by a certain order. By default, returned results
5128    /// are ordered by `name` in ascending order.
5129    /// You can also sort results in descending order based on the `name` value
5130    /// using `orderBy="name desc"`.
5131    /// Currently, only ordering by `name` is supported.
5132    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5133    pub order_by: std::string::String,
5134
5135    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5136    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5137}
5138
5139impl ListManagementDnsZoneBindingsRequest {
5140    pub fn new() -> Self {
5141        std::default::Default::default()
5142    }
5143
5144    /// Sets the value of [parent][crate::model::ListManagementDnsZoneBindingsRequest::parent].
5145    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5146        self.parent = v.into();
5147        self
5148    }
5149
5150    /// Sets the value of [page_size][crate::model::ListManagementDnsZoneBindingsRequest::page_size].
5151    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5152        self.page_size = v.into();
5153        self
5154    }
5155
5156    /// Sets the value of [page_token][crate::model::ListManagementDnsZoneBindingsRequest::page_token].
5157    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5158        self.page_token = v.into();
5159        self
5160    }
5161
5162    /// Sets the value of [filter][crate::model::ListManagementDnsZoneBindingsRequest::filter].
5163    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5164        self.filter = v.into();
5165        self
5166    }
5167
5168    /// Sets the value of [order_by][crate::model::ListManagementDnsZoneBindingsRequest::order_by].
5169    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5170        self.order_by = v.into();
5171        self
5172    }
5173}
5174
5175impl wkt::message::Message for ListManagementDnsZoneBindingsRequest {
5176    fn typename() -> &'static str {
5177        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest"
5178    }
5179}
5180
5181/// Response message for
5182/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
5183///
5184/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
5185#[serde_with::serde_as]
5186#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5187#[serde(default, rename_all = "camelCase")]
5188#[non_exhaustive]
5189pub struct ListManagementDnsZoneBindingsResponse {
5190    /// A list of management DNS zone bindings.
5191    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5192    pub management_dns_zone_bindings: std::vec::Vec<crate::model::ManagementDnsZoneBinding>,
5193
5194    /// A token, which can be sent as `page_token` to retrieve the next page.
5195    /// If this field is omitted, there are no subsequent pages.
5196    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5197    pub next_page_token: std::string::String,
5198
5199    /// Locations that could not be reached when making an aggregated query using
5200    /// wildcards.
5201    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
5202    pub unreachable: std::vec::Vec<std::string::String>,
5203
5204    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5205    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5206}
5207
5208impl ListManagementDnsZoneBindingsResponse {
5209    pub fn new() -> Self {
5210        std::default::Default::default()
5211    }
5212
5213    /// Sets the value of [next_page_token][crate::model::ListManagementDnsZoneBindingsResponse::next_page_token].
5214    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5215        self.next_page_token = v.into();
5216        self
5217    }
5218
5219    /// Sets the value of [management_dns_zone_bindings][crate::model::ListManagementDnsZoneBindingsResponse::management_dns_zone_bindings].
5220    pub fn set_management_dns_zone_bindings<T, V>(mut self, v: T) -> Self
5221    where
5222        T: std::iter::IntoIterator<Item = V>,
5223        V: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
5224    {
5225        use std::iter::Iterator;
5226        self.management_dns_zone_bindings = v.into_iter().map(|i| i.into()).collect();
5227        self
5228    }
5229
5230    /// Sets the value of [unreachable][crate::model::ListManagementDnsZoneBindingsResponse::unreachable].
5231    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5232    where
5233        T: std::iter::IntoIterator<Item = V>,
5234        V: std::convert::Into<std::string::String>,
5235    {
5236        use std::iter::Iterator;
5237        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5238        self
5239    }
5240}
5241
5242impl wkt::message::Message for ListManagementDnsZoneBindingsResponse {
5243    fn typename() -> &'static str {
5244        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsResponse"
5245    }
5246}
5247
5248#[doc(hidden)]
5249impl gax::paginator::internal::PageableResponse for ListManagementDnsZoneBindingsResponse {
5250    type PageItem = crate::model::ManagementDnsZoneBinding;
5251
5252    fn items(self) -> std::vec::Vec<Self::PageItem> {
5253        self.management_dns_zone_bindings
5254    }
5255
5256    fn next_page_token(&self) -> std::string::String {
5257        use std::clone::Clone;
5258        self.next_page_token.clone()
5259    }
5260}
5261
5262/// Request message for
5263/// [VmwareEngine.GetManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]
5264///
5265/// [google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]: crate::client::VmwareEngine::get_management_dns_zone_binding
5266#[serde_with::serde_as]
5267#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5268#[serde(default, rename_all = "camelCase")]
5269#[non_exhaustive]
5270pub struct GetManagementDnsZoneBindingRequest {
5271    /// Required. The resource name of the management DNS zone binding to
5272    /// retrieve. Resource names are schemeless URIs that follow the conventions in
5273    /// <https://cloud.google.com/apis/design/resource_names>.
5274    /// For example:
5275    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5276    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5277    pub name: std::string::String,
5278
5279    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5280    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5281}
5282
5283impl GetManagementDnsZoneBindingRequest {
5284    pub fn new() -> Self {
5285        std::default::Default::default()
5286    }
5287
5288    /// Sets the value of [name][crate::model::GetManagementDnsZoneBindingRequest::name].
5289    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5290        self.name = v.into();
5291        self
5292    }
5293}
5294
5295impl wkt::message::Message for GetManagementDnsZoneBindingRequest {
5296    fn typename() -> &'static str {
5297        "type.googleapis.com/google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest"
5298    }
5299}
5300
5301/// Request message for [VmwareEngine.CreateManagementDnsZoneBindings][]
5302#[serde_with::serde_as]
5303#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5304#[serde(default, rename_all = "camelCase")]
5305#[non_exhaustive]
5306pub struct CreateManagementDnsZoneBindingRequest {
5307    /// Required. The resource name of the private cloud
5308    /// to create a new management DNS zone binding for.
5309    /// Resource names are schemeless URIs that follow the conventions in
5310    /// <https://cloud.google.com/apis/design/resource_names>.
5311    /// For example:
5312    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
5313    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5314    pub parent: std::string::String,
5315
5316    /// Required. The initial values for a new management DNS zone binding.
5317    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5318    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
5319
5320    /// Required. The user-provided identifier of the `ManagementDnsZoneBinding`
5321    /// resource to be created. This identifier must be unique among
5322    /// `ManagementDnsZoneBinding` resources within the parent and becomes the
5323    /// final token in the name URI. The identifier must meet the following
5324    /// requirements:
5325    ///
5326    /// * Only contains 1-63 alphanumeric characters and hyphens
5327    /// * Begins with an alphabetical character
5328    /// * Ends with a non-hyphen character
5329    /// * Not formatted as a UUID
5330    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5331    ///   (section 3.5)
5332    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5333    pub management_dns_zone_binding_id: std::string::String,
5334
5335    /// Optional. A request ID to identify requests. Specify a unique request ID
5336    /// so that if you must retry your request, the server will know to ignore
5337    /// the request if it has already been completed. The server guarantees that a
5338    /// request doesn't result in creation of duplicate commitments for at least 60
5339    /// minutes.
5340    ///
5341    /// For example, consider a situation where you make an initial request and the
5342    /// request times out. If you make the request again with the same request ID,
5343    /// the server can check if the original operation with the same request ID was
5344    /// received, and if so, will ignore the second request. This prevents clients
5345    /// from accidentally creating duplicate commitments.
5346    ///
5347    /// The request ID must be a valid UUID with the exception that zero UUID is
5348    /// not supported (00000000-0000-0000-0000-000000000000).
5349    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5350    pub request_id: std::string::String,
5351
5352    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5353    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5354}
5355
5356impl CreateManagementDnsZoneBindingRequest {
5357    pub fn new() -> Self {
5358        std::default::Default::default()
5359    }
5360
5361    /// Sets the value of [parent][crate::model::CreateManagementDnsZoneBindingRequest::parent].
5362    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5363        self.parent = v.into();
5364        self
5365    }
5366
5367    /// Sets the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
5368    pub fn set_management_dns_zone_binding<
5369        T: std::convert::Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
5370    >(
5371        mut self,
5372        v: T,
5373    ) -> Self {
5374        self.management_dns_zone_binding = v.into();
5375        self
5376    }
5377
5378    /// Sets the value of [management_dns_zone_binding_id][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding_id].
5379    pub fn set_management_dns_zone_binding_id<T: std::convert::Into<std::string::String>>(
5380        mut self,
5381        v: T,
5382    ) -> Self {
5383        self.management_dns_zone_binding_id = v.into();
5384        self
5385    }
5386
5387    /// Sets the value of [request_id][crate::model::CreateManagementDnsZoneBindingRequest::request_id].
5388    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5389        self.request_id = v.into();
5390        self
5391    }
5392}
5393
5394impl wkt::message::Message for CreateManagementDnsZoneBindingRequest {
5395    fn typename() -> &'static str {
5396        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest"
5397    }
5398}
5399
5400/// Request message for
5401/// [VmwareEngine.UpdateManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]
5402///
5403/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]: crate::client::VmwareEngine::update_management_dns_zone_binding
5404#[serde_with::serde_as]
5405#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5406#[serde(default, rename_all = "camelCase")]
5407#[non_exhaustive]
5408pub struct UpdateManagementDnsZoneBindingRequest {
5409    /// Required. Field mask is used to specify the fields to be overwritten in the
5410    /// `ManagementDnsZoneBinding` resource by the update.
5411    /// The fields specified in the `update_mask` are relative to the resource, not
5412    /// the full request. A field will be overwritten if it is in the mask. If the
5413    /// user does not provide a mask then all fields will be overwritten.
5414    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5415    pub update_mask: std::option::Option<wkt::FieldMask>,
5416
5417    /// Required. New values to update the management DNS zone binding with.
5418    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5419    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
5420
5421    /// Optional. A request ID to identify requests. Specify a unique request ID
5422    /// so that if you must retry your request, the server will know to ignore
5423    /// the request if it has already been completed. The server guarantees that a
5424    /// request doesn't result in creation of duplicate commitments for at least 60
5425    /// minutes.
5426    ///
5427    /// For example, consider a situation where you make an initial request and the
5428    /// request times out. If you make the request again with the same request ID,
5429    /// the server can check if the original operation with the same request ID was
5430    /// received, and if so, will ignore the second request. This prevents clients
5431    /// from accidentally creating duplicate commitments.
5432    ///
5433    /// The request ID must be a valid UUID with the exception that zero UUID is
5434    /// not supported (00000000-0000-0000-0000-000000000000).
5435    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5436    pub request_id: std::string::String,
5437
5438    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5439    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5440}
5441
5442impl UpdateManagementDnsZoneBindingRequest {
5443    pub fn new() -> Self {
5444        std::default::Default::default()
5445    }
5446
5447    /// Sets the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
5448    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
5449        mut self,
5450        v: T,
5451    ) -> Self {
5452        self.update_mask = v.into();
5453        self
5454    }
5455
5456    /// Sets the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
5457    pub fn set_management_dns_zone_binding<
5458        T: std::convert::Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
5459    >(
5460        mut self,
5461        v: T,
5462    ) -> Self {
5463        self.management_dns_zone_binding = v.into();
5464        self
5465    }
5466
5467    /// Sets the value of [request_id][crate::model::UpdateManagementDnsZoneBindingRequest::request_id].
5468    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5469        self.request_id = v.into();
5470        self
5471    }
5472}
5473
5474impl wkt::message::Message for UpdateManagementDnsZoneBindingRequest {
5475    fn typename() -> &'static str {
5476        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest"
5477    }
5478}
5479
5480/// Request message for
5481/// [VmwareEngine.DeleteManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]
5482///
5483/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]: crate::client::VmwareEngine::delete_management_dns_zone_binding
5484#[serde_with::serde_as]
5485#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5486#[serde(default, rename_all = "camelCase")]
5487#[non_exhaustive]
5488pub struct DeleteManagementDnsZoneBindingRequest {
5489    /// Required. The resource name of the management DNS zone binding to delete.
5490    /// Resource names are schemeless URIs that follow the conventions in
5491    /// <https://cloud.google.com/apis/design/resource_names>.
5492    /// For example:
5493    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5494    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5495    pub name: std::string::String,
5496
5497    /// Optional. A request ID to identify requests. Specify a unique request ID
5498    /// so that if you must retry your request, the server will know to ignore
5499    /// the request if it has already been completed. The server guarantees that a
5500    /// request doesn't result in creation of duplicate commitments for at least 60
5501    /// minutes.
5502    ///
5503    /// For example, consider a situation where you make an initial request and the
5504    /// request times out. If you make the request again with the same request
5505    /// ID, the server can check if the original operation with the same request ID
5506    /// was received, and if so, will ignore the second request. This prevents
5507    /// clients from accidentally creating duplicate commitments.
5508    ///
5509    /// The request ID must be a valid UUID with the exception that zero UUID is
5510    /// not supported (00000000-0000-0000-0000-000000000000).
5511    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5512    pub request_id: std::string::String,
5513
5514    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5515    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5516}
5517
5518impl DeleteManagementDnsZoneBindingRequest {
5519    pub fn new() -> Self {
5520        std::default::Default::default()
5521    }
5522
5523    /// Sets the value of [name][crate::model::DeleteManagementDnsZoneBindingRequest::name].
5524    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5525        self.name = v.into();
5526        self
5527    }
5528
5529    /// Sets the value of [request_id][crate::model::DeleteManagementDnsZoneBindingRequest::request_id].
5530    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5531        self.request_id = v.into();
5532        self
5533    }
5534}
5535
5536impl wkt::message::Message for DeleteManagementDnsZoneBindingRequest {
5537    fn typename() -> &'static str {
5538        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest"
5539    }
5540}
5541
5542/// Request message for [VmwareEngine.RepairManagementDnsZoneBindings][]
5543#[serde_with::serde_as]
5544#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5545#[serde(default, rename_all = "camelCase")]
5546#[non_exhaustive]
5547pub struct RepairManagementDnsZoneBindingRequest {
5548    /// Required. The resource name of the management DNS zone binding to repair.
5549    /// Resource names are schemeless URIs that follow the conventions in
5550    /// <https://cloud.google.com/apis/design/resource_names>.
5551    /// For example:
5552    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5553    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5554    pub name: std::string::String,
5555
5556    /// Optional. A request ID to identify requests. Specify a unique request ID
5557    /// so that if you must retry your request, the server will know to ignore
5558    /// the request if it has already been completed. The server guarantees that a
5559    /// request doesn't result in creation of duplicate commitments for at least 60
5560    /// minutes.
5561    ///
5562    /// For example, consider a situation where you make an initial request and the
5563    /// request times out. If you make the request again with the same request ID,
5564    /// the server can check if the original operation with the same request ID was
5565    /// received, and if so, will ignore the second request. This prevents clients
5566    /// from accidentally creating duplicate commitments.
5567    ///
5568    /// The request ID must be a valid UUID with the exception that zero UUID is
5569    /// not supported (00000000-0000-0000-0000-000000000000).
5570    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5571    pub request_id: std::string::String,
5572
5573    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5574    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5575}
5576
5577impl RepairManagementDnsZoneBindingRequest {
5578    pub fn new() -> Self {
5579        std::default::Default::default()
5580    }
5581
5582    /// Sets the value of [name][crate::model::RepairManagementDnsZoneBindingRequest::name].
5583    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5584        self.name = v.into();
5585        self
5586    }
5587
5588    /// Sets the value of [request_id][crate::model::RepairManagementDnsZoneBindingRequest::request_id].
5589    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5590        self.request_id = v.into();
5591        self
5592    }
5593}
5594
5595impl wkt::message::Message for RepairManagementDnsZoneBindingRequest {
5596    fn typename() -> &'static str {
5597        "type.googleapis.com/google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest"
5598    }
5599}
5600
5601/// Request message for
5602/// [VmwareEngine.CreateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]
5603///
5604/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]: crate::client::VmwareEngine::create_vmware_engine_network
5605#[serde_with::serde_as]
5606#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5607#[serde(default, rename_all = "camelCase")]
5608#[non_exhaustive]
5609pub struct CreateVmwareEngineNetworkRequest {
5610    /// Required. The resource name of the location to create the new VMware Engine
5611    /// network in. A VMware Engine network of type
5612    /// `LEGACY` is a regional resource, and a VMware
5613    /// Engine network of type `STANDARD` is a global resource.
5614    /// Resource names are schemeless URIs that follow the conventions in
5615    /// <https://cloud.google.com/apis/design/resource_names>. For example:
5616    /// `projects/my-project/locations/global`
5617    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5618    pub parent: std::string::String,
5619
5620    /// Required. The user-provided identifier of the new VMware Engine network.
5621    /// This identifier must be unique among VMware Engine network resources
5622    /// within the parent and becomes the final token in the name URI. The
5623    /// identifier must meet the following requirements:
5624    ///
5625    /// * For networks of type LEGACY, adheres to the format:
5626    ///   `{region-id}-default`. Replace `{region-id}` with the region where you want
5627    ///   to create the VMware Engine network. For example, "us-central1-default".
5628    /// * Only contains 1-63 alphanumeric characters and hyphens
5629    /// * Begins with an alphabetical character
5630    /// * Ends with a non-hyphen character
5631    /// * Not formatted as a UUID
5632    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5633    ///   (section 3.5)
5634    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5635    pub vmware_engine_network_id: std::string::String,
5636
5637    /// Required. The initial description of the new VMware Engine network.
5638    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5639    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
5640
5641    /// Optional. A request ID to identify requests. Specify a unique request ID
5642    /// so that if you must retry your request, the server will know to ignore
5643    /// the request if it has already been completed. The server guarantees that a
5644    /// request doesn't result in creation of duplicate commitments for at least 60
5645    /// minutes.
5646    ///
5647    /// For example, consider a situation where you make an initial request and the
5648    /// request times out. If you make the request again with the same request
5649    /// ID, the server can check if original operation with the same request ID
5650    /// was received, and if so, will ignore the second request. This prevents
5651    /// clients from accidentally creating duplicate commitments.
5652    ///
5653    /// The request ID must be a valid UUID with the exception that zero UUID is
5654    /// not supported (00000000-0000-0000-0000-000000000000).
5655    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5656    pub request_id: std::string::String,
5657
5658    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5659    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5660}
5661
5662impl CreateVmwareEngineNetworkRequest {
5663    pub fn new() -> Self {
5664        std::default::Default::default()
5665    }
5666
5667    /// Sets the value of [parent][crate::model::CreateVmwareEngineNetworkRequest::parent].
5668    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5669        self.parent = v.into();
5670        self
5671    }
5672
5673    /// Sets the value of [vmware_engine_network_id][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network_id].
5674    pub fn set_vmware_engine_network_id<T: std::convert::Into<std::string::String>>(
5675        mut self,
5676        v: T,
5677    ) -> Self {
5678        self.vmware_engine_network_id = v.into();
5679        self
5680    }
5681
5682    /// Sets the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
5683    pub fn set_vmware_engine_network<
5684        T: std::convert::Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
5685    >(
5686        mut self,
5687        v: T,
5688    ) -> Self {
5689        self.vmware_engine_network = v.into();
5690        self
5691    }
5692
5693    /// Sets the value of [request_id][crate::model::CreateVmwareEngineNetworkRequest::request_id].
5694    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5695        self.request_id = v.into();
5696        self
5697    }
5698}
5699
5700impl wkt::message::Message for CreateVmwareEngineNetworkRequest {
5701    fn typename() -> &'static str {
5702        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest"
5703    }
5704}
5705
5706/// Request message for
5707/// [VmwareEngine.UpdateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]
5708///
5709/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]: crate::client::VmwareEngine::update_vmware_engine_network
5710#[serde_with::serde_as]
5711#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5712#[serde(default, rename_all = "camelCase")]
5713#[non_exhaustive]
5714pub struct UpdateVmwareEngineNetworkRequest {
5715    /// Required. VMware Engine network description.
5716    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5717    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
5718
5719    /// Required. Field mask is used to specify the fields to be overwritten in the
5720    /// VMware Engine network resource by the update.
5721    /// The fields specified in the `update_mask` are relative to the resource, not
5722    /// the full request. A field will be overwritten if it is in the mask. If the
5723    /// user does not provide a mask then all fields will be overwritten. Only the
5724    /// following fields can be updated: `description`.
5725    #[serde(skip_serializing_if = "std::option::Option::is_none")]
5726    pub update_mask: std::option::Option<wkt::FieldMask>,
5727
5728    /// Optional. A request ID to identify requests. Specify a unique request ID
5729    /// so that if you must retry your request, the server will know to ignore
5730    /// the request if it has already been completed. The server guarantees that a
5731    /// request doesn't result in creation of duplicate commitments for at least 60
5732    /// minutes.
5733    ///
5734    /// For example, consider a situation where you make an initial request and the
5735    /// request times out. If you make the request again with the same request
5736    /// ID, the server can check if original operation with the same request ID
5737    /// was received, and if so, will ignore the second request. This prevents
5738    /// clients from accidentally creating duplicate commitments.
5739    ///
5740    /// The request ID must be a valid UUID with the exception that zero UUID is
5741    /// not supported (00000000-0000-0000-0000-000000000000).
5742    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5743    pub request_id: std::string::String,
5744
5745    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5746    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5747}
5748
5749impl UpdateVmwareEngineNetworkRequest {
5750    pub fn new() -> Self {
5751        std::default::Default::default()
5752    }
5753
5754    /// Sets the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
5755    pub fn set_vmware_engine_network<
5756        T: std::convert::Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
5757    >(
5758        mut self,
5759        v: T,
5760    ) -> Self {
5761        self.vmware_engine_network = v.into();
5762        self
5763    }
5764
5765    /// Sets the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
5766    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
5767        mut self,
5768        v: T,
5769    ) -> Self {
5770        self.update_mask = v.into();
5771        self
5772    }
5773
5774    /// Sets the value of [request_id][crate::model::UpdateVmwareEngineNetworkRequest::request_id].
5775    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5776        self.request_id = v.into();
5777        self
5778    }
5779}
5780
5781impl wkt::message::Message for UpdateVmwareEngineNetworkRequest {
5782    fn typename() -> &'static str {
5783        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest"
5784    }
5785}
5786
5787/// Request message for
5788/// [VmwareEngine.DeleteVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]
5789///
5790/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]: crate::client::VmwareEngine::delete_vmware_engine_network
5791#[serde_with::serde_as]
5792#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5793#[serde(default, rename_all = "camelCase")]
5794#[non_exhaustive]
5795pub struct DeleteVmwareEngineNetworkRequest {
5796    /// Required. The resource name of the VMware Engine network to be deleted.
5797    /// Resource names are schemeless URIs that follow the conventions in
5798    /// <https://cloud.google.com/apis/design/resource_names>.
5799    /// For example:
5800    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
5801    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5802    pub name: std::string::String,
5803
5804    /// Optional. A request ID to identify requests. Specify a unique request ID
5805    /// so that if you must retry your request, the server will know to ignore
5806    /// the request if it has already been completed. The server guarantees that a
5807    /// request doesn't result in creation of duplicate commitments for at least 60
5808    /// minutes.
5809    ///
5810    /// For example, consider a situation where you make an initial request and the
5811    /// request times out. If you make the request again with the same request
5812    /// ID, the server can check if original operation with the same request ID
5813    /// was received, and if so, will ignore the second request. This prevents
5814    /// clients from accidentally creating duplicate commitments.
5815    ///
5816    /// The request ID must be a valid UUID with the exception that zero UUID is
5817    /// not supported (00000000-0000-0000-0000-000000000000).
5818    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5819    pub request_id: std::string::String,
5820
5821    /// Optional. Checksum used to ensure that the user-provided value is up to
5822    /// date before the server processes the request. The server compares provided
5823    /// checksum with the current checksum of the resource. If the user-provided
5824    /// value is out of date, this request returns an `ABORTED` error.
5825    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5826    pub etag: std::string::String,
5827
5828    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5829    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5830}
5831
5832impl DeleteVmwareEngineNetworkRequest {
5833    pub fn new() -> Self {
5834        std::default::Default::default()
5835    }
5836
5837    /// Sets the value of [name][crate::model::DeleteVmwareEngineNetworkRequest::name].
5838    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5839        self.name = v.into();
5840        self
5841    }
5842
5843    /// Sets the value of [request_id][crate::model::DeleteVmwareEngineNetworkRequest::request_id].
5844    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5845        self.request_id = v.into();
5846        self
5847    }
5848
5849    /// Sets the value of [etag][crate::model::DeleteVmwareEngineNetworkRequest::etag].
5850    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5851        self.etag = v.into();
5852        self
5853    }
5854}
5855
5856impl wkt::message::Message for DeleteVmwareEngineNetworkRequest {
5857    fn typename() -> &'static str {
5858        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest"
5859    }
5860}
5861
5862/// Request message for
5863/// [VmwareEngine.GetVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]
5864///
5865/// [google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]: crate::client::VmwareEngine::get_vmware_engine_network
5866#[serde_with::serde_as]
5867#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5868#[serde(default, rename_all = "camelCase")]
5869#[non_exhaustive]
5870pub struct GetVmwareEngineNetworkRequest {
5871    /// Required. The resource name of the VMware Engine network to retrieve.
5872    /// Resource names are schemeless URIs that follow the conventions in
5873    /// <https://cloud.google.com/apis/design/resource_names>.
5874    /// For example:
5875    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
5876    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5877    pub name: std::string::String,
5878
5879    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5880    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5881}
5882
5883impl GetVmwareEngineNetworkRequest {
5884    pub fn new() -> Self {
5885        std::default::Default::default()
5886    }
5887
5888    /// Sets the value of [name][crate::model::GetVmwareEngineNetworkRequest::name].
5889    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5890        self.name = v.into();
5891        self
5892    }
5893}
5894
5895impl wkt::message::Message for GetVmwareEngineNetworkRequest {
5896    fn typename() -> &'static str {
5897        "type.googleapis.com/google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest"
5898    }
5899}
5900
5901/// Request message for
5902/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
5903///
5904/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
5905#[serde_with::serde_as]
5906#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
5907#[serde(default, rename_all = "camelCase")]
5908#[non_exhaustive]
5909pub struct ListVmwareEngineNetworksRequest {
5910    /// Required. The resource name of the location to query for
5911    /// VMware Engine networks. Resource names are schemeless URIs that follow the
5912    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
5913    /// example: `projects/my-project/locations/global`
5914    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5915    pub parent: std::string::String,
5916
5917    /// The maximum number of results to return in one page.
5918    /// The maximum value is coerced to 1000.
5919    /// The default value of this field is 500.
5920    pub page_size: i32,
5921
5922    /// A page token, received from a previous `ListVmwareEngineNetworks` call.
5923    /// Provide this to retrieve the subsequent page.
5924    ///
5925    /// When paginating, all other parameters provided to
5926    /// `ListVmwareEngineNetworks` must match the call that provided the page
5927    /// token.
5928    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5929    pub page_token: std::string::String,
5930
5931    /// A filter expression that matches resources returned in the response.
5932    /// The expression must specify the field name, a comparison
5933    /// operator, and the value that you want to use for filtering. The value
5934    /// must be a string, a number, or a boolean. The comparison operator
5935    /// must be `=`, `!=`, `>`, or `<`.
5936    ///
5937    /// For example, if you are filtering a list of network peerings, you can
5938    /// exclude the ones named `example-network` by specifying
5939    /// `name != "example-network"`.
5940    ///
5941    /// To filter on multiple expressions, provide each separate expression within
5942    /// parentheses. For example:
5943    ///
5944    /// ```norust
5945    /// (name = "example-network")
5946    /// (createTime > "2021-04-12T08:15:10.40Z")
5947    /// ```
5948    ///
5949    /// By default, each expression is an `AND` expression. However, you
5950    /// can include `AND` and `OR` expressions explicitly.
5951    /// For example:
5952    ///
5953    /// ```norust
5954    /// (name = "example-network-1") AND
5955    /// (createTime > "2021-04-12T08:15:10.40Z") OR
5956    /// (name = "example-network-2")
5957    /// ```
5958    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5959    pub filter: std::string::String,
5960
5961    /// Sorts list results by a certain order. By default, returned results
5962    /// are ordered by `name` in ascending order.
5963    /// You can also sort results in descending order based on the `name` value
5964    /// using `orderBy="name desc"`.
5965    /// Currently, only ordering by `name` is supported.
5966    #[serde(skip_serializing_if = "std::string::String::is_empty")]
5967    pub order_by: std::string::String,
5968
5969    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
5970    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5971}
5972
5973impl ListVmwareEngineNetworksRequest {
5974    pub fn new() -> Self {
5975        std::default::Default::default()
5976    }
5977
5978    /// Sets the value of [parent][crate::model::ListVmwareEngineNetworksRequest::parent].
5979    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5980        self.parent = v.into();
5981        self
5982    }
5983
5984    /// Sets the value of [page_size][crate::model::ListVmwareEngineNetworksRequest::page_size].
5985    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5986        self.page_size = v.into();
5987        self
5988    }
5989
5990    /// Sets the value of [page_token][crate::model::ListVmwareEngineNetworksRequest::page_token].
5991    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5992        self.page_token = v.into();
5993        self
5994    }
5995
5996    /// Sets the value of [filter][crate::model::ListVmwareEngineNetworksRequest::filter].
5997    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5998        self.filter = v.into();
5999        self
6000    }
6001
6002    /// Sets the value of [order_by][crate::model::ListVmwareEngineNetworksRequest::order_by].
6003    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6004        self.order_by = v.into();
6005        self
6006    }
6007}
6008
6009impl wkt::message::Message for ListVmwareEngineNetworksRequest {
6010    fn typename() -> &'static str {
6011        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest"
6012    }
6013}
6014
6015/// Response message for
6016/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
6017///
6018/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
6019#[serde_with::serde_as]
6020#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6021#[serde(default, rename_all = "camelCase")]
6022#[non_exhaustive]
6023pub struct ListVmwareEngineNetworksResponse {
6024    /// A list of VMware Engine networks.
6025    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6026    pub vmware_engine_networks: std::vec::Vec<crate::model::VmwareEngineNetwork>,
6027
6028    /// A token, which can be sent as `page_token` to retrieve the next page.
6029    /// If this field is omitted, there are no subsequent pages.
6030    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6031    pub next_page_token: std::string::String,
6032
6033    /// Unreachable resources.
6034    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6035    pub unreachable: std::vec::Vec<std::string::String>,
6036
6037    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6038    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6039}
6040
6041impl ListVmwareEngineNetworksResponse {
6042    pub fn new() -> Self {
6043        std::default::Default::default()
6044    }
6045
6046    /// Sets the value of [next_page_token][crate::model::ListVmwareEngineNetworksResponse::next_page_token].
6047    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6048        self.next_page_token = v.into();
6049        self
6050    }
6051
6052    /// Sets the value of [vmware_engine_networks][crate::model::ListVmwareEngineNetworksResponse::vmware_engine_networks].
6053    pub fn set_vmware_engine_networks<T, V>(mut self, v: T) -> Self
6054    where
6055        T: std::iter::IntoIterator<Item = V>,
6056        V: std::convert::Into<crate::model::VmwareEngineNetwork>,
6057    {
6058        use std::iter::Iterator;
6059        self.vmware_engine_networks = v.into_iter().map(|i| i.into()).collect();
6060        self
6061    }
6062
6063    /// Sets the value of [unreachable][crate::model::ListVmwareEngineNetworksResponse::unreachable].
6064    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6065    where
6066        T: std::iter::IntoIterator<Item = V>,
6067        V: std::convert::Into<std::string::String>,
6068    {
6069        use std::iter::Iterator;
6070        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6071        self
6072    }
6073}
6074
6075impl wkt::message::Message for ListVmwareEngineNetworksResponse {
6076    fn typename() -> &'static str {
6077        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse"
6078    }
6079}
6080
6081#[doc(hidden)]
6082impl gax::paginator::internal::PageableResponse for ListVmwareEngineNetworksResponse {
6083    type PageItem = crate::model::VmwareEngineNetwork;
6084
6085    fn items(self) -> std::vec::Vec<Self::PageItem> {
6086        self.vmware_engine_networks
6087    }
6088
6089    fn next_page_token(&self) -> std::string::String {
6090        use std::clone::Clone;
6091        self.next_page_token.clone()
6092    }
6093}
6094
6095/// Request message for
6096/// [VmwareEngine.CreatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]
6097///
6098/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]: crate::client::VmwareEngine::create_private_connection
6099#[serde_with::serde_as]
6100#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6101#[serde(default, rename_all = "camelCase")]
6102#[non_exhaustive]
6103pub struct CreatePrivateConnectionRequest {
6104    /// Required. The resource name of the location to create the new private
6105    /// connection in. Private connection is a regional resource.
6106    /// Resource names are schemeless URIs that follow the conventions in
6107    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6108    /// `projects/my-project/locations/us-central1`
6109    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6110    pub parent: std::string::String,
6111
6112    /// Required. The user-provided identifier of the new private connection.
6113    /// This identifier must be unique among private connection resources
6114    /// within the parent and becomes the final token in the name URI. The
6115    /// identifier must meet the following requirements:
6116    ///
6117    /// * Only contains 1-63 alphanumeric characters and hyphens
6118    /// * Begins with an alphabetical character
6119    /// * Ends with a non-hyphen character
6120    /// * Not formatted as a UUID
6121    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
6122    ///   (section 3.5)
6123    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6124    pub private_connection_id: std::string::String,
6125
6126    /// Required. The initial description of the new private connection.
6127    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6128    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
6129
6130    /// Optional. A request ID to identify requests. Specify a unique request ID
6131    /// so that if you must retry your request, the server will know to ignore
6132    /// the request if it has already been completed. The server guarantees that a
6133    /// request doesn't result in creation of duplicate commitments for at least 60
6134    /// minutes.
6135    ///
6136    /// For example, consider a situation where you make an initial request and the
6137    /// request times out. If you make the request again with the same request
6138    /// ID, the server can check if original operation with the same request ID
6139    /// was received, and if so, will ignore the second request. This prevents
6140    /// clients from accidentally creating duplicate commitments.
6141    ///
6142    /// The request ID must be a valid UUID with the exception that zero UUID is
6143    /// not supported (00000000-0000-0000-0000-000000000000).
6144    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6145    pub request_id: std::string::String,
6146
6147    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6148    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6149}
6150
6151impl CreatePrivateConnectionRequest {
6152    pub fn new() -> Self {
6153        std::default::Default::default()
6154    }
6155
6156    /// Sets the value of [parent][crate::model::CreatePrivateConnectionRequest::parent].
6157    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6158        self.parent = v.into();
6159        self
6160    }
6161
6162    /// Sets the value of [private_connection_id][crate::model::CreatePrivateConnectionRequest::private_connection_id].
6163    pub fn set_private_connection_id<T: std::convert::Into<std::string::String>>(
6164        mut self,
6165        v: T,
6166    ) -> Self {
6167        self.private_connection_id = v.into();
6168        self
6169    }
6170
6171    /// Sets the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
6172    pub fn set_private_connection<
6173        T: std::convert::Into<std::option::Option<crate::model::PrivateConnection>>,
6174    >(
6175        mut self,
6176        v: T,
6177    ) -> Self {
6178        self.private_connection = v.into();
6179        self
6180    }
6181
6182    /// Sets the value of [request_id][crate::model::CreatePrivateConnectionRequest::request_id].
6183    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6184        self.request_id = v.into();
6185        self
6186    }
6187}
6188
6189impl wkt::message::Message for CreatePrivateConnectionRequest {
6190    fn typename() -> &'static str {
6191        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest"
6192    }
6193}
6194
6195/// Request message for
6196/// [VmwareEngine.GetPrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]
6197///
6198/// [google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]: crate::client::VmwareEngine::get_private_connection
6199#[serde_with::serde_as]
6200#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6201#[serde(default, rename_all = "camelCase")]
6202#[non_exhaustive]
6203pub struct GetPrivateConnectionRequest {
6204    /// Required. The resource name of the private connection to retrieve.
6205    /// Resource names are schemeless URIs that follow the conventions in
6206    /// <https://cloud.google.com/apis/design/resource_names>.
6207    /// For example:
6208    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
6209    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6210    pub name: std::string::String,
6211
6212    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6213    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6214}
6215
6216impl GetPrivateConnectionRequest {
6217    pub fn new() -> Self {
6218        std::default::Default::default()
6219    }
6220
6221    /// Sets the value of [name][crate::model::GetPrivateConnectionRequest::name].
6222    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6223        self.name = v.into();
6224        self
6225    }
6226}
6227
6228impl wkt::message::Message for GetPrivateConnectionRequest {
6229    fn typename() -> &'static str {
6230        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateConnectionRequest"
6231    }
6232}
6233
6234/// Request message for
6235/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
6236///
6237/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
6238#[serde_with::serde_as]
6239#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6240#[serde(default, rename_all = "camelCase")]
6241#[non_exhaustive]
6242pub struct ListPrivateConnectionsRequest {
6243    /// Required. The resource name of the location to query for
6244    /// private connections. Resource names are schemeless URIs that follow the
6245    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
6246    /// example: `projects/my-project/locations/us-central1`
6247    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6248    pub parent: std::string::String,
6249
6250    /// The maximum number of private connections to return in one page.
6251    /// The maximum value is coerced to 1000.
6252    /// The default value of this field is 500.
6253    pub page_size: i32,
6254
6255    /// A page token, received from a previous `ListPrivateConnections` call.
6256    /// Provide this to retrieve the subsequent page.
6257    ///
6258    /// When paginating, all other parameters provided to
6259    /// `ListPrivateConnections` must match the call that provided the page
6260    /// token.
6261    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6262    pub page_token: std::string::String,
6263
6264    /// A filter expression that matches resources returned in the response.
6265    /// The expression must specify the field name, a comparison
6266    /// operator, and the value that you want to use for filtering. The value
6267    /// must be a string, a number, or a boolean. The comparison operator
6268    /// must be `=`, `!=`, `>`, or `<`.
6269    ///
6270    /// For example, if you are filtering a list of private connections, you can
6271    /// exclude the ones named `example-connection` by specifying
6272    /// `name != "example-connection"`.
6273    ///
6274    /// To filter on multiple expressions, provide each separate expression within
6275    /// parentheses. For example:
6276    ///
6277    /// ```norust
6278    /// (name = "example-connection")
6279    /// (createTime > "2022-09-22T08:15:10.40Z")
6280    /// ```
6281    ///
6282    /// By default, each expression is an `AND` expression. However, you
6283    /// can include `AND` and `OR` expressions explicitly.
6284    /// For example:
6285    ///
6286    /// ```norust
6287    /// (name = "example-connection-1") AND
6288    /// (createTime > "2021-04-12T08:15:10.40Z") OR
6289    /// (name = "example-connection-2")
6290    /// ```
6291    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6292    pub filter: std::string::String,
6293
6294    /// Sorts list results by a certain order. By default, returned results
6295    /// are ordered by `name` in ascending order.
6296    /// You can also sort results in descending order based on the `name` value
6297    /// using `orderBy="name desc"`.
6298    /// Currently, only ordering by `name` is supported.
6299    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6300    pub order_by: std::string::String,
6301
6302    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6303    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6304}
6305
6306impl ListPrivateConnectionsRequest {
6307    pub fn new() -> Self {
6308        std::default::Default::default()
6309    }
6310
6311    /// Sets the value of [parent][crate::model::ListPrivateConnectionsRequest::parent].
6312    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6313        self.parent = v.into();
6314        self
6315    }
6316
6317    /// Sets the value of [page_size][crate::model::ListPrivateConnectionsRequest::page_size].
6318    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6319        self.page_size = v.into();
6320        self
6321    }
6322
6323    /// Sets the value of [page_token][crate::model::ListPrivateConnectionsRequest::page_token].
6324    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6325        self.page_token = v.into();
6326        self
6327    }
6328
6329    /// Sets the value of [filter][crate::model::ListPrivateConnectionsRequest::filter].
6330    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6331        self.filter = v.into();
6332        self
6333    }
6334
6335    /// Sets the value of [order_by][crate::model::ListPrivateConnectionsRequest::order_by].
6336    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6337        self.order_by = v.into();
6338        self
6339    }
6340}
6341
6342impl wkt::message::Message for ListPrivateConnectionsRequest {
6343    fn typename() -> &'static str {
6344        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest"
6345    }
6346}
6347
6348/// Response message for
6349/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
6350///
6351/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
6352#[serde_with::serde_as]
6353#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6354#[serde(default, rename_all = "camelCase")]
6355#[non_exhaustive]
6356pub struct ListPrivateConnectionsResponse {
6357    /// A list of private connections.
6358    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6359    pub private_connections: std::vec::Vec<crate::model::PrivateConnection>,
6360
6361    /// A token, which can be sent as `page_token` to retrieve the next page.
6362    /// If this field is omitted, there are no subsequent pages.
6363    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6364    pub next_page_token: std::string::String,
6365
6366    /// Unreachable resources.
6367    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6368    pub unreachable: std::vec::Vec<std::string::String>,
6369
6370    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6371    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6372}
6373
6374impl ListPrivateConnectionsResponse {
6375    pub fn new() -> Self {
6376        std::default::Default::default()
6377    }
6378
6379    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionsResponse::next_page_token].
6380    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6381        self.next_page_token = v.into();
6382        self
6383    }
6384
6385    /// Sets the value of [private_connections][crate::model::ListPrivateConnectionsResponse::private_connections].
6386    pub fn set_private_connections<T, V>(mut self, v: T) -> Self
6387    where
6388        T: std::iter::IntoIterator<Item = V>,
6389        V: std::convert::Into<crate::model::PrivateConnection>,
6390    {
6391        use std::iter::Iterator;
6392        self.private_connections = v.into_iter().map(|i| i.into()).collect();
6393        self
6394    }
6395
6396    /// Sets the value of [unreachable][crate::model::ListPrivateConnectionsResponse::unreachable].
6397    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6398    where
6399        T: std::iter::IntoIterator<Item = V>,
6400        V: std::convert::Into<std::string::String>,
6401    {
6402        use std::iter::Iterator;
6403        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6404        self
6405    }
6406}
6407
6408impl wkt::message::Message for ListPrivateConnectionsResponse {
6409    fn typename() -> &'static str {
6410        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsResponse"
6411    }
6412}
6413
6414#[doc(hidden)]
6415impl gax::paginator::internal::PageableResponse for ListPrivateConnectionsResponse {
6416    type PageItem = crate::model::PrivateConnection;
6417
6418    fn items(self) -> std::vec::Vec<Self::PageItem> {
6419        self.private_connections
6420    }
6421
6422    fn next_page_token(&self) -> std::string::String {
6423        use std::clone::Clone;
6424        self.next_page_token.clone()
6425    }
6426}
6427
6428/// Request message for
6429/// [VmwareEngine.UpdatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]
6430///
6431/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]: crate::client::VmwareEngine::update_private_connection
6432#[serde_with::serde_as]
6433#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6434#[serde(default, rename_all = "camelCase")]
6435#[non_exhaustive]
6436pub struct UpdatePrivateConnectionRequest {
6437    /// Required. Private connection description.
6438    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6439    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
6440
6441    /// Required. Field mask is used to specify the fields to be overwritten in the
6442    /// `PrivateConnection` resource by the update.
6443    /// The fields specified in the `update_mask` are relative to the resource, not
6444    /// the full request. A field will be overwritten if it is in the mask. If the
6445    /// user does not provide a mask then all fields will be overwritten.
6446    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6447    pub update_mask: std::option::Option<wkt::FieldMask>,
6448
6449    /// Optional. A request ID to identify requests. Specify a unique request ID
6450    /// so that if you must retry your request, the server will know to ignore
6451    /// the request if it has already been completed. The server guarantees that a
6452    /// request doesn't result in creation of duplicate commitments for at least 60
6453    /// minutes.
6454    ///
6455    /// For example, consider a situation where you make an initial request and the
6456    /// request times out. If you make the request again with the same request
6457    /// ID, the server can check if original operation with the same request ID
6458    /// was received, and if so, will ignore the second request. This prevents
6459    /// clients from accidentally creating duplicate commitments.
6460    ///
6461    /// The request ID must be a valid UUID with the exception that zero UUID is
6462    /// not supported (00000000-0000-0000-0000-000000000000).
6463    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6464    pub request_id: std::string::String,
6465
6466    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6467    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6468}
6469
6470impl UpdatePrivateConnectionRequest {
6471    pub fn new() -> Self {
6472        std::default::Default::default()
6473    }
6474
6475    /// Sets the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
6476    pub fn set_private_connection<
6477        T: std::convert::Into<std::option::Option<crate::model::PrivateConnection>>,
6478    >(
6479        mut self,
6480        v: T,
6481    ) -> Self {
6482        self.private_connection = v.into();
6483        self
6484    }
6485
6486    /// Sets the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
6487    pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
6488        mut self,
6489        v: T,
6490    ) -> Self {
6491        self.update_mask = v.into();
6492        self
6493    }
6494
6495    /// Sets the value of [request_id][crate::model::UpdatePrivateConnectionRequest::request_id].
6496    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6497        self.request_id = v.into();
6498        self
6499    }
6500}
6501
6502impl wkt::message::Message for UpdatePrivateConnectionRequest {
6503    fn typename() -> &'static str {
6504        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest"
6505    }
6506}
6507
6508/// Request message for
6509/// [VmwareEngine.DeletePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]
6510///
6511/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]: crate::client::VmwareEngine::delete_private_connection
6512#[serde_with::serde_as]
6513#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6514#[serde(default, rename_all = "camelCase")]
6515#[non_exhaustive]
6516pub struct DeletePrivateConnectionRequest {
6517    /// Required. The resource name of the private connection to be deleted.
6518    /// Resource names are schemeless URIs that follow the conventions in
6519    /// <https://cloud.google.com/apis/design/resource_names>.
6520    /// For example:
6521    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
6522    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6523    pub name: std::string::String,
6524
6525    /// Optional. A request ID to identify requests. Specify a unique request ID
6526    /// so that if you must retry your request, the server will know to ignore
6527    /// the request if it has already been completed. The server guarantees that a
6528    /// request doesn't result in creation of duplicate commitments for at least 60
6529    /// minutes.
6530    ///
6531    /// For example, consider a situation where you make an initial request and the
6532    /// request times out. If you make the request again with the same request
6533    /// ID, the server can check if original operation with the same request ID
6534    /// was received, and if so, will ignore the second request. This prevents
6535    /// clients from accidentally creating duplicate commitments.
6536    ///
6537    /// The request ID must be a valid UUID with the exception that zero UUID is
6538    /// not supported (00000000-0000-0000-0000-000000000000).
6539    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6540    pub request_id: std::string::String,
6541
6542    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6543    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6544}
6545
6546impl DeletePrivateConnectionRequest {
6547    pub fn new() -> Self {
6548        std::default::Default::default()
6549    }
6550
6551    /// Sets the value of [name][crate::model::DeletePrivateConnectionRequest::name].
6552    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6553        self.name = v.into();
6554        self
6555    }
6556
6557    /// Sets the value of [request_id][crate::model::DeletePrivateConnectionRequest::request_id].
6558    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6559        self.request_id = v.into();
6560        self
6561    }
6562}
6563
6564impl wkt::message::Message for DeletePrivateConnectionRequest {
6565    fn typename() -> &'static str {
6566        "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest"
6567    }
6568}
6569
6570/// Request message for
6571/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
6572///
6573/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
6574#[serde_with::serde_as]
6575#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6576#[serde(default, rename_all = "camelCase")]
6577#[non_exhaustive]
6578pub struct ListPrivateConnectionPeeringRoutesRequest {
6579    /// Required. The resource name of the private connection to retrieve peering
6580    /// routes from. Resource names are schemeless URIs that follow the conventions
6581    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
6582    /// `projects/my-project/locations/us-west1/privateConnections/my-connection`
6583    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6584    pub parent: std::string::String,
6585
6586    /// The maximum number of peering routes to return in one page.
6587    /// The service may return fewer than this value.
6588    /// The maximum value is coerced to 1000.
6589    /// The default value of this field is 500.
6590    pub page_size: i32,
6591
6592    /// A page token, received from a previous `ListPrivateConnectionPeeringRoutes`
6593    /// call. Provide this to retrieve the subsequent page. When paginating, all
6594    /// other parameters provided to `ListPrivateConnectionPeeringRoutes` must
6595    /// match the call that provided the page token.
6596    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6597    pub page_token: std::string::String,
6598
6599    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6600    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6601}
6602
6603impl ListPrivateConnectionPeeringRoutesRequest {
6604    pub fn new() -> Self {
6605        std::default::Default::default()
6606    }
6607
6608    /// Sets the value of [parent][crate::model::ListPrivateConnectionPeeringRoutesRequest::parent].
6609    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6610        self.parent = v.into();
6611        self
6612    }
6613
6614    /// Sets the value of [page_size][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_size].
6615    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6616        self.page_size = v.into();
6617        self
6618    }
6619
6620    /// Sets the value of [page_token][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_token].
6621    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6622        self.page_token = v.into();
6623        self
6624    }
6625}
6626
6627impl wkt::message::Message for ListPrivateConnectionPeeringRoutesRequest {
6628    fn typename() -> &'static str {
6629        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest"
6630    }
6631}
6632
6633/// Response message for
6634/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
6635///
6636/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
6637#[serde_with::serde_as]
6638#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6639#[serde(default, rename_all = "camelCase")]
6640#[non_exhaustive]
6641pub struct ListPrivateConnectionPeeringRoutesResponse {
6642    /// A list of peering routes.
6643    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
6644    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
6645
6646    /// A token, which can be sent as `page_token` to retrieve the next page.
6647    /// If this field is omitted, there are no subsequent pages.
6648    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6649    pub next_page_token: std::string::String,
6650
6651    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6652    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6653}
6654
6655impl ListPrivateConnectionPeeringRoutesResponse {
6656    pub fn new() -> Self {
6657        std::default::Default::default()
6658    }
6659
6660    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionPeeringRoutesResponse::next_page_token].
6661    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6662        self.next_page_token = v.into();
6663        self
6664    }
6665
6666    /// Sets the value of [peering_routes][crate::model::ListPrivateConnectionPeeringRoutesResponse::peering_routes].
6667    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
6668    where
6669        T: std::iter::IntoIterator<Item = V>,
6670        V: std::convert::Into<crate::model::PeeringRoute>,
6671    {
6672        use std::iter::Iterator;
6673        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
6674        self
6675    }
6676}
6677
6678impl wkt::message::Message for ListPrivateConnectionPeeringRoutesResponse {
6679    fn typename() -> &'static str {
6680        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesResponse"
6681    }
6682}
6683
6684#[doc(hidden)]
6685impl gax::paginator::internal::PageableResponse for ListPrivateConnectionPeeringRoutesResponse {
6686    type PageItem = crate::model::PeeringRoute;
6687
6688    fn items(self) -> std::vec::Vec<Self::PageItem> {
6689        self.peering_routes
6690    }
6691
6692    fn next_page_token(&self) -> std::string::String {
6693        use std::clone::Clone;
6694        self.next_page_token.clone()
6695    }
6696}
6697
6698/// Request message for
6699/// [VmwareEngine.GrantDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]
6700///
6701/// [google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]: crate::client::VmwareEngine::grant_dns_bind_permission
6702#[serde_with::serde_as]
6703#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6704#[serde(default, rename_all = "camelCase")]
6705#[non_exhaustive]
6706pub struct GrantDnsBindPermissionRequest {
6707    /// Required. The name of the resource which stores the users/service accounts
6708    /// having the permission to bind to the corresponding intranet VPC of the
6709    /// consumer project. DnsBindPermission is a global resource. Resource names
6710    /// are schemeless URIs that follow the conventions in
6711    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6712    /// `projects/my-project/locations/global/dnsBindPermission`
6713    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6714    pub name: std::string::String,
6715
6716    /// Required. The consumer provided user/service account which needs to be
6717    /// granted permission to bind with the intranet VPC corresponding to the
6718    /// consumer project.
6719    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6720    pub principal: std::option::Option<crate::model::Principal>,
6721
6722    /// Optional. A request ID to identify requests. Specify a unique request ID
6723    /// so that if you must retry your request, the server will know to ignore
6724    /// the request if it has already been completed. The server guarantees that a
6725    /// request doesn't result in creation of duplicate commitments for at least 60
6726    /// minutes.
6727    ///
6728    /// For example, consider a situation where you make an initial request and the
6729    /// request times out. If you make the request again with the same request
6730    /// ID, the server can check if original operation with the same request ID
6731    /// was received, and if so, will ignore the second request. This prevents
6732    /// clients from accidentally creating duplicate commitments.
6733    ///
6734    /// The request ID must be a valid UUID with the exception that zero UUID is
6735    /// not supported (00000000-0000-0000-0000-000000000000).
6736    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6737    pub request_id: std::string::String,
6738
6739    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6740    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6741}
6742
6743impl GrantDnsBindPermissionRequest {
6744    pub fn new() -> Self {
6745        std::default::Default::default()
6746    }
6747
6748    /// Sets the value of [name][crate::model::GrantDnsBindPermissionRequest::name].
6749    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6750        self.name = v.into();
6751        self
6752    }
6753
6754    /// Sets the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
6755    pub fn set_principal<T: std::convert::Into<std::option::Option<crate::model::Principal>>>(
6756        mut self,
6757        v: T,
6758    ) -> Self {
6759        self.principal = v.into();
6760        self
6761    }
6762
6763    /// Sets the value of [request_id][crate::model::GrantDnsBindPermissionRequest::request_id].
6764    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6765        self.request_id = v.into();
6766        self
6767    }
6768}
6769
6770impl wkt::message::Message for GrantDnsBindPermissionRequest {
6771    fn typename() -> &'static str {
6772        "type.googleapis.com/google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest"
6773    }
6774}
6775
6776/// Request message for
6777/// [VmwareEngine.RevokeDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]
6778///
6779/// [google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]: crate::client::VmwareEngine::revoke_dns_bind_permission
6780#[serde_with::serde_as]
6781#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6782#[serde(default, rename_all = "camelCase")]
6783#[non_exhaustive]
6784pub struct RevokeDnsBindPermissionRequest {
6785    /// Required. The name of the resource which stores the users/service accounts
6786    /// having the permission to bind to the corresponding intranet VPC of the
6787    /// consumer project. DnsBindPermission is a global resource. Resource names
6788    /// are schemeless URIs that follow the conventions in
6789    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6790    /// `projects/my-project/locations/global/dnsBindPermission`
6791    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6792    pub name: std::string::String,
6793
6794    /// Required. The consumer provided user/service account which needs to be
6795    /// granted permission to bind with the intranet VPC corresponding to the
6796    /// consumer project.
6797    #[serde(skip_serializing_if = "std::option::Option::is_none")]
6798    pub principal: std::option::Option<crate::model::Principal>,
6799
6800    /// Optional. A request ID to identify requests. Specify a unique request ID
6801    /// so that if you must retry your request, the server will know to ignore
6802    /// the request if it has already been completed. The server guarantees that a
6803    /// request doesn't result in creation of duplicate commitments for at least 60
6804    /// minutes.
6805    ///
6806    /// For example, consider a situation where you make an initial request and the
6807    /// request times out. If you make the request again with the same request
6808    /// ID, the server can check if original operation with the same request ID
6809    /// was received, and if so, will ignore the second request. This prevents
6810    /// clients from accidentally creating duplicate commitments.
6811    ///
6812    /// The request ID must be a valid UUID with the exception that zero UUID is
6813    /// not supported (00000000-0000-0000-0000-000000000000).
6814    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6815    pub request_id: std::string::String,
6816
6817    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6818    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6819}
6820
6821impl RevokeDnsBindPermissionRequest {
6822    pub fn new() -> Self {
6823        std::default::Default::default()
6824    }
6825
6826    /// Sets the value of [name][crate::model::RevokeDnsBindPermissionRequest::name].
6827    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6828        self.name = v.into();
6829        self
6830    }
6831
6832    /// Sets the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
6833    pub fn set_principal<T: std::convert::Into<std::option::Option<crate::model::Principal>>>(
6834        mut self,
6835        v: T,
6836    ) -> Self {
6837        self.principal = v.into();
6838        self
6839    }
6840
6841    /// Sets the value of [request_id][crate::model::RevokeDnsBindPermissionRequest::request_id].
6842    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6843        self.request_id = v.into();
6844        self
6845    }
6846}
6847
6848impl wkt::message::Message for RevokeDnsBindPermissionRequest {
6849    fn typename() -> &'static str {
6850        "type.googleapis.com/google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest"
6851    }
6852}
6853
6854/// Request message for
6855/// [VmwareEngine.GetDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]
6856///
6857/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]: crate::client::VmwareEngine::get_dns_bind_permission
6858#[serde_with::serde_as]
6859#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6860#[serde(default, rename_all = "camelCase")]
6861#[non_exhaustive]
6862pub struct GetDnsBindPermissionRequest {
6863    /// Required. The name of the resource which stores the users/service accounts
6864    /// having the permission to bind to the corresponding intranet VPC of the
6865    /// consumer project. DnsBindPermission is a global resource. Resource names
6866    /// are schemeless URIs that follow the conventions in
6867    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6868    /// `projects/my-project/locations/global/dnsBindPermission`
6869    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6870    pub name: std::string::String,
6871
6872    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6873    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6874}
6875
6876impl GetDnsBindPermissionRequest {
6877    pub fn new() -> Self {
6878        std::default::Default::default()
6879    }
6880
6881    /// Sets the value of [name][crate::model::GetDnsBindPermissionRequest::name].
6882    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6883        self.name = v.into();
6884        self
6885    }
6886}
6887
6888impl wkt::message::Message for GetDnsBindPermissionRequest {
6889    fn typename() -> &'static str {
6890        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest"
6891    }
6892}
6893
6894/// Network configuration in the consumer project
6895/// with which the peering has to be done.
6896#[serde_with::serde_as]
6897#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6898#[serde(default, rename_all = "camelCase")]
6899#[non_exhaustive]
6900pub struct NetworkConfig {
6901    /// Required. Management CIDR used by VMware management appliances.
6902    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6903    pub management_cidr: std::string::String,
6904
6905    /// Optional. The relative resource name of the VMware Engine network attached
6906    /// to the private cloud. Specify the name in the following form:
6907    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
6908    /// where `{project}` can either be a project number or a project ID.
6909    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6910    pub vmware_engine_network: std::string::String,
6911
6912    /// Output only. The canonical name of the VMware Engine network in the form:
6913    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
6914    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6915    pub vmware_engine_network_canonical: std::string::String,
6916
6917    /// Output only. The IP address layout version of the management IP address
6918    /// range. Possible versions include:
6919    ///
6920    /// * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address
6921    ///   layout used by some existing private clouds. This is no longer supported
6922    ///   for new private clouds as it does not support all features.
6923    /// * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address
6924    ///   layout used by all newly created private clouds. This version supports all
6925    ///   current features.
6926    pub management_ip_address_layout_version: i32,
6927
6928    /// Output only. DNS Server IP of the Private Cloud.
6929    /// All DNS queries can be forwarded to this address for name resolution of
6930    /// Private Cloud's management entities like vCenter, NSX-T Manager and
6931    /// ESXi hosts.
6932    #[serde(skip_serializing_if = "std::string::String::is_empty")]
6933    pub dns_server_ip: std::string::String,
6934
6935    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
6936    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6937}
6938
6939impl NetworkConfig {
6940    pub fn new() -> Self {
6941        std::default::Default::default()
6942    }
6943
6944    /// Sets the value of [management_cidr][crate::model::NetworkConfig::management_cidr].
6945    pub fn set_management_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6946        self.management_cidr = v.into();
6947        self
6948    }
6949
6950    /// Sets the value of [vmware_engine_network][crate::model::NetworkConfig::vmware_engine_network].
6951    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
6952        mut self,
6953        v: T,
6954    ) -> Self {
6955        self.vmware_engine_network = v.into();
6956        self
6957    }
6958
6959    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkConfig::vmware_engine_network_canonical].
6960    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
6961        mut self,
6962        v: T,
6963    ) -> Self {
6964        self.vmware_engine_network_canonical = v.into();
6965        self
6966    }
6967
6968    /// Sets the value of [management_ip_address_layout_version][crate::model::NetworkConfig::management_ip_address_layout_version].
6969    pub fn set_management_ip_address_layout_version<T: std::convert::Into<i32>>(
6970        mut self,
6971        v: T,
6972    ) -> Self {
6973        self.management_ip_address_layout_version = v.into();
6974        self
6975    }
6976
6977    /// Sets the value of [dns_server_ip][crate::model::NetworkConfig::dns_server_ip].
6978    pub fn set_dns_server_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6979        self.dns_server_ip = v.into();
6980        self
6981    }
6982}
6983
6984impl wkt::message::Message for NetworkConfig {
6985    fn typename() -> &'static str {
6986        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkConfig"
6987    }
6988}
6989
6990/// Information about the type and number of nodes associated with the cluster.
6991#[serde_with::serde_as]
6992#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
6993#[serde(default, rename_all = "camelCase")]
6994#[non_exhaustive]
6995pub struct NodeTypeConfig {
6996    /// Required. The number of nodes of this type in the cluster
6997    pub node_count: i32,
6998
6999    /// Optional. Customized number of cores available to each node of the type.
7000    /// This number must always be one of `nodeType.availableCustomCoreCounts`.
7001    /// If zero is provided max value from `nodeType.availableCustomCoreCounts`
7002    /// will be used.
7003    pub custom_core_count: i32,
7004
7005    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7006    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7007}
7008
7009impl NodeTypeConfig {
7010    pub fn new() -> Self {
7011        std::default::Default::default()
7012    }
7013
7014    /// Sets the value of [node_count][crate::model::NodeTypeConfig::node_count].
7015    pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7016        self.node_count = v.into();
7017        self
7018    }
7019
7020    /// Sets the value of [custom_core_count][crate::model::NodeTypeConfig::custom_core_count].
7021    pub fn set_custom_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
7022        self.custom_core_count = v.into();
7023        self
7024    }
7025}
7026
7027impl wkt::message::Message for NodeTypeConfig {
7028    fn typename() -> &'static str {
7029        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeTypeConfig"
7030    }
7031}
7032
7033/// Configuration of a stretched cluster.
7034#[serde_with::serde_as]
7035#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7036#[serde(default, rename_all = "camelCase")]
7037#[non_exhaustive]
7038pub struct StretchedClusterConfig {
7039    /// Required. Zone that will remain operational when connection between the two
7040    /// zones is lost. Specify the resource name of a zone that belongs to the
7041    /// region of the private cloud. For example:
7042    /// `projects/{project}/locations/europe-west3-a` where `{project}` can either
7043    /// be a project number or a project ID.
7044    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7045    pub preferred_location: std::string::String,
7046
7047    /// Required. Additional zone for a higher level of availability and load
7048    /// balancing. Specify the resource name of a zone that belongs to the region
7049    /// of the private cloud. For example:
7050    /// `projects/{project}/locations/europe-west3-b` where `{project}` can either
7051    /// be a project number or a project ID.
7052    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7053    pub secondary_location: std::string::String,
7054
7055    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7056    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7057}
7058
7059impl StretchedClusterConfig {
7060    pub fn new() -> Self {
7061        std::default::Default::default()
7062    }
7063
7064    /// Sets the value of [preferred_location][crate::model::StretchedClusterConfig::preferred_location].
7065    pub fn set_preferred_location<T: std::convert::Into<std::string::String>>(
7066        mut self,
7067        v: T,
7068    ) -> Self {
7069        self.preferred_location = v.into();
7070        self
7071    }
7072
7073    /// Sets the value of [secondary_location][crate::model::StretchedClusterConfig::secondary_location].
7074    pub fn set_secondary_location<T: std::convert::Into<std::string::String>>(
7075        mut self,
7076        v: T,
7077    ) -> Self {
7078        self.secondary_location = v.into();
7079        self
7080    }
7081}
7082
7083impl wkt::message::Message for StretchedClusterConfig {
7084    fn typename() -> &'static str {
7085        "type.googleapis.com/google.cloud.vmwareengine.v1.StretchedClusterConfig"
7086    }
7087}
7088
7089/// Represents a private cloud resource. Private clouds of type `STANDARD` and
7090/// `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are
7091/// regional.
7092#[serde_with::serde_as]
7093#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7094#[serde(default, rename_all = "camelCase")]
7095#[non_exhaustive]
7096pub struct PrivateCloud {
7097    /// Output only. The resource name of this private cloud.
7098    /// Resource names are schemeless URIs that follow the conventions in
7099    /// <https://cloud.google.com/apis/design/resource_names>.
7100    /// For example:
7101    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
7102    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7103    pub name: std::string::String,
7104
7105    /// Output only. Creation time of this resource.
7106    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7107    pub create_time: std::option::Option<wkt::Timestamp>,
7108
7109    /// Output only. Last update time of this resource.
7110    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7111    pub update_time: std::option::Option<wkt::Timestamp>,
7112
7113    /// Output only. Time when the resource was scheduled for deletion.
7114    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7115    pub delete_time: std::option::Option<wkt::Timestamp>,
7116
7117    /// Output only. Time when the resource will be irreversibly deleted.
7118    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7119    pub expire_time: std::option::Option<wkt::Timestamp>,
7120
7121    /// Output only. State of the resource. New values may be added to this enum
7122    /// when appropriate.
7123    pub state: crate::model::private_cloud::State,
7124
7125    /// Required. Network configuration of the private cloud.
7126    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7127    pub network_config: std::option::Option<crate::model::NetworkConfig>,
7128
7129    /// Required. Input only. The management cluster for this private cloud.
7130    /// This field is required during creation of the private cloud to provide
7131    /// details for the default cluster.
7132    ///
7133    /// The following fields can't be changed after private cloud creation:
7134    /// `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`.
7135    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7136    pub management_cluster: std::option::Option<crate::model::private_cloud::ManagementCluster>,
7137
7138    /// User-provided description for this private cloud.
7139    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7140    pub description: std::string::String,
7141
7142    /// Output only. HCX appliance.
7143    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7144    pub hcx: std::option::Option<crate::model::Hcx>,
7145
7146    /// Output only. NSX appliance.
7147    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7148    pub nsx: std::option::Option<crate::model::Nsx>,
7149
7150    /// Output only. Vcenter appliance.
7151    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7152    pub vcenter: std::option::Option<crate::model::Vcenter>,
7153
7154    /// Output only. System-generated unique identifier for the resource.
7155    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7156    pub uid: std::string::String,
7157
7158    /// Optional. Type of the private cloud. Defaults to STANDARD.
7159    #[serde(rename = "type")]
7160    pub r#type: crate::model::private_cloud::Type,
7161
7162    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7163    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7164}
7165
7166impl PrivateCloud {
7167    pub fn new() -> Self {
7168        std::default::Default::default()
7169    }
7170
7171    /// Sets the value of [name][crate::model::PrivateCloud::name].
7172    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7173        self.name = v.into();
7174        self
7175    }
7176
7177    /// Sets the value of [create_time][crate::model::PrivateCloud::create_time].
7178    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7179        mut self,
7180        v: T,
7181    ) -> Self {
7182        self.create_time = v.into();
7183        self
7184    }
7185
7186    /// Sets the value of [update_time][crate::model::PrivateCloud::update_time].
7187    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7188        mut self,
7189        v: T,
7190    ) -> Self {
7191        self.update_time = v.into();
7192        self
7193    }
7194
7195    /// Sets the value of [delete_time][crate::model::PrivateCloud::delete_time].
7196    pub fn set_delete_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7197        mut self,
7198        v: T,
7199    ) -> Self {
7200        self.delete_time = v.into();
7201        self
7202    }
7203
7204    /// Sets the value of [expire_time][crate::model::PrivateCloud::expire_time].
7205    pub fn set_expire_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7206        mut self,
7207        v: T,
7208    ) -> Self {
7209        self.expire_time = v.into();
7210        self
7211    }
7212
7213    /// Sets the value of [state][crate::model::PrivateCloud::state].
7214    pub fn set_state<T: std::convert::Into<crate::model::private_cloud::State>>(
7215        mut self,
7216        v: T,
7217    ) -> Self {
7218        self.state = v.into();
7219        self
7220    }
7221
7222    /// Sets the value of [network_config][crate::model::PrivateCloud::network_config].
7223    pub fn set_network_config<
7224        T: std::convert::Into<std::option::Option<crate::model::NetworkConfig>>,
7225    >(
7226        mut self,
7227        v: T,
7228    ) -> Self {
7229        self.network_config = v.into();
7230        self
7231    }
7232
7233    /// Sets the value of [management_cluster][crate::model::PrivateCloud::management_cluster].
7234    pub fn set_management_cluster<
7235        T: std::convert::Into<std::option::Option<crate::model::private_cloud::ManagementCluster>>,
7236    >(
7237        mut self,
7238        v: T,
7239    ) -> Self {
7240        self.management_cluster = v.into();
7241        self
7242    }
7243
7244    /// Sets the value of [description][crate::model::PrivateCloud::description].
7245    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7246        self.description = v.into();
7247        self
7248    }
7249
7250    /// Sets the value of [hcx][crate::model::PrivateCloud::hcx].
7251    pub fn set_hcx<T: std::convert::Into<std::option::Option<crate::model::Hcx>>>(
7252        mut self,
7253        v: T,
7254    ) -> Self {
7255        self.hcx = v.into();
7256        self
7257    }
7258
7259    /// Sets the value of [nsx][crate::model::PrivateCloud::nsx].
7260    pub fn set_nsx<T: std::convert::Into<std::option::Option<crate::model::Nsx>>>(
7261        mut self,
7262        v: T,
7263    ) -> Self {
7264        self.nsx = v.into();
7265        self
7266    }
7267
7268    /// Sets the value of [vcenter][crate::model::PrivateCloud::vcenter].
7269    pub fn set_vcenter<T: std::convert::Into<std::option::Option<crate::model::Vcenter>>>(
7270        mut self,
7271        v: T,
7272    ) -> Self {
7273        self.vcenter = v.into();
7274        self
7275    }
7276
7277    /// Sets the value of [uid][crate::model::PrivateCloud::uid].
7278    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7279        self.uid = v.into();
7280        self
7281    }
7282
7283    /// Sets the value of [r#type][crate::model::PrivateCloud::type].
7284    pub fn set_type<T: std::convert::Into<crate::model::private_cloud::Type>>(
7285        mut self,
7286        v: T,
7287    ) -> Self {
7288        self.r#type = v.into();
7289        self
7290    }
7291}
7292
7293impl wkt::message::Message for PrivateCloud {
7294    fn typename() -> &'static str {
7295        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud"
7296    }
7297}
7298
7299/// Defines additional types related to [PrivateCloud].
7300pub mod private_cloud {
7301    #[allow(unused_imports)]
7302    use super::*;
7303
7304    /// Management cluster configuration.
7305    #[serde_with::serde_as]
7306    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7307    #[serde(default, rename_all = "camelCase")]
7308    #[non_exhaustive]
7309    pub struct ManagementCluster {
7310        /// Required. The user-provided identifier of the new `Cluster`.
7311        /// The identifier must meet the following requirements:
7312        ///
7313        /// * Only contains 1-63 alphanumeric characters and hyphens
7314        /// * Begins with an alphabetical character
7315        /// * Ends with a non-hyphen character
7316        /// * Not formatted as a UUID
7317        /// * Complies with [RFC
7318        ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
7319        #[serde(skip_serializing_if = "std::string::String::is_empty")]
7320        pub cluster_id: std::string::String,
7321
7322        /// Required. The map of cluster node types in this cluster, where the key is
7323        /// canonical identifier of the node type (corresponds to the `NodeType`).
7324        #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
7325        pub node_type_configs:
7326            std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
7327
7328        /// Optional. Configuration of a stretched cluster. Required for STRETCHED
7329        /// private clouds.
7330        #[serde(skip_serializing_if = "std::option::Option::is_none")]
7331        pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
7332
7333        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7334        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7335    }
7336
7337    impl ManagementCluster {
7338        pub fn new() -> Self {
7339            std::default::Default::default()
7340        }
7341
7342        /// Sets the value of [cluster_id][crate::model::private_cloud::ManagementCluster::cluster_id].
7343        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7344            self.cluster_id = v.into();
7345            self
7346        }
7347
7348        /// Sets the value of [stretched_cluster_config][crate::model::private_cloud::ManagementCluster::stretched_cluster_config].
7349        pub fn set_stretched_cluster_config<
7350            T: std::convert::Into<std::option::Option<crate::model::StretchedClusterConfig>>,
7351        >(
7352            mut self,
7353            v: T,
7354        ) -> Self {
7355            self.stretched_cluster_config = v.into();
7356            self
7357        }
7358
7359        /// Sets the value of [node_type_configs][crate::model::private_cloud::ManagementCluster::node_type_configs].
7360        pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
7361        where
7362            T: std::iter::IntoIterator<Item = (K, V)>,
7363            K: std::convert::Into<std::string::String>,
7364            V: std::convert::Into<crate::model::NodeTypeConfig>,
7365        {
7366            use std::iter::Iterator;
7367            self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7368            self
7369        }
7370    }
7371
7372    impl wkt::message::Message for ManagementCluster {
7373        fn typename() -> &'static str {
7374            "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster"
7375        }
7376    }
7377
7378    /// Enum State defines possible states of private clouds.
7379    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7380    pub struct State(i32);
7381
7382    impl State {
7383        /// The default value. This value should never be used.
7384        pub const STATE_UNSPECIFIED: State = State::new(0);
7385
7386        /// The private cloud is ready.
7387        pub const ACTIVE: State = State::new(1);
7388
7389        /// The private cloud is being created.
7390        pub const CREATING: State = State::new(2);
7391
7392        /// The private cloud is being updated.
7393        pub const UPDATING: State = State::new(3);
7394
7395        /// The private cloud is in failed state.
7396        pub const FAILED: State = State::new(5);
7397
7398        /// The private cloud is scheduled for deletion. The deletion process can be
7399        /// cancelled by using the corresponding undelete method.
7400        pub const DELETED: State = State::new(6);
7401
7402        /// The private cloud is irreversibly deleted and is being removed from the
7403        /// system.
7404        pub const PURGING: State = State::new(7);
7405
7406        /// Creates a new State instance.
7407        pub(crate) const fn new(value: i32) -> Self {
7408            Self(value)
7409        }
7410
7411        /// Gets the enum value.
7412        pub fn value(&self) -> i32 {
7413            self.0
7414        }
7415
7416        /// Gets the enum value as a string.
7417        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
7418            match self.0 {
7419                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
7420                1 => std::borrow::Cow::Borrowed("ACTIVE"),
7421                2 => std::borrow::Cow::Borrowed("CREATING"),
7422                3 => std::borrow::Cow::Borrowed("UPDATING"),
7423                5 => std::borrow::Cow::Borrowed("FAILED"),
7424                6 => std::borrow::Cow::Borrowed("DELETED"),
7425                7 => std::borrow::Cow::Borrowed("PURGING"),
7426                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
7427            }
7428        }
7429
7430        /// Creates an enum value from the value name.
7431        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
7432            match name {
7433                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
7434                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
7435                "CREATING" => std::option::Option::Some(Self::CREATING),
7436                "UPDATING" => std::option::Option::Some(Self::UPDATING),
7437                "FAILED" => std::option::Option::Some(Self::FAILED),
7438                "DELETED" => std::option::Option::Some(Self::DELETED),
7439                "PURGING" => std::option::Option::Some(Self::PURGING),
7440                _ => std::option::Option::None,
7441            }
7442        }
7443    }
7444
7445    impl std::convert::From<i32> for State {
7446        fn from(value: i32) -> Self {
7447            Self::new(value)
7448        }
7449    }
7450
7451    impl std::default::Default for State {
7452        fn default() -> Self {
7453            Self::new(0)
7454        }
7455    }
7456
7457    /// Enum Type defines private cloud type.
7458    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7459    pub struct Type(i32);
7460
7461    impl Type {
7462        /// Standard private is a zonal resource, with 3+ nodes. Default type.
7463        pub const STANDARD: Type = Type::new(0);
7464
7465        /// Time limited private cloud is a zonal resource, can have only 1 node and
7466        /// has limited life span. Will be deleted after defined period of time,
7467        /// can be converted into standard private cloud by expanding it up to 3
7468        /// or more nodes.
7469        pub const TIME_LIMITED: Type = Type::new(1);
7470
7471        /// Stretched private cloud is a regional resource with redundancy,
7472        /// with a minimum of 6 nodes, nodes count has to be even.
7473        pub const STRETCHED: Type = Type::new(2);
7474
7475        /// Creates a new Type instance.
7476        pub(crate) const fn new(value: i32) -> Self {
7477            Self(value)
7478        }
7479
7480        /// Gets the enum value.
7481        pub fn value(&self) -> i32 {
7482            self.0
7483        }
7484
7485        /// Gets the enum value as a string.
7486        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
7487            match self.0 {
7488                0 => std::borrow::Cow::Borrowed("STANDARD"),
7489                1 => std::borrow::Cow::Borrowed("TIME_LIMITED"),
7490                2 => std::borrow::Cow::Borrowed("STRETCHED"),
7491                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
7492            }
7493        }
7494
7495        /// Creates an enum value from the value name.
7496        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
7497            match name {
7498                "STANDARD" => std::option::Option::Some(Self::STANDARD),
7499                "TIME_LIMITED" => std::option::Option::Some(Self::TIME_LIMITED),
7500                "STRETCHED" => std::option::Option::Some(Self::STRETCHED),
7501                _ => std::option::Option::None,
7502            }
7503        }
7504    }
7505
7506    impl std::convert::From<i32> for Type {
7507        fn from(value: i32) -> Self {
7508            Self::new(value)
7509        }
7510    }
7511
7512    impl std::default::Default for Type {
7513        fn default() -> Self {
7514            Self::new(0)
7515        }
7516    }
7517}
7518
7519/// A cluster in a private cloud.
7520#[serde_with::serde_as]
7521#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7522#[serde(default, rename_all = "camelCase")]
7523#[non_exhaustive]
7524pub struct Cluster {
7525    /// Output only. The resource name of this cluster.
7526    /// Resource names are schemeless URIs that follow the conventions in
7527    /// <https://cloud.google.com/apis/design/resource_names>.
7528    /// For example:
7529    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
7530    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7531    pub name: std::string::String,
7532
7533    /// Output only. Creation time of this resource.
7534    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7535    pub create_time: std::option::Option<wkt::Timestamp>,
7536
7537    /// Output only. Last update time of this resource.
7538    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7539    pub update_time: std::option::Option<wkt::Timestamp>,
7540
7541    /// Output only. State of the resource.
7542    pub state: crate::model::cluster::State,
7543
7544    /// Output only. True if the cluster is a management cluster; false otherwise.
7545    /// There can only be one management cluster in a private cloud
7546    /// and it has to be the first one.
7547    pub management: bool,
7548
7549    /// Optional. Configuration of the autoscaling applied to this cluster.
7550    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7551    pub autoscaling_settings: std::option::Option<crate::model::AutoscalingSettings>,
7552
7553    /// Output only. System-generated unique identifier for the resource.
7554    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7555    pub uid: std::string::String,
7556
7557    /// Required. The map of cluster node types in this cluster, where the key is
7558    /// canonical identifier of the node type (corresponds to the `NodeType`).
7559    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
7560    pub node_type_configs:
7561        std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
7562
7563    /// Optional. Configuration of a stretched cluster. Required for clusters that
7564    /// belong to a STRETCHED private cloud.
7565    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7566    pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
7567
7568    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7569    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7570}
7571
7572impl Cluster {
7573    pub fn new() -> Self {
7574        std::default::Default::default()
7575    }
7576
7577    /// Sets the value of [name][crate::model::Cluster::name].
7578    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7579        self.name = v.into();
7580        self
7581    }
7582
7583    /// Sets the value of [create_time][crate::model::Cluster::create_time].
7584    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7585        mut self,
7586        v: T,
7587    ) -> Self {
7588        self.create_time = v.into();
7589        self
7590    }
7591
7592    /// Sets the value of [update_time][crate::model::Cluster::update_time].
7593    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7594        mut self,
7595        v: T,
7596    ) -> Self {
7597        self.update_time = v.into();
7598        self
7599    }
7600
7601    /// Sets the value of [state][crate::model::Cluster::state].
7602    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
7603        self.state = v.into();
7604        self
7605    }
7606
7607    /// Sets the value of [management][crate::model::Cluster::management].
7608    pub fn set_management<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7609        self.management = v.into();
7610        self
7611    }
7612
7613    /// Sets the value of [autoscaling_settings][crate::model::Cluster::autoscaling_settings].
7614    pub fn set_autoscaling_settings<
7615        T: std::convert::Into<std::option::Option<crate::model::AutoscalingSettings>>,
7616    >(
7617        mut self,
7618        v: T,
7619    ) -> Self {
7620        self.autoscaling_settings = v.into();
7621        self
7622    }
7623
7624    /// Sets the value of [uid][crate::model::Cluster::uid].
7625    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7626        self.uid = v.into();
7627        self
7628    }
7629
7630    /// Sets the value of [stretched_cluster_config][crate::model::Cluster::stretched_cluster_config].
7631    pub fn set_stretched_cluster_config<
7632        T: std::convert::Into<std::option::Option<crate::model::StretchedClusterConfig>>,
7633    >(
7634        mut self,
7635        v: T,
7636    ) -> Self {
7637        self.stretched_cluster_config = v.into();
7638        self
7639    }
7640
7641    /// Sets the value of [node_type_configs][crate::model::Cluster::node_type_configs].
7642    pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
7643    where
7644        T: std::iter::IntoIterator<Item = (K, V)>,
7645        K: std::convert::Into<std::string::String>,
7646        V: std::convert::Into<crate::model::NodeTypeConfig>,
7647    {
7648        use std::iter::Iterator;
7649        self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7650        self
7651    }
7652}
7653
7654impl wkt::message::Message for Cluster {
7655    fn typename() -> &'static str {
7656        "type.googleapis.com/google.cloud.vmwareengine.v1.Cluster"
7657    }
7658}
7659
7660/// Defines additional types related to [Cluster].
7661pub mod cluster {
7662    #[allow(unused_imports)]
7663    use super::*;
7664
7665    /// Enum State defines possible states of private cloud clusters.
7666    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7667    pub struct State(i32);
7668
7669    impl State {
7670        /// The default value. This value should never be used.
7671        pub const STATE_UNSPECIFIED: State = State::new(0);
7672
7673        /// The Cluster is operational and can be used by the user.
7674        pub const ACTIVE: State = State::new(1);
7675
7676        /// The Cluster is being deployed.
7677        pub const CREATING: State = State::new(2);
7678
7679        /// Adding or removing of a node to the cluster, any other cluster specific
7680        /// updates.
7681        pub const UPDATING: State = State::new(3);
7682
7683        /// The Cluster is being deleted.
7684        pub const DELETING: State = State::new(4);
7685
7686        /// The Cluster is undergoing maintenance, for example: a failed node is
7687        /// getting replaced.
7688        pub const REPAIRING: State = State::new(5);
7689
7690        /// Creates a new State instance.
7691        pub(crate) const fn new(value: i32) -> Self {
7692            Self(value)
7693        }
7694
7695        /// Gets the enum value.
7696        pub fn value(&self) -> i32 {
7697            self.0
7698        }
7699
7700        /// Gets the enum value as a string.
7701        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
7702            match self.0 {
7703                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
7704                1 => std::borrow::Cow::Borrowed("ACTIVE"),
7705                2 => std::borrow::Cow::Borrowed("CREATING"),
7706                3 => std::borrow::Cow::Borrowed("UPDATING"),
7707                4 => std::borrow::Cow::Borrowed("DELETING"),
7708                5 => std::borrow::Cow::Borrowed("REPAIRING"),
7709                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
7710            }
7711        }
7712
7713        /// Creates an enum value from the value name.
7714        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
7715            match name {
7716                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
7717                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
7718                "CREATING" => std::option::Option::Some(Self::CREATING),
7719                "UPDATING" => std::option::Option::Some(Self::UPDATING),
7720                "DELETING" => std::option::Option::Some(Self::DELETING),
7721                "REPAIRING" => std::option::Option::Some(Self::REPAIRING),
7722                _ => std::option::Option::None,
7723            }
7724        }
7725    }
7726
7727    impl std::convert::From<i32> for State {
7728        fn from(value: i32) -> Self {
7729            Self::new(value)
7730        }
7731    }
7732
7733    impl std::default::Default for State {
7734        fn default() -> Self {
7735            Self::new(0)
7736        }
7737    }
7738}
7739
7740/// Node in a cluster.
7741#[serde_with::serde_as]
7742#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7743#[serde(default, rename_all = "camelCase")]
7744#[non_exhaustive]
7745pub struct Node {
7746    /// Output only. The resource name of this node.
7747    /// Resource names are schemeless URIs that follow the conventions in
7748    /// <https://cloud.google.com/apis/design/resource_names>.
7749    /// For example:
7750    /// projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node
7751    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7752    pub name: std::string::String,
7753
7754    /// Output only. Fully qualified domain name of the node.
7755    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7756    pub fqdn: std::string::String,
7757
7758    /// Output only. Internal IP address of the node.
7759    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7760    pub internal_ip: std::string::String,
7761
7762    /// Output only. The canonical identifier of the node type (corresponds to the
7763    /// `NodeType`).
7764    /// For example: standard-72.
7765    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7766    pub node_type_id: std::string::String,
7767
7768    /// Output only. The version number of the VMware ESXi
7769    /// management component in this cluster.
7770    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7771    pub version: std::string::String,
7772
7773    /// Output only. Customized number of cores
7774    #[serde_as(as = "serde_with::DisplayFromStr")]
7775    pub custom_core_count: i64,
7776
7777    /// Output only. The state of the appliance.
7778    pub state: crate::model::node::State,
7779
7780    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7781    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7782}
7783
7784impl Node {
7785    pub fn new() -> Self {
7786        std::default::Default::default()
7787    }
7788
7789    /// Sets the value of [name][crate::model::Node::name].
7790    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7791        self.name = v.into();
7792        self
7793    }
7794
7795    /// Sets the value of [fqdn][crate::model::Node::fqdn].
7796    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7797        self.fqdn = v.into();
7798        self
7799    }
7800
7801    /// Sets the value of [internal_ip][crate::model::Node::internal_ip].
7802    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7803        self.internal_ip = v.into();
7804        self
7805    }
7806
7807    /// Sets the value of [node_type_id][crate::model::Node::node_type_id].
7808    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7809        self.node_type_id = v.into();
7810        self
7811    }
7812
7813    /// Sets the value of [version][crate::model::Node::version].
7814    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7815        self.version = v.into();
7816        self
7817    }
7818
7819    /// Sets the value of [custom_core_count][crate::model::Node::custom_core_count].
7820    pub fn set_custom_core_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7821        self.custom_core_count = v.into();
7822        self
7823    }
7824
7825    /// Sets the value of [state][crate::model::Node::state].
7826    pub fn set_state<T: std::convert::Into<crate::model::node::State>>(mut self, v: T) -> Self {
7827        self.state = v.into();
7828        self
7829    }
7830}
7831
7832impl wkt::message::Message for Node {
7833    fn typename() -> &'static str {
7834        "type.googleapis.com/google.cloud.vmwareengine.v1.Node"
7835    }
7836}
7837
7838/// Defines additional types related to [Node].
7839pub mod node {
7840    #[allow(unused_imports)]
7841    use super::*;
7842
7843    /// Enum State defines possible states of a node in a cluster.
7844    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
7845    pub struct State(i32);
7846
7847    impl State {
7848        /// The default value. This value should never be used.
7849        pub const STATE_UNSPECIFIED: State = State::new(0);
7850
7851        /// Node is operational and can be used by the user.
7852        pub const ACTIVE: State = State::new(1);
7853
7854        /// Node is being provisioned.
7855        pub const CREATING: State = State::new(2);
7856
7857        /// Node is in a failed state.
7858        pub const FAILED: State = State::new(3);
7859
7860        /// Node is undergoing maintenance, e.g.: during private cloud upgrade.
7861        pub const UPGRADING: State = State::new(4);
7862
7863        /// Creates a new State instance.
7864        pub(crate) const fn new(value: i32) -> Self {
7865            Self(value)
7866        }
7867
7868        /// Gets the enum value.
7869        pub fn value(&self) -> i32 {
7870            self.0
7871        }
7872
7873        /// Gets the enum value as a string.
7874        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
7875            match self.0 {
7876                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
7877                1 => std::borrow::Cow::Borrowed("ACTIVE"),
7878                2 => std::borrow::Cow::Borrowed("CREATING"),
7879                3 => std::borrow::Cow::Borrowed("FAILED"),
7880                4 => std::borrow::Cow::Borrowed("UPGRADING"),
7881                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
7882            }
7883        }
7884
7885        /// Creates an enum value from the value name.
7886        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
7887            match name {
7888                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
7889                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
7890                "CREATING" => std::option::Option::Some(Self::CREATING),
7891                "FAILED" => std::option::Option::Some(Self::FAILED),
7892                "UPGRADING" => std::option::Option::Some(Self::UPGRADING),
7893                _ => std::option::Option::None,
7894            }
7895        }
7896    }
7897
7898    impl std::convert::From<i32> for State {
7899        fn from(value: i32) -> Self {
7900            Self::new(value)
7901        }
7902    }
7903
7904    impl std::default::Default for State {
7905        fn default() -> Self {
7906            Self::new(0)
7907        }
7908    }
7909}
7910
7911/// Represents an allocated external IP address and its corresponding internal IP
7912/// address in a private cloud.
7913#[serde_with::serde_as]
7914#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
7915#[serde(default, rename_all = "camelCase")]
7916#[non_exhaustive]
7917pub struct ExternalAddress {
7918    /// Output only. The resource name of this external IP address.
7919    /// Resource names are schemeless URIs that follow the conventions in
7920    /// <https://cloud.google.com/apis/design/resource_names>.
7921    /// For example:
7922    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`
7923    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7924    pub name: std::string::String,
7925
7926    /// Output only. Creation time of this resource.
7927    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7928    pub create_time: std::option::Option<wkt::Timestamp>,
7929
7930    /// Output only. Last update time of this resource.
7931    #[serde(skip_serializing_if = "std::option::Option::is_none")]
7932    pub update_time: std::option::Option<wkt::Timestamp>,
7933
7934    /// The internal IP address of a workload VM.
7935    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7936    pub internal_ip: std::string::String,
7937
7938    /// Output only. The external IP address of a workload VM.
7939    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7940    pub external_ip: std::string::String,
7941
7942    /// Output only. The state of the resource.
7943    pub state: crate::model::external_address::State,
7944
7945    /// Output only. System-generated unique identifier for the resource.
7946    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7947    pub uid: std::string::String,
7948
7949    /// User-provided description for this resource.
7950    #[serde(skip_serializing_if = "std::string::String::is_empty")]
7951    pub description: std::string::String,
7952
7953    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
7954    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7955}
7956
7957impl ExternalAddress {
7958    pub fn new() -> Self {
7959        std::default::Default::default()
7960    }
7961
7962    /// Sets the value of [name][crate::model::ExternalAddress::name].
7963    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7964        self.name = v.into();
7965        self
7966    }
7967
7968    /// Sets the value of [create_time][crate::model::ExternalAddress::create_time].
7969    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7970        mut self,
7971        v: T,
7972    ) -> Self {
7973        self.create_time = v.into();
7974        self
7975    }
7976
7977    /// Sets the value of [update_time][crate::model::ExternalAddress::update_time].
7978    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
7979        mut self,
7980        v: T,
7981    ) -> Self {
7982        self.update_time = v.into();
7983        self
7984    }
7985
7986    /// Sets the value of [internal_ip][crate::model::ExternalAddress::internal_ip].
7987    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7988        self.internal_ip = v.into();
7989        self
7990    }
7991
7992    /// Sets the value of [external_ip][crate::model::ExternalAddress::external_ip].
7993    pub fn set_external_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7994        self.external_ip = v.into();
7995        self
7996    }
7997
7998    /// Sets the value of [state][crate::model::ExternalAddress::state].
7999    pub fn set_state<T: std::convert::Into<crate::model::external_address::State>>(
8000        mut self,
8001        v: T,
8002    ) -> Self {
8003        self.state = v.into();
8004        self
8005    }
8006
8007    /// Sets the value of [uid][crate::model::ExternalAddress::uid].
8008    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8009        self.uid = v.into();
8010        self
8011    }
8012
8013    /// Sets the value of [description][crate::model::ExternalAddress::description].
8014    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8015        self.description = v.into();
8016        self
8017    }
8018}
8019
8020impl wkt::message::Message for ExternalAddress {
8021    fn typename() -> &'static str {
8022        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAddress"
8023    }
8024}
8025
8026/// Defines additional types related to [ExternalAddress].
8027pub mod external_address {
8028    #[allow(unused_imports)]
8029    use super::*;
8030
8031    /// Enum State defines possible states of external addresses.
8032    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8033    pub struct State(i32);
8034
8035    impl State {
8036        /// The default value. This value should never be used.
8037        pub const STATE_UNSPECIFIED: State = State::new(0);
8038
8039        /// The address is ready.
8040        pub const ACTIVE: State = State::new(1);
8041
8042        /// The address is being created.
8043        pub const CREATING: State = State::new(2);
8044
8045        /// The address is being updated.
8046        pub const UPDATING: State = State::new(3);
8047
8048        /// The address is being deleted.
8049        pub const DELETING: State = State::new(4);
8050
8051        /// Creates a new State instance.
8052        pub(crate) const fn new(value: i32) -> Self {
8053            Self(value)
8054        }
8055
8056        /// Gets the enum value.
8057        pub fn value(&self) -> i32 {
8058            self.0
8059        }
8060
8061        /// Gets the enum value as a string.
8062        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8063            match self.0 {
8064                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
8065                1 => std::borrow::Cow::Borrowed("ACTIVE"),
8066                2 => std::borrow::Cow::Borrowed("CREATING"),
8067                3 => std::borrow::Cow::Borrowed("UPDATING"),
8068                4 => std::borrow::Cow::Borrowed("DELETING"),
8069                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8070            }
8071        }
8072
8073        /// Creates an enum value from the value name.
8074        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8075            match name {
8076                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
8077                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
8078                "CREATING" => std::option::Option::Some(Self::CREATING),
8079                "UPDATING" => std::option::Option::Some(Self::UPDATING),
8080                "DELETING" => std::option::Option::Some(Self::DELETING),
8081                _ => std::option::Option::None,
8082            }
8083        }
8084    }
8085
8086    impl std::convert::From<i32> for State {
8087        fn from(value: i32) -> Self {
8088            Self::new(value)
8089        }
8090    }
8091
8092    impl std::default::Default for State {
8093        fn default() -> Self {
8094            Self::new(0)
8095        }
8096    }
8097}
8098
8099/// Subnet in a private cloud. Either `management` subnets (such as vMotion) that
8100/// are read-only, or `userDefined`, which can also be updated.
8101#[serde_with::serde_as]
8102#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8103#[serde(default, rename_all = "camelCase")]
8104#[non_exhaustive]
8105pub struct Subnet {
8106    /// Output only. The resource name of this subnet.
8107    /// Resource names are schemeless URIs that follow the conventions in
8108    /// <https://cloud.google.com/apis/design/resource_names>.
8109    /// For example:
8110    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
8111    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8112    pub name: std::string::String,
8113
8114    /// The IP address range of the subnet in CIDR format '10.0.0.0/24'.
8115    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8116    pub ip_cidr_range: std::string::String,
8117
8118    /// The IP address of the gateway of this subnet.
8119    /// Must fall within the IP prefix defined above.
8120    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8121    pub gateway_ip: std::string::String,
8122
8123    /// Output only. The type of the subnet. For example "management" or
8124    /// "userDefined".
8125    #[serde(rename = "type")]
8126    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8127    pub r#type: std::string::String,
8128
8129    /// Output only. The state of the resource.
8130    pub state: crate::model::subnet::State,
8131
8132    /// Output only. VLAN ID of the VLAN on which the subnet is configured
8133    pub vlan_id: i32,
8134
8135    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8136    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8137}
8138
8139impl Subnet {
8140    pub fn new() -> Self {
8141        std::default::Default::default()
8142    }
8143
8144    /// Sets the value of [name][crate::model::Subnet::name].
8145    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8146        self.name = v.into();
8147        self
8148    }
8149
8150    /// Sets the value of [ip_cidr_range][crate::model::Subnet::ip_cidr_range].
8151    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8152        self.ip_cidr_range = v.into();
8153        self
8154    }
8155
8156    /// Sets the value of [gateway_ip][crate::model::Subnet::gateway_ip].
8157    pub fn set_gateway_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8158        self.gateway_ip = v.into();
8159        self
8160    }
8161
8162    /// Sets the value of [r#type][crate::model::Subnet::type].
8163    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8164        self.r#type = v.into();
8165        self
8166    }
8167
8168    /// Sets the value of [state][crate::model::Subnet::state].
8169    pub fn set_state<T: std::convert::Into<crate::model::subnet::State>>(mut self, v: T) -> Self {
8170        self.state = v.into();
8171        self
8172    }
8173
8174    /// Sets the value of [vlan_id][crate::model::Subnet::vlan_id].
8175    pub fn set_vlan_id<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8176        self.vlan_id = v.into();
8177        self
8178    }
8179}
8180
8181impl wkt::message::Message for Subnet {
8182    fn typename() -> &'static str {
8183        "type.googleapis.com/google.cloud.vmwareengine.v1.Subnet"
8184    }
8185}
8186
8187/// Defines additional types related to [Subnet].
8188pub mod subnet {
8189    #[allow(unused_imports)]
8190    use super::*;
8191
8192    /// Defines possible states of subnets.
8193    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8194    pub struct State(i32);
8195
8196    impl State {
8197        /// The default value. This value should never be used.
8198        pub const STATE_UNSPECIFIED: State = State::new(0);
8199
8200        /// The subnet is ready.
8201        pub const ACTIVE: State = State::new(1);
8202
8203        /// The subnet is being created.
8204        pub const CREATING: State = State::new(2);
8205
8206        /// The subnet is being updated.
8207        pub const UPDATING: State = State::new(3);
8208
8209        /// The subnet is being deleted.
8210        pub const DELETING: State = State::new(4);
8211
8212        /// Changes requested in the last operation are being propagated.
8213        pub const RECONCILING: State = State::new(5);
8214
8215        /// Last operation on the subnet did not succeed. Subnet's payload is
8216        /// reverted back to its most recent working state.
8217        pub const FAILED: State = State::new(6);
8218
8219        /// Creates a new State instance.
8220        pub(crate) const fn new(value: i32) -> Self {
8221            Self(value)
8222        }
8223
8224        /// Gets the enum value.
8225        pub fn value(&self) -> i32 {
8226            self.0
8227        }
8228
8229        /// Gets the enum value as a string.
8230        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8231            match self.0 {
8232                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
8233                1 => std::borrow::Cow::Borrowed("ACTIVE"),
8234                2 => std::borrow::Cow::Borrowed("CREATING"),
8235                3 => std::borrow::Cow::Borrowed("UPDATING"),
8236                4 => std::borrow::Cow::Borrowed("DELETING"),
8237                5 => std::borrow::Cow::Borrowed("RECONCILING"),
8238                6 => std::borrow::Cow::Borrowed("FAILED"),
8239                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8240            }
8241        }
8242
8243        /// Creates an enum value from the value name.
8244        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8245            match name {
8246                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
8247                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
8248                "CREATING" => std::option::Option::Some(Self::CREATING),
8249                "UPDATING" => std::option::Option::Some(Self::UPDATING),
8250                "DELETING" => std::option::Option::Some(Self::DELETING),
8251                "RECONCILING" => std::option::Option::Some(Self::RECONCILING),
8252                "FAILED" => std::option::Option::Some(Self::FAILED),
8253                _ => std::option::Option::None,
8254            }
8255        }
8256    }
8257
8258    impl std::convert::From<i32> for State {
8259        fn from(value: i32) -> Self {
8260            Self::new(value)
8261        }
8262    }
8263
8264    impl std::default::Default for State {
8265        fn default() -> Self {
8266            Self::new(0)
8267        }
8268    }
8269}
8270
8271/// External access firewall rules for filtering incoming traffic destined to
8272/// `ExternalAddress` resources.
8273#[serde_with::serde_as]
8274#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8275#[serde(default, rename_all = "camelCase")]
8276#[non_exhaustive]
8277pub struct ExternalAccessRule {
8278    /// Output only. The resource name of this external access rule.
8279    /// Resource names are schemeless URIs that follow the conventions in
8280    /// <https://cloud.google.com/apis/design/resource_names>.
8281    /// For example:
8282    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
8283    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8284    pub name: std::string::String,
8285
8286    /// Output only. Creation time of this resource.
8287    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8288    pub create_time: std::option::Option<wkt::Timestamp>,
8289
8290    /// Output only. Last update time of this resource.
8291    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8292    pub update_time: std::option::Option<wkt::Timestamp>,
8293
8294    /// User-provided description for this external access rule.
8295    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8296    pub description: std::string::String,
8297
8298    /// External access rule priority, which determines the external access rule to
8299    /// use when multiple rules apply. If multiple rules have the same priority,
8300    /// their ordering is non-deterministic. If specific ordering is required,
8301    /// assign unique priorities to enforce such ordering. The external access rule
8302    /// priority is an integer from 100 to 4096, both inclusive. Lower integers
8303    /// indicate higher precedence. For example, a rule with priority `100` has
8304    /// higher precedence than a rule with priority `101`.
8305    pub priority: i32,
8306
8307    /// The action that the external access rule performs.
8308    pub action: crate::model::external_access_rule::Action,
8309
8310    /// The IP protocol to which the external access rule applies. This value can
8311    /// be one of the following three protocol strings (not case-sensitive):
8312    /// `tcp`, `udp`, or `icmp`.
8313    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8314    pub ip_protocol: std::string::String,
8315
8316    /// If source ranges are specified, the external access rule applies only to
8317    /// traffic that has a source IP address in these ranges. These ranges can
8318    /// either be expressed in the CIDR format or as an IP address. As only inbound
8319    /// rules are supported, `ExternalAddress` resources cannot be the source IP
8320    /// addresses of an external access rule. To match all source addresses,
8321    /// specify `0.0.0.0/0`.
8322    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8323    pub source_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
8324
8325    /// A list of source ports to which the external access rule applies. This
8326    /// field is only applicable for the UDP or TCP protocol.
8327    /// Each entry must be either an integer or a range. For example: `["22"]`,
8328    /// `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify
8329    /// `["0-65535"]`.
8330    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8331    pub source_ports: std::vec::Vec<std::string::String>,
8332
8333    /// If destination ranges are specified, the external access rule applies only
8334    /// to the traffic that has a destination IP address in these ranges. The
8335    /// specified IP addresses must have reserved external IP addresses in the
8336    /// scope of the parent network policy. To match all external IP addresses in
8337    /// the scope of the parent network policy, specify `0.0.0.0/0`. To match a
8338    /// specific external IP address, specify it using the
8339    /// `IpRange.external_address` property.
8340    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8341    pub destination_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
8342
8343    /// A list of destination ports to which the external access rule applies. This
8344    /// field is only applicable for the UDP or TCP protocol.
8345    /// Each entry must be either an integer or a range. For example: `["22"]`,
8346    /// `["80","443"]`, or `["12345-12349"]`. To match all destination ports,
8347    /// specify `["0-65535"]`.
8348    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
8349    pub destination_ports: std::vec::Vec<std::string::String>,
8350
8351    /// Output only. The state of the resource.
8352    pub state: crate::model::external_access_rule::State,
8353
8354    /// Output only. System-generated unique identifier for the resource.
8355    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8356    pub uid: std::string::String,
8357
8358    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8359    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8360}
8361
8362impl ExternalAccessRule {
8363    pub fn new() -> Self {
8364        std::default::Default::default()
8365    }
8366
8367    /// Sets the value of [name][crate::model::ExternalAccessRule::name].
8368    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8369        self.name = v.into();
8370        self
8371    }
8372
8373    /// Sets the value of [create_time][crate::model::ExternalAccessRule::create_time].
8374    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8375        mut self,
8376        v: T,
8377    ) -> Self {
8378        self.create_time = v.into();
8379        self
8380    }
8381
8382    /// Sets the value of [update_time][crate::model::ExternalAccessRule::update_time].
8383    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8384        mut self,
8385        v: T,
8386    ) -> Self {
8387        self.update_time = v.into();
8388        self
8389    }
8390
8391    /// Sets the value of [description][crate::model::ExternalAccessRule::description].
8392    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8393        self.description = v.into();
8394        self
8395    }
8396
8397    /// Sets the value of [priority][crate::model::ExternalAccessRule::priority].
8398    pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8399        self.priority = v.into();
8400        self
8401    }
8402
8403    /// Sets the value of [action][crate::model::ExternalAccessRule::action].
8404    pub fn set_action<T: std::convert::Into<crate::model::external_access_rule::Action>>(
8405        mut self,
8406        v: T,
8407    ) -> Self {
8408        self.action = v.into();
8409        self
8410    }
8411
8412    /// Sets the value of [ip_protocol][crate::model::ExternalAccessRule::ip_protocol].
8413    pub fn set_ip_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8414        self.ip_protocol = v.into();
8415        self
8416    }
8417
8418    /// Sets the value of [state][crate::model::ExternalAccessRule::state].
8419    pub fn set_state<T: std::convert::Into<crate::model::external_access_rule::State>>(
8420        mut self,
8421        v: T,
8422    ) -> Self {
8423        self.state = v.into();
8424        self
8425    }
8426
8427    /// Sets the value of [uid][crate::model::ExternalAccessRule::uid].
8428    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8429        self.uid = v.into();
8430        self
8431    }
8432
8433    /// Sets the value of [source_ip_ranges][crate::model::ExternalAccessRule::source_ip_ranges].
8434    pub fn set_source_ip_ranges<T, V>(mut self, v: T) -> Self
8435    where
8436        T: std::iter::IntoIterator<Item = V>,
8437        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
8438    {
8439        use std::iter::Iterator;
8440        self.source_ip_ranges = v.into_iter().map(|i| i.into()).collect();
8441        self
8442    }
8443
8444    /// Sets the value of [source_ports][crate::model::ExternalAccessRule::source_ports].
8445    pub fn set_source_ports<T, V>(mut self, v: T) -> Self
8446    where
8447        T: std::iter::IntoIterator<Item = V>,
8448        V: std::convert::Into<std::string::String>,
8449    {
8450        use std::iter::Iterator;
8451        self.source_ports = v.into_iter().map(|i| i.into()).collect();
8452        self
8453    }
8454
8455    /// Sets the value of [destination_ip_ranges][crate::model::ExternalAccessRule::destination_ip_ranges].
8456    pub fn set_destination_ip_ranges<T, V>(mut self, v: T) -> Self
8457    where
8458        T: std::iter::IntoIterator<Item = V>,
8459        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
8460    {
8461        use std::iter::Iterator;
8462        self.destination_ip_ranges = v.into_iter().map(|i| i.into()).collect();
8463        self
8464    }
8465
8466    /// Sets the value of [destination_ports][crate::model::ExternalAccessRule::destination_ports].
8467    pub fn set_destination_ports<T, V>(mut self, v: T) -> Self
8468    where
8469        T: std::iter::IntoIterator<Item = V>,
8470        V: std::convert::Into<std::string::String>,
8471    {
8472        use std::iter::Iterator;
8473        self.destination_ports = v.into_iter().map(|i| i.into()).collect();
8474        self
8475    }
8476}
8477
8478impl wkt::message::Message for ExternalAccessRule {
8479    fn typename() -> &'static str {
8480        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule"
8481    }
8482}
8483
8484/// Defines additional types related to [ExternalAccessRule].
8485pub mod external_access_rule {
8486    #[allow(unused_imports)]
8487    use super::*;
8488
8489    /// An IP range provided in any one of the supported formats.
8490    #[serde_with::serde_as]
8491    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8492    #[serde(default, rename_all = "camelCase")]
8493    #[non_exhaustive]
8494    pub struct IpRange {
8495        #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
8496        pub ip_range: std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
8497
8498        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8499        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8500    }
8501
8502    impl IpRange {
8503        pub fn new() -> Self {
8504            std::default::Default::default()
8505        }
8506
8507        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range].
8508        ///
8509        /// Note that all the setters affecting `ip_range` are mutually
8510        /// exclusive.
8511        pub fn set_ip_range<
8512            T: std::convert::Into<
8513                    std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
8514                >,
8515        >(
8516            mut self,
8517            v: T,
8518        ) -> Self {
8519            self.ip_range = v.into();
8520            self
8521        }
8522
8523        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8524        /// if it holds a `IpAddress`, `None` if the field is not set or
8525        /// holds a different branch.
8526        pub fn ip_address(&self) -> std::option::Option<&std::string::String> {
8527            #[allow(unreachable_patterns)]
8528            self.ip_range.as_ref().and_then(|v| match v {
8529                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v) => {
8530                    std::option::Option::Some(v)
8531                }
8532                _ => std::option::Option::None,
8533            })
8534        }
8535
8536        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8537        /// if it holds a `IpAddressRange`, `None` if the field is not set or
8538        /// holds a different branch.
8539        pub fn ip_address_range(&self) -> std::option::Option<&std::string::String> {
8540            #[allow(unreachable_patterns)]
8541            self.ip_range.as_ref().and_then(|v| match v {
8542                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v) => {
8543                    std::option::Option::Some(v)
8544                }
8545                _ => std::option::Option::None,
8546            })
8547        }
8548
8549        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8550        /// if it holds a `ExternalAddress`, `None` if the field is not set or
8551        /// holds a different branch.
8552        pub fn external_address(&self) -> std::option::Option<&std::string::String> {
8553            #[allow(unreachable_patterns)]
8554            self.ip_range.as_ref().and_then(|v| match v {
8555                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v) => {
8556                    std::option::Option::Some(v)
8557                }
8558                _ => std::option::Option::None,
8559            })
8560        }
8561
8562        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8563        /// to hold a `IpAddress`.
8564        ///
8565        /// Note that all the setters affecting `ip_range` are
8566        /// mutually exclusive.
8567        pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8568            self.ip_range = std::option::Option::Some(
8569                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v.into()),
8570            );
8571            self
8572        }
8573
8574        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8575        /// to hold a `IpAddressRange`.
8576        ///
8577        /// Note that all the setters affecting `ip_range` are
8578        /// mutually exclusive.
8579        pub fn set_ip_address_range<T: std::convert::Into<std::string::String>>(
8580            mut self,
8581            v: T,
8582        ) -> Self {
8583            self.ip_range = std::option::Option::Some(
8584                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v.into()),
8585            );
8586            self
8587        }
8588
8589        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8590        /// to hold a `ExternalAddress`.
8591        ///
8592        /// Note that all the setters affecting `ip_range` are
8593        /// mutually exclusive.
8594        pub fn set_external_address<T: std::convert::Into<std::string::String>>(
8595            mut self,
8596            v: T,
8597        ) -> Self {
8598            self.ip_range = std::option::Option::Some(
8599                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v.into()),
8600            );
8601            self
8602        }
8603    }
8604
8605    impl wkt::message::Message for IpRange {
8606        fn typename() -> &'static str {
8607            "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange"
8608        }
8609    }
8610
8611    /// Defines additional types related to [IpRange].
8612    pub mod ip_range {
8613        #[allow(unused_imports)]
8614        use super::*;
8615
8616        #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8617        #[serde(rename_all = "camelCase")]
8618        #[non_exhaustive]
8619        pub enum IpRange {
8620            /// A single IP address. For example: `10.0.0.5`.
8621            IpAddress(std::string::String),
8622            /// An IP address range in the CIDR format. For example: `10.0.0.0/24`.
8623            IpAddressRange(std::string::String),
8624            /// The name of an `ExternalAddress` resource. The external address must
8625            /// have been reserved in the scope of this external access rule's parent
8626            /// network policy.  Provide the external address name in the form of
8627            /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`.
8628            /// For example:
8629            /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`.
8630            ExternalAddress(std::string::String),
8631        }
8632    }
8633
8634    /// Action determines whether the external access rule permits or blocks
8635    /// traffic, subject to the other components of the rule matching the traffic.
8636    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8637    pub struct Action(i32);
8638
8639    impl Action {
8640        /// Defaults to allow.
8641        pub const ACTION_UNSPECIFIED: Action = Action::new(0);
8642
8643        /// Allows connections that match the other specified components.
8644        pub const ALLOW: Action = Action::new(1);
8645
8646        /// Blocks connections that match the other specified components.
8647        pub const DENY: Action = Action::new(2);
8648
8649        /// Creates a new Action instance.
8650        pub(crate) const fn new(value: i32) -> Self {
8651            Self(value)
8652        }
8653
8654        /// Gets the enum value.
8655        pub fn value(&self) -> i32 {
8656            self.0
8657        }
8658
8659        /// Gets the enum value as a string.
8660        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8661            match self.0 {
8662                0 => std::borrow::Cow::Borrowed("ACTION_UNSPECIFIED"),
8663                1 => std::borrow::Cow::Borrowed("ALLOW"),
8664                2 => std::borrow::Cow::Borrowed("DENY"),
8665                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8666            }
8667        }
8668
8669        /// Creates an enum value from the value name.
8670        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8671            match name {
8672                "ACTION_UNSPECIFIED" => std::option::Option::Some(Self::ACTION_UNSPECIFIED),
8673                "ALLOW" => std::option::Option::Some(Self::ALLOW),
8674                "DENY" => std::option::Option::Some(Self::DENY),
8675                _ => std::option::Option::None,
8676            }
8677        }
8678    }
8679
8680    impl std::convert::From<i32> for Action {
8681        fn from(value: i32) -> Self {
8682            Self::new(value)
8683        }
8684    }
8685
8686    impl std::default::Default for Action {
8687        fn default() -> Self {
8688            Self::new(0)
8689        }
8690    }
8691
8692    /// Defines possible states of external access firewall rules.
8693    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8694    pub struct State(i32);
8695
8696    impl State {
8697        /// The default value. This value is used if the state is omitted.
8698        pub const STATE_UNSPECIFIED: State = State::new(0);
8699
8700        /// The rule is ready.
8701        pub const ACTIVE: State = State::new(1);
8702
8703        /// The rule is being created.
8704        pub const CREATING: State = State::new(2);
8705
8706        /// The rule is being updated.
8707        pub const UPDATING: State = State::new(3);
8708
8709        /// The rule is being deleted.
8710        pub const DELETING: State = State::new(4);
8711
8712        /// Creates a new State instance.
8713        pub(crate) const fn new(value: i32) -> Self {
8714            Self(value)
8715        }
8716
8717        /// Gets the enum value.
8718        pub fn value(&self) -> i32 {
8719            self.0
8720        }
8721
8722        /// Gets the enum value as a string.
8723        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8724            match self.0 {
8725                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
8726                1 => std::borrow::Cow::Borrowed("ACTIVE"),
8727                2 => std::borrow::Cow::Borrowed("CREATING"),
8728                3 => std::borrow::Cow::Borrowed("UPDATING"),
8729                4 => std::borrow::Cow::Borrowed("DELETING"),
8730                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8731            }
8732        }
8733
8734        /// Creates an enum value from the value name.
8735        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8736            match name {
8737                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
8738                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
8739                "CREATING" => std::option::Option::Some(Self::CREATING),
8740                "UPDATING" => std::option::Option::Some(Self::UPDATING),
8741                "DELETING" => std::option::Option::Some(Self::DELETING),
8742                _ => std::option::Option::None,
8743            }
8744        }
8745    }
8746
8747    impl std::convert::From<i32> for State {
8748        fn from(value: i32) -> Self {
8749            Self::new(value)
8750        }
8751    }
8752
8753    impl std::default::Default for State {
8754        fn default() -> Self {
8755            Self::new(0)
8756        }
8757    }
8758}
8759
8760/// Logging server to receive vCenter or ESXi logs.
8761#[serde_with::serde_as]
8762#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
8763#[serde(default, rename_all = "camelCase")]
8764#[non_exhaustive]
8765pub struct LoggingServer {
8766    /// Output only. The resource name of this logging server.
8767    /// Resource names are schemeless URIs that follow the conventions in
8768    /// <https://cloud.google.com/apis/design/resource_names>.
8769    /// For example:
8770    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
8771    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8772    pub name: std::string::String,
8773
8774    /// Output only. Creation time of this resource.
8775    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8776    pub create_time: std::option::Option<wkt::Timestamp>,
8777
8778    /// Output only. Last update time of this resource.
8779    #[serde(skip_serializing_if = "std::option::Option::is_none")]
8780    pub update_time: std::option::Option<wkt::Timestamp>,
8781
8782    /// Required. Fully-qualified domain name (FQDN) or IP Address of the logging
8783    /// server.
8784    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8785    pub hostname: std::string::String,
8786
8787    /// Required. Port number at which the logging server receives logs.
8788    pub port: i32,
8789
8790    /// Required. Protocol used by vCenter to send logs to a logging server.
8791    pub protocol: crate::model::logging_server::Protocol,
8792
8793    /// Required. The type of component that produces logs that will be forwarded
8794    /// to this logging server.
8795    pub source_type: crate::model::logging_server::SourceType,
8796
8797    /// Output only. System-generated unique identifier for the resource.
8798    #[serde(skip_serializing_if = "std::string::String::is_empty")]
8799    pub uid: std::string::String,
8800
8801    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
8802    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8803}
8804
8805impl LoggingServer {
8806    pub fn new() -> Self {
8807        std::default::Default::default()
8808    }
8809
8810    /// Sets the value of [name][crate::model::LoggingServer::name].
8811    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8812        self.name = v.into();
8813        self
8814    }
8815
8816    /// Sets the value of [create_time][crate::model::LoggingServer::create_time].
8817    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8818        mut self,
8819        v: T,
8820    ) -> Self {
8821        self.create_time = v.into();
8822        self
8823    }
8824
8825    /// Sets the value of [update_time][crate::model::LoggingServer::update_time].
8826    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
8827        mut self,
8828        v: T,
8829    ) -> Self {
8830        self.update_time = v.into();
8831        self
8832    }
8833
8834    /// Sets the value of [hostname][crate::model::LoggingServer::hostname].
8835    pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8836        self.hostname = v.into();
8837        self
8838    }
8839
8840    /// Sets the value of [port][crate::model::LoggingServer::port].
8841    pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8842        self.port = v.into();
8843        self
8844    }
8845
8846    /// Sets the value of [protocol][crate::model::LoggingServer::protocol].
8847    pub fn set_protocol<T: std::convert::Into<crate::model::logging_server::Protocol>>(
8848        mut self,
8849        v: T,
8850    ) -> Self {
8851        self.protocol = v.into();
8852        self
8853    }
8854
8855    /// Sets the value of [source_type][crate::model::LoggingServer::source_type].
8856    pub fn set_source_type<T: std::convert::Into<crate::model::logging_server::SourceType>>(
8857        mut self,
8858        v: T,
8859    ) -> Self {
8860        self.source_type = v.into();
8861        self
8862    }
8863
8864    /// Sets the value of [uid][crate::model::LoggingServer::uid].
8865    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8866        self.uid = v.into();
8867        self
8868    }
8869}
8870
8871impl wkt::message::Message for LoggingServer {
8872    fn typename() -> &'static str {
8873        "type.googleapis.com/google.cloud.vmwareengine.v1.LoggingServer"
8874    }
8875}
8876
8877/// Defines additional types related to [LoggingServer].
8878pub mod logging_server {
8879    #[allow(unused_imports)]
8880    use super::*;
8881
8882    /// Defines possible protocols used to send logs to
8883    /// a logging server.
8884    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8885    pub struct Protocol(i32);
8886
8887    impl Protocol {
8888        /// Unspecified communications protocol. This is the default value.
8889        pub const PROTOCOL_UNSPECIFIED: Protocol = Protocol::new(0);
8890
8891        /// UDP
8892        pub const UDP: Protocol = Protocol::new(1);
8893
8894        /// TCP
8895        pub const TCP: Protocol = Protocol::new(2);
8896
8897        /// TLS
8898        pub const TLS: Protocol = Protocol::new(3);
8899
8900        /// SSL
8901        pub const SSL: Protocol = Protocol::new(4);
8902
8903        /// RELP
8904        pub const RELP: Protocol = Protocol::new(5);
8905
8906        /// Creates a new Protocol instance.
8907        pub(crate) const fn new(value: i32) -> Self {
8908            Self(value)
8909        }
8910
8911        /// Gets the enum value.
8912        pub fn value(&self) -> i32 {
8913            self.0
8914        }
8915
8916        /// Gets the enum value as a string.
8917        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8918            match self.0 {
8919                0 => std::borrow::Cow::Borrowed("PROTOCOL_UNSPECIFIED"),
8920                1 => std::borrow::Cow::Borrowed("UDP"),
8921                2 => std::borrow::Cow::Borrowed("TCP"),
8922                3 => std::borrow::Cow::Borrowed("TLS"),
8923                4 => std::borrow::Cow::Borrowed("SSL"),
8924                5 => std::borrow::Cow::Borrowed("RELP"),
8925                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8926            }
8927        }
8928
8929        /// Creates an enum value from the value name.
8930        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8931            match name {
8932                "PROTOCOL_UNSPECIFIED" => std::option::Option::Some(Self::PROTOCOL_UNSPECIFIED),
8933                "UDP" => std::option::Option::Some(Self::UDP),
8934                "TCP" => std::option::Option::Some(Self::TCP),
8935                "TLS" => std::option::Option::Some(Self::TLS),
8936                "SSL" => std::option::Option::Some(Self::SSL),
8937                "RELP" => std::option::Option::Some(Self::RELP),
8938                _ => std::option::Option::None,
8939            }
8940        }
8941    }
8942
8943    impl std::convert::From<i32> for Protocol {
8944        fn from(value: i32) -> Self {
8945            Self::new(value)
8946        }
8947    }
8948
8949    impl std::default::Default for Protocol {
8950        fn default() -> Self {
8951            Self::new(0)
8952        }
8953    }
8954
8955    /// Defines possible types of component that produces logs.
8956    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
8957    pub struct SourceType(i32);
8958
8959    impl SourceType {
8960        /// The default value. This value should never be used.
8961        pub const SOURCE_TYPE_UNSPECIFIED: SourceType = SourceType::new(0);
8962
8963        /// Logs produced by ESXI hosts
8964        pub const ESXI: SourceType = SourceType::new(1);
8965
8966        /// Logs produced by vCenter server
8967        pub const VCSA: SourceType = SourceType::new(2);
8968
8969        /// Creates a new SourceType instance.
8970        pub(crate) const fn new(value: i32) -> Self {
8971            Self(value)
8972        }
8973
8974        /// Gets the enum value.
8975        pub fn value(&self) -> i32 {
8976            self.0
8977        }
8978
8979        /// Gets the enum value as a string.
8980        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
8981            match self.0 {
8982                0 => std::borrow::Cow::Borrowed("SOURCE_TYPE_UNSPECIFIED"),
8983                1 => std::borrow::Cow::Borrowed("ESXI"),
8984                2 => std::borrow::Cow::Borrowed("VCSA"),
8985                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
8986            }
8987        }
8988
8989        /// Creates an enum value from the value name.
8990        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
8991            match name {
8992                "SOURCE_TYPE_UNSPECIFIED" => {
8993                    std::option::Option::Some(Self::SOURCE_TYPE_UNSPECIFIED)
8994                }
8995                "ESXI" => std::option::Option::Some(Self::ESXI),
8996                "VCSA" => std::option::Option::Some(Self::VCSA),
8997                _ => std::option::Option::None,
8998            }
8999        }
9000    }
9001
9002    impl std::convert::From<i32> for SourceType {
9003        fn from(value: i32) -> Self {
9004            Self::new(value)
9005        }
9006    }
9007
9008    impl std::default::Default for SourceType {
9009        fn default() -> Self {
9010            Self::new(0)
9011        }
9012    }
9013}
9014
9015/// Describes node type.
9016#[serde_with::serde_as]
9017#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9018#[serde(default, rename_all = "camelCase")]
9019#[non_exhaustive]
9020pub struct NodeType {
9021    /// Output only. The resource name of this node type.
9022    /// Resource names are schemeless URIs that follow the conventions in
9023    /// <https://cloud.google.com/apis/design/resource_names>.
9024    /// For example:
9025    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
9026    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9027    pub name: std::string::String,
9028
9029    /// Output only. The canonical identifier of the node type
9030    /// (corresponds to the `NodeType`). For example: standard-72.
9031    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9032    pub node_type_id: std::string::String,
9033
9034    /// Output only. The friendly name for this node type.
9035    /// For example: ve1-standard-72
9036    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9037    pub display_name: std::string::String,
9038
9039    /// Output only. The total number of virtual CPUs in a single node.
9040    pub virtual_cpu_count: i32,
9041
9042    /// Output only. The total number of CPU cores in a single node.
9043    pub total_core_count: i32,
9044
9045    /// Output only. The amount of physical memory available, defined in GB.
9046    pub memory_gb: i32,
9047
9048    /// Output only. The amount of storage available, defined in GB.
9049    pub disk_size_gb: i32,
9050
9051    /// Output only. List of possible values of custom core count.
9052    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9053    pub available_custom_core_counts: std::vec::Vec<i32>,
9054
9055    /// Output only. The type of the resource.
9056    pub kind: crate::model::node_type::Kind,
9057
9058    /// Output only. Families of the node type.
9059    /// For node types to be in the same cluster
9060    /// they must share at least one element in the `families`.
9061    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9062    pub families: std::vec::Vec<std::string::String>,
9063
9064    /// Output only. Capabilities of this node type.
9065    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
9066    pub capabilities: std::vec::Vec<crate::model::node_type::Capability>,
9067
9068    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9069    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9070}
9071
9072impl NodeType {
9073    pub fn new() -> Self {
9074        std::default::Default::default()
9075    }
9076
9077    /// Sets the value of [name][crate::model::NodeType::name].
9078    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9079        self.name = v.into();
9080        self
9081    }
9082
9083    /// Sets the value of [node_type_id][crate::model::NodeType::node_type_id].
9084    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9085        self.node_type_id = v.into();
9086        self
9087    }
9088
9089    /// Sets the value of [display_name][crate::model::NodeType::display_name].
9090    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9091        self.display_name = v.into();
9092        self
9093    }
9094
9095    /// Sets the value of [virtual_cpu_count][crate::model::NodeType::virtual_cpu_count].
9096    pub fn set_virtual_cpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9097        self.virtual_cpu_count = v.into();
9098        self
9099    }
9100
9101    /// Sets the value of [total_core_count][crate::model::NodeType::total_core_count].
9102    pub fn set_total_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9103        self.total_core_count = v.into();
9104        self
9105    }
9106
9107    /// Sets the value of [memory_gb][crate::model::NodeType::memory_gb].
9108    pub fn set_memory_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9109        self.memory_gb = v.into();
9110        self
9111    }
9112
9113    /// Sets the value of [disk_size_gb][crate::model::NodeType::disk_size_gb].
9114    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9115        self.disk_size_gb = v.into();
9116        self
9117    }
9118
9119    /// Sets the value of [kind][crate::model::NodeType::kind].
9120    pub fn set_kind<T: std::convert::Into<crate::model::node_type::Kind>>(mut self, v: T) -> Self {
9121        self.kind = v.into();
9122        self
9123    }
9124
9125    /// Sets the value of [available_custom_core_counts][crate::model::NodeType::available_custom_core_counts].
9126    pub fn set_available_custom_core_counts<T, V>(mut self, v: T) -> Self
9127    where
9128        T: std::iter::IntoIterator<Item = V>,
9129        V: std::convert::Into<i32>,
9130    {
9131        use std::iter::Iterator;
9132        self.available_custom_core_counts = v.into_iter().map(|i| i.into()).collect();
9133        self
9134    }
9135
9136    /// Sets the value of [families][crate::model::NodeType::families].
9137    pub fn set_families<T, V>(mut self, v: T) -> Self
9138    where
9139        T: std::iter::IntoIterator<Item = V>,
9140        V: std::convert::Into<std::string::String>,
9141    {
9142        use std::iter::Iterator;
9143        self.families = v.into_iter().map(|i| i.into()).collect();
9144        self
9145    }
9146
9147    /// Sets the value of [capabilities][crate::model::NodeType::capabilities].
9148    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
9149    where
9150        T: std::iter::IntoIterator<Item = V>,
9151        V: std::convert::Into<crate::model::node_type::Capability>,
9152    {
9153        use std::iter::Iterator;
9154        self.capabilities = v.into_iter().map(|i| i.into()).collect();
9155        self
9156    }
9157}
9158
9159impl wkt::message::Message for NodeType {
9160    fn typename() -> &'static str {
9161        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeType"
9162    }
9163}
9164
9165/// Defines additional types related to [NodeType].
9166pub mod node_type {
9167    #[allow(unused_imports)]
9168    use super::*;
9169
9170    /// Enum Kind defines possible types of a NodeType.
9171    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9172    pub struct Kind(i32);
9173
9174    impl Kind {
9175        /// The default value. This value should never be used.
9176        pub const KIND_UNSPECIFIED: Kind = Kind::new(0);
9177
9178        /// Standard HCI node.
9179        pub const STANDARD: Kind = Kind::new(1);
9180
9181        /// Storage only Node.
9182        pub const STORAGE_ONLY: Kind = Kind::new(2);
9183
9184        /// Creates a new Kind instance.
9185        pub(crate) const fn new(value: i32) -> Self {
9186            Self(value)
9187        }
9188
9189        /// Gets the enum value.
9190        pub fn value(&self) -> i32 {
9191            self.0
9192        }
9193
9194        /// Gets the enum value as a string.
9195        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9196            match self.0 {
9197                0 => std::borrow::Cow::Borrowed("KIND_UNSPECIFIED"),
9198                1 => std::borrow::Cow::Borrowed("STANDARD"),
9199                2 => std::borrow::Cow::Borrowed("STORAGE_ONLY"),
9200                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9201            }
9202        }
9203
9204        /// Creates an enum value from the value name.
9205        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9206            match name {
9207                "KIND_UNSPECIFIED" => std::option::Option::Some(Self::KIND_UNSPECIFIED),
9208                "STANDARD" => std::option::Option::Some(Self::STANDARD),
9209                "STORAGE_ONLY" => std::option::Option::Some(Self::STORAGE_ONLY),
9210                _ => std::option::Option::None,
9211            }
9212        }
9213    }
9214
9215    impl std::convert::From<i32> for Kind {
9216        fn from(value: i32) -> Self {
9217            Self::new(value)
9218        }
9219    }
9220
9221    impl std::default::Default for Kind {
9222        fn default() -> Self {
9223            Self::new(0)
9224        }
9225    }
9226
9227    /// Capability of a node type.
9228    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9229    pub struct Capability(i32);
9230
9231    impl Capability {
9232        /// The default value. This value is used if the capability is omitted or
9233        /// unknown.
9234        pub const CAPABILITY_UNSPECIFIED: Capability = Capability::new(0);
9235
9236        /// This node type supports stretch clusters.
9237        pub const STRETCHED_CLUSTERS: Capability = Capability::new(1);
9238
9239        /// Creates a new Capability instance.
9240        pub(crate) const fn new(value: i32) -> Self {
9241            Self(value)
9242        }
9243
9244        /// Gets the enum value.
9245        pub fn value(&self) -> i32 {
9246            self.0
9247        }
9248
9249        /// Gets the enum value as a string.
9250        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9251            match self.0 {
9252                0 => std::borrow::Cow::Borrowed("CAPABILITY_UNSPECIFIED"),
9253                1 => std::borrow::Cow::Borrowed("STRETCHED_CLUSTERS"),
9254                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9255            }
9256        }
9257
9258        /// Creates an enum value from the value name.
9259        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9260            match name {
9261                "CAPABILITY_UNSPECIFIED" => std::option::Option::Some(Self::CAPABILITY_UNSPECIFIED),
9262                "STRETCHED_CLUSTERS" => std::option::Option::Some(Self::STRETCHED_CLUSTERS),
9263                _ => std::option::Option::None,
9264            }
9265        }
9266    }
9267
9268    impl std::convert::From<i32> for Capability {
9269        fn from(value: i32) -> Self {
9270            Self::new(value)
9271        }
9272    }
9273
9274    impl std::default::Default for Capability {
9275        fn default() -> Self {
9276            Self::new(0)
9277        }
9278    }
9279}
9280
9281/// Credentials for a private cloud.
9282#[serde_with::serde_as]
9283#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9284#[serde(default, rename_all = "camelCase")]
9285#[non_exhaustive]
9286pub struct Credentials {
9287    /// Initial username.
9288    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9289    pub username: std::string::String,
9290
9291    /// Initial password.
9292    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9293    pub password: std::string::String,
9294
9295    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9296    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9297}
9298
9299impl Credentials {
9300    pub fn new() -> Self {
9301        std::default::Default::default()
9302    }
9303
9304    /// Sets the value of [username][crate::model::Credentials::username].
9305    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9306        self.username = v.into();
9307        self
9308    }
9309
9310    /// Sets the value of [password][crate::model::Credentials::password].
9311    pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9312        self.password = v.into();
9313        self
9314    }
9315}
9316
9317impl wkt::message::Message for Credentials {
9318    fn typename() -> &'static str {
9319        "type.googleapis.com/google.cloud.vmwareengine.v1.Credentials"
9320    }
9321}
9322
9323/// HCX activation key. A default key is created during
9324/// private cloud provisioning, but this behavior is subject to change
9325/// and you should always verify active keys.
9326/// Use
9327/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
9328/// to retrieve existing keys and
9329/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
9330/// to create new ones.
9331///
9332/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
9333/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
9334#[serde_with::serde_as]
9335#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9336#[serde(default, rename_all = "camelCase")]
9337#[non_exhaustive]
9338pub struct HcxActivationKey {
9339    /// Output only. The resource name of this HcxActivationKey.
9340    /// Resource names are schemeless URIs that follow the conventions in
9341    /// <https://cloud.google.com/apis/design/resource_names>.
9342    /// For example:
9343    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
9344    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9345    pub name: std::string::String,
9346
9347    /// Output only. Creation time of HCX activation key.
9348    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9349    pub create_time: std::option::Option<wkt::Timestamp>,
9350
9351    /// Output only. State of HCX activation key.
9352    pub state: crate::model::hcx_activation_key::State,
9353
9354    /// Output only. HCX activation key.
9355    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9356    pub activation_key: std::string::String,
9357
9358    /// Output only. System-generated unique identifier for the resource.
9359    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9360    pub uid: std::string::String,
9361
9362    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9363    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9364}
9365
9366impl HcxActivationKey {
9367    pub fn new() -> Self {
9368        std::default::Default::default()
9369    }
9370
9371    /// Sets the value of [name][crate::model::HcxActivationKey::name].
9372    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9373        self.name = v.into();
9374        self
9375    }
9376
9377    /// Sets the value of [create_time][crate::model::HcxActivationKey::create_time].
9378    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
9379        mut self,
9380        v: T,
9381    ) -> Self {
9382        self.create_time = v.into();
9383        self
9384    }
9385
9386    /// Sets the value of [state][crate::model::HcxActivationKey::state].
9387    pub fn set_state<T: std::convert::Into<crate::model::hcx_activation_key::State>>(
9388        mut self,
9389        v: T,
9390    ) -> Self {
9391        self.state = v.into();
9392        self
9393    }
9394
9395    /// Sets the value of [activation_key][crate::model::HcxActivationKey::activation_key].
9396    pub fn set_activation_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9397        self.activation_key = v.into();
9398        self
9399    }
9400
9401    /// Sets the value of [uid][crate::model::HcxActivationKey::uid].
9402    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9403        self.uid = v.into();
9404        self
9405    }
9406}
9407
9408impl wkt::message::Message for HcxActivationKey {
9409    fn typename() -> &'static str {
9410        "type.googleapis.com/google.cloud.vmwareengine.v1.HcxActivationKey"
9411    }
9412}
9413
9414/// Defines additional types related to [HcxActivationKey].
9415pub mod hcx_activation_key {
9416    #[allow(unused_imports)]
9417    use super::*;
9418
9419    /// State of HCX activation key
9420    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9421    pub struct State(i32);
9422
9423    impl State {
9424        /// Unspecified state.
9425        pub const STATE_UNSPECIFIED: State = State::new(0);
9426
9427        /// State of a newly generated activation key.
9428        pub const AVAILABLE: State = State::new(1);
9429
9430        /// State of key when it has been used to activate HCX appliance.
9431        pub const CONSUMED: State = State::new(2);
9432
9433        /// State of key when it is being created.
9434        pub const CREATING: State = State::new(3);
9435
9436        /// Creates a new State instance.
9437        pub(crate) const fn new(value: i32) -> Self {
9438            Self(value)
9439        }
9440
9441        /// Gets the enum value.
9442        pub fn value(&self) -> i32 {
9443            self.0
9444        }
9445
9446        /// Gets the enum value as a string.
9447        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9448            match self.0 {
9449                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
9450                1 => std::borrow::Cow::Borrowed("AVAILABLE"),
9451                2 => std::borrow::Cow::Borrowed("CONSUMED"),
9452                3 => std::borrow::Cow::Borrowed("CREATING"),
9453                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9454            }
9455        }
9456
9457        /// Creates an enum value from the value name.
9458        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9459            match name {
9460                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
9461                "AVAILABLE" => std::option::Option::Some(Self::AVAILABLE),
9462                "CONSUMED" => std::option::Option::Some(Self::CONSUMED),
9463                "CREATING" => std::option::Option::Some(Self::CREATING),
9464                _ => std::option::Option::None,
9465            }
9466        }
9467    }
9468
9469    impl std::convert::From<i32> for State {
9470        fn from(value: i32) -> Self {
9471            Self::new(value)
9472        }
9473    }
9474
9475    impl std::default::Default for State {
9476        fn default() -> Self {
9477            Self::new(0)
9478        }
9479    }
9480}
9481
9482/// Details about a HCX Cloud Manager appliance.
9483#[serde_with::serde_as]
9484#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9485#[serde(default, rename_all = "camelCase")]
9486#[non_exhaustive]
9487pub struct Hcx {
9488    /// Internal IP address of the appliance.
9489    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9490    pub internal_ip: std::string::String,
9491
9492    /// Version of the appliance.
9493    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9494    pub version: std::string::String,
9495
9496    /// Output only. The state of the appliance.
9497    pub state: crate::model::hcx::State,
9498
9499    /// Fully qualified domain name of the appliance.
9500    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9501    pub fqdn: std::string::String,
9502
9503    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9504    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9505}
9506
9507impl Hcx {
9508    pub fn new() -> Self {
9509        std::default::Default::default()
9510    }
9511
9512    /// Sets the value of [internal_ip][crate::model::Hcx::internal_ip].
9513    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9514        self.internal_ip = v.into();
9515        self
9516    }
9517
9518    /// Sets the value of [version][crate::model::Hcx::version].
9519    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9520        self.version = v.into();
9521        self
9522    }
9523
9524    /// Sets the value of [state][crate::model::Hcx::state].
9525    pub fn set_state<T: std::convert::Into<crate::model::hcx::State>>(mut self, v: T) -> Self {
9526        self.state = v.into();
9527        self
9528    }
9529
9530    /// Sets the value of [fqdn][crate::model::Hcx::fqdn].
9531    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9532        self.fqdn = v.into();
9533        self
9534    }
9535}
9536
9537impl wkt::message::Message for Hcx {
9538    fn typename() -> &'static str {
9539        "type.googleapis.com/google.cloud.vmwareengine.v1.Hcx"
9540    }
9541}
9542
9543/// Defines additional types related to [Hcx].
9544pub mod hcx {
9545    #[allow(unused_imports)]
9546    use super::*;
9547
9548    /// State of the appliance
9549    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9550    pub struct State(i32);
9551
9552    impl State {
9553        /// Unspecified appliance state. This is the default value.
9554        pub const STATE_UNSPECIFIED: State = State::new(0);
9555
9556        /// The appliance is operational and can be used.
9557        pub const ACTIVE: State = State::new(1);
9558
9559        /// The appliance is being deployed.
9560        pub const CREATING: State = State::new(2);
9561
9562        /// The appliance is being activated.
9563        pub const ACTIVATING: State = State::new(3);
9564
9565        /// Creates a new State instance.
9566        pub(crate) const fn new(value: i32) -> Self {
9567            Self(value)
9568        }
9569
9570        /// Gets the enum value.
9571        pub fn value(&self) -> i32 {
9572            self.0
9573        }
9574
9575        /// Gets the enum value as a string.
9576        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9577            match self.0 {
9578                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
9579                1 => std::borrow::Cow::Borrowed("ACTIVE"),
9580                2 => std::borrow::Cow::Borrowed("CREATING"),
9581                3 => std::borrow::Cow::Borrowed("ACTIVATING"),
9582                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9583            }
9584        }
9585
9586        /// Creates an enum value from the value name.
9587        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9588            match name {
9589                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
9590                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
9591                "CREATING" => std::option::Option::Some(Self::CREATING),
9592                "ACTIVATING" => std::option::Option::Some(Self::ACTIVATING),
9593                _ => std::option::Option::None,
9594            }
9595        }
9596    }
9597
9598    impl std::convert::From<i32> for State {
9599        fn from(value: i32) -> Self {
9600            Self::new(value)
9601        }
9602    }
9603
9604    impl std::default::Default for State {
9605        fn default() -> Self {
9606            Self::new(0)
9607        }
9608    }
9609}
9610
9611/// Details about a NSX Manager appliance.
9612#[serde_with::serde_as]
9613#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9614#[serde(default, rename_all = "camelCase")]
9615#[non_exhaustive]
9616pub struct Nsx {
9617    /// Internal IP address of the appliance.
9618    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9619    pub internal_ip: std::string::String,
9620
9621    /// Version of the appliance.
9622    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9623    pub version: std::string::String,
9624
9625    /// Output only. The state of the appliance.
9626    pub state: crate::model::nsx::State,
9627
9628    /// Fully qualified domain name of the appliance.
9629    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9630    pub fqdn: std::string::String,
9631
9632    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9633    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9634}
9635
9636impl Nsx {
9637    pub fn new() -> Self {
9638        std::default::Default::default()
9639    }
9640
9641    /// Sets the value of [internal_ip][crate::model::Nsx::internal_ip].
9642    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9643        self.internal_ip = v.into();
9644        self
9645    }
9646
9647    /// Sets the value of [version][crate::model::Nsx::version].
9648    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9649        self.version = v.into();
9650        self
9651    }
9652
9653    /// Sets the value of [state][crate::model::Nsx::state].
9654    pub fn set_state<T: std::convert::Into<crate::model::nsx::State>>(mut self, v: T) -> Self {
9655        self.state = v.into();
9656        self
9657    }
9658
9659    /// Sets the value of [fqdn][crate::model::Nsx::fqdn].
9660    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9661        self.fqdn = v.into();
9662        self
9663    }
9664}
9665
9666impl wkt::message::Message for Nsx {
9667    fn typename() -> &'static str {
9668        "type.googleapis.com/google.cloud.vmwareengine.v1.Nsx"
9669    }
9670}
9671
9672/// Defines additional types related to [Nsx].
9673pub mod nsx {
9674    #[allow(unused_imports)]
9675    use super::*;
9676
9677    /// State of the appliance
9678    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9679    pub struct State(i32);
9680
9681    impl State {
9682        /// Unspecified appliance state. This is the default value.
9683        pub const STATE_UNSPECIFIED: State = State::new(0);
9684
9685        /// The appliance is operational and can be used.
9686        pub const ACTIVE: State = State::new(1);
9687
9688        /// The appliance is being deployed.
9689        pub const CREATING: State = State::new(2);
9690
9691        /// Creates a new State instance.
9692        pub(crate) const fn new(value: i32) -> Self {
9693            Self(value)
9694        }
9695
9696        /// Gets the enum value.
9697        pub fn value(&self) -> i32 {
9698            self.0
9699        }
9700
9701        /// Gets the enum value as a string.
9702        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9703            match self.0 {
9704                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
9705                1 => std::borrow::Cow::Borrowed("ACTIVE"),
9706                2 => std::borrow::Cow::Borrowed("CREATING"),
9707                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9708            }
9709        }
9710
9711        /// Creates an enum value from the value name.
9712        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9713            match name {
9714                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
9715                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
9716                "CREATING" => std::option::Option::Some(Self::CREATING),
9717                _ => std::option::Option::None,
9718            }
9719        }
9720    }
9721
9722    impl std::convert::From<i32> for State {
9723        fn from(value: i32) -> Self {
9724            Self::new(value)
9725        }
9726    }
9727
9728    impl std::default::Default for State {
9729        fn default() -> Self {
9730            Self::new(0)
9731        }
9732    }
9733}
9734
9735/// Details about a vCenter Server management appliance.
9736#[serde_with::serde_as]
9737#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9738#[serde(default, rename_all = "camelCase")]
9739#[non_exhaustive]
9740pub struct Vcenter {
9741    /// Internal IP address of the appliance.
9742    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9743    pub internal_ip: std::string::String,
9744
9745    /// Version of the appliance.
9746    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9747    pub version: std::string::String,
9748
9749    /// Output only. The state of the appliance.
9750    pub state: crate::model::vcenter::State,
9751
9752    /// Fully qualified domain name of the appliance.
9753    #[serde(skip_serializing_if = "std::string::String::is_empty")]
9754    pub fqdn: std::string::String,
9755
9756    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9757    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9758}
9759
9760impl Vcenter {
9761    pub fn new() -> Self {
9762        std::default::Default::default()
9763    }
9764
9765    /// Sets the value of [internal_ip][crate::model::Vcenter::internal_ip].
9766    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9767        self.internal_ip = v.into();
9768        self
9769    }
9770
9771    /// Sets the value of [version][crate::model::Vcenter::version].
9772    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9773        self.version = v.into();
9774        self
9775    }
9776
9777    /// Sets the value of [state][crate::model::Vcenter::state].
9778    pub fn set_state<T: std::convert::Into<crate::model::vcenter::State>>(mut self, v: T) -> Self {
9779        self.state = v.into();
9780        self
9781    }
9782
9783    /// Sets the value of [fqdn][crate::model::Vcenter::fqdn].
9784    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9785        self.fqdn = v.into();
9786        self
9787    }
9788}
9789
9790impl wkt::message::Message for Vcenter {
9791    fn typename() -> &'static str {
9792        "type.googleapis.com/google.cloud.vmwareengine.v1.Vcenter"
9793    }
9794}
9795
9796/// Defines additional types related to [Vcenter].
9797pub mod vcenter {
9798    #[allow(unused_imports)]
9799    use super::*;
9800
9801    /// State of the appliance
9802    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
9803    pub struct State(i32);
9804
9805    impl State {
9806        /// Unspecified appliance state. This is the default value.
9807        pub const STATE_UNSPECIFIED: State = State::new(0);
9808
9809        /// The appliance is operational and can be used.
9810        pub const ACTIVE: State = State::new(1);
9811
9812        /// The appliance is being deployed.
9813        pub const CREATING: State = State::new(2);
9814
9815        /// Creates a new State instance.
9816        pub(crate) const fn new(value: i32) -> Self {
9817            Self(value)
9818        }
9819
9820        /// Gets the enum value.
9821        pub fn value(&self) -> i32 {
9822            self.0
9823        }
9824
9825        /// Gets the enum value as a string.
9826        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
9827            match self.0 {
9828                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
9829                1 => std::borrow::Cow::Borrowed("ACTIVE"),
9830                2 => std::borrow::Cow::Borrowed("CREATING"),
9831                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
9832            }
9833        }
9834
9835        /// Creates an enum value from the value name.
9836        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
9837            match name {
9838                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
9839                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
9840                "CREATING" => std::option::Option::Some(Self::CREATING),
9841                _ => std::option::Option::None,
9842            }
9843        }
9844    }
9845
9846    impl std::convert::From<i32> for State {
9847        fn from(value: i32) -> Self {
9848            Self::new(value)
9849        }
9850    }
9851
9852    impl std::default::Default for State {
9853        fn default() -> Self {
9854            Self::new(0)
9855        }
9856    }
9857}
9858
9859/// Autoscaling settings define the rules used by VMware Engine to
9860/// automatically scale-out and scale-in the clusters in a private cloud.
9861#[serde_with::serde_as]
9862#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9863#[serde(default, rename_all = "camelCase")]
9864#[non_exhaustive]
9865pub struct AutoscalingSettings {
9866    /// Required. The map with autoscaling policies applied to the cluster.
9867    /// The key is the identifier of the policy.
9868    /// It must meet the following requirements:
9869    ///
9870    /// * Only contains 1-63 alphanumeric characters and hyphens
9871    /// * Begins with an alphabetical character
9872    /// * Ends with a non-hyphen character
9873    /// * Not formatted as a UUID
9874    /// * Complies with [RFC
9875    ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
9876    ///
9877    /// Currently there map must contain only one element
9878    /// that describes the autoscaling policy for compute nodes.
9879    #[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
9880    pub autoscaling_policies: std::collections::HashMap<
9881        std::string::String,
9882        crate::model::autoscaling_settings::AutoscalingPolicy,
9883    >,
9884
9885    /// Optional. Minimum number of nodes of any type in a cluster.
9886    /// If not specified the default limits apply.
9887    pub min_cluster_node_count: i32,
9888
9889    /// Optional. Maximum number of nodes of any type in a cluster.
9890    /// If not specified the default limits apply.
9891    pub max_cluster_node_count: i32,
9892
9893    /// Optional. The minimum duration between consecutive autoscale operations.
9894    /// It starts once addition or removal of nodes is fully completed.
9895    /// Defaults to 30 minutes if not specified. Cool down period must be in whole
9896    /// minutes (for example, 30, 31, 50, 180 minutes).
9897    #[serde(skip_serializing_if = "std::option::Option::is_none")]
9898    pub cool_down_period: std::option::Option<wkt::Duration>,
9899
9900    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9901    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9902}
9903
9904impl AutoscalingSettings {
9905    pub fn new() -> Self {
9906        std::default::Default::default()
9907    }
9908
9909    /// Sets the value of [min_cluster_node_count][crate::model::AutoscalingSettings::min_cluster_node_count].
9910    pub fn set_min_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9911        self.min_cluster_node_count = v.into();
9912        self
9913    }
9914
9915    /// Sets the value of [max_cluster_node_count][crate::model::AutoscalingSettings::max_cluster_node_count].
9916    pub fn set_max_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9917        self.max_cluster_node_count = v.into();
9918        self
9919    }
9920
9921    /// Sets the value of [cool_down_period][crate::model::AutoscalingSettings::cool_down_period].
9922    pub fn set_cool_down_period<T: std::convert::Into<std::option::Option<wkt::Duration>>>(
9923        mut self,
9924        v: T,
9925    ) -> Self {
9926        self.cool_down_period = v.into();
9927        self
9928    }
9929
9930    /// Sets the value of [autoscaling_policies][crate::model::AutoscalingSettings::autoscaling_policies].
9931    pub fn set_autoscaling_policies<T, K, V>(mut self, v: T) -> Self
9932    where
9933        T: std::iter::IntoIterator<Item = (K, V)>,
9934        K: std::convert::Into<std::string::String>,
9935        V: std::convert::Into<crate::model::autoscaling_settings::AutoscalingPolicy>,
9936    {
9937        use std::iter::Iterator;
9938        self.autoscaling_policies = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
9939        self
9940    }
9941}
9942
9943impl wkt::message::Message for AutoscalingSettings {
9944    fn typename() -> &'static str {
9945        "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings"
9946    }
9947}
9948
9949/// Defines additional types related to [AutoscalingSettings].
9950pub mod autoscaling_settings {
9951    #[allow(unused_imports)]
9952    use super::*;
9953
9954    /// Thresholds define the utilization of resources triggering
9955    /// scale-out and scale-in operations.
9956    #[serde_with::serde_as]
9957    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
9958    #[serde(default, rename_all = "camelCase")]
9959    #[non_exhaustive]
9960    pub struct Thresholds {
9961        /// Required. The utilization triggering the scale-out operation in percent.
9962        pub scale_out: i32,
9963
9964        /// Required. The utilization triggering the scale-in operation in percent.
9965        pub scale_in: i32,
9966
9967        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
9968        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9969    }
9970
9971    impl Thresholds {
9972        pub fn new() -> Self {
9973            std::default::Default::default()
9974        }
9975
9976        /// Sets the value of [scale_out][crate::model::autoscaling_settings::Thresholds::scale_out].
9977        pub fn set_scale_out<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9978            self.scale_out = v.into();
9979            self
9980        }
9981
9982        /// Sets the value of [scale_in][crate::model::autoscaling_settings::Thresholds::scale_in].
9983        pub fn set_scale_in<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9984            self.scale_in = v.into();
9985            self
9986        }
9987    }
9988
9989    impl wkt::message::Message for Thresholds {
9990        fn typename() -> &'static str {
9991            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds"
9992        }
9993    }
9994
9995    /// Autoscaling policy describes the behavior of the autoscaling
9996    /// with respect to the resource utilization.
9997    /// The scale-out operation is initiated if the utilization
9998    /// exceeds ANY of the respective thresholds.
9999    /// The scale-in operation is initiated if the utilization
10000    /// is below ALL of the respective thresholds.
10001    #[serde_with::serde_as]
10002    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10003    #[serde(default, rename_all = "camelCase")]
10004    #[non_exhaustive]
10005    pub struct AutoscalingPolicy {
10006        /// Required. The canonical identifier of the node type to add or remove.
10007        /// Corresponds to the `NodeType`.
10008        #[serde(skip_serializing_if = "std::string::String::is_empty")]
10009        pub node_type_id: std::string::String,
10010
10011        /// Required. Number of nodes to add to a cluster during a scale-out
10012        /// operation. Must be divisible by 2 for stretched clusters. During a
10013        /// scale-in operation only one node (or 2 for stretched clusters) are
10014        /// removed in a single iteration.
10015        pub scale_out_size: i32,
10016
10017        /// Optional. Utilization thresholds pertaining to CPU utilization.
10018        #[serde(skip_serializing_if = "std::option::Option::is_none")]
10019        pub cpu_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
10020
10021        /// Optional. Utilization thresholds pertaining to amount of granted memory.
10022        #[serde(skip_serializing_if = "std::option::Option::is_none")]
10023        pub granted_memory_thresholds:
10024            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
10025
10026        /// Optional. Utilization thresholds pertaining to amount of consumed memory.
10027        #[serde(skip_serializing_if = "std::option::Option::is_none")]
10028        pub consumed_memory_thresholds:
10029            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
10030
10031        /// Optional. Utilization thresholds pertaining to amount of consumed
10032        /// storage.
10033        #[serde(skip_serializing_if = "std::option::Option::is_none")]
10034        pub storage_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
10035
10036        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10037        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10038    }
10039
10040    impl AutoscalingPolicy {
10041        pub fn new() -> Self {
10042            std::default::Default::default()
10043        }
10044
10045        /// Sets the value of [node_type_id][crate::model::autoscaling_settings::AutoscalingPolicy::node_type_id].
10046        pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(
10047            mut self,
10048            v: T,
10049        ) -> Self {
10050            self.node_type_id = v.into();
10051            self
10052        }
10053
10054        /// Sets the value of [scale_out_size][crate::model::autoscaling_settings::AutoscalingPolicy::scale_out_size].
10055        pub fn set_scale_out_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10056            self.scale_out_size = v.into();
10057            self
10058        }
10059
10060        /// Sets the value of [cpu_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::cpu_thresholds].
10061        pub fn set_cpu_thresholds<
10062            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
10063        >(
10064            mut self,
10065            v: T,
10066        ) -> Self {
10067            self.cpu_thresholds = v.into();
10068            self
10069        }
10070
10071        /// Sets the value of [granted_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::granted_memory_thresholds].
10072        pub fn set_granted_memory_thresholds<
10073            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
10074        >(
10075            mut self,
10076            v: T,
10077        ) -> Self {
10078            self.granted_memory_thresholds = v.into();
10079            self
10080        }
10081
10082        /// Sets the value of [consumed_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::consumed_memory_thresholds].
10083        pub fn set_consumed_memory_thresholds<
10084            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
10085        >(
10086            mut self,
10087            v: T,
10088        ) -> Self {
10089            self.consumed_memory_thresholds = v.into();
10090            self
10091        }
10092
10093        /// Sets the value of [storage_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::storage_thresholds].
10094        pub fn set_storage_thresholds<
10095            T: std::convert::Into<std::option::Option<crate::model::autoscaling_settings::Thresholds>>,
10096        >(
10097            mut self,
10098            v: T,
10099        ) -> Self {
10100            self.storage_thresholds = v.into();
10101            self
10102        }
10103    }
10104
10105    impl wkt::message::Message for AutoscalingPolicy {
10106        fn typename() -> &'static str {
10107            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.AutoscalingPolicy"
10108        }
10109    }
10110}
10111
10112/// DNS forwarding config.
10113/// This config defines a list of domain to name server mappings,
10114/// and is attached to the private cloud for custom domain resolution.
10115#[serde_with::serde_as]
10116#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10117#[serde(default, rename_all = "camelCase")]
10118#[non_exhaustive]
10119pub struct DnsForwarding {
10120    /// Output only. The resource name of this DNS profile.
10121    /// Resource names are schemeless URIs that follow the conventions in
10122    /// <https://cloud.google.com/apis/design/resource_names>.
10123    /// For example:
10124    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
10125    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10126    pub name: std::string::String,
10127
10128    /// Output only. Creation time of this resource.
10129    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10130    pub create_time: std::option::Option<wkt::Timestamp>,
10131
10132    /// Output only. Last update time of this resource.
10133    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10134    pub update_time: std::option::Option<wkt::Timestamp>,
10135
10136    /// Required. List of domain mappings to configure
10137    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10138    pub forwarding_rules: std::vec::Vec<crate::model::dns_forwarding::ForwardingRule>,
10139
10140    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10141    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10142}
10143
10144impl DnsForwarding {
10145    pub fn new() -> Self {
10146        std::default::Default::default()
10147    }
10148
10149    /// Sets the value of [name][crate::model::DnsForwarding::name].
10150    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10151        self.name = v.into();
10152        self
10153    }
10154
10155    /// Sets the value of [create_time][crate::model::DnsForwarding::create_time].
10156    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10157        mut self,
10158        v: T,
10159    ) -> Self {
10160        self.create_time = v.into();
10161        self
10162    }
10163
10164    /// Sets the value of [update_time][crate::model::DnsForwarding::update_time].
10165    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10166        mut self,
10167        v: T,
10168    ) -> Self {
10169        self.update_time = v.into();
10170        self
10171    }
10172
10173    /// Sets the value of [forwarding_rules][crate::model::DnsForwarding::forwarding_rules].
10174    pub fn set_forwarding_rules<T, V>(mut self, v: T) -> Self
10175    where
10176        T: std::iter::IntoIterator<Item = V>,
10177        V: std::convert::Into<crate::model::dns_forwarding::ForwardingRule>,
10178    {
10179        use std::iter::Iterator;
10180        self.forwarding_rules = v.into_iter().map(|i| i.into()).collect();
10181        self
10182    }
10183}
10184
10185impl wkt::message::Message for DnsForwarding {
10186    fn typename() -> &'static str {
10187        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding"
10188    }
10189}
10190
10191/// Defines additional types related to [DnsForwarding].
10192pub mod dns_forwarding {
10193    #[allow(unused_imports)]
10194    use super::*;
10195
10196    /// A forwarding rule is a mapping of a `domain` to `name_servers`.
10197    /// This mapping allows VMware Engine to resolve domains for attached private
10198    /// clouds by forwarding DNS requests for a given domain to the specified
10199    /// nameservers.
10200    #[serde_with::serde_as]
10201    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10202    #[serde(default, rename_all = "camelCase")]
10203    #[non_exhaustive]
10204    pub struct ForwardingRule {
10205        /// Required. Domain used to resolve a `name_servers` list.
10206        #[serde(skip_serializing_if = "std::string::String::is_empty")]
10207        pub domain: std::string::String,
10208
10209        /// Required. List of DNS servers to use for domain resolution
10210        #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
10211        pub name_servers: std::vec::Vec<std::string::String>,
10212
10213        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10214        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10215    }
10216
10217    impl ForwardingRule {
10218        pub fn new() -> Self {
10219            std::default::Default::default()
10220        }
10221
10222        /// Sets the value of [domain][crate::model::dns_forwarding::ForwardingRule::domain].
10223        pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10224            self.domain = v.into();
10225            self
10226        }
10227
10228        /// Sets the value of [name_servers][crate::model::dns_forwarding::ForwardingRule::name_servers].
10229        pub fn set_name_servers<T, V>(mut self, v: T) -> Self
10230        where
10231            T: std::iter::IntoIterator<Item = V>,
10232            V: std::convert::Into<std::string::String>,
10233        {
10234            use std::iter::Iterator;
10235            self.name_servers = v.into_iter().map(|i| i.into()).collect();
10236            self
10237        }
10238    }
10239
10240    impl wkt::message::Message for ForwardingRule {
10241        fn typename() -> &'static str {
10242            "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule"
10243        }
10244    }
10245}
10246
10247/// Details of a network peering.
10248#[serde_with::serde_as]
10249#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10250#[serde(default, rename_all = "camelCase")]
10251#[non_exhaustive]
10252pub struct NetworkPeering {
10253    /// Output only. The resource name of the network peering. NetworkPeering is a
10254    /// global resource and location can only be global. Resource names are
10255    /// scheme-less URIs that follow the conventions in
10256    /// <https://cloud.google.com/apis/design/resource_names>.
10257    /// For example:
10258    /// `projects/my-project/locations/global/networkPeerings/my-peering`
10259    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10260    pub name: std::string::String,
10261
10262    /// Output only. Creation time of this resource.
10263    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10264    pub create_time: std::option::Option<wkt::Timestamp>,
10265
10266    /// Output only. Last update time of this resource.
10267    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10268    pub update_time: std::option::Option<wkt::Timestamp>,
10269
10270    /// Required. The relative resource name of the network to peer with
10271    /// a standard VMware Engine network. The provided network can be a
10272    /// consumer VPC network or another standard VMware Engine network. If the
10273    /// `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form:
10274    /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
10275    /// Otherwise specify the name in the form:
10276    /// `projects/{project}/global/networks/{network_id}`, where
10277    /// `{project}` can either be a project number or a project ID.
10278    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10279    pub peer_network: std::string::String,
10280
10281    /// Optional. True if custom routes are exported to the peered network;
10282    /// false otherwise. The default value is true.
10283    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10284    pub export_custom_routes: std::option::Option<bool>,
10285
10286    /// Optional. True if custom routes are imported from the peered network;
10287    /// false otherwise. The default value is true.
10288    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10289    pub import_custom_routes: std::option::Option<bool>,
10290
10291    /// Optional. True if full mesh connectivity is created and managed
10292    /// automatically between peered networks; false otherwise. Currently this
10293    /// field is always true because Google Compute Engine automatically creates
10294    /// and manages subnetwork routes between two VPC networks when peering state
10295    /// is 'ACTIVE'.
10296    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10297    pub exchange_subnet_routes: std::option::Option<bool>,
10298
10299    /// Optional. True if all subnet routes with a public IP address range are
10300    /// exported; false otherwise. The default value is true. IPv4 special-use
10301    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
10302    /// exported to peers and are not controlled by this field.
10303    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10304    pub export_custom_routes_with_public_ip: std::option::Option<bool>,
10305
10306    /// Optional. True if all subnet routes with public IP address range are
10307    /// imported; false otherwise. The default value is true. IPv4 special-use
10308    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
10309    /// imported to peers and are not controlled by this field.
10310    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10311    pub import_custom_routes_with_public_ip: std::option::Option<bool>,
10312
10313    /// Output only. State of the network peering. This field
10314    /// has a value of 'ACTIVE' when there's a matching configuration in the peer
10315    /// network. New values may be added to this enum when appropriate.
10316    pub state: crate::model::network_peering::State,
10317
10318    /// Output only. Output Only. Details about the current state of the network
10319    /// peering.
10320    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10321    pub state_details: std::string::String,
10322
10323    /// Optional. Maximum transmission unit (MTU) in bytes.
10324    /// The default value is `1500`. If a value of `0` is provided for this field,
10325    /// VMware Engine uses the default value instead.
10326    pub peer_mtu: i32,
10327
10328    /// Required. The type of the network to peer with the VMware Engine network.
10329    pub peer_network_type: crate::model::network_peering::PeerNetworkType,
10330
10331    /// Output only. System-generated unique identifier for the resource.
10332    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10333    pub uid: std::string::String,
10334
10335    /// Required. The relative resource name of the VMware Engine network.
10336    /// Specify the name in the following form:
10337    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
10338    /// where `{project}` can either be a project number or a project ID.
10339    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10340    pub vmware_engine_network: std::string::String,
10341
10342    /// Optional. User-provided description for this network peering.
10343    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10344    pub description: std::string::String,
10345
10346    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10347    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10348}
10349
10350impl NetworkPeering {
10351    pub fn new() -> Self {
10352        std::default::Default::default()
10353    }
10354
10355    /// Sets the value of [name][crate::model::NetworkPeering::name].
10356    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10357        self.name = v.into();
10358        self
10359    }
10360
10361    /// Sets the value of [create_time][crate::model::NetworkPeering::create_time].
10362    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10363        mut self,
10364        v: T,
10365    ) -> Self {
10366        self.create_time = v.into();
10367        self
10368    }
10369
10370    /// Sets the value of [update_time][crate::model::NetworkPeering::update_time].
10371    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10372        mut self,
10373        v: T,
10374    ) -> Self {
10375        self.update_time = v.into();
10376        self
10377    }
10378
10379    /// Sets the value of [peer_network][crate::model::NetworkPeering::peer_network].
10380    pub fn set_peer_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10381        self.peer_network = v.into();
10382        self
10383    }
10384
10385    /// Sets the value of [export_custom_routes][crate::model::NetworkPeering::export_custom_routes].
10386    pub fn set_export_custom_routes<T: std::convert::Into<std::option::Option<bool>>>(
10387        mut self,
10388        v: T,
10389    ) -> Self {
10390        self.export_custom_routes = v.into();
10391        self
10392    }
10393
10394    /// Sets the value of [import_custom_routes][crate::model::NetworkPeering::import_custom_routes].
10395    pub fn set_import_custom_routes<T: std::convert::Into<std::option::Option<bool>>>(
10396        mut self,
10397        v: T,
10398    ) -> Self {
10399        self.import_custom_routes = v.into();
10400        self
10401    }
10402
10403    /// Sets the value of [exchange_subnet_routes][crate::model::NetworkPeering::exchange_subnet_routes].
10404    pub fn set_exchange_subnet_routes<T: std::convert::Into<std::option::Option<bool>>>(
10405        mut self,
10406        v: T,
10407    ) -> Self {
10408        self.exchange_subnet_routes = v.into();
10409        self
10410    }
10411
10412    /// Sets the value of [export_custom_routes_with_public_ip][crate::model::NetworkPeering::export_custom_routes_with_public_ip].
10413    pub fn set_export_custom_routes_with_public_ip<
10414        T: std::convert::Into<std::option::Option<bool>>,
10415    >(
10416        mut self,
10417        v: T,
10418    ) -> Self {
10419        self.export_custom_routes_with_public_ip = v.into();
10420        self
10421    }
10422
10423    /// Sets the value of [import_custom_routes_with_public_ip][crate::model::NetworkPeering::import_custom_routes_with_public_ip].
10424    pub fn set_import_custom_routes_with_public_ip<
10425        T: std::convert::Into<std::option::Option<bool>>,
10426    >(
10427        mut self,
10428        v: T,
10429    ) -> Self {
10430        self.import_custom_routes_with_public_ip = v.into();
10431        self
10432    }
10433
10434    /// Sets the value of [state][crate::model::NetworkPeering::state].
10435    pub fn set_state<T: std::convert::Into<crate::model::network_peering::State>>(
10436        mut self,
10437        v: T,
10438    ) -> Self {
10439        self.state = v.into();
10440        self
10441    }
10442
10443    /// Sets the value of [state_details][crate::model::NetworkPeering::state_details].
10444    pub fn set_state_details<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10445        self.state_details = v.into();
10446        self
10447    }
10448
10449    /// Sets the value of [peer_mtu][crate::model::NetworkPeering::peer_mtu].
10450    pub fn set_peer_mtu<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
10451        self.peer_mtu = v.into();
10452        self
10453    }
10454
10455    /// Sets the value of [peer_network_type][crate::model::NetworkPeering::peer_network_type].
10456    pub fn set_peer_network_type<
10457        T: std::convert::Into<crate::model::network_peering::PeerNetworkType>,
10458    >(
10459        mut self,
10460        v: T,
10461    ) -> Self {
10462        self.peer_network_type = v.into();
10463        self
10464    }
10465
10466    /// Sets the value of [uid][crate::model::NetworkPeering::uid].
10467    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10468        self.uid = v.into();
10469        self
10470    }
10471
10472    /// Sets the value of [vmware_engine_network][crate::model::NetworkPeering::vmware_engine_network].
10473    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
10474        mut self,
10475        v: T,
10476    ) -> Self {
10477        self.vmware_engine_network = v.into();
10478        self
10479    }
10480
10481    /// Sets the value of [description][crate::model::NetworkPeering::description].
10482    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10483        self.description = v.into();
10484        self
10485    }
10486}
10487
10488impl wkt::message::Message for NetworkPeering {
10489    fn typename() -> &'static str {
10490        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPeering"
10491    }
10492}
10493
10494/// Defines additional types related to [NetworkPeering].
10495pub mod network_peering {
10496    #[allow(unused_imports)]
10497    use super::*;
10498
10499    /// Possible states of a network peering.
10500    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10501    pub struct State(i32);
10502
10503    impl State {
10504        /// Unspecified network peering state. This is the default value.
10505        pub const STATE_UNSPECIFIED: State = State::new(0);
10506
10507        /// The peering is not active.
10508        pub const INACTIVE: State = State::new(1);
10509
10510        /// The peering is active.
10511        pub const ACTIVE: State = State::new(2);
10512
10513        /// The peering is being created.
10514        pub const CREATING: State = State::new(3);
10515
10516        /// The peering is being deleted.
10517        pub const DELETING: State = State::new(4);
10518
10519        /// Creates a new State instance.
10520        pub(crate) const fn new(value: i32) -> Self {
10521            Self(value)
10522        }
10523
10524        /// Gets the enum value.
10525        pub fn value(&self) -> i32 {
10526            self.0
10527        }
10528
10529        /// Gets the enum value as a string.
10530        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10531            match self.0 {
10532                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
10533                1 => std::borrow::Cow::Borrowed("INACTIVE"),
10534                2 => std::borrow::Cow::Borrowed("ACTIVE"),
10535                3 => std::borrow::Cow::Borrowed("CREATING"),
10536                4 => std::borrow::Cow::Borrowed("DELETING"),
10537                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10538            }
10539        }
10540
10541        /// Creates an enum value from the value name.
10542        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10543            match name {
10544                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
10545                "INACTIVE" => std::option::Option::Some(Self::INACTIVE),
10546                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
10547                "CREATING" => std::option::Option::Some(Self::CREATING),
10548                "DELETING" => std::option::Option::Some(Self::DELETING),
10549                _ => std::option::Option::None,
10550            }
10551        }
10552    }
10553
10554    impl std::convert::From<i32> for State {
10555        fn from(value: i32) -> Self {
10556            Self::new(value)
10557        }
10558    }
10559
10560    impl std::default::Default for State {
10561        fn default() -> Self {
10562            Self::new(0)
10563        }
10564    }
10565
10566    /// Type or purpose of the network peering connection.
10567    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10568    pub struct PeerNetworkType(i32);
10569
10570    impl PeerNetworkType {
10571        /// Unspecified
10572        pub const PEER_NETWORK_TYPE_UNSPECIFIED: PeerNetworkType = PeerNetworkType::new(0);
10573
10574        /// Peering connection used for connecting to another VPC network established
10575        /// by the same user. For example, a peering connection to another VPC
10576        /// network in the same project or to an on-premises network.
10577        pub const STANDARD: PeerNetworkType = PeerNetworkType::new(1);
10578
10579        /// Peering connection used for connecting to another VMware Engine network.
10580        pub const VMWARE_ENGINE_NETWORK: PeerNetworkType = PeerNetworkType::new(2);
10581
10582        /// Peering connection used for establishing [private services
10583        /// access](https://cloud.google.com/vpc/docs/private-services-access).
10584        pub const PRIVATE_SERVICES_ACCESS: PeerNetworkType = PeerNetworkType::new(3);
10585
10586        /// Peering connection used for connecting to NetApp Cloud Volumes.
10587        pub const NETAPP_CLOUD_VOLUMES: PeerNetworkType = PeerNetworkType::new(4);
10588
10589        /// Peering connection used for connecting to third-party services. Most
10590        /// third-party services require manual setup of reverse peering on the VPC
10591        /// network associated with the third-party service.
10592        pub const THIRD_PARTY_SERVICE: PeerNetworkType = PeerNetworkType::new(5);
10593
10594        /// Peering connection used for connecting to Dell PowerScale Filers
10595        pub const DELL_POWERSCALE: PeerNetworkType = PeerNetworkType::new(6);
10596
10597        /// Peering connection used for connecting to Google Cloud NetApp Volumes.
10598        pub const GOOGLE_CLOUD_NETAPP_VOLUMES: PeerNetworkType = PeerNetworkType::new(7);
10599
10600        /// Creates a new PeerNetworkType instance.
10601        pub(crate) const fn new(value: i32) -> Self {
10602            Self(value)
10603        }
10604
10605        /// Gets the enum value.
10606        pub fn value(&self) -> i32 {
10607            self.0
10608        }
10609
10610        /// Gets the enum value as a string.
10611        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10612            match self.0 {
10613                0 => std::borrow::Cow::Borrowed("PEER_NETWORK_TYPE_UNSPECIFIED"),
10614                1 => std::borrow::Cow::Borrowed("STANDARD"),
10615                2 => std::borrow::Cow::Borrowed("VMWARE_ENGINE_NETWORK"),
10616                3 => std::borrow::Cow::Borrowed("PRIVATE_SERVICES_ACCESS"),
10617                4 => std::borrow::Cow::Borrowed("NETAPP_CLOUD_VOLUMES"),
10618                5 => std::borrow::Cow::Borrowed("THIRD_PARTY_SERVICE"),
10619                6 => std::borrow::Cow::Borrowed("DELL_POWERSCALE"),
10620                7 => std::borrow::Cow::Borrowed("GOOGLE_CLOUD_NETAPP_VOLUMES"),
10621                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10622            }
10623        }
10624
10625        /// Creates an enum value from the value name.
10626        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10627            match name {
10628                "PEER_NETWORK_TYPE_UNSPECIFIED" => {
10629                    std::option::Option::Some(Self::PEER_NETWORK_TYPE_UNSPECIFIED)
10630                }
10631                "STANDARD" => std::option::Option::Some(Self::STANDARD),
10632                "VMWARE_ENGINE_NETWORK" => std::option::Option::Some(Self::VMWARE_ENGINE_NETWORK),
10633                "PRIVATE_SERVICES_ACCESS" => {
10634                    std::option::Option::Some(Self::PRIVATE_SERVICES_ACCESS)
10635                }
10636                "NETAPP_CLOUD_VOLUMES" => std::option::Option::Some(Self::NETAPP_CLOUD_VOLUMES),
10637                "THIRD_PARTY_SERVICE" => std::option::Option::Some(Self::THIRD_PARTY_SERVICE),
10638                "DELL_POWERSCALE" => std::option::Option::Some(Self::DELL_POWERSCALE),
10639                "GOOGLE_CLOUD_NETAPP_VOLUMES" => {
10640                    std::option::Option::Some(Self::GOOGLE_CLOUD_NETAPP_VOLUMES)
10641                }
10642                _ => std::option::Option::None,
10643            }
10644        }
10645    }
10646
10647    impl std::convert::From<i32> for PeerNetworkType {
10648        fn from(value: i32) -> Self {
10649            Self::new(value)
10650        }
10651    }
10652
10653    impl std::default::Default for PeerNetworkType {
10654        fn default() -> Self {
10655            Self::new(0)
10656        }
10657    }
10658}
10659
10660/// Exchanged network peering route.
10661#[serde_with::serde_as]
10662#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10663#[serde(default, rename_all = "camelCase")]
10664#[non_exhaustive]
10665pub struct PeeringRoute {
10666    /// Output only. Destination range of the peering route in CIDR notation.
10667    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10668    pub dest_range: std::string::String,
10669
10670    /// Output only. Type of the route in the peer VPC network.
10671    #[serde(rename = "type")]
10672    pub r#type: crate::model::peering_route::Type,
10673
10674    /// Output only. Region containing the next hop of the peering route. This
10675    /// field only applies to dynamic routes in the peer VPC network.
10676    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10677    pub next_hop_region: std::string::String,
10678
10679    /// Output only. The priority of the peering route.
10680    #[serde_as(as = "serde_with::DisplayFromStr")]
10681    pub priority: i64,
10682
10683    /// Output only. True if the peering route has been imported from a peered
10684    /// VPC network; false otherwise. The import happens if the field
10685    /// `NetworkPeering.importCustomRoutes` is true for this network,
10686    /// `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and
10687    /// the import does not result in a route conflict.
10688    pub imported: bool,
10689
10690    /// Output only. Direction of the routes exchanged with the peer network, from
10691    /// the VMware Engine network perspective:
10692    ///
10693    /// * Routes of direction `INCOMING` are imported from the peer network.
10694    /// * Routes of direction `OUTGOING` are exported from the intranet VPC network
10695    ///   of the VMware Engine network.
10696    pub direction: crate::model::peering_route::Direction,
10697
10698    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10699    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10700}
10701
10702impl PeeringRoute {
10703    pub fn new() -> Self {
10704        std::default::Default::default()
10705    }
10706
10707    /// Sets the value of [dest_range][crate::model::PeeringRoute::dest_range].
10708    pub fn set_dest_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10709        self.dest_range = v.into();
10710        self
10711    }
10712
10713    /// Sets the value of [r#type][crate::model::PeeringRoute::type].
10714    pub fn set_type<T: std::convert::Into<crate::model::peering_route::Type>>(
10715        mut self,
10716        v: T,
10717    ) -> Self {
10718        self.r#type = v.into();
10719        self
10720    }
10721
10722    /// Sets the value of [next_hop_region][crate::model::PeeringRoute::next_hop_region].
10723    pub fn set_next_hop_region<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10724        self.next_hop_region = v.into();
10725        self
10726    }
10727
10728    /// Sets the value of [priority][crate::model::PeeringRoute::priority].
10729    pub fn set_priority<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
10730        self.priority = v.into();
10731        self
10732    }
10733
10734    /// Sets the value of [imported][crate::model::PeeringRoute::imported].
10735    pub fn set_imported<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
10736        self.imported = v.into();
10737        self
10738    }
10739
10740    /// Sets the value of [direction][crate::model::PeeringRoute::direction].
10741    pub fn set_direction<T: std::convert::Into<crate::model::peering_route::Direction>>(
10742        mut self,
10743        v: T,
10744    ) -> Self {
10745        self.direction = v.into();
10746        self
10747    }
10748}
10749
10750impl wkt::message::Message for PeeringRoute {
10751    fn typename() -> &'static str {
10752        "type.googleapis.com/google.cloud.vmwareengine.v1.PeeringRoute"
10753    }
10754}
10755
10756/// Defines additional types related to [PeeringRoute].
10757pub mod peering_route {
10758    #[allow(unused_imports)]
10759    use super::*;
10760
10761    /// The type of the peering route.
10762    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10763    pub struct Type(i32);
10764
10765    impl Type {
10766        /// Unspecified peering route type. This is the default value.
10767        pub const TYPE_UNSPECIFIED: Type = Type::new(0);
10768
10769        /// Dynamic routes in the peer network.
10770        pub const DYNAMIC_PEERING_ROUTE: Type = Type::new(1);
10771
10772        /// Static routes in the peer network.
10773        pub const STATIC_PEERING_ROUTE: Type = Type::new(2);
10774
10775        /// Created, updated, and removed automatically by Google Cloud when subnets
10776        /// are created, modified, or deleted in the peer network.
10777        pub const SUBNET_PEERING_ROUTE: Type = Type::new(3);
10778
10779        /// Creates a new Type instance.
10780        pub(crate) const fn new(value: i32) -> Self {
10781            Self(value)
10782        }
10783
10784        /// Gets the enum value.
10785        pub fn value(&self) -> i32 {
10786            self.0
10787        }
10788
10789        /// Gets the enum value as a string.
10790        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10791            match self.0 {
10792                0 => std::borrow::Cow::Borrowed("TYPE_UNSPECIFIED"),
10793                1 => std::borrow::Cow::Borrowed("DYNAMIC_PEERING_ROUTE"),
10794                2 => std::borrow::Cow::Borrowed("STATIC_PEERING_ROUTE"),
10795                3 => std::borrow::Cow::Borrowed("SUBNET_PEERING_ROUTE"),
10796                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10797            }
10798        }
10799
10800        /// Creates an enum value from the value name.
10801        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10802            match name {
10803                "TYPE_UNSPECIFIED" => std::option::Option::Some(Self::TYPE_UNSPECIFIED),
10804                "DYNAMIC_PEERING_ROUTE" => std::option::Option::Some(Self::DYNAMIC_PEERING_ROUTE),
10805                "STATIC_PEERING_ROUTE" => std::option::Option::Some(Self::STATIC_PEERING_ROUTE),
10806                "SUBNET_PEERING_ROUTE" => std::option::Option::Some(Self::SUBNET_PEERING_ROUTE),
10807                _ => std::option::Option::None,
10808            }
10809        }
10810    }
10811
10812    impl std::convert::From<i32> for Type {
10813        fn from(value: i32) -> Self {
10814            Self::new(value)
10815        }
10816    }
10817
10818    impl std::default::Default for Type {
10819        fn default() -> Self {
10820            Self::new(0)
10821        }
10822    }
10823
10824    /// The direction of the exchanged routes.
10825    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
10826    pub struct Direction(i32);
10827
10828    impl Direction {
10829        /// Unspecified exchanged routes direction. This is default.
10830        pub const DIRECTION_UNSPECIFIED: Direction = Direction::new(0);
10831
10832        /// Routes imported from the peer network.
10833        pub const INCOMING: Direction = Direction::new(1);
10834
10835        /// Routes exported to the peer network.
10836        pub const OUTGOING: Direction = Direction::new(2);
10837
10838        /// Creates a new Direction instance.
10839        pub(crate) const fn new(value: i32) -> Self {
10840            Self(value)
10841        }
10842
10843        /// Gets the enum value.
10844        pub fn value(&self) -> i32 {
10845            self.0
10846        }
10847
10848        /// Gets the enum value as a string.
10849        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
10850            match self.0 {
10851                0 => std::borrow::Cow::Borrowed("DIRECTION_UNSPECIFIED"),
10852                1 => std::borrow::Cow::Borrowed("INCOMING"),
10853                2 => std::borrow::Cow::Borrowed("OUTGOING"),
10854                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
10855            }
10856        }
10857
10858        /// Creates an enum value from the value name.
10859        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
10860            match name {
10861                "DIRECTION_UNSPECIFIED" => std::option::Option::Some(Self::DIRECTION_UNSPECIFIED),
10862                "INCOMING" => std::option::Option::Some(Self::INCOMING),
10863                "OUTGOING" => std::option::Option::Some(Self::OUTGOING),
10864                _ => std::option::Option::None,
10865            }
10866        }
10867    }
10868
10869    impl std::convert::From<i32> for Direction {
10870        fn from(value: i32) -> Self {
10871            Self::new(value)
10872        }
10873    }
10874
10875    impl std::default::Default for Direction {
10876        fn default() -> Self {
10877            Self::new(0)
10878        }
10879    }
10880}
10881
10882/// Represents a network policy resource. Network policies are regional
10883/// resources. You can use a network policy to enable or disable internet access
10884/// and external IP access. Network policies are associated with a VMware Engine
10885/// network, which might span across regions. For a given region, a network
10886/// policy applies to all private clouds in the VMware Engine network associated
10887/// with the policy.
10888#[serde_with::serde_as]
10889#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
10890#[serde(default, rename_all = "camelCase")]
10891#[non_exhaustive]
10892pub struct NetworkPolicy {
10893    /// Output only. The resource name of this network policy.
10894    /// Resource names are schemeless URIs that follow the conventions in
10895    /// <https://cloud.google.com/apis/design/resource_names>.
10896    /// For example:
10897    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
10898    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10899    pub name: std::string::String,
10900
10901    /// Output only. Creation time of this resource.
10902    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10903    pub create_time: std::option::Option<wkt::Timestamp>,
10904
10905    /// Output only. Last update time of this resource.
10906    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10907    pub update_time: std::option::Option<wkt::Timestamp>,
10908
10909    /// Network service that allows VMware workloads to access the internet.
10910    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10911    pub internet_access: std::option::Option<crate::model::network_policy::NetworkService>,
10912
10913    /// Network service that allows External IP addresses to be assigned to VMware
10914    /// workloads. This service can only be enabled when `internet_access` is also
10915    /// enabled.
10916    #[serde(skip_serializing_if = "std::option::Option::is_none")]
10917    pub external_ip: std::option::Option<crate::model::network_policy::NetworkService>,
10918
10919    /// Required. IP address range in CIDR notation used to create internet access
10920    /// and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is
10921    /// required. The range cannot overlap with any prefixes either in the consumer
10922    /// VPC network or in use by the private clouds attached to that VPC network.
10923    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10924    pub edge_services_cidr: std::string::String,
10925
10926    /// Output only. System-generated unique identifier for the resource.
10927    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10928    pub uid: std::string::String,
10929
10930    /// Optional. The relative resource name of the VMware Engine network.
10931    /// Specify the name in the following form:
10932    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
10933    /// where `{project}` can either be a project number or a project ID.
10934    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10935    pub vmware_engine_network: std::string::String,
10936
10937    /// Optional. User-provided description for this network policy.
10938    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10939    pub description: std::string::String,
10940
10941    /// Output only. The canonical name of the VMware Engine network in the form:
10942    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
10943    #[serde(skip_serializing_if = "std::string::String::is_empty")]
10944    pub vmware_engine_network_canonical: std::string::String,
10945
10946    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
10947    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10948}
10949
10950impl NetworkPolicy {
10951    pub fn new() -> Self {
10952        std::default::Default::default()
10953    }
10954
10955    /// Sets the value of [name][crate::model::NetworkPolicy::name].
10956    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10957        self.name = v.into();
10958        self
10959    }
10960
10961    /// Sets the value of [create_time][crate::model::NetworkPolicy::create_time].
10962    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10963        mut self,
10964        v: T,
10965    ) -> Self {
10966        self.create_time = v.into();
10967        self
10968    }
10969
10970    /// Sets the value of [update_time][crate::model::NetworkPolicy::update_time].
10971    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
10972        mut self,
10973        v: T,
10974    ) -> Self {
10975        self.update_time = v.into();
10976        self
10977    }
10978
10979    /// Sets the value of [internet_access][crate::model::NetworkPolicy::internet_access].
10980    pub fn set_internet_access<
10981        T: std::convert::Into<std::option::Option<crate::model::network_policy::NetworkService>>,
10982    >(
10983        mut self,
10984        v: T,
10985    ) -> Self {
10986        self.internet_access = v.into();
10987        self
10988    }
10989
10990    /// Sets the value of [external_ip][crate::model::NetworkPolicy::external_ip].
10991    pub fn set_external_ip<
10992        T: std::convert::Into<std::option::Option<crate::model::network_policy::NetworkService>>,
10993    >(
10994        mut self,
10995        v: T,
10996    ) -> Self {
10997        self.external_ip = v.into();
10998        self
10999    }
11000
11001    /// Sets the value of [edge_services_cidr][crate::model::NetworkPolicy::edge_services_cidr].
11002    pub fn set_edge_services_cidr<T: std::convert::Into<std::string::String>>(
11003        mut self,
11004        v: T,
11005    ) -> Self {
11006        self.edge_services_cidr = v.into();
11007        self
11008    }
11009
11010    /// Sets the value of [uid][crate::model::NetworkPolicy::uid].
11011    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11012        self.uid = v.into();
11013        self
11014    }
11015
11016    /// Sets the value of [vmware_engine_network][crate::model::NetworkPolicy::vmware_engine_network].
11017    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
11018        mut self,
11019        v: T,
11020    ) -> Self {
11021        self.vmware_engine_network = v.into();
11022        self
11023    }
11024
11025    /// Sets the value of [description][crate::model::NetworkPolicy::description].
11026    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11027        self.description = v.into();
11028        self
11029    }
11030
11031    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkPolicy::vmware_engine_network_canonical].
11032    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
11033        mut self,
11034        v: T,
11035    ) -> Self {
11036        self.vmware_engine_network_canonical = v.into();
11037        self
11038    }
11039}
11040
11041impl wkt::message::Message for NetworkPolicy {
11042    fn typename() -> &'static str {
11043        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy"
11044    }
11045}
11046
11047/// Defines additional types related to [NetworkPolicy].
11048pub mod network_policy {
11049    #[allow(unused_imports)]
11050    use super::*;
11051
11052    /// Represents a network service that is managed by a `NetworkPolicy` resource.
11053    /// A network service provides a way to control an aspect of external access to
11054    /// VMware workloads. For example, whether the VMware workloads in the
11055    /// private clouds governed by a network policy can access or be accessed from
11056    /// the internet.
11057    #[serde_with::serde_as]
11058    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11059    #[serde(default, rename_all = "camelCase")]
11060    #[non_exhaustive]
11061    pub struct NetworkService {
11062        /// True if the service is enabled; false otherwise.
11063        pub enabled: bool,
11064
11065        /// Output only. State of the service. New values may be added to this enum
11066        /// when appropriate.
11067        pub state: crate::model::network_policy::network_service::State,
11068
11069        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11070        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11071    }
11072
11073    impl NetworkService {
11074        pub fn new() -> Self {
11075            std::default::Default::default()
11076        }
11077
11078        /// Sets the value of [enabled][crate::model::network_policy::NetworkService::enabled].
11079        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
11080            self.enabled = v.into();
11081            self
11082        }
11083
11084        /// Sets the value of [state][crate::model::network_policy::NetworkService::state].
11085        pub fn set_state<
11086            T: std::convert::Into<crate::model::network_policy::network_service::State>,
11087        >(
11088            mut self,
11089            v: T,
11090        ) -> Self {
11091            self.state = v.into();
11092            self
11093        }
11094    }
11095
11096    impl wkt::message::Message for NetworkService {
11097        fn typename() -> &'static str {
11098            "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService"
11099        }
11100    }
11101
11102    /// Defines additional types related to [NetworkService].
11103    pub mod network_service {
11104        #[allow(unused_imports)]
11105        use super::*;
11106
11107        /// Enum State defines possible states of a network policy controlled
11108        /// service.
11109        #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11110        pub struct State(i32);
11111
11112        impl State {
11113            /// Unspecified service state. This is the default value.
11114            pub const STATE_UNSPECIFIED: State = State::new(0);
11115
11116            /// Service is not provisioned.
11117            pub const UNPROVISIONED: State = State::new(1);
11118
11119            /// Service is in the process of being provisioned/deprovisioned.
11120            pub const RECONCILING: State = State::new(2);
11121
11122            /// Service is active.
11123            pub const ACTIVE: State = State::new(3);
11124
11125            /// Creates a new State instance.
11126            pub(crate) const fn new(value: i32) -> Self {
11127                Self(value)
11128            }
11129
11130            /// Gets the enum value.
11131            pub fn value(&self) -> i32 {
11132                self.0
11133            }
11134
11135            /// Gets the enum value as a string.
11136            pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
11137                match self.0 {
11138                    0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
11139                    1 => std::borrow::Cow::Borrowed("UNPROVISIONED"),
11140                    2 => std::borrow::Cow::Borrowed("RECONCILING"),
11141                    3 => std::borrow::Cow::Borrowed("ACTIVE"),
11142                    _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
11143                }
11144            }
11145
11146            /// Creates an enum value from the value name.
11147            pub fn from_str_name(name: &str) -> std::option::Option<Self> {
11148                match name {
11149                    "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
11150                    "UNPROVISIONED" => std::option::Option::Some(Self::UNPROVISIONED),
11151                    "RECONCILING" => std::option::Option::Some(Self::RECONCILING),
11152                    "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
11153                    _ => std::option::Option::None,
11154                }
11155            }
11156        }
11157
11158        impl std::convert::From<i32> for State {
11159            fn from(value: i32) -> Self {
11160                Self::new(value)
11161            }
11162        }
11163
11164        impl std::default::Default for State {
11165            fn default() -> Self {
11166                Self::new(0)
11167            }
11168        }
11169    }
11170}
11171
11172/// Represents a binding between a network and the management DNS zone.
11173/// A management DNS zone is the Cloud DNS cross-project binding zone that
11174/// VMware Engine creates for each private cloud. It contains FQDNs and
11175/// corresponding IP addresses for the private cloud's ESXi hosts and management
11176/// VM appliances like vCenter and NSX Manager.
11177#[serde_with::serde_as]
11178#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11179#[serde(default, rename_all = "camelCase")]
11180#[non_exhaustive]
11181pub struct ManagementDnsZoneBinding {
11182    /// Output only. The resource name of this binding.
11183    /// Resource names are schemeless URIs that follow the conventions in
11184    /// <https://cloud.google.com/apis/design/resource_names>.
11185    /// For example:
11186    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
11187    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11188    pub name: std::string::String,
11189
11190    /// Output only. Creation time of this resource.
11191    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11192    pub create_time: std::option::Option<wkt::Timestamp>,
11193
11194    /// Output only. Last update time of this resource.
11195    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11196    pub update_time: std::option::Option<wkt::Timestamp>,
11197
11198    /// Output only. The state of the resource.
11199    pub state: crate::model::management_dns_zone_binding::State,
11200
11201    /// User-provided description for this resource.
11202    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11203    pub description: std::string::String,
11204
11205    /// Output only. System-generated unique identifier for the resource.
11206    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11207    pub uid: std::string::String,
11208
11209    /// Required. The relative resource name of the network to bind to the
11210    /// management DNS zone. This network can be a consumer VPC network or a
11211    /// VMware engine network.
11212    #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
11213    pub bind_network: std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
11214
11215    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11216    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11217}
11218
11219impl ManagementDnsZoneBinding {
11220    pub fn new() -> Self {
11221        std::default::Default::default()
11222    }
11223
11224    /// Sets the value of [name][crate::model::ManagementDnsZoneBinding::name].
11225    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11226        self.name = v.into();
11227        self
11228    }
11229
11230    /// Sets the value of [create_time][crate::model::ManagementDnsZoneBinding::create_time].
11231    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11232        mut self,
11233        v: T,
11234    ) -> Self {
11235        self.create_time = v.into();
11236        self
11237    }
11238
11239    /// Sets the value of [update_time][crate::model::ManagementDnsZoneBinding::update_time].
11240    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11241        mut self,
11242        v: T,
11243    ) -> Self {
11244        self.update_time = v.into();
11245        self
11246    }
11247
11248    /// Sets the value of [state][crate::model::ManagementDnsZoneBinding::state].
11249    pub fn set_state<T: std::convert::Into<crate::model::management_dns_zone_binding::State>>(
11250        mut self,
11251        v: T,
11252    ) -> Self {
11253        self.state = v.into();
11254        self
11255    }
11256
11257    /// Sets the value of [description][crate::model::ManagementDnsZoneBinding::description].
11258    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11259        self.description = v.into();
11260        self
11261    }
11262
11263    /// Sets the value of [uid][crate::model::ManagementDnsZoneBinding::uid].
11264    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11265        self.uid = v.into();
11266        self
11267    }
11268
11269    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network].
11270    ///
11271    /// Note that all the setters affecting `bind_network` are mutually
11272    /// exclusive.
11273    pub fn set_bind_network<
11274        T: std::convert::Into<
11275                std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
11276            >,
11277    >(
11278        mut self,
11279        v: T,
11280    ) -> Self {
11281        self.bind_network = v.into();
11282        self
11283    }
11284
11285    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
11286    /// if it holds a `VpcNetwork`, `None` if the field is not set or
11287    /// holds a different branch.
11288    pub fn vpc_network(&self) -> std::option::Option<&std::string::String> {
11289        #[allow(unreachable_patterns)]
11290        self.bind_network.as_ref().and_then(|v| match v {
11291            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v) => {
11292                std::option::Option::Some(v)
11293            }
11294            _ => std::option::Option::None,
11295        })
11296    }
11297
11298    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
11299    /// if it holds a `VmwareEngineNetwork`, `None` if the field is not set or
11300    /// holds a different branch.
11301    pub fn vmware_engine_network(&self) -> std::option::Option<&std::string::String> {
11302        #[allow(unreachable_patterns)]
11303        self.bind_network.as_ref().and_then(|v| match v {
11304            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v) => {
11305                std::option::Option::Some(v)
11306            }
11307            _ => std::option::Option::None,
11308        })
11309    }
11310
11311    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
11312    /// to hold a `VpcNetwork`.
11313    ///
11314    /// Note that all the setters affecting `bind_network` are
11315    /// mutually exclusive.
11316    pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11317        self.bind_network = std::option::Option::Some(
11318            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v.into()),
11319        );
11320        self
11321    }
11322
11323    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
11324    /// to hold a `VmwareEngineNetwork`.
11325    ///
11326    /// Note that all the setters affecting `bind_network` are
11327    /// mutually exclusive.
11328    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
11329        mut self,
11330        v: T,
11331    ) -> Self {
11332        self.bind_network = std::option::Option::Some(
11333            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v.into()),
11334        );
11335        self
11336    }
11337}
11338
11339impl wkt::message::Message for ManagementDnsZoneBinding {
11340    fn typename() -> &'static str {
11341        "type.googleapis.com/google.cloud.vmwareengine.v1.ManagementDnsZoneBinding"
11342    }
11343}
11344
11345/// Defines additional types related to [ManagementDnsZoneBinding].
11346pub mod management_dns_zone_binding {
11347    #[allow(unused_imports)]
11348    use super::*;
11349
11350    /// Enum State defines possible states of binding between the consumer VPC
11351    /// network and the management DNS zone.
11352    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11353    pub struct State(i32);
11354
11355    impl State {
11356        /// The default value. This value should never be used.
11357        pub const STATE_UNSPECIFIED: State = State::new(0);
11358
11359        /// The binding is ready.
11360        pub const ACTIVE: State = State::new(1);
11361
11362        /// The binding is being created.
11363        pub const CREATING: State = State::new(2);
11364
11365        /// The binding is being updated.
11366        pub const UPDATING: State = State::new(3);
11367
11368        /// The binding is being deleted.
11369        pub const DELETING: State = State::new(4);
11370
11371        /// The binding has failed.
11372        pub const FAILED: State = State::new(5);
11373
11374        /// Creates a new State instance.
11375        pub(crate) const fn new(value: i32) -> Self {
11376            Self(value)
11377        }
11378
11379        /// Gets the enum value.
11380        pub fn value(&self) -> i32 {
11381            self.0
11382        }
11383
11384        /// Gets the enum value as a string.
11385        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
11386            match self.0 {
11387                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
11388                1 => std::borrow::Cow::Borrowed("ACTIVE"),
11389                2 => std::borrow::Cow::Borrowed("CREATING"),
11390                3 => std::borrow::Cow::Borrowed("UPDATING"),
11391                4 => std::borrow::Cow::Borrowed("DELETING"),
11392                5 => std::borrow::Cow::Borrowed("FAILED"),
11393                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
11394            }
11395        }
11396
11397        /// Creates an enum value from the value name.
11398        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
11399            match name {
11400                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
11401                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
11402                "CREATING" => std::option::Option::Some(Self::CREATING),
11403                "UPDATING" => std::option::Option::Some(Self::UPDATING),
11404                "DELETING" => std::option::Option::Some(Self::DELETING),
11405                "FAILED" => std::option::Option::Some(Self::FAILED),
11406                _ => std::option::Option::None,
11407            }
11408        }
11409    }
11410
11411    impl std::convert::From<i32> for State {
11412        fn from(value: i32) -> Self {
11413            Self::new(value)
11414        }
11415    }
11416
11417    impl std::default::Default for State {
11418        fn default() -> Self {
11419            Self::new(0)
11420        }
11421    }
11422
11423    /// Required. The relative resource name of the network to bind to the
11424    /// management DNS zone. This network can be a consumer VPC network or a
11425    /// VMware engine network.
11426    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11427    #[serde(rename_all = "camelCase")]
11428    #[non_exhaustive]
11429    pub enum BindNetwork {
11430        /// Network to bind is a standard consumer VPC.
11431        /// Specify the name in the following form for consumer
11432        /// VPC network: `projects/{project}/global/networks/{network_id}`.
11433        /// `{project}` can either be a project number or a project ID.
11434        VpcNetwork(std::string::String),
11435        /// Network to bind is a VMware Engine network.
11436        /// Specify the name in the following form for VMware engine network:
11437        /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
11438        /// `{project}` can either be a project number or a project ID.
11439        VmwareEngineNetwork(std::string::String),
11440    }
11441}
11442
11443/// VMware Engine network resource that provides connectivity for VMware Engine
11444/// private clouds.
11445#[serde_with::serde_as]
11446#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11447#[serde(default, rename_all = "camelCase")]
11448#[non_exhaustive]
11449pub struct VmwareEngineNetwork {
11450    /// Output only. The resource name of the VMware Engine network.
11451    /// Resource names are schemeless URIs that follow the conventions in
11452    /// <https://cloud.google.com/apis/design/resource_names>.
11453    /// For example:
11454    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
11455    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11456    pub name: std::string::String,
11457
11458    /// Output only. Creation time of this resource.
11459    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11460    pub create_time: std::option::Option<wkt::Timestamp>,
11461
11462    /// Output only. Last update time of this resource.
11463    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11464    pub update_time: std::option::Option<wkt::Timestamp>,
11465
11466    /// User-provided description for this VMware Engine network.
11467    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11468    pub description: std::string::String,
11469
11470    /// Output only. VMware Engine service VPC networks that provide connectivity
11471    /// from a private cloud to customer projects, the internet, and other Google
11472    /// Cloud services.
11473    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
11474    pub vpc_networks: std::vec::Vec<crate::model::vmware_engine_network::VpcNetwork>,
11475
11476    /// Output only. State of the VMware Engine network.
11477    pub state: crate::model::vmware_engine_network::State,
11478
11479    /// Required. VMware Engine network type.
11480    #[serde(rename = "type")]
11481    pub r#type: crate::model::vmware_engine_network::Type,
11482
11483    /// Output only. System-generated unique identifier for the resource.
11484    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11485    pub uid: std::string::String,
11486
11487    /// Checksum that may be sent on update and delete requests to ensure that the
11488    /// user-provided value is up to date before the server processes a request.
11489    /// The server computes checksums based on the value of other fields in the
11490    /// request.
11491    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11492    pub etag: std::string::String,
11493
11494    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11495    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11496}
11497
11498impl VmwareEngineNetwork {
11499    pub fn new() -> Self {
11500        std::default::Default::default()
11501    }
11502
11503    /// Sets the value of [name][crate::model::VmwareEngineNetwork::name].
11504    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11505        self.name = v.into();
11506        self
11507    }
11508
11509    /// Sets the value of [create_time][crate::model::VmwareEngineNetwork::create_time].
11510    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11511        mut self,
11512        v: T,
11513    ) -> Self {
11514        self.create_time = v.into();
11515        self
11516    }
11517
11518    /// Sets the value of [update_time][crate::model::VmwareEngineNetwork::update_time].
11519    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11520        mut self,
11521        v: T,
11522    ) -> Self {
11523        self.update_time = v.into();
11524        self
11525    }
11526
11527    /// Sets the value of [description][crate::model::VmwareEngineNetwork::description].
11528    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11529        self.description = v.into();
11530        self
11531    }
11532
11533    /// Sets the value of [state][crate::model::VmwareEngineNetwork::state].
11534    pub fn set_state<T: std::convert::Into<crate::model::vmware_engine_network::State>>(
11535        mut self,
11536        v: T,
11537    ) -> Self {
11538        self.state = v.into();
11539        self
11540    }
11541
11542    /// Sets the value of [r#type][crate::model::VmwareEngineNetwork::type].
11543    pub fn set_type<T: std::convert::Into<crate::model::vmware_engine_network::Type>>(
11544        mut self,
11545        v: T,
11546    ) -> Self {
11547        self.r#type = v.into();
11548        self
11549    }
11550
11551    /// Sets the value of [uid][crate::model::VmwareEngineNetwork::uid].
11552    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11553        self.uid = v.into();
11554        self
11555    }
11556
11557    /// Sets the value of [etag][crate::model::VmwareEngineNetwork::etag].
11558    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11559        self.etag = v.into();
11560        self
11561    }
11562
11563    /// Sets the value of [vpc_networks][crate::model::VmwareEngineNetwork::vpc_networks].
11564    pub fn set_vpc_networks<T, V>(mut self, v: T) -> Self
11565    where
11566        T: std::iter::IntoIterator<Item = V>,
11567        V: std::convert::Into<crate::model::vmware_engine_network::VpcNetwork>,
11568    {
11569        use std::iter::Iterator;
11570        self.vpc_networks = v.into_iter().map(|i| i.into()).collect();
11571        self
11572    }
11573}
11574
11575impl wkt::message::Message for VmwareEngineNetwork {
11576    fn typename() -> &'static str {
11577        "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork"
11578    }
11579}
11580
11581/// Defines additional types related to [VmwareEngineNetwork].
11582pub mod vmware_engine_network {
11583    #[allow(unused_imports)]
11584    use super::*;
11585
11586    /// Represents a VMware Engine VPC network that is managed by a
11587    /// VMware Engine network resource.
11588    #[serde_with::serde_as]
11589    #[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11590    #[serde(default, rename_all = "camelCase")]
11591    #[non_exhaustive]
11592    pub struct VpcNetwork {
11593        /// Output only. Type of VPC network (INTRANET, INTERNET, or
11594        /// GOOGLE_CLOUD)
11595        #[serde(rename = "type")]
11596        pub r#type: crate::model::vmware_engine_network::vpc_network::Type,
11597
11598        /// Output only. The relative resource name of the service VPC network this
11599        /// VMware Engine network is attached to. For example:
11600        /// `projects/123123/global/networks/my-network`
11601        #[serde(skip_serializing_if = "std::string::String::is_empty")]
11602        pub network: std::string::String,
11603
11604        #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11605        _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11606    }
11607
11608    impl VpcNetwork {
11609        pub fn new() -> Self {
11610            std::default::Default::default()
11611        }
11612
11613        /// Sets the value of [r#type][crate::model::vmware_engine_network::VpcNetwork::type].
11614        pub fn set_type<
11615            T: std::convert::Into<crate::model::vmware_engine_network::vpc_network::Type>,
11616        >(
11617            mut self,
11618            v: T,
11619        ) -> Self {
11620            self.r#type = v.into();
11621            self
11622        }
11623
11624        /// Sets the value of [network][crate::model::vmware_engine_network::VpcNetwork::network].
11625        pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11626            self.network = v.into();
11627            self
11628        }
11629    }
11630
11631    impl wkt::message::Message for VpcNetwork {
11632        fn typename() -> &'static str {
11633            "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork"
11634        }
11635    }
11636
11637    /// Defines additional types related to [VpcNetwork].
11638    pub mod vpc_network {
11639        #[allow(unused_imports)]
11640        use super::*;
11641
11642        /// Enum Type defines possible types of a VMware Engine network controlled
11643        /// service.
11644        #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11645        pub struct Type(i32);
11646
11647        impl Type {
11648            /// The default value. This value should never be used.
11649            pub const TYPE_UNSPECIFIED: Type = Type::new(0);
11650
11651            /// VPC network that will be peered with a consumer VPC network or the
11652            /// intranet VPC of another VMware Engine network. Access a private cloud
11653            /// through Compute Engine VMs on a peered VPC network or an on-premises
11654            /// resource connected to a peered consumer VPC network.
11655            pub const INTRANET: Type = Type::new(1);
11656
11657            /// VPC network used for internet access to and from a private cloud.
11658            pub const INTERNET: Type = Type::new(2);
11659
11660            /// VPC network used for access to Google Cloud services like
11661            /// Cloud Storage.
11662            pub const GOOGLE_CLOUD: Type = Type::new(3);
11663
11664            /// Creates a new Type instance.
11665            pub(crate) const fn new(value: i32) -> Self {
11666                Self(value)
11667            }
11668
11669            /// Gets the enum value.
11670            pub fn value(&self) -> i32 {
11671                self.0
11672            }
11673
11674            /// Gets the enum value as a string.
11675            pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
11676                match self.0 {
11677                    0 => std::borrow::Cow::Borrowed("TYPE_UNSPECIFIED"),
11678                    1 => std::borrow::Cow::Borrowed("INTRANET"),
11679                    2 => std::borrow::Cow::Borrowed("INTERNET"),
11680                    3 => std::borrow::Cow::Borrowed("GOOGLE_CLOUD"),
11681                    _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
11682                }
11683            }
11684
11685            /// Creates an enum value from the value name.
11686            pub fn from_str_name(name: &str) -> std::option::Option<Self> {
11687                match name {
11688                    "TYPE_UNSPECIFIED" => std::option::Option::Some(Self::TYPE_UNSPECIFIED),
11689                    "INTRANET" => std::option::Option::Some(Self::INTRANET),
11690                    "INTERNET" => std::option::Option::Some(Self::INTERNET),
11691                    "GOOGLE_CLOUD" => std::option::Option::Some(Self::GOOGLE_CLOUD),
11692                    _ => std::option::Option::None,
11693                }
11694            }
11695        }
11696
11697        impl std::convert::From<i32> for Type {
11698            fn from(value: i32) -> Self {
11699                Self::new(value)
11700            }
11701        }
11702
11703        impl std::default::Default for Type {
11704            fn default() -> Self {
11705                Self::new(0)
11706            }
11707        }
11708    }
11709
11710    /// Enum State defines possible states of VMware Engine network.
11711    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11712    pub struct State(i32);
11713
11714    impl State {
11715        /// The default value. This value is used if the state is omitted.
11716        pub const STATE_UNSPECIFIED: State = State::new(0);
11717
11718        /// The VMware Engine network is being created.
11719        pub const CREATING: State = State::new(1);
11720
11721        /// The VMware Engine network is ready.
11722        pub const ACTIVE: State = State::new(2);
11723
11724        /// The VMware Engine network is being updated.
11725        pub const UPDATING: State = State::new(3);
11726
11727        /// The VMware Engine network is being deleted.
11728        pub const DELETING: State = State::new(4);
11729
11730        /// Creates a new State instance.
11731        pub(crate) const fn new(value: i32) -> Self {
11732            Self(value)
11733        }
11734
11735        /// Gets the enum value.
11736        pub fn value(&self) -> i32 {
11737            self.0
11738        }
11739
11740        /// Gets the enum value as a string.
11741        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
11742            match self.0 {
11743                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
11744                1 => std::borrow::Cow::Borrowed("CREATING"),
11745                2 => std::borrow::Cow::Borrowed("ACTIVE"),
11746                3 => std::borrow::Cow::Borrowed("UPDATING"),
11747                4 => std::borrow::Cow::Borrowed("DELETING"),
11748                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
11749            }
11750        }
11751
11752        /// Creates an enum value from the value name.
11753        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
11754            match name {
11755                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
11756                "CREATING" => std::option::Option::Some(Self::CREATING),
11757                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
11758                "UPDATING" => std::option::Option::Some(Self::UPDATING),
11759                "DELETING" => std::option::Option::Some(Self::DELETING),
11760                _ => std::option::Option::None,
11761            }
11762        }
11763    }
11764
11765    impl std::convert::From<i32> for State {
11766        fn from(value: i32) -> Self {
11767            Self::new(value)
11768        }
11769    }
11770
11771    impl std::default::Default for State {
11772        fn default() -> Self {
11773            Self::new(0)
11774        }
11775    }
11776
11777    /// Enum Type defines possible types of VMware Engine network.
11778    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
11779    pub struct Type(i32);
11780
11781    impl Type {
11782        /// The default value. This value should never be used.
11783        pub const TYPE_UNSPECIFIED: Type = Type::new(0);
11784
11785        /// Network type used by private clouds created in projects without a network
11786        /// of type `STANDARD`. This network type is no longer used for new VMware
11787        /// Engine private cloud deployments.
11788        pub const LEGACY: Type = Type::new(1);
11789
11790        /// Standard network type used for private cloud connectivity.
11791        pub const STANDARD: Type = Type::new(2);
11792
11793        /// Creates a new Type instance.
11794        pub(crate) const fn new(value: i32) -> Self {
11795            Self(value)
11796        }
11797
11798        /// Gets the enum value.
11799        pub fn value(&self) -> i32 {
11800            self.0
11801        }
11802
11803        /// Gets the enum value as a string.
11804        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
11805            match self.0 {
11806                0 => std::borrow::Cow::Borrowed("TYPE_UNSPECIFIED"),
11807                1 => std::borrow::Cow::Borrowed("LEGACY"),
11808                2 => std::borrow::Cow::Borrowed("STANDARD"),
11809                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
11810            }
11811        }
11812
11813        /// Creates an enum value from the value name.
11814        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
11815            match name {
11816                "TYPE_UNSPECIFIED" => std::option::Option::Some(Self::TYPE_UNSPECIFIED),
11817                "LEGACY" => std::option::Option::Some(Self::LEGACY),
11818                "STANDARD" => std::option::Option::Some(Self::STANDARD),
11819                _ => std::option::Option::None,
11820            }
11821        }
11822    }
11823
11824    impl std::convert::From<i32> for Type {
11825        fn from(value: i32) -> Self {
11826            Self::new(value)
11827        }
11828    }
11829
11830    impl std::default::Default for Type {
11831        fn default() -> Self {
11832            Self::new(0)
11833        }
11834    }
11835}
11836
11837/// Private connection resource that provides connectivity for VMware Engine
11838/// private clouds.
11839#[serde_with::serde_as]
11840#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
11841#[serde(default, rename_all = "camelCase")]
11842#[non_exhaustive]
11843pub struct PrivateConnection {
11844    /// Output only. The resource name of the private connection.
11845    /// Resource names are schemeless URIs that follow the conventions in
11846    /// <https://cloud.google.com/apis/design/resource_names>.
11847    /// For example:
11848    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
11849    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11850    pub name: std::string::String,
11851
11852    /// Output only. Creation time of this resource.
11853    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11854    pub create_time: std::option::Option<wkt::Timestamp>,
11855
11856    /// Output only. Last update time of this resource.
11857    #[serde(skip_serializing_if = "std::option::Option::is_none")]
11858    pub update_time: std::option::Option<wkt::Timestamp>,
11859
11860    /// Optional. User-provided description for this private connection.
11861    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11862    pub description: std::string::String,
11863
11864    /// Output only. State of the private connection.
11865    pub state: crate::model::private_connection::State,
11866
11867    /// Required. The relative resource name of Legacy VMware Engine network.
11868    /// Specify the name in the following form:
11869    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
11870    /// where `{project}`, `{location}` will be same as specified in private
11871    /// connection resource name and `{vmware_engine_network_id}` will be in the
11872    /// form of `{location}`-default e.g.
11873    /// projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default.
11874    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11875    pub vmware_engine_network: std::string::String,
11876
11877    /// Output only. The canonical name of the VMware Engine network in the form:
11878    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
11879    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11880    pub vmware_engine_network_canonical: std::string::String,
11881
11882    /// Required. Private connection type.
11883    #[serde(rename = "type")]
11884    pub r#type: crate::model::private_connection::Type,
11885
11886    /// Output only. VPC network peering id between given network VPC and
11887    /// VMwareEngineNetwork.
11888    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11889    pub peering_id: std::string::String,
11890
11891    /// Optional. Routing Mode.
11892    /// Default value is set to GLOBAL.
11893    /// For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or
11894    /// REGIONAL, for other types only GLOBAL is supported.
11895    pub routing_mode: crate::model::private_connection::RoutingMode,
11896
11897    /// Output only. System-generated unique identifier for the resource.
11898    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11899    pub uid: std::string::String,
11900
11901    /// Required. Service network to create private connection.
11902    /// Specify the name in the following form:
11903    /// `projects/{project}/global/networks/{network_id}`
11904    /// For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking
11905    /// VPC, e.g. projects/project-tp/global/networks/servicenetworking.
11906    /// For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC,
11907    /// e.g. projects/project-tp/global/networks/netapp-tenant-vpc.
11908    /// For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g.
11909    /// projects/project-tp/global/networks/dell-tenant-vpc.
11910    /// For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or
11911    /// any other producer VPC to which the VMware Engine Network needs to be
11912    /// connected, e.g. projects/project/global/networks/vpc.
11913    #[serde(skip_serializing_if = "std::string::String::is_empty")]
11914    pub service_network: std::string::String,
11915
11916    /// Output only. Peering state between service network and VMware Engine
11917    /// network.
11918    pub peering_state: crate::model::private_connection::PeeringState,
11919
11920    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
11921    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11922}
11923
11924impl PrivateConnection {
11925    pub fn new() -> Self {
11926        std::default::Default::default()
11927    }
11928
11929    /// Sets the value of [name][crate::model::PrivateConnection::name].
11930    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11931        self.name = v.into();
11932        self
11933    }
11934
11935    /// Sets the value of [create_time][crate::model::PrivateConnection::create_time].
11936    pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11937        mut self,
11938        v: T,
11939    ) -> Self {
11940        self.create_time = v.into();
11941        self
11942    }
11943
11944    /// Sets the value of [update_time][crate::model::PrivateConnection::update_time].
11945    pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
11946        mut self,
11947        v: T,
11948    ) -> Self {
11949        self.update_time = v.into();
11950        self
11951    }
11952
11953    /// Sets the value of [description][crate::model::PrivateConnection::description].
11954    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11955        self.description = v.into();
11956        self
11957    }
11958
11959    /// Sets the value of [state][crate::model::PrivateConnection::state].
11960    pub fn set_state<T: std::convert::Into<crate::model::private_connection::State>>(
11961        mut self,
11962        v: T,
11963    ) -> Self {
11964        self.state = v.into();
11965        self
11966    }
11967
11968    /// Sets the value of [vmware_engine_network][crate::model::PrivateConnection::vmware_engine_network].
11969    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
11970        mut self,
11971        v: T,
11972    ) -> Self {
11973        self.vmware_engine_network = v.into();
11974        self
11975    }
11976
11977    /// Sets the value of [vmware_engine_network_canonical][crate::model::PrivateConnection::vmware_engine_network_canonical].
11978    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
11979        mut self,
11980        v: T,
11981    ) -> Self {
11982        self.vmware_engine_network_canonical = v.into();
11983        self
11984    }
11985
11986    /// Sets the value of [r#type][crate::model::PrivateConnection::type].
11987    pub fn set_type<T: std::convert::Into<crate::model::private_connection::Type>>(
11988        mut self,
11989        v: T,
11990    ) -> Self {
11991        self.r#type = v.into();
11992        self
11993    }
11994
11995    /// Sets the value of [peering_id][crate::model::PrivateConnection::peering_id].
11996    pub fn set_peering_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11997        self.peering_id = v.into();
11998        self
11999    }
12000
12001    /// Sets the value of [routing_mode][crate::model::PrivateConnection::routing_mode].
12002    pub fn set_routing_mode<
12003        T: std::convert::Into<crate::model::private_connection::RoutingMode>,
12004    >(
12005        mut self,
12006        v: T,
12007    ) -> Self {
12008        self.routing_mode = v.into();
12009        self
12010    }
12011
12012    /// Sets the value of [uid][crate::model::PrivateConnection::uid].
12013    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12014        self.uid = v.into();
12015        self
12016    }
12017
12018    /// Sets the value of [service_network][crate::model::PrivateConnection::service_network].
12019    pub fn set_service_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12020        self.service_network = v.into();
12021        self
12022    }
12023
12024    /// Sets the value of [peering_state][crate::model::PrivateConnection::peering_state].
12025    pub fn set_peering_state<
12026        T: std::convert::Into<crate::model::private_connection::PeeringState>,
12027    >(
12028        mut self,
12029        v: T,
12030    ) -> Self {
12031        self.peering_state = v.into();
12032        self
12033    }
12034}
12035
12036impl wkt::message::Message for PrivateConnection {
12037    fn typename() -> &'static str {
12038        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateConnection"
12039    }
12040}
12041
12042/// Defines additional types related to [PrivateConnection].
12043pub mod private_connection {
12044    #[allow(unused_imports)]
12045    use super::*;
12046
12047    /// Enum State defines possible states of private connection.
12048    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12049    pub struct State(i32);
12050
12051    impl State {
12052        /// The default value. This value is used if the state is omitted.
12053        pub const STATE_UNSPECIFIED: State = State::new(0);
12054
12055        /// The private connection is being created.
12056        pub const CREATING: State = State::new(1);
12057
12058        /// The private connection is ready.
12059        pub const ACTIVE: State = State::new(2);
12060
12061        /// The private connection is being updated.
12062        pub const UPDATING: State = State::new(3);
12063
12064        /// The private connection is being deleted.
12065        pub const DELETING: State = State::new(4);
12066
12067        /// The private connection is not provisioned, since no private cloud is
12068        /// present for which this private connection is needed.
12069        pub const UNPROVISIONED: State = State::new(5);
12070
12071        /// The private connection is in failed state.
12072        pub const FAILED: State = State::new(6);
12073
12074        /// Creates a new State instance.
12075        pub(crate) const fn new(value: i32) -> Self {
12076            Self(value)
12077        }
12078
12079        /// Gets the enum value.
12080        pub fn value(&self) -> i32 {
12081            self.0
12082        }
12083
12084        /// Gets the enum value as a string.
12085        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
12086            match self.0 {
12087                0 => std::borrow::Cow::Borrowed("STATE_UNSPECIFIED"),
12088                1 => std::borrow::Cow::Borrowed("CREATING"),
12089                2 => std::borrow::Cow::Borrowed("ACTIVE"),
12090                3 => std::borrow::Cow::Borrowed("UPDATING"),
12091                4 => std::borrow::Cow::Borrowed("DELETING"),
12092                5 => std::borrow::Cow::Borrowed("UNPROVISIONED"),
12093                6 => std::borrow::Cow::Borrowed("FAILED"),
12094                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
12095            }
12096        }
12097
12098        /// Creates an enum value from the value name.
12099        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
12100            match name {
12101                "STATE_UNSPECIFIED" => std::option::Option::Some(Self::STATE_UNSPECIFIED),
12102                "CREATING" => std::option::Option::Some(Self::CREATING),
12103                "ACTIVE" => std::option::Option::Some(Self::ACTIVE),
12104                "UPDATING" => std::option::Option::Some(Self::UPDATING),
12105                "DELETING" => std::option::Option::Some(Self::DELETING),
12106                "UNPROVISIONED" => std::option::Option::Some(Self::UNPROVISIONED),
12107                "FAILED" => std::option::Option::Some(Self::FAILED),
12108                _ => std::option::Option::None,
12109            }
12110        }
12111    }
12112
12113    impl std::convert::From<i32> for State {
12114        fn from(value: i32) -> Self {
12115            Self::new(value)
12116        }
12117    }
12118
12119    impl std::default::Default for State {
12120        fn default() -> Self {
12121            Self::new(0)
12122        }
12123    }
12124
12125    /// Enum Type defines possible types of private connection.
12126    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12127    pub struct Type(i32);
12128
12129    impl Type {
12130        /// The default value. This value should never be used.
12131        pub const TYPE_UNSPECIFIED: Type = Type::new(0);
12132
12133        /// Connection used for establishing [private services
12134        /// access](https://cloud.google.com/vpc/docs/private-services-access).
12135        pub const PRIVATE_SERVICE_ACCESS: Type = Type::new(1);
12136
12137        /// Connection used for connecting to NetApp Cloud Volumes.
12138        pub const NETAPP_CLOUD_VOLUMES: Type = Type::new(2);
12139
12140        /// Connection used for connecting to Dell PowerScale.
12141        pub const DELL_POWERSCALE: Type = Type::new(3);
12142
12143        /// Connection used for connecting to third-party services.
12144        pub const THIRD_PARTY_SERVICE: Type = Type::new(4);
12145
12146        /// Creates a new Type instance.
12147        pub(crate) const fn new(value: i32) -> Self {
12148            Self(value)
12149        }
12150
12151        /// Gets the enum value.
12152        pub fn value(&self) -> i32 {
12153            self.0
12154        }
12155
12156        /// Gets the enum value as a string.
12157        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
12158            match self.0 {
12159                0 => std::borrow::Cow::Borrowed("TYPE_UNSPECIFIED"),
12160                1 => std::borrow::Cow::Borrowed("PRIVATE_SERVICE_ACCESS"),
12161                2 => std::borrow::Cow::Borrowed("NETAPP_CLOUD_VOLUMES"),
12162                3 => std::borrow::Cow::Borrowed("DELL_POWERSCALE"),
12163                4 => std::borrow::Cow::Borrowed("THIRD_PARTY_SERVICE"),
12164                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
12165            }
12166        }
12167
12168        /// Creates an enum value from the value name.
12169        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
12170            match name {
12171                "TYPE_UNSPECIFIED" => std::option::Option::Some(Self::TYPE_UNSPECIFIED),
12172                "PRIVATE_SERVICE_ACCESS" => std::option::Option::Some(Self::PRIVATE_SERVICE_ACCESS),
12173                "NETAPP_CLOUD_VOLUMES" => std::option::Option::Some(Self::NETAPP_CLOUD_VOLUMES),
12174                "DELL_POWERSCALE" => std::option::Option::Some(Self::DELL_POWERSCALE),
12175                "THIRD_PARTY_SERVICE" => std::option::Option::Some(Self::THIRD_PARTY_SERVICE),
12176                _ => std::option::Option::None,
12177            }
12178        }
12179    }
12180
12181    impl std::convert::From<i32> for Type {
12182        fn from(value: i32) -> Self {
12183            Self::new(value)
12184        }
12185    }
12186
12187    impl std::default::Default for Type {
12188        fn default() -> Self {
12189            Self::new(0)
12190        }
12191    }
12192
12193    /// Possible types for RoutingMode
12194    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12195    pub struct RoutingMode(i32);
12196
12197    impl RoutingMode {
12198        /// The default value. This value should never be used.
12199        pub const ROUTING_MODE_UNSPECIFIED: RoutingMode = RoutingMode::new(0);
12200
12201        /// Global Routing Mode
12202        pub const GLOBAL: RoutingMode = RoutingMode::new(1);
12203
12204        /// Regional Routing Mode
12205        pub const REGIONAL: RoutingMode = RoutingMode::new(2);
12206
12207        /// Creates a new RoutingMode instance.
12208        pub(crate) const fn new(value: i32) -> Self {
12209            Self(value)
12210        }
12211
12212        /// Gets the enum value.
12213        pub fn value(&self) -> i32 {
12214            self.0
12215        }
12216
12217        /// Gets the enum value as a string.
12218        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
12219            match self.0 {
12220                0 => std::borrow::Cow::Borrowed("ROUTING_MODE_UNSPECIFIED"),
12221                1 => std::borrow::Cow::Borrowed("GLOBAL"),
12222                2 => std::borrow::Cow::Borrowed("REGIONAL"),
12223                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
12224            }
12225        }
12226
12227        /// Creates an enum value from the value name.
12228        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
12229            match name {
12230                "ROUTING_MODE_UNSPECIFIED" => {
12231                    std::option::Option::Some(Self::ROUTING_MODE_UNSPECIFIED)
12232                }
12233                "GLOBAL" => std::option::Option::Some(Self::GLOBAL),
12234                "REGIONAL" => std::option::Option::Some(Self::REGIONAL),
12235                _ => std::option::Option::None,
12236            }
12237        }
12238    }
12239
12240    impl std::convert::From<i32> for RoutingMode {
12241        fn from(value: i32) -> Self {
12242            Self::new(value)
12243        }
12244    }
12245
12246    impl std::default::Default for RoutingMode {
12247        fn default() -> Self {
12248            Self::new(0)
12249        }
12250    }
12251
12252    /// Enum PeeringState defines the possible states of peering between service
12253    /// network and the vpc network peered to service network
12254    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12255    pub struct PeeringState(i32);
12256
12257    impl PeeringState {
12258        /// The default value. This value is used if the peering state is omitted or
12259        /// unknown.
12260        pub const PEERING_STATE_UNSPECIFIED: PeeringState = PeeringState::new(0);
12261
12262        /// The peering is in active state.
12263        pub const PEERING_ACTIVE: PeeringState = PeeringState::new(1);
12264
12265        /// The peering is in inactive state.
12266        pub const PEERING_INACTIVE: PeeringState = PeeringState::new(2);
12267
12268        /// Creates a new PeeringState instance.
12269        pub(crate) const fn new(value: i32) -> Self {
12270            Self(value)
12271        }
12272
12273        /// Gets the enum value.
12274        pub fn value(&self) -> i32 {
12275            self.0
12276        }
12277
12278        /// Gets the enum value as a string.
12279        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
12280            match self.0 {
12281                0 => std::borrow::Cow::Borrowed("PEERING_STATE_UNSPECIFIED"),
12282                1 => std::borrow::Cow::Borrowed("PEERING_ACTIVE"),
12283                2 => std::borrow::Cow::Borrowed("PEERING_INACTIVE"),
12284                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
12285            }
12286        }
12287
12288        /// Creates an enum value from the value name.
12289        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
12290            match name {
12291                "PEERING_STATE_UNSPECIFIED" => {
12292                    std::option::Option::Some(Self::PEERING_STATE_UNSPECIFIED)
12293                }
12294                "PEERING_ACTIVE" => std::option::Option::Some(Self::PEERING_ACTIVE),
12295                "PEERING_INACTIVE" => std::option::Option::Some(Self::PEERING_INACTIVE),
12296                _ => std::option::Option::None,
12297            }
12298        }
12299    }
12300
12301    impl std::convert::From<i32> for PeeringState {
12302        fn from(value: i32) -> Self {
12303            Self::new(value)
12304        }
12305    }
12306
12307    impl std::default::Default for PeeringState {
12308        fn default() -> Self {
12309            Self::new(0)
12310        }
12311    }
12312}
12313
12314/// VmwareEngine specific metadata for the given
12315/// [google.cloud.location.Location][google.cloud.location.Location]. It is
12316/// returned as a content of the `google.cloud.location.Location.metadata` field.
12317///
12318/// [google.cloud.location.Location]: location::model::Location
12319#[serde_with::serde_as]
12320#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12321#[serde(default, rename_all = "camelCase")]
12322#[non_exhaustive]
12323pub struct LocationMetadata {
12324    /// Output only. Capabilities of this location.
12325    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12326    pub capabilities: std::vec::Vec<crate::model::location_metadata::Capability>,
12327
12328    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12329    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12330}
12331
12332impl LocationMetadata {
12333    pub fn new() -> Self {
12334        std::default::Default::default()
12335    }
12336
12337    /// Sets the value of [capabilities][crate::model::LocationMetadata::capabilities].
12338    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
12339    where
12340        T: std::iter::IntoIterator<Item = V>,
12341        V: std::convert::Into<crate::model::location_metadata::Capability>,
12342    {
12343        use std::iter::Iterator;
12344        self.capabilities = v.into_iter().map(|i| i.into()).collect();
12345        self
12346    }
12347}
12348
12349impl wkt::message::Message for LocationMetadata {
12350    fn typename() -> &'static str {
12351        "type.googleapis.com/google.cloud.vmwareengine.v1.LocationMetadata"
12352    }
12353}
12354
12355/// Defines additional types related to [LocationMetadata].
12356pub mod location_metadata {
12357    #[allow(unused_imports)]
12358    use super::*;
12359
12360    /// Capability of a location.
12361    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12362    pub struct Capability(i32);
12363
12364    impl Capability {
12365        /// The default value. This value is used if the capability is omitted or
12366        /// unknown.
12367        pub const CAPABILITY_UNSPECIFIED: Capability = Capability::new(0);
12368
12369        /// Stretch clusters are supported in this location.
12370        pub const STRETCHED_CLUSTERS: Capability = Capability::new(1);
12371
12372        /// Creates a new Capability instance.
12373        pub(crate) const fn new(value: i32) -> Self {
12374            Self(value)
12375        }
12376
12377        /// Gets the enum value.
12378        pub fn value(&self) -> i32 {
12379            self.0
12380        }
12381
12382        /// Gets the enum value as a string.
12383        pub fn as_str_name(&self) -> std::borrow::Cow<'static, str> {
12384            match self.0 {
12385                0 => std::borrow::Cow::Borrowed("CAPABILITY_UNSPECIFIED"),
12386                1 => std::borrow::Cow::Borrowed("STRETCHED_CLUSTERS"),
12387                _ => std::borrow::Cow::Owned(std::format!("UNKNOWN-VALUE:{}", self.0)),
12388            }
12389        }
12390
12391        /// Creates an enum value from the value name.
12392        pub fn from_str_name(name: &str) -> std::option::Option<Self> {
12393            match name {
12394                "CAPABILITY_UNSPECIFIED" => std::option::Option::Some(Self::CAPABILITY_UNSPECIFIED),
12395                "STRETCHED_CLUSTERS" => std::option::Option::Some(Self::STRETCHED_CLUSTERS),
12396                _ => std::option::Option::None,
12397            }
12398        }
12399    }
12400
12401    impl std::convert::From<i32> for Capability {
12402        fn from(value: i32) -> Self {
12403            Self::new(value)
12404        }
12405    }
12406
12407    impl std::default::Default for Capability {
12408        fn default() -> Self {
12409            Self::new(0)
12410        }
12411    }
12412}
12413
12414/// DnsBindPermission resource that contains the accounts having the consumer DNS
12415/// bind permission on the corresponding intranet VPC of the consumer project.
12416#[serde_with::serde_as]
12417#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12418#[serde(default, rename_all = "camelCase")]
12419#[non_exhaustive]
12420pub struct DnsBindPermission {
12421    /// Required. Output only. The name of the resource which stores the
12422    /// users/service accounts having the permission to bind to the corresponding
12423    /// intranet VPC of the consumer project. DnsBindPermission is a global
12424    /// resource and location can only be global. Resource names are schemeless
12425    /// URIs that follow the conventions in
12426    /// <https://cloud.google.com/apis/design/resource_names>. For example:
12427    /// `projects/my-project/locations/global/dnsBindPermission`
12428    #[serde(skip_serializing_if = "std::string::String::is_empty")]
12429    pub name: std::string::String,
12430
12431    /// Output only. Users/Service accounts which have access for binding on the
12432    /// intranet VPC project corresponding to the consumer project.
12433    #[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
12434    pub principals: std::vec::Vec<crate::model::Principal>,
12435
12436    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12437    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12438}
12439
12440impl DnsBindPermission {
12441    pub fn new() -> Self {
12442        std::default::Default::default()
12443    }
12444
12445    /// Sets the value of [name][crate::model::DnsBindPermission::name].
12446    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12447        self.name = v.into();
12448        self
12449    }
12450
12451    /// Sets the value of [principals][crate::model::DnsBindPermission::principals].
12452    pub fn set_principals<T, V>(mut self, v: T) -> Self
12453    where
12454        T: std::iter::IntoIterator<Item = V>,
12455        V: std::convert::Into<crate::model::Principal>,
12456    {
12457        use std::iter::Iterator;
12458        self.principals = v.into_iter().map(|i| i.into()).collect();
12459        self
12460    }
12461}
12462
12463impl wkt::message::Message for DnsBindPermission {
12464    fn typename() -> &'static str {
12465        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsBindPermission"
12466    }
12467}
12468
12469/// Users/Service accounts which have access for DNS binding on the intranet
12470/// VPC corresponding to the consumer project.
12471#[serde_with::serde_as]
12472#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
12473#[serde(default, rename_all = "camelCase")]
12474#[non_exhaustive]
12475pub struct Principal {
12476    /// The consumer provided user/service account which needs to be
12477    /// granted permission to DNS bind with the intranet VPC corresponding to the
12478    /// consumer project.
12479    #[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
12480    pub principal: std::option::Option<crate::model::principal::Principal>,
12481
12482    #[serde(flatten, skip_serializing_if = "serde_json::Map::is_empty")]
12483    _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12484}
12485
12486impl Principal {
12487    pub fn new() -> Self {
12488        std::default::Default::default()
12489    }
12490
12491    /// Sets the value of [principal][crate::model::Principal::principal].
12492    ///
12493    /// Note that all the setters affecting `principal` are mutually
12494    /// exclusive.
12495    pub fn set_principal<
12496        T: std::convert::Into<std::option::Option<crate::model::principal::Principal>>,
12497    >(
12498        mut self,
12499        v: T,
12500    ) -> Self {
12501        self.principal = v.into();
12502        self
12503    }
12504
12505    /// The value of [principal][crate::model::Principal::principal]
12506    /// if it holds a `User`, `None` if the field is not set or
12507    /// holds a different branch.
12508    pub fn user(&self) -> std::option::Option<&std::string::String> {
12509        #[allow(unreachable_patterns)]
12510        self.principal.as_ref().and_then(|v| match v {
12511            crate::model::principal::Principal::User(v) => std::option::Option::Some(v),
12512            _ => std::option::Option::None,
12513        })
12514    }
12515
12516    /// The value of [principal][crate::model::Principal::principal]
12517    /// if it holds a `ServiceAccount`, `None` if the field is not set or
12518    /// holds a different branch.
12519    pub fn service_account(&self) -> std::option::Option<&std::string::String> {
12520        #[allow(unreachable_patterns)]
12521        self.principal.as_ref().and_then(|v| match v {
12522            crate::model::principal::Principal::ServiceAccount(v) => std::option::Option::Some(v),
12523            _ => std::option::Option::None,
12524        })
12525    }
12526
12527    /// Sets the value of [principal][crate::model::Principal::principal]
12528    /// to hold a `User`.
12529    ///
12530    /// Note that all the setters affecting `principal` are
12531    /// mutually exclusive.
12532    pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12533        self.principal =
12534            std::option::Option::Some(crate::model::principal::Principal::User(v.into()));
12535        self
12536    }
12537
12538    /// Sets the value of [principal][crate::model::Principal::principal]
12539    /// to hold a `ServiceAccount`.
12540    ///
12541    /// Note that all the setters affecting `principal` are
12542    /// mutually exclusive.
12543    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12544        self.principal =
12545            std::option::Option::Some(crate::model::principal::Principal::ServiceAccount(v.into()));
12546        self
12547    }
12548}
12549
12550impl wkt::message::Message for Principal {
12551    fn typename() -> &'static str {
12552        "type.googleapis.com/google.cloud.vmwareengine.v1.Principal"
12553    }
12554}
12555
12556/// Defines additional types related to [Principal].
12557pub mod principal {
12558    #[allow(unused_imports)]
12559    use super::*;
12560
12561    /// The consumer provided user/service account which needs to be
12562    /// granted permission to DNS bind with the intranet VPC corresponding to the
12563    /// consumer project.
12564    #[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
12565    #[serde(rename_all = "camelCase")]
12566    #[non_exhaustive]
12567    pub enum Principal {
12568        /// The user who needs to be granted permission.
12569        User(std::string::String),
12570        /// The service account which needs to be granted the permission.
12571        ServiceAccount(std::string::String),
12572    }
12573}