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
37mod debug;
38mod deserialize;
39mod serialize;
40
41/// Request message for
42/// [VmwareEngine.ListPrivateClouds][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]
43///
44/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]: crate::client::VmwareEngine::list_private_clouds
45#[derive(Clone, Default, PartialEq)]
46#[non_exhaustive]
47pub struct ListPrivateCloudsRequest {
48    /// Required. The resource name of the private cloud to be queried for
49    /// clusters. Resource names are schemeless URIs that follow the conventions in
50    /// <https://cloud.google.com/apis/design/resource_names>.
51    /// For example:
52    /// `projects/my-project/locations/us-central1-a`
53    pub parent: std::string::String,
54
55    /// The maximum number of private clouds to return in one page.
56    /// The service may return fewer than this value.
57    /// The maximum value is coerced to 1000.
58    /// The default value of this field is 500.
59    pub page_size: i32,
60
61    /// A page token, received from a previous `ListPrivateClouds` call.
62    /// Provide this to retrieve the subsequent page.
63    ///
64    /// When paginating, all other parameters provided to `ListPrivateClouds` must
65    /// match the call that provided the page token.
66    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    pub filter: std::string::String,
98
99    /// Sorts list results by a certain order. By default, returned results are
100    /// ordered by `name` in ascending order. You can also sort results in
101    /// descending order based on the `name` value using `orderBy="name desc"`.
102    /// Currently, only ordering by `name` is supported.
103    pub order_by: std::string::String,
104
105    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
106}
107
108impl ListPrivateCloudsRequest {
109    pub fn new() -> Self {
110        std::default::Default::default()
111    }
112
113    /// Sets the value of [parent][crate::model::ListPrivateCloudsRequest::parent].
114    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
115        self.parent = v.into();
116        self
117    }
118
119    /// Sets the value of [page_size][crate::model::ListPrivateCloudsRequest::page_size].
120    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
121        self.page_size = v.into();
122        self
123    }
124
125    /// Sets the value of [page_token][crate::model::ListPrivateCloudsRequest::page_token].
126    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
127        self.page_token = v.into();
128        self
129    }
130
131    /// Sets the value of [filter][crate::model::ListPrivateCloudsRequest::filter].
132    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
133        self.filter = v.into();
134        self
135    }
136
137    /// Sets the value of [order_by][crate::model::ListPrivateCloudsRequest::order_by].
138    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
139        self.order_by = v.into();
140        self
141    }
142}
143
144impl wkt::message::Message for ListPrivateCloudsRequest {
145    fn typename() -> &'static str {
146        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsRequest"
147    }
148}
149
150/// Response message for
151/// [VmwareEngine.ListPrivateClouds][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]
152///
153/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateClouds]: crate::client::VmwareEngine::list_private_clouds
154#[derive(Clone, Default, PartialEq)]
155#[non_exhaustive]
156pub struct ListPrivateCloudsResponse {
157    /// A list of private clouds.
158    pub private_clouds: std::vec::Vec<crate::model::PrivateCloud>,
159
160    /// A token, which can be sent as `page_token` to retrieve the next page.
161    /// If this field is omitted, there are no subsequent pages.
162    pub next_page_token: std::string::String,
163
164    /// Locations that could not be reached when making an aggregated query using
165    /// wildcards.
166    pub unreachable: std::vec::Vec<std::string::String>,
167
168    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
169}
170
171impl ListPrivateCloudsResponse {
172    pub fn new() -> Self {
173        std::default::Default::default()
174    }
175
176    /// Sets the value of [private_clouds][crate::model::ListPrivateCloudsResponse::private_clouds].
177    pub fn set_private_clouds<T, V>(mut self, v: T) -> Self
178    where
179        T: std::iter::IntoIterator<Item = V>,
180        V: std::convert::Into<crate::model::PrivateCloud>,
181    {
182        use std::iter::Iterator;
183        self.private_clouds = v.into_iter().map(|i| i.into()).collect();
184        self
185    }
186
187    /// Sets the value of [next_page_token][crate::model::ListPrivateCloudsResponse::next_page_token].
188    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
189        self.next_page_token = v.into();
190        self
191    }
192
193    /// Sets the value of [unreachable][crate::model::ListPrivateCloudsResponse::unreachable].
194    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
195    where
196        T: std::iter::IntoIterator<Item = V>,
197        V: std::convert::Into<std::string::String>,
198    {
199        use std::iter::Iterator;
200        self.unreachable = v.into_iter().map(|i| i.into()).collect();
201        self
202    }
203}
204
205impl wkt::message::Message for ListPrivateCloudsResponse {
206    fn typename() -> &'static str {
207        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateCloudsResponse"
208    }
209}
210
211#[doc(hidden)]
212impl gax::paginator::internal::PageableResponse for ListPrivateCloudsResponse {
213    type PageItem = crate::model::PrivateCloud;
214
215    fn items(self) -> std::vec::Vec<Self::PageItem> {
216        self.private_clouds
217    }
218
219    fn next_page_token(&self) -> std::string::String {
220        use std::clone::Clone;
221        self.next_page_token.clone()
222    }
223}
224
225/// Request message for
226/// [VmwareEngine.GetPrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateCloud]
227///
228/// [google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateCloud]: crate::client::VmwareEngine::get_private_cloud
229#[derive(Clone, Default, PartialEq)]
230#[non_exhaustive]
231pub struct GetPrivateCloudRequest {
232    /// Required. The resource name of the private cloud to retrieve.
233    /// Resource names are schemeless URIs that follow the conventions in
234    /// <https://cloud.google.com/apis/design/resource_names>.
235    /// For example:
236    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
237    pub name: std::string::String,
238
239    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
240}
241
242impl GetPrivateCloudRequest {
243    pub fn new() -> Self {
244        std::default::Default::default()
245    }
246
247    /// Sets the value of [name][crate::model::GetPrivateCloudRequest::name].
248    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
249        self.name = v.into();
250        self
251    }
252}
253
254impl wkt::message::Message for GetPrivateCloudRequest {
255    fn typename() -> &'static str {
256        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateCloudRequest"
257    }
258}
259
260/// Request message for
261/// [VmwareEngine.CreatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]
262///
263/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateCloud]: crate::client::VmwareEngine::create_private_cloud
264#[derive(Clone, Default, PartialEq)]
265#[non_exhaustive]
266pub struct CreatePrivateCloudRequest {
267    /// Required. The resource name of the location to create the new
268    /// private cloud in. Resource names are schemeless URIs that follow the
269    /// conventions in <https://cloud.google.com/apis/design/resource_names>.
270    /// For example:
271    /// `projects/my-project/locations/us-central1-a`
272    pub parent: std::string::String,
273
274    /// Required. The user-provided identifier of the private cloud to be created.
275    /// This identifier must be unique among each `PrivateCloud` within the parent
276    /// and becomes the final token in the name URI.
277    /// The identifier must meet the following requirements:
278    ///
279    /// * Only contains 1-63 alphanumeric characters and hyphens
280    /// * Begins with an alphabetical character
281    /// * Ends with a non-hyphen character
282    /// * Not formatted as a UUID
283    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
284    ///   (section 3.5)
285    pub private_cloud_id: std::string::String,
286
287    /// Required. The initial description of the new private cloud.
288    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
289
290    /// Optional. The request ID must be a valid UUID with the exception that zero
291    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
292    pub request_id: std::string::String,
293
294    /// Optional. True if you want the request to be validated and not executed;
295    /// false otherwise.
296    pub validate_only: bool,
297
298    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
299}
300
301impl CreatePrivateCloudRequest {
302    pub fn new() -> Self {
303        std::default::Default::default()
304    }
305
306    /// Sets the value of [parent][crate::model::CreatePrivateCloudRequest::parent].
307    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
308        self.parent = v.into();
309        self
310    }
311
312    /// Sets the value of [private_cloud_id][crate::model::CreatePrivateCloudRequest::private_cloud_id].
313    pub fn set_private_cloud_id<T: std::convert::Into<std::string::String>>(
314        mut self,
315        v: T,
316    ) -> Self {
317        self.private_cloud_id = v.into();
318        self
319    }
320
321    /// Sets the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
322    pub fn set_private_cloud<T>(mut self, v: T) -> Self
323    where
324        T: std::convert::Into<crate::model::PrivateCloud>,
325    {
326        self.private_cloud = std::option::Option::Some(v.into());
327        self
328    }
329
330    /// Sets or clears the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
331    pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
332    where
333        T: std::convert::Into<crate::model::PrivateCloud>,
334    {
335        self.private_cloud = v.map(|x| x.into());
336        self
337    }
338
339    /// Sets the value of [request_id][crate::model::CreatePrivateCloudRequest::request_id].
340    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
341        self.request_id = v.into();
342        self
343    }
344
345    /// Sets the value of [validate_only][crate::model::CreatePrivateCloudRequest::validate_only].
346    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
347        self.validate_only = v.into();
348        self
349    }
350}
351
352impl wkt::message::Message for CreatePrivateCloudRequest {
353    fn typename() -> &'static str {
354        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateCloudRequest"
355    }
356}
357
358/// Request message for
359/// [VmwareEngine.UpdatePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]
360///
361/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateCloud]: crate::client::VmwareEngine::update_private_cloud
362#[derive(Clone, Default, PartialEq)]
363#[non_exhaustive]
364pub struct UpdatePrivateCloudRequest {
365    /// Required. Private cloud description.
366    pub private_cloud: std::option::Option<crate::model::PrivateCloud>,
367
368    /// Required. Field mask is used to specify the fields to be overwritten in the
369    /// `PrivateCloud` resource by the update. The fields specified in `updateMask`
370    /// are relative to the resource, not the full request. A field will be
371    /// overwritten if it is in the mask. If the user does not provide a mask then
372    /// all fields will be overwritten.
373    pub update_mask: std::option::Option<wkt::FieldMask>,
374
375    /// Optional. The request ID must be a valid UUID with the exception that zero
376    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
377    pub request_id: std::string::String,
378
379    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
380}
381
382impl UpdatePrivateCloudRequest {
383    pub fn new() -> Self {
384        std::default::Default::default()
385    }
386
387    /// Sets the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
388    pub fn set_private_cloud<T>(mut self, v: T) -> Self
389    where
390        T: std::convert::Into<crate::model::PrivateCloud>,
391    {
392        self.private_cloud = std::option::Option::Some(v.into());
393        self
394    }
395
396    /// Sets or clears the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
397    pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
398    where
399        T: std::convert::Into<crate::model::PrivateCloud>,
400    {
401        self.private_cloud = v.map(|x| x.into());
402        self
403    }
404
405    /// Sets the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
406    pub fn set_update_mask<T>(mut self, v: T) -> Self
407    where
408        T: std::convert::Into<wkt::FieldMask>,
409    {
410        self.update_mask = std::option::Option::Some(v.into());
411        self
412    }
413
414    /// Sets or clears the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
415    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
416    where
417        T: std::convert::Into<wkt::FieldMask>,
418    {
419        self.update_mask = v.map(|x| x.into());
420        self
421    }
422
423    /// Sets the value of [request_id][crate::model::UpdatePrivateCloudRequest::request_id].
424    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
425        self.request_id = v.into();
426        self
427    }
428}
429
430impl wkt::message::Message for UpdatePrivateCloudRequest {
431    fn typename() -> &'static str {
432        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateCloudRequest"
433    }
434}
435
436/// Request message for
437/// [VmwareEngine.DeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]
438///
439/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateCloud]: crate::client::VmwareEngine::delete_private_cloud
440#[derive(Clone, Default, PartialEq)]
441#[non_exhaustive]
442pub struct DeletePrivateCloudRequest {
443    /// Required. The resource name of the private cloud to delete.
444    /// Resource names are schemeless URIs that follow the conventions in
445    /// <https://cloud.google.com/apis/design/resource_names>.
446    /// For example:
447    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
448    pub name: std::string::String,
449
450    /// Optional. The request ID must be a valid UUID with the exception that zero
451    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
452    pub request_id: std::string::String,
453
454    /// Optional. If set to true, cascade delete is enabled and all children of
455    /// this private cloud resource are also deleted. When this flag is set to
456    /// false, the private cloud will not be deleted if there are any children
457    /// other than the management cluster. The management cluster is always
458    /// deleted.
459    pub force: bool,
460
461    /// Optional. Time delay of the deletion specified in hours. The default value
462    /// is `3`. Specifying a non-zero value for this field changes the value of
463    /// `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned
464    /// deletion time. Deletion can be cancelled before `expire_time` elapses using
465    /// [VmwareEngine.UndeletePrivateCloud][google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud].
466    /// Specifying a value of `0` for this field instead begins the deletion
467    /// process and ceases billing immediately. During the final deletion process,
468    /// the value of `PrivateCloud.state` becomes `PURGING`.
469    ///
470    /// [google.cloud.vmwareengine.v1.VmwareEngine.UndeletePrivateCloud]: crate::client::VmwareEngine::undelete_private_cloud
471    pub delay_hours: std::option::Option<i32>,
472
473    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
474}
475
476impl DeletePrivateCloudRequest {
477    pub fn new() -> Self {
478        std::default::Default::default()
479    }
480
481    /// Sets the value of [name][crate::model::DeletePrivateCloudRequest::name].
482    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
483        self.name = v.into();
484        self
485    }
486
487    /// Sets the value of [request_id][crate::model::DeletePrivateCloudRequest::request_id].
488    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
489        self.request_id = v.into();
490        self
491    }
492
493    /// Sets the value of [force][crate::model::DeletePrivateCloudRequest::force].
494    pub fn set_force<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
495        self.force = v.into();
496        self
497    }
498
499    /// Sets the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
500    pub fn set_delay_hours<T>(mut self, v: T) -> Self
501    where
502        T: std::convert::Into<i32>,
503    {
504        self.delay_hours = std::option::Option::Some(v.into());
505        self
506    }
507
508    /// Sets or clears the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
509    pub fn set_or_clear_delay_hours<T>(mut self, v: std::option::Option<T>) -> Self
510    where
511        T: std::convert::Into<i32>,
512    {
513        self.delay_hours = v.map(|x| x.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#[derive(Clone, Default, PartialEq)]
529#[non_exhaustive]
530pub struct UndeletePrivateCloudRequest {
531    /// Required. The resource name of the private cloud scheduled for deletion.
532    /// Resource names are schemeless URIs that follow the conventions in
533    /// <https://cloud.google.com/apis/design/resource_names>.
534    /// For example:
535    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
536    pub name: std::string::String,
537
538    /// Optional. The request ID must be a valid UUID with the exception that zero
539    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
540    pub request_id: std::string::String,
541
542    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
543}
544
545impl UndeletePrivateCloudRequest {
546    pub fn new() -> Self {
547        std::default::Default::default()
548    }
549
550    /// Sets the value of [name][crate::model::UndeletePrivateCloudRequest::name].
551    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
552        self.name = v.into();
553        self
554    }
555
556    /// Sets the value of [request_id][crate::model::UndeletePrivateCloudRequest::request_id].
557    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
558        self.request_id = v.into();
559        self
560    }
561}
562
563impl wkt::message::Message for UndeletePrivateCloudRequest {
564    fn typename() -> &'static str {
565        "type.googleapis.com/google.cloud.vmwareengine.v1.UndeletePrivateCloudRequest"
566    }
567}
568
569/// Request message for
570/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
571///
572/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
573#[derive(Clone, Default, PartialEq)]
574#[non_exhaustive]
575pub struct ListClustersRequest {
576    /// Required. The resource name of the private cloud to query for clusters.
577    /// Resource names are schemeless URIs that follow the conventions in
578    /// <https://cloud.google.com/apis/design/resource_names>.
579    /// For example:
580    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
581    pub parent: std::string::String,
582
583    /// The maximum number of clusters to return in one page.
584    /// The service may return fewer than this value.
585    /// The maximum value is coerced to 1000.
586    /// The default value of this field is 500.
587    pub page_size: i32,
588
589    /// A page token, received from a previous `ListClusters` call.
590    /// Provide this to retrieve the subsequent page.
591    ///
592    /// When paginating, all other parameters provided to `ListClusters`
593    /// must match the call that provided the page token.
594    pub page_token: std::string::String,
595
596    /// To filter on multiple expressions, provide each separate expression within
597    /// parentheses. For example:
598    ///
599    /// ```norust
600    /// (name = "example-cluster")
601    /// (nodeCount = "3")
602    /// ```
603    ///
604    /// By default, each expression is an `AND` expression. However, you can
605    /// include `AND` and `OR` expressions explicitly. For example:
606    ///
607    /// ```norust
608    /// (name = "example-cluster-1") AND
609    /// (createTime > "2021-04-12T08:15:10.40Z") OR
610    /// (name = "example-cluster-2")
611    /// ```
612    pub filter: std::string::String,
613
614    /// Sorts list results by a certain order. By default, returned results are
615    /// ordered by `name` in ascending order. You can also sort results in
616    /// descending order based on the `name` value using `orderBy="name desc"`.
617    /// Currently, only ordering by `name` is supported.
618    pub order_by: std::string::String,
619
620    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
621}
622
623impl ListClustersRequest {
624    pub fn new() -> Self {
625        std::default::Default::default()
626    }
627
628    /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
629    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
630        self.parent = v.into();
631        self
632    }
633
634    /// Sets the value of [page_size][crate::model::ListClustersRequest::page_size].
635    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
636        self.page_size = v.into();
637        self
638    }
639
640    /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
641    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
642        self.page_token = v.into();
643        self
644    }
645
646    /// Sets the value of [filter][crate::model::ListClustersRequest::filter].
647    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
648        self.filter = v.into();
649        self
650    }
651
652    /// Sets the value of [order_by][crate::model::ListClustersRequest::order_by].
653    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
654        self.order_by = v.into();
655        self
656    }
657}
658
659impl wkt::message::Message for ListClustersRequest {
660    fn typename() -> &'static str {
661        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersRequest"
662    }
663}
664
665/// Response message for
666/// [VmwareEngine.ListClusters][google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]
667///
668/// [google.cloud.vmwareengine.v1.VmwareEngine.ListClusters]: crate::client::VmwareEngine::list_clusters
669#[derive(Clone, Default, PartialEq)]
670#[non_exhaustive]
671pub struct ListClustersResponse {
672    /// A list of private cloud clusters.
673    pub clusters: std::vec::Vec<crate::model::Cluster>,
674
675    /// A token, which can be sent as `page_token` to retrieve the next page.
676    /// If this field is omitted, there are no subsequent pages.
677    pub next_page_token: std::string::String,
678
679    /// Locations that could not be reached when making an aggregated query using
680    /// wildcards.
681    pub unreachable: std::vec::Vec<std::string::String>,
682
683    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
684}
685
686impl ListClustersResponse {
687    pub fn new() -> Self {
688        std::default::Default::default()
689    }
690
691    /// Sets the value of [clusters][crate::model::ListClustersResponse::clusters].
692    pub fn set_clusters<T, V>(mut self, v: T) -> Self
693    where
694        T: std::iter::IntoIterator<Item = V>,
695        V: std::convert::Into<crate::model::Cluster>,
696    {
697        use std::iter::Iterator;
698        self.clusters = v.into_iter().map(|i| i.into()).collect();
699        self
700    }
701
702    /// Sets the value of [next_page_token][crate::model::ListClustersResponse::next_page_token].
703    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
704        self.next_page_token = v.into();
705        self
706    }
707
708    /// Sets the value of [unreachable][crate::model::ListClustersResponse::unreachable].
709    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
710    where
711        T: std::iter::IntoIterator<Item = V>,
712        V: std::convert::Into<std::string::String>,
713    {
714        use std::iter::Iterator;
715        self.unreachable = v.into_iter().map(|i| i.into()).collect();
716        self
717    }
718}
719
720impl wkt::message::Message for ListClustersResponse {
721    fn typename() -> &'static str {
722        "type.googleapis.com/google.cloud.vmwareengine.v1.ListClustersResponse"
723    }
724}
725
726#[doc(hidden)]
727impl gax::paginator::internal::PageableResponse for ListClustersResponse {
728    type PageItem = crate::model::Cluster;
729
730    fn items(self) -> std::vec::Vec<Self::PageItem> {
731        self.clusters
732    }
733
734    fn next_page_token(&self) -> std::string::String {
735        use std::clone::Clone;
736        self.next_page_token.clone()
737    }
738}
739
740/// Request message for
741/// [VmwareEngine.GetCluster][google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]
742///
743/// [google.cloud.vmwareengine.v1.VmwareEngine.GetCluster]: crate::client::VmwareEngine::get_cluster
744#[derive(Clone, Default, PartialEq)]
745#[non_exhaustive]
746pub struct GetClusterRequest {
747    /// Required. The cluster resource name to retrieve.
748    /// Resource names are schemeless URIs that follow the conventions in
749    /// <https://cloud.google.com/apis/design/resource_names>.
750    /// For example:
751    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
752    pub name: std::string::String,
753
754    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
755}
756
757impl GetClusterRequest {
758    pub fn new() -> Self {
759        std::default::Default::default()
760    }
761
762    /// Sets the value of [name][crate::model::GetClusterRequest::name].
763    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
764        self.name = v.into();
765        self
766    }
767}
768
769impl wkt::message::Message for GetClusterRequest {
770    fn typename() -> &'static str {
771        "type.googleapis.com/google.cloud.vmwareengine.v1.GetClusterRequest"
772    }
773}
774
775/// Request message for
776/// [VmwareEngine.CreateCluster][google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]
777///
778/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateCluster]: crate::client::VmwareEngine::create_cluster
779#[derive(Clone, Default, PartialEq)]
780#[non_exhaustive]
781pub struct CreateClusterRequest {
782    /// Required. The resource name of the private cloud to create a new cluster
783    /// in. Resource names are schemeless URIs that follow the conventions in
784    /// <https://cloud.google.com/apis/design/resource_names>.
785    /// For example:
786    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
787    pub parent: std::string::String,
788
789    /// Required. The user-provided identifier of the new `Cluster`.
790    /// This identifier must be unique among clusters within the parent and becomes
791    /// the final token in the name URI.
792    /// The identifier must meet the following requirements:
793    ///
794    /// * Only contains 1-63 alphanumeric characters and hyphens
795    /// * Begins with an alphabetical character
796    /// * Ends with a non-hyphen character
797    /// * Not formatted as a UUID
798    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
799    ///   (section 3.5)
800    pub cluster_id: std::string::String,
801
802    /// Required. The initial description of the new cluster.
803    pub cluster: std::option::Option<crate::model::Cluster>,
804
805    /// Optional. The request ID must be a valid UUID with the exception that zero
806    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
807    pub request_id: std::string::String,
808
809    /// Optional. True if you want the request to be validated and not executed;
810    /// false otherwise.
811    pub validate_only: bool,
812
813    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
814}
815
816impl CreateClusterRequest {
817    pub fn new() -> Self {
818        std::default::Default::default()
819    }
820
821    /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
822    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
823        self.parent = v.into();
824        self
825    }
826
827    /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
828    pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
829        self.cluster_id = v.into();
830        self
831    }
832
833    /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
834    pub fn set_cluster<T>(mut self, v: T) -> Self
835    where
836        T: std::convert::Into<crate::model::Cluster>,
837    {
838        self.cluster = std::option::Option::Some(v.into());
839        self
840    }
841
842    /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
843    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
844    where
845        T: std::convert::Into<crate::model::Cluster>,
846    {
847        self.cluster = v.map(|x| x.into());
848        self
849    }
850
851    /// Sets the value of [request_id][crate::model::CreateClusterRequest::request_id].
852    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
853        self.request_id = v.into();
854        self
855    }
856
857    /// Sets the value of [validate_only][crate::model::CreateClusterRequest::validate_only].
858    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
859        self.validate_only = v.into();
860        self
861    }
862}
863
864impl wkt::message::Message for CreateClusterRequest {
865    fn typename() -> &'static str {
866        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateClusterRequest"
867    }
868}
869
870/// Request message for
871/// [VmwareEngine.UpdateCluster][google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]
872///
873/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateCluster]: crate::client::VmwareEngine::update_cluster
874#[derive(Clone, Default, PartialEq)]
875#[non_exhaustive]
876pub struct UpdateClusterRequest {
877    /// Required. Field mask is used to specify the fields to be overwritten in the
878    /// `Cluster` resource by the update. The fields specified in the `updateMask`
879    /// are relative to the resource, not the full request. A field will be
880    /// overwritten if it is in the mask. If the user does not provide a mask then
881    /// all fields will be overwritten.
882    pub update_mask: std::option::Option<wkt::FieldMask>,
883
884    /// Required. The description of the cluster.
885    pub cluster: std::option::Option<crate::model::Cluster>,
886
887    /// Optional. The request ID must be a valid UUID with the exception that
888    /// zero UUID is not supported (00000000-0000-0000-0000-000000000000).
889    pub request_id: std::string::String,
890
891    /// Optional. True if you want the request to be validated and not executed;
892    /// false otherwise.
893    pub validate_only: bool,
894
895    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
896}
897
898impl UpdateClusterRequest {
899    pub fn new() -> Self {
900        std::default::Default::default()
901    }
902
903    /// Sets the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
904    pub fn set_update_mask<T>(mut self, v: T) -> Self
905    where
906        T: std::convert::Into<wkt::FieldMask>,
907    {
908        self.update_mask = std::option::Option::Some(v.into());
909        self
910    }
911
912    /// Sets or clears the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
913    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
914    where
915        T: std::convert::Into<wkt::FieldMask>,
916    {
917        self.update_mask = v.map(|x| x.into());
918        self
919    }
920
921    /// Sets the value of [cluster][crate::model::UpdateClusterRequest::cluster].
922    pub fn set_cluster<T>(mut self, v: T) -> Self
923    where
924        T: std::convert::Into<crate::model::Cluster>,
925    {
926        self.cluster = std::option::Option::Some(v.into());
927        self
928    }
929
930    /// Sets or clears the value of [cluster][crate::model::UpdateClusterRequest::cluster].
931    pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
932    where
933        T: std::convert::Into<crate::model::Cluster>,
934    {
935        self.cluster = v.map(|x| x.into());
936        self
937    }
938
939    /// Sets the value of [request_id][crate::model::UpdateClusterRequest::request_id].
940    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
941        self.request_id = v.into();
942        self
943    }
944
945    /// Sets the value of [validate_only][crate::model::UpdateClusterRequest::validate_only].
946    pub fn set_validate_only<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
947        self.validate_only = v.into();
948        self
949    }
950}
951
952impl wkt::message::Message for UpdateClusterRequest {
953    fn typename() -> &'static str {
954        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateClusterRequest"
955    }
956}
957
958/// Request message for
959/// [VmwareEngine.DeleteCluster][google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]
960///
961/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteCluster]: crate::client::VmwareEngine::delete_cluster
962#[derive(Clone, Default, PartialEq)]
963#[non_exhaustive]
964pub struct DeleteClusterRequest {
965    /// Required. The resource name of the cluster to delete.
966    /// Resource names are schemeless URIs that follow the conventions in
967    /// <https://cloud.google.com/apis/design/resource_names>.
968    /// For example:
969    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
970    pub name: std::string::String,
971
972    /// Optional. The request ID must be a valid UUID with the exception that zero
973    /// UUID is not supported (00000000-0000-0000-0000-000000000000).
974    pub request_id: std::string::String,
975
976    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
977}
978
979impl DeleteClusterRequest {
980    pub fn new() -> Self {
981        std::default::Default::default()
982    }
983
984    /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
985    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
986        self.name = v.into();
987        self
988    }
989
990    /// Sets the value of [request_id][crate::model::DeleteClusterRequest::request_id].
991    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
992        self.request_id = v.into();
993        self
994    }
995}
996
997impl wkt::message::Message for DeleteClusterRequest {
998    fn typename() -> &'static str {
999        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteClusterRequest"
1000    }
1001}
1002
1003/// Request message for
1004/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
1005///
1006/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
1007#[derive(Clone, Default, PartialEq)]
1008#[non_exhaustive]
1009pub struct ListNodesRequest {
1010    /// Required. The resource name of the cluster to be queried for nodes.
1011    /// Resource names are schemeless URIs that follow the conventions in
1012    /// <https://cloud.google.com/apis/design/resource_names>.
1013    /// For example:
1014    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
1015    pub parent: std::string::String,
1016
1017    /// The maximum number of nodes to return in one page.
1018    /// The service may return fewer than this value.
1019    /// The maximum value is coerced to 1000.
1020    /// The default value of this field is 500.
1021    pub page_size: i32,
1022
1023    /// A page token, received from a previous `ListNodes` call.
1024    /// Provide this to retrieve the subsequent page.
1025    ///
1026    /// When paginating, all other parameters provided to
1027    /// `ListNodes` must match the call that provided the page
1028    /// token.
1029    pub page_token: std::string::String,
1030
1031    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1032}
1033
1034impl ListNodesRequest {
1035    pub fn new() -> Self {
1036        std::default::Default::default()
1037    }
1038
1039    /// Sets the value of [parent][crate::model::ListNodesRequest::parent].
1040    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1041        self.parent = v.into();
1042        self
1043    }
1044
1045    /// Sets the value of [page_size][crate::model::ListNodesRequest::page_size].
1046    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1047        self.page_size = v.into();
1048        self
1049    }
1050
1051    /// Sets the value of [page_token][crate::model::ListNodesRequest::page_token].
1052    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1053        self.page_token = v.into();
1054        self
1055    }
1056}
1057
1058impl wkt::message::Message for ListNodesRequest {
1059    fn typename() -> &'static str {
1060        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesRequest"
1061    }
1062}
1063
1064/// Response message for
1065/// [VmwareEngine.ListNodes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]
1066///
1067/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodes]: crate::client::VmwareEngine::list_nodes
1068#[derive(Clone, Default, PartialEq)]
1069#[non_exhaustive]
1070pub struct ListNodesResponse {
1071    /// The nodes.
1072    pub nodes: std::vec::Vec<crate::model::Node>,
1073
1074    /// A token, which can be sent as `page_token` to retrieve the next page.
1075    /// If this field is omitted, there are no subsequent pages.
1076    pub next_page_token: std::string::String,
1077
1078    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1079}
1080
1081impl ListNodesResponse {
1082    pub fn new() -> Self {
1083        std::default::Default::default()
1084    }
1085
1086    /// Sets the value of [nodes][crate::model::ListNodesResponse::nodes].
1087    pub fn set_nodes<T, V>(mut self, v: T) -> Self
1088    where
1089        T: std::iter::IntoIterator<Item = V>,
1090        V: std::convert::Into<crate::model::Node>,
1091    {
1092        use std::iter::Iterator;
1093        self.nodes = v.into_iter().map(|i| i.into()).collect();
1094        self
1095    }
1096
1097    /// Sets the value of [next_page_token][crate::model::ListNodesResponse::next_page_token].
1098    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1099        self.next_page_token = v.into();
1100        self
1101    }
1102}
1103
1104impl wkt::message::Message for ListNodesResponse {
1105    fn typename() -> &'static str {
1106        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodesResponse"
1107    }
1108}
1109
1110#[doc(hidden)]
1111impl gax::paginator::internal::PageableResponse for ListNodesResponse {
1112    type PageItem = crate::model::Node;
1113
1114    fn items(self) -> std::vec::Vec<Self::PageItem> {
1115        self.nodes
1116    }
1117
1118    fn next_page_token(&self) -> std::string::String {
1119        use std::clone::Clone;
1120        self.next_page_token.clone()
1121    }
1122}
1123
1124/// Request message for
1125/// [VmwareEngine.GetNode][google.cloud.vmwareengine.v1.VmwareEngine.GetNode]
1126///
1127/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNode]: crate::client::VmwareEngine::get_node
1128#[derive(Clone, Default, PartialEq)]
1129#[non_exhaustive]
1130pub struct GetNodeRequest {
1131    /// Required. The resource name of the node to retrieve.
1132    /// For example:
1133    /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}`
1134    pub name: std::string::String,
1135
1136    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1137}
1138
1139impl GetNodeRequest {
1140    pub fn new() -> Self {
1141        std::default::Default::default()
1142    }
1143
1144    /// Sets the value of [name][crate::model::GetNodeRequest::name].
1145    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1146        self.name = v.into();
1147        self
1148    }
1149}
1150
1151impl wkt::message::Message for GetNodeRequest {
1152    fn typename() -> &'static str {
1153        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeRequest"
1154    }
1155}
1156
1157/// Request message for
1158/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1159///
1160/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1161#[derive(Clone, Default, PartialEq)]
1162#[non_exhaustive]
1163pub struct ListExternalAddressesRequest {
1164    /// Required. The resource name of the private cloud to be queried for
1165    /// external IP addresses.
1166    /// Resource names are schemeless URIs that follow the conventions in
1167    /// <https://cloud.google.com/apis/design/resource_names>.
1168    /// For example:
1169    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1170    pub parent: std::string::String,
1171
1172    /// The maximum number of external IP addresses to return in one page.
1173    /// The service may return fewer than this value.
1174    /// The maximum value is coerced to 1000.
1175    /// The default value of this field is 500.
1176    pub page_size: i32,
1177
1178    /// A page token, received from a previous `ListExternalAddresses` call.
1179    /// Provide this to retrieve the subsequent page.
1180    ///
1181    /// When paginating, all other parameters provided to
1182    /// `ListExternalAddresses` must match the call that provided the page token.
1183    pub page_token: std::string::String,
1184
1185    /// A filter expression that matches resources returned in the response.
1186    /// The expression must specify the field name, a comparison
1187    /// operator, and the value that you want to use for filtering. The value
1188    /// must be a string, a number, or a boolean. The comparison operator
1189    /// must be `=`, `!=`, `>`, or `<`.
1190    ///
1191    /// For example, if you are filtering a list of IP addresses, you can
1192    /// exclude the ones named `example-ip` by specifying
1193    /// `name != "example-ip"`.
1194    ///
1195    /// To filter on multiple expressions, provide each separate expression within
1196    /// parentheses. For example:
1197    ///
1198    /// ```norust
1199    /// (name = "example-ip")
1200    /// (createTime > "2021-04-12T08:15:10.40Z")
1201    /// ```
1202    ///
1203    /// By default, each expression is an `AND` expression. However, you
1204    /// can include `AND` and `OR` expressions explicitly.
1205    /// For example:
1206    ///
1207    /// ```norust
1208    /// (name = "example-ip-1") AND
1209    /// (createTime > "2021-04-12T08:15:10.40Z") OR
1210    /// (name = "example-ip-2")
1211    /// ```
1212    pub filter: std::string::String,
1213
1214    /// Sorts list results by a certain order. By default, returned results
1215    /// are ordered by `name` in ascending order.
1216    /// You can also sort results in descending order based on the `name` value
1217    /// using `orderBy="name desc"`.
1218    /// Currently, only ordering by `name` is supported.
1219    pub order_by: std::string::String,
1220
1221    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1222}
1223
1224impl ListExternalAddressesRequest {
1225    pub fn new() -> Self {
1226        std::default::Default::default()
1227    }
1228
1229    /// Sets the value of [parent][crate::model::ListExternalAddressesRequest::parent].
1230    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1231        self.parent = v.into();
1232        self
1233    }
1234
1235    /// Sets the value of [page_size][crate::model::ListExternalAddressesRequest::page_size].
1236    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1237        self.page_size = v.into();
1238        self
1239    }
1240
1241    /// Sets the value of [page_token][crate::model::ListExternalAddressesRequest::page_token].
1242    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1243        self.page_token = v.into();
1244        self
1245    }
1246
1247    /// Sets the value of [filter][crate::model::ListExternalAddressesRequest::filter].
1248    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1249        self.filter = v.into();
1250        self
1251    }
1252
1253    /// Sets the value of [order_by][crate::model::ListExternalAddressesRequest::order_by].
1254    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1255        self.order_by = v.into();
1256        self
1257    }
1258}
1259
1260impl wkt::message::Message for ListExternalAddressesRequest {
1261    fn typename() -> &'static str {
1262        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesRequest"
1263    }
1264}
1265
1266/// Response message for
1267/// [VmwareEngine.ListExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]
1268///
1269/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAddresses]: crate::client::VmwareEngine::list_external_addresses
1270#[derive(Clone, Default, PartialEq)]
1271#[non_exhaustive]
1272pub struct ListExternalAddressesResponse {
1273    /// A list of external IP addresses.
1274    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1275
1276    /// A token, which can be sent as `page_token` to retrieve the next page.
1277    /// If this field is omitted, there are no subsequent pages.
1278    pub next_page_token: std::string::String,
1279
1280    /// Locations that could not be reached when making an aggregated query using
1281    /// wildcards.
1282    pub unreachable: std::vec::Vec<std::string::String>,
1283
1284    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1285}
1286
1287impl ListExternalAddressesResponse {
1288    pub fn new() -> Self {
1289        std::default::Default::default()
1290    }
1291
1292    /// Sets the value of [external_addresses][crate::model::ListExternalAddressesResponse::external_addresses].
1293    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1294    where
1295        T: std::iter::IntoIterator<Item = V>,
1296        V: std::convert::Into<crate::model::ExternalAddress>,
1297    {
1298        use std::iter::Iterator;
1299        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1300        self
1301    }
1302
1303    /// Sets the value of [next_page_token][crate::model::ListExternalAddressesResponse::next_page_token].
1304    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1305        self.next_page_token = v.into();
1306        self
1307    }
1308
1309    /// Sets the value of [unreachable][crate::model::ListExternalAddressesResponse::unreachable].
1310    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1311    where
1312        T: std::iter::IntoIterator<Item = V>,
1313        V: std::convert::Into<std::string::String>,
1314    {
1315        use std::iter::Iterator;
1316        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1317        self
1318    }
1319}
1320
1321impl wkt::message::Message for ListExternalAddressesResponse {
1322    fn typename() -> &'static str {
1323        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAddressesResponse"
1324    }
1325}
1326
1327#[doc(hidden)]
1328impl gax::paginator::internal::PageableResponse for ListExternalAddressesResponse {
1329    type PageItem = crate::model::ExternalAddress;
1330
1331    fn items(self) -> std::vec::Vec<Self::PageItem> {
1332        self.external_addresses
1333    }
1334
1335    fn next_page_token(&self) -> std::string::String {
1336        use std::clone::Clone;
1337        self.next_page_token.clone()
1338    }
1339}
1340
1341/// Request message for
1342/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1343///
1344/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
1345#[derive(Clone, Default, PartialEq)]
1346#[non_exhaustive]
1347pub struct FetchNetworkPolicyExternalAddressesRequest {
1348    /// Required. The resource name of the network policy to query for assigned
1349    /// external IP addresses. Resource names are schemeless URIs that follow the
1350    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
1351    /// example:
1352    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
1353    pub network_policy: std::string::String,
1354
1355    /// The maximum number of external IP addresses to return in one page.
1356    /// The service may return fewer than this value.
1357    /// The maximum value is coerced to 1000.
1358    /// The default value of this field is 500.
1359    pub page_size: i32,
1360
1361    /// A page token, received from a previous
1362    /// `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the
1363    /// subsequent page.
1364    ///
1365    /// When paginating, all parameters provided to
1366    /// `FetchNetworkPolicyExternalAddresses`, except for `page_size` and
1367    /// `page_token`, must match the call that provided the page token.
1368    pub page_token: std::string::String,
1369
1370    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1371}
1372
1373impl FetchNetworkPolicyExternalAddressesRequest {
1374    pub fn new() -> Self {
1375        std::default::Default::default()
1376    }
1377
1378    /// Sets the value of [network_policy][crate::model::FetchNetworkPolicyExternalAddressesRequest::network_policy].
1379    pub fn set_network_policy<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1380        self.network_policy = v.into();
1381        self
1382    }
1383
1384    /// Sets the value of [page_size][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_size].
1385    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1386        self.page_size = v.into();
1387        self
1388    }
1389
1390    /// Sets the value of [page_token][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_token].
1391    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1392        self.page_token = v.into();
1393        self
1394    }
1395}
1396
1397impl wkt::message::Message for FetchNetworkPolicyExternalAddressesRequest {
1398    fn typename() -> &'static str {
1399        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesRequest"
1400    }
1401}
1402
1403/// Response message for
1404/// [VmwareEngine.FetchNetworkPolicyExternalAddresses][google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]
1405///
1406/// [google.cloud.vmwareengine.v1.VmwareEngine.FetchNetworkPolicyExternalAddresses]: crate::client::VmwareEngine::fetch_network_policy_external_addresses
1407#[derive(Clone, Default, PartialEq)]
1408#[non_exhaustive]
1409pub struct FetchNetworkPolicyExternalAddressesResponse {
1410    /// A list of external IP addresses assigned to VMware workload VMs within the
1411    /// scope of the given network policy.
1412    pub external_addresses: std::vec::Vec<crate::model::ExternalAddress>,
1413
1414    /// A token, which can be sent as `page_token` to retrieve the next page.
1415    /// If this field is omitted, there are no subsequent pages.
1416    pub next_page_token: std::string::String,
1417
1418    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1419}
1420
1421impl FetchNetworkPolicyExternalAddressesResponse {
1422    pub fn new() -> Self {
1423        std::default::Default::default()
1424    }
1425
1426    /// Sets the value of [external_addresses][crate::model::FetchNetworkPolicyExternalAddressesResponse::external_addresses].
1427    pub fn set_external_addresses<T, V>(mut self, v: T) -> Self
1428    where
1429        T: std::iter::IntoIterator<Item = V>,
1430        V: std::convert::Into<crate::model::ExternalAddress>,
1431    {
1432        use std::iter::Iterator;
1433        self.external_addresses = v.into_iter().map(|i| i.into()).collect();
1434        self
1435    }
1436
1437    /// Sets the value of [next_page_token][crate::model::FetchNetworkPolicyExternalAddressesResponse::next_page_token].
1438    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1439        self.next_page_token = v.into();
1440        self
1441    }
1442}
1443
1444impl wkt::message::Message for FetchNetworkPolicyExternalAddressesResponse {
1445    fn typename() -> &'static str {
1446        "type.googleapis.com/google.cloud.vmwareengine.v1.FetchNetworkPolicyExternalAddressesResponse"
1447    }
1448}
1449
1450#[doc(hidden)]
1451impl gax::paginator::internal::PageableResponse for FetchNetworkPolicyExternalAddressesResponse {
1452    type PageItem = crate::model::ExternalAddress;
1453
1454    fn items(self) -> std::vec::Vec<Self::PageItem> {
1455        self.external_addresses
1456    }
1457
1458    fn next_page_token(&self) -> std::string::String {
1459        use std::clone::Clone;
1460        self.next_page_token.clone()
1461    }
1462}
1463
1464/// Request message for
1465/// [VmwareEngine.GetExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]
1466///
1467/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAddress]: crate::client::VmwareEngine::get_external_address
1468#[derive(Clone, Default, PartialEq)]
1469#[non_exhaustive]
1470pub struct GetExternalAddressRequest {
1471    /// Required. The resource name of the external IP address to retrieve.
1472    /// Resource names are schemeless URIs that follow the conventions in
1473    /// <https://cloud.google.com/apis/design/resource_names>.
1474    /// For example:
1475    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
1476    pub name: std::string::String,
1477
1478    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1479}
1480
1481impl GetExternalAddressRequest {
1482    pub fn new() -> Self {
1483        std::default::Default::default()
1484    }
1485
1486    /// Sets the value of [name][crate::model::GetExternalAddressRequest::name].
1487    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1488        self.name = v.into();
1489        self
1490    }
1491}
1492
1493impl wkt::message::Message for GetExternalAddressRequest {
1494    fn typename() -> &'static str {
1495        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAddressRequest"
1496    }
1497}
1498
1499/// Request message for
1500/// [VmwareEngine.CreateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]
1501///
1502/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAddress]: crate::client::VmwareEngine::create_external_address
1503#[derive(Clone, Default, PartialEq)]
1504#[non_exhaustive]
1505pub struct CreateExternalAddressRequest {
1506    /// Required. The resource name of the private cloud
1507    /// to create a new external IP address in.
1508    /// Resource names are schemeless URIs that follow the conventions in
1509    /// <https://cloud.google.com/apis/design/resource_names>.
1510    /// For example:
1511    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1512    pub parent: std::string::String,
1513
1514    /// Required. The initial description of a new external IP address.
1515    pub external_address: std::option::Option<crate::model::ExternalAddress>,
1516
1517    /// Required. The user-provided identifier of the `ExternalAddress` to be
1518    /// created. This identifier must be unique among `ExternalAddress` resources
1519    /// within the parent and becomes the final token in the name URI. The
1520    /// identifier must meet the following requirements:
1521    ///
1522    /// * Only contains 1-63 alphanumeric characters and hyphens
1523    /// * Begins with an alphabetical character
1524    /// * Ends with a non-hyphen character
1525    /// * Not formatted as a UUID
1526    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
1527    ///   (section 3.5)
1528    pub external_address_id: std::string::String,
1529
1530    /// Optional. A request ID to identify requests. Specify a unique request ID
1531    /// so that if you must retry your request, the server will know to ignore
1532    /// the request if it has already been completed. The server guarantees that a
1533    /// request doesn't result in creation of duplicate commitments for at least 60
1534    /// minutes.
1535    ///
1536    /// For example, consider a situation where you make an initial request and the
1537    /// request times out. If you make the request again with the same request ID,
1538    /// the server can check if the original operation with the same request ID was
1539    /// received, and if so, will ignore the second request. This prevents clients
1540    /// from accidentally creating duplicate commitments.
1541    ///
1542    /// The request ID must be a valid UUID with the exception that zero UUID is
1543    /// not supported (00000000-0000-0000-0000-000000000000).
1544    pub request_id: std::string::String,
1545
1546    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1547}
1548
1549impl CreateExternalAddressRequest {
1550    pub fn new() -> Self {
1551        std::default::Default::default()
1552    }
1553
1554    /// Sets the value of [parent][crate::model::CreateExternalAddressRequest::parent].
1555    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1556        self.parent = v.into();
1557        self
1558    }
1559
1560    /// Sets the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
1561    pub fn set_external_address<T>(mut self, v: T) -> Self
1562    where
1563        T: std::convert::Into<crate::model::ExternalAddress>,
1564    {
1565        self.external_address = std::option::Option::Some(v.into());
1566        self
1567    }
1568
1569    /// Sets or clears the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
1570    pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
1571    where
1572        T: std::convert::Into<crate::model::ExternalAddress>,
1573    {
1574        self.external_address = v.map(|x| x.into());
1575        self
1576    }
1577
1578    /// Sets the value of [external_address_id][crate::model::CreateExternalAddressRequest::external_address_id].
1579    pub fn set_external_address_id<T: std::convert::Into<std::string::String>>(
1580        mut self,
1581        v: T,
1582    ) -> Self {
1583        self.external_address_id = v.into();
1584        self
1585    }
1586
1587    /// Sets the value of [request_id][crate::model::CreateExternalAddressRequest::request_id].
1588    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1589        self.request_id = v.into();
1590        self
1591    }
1592}
1593
1594impl wkt::message::Message for CreateExternalAddressRequest {
1595    fn typename() -> &'static str {
1596        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAddressRequest"
1597    }
1598}
1599
1600/// Request message for
1601/// [VmwareEngine.UpdateExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]
1602///
1603/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAddress]: crate::client::VmwareEngine::update_external_address
1604#[derive(Clone, Default, PartialEq)]
1605#[non_exhaustive]
1606pub struct UpdateExternalAddressRequest {
1607    /// Required. Field mask is used to specify the fields to be overwritten in the
1608    /// `ExternalAddress` resource by the update.
1609    /// The fields specified in the `update_mask` are relative to the resource, not
1610    /// the full request. A field will be overwritten if it is in the mask. If the
1611    /// user does not provide a mask then all fields will be overwritten.
1612    pub update_mask: std::option::Option<wkt::FieldMask>,
1613
1614    /// Required. External IP address description.
1615    pub external_address: std::option::Option<crate::model::ExternalAddress>,
1616
1617    /// Optional. A request ID to identify requests. Specify a unique request ID
1618    /// so that if you must retry your request, the server will know to ignore
1619    /// the request if it has already been completed. The server guarantees that a
1620    /// request doesn't result in creation of duplicate commitments for at least 60
1621    /// minutes.
1622    ///
1623    /// For example, consider a situation where you make an initial request and the
1624    /// request times out. If you make the request again with the same request ID,
1625    /// the server can check if the original operation with the same request ID was
1626    /// received, and if so, will ignore the second request. This prevents clients
1627    /// from accidentally creating duplicate commitments.
1628    ///
1629    /// The request ID must be a valid UUID with the exception that zero UUID is
1630    /// not supported (00000000-0000-0000-0000-000000000000).
1631    pub request_id: std::string::String,
1632
1633    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1634}
1635
1636impl UpdateExternalAddressRequest {
1637    pub fn new() -> Self {
1638        std::default::Default::default()
1639    }
1640
1641    /// Sets the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
1642    pub fn set_update_mask<T>(mut self, v: T) -> Self
1643    where
1644        T: std::convert::Into<wkt::FieldMask>,
1645    {
1646        self.update_mask = std::option::Option::Some(v.into());
1647        self
1648    }
1649
1650    /// Sets or clears the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
1651    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1652    where
1653        T: std::convert::Into<wkt::FieldMask>,
1654    {
1655        self.update_mask = v.map(|x| x.into());
1656        self
1657    }
1658
1659    /// Sets the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
1660    pub fn set_external_address<T>(mut self, v: T) -> Self
1661    where
1662        T: std::convert::Into<crate::model::ExternalAddress>,
1663    {
1664        self.external_address = std::option::Option::Some(v.into());
1665        self
1666    }
1667
1668    /// Sets or clears the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
1669    pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
1670    where
1671        T: std::convert::Into<crate::model::ExternalAddress>,
1672    {
1673        self.external_address = v.map(|x| x.into());
1674        self
1675    }
1676
1677    /// Sets the value of [request_id][crate::model::UpdateExternalAddressRequest::request_id].
1678    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1679        self.request_id = v.into();
1680        self
1681    }
1682}
1683
1684impl wkt::message::Message for UpdateExternalAddressRequest {
1685    fn typename() -> &'static str {
1686        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAddressRequest"
1687    }
1688}
1689
1690/// Request message for
1691/// [VmwareEngine.DeleteExternalAddress][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]
1692///
1693/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAddress]: crate::client::VmwareEngine::delete_external_address
1694#[derive(Clone, Default, PartialEq)]
1695#[non_exhaustive]
1696pub struct DeleteExternalAddressRequest {
1697    /// Required. The resource name of the external IP address to delete.
1698    /// Resource names are schemeless URIs that follow the conventions in
1699    /// <https://cloud.google.com/apis/design/resource_names>.
1700    /// For example:
1701    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`
1702    pub name: std::string::String,
1703
1704    /// Optional. A request ID to identify requests. Specify a unique request ID
1705    /// so that if you must retry your request, the server will know to ignore
1706    /// the request if it has already been completed. The server guarantees that a
1707    /// request doesn't result in creation of duplicate commitments for at least 60
1708    /// minutes.
1709    ///
1710    /// For example, consider a situation where you make an initial request and the
1711    /// request times out. If you make the request again with the same request
1712    /// ID, the server can check if the original operation with the same request ID
1713    /// was received, and if so, will ignore the second request. This prevents
1714    /// clients from accidentally creating duplicate commitments.
1715    ///
1716    /// The request ID must be a valid UUID with the exception that zero UUID is
1717    /// not supported (00000000-0000-0000-0000-000000000000).
1718    pub request_id: std::string::String,
1719
1720    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1721}
1722
1723impl DeleteExternalAddressRequest {
1724    pub fn new() -> Self {
1725        std::default::Default::default()
1726    }
1727
1728    /// Sets the value of [name][crate::model::DeleteExternalAddressRequest::name].
1729    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1730        self.name = v.into();
1731        self
1732    }
1733
1734    /// Sets the value of [request_id][crate::model::DeleteExternalAddressRequest::request_id].
1735    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1736        self.request_id = v.into();
1737        self
1738    }
1739}
1740
1741impl wkt::message::Message for DeleteExternalAddressRequest {
1742    fn typename() -> &'static str {
1743        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAddressRequest"
1744    }
1745}
1746
1747/// Request message for
1748/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
1749///
1750/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
1751#[derive(Clone, Default, PartialEq)]
1752#[non_exhaustive]
1753pub struct ListSubnetsRequest {
1754    /// Required. The resource name of the private cloud to be queried for
1755    /// subnets.
1756    /// Resource names are schemeless URIs that follow the conventions in
1757    /// <https://cloud.google.com/apis/design/resource_names>.
1758    /// For example:
1759    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
1760    pub parent: std::string::String,
1761
1762    /// The maximum number of subnets to return in one page.
1763    /// The service may return fewer than this value.
1764    /// The maximum value is coerced to 1000.
1765    /// The default value of this field is 500.
1766    pub page_size: i32,
1767
1768    /// A page token, received from a previous `ListSubnetsRequest` call.
1769    /// Provide this to retrieve the subsequent page.
1770    ///
1771    /// When paginating, all other parameters provided to
1772    /// `ListSubnetsRequest` must match the call that provided the page token.
1773    pub page_token: std::string::String,
1774
1775    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1776}
1777
1778impl ListSubnetsRequest {
1779    pub fn new() -> Self {
1780        std::default::Default::default()
1781    }
1782
1783    /// Sets the value of [parent][crate::model::ListSubnetsRequest::parent].
1784    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1785        self.parent = v.into();
1786        self
1787    }
1788
1789    /// Sets the value of [page_size][crate::model::ListSubnetsRequest::page_size].
1790    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
1791        self.page_size = v.into();
1792        self
1793    }
1794
1795    /// Sets the value of [page_token][crate::model::ListSubnetsRequest::page_token].
1796    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1797        self.page_token = v.into();
1798        self
1799    }
1800}
1801
1802impl wkt::message::Message for ListSubnetsRequest {
1803    fn typename() -> &'static str {
1804        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsRequest"
1805    }
1806}
1807
1808/// Response message for
1809/// [VmwareEngine.ListSubnets][google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]
1810///
1811/// [google.cloud.vmwareengine.v1.VmwareEngine.ListSubnets]: crate::client::VmwareEngine::list_subnets
1812#[derive(Clone, Default, PartialEq)]
1813#[non_exhaustive]
1814pub struct ListSubnetsResponse {
1815    /// A list of subnets.
1816    pub subnets: std::vec::Vec<crate::model::Subnet>,
1817
1818    /// A token, which can be sent as `page_token` to retrieve the next page.
1819    /// If this field is omitted, there are no subsequent pages.
1820    pub next_page_token: std::string::String,
1821
1822    /// Locations that could not be reached when making an aggregated query using
1823    /// wildcards.
1824    pub unreachable: std::vec::Vec<std::string::String>,
1825
1826    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1827}
1828
1829impl ListSubnetsResponse {
1830    pub fn new() -> Self {
1831        std::default::Default::default()
1832    }
1833
1834    /// Sets the value of [subnets][crate::model::ListSubnetsResponse::subnets].
1835    pub fn set_subnets<T, V>(mut self, v: T) -> Self
1836    where
1837        T: std::iter::IntoIterator<Item = V>,
1838        V: std::convert::Into<crate::model::Subnet>,
1839    {
1840        use std::iter::Iterator;
1841        self.subnets = v.into_iter().map(|i| i.into()).collect();
1842        self
1843    }
1844
1845    /// Sets the value of [next_page_token][crate::model::ListSubnetsResponse::next_page_token].
1846    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1847        self.next_page_token = v.into();
1848        self
1849    }
1850
1851    /// Sets the value of [unreachable][crate::model::ListSubnetsResponse::unreachable].
1852    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
1853    where
1854        T: std::iter::IntoIterator<Item = V>,
1855        V: std::convert::Into<std::string::String>,
1856    {
1857        use std::iter::Iterator;
1858        self.unreachable = v.into_iter().map(|i| i.into()).collect();
1859        self
1860    }
1861}
1862
1863impl wkt::message::Message for ListSubnetsResponse {
1864    fn typename() -> &'static str {
1865        "type.googleapis.com/google.cloud.vmwareengine.v1.ListSubnetsResponse"
1866    }
1867}
1868
1869#[doc(hidden)]
1870impl gax::paginator::internal::PageableResponse for ListSubnetsResponse {
1871    type PageItem = crate::model::Subnet;
1872
1873    fn items(self) -> std::vec::Vec<Self::PageItem> {
1874        self.subnets
1875    }
1876
1877    fn next_page_token(&self) -> std::string::String {
1878        use std::clone::Clone;
1879        self.next_page_token.clone()
1880    }
1881}
1882
1883/// Request message for
1884/// [VmwareEngine.GetSubnet][google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]
1885///
1886/// [google.cloud.vmwareengine.v1.VmwareEngine.GetSubnet]: crate::client::VmwareEngine::get_subnet
1887#[derive(Clone, Default, PartialEq)]
1888#[non_exhaustive]
1889pub struct GetSubnetRequest {
1890    /// Required. The resource name of the subnet to retrieve.
1891    /// Resource names are schemeless URIs that follow the conventions in
1892    /// <https://cloud.google.com/apis/design/resource_names>.
1893    /// For example:
1894    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
1895    pub name: std::string::String,
1896
1897    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1898}
1899
1900impl GetSubnetRequest {
1901    pub fn new() -> Self {
1902        std::default::Default::default()
1903    }
1904
1905    /// Sets the value of [name][crate::model::GetSubnetRequest::name].
1906    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
1907        self.name = v.into();
1908        self
1909    }
1910}
1911
1912impl wkt::message::Message for GetSubnetRequest {
1913    fn typename() -> &'static str {
1914        "type.googleapis.com/google.cloud.vmwareengine.v1.GetSubnetRequest"
1915    }
1916}
1917
1918/// Request message for
1919/// [VmwareEngine.UpdateSubnet][google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]
1920///
1921/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateSubnet]: crate::client::VmwareEngine::update_subnet
1922#[derive(Clone, Default, PartialEq)]
1923#[non_exhaustive]
1924pub struct UpdateSubnetRequest {
1925    /// Required. Field mask is used to specify the fields to be overwritten in the
1926    /// `Subnet` resource by the update.
1927    /// The fields specified in the `update_mask` are relative to the resource, not
1928    /// the full request. A field will be overwritten if it is in the mask. If the
1929    /// user does not provide a mask then all fields will be overwritten.
1930    pub update_mask: std::option::Option<wkt::FieldMask>,
1931
1932    /// Required. Subnet description.
1933    pub subnet: std::option::Option<crate::model::Subnet>,
1934
1935    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1936}
1937
1938impl UpdateSubnetRequest {
1939    pub fn new() -> Self {
1940        std::default::Default::default()
1941    }
1942
1943    /// Sets the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
1944    pub fn set_update_mask<T>(mut self, v: T) -> Self
1945    where
1946        T: std::convert::Into<wkt::FieldMask>,
1947    {
1948        self.update_mask = std::option::Option::Some(v.into());
1949        self
1950    }
1951
1952    /// Sets or clears the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
1953    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1954    where
1955        T: std::convert::Into<wkt::FieldMask>,
1956    {
1957        self.update_mask = v.map(|x| x.into());
1958        self
1959    }
1960
1961    /// Sets the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
1962    pub fn set_subnet<T>(mut self, v: T) -> Self
1963    where
1964        T: std::convert::Into<crate::model::Subnet>,
1965    {
1966        self.subnet = std::option::Option::Some(v.into());
1967        self
1968    }
1969
1970    /// Sets or clears the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
1971    pub fn set_or_clear_subnet<T>(mut self, v: std::option::Option<T>) -> Self
1972    where
1973        T: std::convert::Into<crate::model::Subnet>,
1974    {
1975        self.subnet = v.map(|x| x.into());
1976        self
1977    }
1978}
1979
1980impl wkt::message::Message for UpdateSubnetRequest {
1981    fn typename() -> &'static str {
1982        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateSubnetRequest"
1983    }
1984}
1985
1986/// Request message for
1987/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
1988///
1989/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
1990#[derive(Clone, Default, PartialEq)]
1991#[non_exhaustive]
1992pub struct ListExternalAccessRulesRequest {
1993    /// Required. The resource name of the network policy to query for external
1994    /// access firewall rules. Resource names are schemeless URIs that follow the
1995    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
1996    /// example:
1997    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
1998    pub parent: std::string::String,
1999
2000    /// The maximum number of external access rules to return in one page.
2001    /// The service may return fewer than this value.
2002    /// The maximum value is coerced to 1000.
2003    /// The default value of this field is 500.
2004    pub page_size: i32,
2005
2006    /// A page token, received from a previous `ListExternalAccessRulesRequest`
2007    /// call. Provide this to retrieve the subsequent page.
2008    ///
2009    /// When paginating, all other parameters provided to
2010    /// `ListExternalAccessRulesRequest` must match the call that provided the page
2011    /// token.
2012    pub page_token: std::string::String,
2013
2014    /// A filter expression that matches resources returned in the response.
2015    /// The expression must specify the field name, a comparison
2016    /// operator, and the value that you want to use for filtering. The value
2017    /// must be a string, a number, or a boolean. The comparison operator
2018    /// must be `=`, `!=`, `>`, or `<`.
2019    ///
2020    /// For example, if you are filtering a list of external access rules, you can
2021    /// exclude the ones named `example-rule` by specifying
2022    /// `name != "example-rule"`.
2023    ///
2024    /// To filter on multiple expressions, provide each separate expression within
2025    /// parentheses. For example:
2026    ///
2027    /// ```norust
2028    /// (name = "example-rule")
2029    /// (createTime > "2021-04-12T08:15:10.40Z")
2030    /// ```
2031    ///
2032    /// By default, each expression is an `AND` expression. However, you
2033    /// can include `AND` and `OR` expressions explicitly.
2034    /// For example:
2035    ///
2036    /// ```norust
2037    /// (name = "example-rule-1") AND
2038    /// (createTime > "2021-04-12T08:15:10.40Z") OR
2039    /// (name = "example-rule-2")
2040    /// ```
2041    pub filter: std::string::String,
2042
2043    /// Sorts list results by a certain order. By default, returned results
2044    /// are ordered by `name` in ascending order.
2045    /// You can also sort results in descending order based on the `name` value
2046    /// using `orderBy="name desc"`.
2047    /// Currently, only ordering by `name` is supported.
2048    pub order_by: std::string::String,
2049
2050    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2051}
2052
2053impl ListExternalAccessRulesRequest {
2054    pub fn new() -> Self {
2055        std::default::Default::default()
2056    }
2057
2058    /// Sets the value of [parent][crate::model::ListExternalAccessRulesRequest::parent].
2059    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2060        self.parent = v.into();
2061        self
2062    }
2063
2064    /// Sets the value of [page_size][crate::model::ListExternalAccessRulesRequest::page_size].
2065    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2066        self.page_size = v.into();
2067        self
2068    }
2069
2070    /// Sets the value of [page_token][crate::model::ListExternalAccessRulesRequest::page_token].
2071    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2072        self.page_token = v.into();
2073        self
2074    }
2075
2076    /// Sets the value of [filter][crate::model::ListExternalAccessRulesRequest::filter].
2077    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2078        self.filter = v.into();
2079        self
2080    }
2081
2082    /// Sets the value of [order_by][crate::model::ListExternalAccessRulesRequest::order_by].
2083    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2084        self.order_by = v.into();
2085        self
2086    }
2087}
2088
2089impl wkt::message::Message for ListExternalAccessRulesRequest {
2090    fn typename() -> &'static str {
2091        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesRequest"
2092    }
2093}
2094
2095/// Response message for
2096/// [VmwareEngine.ListExternalAccessRules][google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]
2097///
2098/// [google.cloud.vmwareengine.v1.VmwareEngine.ListExternalAccessRules]: crate::client::VmwareEngine::list_external_access_rules
2099#[derive(Clone, Default, PartialEq)]
2100#[non_exhaustive]
2101pub struct ListExternalAccessRulesResponse {
2102    /// A list of external access firewall rules.
2103    pub external_access_rules: std::vec::Vec<crate::model::ExternalAccessRule>,
2104
2105    /// A token, which can be sent as `page_token` to retrieve the next page.
2106    /// If this field is omitted, there are no subsequent pages.
2107    pub next_page_token: std::string::String,
2108
2109    /// Locations that could not be reached when making an aggregated query using
2110    /// wildcards.
2111    pub unreachable: std::vec::Vec<std::string::String>,
2112
2113    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2114}
2115
2116impl ListExternalAccessRulesResponse {
2117    pub fn new() -> Self {
2118        std::default::Default::default()
2119    }
2120
2121    /// Sets the value of [external_access_rules][crate::model::ListExternalAccessRulesResponse::external_access_rules].
2122    pub fn set_external_access_rules<T, V>(mut self, v: T) -> Self
2123    where
2124        T: std::iter::IntoIterator<Item = V>,
2125        V: std::convert::Into<crate::model::ExternalAccessRule>,
2126    {
2127        use std::iter::Iterator;
2128        self.external_access_rules = v.into_iter().map(|i| i.into()).collect();
2129        self
2130    }
2131
2132    /// Sets the value of [next_page_token][crate::model::ListExternalAccessRulesResponse::next_page_token].
2133    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2134        self.next_page_token = v.into();
2135        self
2136    }
2137
2138    /// Sets the value of [unreachable][crate::model::ListExternalAccessRulesResponse::unreachable].
2139    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2140    where
2141        T: std::iter::IntoIterator<Item = V>,
2142        V: std::convert::Into<std::string::String>,
2143    {
2144        use std::iter::Iterator;
2145        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2146        self
2147    }
2148}
2149
2150impl wkt::message::Message for ListExternalAccessRulesResponse {
2151    fn typename() -> &'static str {
2152        "type.googleapis.com/google.cloud.vmwareengine.v1.ListExternalAccessRulesResponse"
2153    }
2154}
2155
2156#[doc(hidden)]
2157impl gax::paginator::internal::PageableResponse for ListExternalAccessRulesResponse {
2158    type PageItem = crate::model::ExternalAccessRule;
2159
2160    fn items(self) -> std::vec::Vec<Self::PageItem> {
2161        self.external_access_rules
2162    }
2163
2164    fn next_page_token(&self) -> std::string::String {
2165        use std::clone::Clone;
2166        self.next_page_token.clone()
2167    }
2168}
2169
2170/// Request message for
2171/// [VmwareEngine.GetExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]
2172///
2173/// [google.cloud.vmwareengine.v1.VmwareEngine.GetExternalAccessRule]: crate::client::VmwareEngine::get_external_access_rule
2174#[derive(Clone, Default, PartialEq)]
2175#[non_exhaustive]
2176pub struct GetExternalAccessRuleRequest {
2177    /// Required. The resource name of the external access firewall rule to
2178    /// retrieve. Resource names are schemeless URIs that follow the conventions in
2179    /// <https://cloud.google.com/apis/design/resource_names>.
2180    /// For example:
2181    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
2182    pub name: std::string::String,
2183
2184    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2185}
2186
2187impl GetExternalAccessRuleRequest {
2188    pub fn new() -> Self {
2189        std::default::Default::default()
2190    }
2191
2192    /// Sets the value of [name][crate::model::GetExternalAccessRuleRequest::name].
2193    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2194        self.name = v.into();
2195        self
2196    }
2197}
2198
2199impl wkt::message::Message for GetExternalAccessRuleRequest {
2200    fn typename() -> &'static str {
2201        "type.googleapis.com/google.cloud.vmwareengine.v1.GetExternalAccessRuleRequest"
2202    }
2203}
2204
2205/// Request message for
2206/// [VmwareEngine.CreateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]
2207///
2208/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateExternalAccessRule]: crate::client::VmwareEngine::create_external_access_rule
2209#[derive(Clone, Default, PartialEq)]
2210#[non_exhaustive]
2211pub struct CreateExternalAccessRuleRequest {
2212    /// Required. The resource name of the network policy
2213    /// to create a new external access firewall rule in.
2214    /// Resource names are schemeless URIs that follow the conventions in
2215    /// <https://cloud.google.com/apis/design/resource_names>.
2216    /// For example:
2217    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy`
2218    pub parent: std::string::String,
2219
2220    /// Required. The initial description of a new external access rule.
2221    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2222
2223    /// Required. The user-provided identifier of the `ExternalAccessRule` to be
2224    /// created. This identifier must be unique among `ExternalAccessRule`
2225    /// resources within the parent and becomes the final token in the name URI.
2226    /// The identifier must meet the following requirements:
2227    ///
2228    /// * Only contains 1-63 alphanumeric characters and hyphens
2229    /// * Begins with an alphabetical character
2230    /// * Ends with a non-hyphen character
2231    /// * Not formatted as a UUID
2232    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
2233    ///   (section 3.5)
2234    pub external_access_rule_id: std::string::String,
2235
2236    /// A request ID to identify requests. Specify a unique request ID
2237    /// so that if you must retry your request, the server will know to ignore
2238    /// the request if it has already been completed. The server guarantees that a
2239    /// request doesn't result in creation of duplicate commitments for at least 60
2240    /// minutes.
2241    ///
2242    /// For example, consider a situation where you make an initial request and the
2243    /// request times out. If you make the request again with the same request ID,
2244    /// the server can check if the original operation with the same request ID was
2245    /// received, and if so, will ignore the second request. This prevents clients
2246    /// from accidentally creating duplicate commitments.
2247    ///
2248    /// The request ID must be a valid UUID with the exception that zero UUID is
2249    /// not supported (00000000-0000-0000-0000-000000000000).
2250    pub request_id: std::string::String,
2251
2252    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2253}
2254
2255impl CreateExternalAccessRuleRequest {
2256    pub fn new() -> Self {
2257        std::default::Default::default()
2258    }
2259
2260    /// Sets the value of [parent][crate::model::CreateExternalAccessRuleRequest::parent].
2261    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2262        self.parent = v.into();
2263        self
2264    }
2265
2266    /// Sets the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
2267    pub fn set_external_access_rule<T>(mut self, v: T) -> Self
2268    where
2269        T: std::convert::Into<crate::model::ExternalAccessRule>,
2270    {
2271        self.external_access_rule = std::option::Option::Some(v.into());
2272        self
2273    }
2274
2275    /// Sets or clears the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
2276    pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
2277    where
2278        T: std::convert::Into<crate::model::ExternalAccessRule>,
2279    {
2280        self.external_access_rule = v.map(|x| x.into());
2281        self
2282    }
2283
2284    /// Sets the value of [external_access_rule_id][crate::model::CreateExternalAccessRuleRequest::external_access_rule_id].
2285    pub fn set_external_access_rule_id<T: std::convert::Into<std::string::String>>(
2286        mut self,
2287        v: T,
2288    ) -> Self {
2289        self.external_access_rule_id = v.into();
2290        self
2291    }
2292
2293    /// Sets the value of [request_id][crate::model::CreateExternalAccessRuleRequest::request_id].
2294    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2295        self.request_id = v.into();
2296        self
2297    }
2298}
2299
2300impl wkt::message::Message for CreateExternalAccessRuleRequest {
2301    fn typename() -> &'static str {
2302        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateExternalAccessRuleRequest"
2303    }
2304}
2305
2306/// Request message for
2307/// [VmwareEngine.UpdateExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]
2308///
2309/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateExternalAccessRule]: crate::client::VmwareEngine::update_external_access_rule
2310#[derive(Clone, Default, PartialEq)]
2311#[non_exhaustive]
2312pub struct UpdateExternalAccessRuleRequest {
2313    /// Required. Field mask is used to specify the fields to be overwritten in the
2314    /// `ExternalAccessRule` resource by the update.
2315    /// The fields specified in the `update_mask` are relative to the resource, not
2316    /// the full request. A field will be overwritten if it is in the mask. If the
2317    /// user does not provide a mask then all fields will be overwritten.
2318    pub update_mask: std::option::Option<wkt::FieldMask>,
2319
2320    /// Required. Description of the external access rule.
2321    pub external_access_rule: std::option::Option<crate::model::ExternalAccessRule>,
2322
2323    /// Optional. A request ID to identify requests. Specify a unique request ID
2324    /// so that if you must retry your request, the server will know to ignore
2325    /// the request if it has already been completed. The server guarantees that a
2326    /// request doesn't result in creation of duplicate commitments for at least 60
2327    /// minutes.
2328    ///
2329    /// For example, consider a situation where you make an initial request and the
2330    /// request times out. If you make the request again with the same request ID,
2331    /// the server can check if the original operation with the same request ID was
2332    /// received, and if so, will ignore the second request. This prevents clients
2333    /// from accidentally creating duplicate commitments.
2334    ///
2335    /// The request ID must be a valid UUID with the exception that zero UUID is
2336    /// not supported (00000000-0000-0000-0000-000000000000).
2337    pub request_id: std::string::String,
2338
2339    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2340}
2341
2342impl UpdateExternalAccessRuleRequest {
2343    pub fn new() -> Self {
2344        std::default::Default::default()
2345    }
2346
2347    /// Sets the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
2348    pub fn set_update_mask<T>(mut self, v: T) -> Self
2349    where
2350        T: std::convert::Into<wkt::FieldMask>,
2351    {
2352        self.update_mask = std::option::Option::Some(v.into());
2353        self
2354    }
2355
2356    /// Sets or clears the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
2357    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2358    where
2359        T: std::convert::Into<wkt::FieldMask>,
2360    {
2361        self.update_mask = v.map(|x| x.into());
2362        self
2363    }
2364
2365    /// Sets the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
2366    pub fn set_external_access_rule<T>(mut self, v: T) -> Self
2367    where
2368        T: std::convert::Into<crate::model::ExternalAccessRule>,
2369    {
2370        self.external_access_rule = std::option::Option::Some(v.into());
2371        self
2372    }
2373
2374    /// Sets or clears the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
2375    pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
2376    where
2377        T: std::convert::Into<crate::model::ExternalAccessRule>,
2378    {
2379        self.external_access_rule = v.map(|x| x.into());
2380        self
2381    }
2382
2383    /// Sets the value of [request_id][crate::model::UpdateExternalAccessRuleRequest::request_id].
2384    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2385        self.request_id = v.into();
2386        self
2387    }
2388}
2389
2390impl wkt::message::Message for UpdateExternalAccessRuleRequest {
2391    fn typename() -> &'static str {
2392        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateExternalAccessRuleRequest"
2393    }
2394}
2395
2396/// Request message for
2397/// [VmwareEngine.DeleteExternalAccessRule][google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]
2398///
2399/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteExternalAccessRule]: crate::client::VmwareEngine::delete_external_access_rule
2400#[derive(Clone, Default, PartialEq)]
2401#[non_exhaustive]
2402pub struct DeleteExternalAccessRuleRequest {
2403    /// Required. The resource name of the external access firewall rule to delete.
2404    /// Resource names are schemeless URIs that follow the conventions in
2405    /// <https://cloud.google.com/apis/design/resource_names>.
2406    /// For example:
2407    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
2408    pub name: std::string::String,
2409
2410    /// Optional. A request ID to identify requests. Specify a unique request ID
2411    /// so that if you must retry your request, the server will know to ignore
2412    /// the request if it has already been completed. The server guarantees that a
2413    /// request doesn't result in creation of duplicate commitments for at least 60
2414    /// minutes.
2415    ///
2416    /// For example, consider a situation where you make an initial request and the
2417    /// request times out. If you make the request again with the same request
2418    /// ID, the server can check if the original operation with the same request ID
2419    /// was received, and if so, will ignore the second request. This prevents
2420    /// clients from accidentally creating duplicate commitments.
2421    ///
2422    /// The request ID must be a valid UUID with the exception that zero UUID is
2423    /// not supported (00000000-0000-0000-0000-000000000000).
2424    pub request_id: std::string::String,
2425
2426    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2427}
2428
2429impl DeleteExternalAccessRuleRequest {
2430    pub fn new() -> Self {
2431        std::default::Default::default()
2432    }
2433
2434    /// Sets the value of [name][crate::model::DeleteExternalAccessRuleRequest::name].
2435    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2436        self.name = v.into();
2437        self
2438    }
2439
2440    /// Sets the value of [request_id][crate::model::DeleteExternalAccessRuleRequest::request_id].
2441    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2442        self.request_id = v.into();
2443        self
2444    }
2445}
2446
2447impl wkt::message::Message for DeleteExternalAccessRuleRequest {
2448    fn typename() -> &'static str {
2449        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteExternalAccessRuleRequest"
2450    }
2451}
2452
2453/// Request message for
2454/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
2455///
2456/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
2457#[derive(Clone, Default, PartialEq)]
2458#[non_exhaustive]
2459pub struct ListLoggingServersRequest {
2460    /// Required. The resource name of the private cloud to be queried for
2461    /// logging servers.
2462    /// Resource names are schemeless URIs that follow the conventions in
2463    /// <https://cloud.google.com/apis/design/resource_names>.
2464    /// For example:
2465    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
2466    pub parent: std::string::String,
2467
2468    /// The maximum number of logging servers to return in one page.
2469    /// The service may return fewer than this value.
2470    /// The maximum value is coerced to 1000.
2471    /// The default value of this field is 500.
2472    pub page_size: i32,
2473
2474    /// A page token, received from a previous `ListLoggingServersRequest` call.
2475    /// Provide this to retrieve the subsequent page.
2476    ///
2477    /// When paginating, all other parameters provided to
2478    /// `ListLoggingServersRequest` must match the call that provided the page
2479    /// token.
2480    pub page_token: std::string::String,
2481
2482    /// A filter expression that matches resources returned in the response.
2483    /// The expression must specify the field name, a comparison
2484    /// operator, and the value that you want to use for filtering. The value
2485    /// must be a string, a number, or a boolean. The comparison operator
2486    /// must be `=`, `!=`, `>`, or `<`.
2487    ///
2488    /// For example, if you are filtering a list of logging servers, you can
2489    /// exclude the ones named `example-server` by specifying
2490    /// `name != "example-server"`.
2491    ///
2492    /// To filter on multiple expressions, provide each separate expression within
2493    /// parentheses. For example:
2494    ///
2495    /// ```norust
2496    /// (name = "example-server")
2497    /// (createTime > "2021-04-12T08:15:10.40Z")
2498    /// ```
2499    ///
2500    /// By default, each expression is an `AND` expression. However, you
2501    /// can include `AND` and `OR` expressions explicitly.
2502    /// For example:
2503    ///
2504    /// ```norust
2505    /// (name = "example-server-1") AND
2506    /// (createTime > "2021-04-12T08:15:10.40Z") OR
2507    /// (name = "example-server-2")
2508    /// ```
2509    pub filter: std::string::String,
2510
2511    /// Sorts list results by a certain order. By default, returned results
2512    /// are ordered by `name` in ascending order.
2513    /// You can also sort results in descending order based on the `name` value
2514    /// using `orderBy="name desc"`.
2515    /// Currently, only ordering by `name` is supported.
2516    pub order_by: std::string::String,
2517
2518    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2519}
2520
2521impl ListLoggingServersRequest {
2522    pub fn new() -> Self {
2523        std::default::Default::default()
2524    }
2525
2526    /// Sets the value of [parent][crate::model::ListLoggingServersRequest::parent].
2527    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2528        self.parent = v.into();
2529        self
2530    }
2531
2532    /// Sets the value of [page_size][crate::model::ListLoggingServersRequest::page_size].
2533    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2534        self.page_size = v.into();
2535        self
2536    }
2537
2538    /// Sets the value of [page_token][crate::model::ListLoggingServersRequest::page_token].
2539    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2540        self.page_token = v.into();
2541        self
2542    }
2543
2544    /// Sets the value of [filter][crate::model::ListLoggingServersRequest::filter].
2545    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2546        self.filter = v.into();
2547        self
2548    }
2549
2550    /// Sets the value of [order_by][crate::model::ListLoggingServersRequest::order_by].
2551    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2552        self.order_by = v.into();
2553        self
2554    }
2555}
2556
2557impl wkt::message::Message for ListLoggingServersRequest {
2558    fn typename() -> &'static str {
2559        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersRequest"
2560    }
2561}
2562
2563/// Response message for
2564/// [VmwareEngine.ListLoggingServers][google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]
2565///
2566/// [google.cloud.vmwareengine.v1.VmwareEngine.ListLoggingServers]: crate::client::VmwareEngine::list_logging_servers
2567#[derive(Clone, Default, PartialEq)]
2568#[non_exhaustive]
2569pub struct ListLoggingServersResponse {
2570    /// A list of Logging Servers.
2571    pub logging_servers: std::vec::Vec<crate::model::LoggingServer>,
2572
2573    /// A token, which can be send as `page_token` to retrieve the next page.
2574    /// If this field is omitted, there are no subsequent pages.
2575    pub next_page_token: std::string::String,
2576
2577    /// Locations that could not be reached when making an aggregated query using
2578    /// wildcards.
2579    pub unreachable: std::vec::Vec<std::string::String>,
2580
2581    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2582}
2583
2584impl ListLoggingServersResponse {
2585    pub fn new() -> Self {
2586        std::default::Default::default()
2587    }
2588
2589    /// Sets the value of [logging_servers][crate::model::ListLoggingServersResponse::logging_servers].
2590    pub fn set_logging_servers<T, V>(mut self, v: T) -> Self
2591    where
2592        T: std::iter::IntoIterator<Item = V>,
2593        V: std::convert::Into<crate::model::LoggingServer>,
2594    {
2595        use std::iter::Iterator;
2596        self.logging_servers = v.into_iter().map(|i| i.into()).collect();
2597        self
2598    }
2599
2600    /// Sets the value of [next_page_token][crate::model::ListLoggingServersResponse::next_page_token].
2601    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2602        self.next_page_token = v.into();
2603        self
2604    }
2605
2606    /// Sets the value of [unreachable][crate::model::ListLoggingServersResponse::unreachable].
2607    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2608    where
2609        T: std::iter::IntoIterator<Item = V>,
2610        V: std::convert::Into<std::string::String>,
2611    {
2612        use std::iter::Iterator;
2613        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2614        self
2615    }
2616}
2617
2618impl wkt::message::Message for ListLoggingServersResponse {
2619    fn typename() -> &'static str {
2620        "type.googleapis.com/google.cloud.vmwareengine.v1.ListLoggingServersResponse"
2621    }
2622}
2623
2624#[doc(hidden)]
2625impl gax::paginator::internal::PageableResponse for ListLoggingServersResponse {
2626    type PageItem = crate::model::LoggingServer;
2627
2628    fn items(self) -> std::vec::Vec<Self::PageItem> {
2629        self.logging_servers
2630    }
2631
2632    fn next_page_token(&self) -> std::string::String {
2633        use std::clone::Clone;
2634        self.next_page_token.clone()
2635    }
2636}
2637
2638/// Request message for
2639/// [VmwareEngine.GetLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]
2640///
2641/// [google.cloud.vmwareengine.v1.VmwareEngine.GetLoggingServer]: crate::client::VmwareEngine::get_logging_server
2642#[derive(Clone, Default, PartialEq)]
2643#[non_exhaustive]
2644pub struct GetLoggingServerRequest {
2645    /// Required. The resource name of the Logging Server to retrieve.
2646    /// Resource names are schemeless URIs that follow the conventions in
2647    /// <https://cloud.google.com/apis/design/resource_names>.
2648    /// For example:
2649    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
2650    pub name: std::string::String,
2651
2652    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2653}
2654
2655impl GetLoggingServerRequest {
2656    pub fn new() -> Self {
2657        std::default::Default::default()
2658    }
2659
2660    /// Sets the value of [name][crate::model::GetLoggingServerRequest::name].
2661    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2662        self.name = v.into();
2663        self
2664    }
2665}
2666
2667impl wkt::message::Message for GetLoggingServerRequest {
2668    fn typename() -> &'static str {
2669        "type.googleapis.com/google.cloud.vmwareengine.v1.GetLoggingServerRequest"
2670    }
2671}
2672
2673/// Request message for
2674/// [VmwareEngine.CreateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]
2675///
2676/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateLoggingServer]: crate::client::VmwareEngine::create_logging_server
2677#[derive(Clone, Default, PartialEq)]
2678#[non_exhaustive]
2679pub struct CreateLoggingServerRequest {
2680    /// Required. The resource name of the private cloud
2681    /// to create a new Logging Server in.
2682    /// Resource names are schemeless URIs that follow the conventions in
2683    /// <https://cloud.google.com/apis/design/resource_names>.
2684    /// For example:
2685    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
2686    pub parent: std::string::String,
2687
2688    /// Required. The initial description of a new logging server.
2689    pub logging_server: std::option::Option<crate::model::LoggingServer>,
2690
2691    /// Required. The user-provided identifier of the `LoggingServer` to be
2692    /// created. This identifier must be unique among `LoggingServer` resources
2693    /// within the parent and becomes the final token in the name URI.
2694    /// The identifier must meet the following requirements:
2695    ///
2696    /// * Only contains 1-63 alphanumeric characters and hyphens
2697    /// * Begins with an alphabetical character
2698    /// * Ends with a non-hyphen character
2699    /// * Not formatted as a UUID
2700    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
2701    ///   (section 3.5)
2702    pub logging_server_id: std::string::String,
2703
2704    /// Optional. A request ID to identify requests. Specify a unique request ID
2705    /// so that if you must retry your request, the server will know to ignore
2706    /// the request if it has already been completed. The server guarantees that a
2707    /// request doesn't result in creation of duplicate commitments for at least 60
2708    /// minutes.
2709    ///
2710    /// For example, consider a situation where you make an initial request and the
2711    /// request times out. If you make the request again with the same request ID,
2712    /// the server can check if original operation with the same request ID was
2713    /// received, and if so, will ignore the second request. This prevents clients
2714    /// from accidentally creating duplicate commitments.
2715    ///
2716    /// The request ID must be a valid UUID with the exception that zero UUID is
2717    /// not supported (00000000-0000-0000-0000-000000000000).
2718    pub request_id: std::string::String,
2719
2720    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2721}
2722
2723impl CreateLoggingServerRequest {
2724    pub fn new() -> Self {
2725        std::default::Default::default()
2726    }
2727
2728    /// Sets the value of [parent][crate::model::CreateLoggingServerRequest::parent].
2729    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2730        self.parent = v.into();
2731        self
2732    }
2733
2734    /// Sets the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
2735    pub fn set_logging_server<T>(mut self, v: T) -> Self
2736    where
2737        T: std::convert::Into<crate::model::LoggingServer>,
2738    {
2739        self.logging_server = std::option::Option::Some(v.into());
2740        self
2741    }
2742
2743    /// Sets or clears the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
2744    pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
2745    where
2746        T: std::convert::Into<crate::model::LoggingServer>,
2747    {
2748        self.logging_server = v.map(|x| x.into());
2749        self
2750    }
2751
2752    /// Sets the value of [logging_server_id][crate::model::CreateLoggingServerRequest::logging_server_id].
2753    pub fn set_logging_server_id<T: std::convert::Into<std::string::String>>(
2754        mut self,
2755        v: T,
2756    ) -> Self {
2757        self.logging_server_id = v.into();
2758        self
2759    }
2760
2761    /// Sets the value of [request_id][crate::model::CreateLoggingServerRequest::request_id].
2762    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2763        self.request_id = v.into();
2764        self
2765    }
2766}
2767
2768impl wkt::message::Message for CreateLoggingServerRequest {
2769    fn typename() -> &'static str {
2770        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateLoggingServerRequest"
2771    }
2772}
2773
2774/// Request message for
2775/// [VmwareEngine.UpdateLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]
2776///
2777/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateLoggingServer]: crate::client::VmwareEngine::update_logging_server
2778#[derive(Clone, Default, PartialEq)]
2779#[non_exhaustive]
2780pub struct UpdateLoggingServerRequest {
2781    /// Required. Field mask is used to specify the fields to be overwritten in the
2782    /// `LoggingServer` resource by the update.
2783    /// The fields specified in the `update_mask` are relative to the resource, not
2784    /// the full request. A field will be overwritten if it is in the mask. If the
2785    /// user does not provide a mask then all fields will be overwritten.
2786    pub update_mask: std::option::Option<wkt::FieldMask>,
2787
2788    /// Required. Logging server description.
2789    pub logging_server: std::option::Option<crate::model::LoggingServer>,
2790
2791    /// Optional. A request ID to identify requests. Specify a unique request ID
2792    /// so that if you must retry your request, the server will know to ignore
2793    /// the request if it has already been completed. The server guarantees that a
2794    /// request doesn't result in creation of duplicate commitments for at least 60
2795    /// minutes.
2796    ///
2797    /// For example, consider a situation where you make an initial request and the
2798    /// request times out. If you make the request again with the same request ID,
2799    /// the server can check if original operation with the same request ID was
2800    /// received, and if so, will ignore the second request. This prevents clients
2801    /// from accidentally creating duplicate commitments.
2802    ///
2803    /// The request ID must be a valid UUID with the exception that zero UUID is
2804    /// not supported (00000000-0000-0000-0000-000000000000).
2805    pub request_id: std::string::String,
2806
2807    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2808}
2809
2810impl UpdateLoggingServerRequest {
2811    pub fn new() -> Self {
2812        std::default::Default::default()
2813    }
2814
2815    /// Sets the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
2816    pub fn set_update_mask<T>(mut self, v: T) -> Self
2817    where
2818        T: std::convert::Into<wkt::FieldMask>,
2819    {
2820        self.update_mask = std::option::Option::Some(v.into());
2821        self
2822    }
2823
2824    /// Sets or clears the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
2825    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2826    where
2827        T: std::convert::Into<wkt::FieldMask>,
2828    {
2829        self.update_mask = v.map(|x| x.into());
2830        self
2831    }
2832
2833    /// Sets the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
2834    pub fn set_logging_server<T>(mut self, v: T) -> Self
2835    where
2836        T: std::convert::Into<crate::model::LoggingServer>,
2837    {
2838        self.logging_server = std::option::Option::Some(v.into());
2839        self
2840    }
2841
2842    /// Sets or clears the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
2843    pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
2844    where
2845        T: std::convert::Into<crate::model::LoggingServer>,
2846    {
2847        self.logging_server = v.map(|x| x.into());
2848        self
2849    }
2850
2851    /// Sets the value of [request_id][crate::model::UpdateLoggingServerRequest::request_id].
2852    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2853        self.request_id = v.into();
2854        self
2855    }
2856}
2857
2858impl wkt::message::Message for UpdateLoggingServerRequest {
2859    fn typename() -> &'static str {
2860        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateLoggingServerRequest"
2861    }
2862}
2863
2864/// Request message for
2865/// [VmwareEngine.DeleteLoggingServer][google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]
2866///
2867/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteLoggingServer]: crate::client::VmwareEngine::delete_logging_server
2868#[derive(Clone, Default, PartialEq)]
2869#[non_exhaustive]
2870pub struct DeleteLoggingServerRequest {
2871    /// Required. The resource name of the logging server to delete.
2872    /// Resource names are schemeless URIs that follow the conventions in
2873    /// <https://cloud.google.com/apis/design/resource_names>.
2874    /// For example:
2875    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
2876    pub name: std::string::String,
2877
2878    /// Optional. A request ID to identify requests. Specify a unique request ID
2879    /// so that if you must retry your request, the server will know to ignore
2880    /// the request if it has already been completed. The server guarantees that a
2881    /// request doesn't result in creation of duplicate commitments for at least 60
2882    /// minutes.
2883    ///
2884    /// For example, consider a situation where you make an initial request and the
2885    /// request times out. If you make the request again with the same request
2886    /// ID, the server can check if original operation with the same request ID
2887    /// was received, and if so, will ignore the second request. This prevents
2888    /// clients from accidentally creating duplicate commitments.
2889    ///
2890    /// The request ID must be a valid UUID with the exception that zero UUID is
2891    /// not supported (00000000-0000-0000-0000-000000000000).
2892    pub request_id: std::string::String,
2893
2894    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2895}
2896
2897impl DeleteLoggingServerRequest {
2898    pub fn new() -> Self {
2899        std::default::Default::default()
2900    }
2901
2902    /// Sets the value of [name][crate::model::DeleteLoggingServerRequest::name].
2903    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2904        self.name = v.into();
2905        self
2906    }
2907
2908    /// Sets the value of [request_id][crate::model::DeleteLoggingServerRequest::request_id].
2909    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2910        self.request_id = v.into();
2911        self
2912    }
2913}
2914
2915impl wkt::message::Message for DeleteLoggingServerRequest {
2916    fn typename() -> &'static str {
2917        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteLoggingServerRequest"
2918    }
2919}
2920
2921/// Represents the metadata of the long-running operation.
2922#[derive(Clone, Default, PartialEq)]
2923#[non_exhaustive]
2924pub struct OperationMetadata {
2925    /// Output only. The time the operation was created.
2926    pub create_time: std::option::Option<wkt::Timestamp>,
2927
2928    /// Output only. The time the operation finished running.
2929    pub end_time: std::option::Option<wkt::Timestamp>,
2930
2931    /// Output only. Server-defined resource path for the target of the operation.
2932    pub target: std::string::String,
2933
2934    /// Output only. Name of the verb executed by the operation.
2935    pub verb: std::string::String,
2936
2937    /// Output only. Human-readable status of the operation, if any.
2938    pub status_message: std::string::String,
2939
2940    /// Output only. True if the user has requested cancellation
2941    /// of the operation; false otherwise.
2942    /// Operations that have successfully been cancelled
2943    /// have [Operation.error][] value with a
2944    /// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
2945    /// `Code.CANCELLED`.
2946    ///
2947    /// [google.rpc.Status.code]: rpc::model::Status::code
2948    pub requested_cancellation: bool,
2949
2950    /// Output only. API version used to start the operation.
2951    pub api_version: std::string::String,
2952
2953    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2954}
2955
2956impl OperationMetadata {
2957    pub fn new() -> Self {
2958        std::default::Default::default()
2959    }
2960
2961    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
2962    pub fn set_create_time<T>(mut self, v: T) -> Self
2963    where
2964        T: std::convert::Into<wkt::Timestamp>,
2965    {
2966        self.create_time = std::option::Option::Some(v.into());
2967        self
2968    }
2969
2970    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
2971    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2972    where
2973        T: std::convert::Into<wkt::Timestamp>,
2974    {
2975        self.create_time = v.map(|x| x.into());
2976        self
2977    }
2978
2979    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
2980    pub fn set_end_time<T>(mut self, v: T) -> Self
2981    where
2982        T: std::convert::Into<wkt::Timestamp>,
2983    {
2984        self.end_time = std::option::Option::Some(v.into());
2985        self
2986    }
2987
2988    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
2989    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2990    where
2991        T: std::convert::Into<wkt::Timestamp>,
2992    {
2993        self.end_time = v.map(|x| x.into());
2994        self
2995    }
2996
2997    /// Sets the value of [target][crate::model::OperationMetadata::target].
2998    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2999        self.target = v.into();
3000        self
3001    }
3002
3003    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
3004    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3005        self.verb = v.into();
3006        self
3007    }
3008
3009    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
3010    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3011        self.status_message = v.into();
3012        self
3013    }
3014
3015    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
3016    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
3017        self.requested_cancellation = v.into();
3018        self
3019    }
3020
3021    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
3022    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3023        self.api_version = v.into();
3024        self
3025    }
3026}
3027
3028impl wkt::message::Message for OperationMetadata {
3029    fn typename() -> &'static str {
3030        "type.googleapis.com/google.cloud.vmwareengine.v1.OperationMetadata"
3031    }
3032}
3033
3034/// Request message for
3035/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
3036///
3037/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
3038#[derive(Clone, Default, PartialEq)]
3039#[non_exhaustive]
3040pub struct ListNodeTypesRequest {
3041    /// Required. The resource name of the location to be queried for node types.
3042    /// Resource names are schemeless URIs that follow the conventions in
3043    /// <https://cloud.google.com/apis/design/resource_names>.
3044    /// For example:
3045    /// `projects/my-project/locations/us-central1-a`
3046    pub parent: std::string::String,
3047
3048    /// The maximum number of node types to return in one page.
3049    /// The service may return fewer than this value.
3050    /// The maximum value is coerced to 1000.
3051    /// The default value of this field is 500.
3052    pub page_size: i32,
3053
3054    /// A page token, received from a previous `ListNodeTypes` call.
3055    /// Provide this to retrieve the subsequent page.
3056    ///
3057    /// When paginating, all other parameters provided to
3058    /// `ListNodeTypes` must match the call that provided the page token.
3059    pub page_token: std::string::String,
3060
3061    /// A filter expression that matches resources returned in the response.
3062    /// The expression must specify the field name, a comparison
3063    /// operator, and the value that you want to use for filtering. The value
3064    /// must be a string, a number, or a boolean. The comparison operator
3065    /// must be `=`, `!=`, `>`, or `<`.
3066    ///
3067    /// For example, if you are filtering a list of node types, you can
3068    /// exclude the ones named `standard-72` by specifying
3069    /// `name != "standard-72"`.
3070    ///
3071    /// To filter on multiple expressions, provide each separate expression within
3072    /// parentheses. For example:
3073    ///
3074    /// ```norust
3075    /// (name = "standard-72")
3076    /// (virtual_cpu_count > 2)
3077    /// ```
3078    ///
3079    /// By default, each expression is an `AND` expression. However, you
3080    /// can include `AND` and `OR` expressions explicitly.
3081    /// For example:
3082    ///
3083    /// ```norust
3084    /// (name = "standard-96") AND
3085    /// (virtual_cpu_count > 2) OR
3086    /// (name = "standard-72")
3087    /// ```
3088    pub filter: std::string::String,
3089
3090    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3091}
3092
3093impl ListNodeTypesRequest {
3094    pub fn new() -> Self {
3095        std::default::Default::default()
3096    }
3097
3098    /// Sets the value of [parent][crate::model::ListNodeTypesRequest::parent].
3099    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3100        self.parent = v.into();
3101        self
3102    }
3103
3104    /// Sets the value of [page_size][crate::model::ListNodeTypesRequest::page_size].
3105    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3106        self.page_size = v.into();
3107        self
3108    }
3109
3110    /// Sets the value of [page_token][crate::model::ListNodeTypesRequest::page_token].
3111    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3112        self.page_token = v.into();
3113        self
3114    }
3115
3116    /// Sets the value of [filter][crate::model::ListNodeTypesRequest::filter].
3117    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3118        self.filter = v.into();
3119        self
3120    }
3121}
3122
3123impl wkt::message::Message for ListNodeTypesRequest {
3124    fn typename() -> &'static str {
3125        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesRequest"
3126    }
3127}
3128
3129/// Response message for
3130/// [VmwareEngine.ListNodeTypes][google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]
3131///
3132/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNodeTypes]: crate::client::VmwareEngine::list_node_types
3133#[derive(Clone, Default, PartialEq)]
3134#[non_exhaustive]
3135pub struct ListNodeTypesResponse {
3136    /// A list of Node Types.
3137    pub node_types: std::vec::Vec<crate::model::NodeType>,
3138
3139    /// A token, which can be sent as `page_token` to retrieve the next page.
3140    /// If this field is omitted, there are no subsequent pages.
3141    pub next_page_token: std::string::String,
3142
3143    /// Locations that could not be reached when making an aggregated query using
3144    /// wildcards.
3145    pub unreachable: std::vec::Vec<std::string::String>,
3146
3147    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3148}
3149
3150impl ListNodeTypesResponse {
3151    pub fn new() -> Self {
3152        std::default::Default::default()
3153    }
3154
3155    /// Sets the value of [node_types][crate::model::ListNodeTypesResponse::node_types].
3156    pub fn set_node_types<T, V>(mut self, v: T) -> Self
3157    where
3158        T: std::iter::IntoIterator<Item = V>,
3159        V: std::convert::Into<crate::model::NodeType>,
3160    {
3161        use std::iter::Iterator;
3162        self.node_types = v.into_iter().map(|i| i.into()).collect();
3163        self
3164    }
3165
3166    /// Sets the value of [next_page_token][crate::model::ListNodeTypesResponse::next_page_token].
3167    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3168        self.next_page_token = v.into();
3169        self
3170    }
3171
3172    /// Sets the value of [unreachable][crate::model::ListNodeTypesResponse::unreachable].
3173    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3174    where
3175        T: std::iter::IntoIterator<Item = V>,
3176        V: std::convert::Into<std::string::String>,
3177    {
3178        use std::iter::Iterator;
3179        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3180        self
3181    }
3182}
3183
3184impl wkt::message::Message for ListNodeTypesResponse {
3185    fn typename() -> &'static str {
3186        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNodeTypesResponse"
3187    }
3188}
3189
3190#[doc(hidden)]
3191impl gax::paginator::internal::PageableResponse for ListNodeTypesResponse {
3192    type PageItem = crate::model::NodeType;
3193
3194    fn items(self) -> std::vec::Vec<Self::PageItem> {
3195        self.node_types
3196    }
3197
3198    fn next_page_token(&self) -> std::string::String {
3199        use std::clone::Clone;
3200        self.next_page_token.clone()
3201    }
3202}
3203
3204/// Request message for
3205/// [VmwareEngine.GetNodeType][google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]
3206///
3207/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNodeType]: crate::client::VmwareEngine::get_node_type
3208#[derive(Clone, Default, PartialEq)]
3209#[non_exhaustive]
3210pub struct GetNodeTypeRequest {
3211    /// Required. The resource name of the node type to retrieve.
3212    /// Resource names are schemeless URIs that follow the conventions in
3213    /// <https://cloud.google.com/apis/design/resource_names>.
3214    /// For example:
3215    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
3216    pub name: std::string::String,
3217
3218    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3219}
3220
3221impl GetNodeTypeRequest {
3222    pub fn new() -> Self {
3223        std::default::Default::default()
3224    }
3225
3226    /// Sets the value of [name][crate::model::GetNodeTypeRequest::name].
3227    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3228        self.name = v.into();
3229        self
3230    }
3231}
3232
3233impl wkt::message::Message for GetNodeTypeRequest {
3234    fn typename() -> &'static str {
3235        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNodeTypeRequest"
3236    }
3237}
3238
3239/// Request message for
3240/// [VmwareEngine.ShowNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]
3241///
3242/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowNsxCredentials]: crate::client::VmwareEngine::show_nsx_credentials
3243#[derive(Clone, Default, PartialEq)]
3244#[non_exhaustive]
3245pub struct ShowNsxCredentialsRequest {
3246    /// Required. The resource name of the private cloud
3247    /// to be queried for credentials.
3248    /// Resource names are schemeless URIs that follow the conventions in
3249    /// <https://cloud.google.com/apis/design/resource_names>.
3250    /// For example:
3251    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3252    pub private_cloud: std::string::String,
3253
3254    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3255}
3256
3257impl ShowNsxCredentialsRequest {
3258    pub fn new() -> Self {
3259        std::default::Default::default()
3260    }
3261
3262    /// Sets the value of [private_cloud][crate::model::ShowNsxCredentialsRequest::private_cloud].
3263    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3264        self.private_cloud = v.into();
3265        self
3266    }
3267}
3268
3269impl wkt::message::Message for ShowNsxCredentialsRequest {
3270    fn typename() -> &'static str {
3271        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowNsxCredentialsRequest"
3272    }
3273}
3274
3275/// Request message for
3276/// [VmwareEngine.ShowVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]
3277///
3278/// [google.cloud.vmwareengine.v1.VmwareEngine.ShowVcenterCredentials]: crate::client::VmwareEngine::show_vcenter_credentials
3279#[derive(Clone, Default, PartialEq)]
3280#[non_exhaustive]
3281pub struct ShowVcenterCredentialsRequest {
3282    /// Required. The resource name of the private cloud
3283    /// to be queried for credentials.
3284    /// Resource names are schemeless URIs that follow the conventions in
3285    /// <https://cloud.google.com/apis/design/resource_names>.
3286    /// For example:
3287    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3288    pub private_cloud: std::string::String,
3289
3290    /// Optional. The username of the user to be queried for credentials.
3291    /// The default value of this field is CloudOwner@gve.local.
3292    /// The provided value must be one of the following:
3293    /// CloudOwner@gve.local,
3294    /// solution-user-01@gve.local,
3295    /// solution-user-02@gve.local,
3296    /// solution-user-03@gve.local,
3297    /// solution-user-04@gve.local,
3298    /// solution-user-05@gve.local,
3299    /// zertoadmin@gve.local.
3300    pub username: std::string::String,
3301
3302    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3303}
3304
3305impl ShowVcenterCredentialsRequest {
3306    pub fn new() -> Self {
3307        std::default::Default::default()
3308    }
3309
3310    /// Sets the value of [private_cloud][crate::model::ShowVcenterCredentialsRequest::private_cloud].
3311    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3312        self.private_cloud = v.into();
3313        self
3314    }
3315
3316    /// Sets the value of [username][crate::model::ShowVcenterCredentialsRequest::username].
3317    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3318        self.username = v.into();
3319        self
3320    }
3321}
3322
3323impl wkt::message::Message for ShowVcenterCredentialsRequest {
3324    fn typename() -> &'static str {
3325        "type.googleapis.com/google.cloud.vmwareengine.v1.ShowVcenterCredentialsRequest"
3326    }
3327}
3328
3329/// Request message for
3330/// [VmwareEngine.ResetNsxCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]
3331///
3332/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetNsxCredentials]: crate::client::VmwareEngine::reset_nsx_credentials
3333#[derive(Clone, Default, PartialEq)]
3334#[non_exhaustive]
3335pub struct ResetNsxCredentialsRequest {
3336    /// Required. The resource name of the private cloud
3337    /// to reset credentials for.
3338    /// Resource names are schemeless URIs that follow the conventions in
3339    /// <https://cloud.google.com/apis/design/resource_names>.
3340    /// For example:
3341    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3342    pub private_cloud: std::string::String,
3343
3344    /// Optional. A request ID to identify requests. Specify a unique request ID
3345    /// so that if you must retry your request, the server will know to ignore
3346    /// the request if it has already been completed. The server guarantees that a
3347    /// request doesn't result in creation of duplicate commitments for at least 60
3348    /// minutes.
3349    ///
3350    /// For example, consider a situation where you make an initial request and the
3351    /// request times out. If you make the request again with the same request
3352    /// ID, the server can check if original operation with the same request ID
3353    /// was received, and if so, will ignore the second request. This prevents
3354    /// clients from accidentally creating duplicate commitments.
3355    ///
3356    /// The request ID must be a valid UUID with the exception that zero UUID is
3357    /// not supported (00000000-0000-0000-0000-000000000000).
3358    pub request_id: std::string::String,
3359
3360    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3361}
3362
3363impl ResetNsxCredentialsRequest {
3364    pub fn new() -> Self {
3365        std::default::Default::default()
3366    }
3367
3368    /// Sets the value of [private_cloud][crate::model::ResetNsxCredentialsRequest::private_cloud].
3369    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3370        self.private_cloud = v.into();
3371        self
3372    }
3373
3374    /// Sets the value of [request_id][crate::model::ResetNsxCredentialsRequest::request_id].
3375    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3376        self.request_id = v.into();
3377        self
3378    }
3379}
3380
3381impl wkt::message::Message for ResetNsxCredentialsRequest {
3382    fn typename() -> &'static str {
3383        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetNsxCredentialsRequest"
3384    }
3385}
3386
3387/// Request message for
3388/// [VmwareEngine.ResetVcenterCredentials][google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]
3389///
3390/// [google.cloud.vmwareengine.v1.VmwareEngine.ResetVcenterCredentials]: crate::client::VmwareEngine::reset_vcenter_credentials
3391#[derive(Clone, Default, PartialEq)]
3392#[non_exhaustive]
3393pub struct ResetVcenterCredentialsRequest {
3394    /// Required. The resource name of the private cloud
3395    /// to reset credentials for.
3396    /// Resource names are schemeless URIs that follow the conventions in
3397    /// <https://cloud.google.com/apis/design/resource_names>.
3398    /// For example:
3399    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
3400    pub private_cloud: std::string::String,
3401
3402    /// Optional. A request ID to identify requests. Specify a unique request ID
3403    /// so that if you must retry your request, the server will know to ignore
3404    /// the request if it has already been completed. The server guarantees that a
3405    /// request doesn't result in creation of duplicate commitments for at least 60
3406    /// minutes.
3407    ///
3408    /// For example, consider a situation where you make an initial request and the
3409    /// request times out. If you make the request again with the same request
3410    /// ID, the server can check if original operation with the same request ID
3411    /// was received, and if so, will ignore the second request. This prevents
3412    /// clients from accidentally creating duplicate commitments.
3413    ///
3414    /// The request ID must be a valid UUID with the exception that zero UUID is
3415    /// not supported (00000000-0000-0000-0000-000000000000).
3416    pub request_id: std::string::String,
3417
3418    /// Optional. The username of the user to be to reset the credentials.
3419    /// The default value of this field is CloudOwner@gve.local.
3420    /// The provided value should be one of the following:
3421    /// solution-user-01@gve.local,
3422    /// solution-user-02@gve.local,
3423    /// solution-user-03@gve.local,
3424    /// solution-user-04@gve.local,
3425    /// solution-user-05@gve.local,
3426    /// zertoadmin@gve.local.
3427    pub username: std::string::String,
3428
3429    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3430}
3431
3432impl ResetVcenterCredentialsRequest {
3433    pub fn new() -> Self {
3434        std::default::Default::default()
3435    }
3436
3437    /// Sets the value of [private_cloud][crate::model::ResetVcenterCredentialsRequest::private_cloud].
3438    pub fn set_private_cloud<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3439        self.private_cloud = v.into();
3440        self
3441    }
3442
3443    /// Sets the value of [request_id][crate::model::ResetVcenterCredentialsRequest::request_id].
3444    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3445        self.request_id = v.into();
3446        self
3447    }
3448
3449    /// Sets the value of [username][crate::model::ResetVcenterCredentialsRequest::username].
3450    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3451        self.username = v.into();
3452        self
3453    }
3454}
3455
3456impl wkt::message::Message for ResetVcenterCredentialsRequest {
3457    fn typename() -> &'static str {
3458        "type.googleapis.com/google.cloud.vmwareengine.v1.ResetVcenterCredentialsRequest"
3459    }
3460}
3461
3462/// Response message for
3463/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
3464///
3465/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
3466#[derive(Clone, Default, PartialEq)]
3467#[non_exhaustive]
3468pub struct ListHcxActivationKeysResponse {
3469    /// List of HCX activation keys.
3470    pub hcx_activation_keys: std::vec::Vec<crate::model::HcxActivationKey>,
3471
3472    /// A token, which can be sent as `page_token` to retrieve the next page.
3473    /// If this field is omitted, there are no subsequent pages.
3474    pub next_page_token: std::string::String,
3475
3476    /// Locations that could not be reached when making an aggregated query using
3477    /// wildcards.
3478    pub unreachable: std::vec::Vec<std::string::String>,
3479
3480    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3481}
3482
3483impl ListHcxActivationKeysResponse {
3484    pub fn new() -> Self {
3485        std::default::Default::default()
3486    }
3487
3488    /// Sets the value of [hcx_activation_keys][crate::model::ListHcxActivationKeysResponse::hcx_activation_keys].
3489    pub fn set_hcx_activation_keys<T, V>(mut self, v: T) -> Self
3490    where
3491        T: std::iter::IntoIterator<Item = V>,
3492        V: std::convert::Into<crate::model::HcxActivationKey>,
3493    {
3494        use std::iter::Iterator;
3495        self.hcx_activation_keys = v.into_iter().map(|i| i.into()).collect();
3496        self
3497    }
3498
3499    /// Sets the value of [next_page_token][crate::model::ListHcxActivationKeysResponse::next_page_token].
3500    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3501        self.next_page_token = v.into();
3502        self
3503    }
3504
3505    /// Sets the value of [unreachable][crate::model::ListHcxActivationKeysResponse::unreachable].
3506    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
3507    where
3508        T: std::iter::IntoIterator<Item = V>,
3509        V: std::convert::Into<std::string::String>,
3510    {
3511        use std::iter::Iterator;
3512        self.unreachable = v.into_iter().map(|i| i.into()).collect();
3513        self
3514    }
3515}
3516
3517impl wkt::message::Message for ListHcxActivationKeysResponse {
3518    fn typename() -> &'static str {
3519        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysResponse"
3520    }
3521}
3522
3523#[doc(hidden)]
3524impl gax::paginator::internal::PageableResponse for ListHcxActivationKeysResponse {
3525    type PageItem = crate::model::HcxActivationKey;
3526
3527    fn items(self) -> std::vec::Vec<Self::PageItem> {
3528        self.hcx_activation_keys
3529    }
3530
3531    fn next_page_token(&self) -> std::string::String {
3532        use std::clone::Clone;
3533        self.next_page_token.clone()
3534    }
3535}
3536
3537/// Request message for
3538/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
3539///
3540/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
3541#[derive(Clone, Default, PartialEq)]
3542#[non_exhaustive]
3543pub struct ListHcxActivationKeysRequest {
3544    /// Required. The resource name of the private cloud
3545    /// to be queried for HCX activation keys.
3546    /// Resource names are schemeless URIs that follow the conventions in
3547    /// <https://cloud.google.com/apis/design/resource_names>.
3548    /// For example:
3549    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
3550    pub parent: std::string::String,
3551
3552    /// The maximum number of HCX activation keys to return in one page.
3553    /// The service may return fewer than this value.
3554    /// The maximum value is coerced to 1000.
3555    /// The default value of this field is 500.
3556    pub page_size: i32,
3557
3558    /// A page token, received from a previous `ListHcxActivationKeys` call.
3559    /// Provide this to retrieve the subsequent page.
3560    ///
3561    /// When paginating, all other parameters provided to
3562    /// `ListHcxActivationKeys` must match the call that provided the page
3563    /// token.
3564    pub page_token: std::string::String,
3565
3566    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3567}
3568
3569impl ListHcxActivationKeysRequest {
3570    pub fn new() -> Self {
3571        std::default::Default::default()
3572    }
3573
3574    /// Sets the value of [parent][crate::model::ListHcxActivationKeysRequest::parent].
3575    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3576        self.parent = v.into();
3577        self
3578    }
3579
3580    /// Sets the value of [page_size][crate::model::ListHcxActivationKeysRequest::page_size].
3581    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
3582        self.page_size = v.into();
3583        self
3584    }
3585
3586    /// Sets the value of [page_token][crate::model::ListHcxActivationKeysRequest::page_token].
3587    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3588        self.page_token = v.into();
3589        self
3590    }
3591}
3592
3593impl wkt::message::Message for ListHcxActivationKeysRequest {
3594    fn typename() -> &'static str {
3595        "type.googleapis.com/google.cloud.vmwareengine.v1.ListHcxActivationKeysRequest"
3596    }
3597}
3598
3599/// Request message for [VmwareEngine.GetHcxActivationKeys][]
3600#[derive(Clone, Default, PartialEq)]
3601#[non_exhaustive]
3602pub struct GetHcxActivationKeyRequest {
3603    /// Required. The resource name of the HCX activation key to retrieve.
3604    /// Resource names are schemeless URIs that follow the conventions in
3605    /// <https://cloud.google.com/apis/design/resource_names>.
3606    /// For example:
3607    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
3608    pub name: std::string::String,
3609
3610    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3611}
3612
3613impl GetHcxActivationKeyRequest {
3614    pub fn new() -> Self {
3615        std::default::Default::default()
3616    }
3617
3618    /// Sets the value of [name][crate::model::GetHcxActivationKeyRequest::name].
3619    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3620        self.name = v.into();
3621        self
3622    }
3623}
3624
3625impl wkt::message::Message for GetHcxActivationKeyRequest {
3626    fn typename() -> &'static str {
3627        "type.googleapis.com/google.cloud.vmwareengine.v1.GetHcxActivationKeyRequest"
3628    }
3629}
3630
3631/// Request message for
3632/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
3633///
3634/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
3635#[derive(Clone, Default, PartialEq)]
3636#[non_exhaustive]
3637pub struct CreateHcxActivationKeyRequest {
3638    /// Required. The resource name of the private cloud to create the key for.
3639    /// Resource names are schemeless URIs that follow the conventions in
3640    /// <https://cloud.google.com/apis/design/resource_names>.
3641    /// For example:
3642    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud`
3643    pub parent: std::string::String,
3644
3645    /// Required. The initial description of a new HCX activation key. When
3646    /// creating a new key, this field must be an empty object.
3647    pub hcx_activation_key: std::option::Option<crate::model::HcxActivationKey>,
3648
3649    /// Required. The user-provided identifier of the `HcxActivationKey` to be
3650    /// created. This identifier must be unique among `HcxActivationKey` resources
3651    /// within the parent and becomes the final token in the name URI.
3652    /// The identifier must meet the following requirements:
3653    ///
3654    /// * Only contains 1-63 alphanumeric characters and hyphens
3655    /// * Begins with an alphabetical character
3656    /// * Ends with a non-hyphen character
3657    /// * Not formatted as a UUID
3658    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
3659    ///   (section 3.5)
3660    pub hcx_activation_key_id: std::string::String,
3661
3662    /// A request ID to identify requests. Specify a unique request ID
3663    /// so that if you must retry your request, the server will know to ignore
3664    /// the request if it has already been completed. The server guarantees that a
3665    /// request doesn't result in creation of duplicate commitments for at least 60
3666    /// minutes.
3667    ///
3668    /// For example, consider a situation where you make an initial request and the
3669    /// request times out. If you make the request again with the same request ID,
3670    /// the server can check if original operation with the same request ID was
3671    /// received, and if so, will ignore the second request. This prevents clients
3672    /// from accidentally creating duplicate commitments.
3673    ///
3674    /// The request ID must be a valid UUID with the exception that zero UUID is
3675    /// not supported (00000000-0000-0000-0000-000000000000).
3676    pub request_id: std::string::String,
3677
3678    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3679}
3680
3681impl CreateHcxActivationKeyRequest {
3682    pub fn new() -> Self {
3683        std::default::Default::default()
3684    }
3685
3686    /// Sets the value of [parent][crate::model::CreateHcxActivationKeyRequest::parent].
3687    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3688        self.parent = v.into();
3689        self
3690    }
3691
3692    /// Sets the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
3693    pub fn set_hcx_activation_key<T>(mut self, v: T) -> Self
3694    where
3695        T: std::convert::Into<crate::model::HcxActivationKey>,
3696    {
3697        self.hcx_activation_key = std::option::Option::Some(v.into());
3698        self
3699    }
3700
3701    /// Sets or clears the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
3702    pub fn set_or_clear_hcx_activation_key<T>(mut self, v: std::option::Option<T>) -> Self
3703    where
3704        T: std::convert::Into<crate::model::HcxActivationKey>,
3705    {
3706        self.hcx_activation_key = v.map(|x| x.into());
3707        self
3708    }
3709
3710    /// Sets the value of [hcx_activation_key_id][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key_id].
3711    pub fn set_hcx_activation_key_id<T: std::convert::Into<std::string::String>>(
3712        mut self,
3713        v: T,
3714    ) -> Self {
3715        self.hcx_activation_key_id = v.into();
3716        self
3717    }
3718
3719    /// Sets the value of [request_id][crate::model::CreateHcxActivationKeyRequest::request_id].
3720    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3721        self.request_id = v.into();
3722        self
3723    }
3724}
3725
3726impl wkt::message::Message for CreateHcxActivationKeyRequest {
3727    fn typename() -> &'static str {
3728        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateHcxActivationKeyRequest"
3729    }
3730}
3731
3732/// Request message for
3733/// [VmwareEngine.GetDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]
3734///
3735/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsForwarding]: crate::client::VmwareEngine::get_dns_forwarding
3736#[derive(Clone, Default, PartialEq)]
3737#[non_exhaustive]
3738pub struct GetDnsForwardingRequest {
3739    /// Required. The resource name of a `DnsForwarding` to retrieve.
3740    /// Resource names are schemeless URIs that follow the conventions in
3741    /// <https://cloud.google.com/apis/design/resource_names>.
3742    /// For example:
3743    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
3744    pub name: std::string::String,
3745
3746    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3747}
3748
3749impl GetDnsForwardingRequest {
3750    pub fn new() -> Self {
3751        std::default::Default::default()
3752    }
3753
3754    /// Sets the value of [name][crate::model::GetDnsForwardingRequest::name].
3755    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3756        self.name = v.into();
3757        self
3758    }
3759}
3760
3761impl wkt::message::Message for GetDnsForwardingRequest {
3762    fn typename() -> &'static str {
3763        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsForwardingRequest"
3764    }
3765}
3766
3767/// Request message for
3768/// [VmwareEngine.UpdateDnsForwarding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]
3769///
3770/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateDnsForwarding]: crate::client::VmwareEngine::update_dns_forwarding
3771#[derive(Clone, Default, PartialEq)]
3772#[non_exhaustive]
3773pub struct UpdateDnsForwardingRequest {
3774    /// Required. DnsForwarding config details.
3775    pub dns_forwarding: std::option::Option<crate::model::DnsForwarding>,
3776
3777    /// Required. Field mask is used to specify the fields to be overwritten in the
3778    /// `DnsForwarding` resource by the update.
3779    /// The fields specified in the `update_mask` are relative to the resource, not
3780    /// the full request. A field will be overwritten if it is in the mask. If the
3781    /// user does not provide a mask then all fields will be overwritten.
3782    pub update_mask: std::option::Option<wkt::FieldMask>,
3783
3784    /// Optional. 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    pub request_id: std::string::String,
3799
3800    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3801}
3802
3803impl UpdateDnsForwardingRequest {
3804    pub fn new() -> Self {
3805        std::default::Default::default()
3806    }
3807
3808    /// Sets the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
3809    pub fn set_dns_forwarding<T>(mut self, v: T) -> Self
3810    where
3811        T: std::convert::Into<crate::model::DnsForwarding>,
3812    {
3813        self.dns_forwarding = std::option::Option::Some(v.into());
3814        self
3815    }
3816
3817    /// Sets or clears the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
3818    pub fn set_or_clear_dns_forwarding<T>(mut self, v: std::option::Option<T>) -> Self
3819    where
3820        T: std::convert::Into<crate::model::DnsForwarding>,
3821    {
3822        self.dns_forwarding = v.map(|x| x.into());
3823        self
3824    }
3825
3826    /// Sets the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
3827    pub fn set_update_mask<T>(mut self, v: T) -> Self
3828    where
3829        T: std::convert::Into<wkt::FieldMask>,
3830    {
3831        self.update_mask = std::option::Option::Some(v.into());
3832        self
3833    }
3834
3835    /// Sets or clears the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
3836    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3837    where
3838        T: std::convert::Into<wkt::FieldMask>,
3839    {
3840        self.update_mask = v.map(|x| x.into());
3841        self
3842    }
3843
3844    /// Sets the value of [request_id][crate::model::UpdateDnsForwardingRequest::request_id].
3845    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3846        self.request_id = v.into();
3847        self
3848    }
3849}
3850
3851impl wkt::message::Message for UpdateDnsForwardingRequest {
3852    fn typename() -> &'static str {
3853        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateDnsForwardingRequest"
3854    }
3855}
3856
3857/// Request message for
3858/// [VmwareEngine.CreateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]
3859///
3860/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPeering]: crate::client::VmwareEngine::create_network_peering
3861#[derive(Clone, Default, PartialEq)]
3862#[non_exhaustive]
3863pub struct CreateNetworkPeeringRequest {
3864    /// Required. The resource name of the location to create the new network
3865    /// peering in. This value is always `global`, because `NetworkPeering` is a
3866    /// global resource. Resource names are schemeless URIs that follow the
3867    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
3868    /// example: `projects/my-project/locations/global`
3869    pub parent: std::string::String,
3870
3871    /// Required. The user-provided identifier of the new `NetworkPeering`.
3872    /// This identifier must be unique among `NetworkPeering` resources within the
3873    /// parent and becomes the final token in the name URI.
3874    /// The identifier must meet the following requirements:
3875    ///
3876    /// * Only contains 1-63 alphanumeric characters and hyphens
3877    /// * Begins with an alphabetical character
3878    /// * Ends with a non-hyphen character
3879    /// * Not formatted as a UUID
3880    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
3881    ///   (section 3.5)
3882    pub network_peering_id: std::string::String,
3883
3884    /// Required. The initial description of the new network peering.
3885    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
3886
3887    /// Optional. A request ID to identify requests. Specify a unique request ID
3888    /// so that if you must retry your request, the server will know to ignore
3889    /// the request if it has already been completed. The server guarantees that a
3890    /// request doesn't result in creation of duplicate commitments for at least 60
3891    /// minutes.
3892    ///
3893    /// For example, consider a situation where you make an initial request and the
3894    /// request times out. If you make the request again with the same request
3895    /// ID, the server can check if original operation with the same request ID
3896    /// was received, and if so, will ignore the second request. This prevents
3897    /// clients from accidentally creating duplicate commitments.
3898    ///
3899    /// The request ID must be a valid UUID with the exception that zero UUID is
3900    /// not supported (00000000-0000-0000-0000-000000000000).
3901    pub request_id: std::string::String,
3902
3903    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3904}
3905
3906impl CreateNetworkPeeringRequest {
3907    pub fn new() -> Self {
3908        std::default::Default::default()
3909    }
3910
3911    /// Sets the value of [parent][crate::model::CreateNetworkPeeringRequest::parent].
3912    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3913        self.parent = v.into();
3914        self
3915    }
3916
3917    /// Sets the value of [network_peering_id][crate::model::CreateNetworkPeeringRequest::network_peering_id].
3918    pub fn set_network_peering_id<T: std::convert::Into<std::string::String>>(
3919        mut self,
3920        v: T,
3921    ) -> Self {
3922        self.network_peering_id = v.into();
3923        self
3924    }
3925
3926    /// Sets the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
3927    pub fn set_network_peering<T>(mut self, v: T) -> Self
3928    where
3929        T: std::convert::Into<crate::model::NetworkPeering>,
3930    {
3931        self.network_peering = std::option::Option::Some(v.into());
3932        self
3933    }
3934
3935    /// Sets or clears the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
3936    pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
3937    where
3938        T: std::convert::Into<crate::model::NetworkPeering>,
3939    {
3940        self.network_peering = v.map(|x| x.into());
3941        self
3942    }
3943
3944    /// Sets the value of [request_id][crate::model::CreateNetworkPeeringRequest::request_id].
3945    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3946        self.request_id = v.into();
3947        self
3948    }
3949}
3950
3951impl wkt::message::Message for CreateNetworkPeeringRequest {
3952    fn typename() -> &'static str {
3953        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPeeringRequest"
3954    }
3955}
3956
3957/// Request message for
3958/// [VmwareEngine.DeleteNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]
3959///
3960/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPeering]: crate::client::VmwareEngine::delete_network_peering
3961#[derive(Clone, Default, PartialEq)]
3962#[non_exhaustive]
3963pub struct DeleteNetworkPeeringRequest {
3964    /// Required. The resource name of the network peering to be deleted.
3965    /// Resource names are schemeless URIs that follow the conventions in
3966    /// <https://cloud.google.com/apis/design/resource_names>.
3967    /// For example:
3968    /// `projects/my-project/locations/global/networkPeerings/my-peering`
3969    pub name: std::string::String,
3970
3971    /// Optional. A request ID to identify requests. Specify a unique request ID
3972    /// so that if you must retry your request, the server will know to ignore
3973    /// the request if it has already been completed. The server guarantees that a
3974    /// request doesn't result in creation of duplicate commitments for at least 60
3975    /// minutes.
3976    ///
3977    /// For example, consider a situation where you make an initial request and the
3978    /// request times out. If you make the request again with the same request
3979    /// ID, the server can check if original operation with the same request ID
3980    /// was received, and if so, will ignore the second request. This prevents
3981    /// clients from accidentally creating duplicate commitments.
3982    ///
3983    /// The request ID must be a valid UUID with the exception that zero UUID is
3984    /// not supported (00000000-0000-0000-0000-000000000000).
3985    pub request_id: std::string::String,
3986
3987    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
3988}
3989
3990impl DeleteNetworkPeeringRequest {
3991    pub fn new() -> Self {
3992        std::default::Default::default()
3993    }
3994
3995    /// Sets the value of [name][crate::model::DeleteNetworkPeeringRequest::name].
3996    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
3997        self.name = v.into();
3998        self
3999    }
4000
4001    /// Sets the value of [request_id][crate::model::DeleteNetworkPeeringRequest::request_id].
4002    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4003        self.request_id = v.into();
4004        self
4005    }
4006}
4007
4008impl wkt::message::Message for DeleteNetworkPeeringRequest {
4009    fn typename() -> &'static str {
4010        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPeeringRequest"
4011    }
4012}
4013
4014/// Request message for
4015/// [VmwareEngine.GetNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]
4016///
4017/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPeering]: crate::client::VmwareEngine::get_network_peering
4018#[derive(Clone, Default, PartialEq)]
4019#[non_exhaustive]
4020pub struct GetNetworkPeeringRequest {
4021    /// Required. The resource name of the network peering to retrieve.
4022    /// Resource names are schemeless URIs that follow the conventions in
4023    /// <https://cloud.google.com/apis/design/resource_names>.
4024    /// For example:
4025    /// `projects/my-project/locations/global/networkPeerings/my-peering`
4026    pub name: std::string::String,
4027
4028    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4029}
4030
4031impl GetNetworkPeeringRequest {
4032    pub fn new() -> Self {
4033        std::default::Default::default()
4034    }
4035
4036    /// Sets the value of [name][crate::model::GetNetworkPeeringRequest::name].
4037    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4038        self.name = v.into();
4039        self
4040    }
4041}
4042
4043impl wkt::message::Message for GetNetworkPeeringRequest {
4044    fn typename() -> &'static str {
4045        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPeeringRequest"
4046    }
4047}
4048
4049/// Request message for
4050/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
4051///
4052/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
4053#[derive(Clone, Default, PartialEq)]
4054#[non_exhaustive]
4055pub struct ListNetworkPeeringsRequest {
4056    /// Required. The resource name of the location (global) to query for
4057    /// network peerings. Resource names are schemeless URIs that follow the
4058    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
4059    /// example: `projects/my-project/locations/global`
4060    pub parent: std::string::String,
4061
4062    /// The maximum number of network peerings to return in one page.
4063    /// The maximum value is coerced to 1000.
4064    /// The default value of this field is 500.
4065    pub page_size: i32,
4066
4067    /// A page token, received from a previous `ListNetworkPeerings` call.
4068    /// Provide this to retrieve the subsequent page.
4069    ///
4070    /// When paginating, all other parameters provided to
4071    /// `ListNetworkPeerings` must match the call that provided the page
4072    /// token.
4073    pub page_token: std::string::String,
4074
4075    /// A filter expression that matches resources returned in the response.
4076    /// The expression must specify the field name, a comparison
4077    /// operator, and the value that you want to use for filtering. The value
4078    /// must be a string, a number, or a boolean. The comparison operator
4079    /// must be `=`, `!=`, `>`, or `<`.
4080    ///
4081    /// For example, if you are filtering a list of network peerings, you can
4082    /// exclude the ones named `example-peering` by specifying
4083    /// `name != "example-peering"`.
4084    ///
4085    /// To filter on multiple expressions, provide each separate expression within
4086    /// parentheses. For example:
4087    ///
4088    /// ```norust
4089    /// (name = "example-peering")
4090    /// (createTime > "2021-04-12T08:15:10.40Z")
4091    /// ```
4092    ///
4093    /// By default, each expression is an `AND` expression. However, you
4094    /// can include `AND` and `OR` expressions explicitly.
4095    /// For example:
4096    ///
4097    /// ```norust
4098    /// (name = "example-peering-1") AND
4099    /// (createTime > "2021-04-12T08:15:10.40Z") OR
4100    /// (name = "example-peering-2")
4101    /// ```
4102    pub filter: std::string::String,
4103
4104    /// Sorts list results by a certain order. By default, returned results
4105    /// are ordered by `name` in ascending order.
4106    /// You can also sort results in descending order based on the `name` value
4107    /// using `orderBy="name desc"`.
4108    /// Currently, only ordering by `name` is supported.
4109    pub order_by: std::string::String,
4110
4111    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4112}
4113
4114impl ListNetworkPeeringsRequest {
4115    pub fn new() -> Self {
4116        std::default::Default::default()
4117    }
4118
4119    /// Sets the value of [parent][crate::model::ListNetworkPeeringsRequest::parent].
4120    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4121        self.parent = v.into();
4122        self
4123    }
4124
4125    /// Sets the value of [page_size][crate::model::ListNetworkPeeringsRequest::page_size].
4126    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4127        self.page_size = v.into();
4128        self
4129    }
4130
4131    /// Sets the value of [page_token][crate::model::ListNetworkPeeringsRequest::page_token].
4132    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4133        self.page_token = v.into();
4134        self
4135    }
4136
4137    /// Sets the value of [filter][crate::model::ListNetworkPeeringsRequest::filter].
4138    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4139        self.filter = v.into();
4140        self
4141    }
4142
4143    /// Sets the value of [order_by][crate::model::ListNetworkPeeringsRequest::order_by].
4144    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4145        self.order_by = v.into();
4146        self
4147    }
4148}
4149
4150impl wkt::message::Message for ListNetworkPeeringsRequest {
4151    fn typename() -> &'static str {
4152        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsRequest"
4153    }
4154}
4155
4156/// Request message for
4157/// [VmwareEngine.UpdateNetworkPeering][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]
4158///
4159/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPeering]: crate::client::VmwareEngine::update_network_peering
4160#[derive(Clone, Default, PartialEq)]
4161#[non_exhaustive]
4162pub struct UpdateNetworkPeeringRequest {
4163    /// Required. Network peering description.
4164    pub network_peering: std::option::Option<crate::model::NetworkPeering>,
4165
4166    /// Required. Field mask is used to specify the fields to be overwritten in the
4167    /// `NetworkPeering` resource by the update.
4168    /// The fields specified in the `update_mask` are relative to the resource, not
4169    /// the full request. A field will be overwritten if it is in the mask. If the
4170    /// user does not provide a mask then all fields will be overwritten.
4171    pub update_mask: std::option::Option<wkt::FieldMask>,
4172
4173    /// Optional. A request ID to identify requests. Specify a unique request ID
4174    /// so that if you must retry your request, the server will know to ignore
4175    /// the request if it has already been completed. The server guarantees that a
4176    /// request doesn't result in creation of duplicate commitments for at least 60
4177    /// minutes.
4178    ///
4179    /// For example, consider a situation where you make an initial request and the
4180    /// request times out. If you make the request again with the same request
4181    /// ID, the server can check if original operation with the same request ID
4182    /// was received, and if so, will ignore the second request. This prevents
4183    /// clients from accidentally creating duplicate commitments.
4184    ///
4185    /// The request ID must be a valid UUID with the exception that zero UUID is
4186    /// not supported (00000000-0000-0000-0000-000000000000).
4187    pub request_id: std::string::String,
4188
4189    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4190}
4191
4192impl UpdateNetworkPeeringRequest {
4193    pub fn new() -> Self {
4194        std::default::Default::default()
4195    }
4196
4197    /// Sets the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
4198    pub fn set_network_peering<T>(mut self, v: T) -> Self
4199    where
4200        T: std::convert::Into<crate::model::NetworkPeering>,
4201    {
4202        self.network_peering = std::option::Option::Some(v.into());
4203        self
4204    }
4205
4206    /// Sets or clears the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
4207    pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
4208    where
4209        T: std::convert::Into<crate::model::NetworkPeering>,
4210    {
4211        self.network_peering = v.map(|x| x.into());
4212        self
4213    }
4214
4215    /// Sets the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
4216    pub fn set_update_mask<T>(mut self, v: T) -> Self
4217    where
4218        T: std::convert::Into<wkt::FieldMask>,
4219    {
4220        self.update_mask = std::option::Option::Some(v.into());
4221        self
4222    }
4223
4224    /// Sets or clears the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
4225    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4226    where
4227        T: std::convert::Into<wkt::FieldMask>,
4228    {
4229        self.update_mask = v.map(|x| x.into());
4230        self
4231    }
4232
4233    /// Sets the value of [request_id][crate::model::UpdateNetworkPeeringRequest::request_id].
4234    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4235        self.request_id = v.into();
4236        self
4237    }
4238}
4239
4240impl wkt::message::Message for UpdateNetworkPeeringRequest {
4241    fn typename() -> &'static str {
4242        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPeeringRequest"
4243    }
4244}
4245
4246/// Response message for
4247/// [VmwareEngine.ListNetworkPeerings][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]
4248///
4249/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPeerings]: crate::client::VmwareEngine::list_network_peerings
4250#[derive(Clone, Default, PartialEq)]
4251#[non_exhaustive]
4252pub struct ListNetworkPeeringsResponse {
4253    /// A list of network peerings.
4254    pub network_peerings: std::vec::Vec<crate::model::NetworkPeering>,
4255
4256    /// A token, which can be sent as `page_token` to retrieve the next page.
4257    /// If this field is omitted, there are no subsequent pages.
4258    pub next_page_token: std::string::String,
4259
4260    /// Unreachable resources.
4261    pub unreachable: std::vec::Vec<std::string::String>,
4262
4263    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4264}
4265
4266impl ListNetworkPeeringsResponse {
4267    pub fn new() -> Self {
4268        std::default::Default::default()
4269    }
4270
4271    /// Sets the value of [network_peerings][crate::model::ListNetworkPeeringsResponse::network_peerings].
4272    pub fn set_network_peerings<T, V>(mut self, v: T) -> Self
4273    where
4274        T: std::iter::IntoIterator<Item = V>,
4275        V: std::convert::Into<crate::model::NetworkPeering>,
4276    {
4277        use std::iter::Iterator;
4278        self.network_peerings = v.into_iter().map(|i| i.into()).collect();
4279        self
4280    }
4281
4282    /// Sets the value of [next_page_token][crate::model::ListNetworkPeeringsResponse::next_page_token].
4283    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4284        self.next_page_token = v.into();
4285        self
4286    }
4287
4288    /// Sets the value of [unreachable][crate::model::ListNetworkPeeringsResponse::unreachable].
4289    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4290    where
4291        T: std::iter::IntoIterator<Item = V>,
4292        V: std::convert::Into<std::string::String>,
4293    {
4294        use std::iter::Iterator;
4295        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4296        self
4297    }
4298}
4299
4300impl wkt::message::Message for ListNetworkPeeringsResponse {
4301    fn typename() -> &'static str {
4302        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPeeringsResponse"
4303    }
4304}
4305
4306#[doc(hidden)]
4307impl gax::paginator::internal::PageableResponse for ListNetworkPeeringsResponse {
4308    type PageItem = crate::model::NetworkPeering;
4309
4310    fn items(self) -> std::vec::Vec<Self::PageItem> {
4311        self.network_peerings
4312    }
4313
4314    fn next_page_token(&self) -> std::string::String {
4315        use std::clone::Clone;
4316        self.next_page_token.clone()
4317    }
4318}
4319
4320/// Request message for
4321/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
4322///
4323/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
4324#[derive(Clone, Default, PartialEq)]
4325#[non_exhaustive]
4326pub struct ListPeeringRoutesRequest {
4327    /// Required. The resource name of the network peering to retrieve peering
4328    /// routes from. Resource names are schemeless URIs that follow the conventions
4329    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
4330    /// `projects/my-project/locations/global/networkPeerings/my-peering`
4331    pub parent: std::string::String,
4332
4333    /// The maximum number of peering routes to return in one page.
4334    /// The service may return fewer than this value.
4335    /// The maximum value is coerced to 1000.
4336    /// The default value of this field is 500.
4337    pub page_size: i32,
4338
4339    /// A page token, received from a previous `ListPeeringRoutes` call.
4340    /// Provide this to retrieve the subsequent page.
4341    /// When paginating, all other parameters provided to `ListPeeringRoutes` must
4342    /// match the call that provided the page token.
4343    pub page_token: std::string::String,
4344
4345    /// A filter expression that matches resources returned in the response.
4346    /// Currently, only filtering on the `direction` field is supported. To return
4347    /// routes imported from the peer network, provide "direction=INCOMING". To
4348    /// return routes exported from the VMware Engine network, provide
4349    /// "direction=OUTGOING". Other filter expressions return an error.
4350    pub filter: std::string::String,
4351
4352    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4353}
4354
4355impl ListPeeringRoutesRequest {
4356    pub fn new() -> Self {
4357        std::default::Default::default()
4358    }
4359
4360    /// Sets the value of [parent][crate::model::ListPeeringRoutesRequest::parent].
4361    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4362        self.parent = v.into();
4363        self
4364    }
4365
4366    /// Sets the value of [page_size][crate::model::ListPeeringRoutesRequest::page_size].
4367    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4368        self.page_size = v.into();
4369        self
4370    }
4371
4372    /// Sets the value of [page_token][crate::model::ListPeeringRoutesRequest::page_token].
4373    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4374        self.page_token = v.into();
4375        self
4376    }
4377
4378    /// Sets the value of [filter][crate::model::ListPeeringRoutesRequest::filter].
4379    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4380        self.filter = v.into();
4381        self
4382    }
4383}
4384
4385impl wkt::message::Message for ListPeeringRoutesRequest {
4386    fn typename() -> &'static str {
4387        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesRequest"
4388    }
4389}
4390
4391/// Response message for
4392/// [VmwareEngine.ListPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]
4393///
4394/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPeeringRoutes]: crate::client::VmwareEngine::list_peering_routes
4395#[derive(Clone, Default, PartialEq)]
4396#[non_exhaustive]
4397pub struct ListPeeringRoutesResponse {
4398    /// A list of peering routes.
4399    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
4400
4401    /// A token, which can be sent as `page_token` to retrieve the next page.
4402    /// If this field is omitted, there are no subsequent pages.
4403    pub next_page_token: std::string::String,
4404
4405    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4406}
4407
4408impl ListPeeringRoutesResponse {
4409    pub fn new() -> Self {
4410        std::default::Default::default()
4411    }
4412
4413    /// Sets the value of [peering_routes][crate::model::ListPeeringRoutesResponse::peering_routes].
4414    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
4415    where
4416        T: std::iter::IntoIterator<Item = V>,
4417        V: std::convert::Into<crate::model::PeeringRoute>,
4418    {
4419        use std::iter::Iterator;
4420        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
4421        self
4422    }
4423
4424    /// Sets the value of [next_page_token][crate::model::ListPeeringRoutesResponse::next_page_token].
4425    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4426        self.next_page_token = v.into();
4427        self
4428    }
4429}
4430
4431impl wkt::message::Message for ListPeeringRoutesResponse {
4432    fn typename() -> &'static str {
4433        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPeeringRoutesResponse"
4434    }
4435}
4436
4437#[doc(hidden)]
4438impl gax::paginator::internal::PageableResponse for ListPeeringRoutesResponse {
4439    type PageItem = crate::model::PeeringRoute;
4440
4441    fn items(self) -> std::vec::Vec<Self::PageItem> {
4442        self.peering_routes
4443    }
4444
4445    fn next_page_token(&self) -> std::string::String {
4446        use std::clone::Clone;
4447        self.next_page_token.clone()
4448    }
4449}
4450
4451/// Request message for
4452/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
4453///
4454/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
4455#[derive(Clone, Default, PartialEq)]
4456#[non_exhaustive]
4457pub struct ListNetworkPoliciesRequest {
4458    /// Required. The resource name of the location (region) to query for
4459    /// network policies. Resource names are schemeless URIs that follow the
4460    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
4461    /// example: `projects/my-project/locations/us-central1`
4462    pub parent: std::string::String,
4463
4464    /// The maximum number of network policies to return in one page.
4465    /// The service may return fewer than this value.
4466    /// The maximum value is coerced to 1000.
4467    /// The default value of this field is 500.
4468    pub page_size: i32,
4469
4470    /// A page token, received from a previous `ListNetworkPolicies` call.
4471    /// Provide this to retrieve the subsequent page.
4472    ///
4473    /// When paginating, all other parameters provided to
4474    /// `ListNetworkPolicies` must match the call that provided the page
4475    /// token.
4476    pub page_token: std::string::String,
4477
4478    /// A filter expression that matches resources returned in the response.
4479    /// The expression must specify the field name, a comparison
4480    /// operator, and the value that you want to use for filtering. The value
4481    /// must be a string, a number, or a boolean. The comparison operator
4482    /// must be `=`, `!=`, `>`, or `<`.
4483    ///
4484    /// For example, if you are filtering a list of network policies, you can
4485    /// exclude the ones named `example-policy` by specifying
4486    /// `name != "example-policy"`.
4487    ///
4488    /// To filter on multiple expressions, provide each separate expression within
4489    /// parentheses. For example:
4490    ///
4491    /// ```norust
4492    /// (name = "example-policy")
4493    /// (createTime > "2021-04-12T08:15:10.40Z")
4494    /// ```
4495    ///
4496    /// By default, each expression is an `AND` expression. However, you
4497    /// can include `AND` and `OR` expressions explicitly.
4498    /// For example:
4499    ///
4500    /// ```norust
4501    /// (name = "example-policy-1") AND
4502    /// (createTime > "2021-04-12T08:15:10.40Z") OR
4503    /// (name = "example-policy-2")
4504    /// ```
4505    pub filter: std::string::String,
4506
4507    /// Sorts list results by a certain order. By default, returned results
4508    /// are ordered by `name` in ascending order.
4509    /// You can also sort results in descending order based on the `name` value
4510    /// using `orderBy="name desc"`.
4511    /// Currently, only ordering by `name` is supported.
4512    pub order_by: std::string::String,
4513
4514    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4515}
4516
4517impl ListNetworkPoliciesRequest {
4518    pub fn new() -> Self {
4519        std::default::Default::default()
4520    }
4521
4522    /// Sets the value of [parent][crate::model::ListNetworkPoliciesRequest::parent].
4523    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4524        self.parent = v.into();
4525        self
4526    }
4527
4528    /// Sets the value of [page_size][crate::model::ListNetworkPoliciesRequest::page_size].
4529    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4530        self.page_size = v.into();
4531        self
4532    }
4533
4534    /// Sets the value of [page_token][crate::model::ListNetworkPoliciesRequest::page_token].
4535    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4536        self.page_token = v.into();
4537        self
4538    }
4539
4540    /// Sets the value of [filter][crate::model::ListNetworkPoliciesRequest::filter].
4541    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4542        self.filter = v.into();
4543        self
4544    }
4545
4546    /// Sets the value of [order_by][crate::model::ListNetworkPoliciesRequest::order_by].
4547    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4548        self.order_by = v.into();
4549        self
4550    }
4551}
4552
4553impl wkt::message::Message for ListNetworkPoliciesRequest {
4554    fn typename() -> &'static str {
4555        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesRequest"
4556    }
4557}
4558
4559/// Response message for
4560/// [VmwareEngine.ListNetworkPolicies][google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]
4561///
4562/// [google.cloud.vmwareengine.v1.VmwareEngine.ListNetworkPolicies]: crate::client::VmwareEngine::list_network_policies
4563#[derive(Clone, Default, PartialEq)]
4564#[non_exhaustive]
4565pub struct ListNetworkPoliciesResponse {
4566    /// A list of network policies.
4567    pub network_policies: std::vec::Vec<crate::model::NetworkPolicy>,
4568
4569    /// A token, which can be send as `page_token` to retrieve the next page.
4570    /// If this field is omitted, there are no subsequent pages.
4571    pub next_page_token: std::string::String,
4572
4573    /// Locations that could not be reached when making an aggregated query using
4574    /// wildcards.
4575    pub unreachable: std::vec::Vec<std::string::String>,
4576
4577    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4578}
4579
4580impl ListNetworkPoliciesResponse {
4581    pub fn new() -> Self {
4582        std::default::Default::default()
4583    }
4584
4585    /// Sets the value of [network_policies][crate::model::ListNetworkPoliciesResponse::network_policies].
4586    pub fn set_network_policies<T, V>(mut self, v: T) -> Self
4587    where
4588        T: std::iter::IntoIterator<Item = V>,
4589        V: std::convert::Into<crate::model::NetworkPolicy>,
4590    {
4591        use std::iter::Iterator;
4592        self.network_policies = v.into_iter().map(|i| i.into()).collect();
4593        self
4594    }
4595
4596    /// Sets the value of [next_page_token][crate::model::ListNetworkPoliciesResponse::next_page_token].
4597    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4598        self.next_page_token = v.into();
4599        self
4600    }
4601
4602    /// Sets the value of [unreachable][crate::model::ListNetworkPoliciesResponse::unreachable].
4603    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
4604    where
4605        T: std::iter::IntoIterator<Item = V>,
4606        V: std::convert::Into<std::string::String>,
4607    {
4608        use std::iter::Iterator;
4609        self.unreachable = v.into_iter().map(|i| i.into()).collect();
4610        self
4611    }
4612}
4613
4614impl wkt::message::Message for ListNetworkPoliciesResponse {
4615    fn typename() -> &'static str {
4616        "type.googleapis.com/google.cloud.vmwareengine.v1.ListNetworkPoliciesResponse"
4617    }
4618}
4619
4620#[doc(hidden)]
4621impl gax::paginator::internal::PageableResponse for ListNetworkPoliciesResponse {
4622    type PageItem = crate::model::NetworkPolicy;
4623
4624    fn items(self) -> std::vec::Vec<Self::PageItem> {
4625        self.network_policies
4626    }
4627
4628    fn next_page_token(&self) -> std::string::String {
4629        use std::clone::Clone;
4630        self.next_page_token.clone()
4631    }
4632}
4633
4634/// Request message for
4635/// [VmwareEngine.GetNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]
4636///
4637/// [google.cloud.vmwareengine.v1.VmwareEngine.GetNetworkPolicy]: crate::client::VmwareEngine::get_network_policy
4638#[derive(Clone, Default, PartialEq)]
4639#[non_exhaustive]
4640pub struct GetNetworkPolicyRequest {
4641    /// Required. The resource name of the network policy to retrieve.
4642    /// Resource names are schemeless URIs that follow the conventions in
4643    /// <https://cloud.google.com/apis/design/resource_names>.
4644    /// For example:
4645    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
4646    pub name: std::string::String,
4647
4648    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4649}
4650
4651impl GetNetworkPolicyRequest {
4652    pub fn new() -> Self {
4653        std::default::Default::default()
4654    }
4655
4656    /// Sets the value of [name][crate::model::GetNetworkPolicyRequest::name].
4657    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4658        self.name = v.into();
4659        self
4660    }
4661}
4662
4663impl wkt::message::Message for GetNetworkPolicyRequest {
4664    fn typename() -> &'static str {
4665        "type.googleapis.com/google.cloud.vmwareengine.v1.GetNetworkPolicyRequest"
4666    }
4667}
4668
4669/// Request message for
4670/// [VmwareEngine.UpdateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]
4671///
4672/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateNetworkPolicy]: crate::client::VmwareEngine::update_network_policy
4673#[derive(Clone, Default, PartialEq)]
4674#[non_exhaustive]
4675pub struct UpdateNetworkPolicyRequest {
4676    /// Required. Network policy description.
4677    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
4678
4679    /// Required. Field mask is used to specify the fields to be overwritten in the
4680    /// `NetworkPolicy` resource by the update.
4681    /// The fields specified in the `update_mask` are relative to the resource, not
4682    /// the full request. A field will be overwritten if it is in the mask. If the
4683    /// user does not provide a mask then all fields will be overwritten.
4684    pub update_mask: std::option::Option<wkt::FieldMask>,
4685
4686    /// Optional. A request ID to identify requests. Specify a unique request ID
4687    /// so that if you must retry your request, the server will know to ignore
4688    /// the request if it has already been completed. The server guarantees that a
4689    /// request doesn't result in creation of duplicate commitments for at least 60
4690    /// minutes.
4691    ///
4692    /// For example, consider a situation where you make an initial request and the
4693    /// request times out. If you make the request again with the same request
4694    /// ID, the server can check if original operation with the same request ID
4695    /// was received, and if so, will ignore the second request. This prevents
4696    /// clients from accidentally creating duplicate commitments.
4697    ///
4698    /// The request ID must be a valid UUID with the exception that zero UUID is
4699    /// not supported (00000000-0000-0000-0000-000000000000).
4700    pub request_id: std::string::String,
4701
4702    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4703}
4704
4705impl UpdateNetworkPolicyRequest {
4706    pub fn new() -> Self {
4707        std::default::Default::default()
4708    }
4709
4710    /// Sets the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
4711    pub fn set_network_policy<T>(mut self, v: T) -> Self
4712    where
4713        T: std::convert::Into<crate::model::NetworkPolicy>,
4714    {
4715        self.network_policy = std::option::Option::Some(v.into());
4716        self
4717    }
4718
4719    /// Sets or clears the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
4720    pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
4721    where
4722        T: std::convert::Into<crate::model::NetworkPolicy>,
4723    {
4724        self.network_policy = v.map(|x| x.into());
4725        self
4726    }
4727
4728    /// Sets the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
4729    pub fn set_update_mask<T>(mut self, v: T) -> Self
4730    where
4731        T: std::convert::Into<wkt::FieldMask>,
4732    {
4733        self.update_mask = std::option::Option::Some(v.into());
4734        self
4735    }
4736
4737    /// Sets or clears the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
4738    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4739    where
4740        T: std::convert::Into<wkt::FieldMask>,
4741    {
4742        self.update_mask = v.map(|x| x.into());
4743        self
4744    }
4745
4746    /// Sets the value of [request_id][crate::model::UpdateNetworkPolicyRequest::request_id].
4747    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4748        self.request_id = v.into();
4749        self
4750    }
4751}
4752
4753impl wkt::message::Message for UpdateNetworkPolicyRequest {
4754    fn typename() -> &'static str {
4755        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateNetworkPolicyRequest"
4756    }
4757}
4758
4759/// Request message for
4760/// [VmwareEngine.CreateNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]
4761///
4762/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateNetworkPolicy]: crate::client::VmwareEngine::create_network_policy
4763#[derive(Clone, Default, PartialEq)]
4764#[non_exhaustive]
4765pub struct CreateNetworkPolicyRequest {
4766    /// Required. The resource name of the location (region)
4767    /// to create the new network policy in.
4768    /// Resource names are schemeless URIs that follow the conventions in
4769    /// <https://cloud.google.com/apis/design/resource_names>.
4770    /// For example:
4771    /// `projects/my-project/locations/us-central1`
4772    pub parent: std::string::String,
4773
4774    /// Required. The user-provided identifier of the network policy to be created.
4775    /// This identifier must be unique within parent
4776    /// `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes
4777    /// the final token in the name URI.
4778    /// The identifier must meet the following requirements:
4779    ///
4780    /// * Only contains 1-63 alphanumeric characters and hyphens
4781    /// * Begins with an alphabetical character
4782    /// * Ends with a non-hyphen character
4783    /// * Not formatted as a UUID
4784    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
4785    ///   (section 3.5)
4786    pub network_policy_id: std::string::String,
4787
4788    /// Required. The network policy configuration to use in the request.
4789    pub network_policy: std::option::Option<crate::model::NetworkPolicy>,
4790
4791    /// Optional. A request ID to identify requests. Specify a unique request ID
4792    /// so that if you must retry your request, the server will know to ignore
4793    /// the request if it has already been completed. The server guarantees that a
4794    /// request doesn't result in creation of duplicate commitments for at least 60
4795    /// minutes.
4796    ///
4797    /// For example, consider a situation where you make an initial request and the
4798    /// request times out. If you make the request again with the same request
4799    /// ID, the server can check if original operation with the same request ID
4800    /// was received, and if so, will ignore the second request. This prevents
4801    /// clients from accidentally creating duplicate commitments.
4802    ///
4803    /// The request ID must be a valid UUID with the exception that zero UUID is
4804    /// not supported (00000000-0000-0000-0000-000000000000).
4805    pub request_id: std::string::String,
4806
4807    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4808}
4809
4810impl CreateNetworkPolicyRequest {
4811    pub fn new() -> Self {
4812        std::default::Default::default()
4813    }
4814
4815    /// Sets the value of [parent][crate::model::CreateNetworkPolicyRequest::parent].
4816    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4817        self.parent = v.into();
4818        self
4819    }
4820
4821    /// Sets the value of [network_policy_id][crate::model::CreateNetworkPolicyRequest::network_policy_id].
4822    pub fn set_network_policy_id<T: std::convert::Into<std::string::String>>(
4823        mut self,
4824        v: T,
4825    ) -> Self {
4826        self.network_policy_id = v.into();
4827        self
4828    }
4829
4830    /// Sets the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
4831    pub fn set_network_policy<T>(mut self, v: T) -> Self
4832    where
4833        T: std::convert::Into<crate::model::NetworkPolicy>,
4834    {
4835        self.network_policy = std::option::Option::Some(v.into());
4836        self
4837    }
4838
4839    /// Sets or clears the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
4840    pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
4841    where
4842        T: std::convert::Into<crate::model::NetworkPolicy>,
4843    {
4844        self.network_policy = v.map(|x| x.into());
4845        self
4846    }
4847
4848    /// Sets the value of [request_id][crate::model::CreateNetworkPolicyRequest::request_id].
4849    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4850        self.request_id = v.into();
4851        self
4852    }
4853}
4854
4855impl wkt::message::Message for CreateNetworkPolicyRequest {
4856    fn typename() -> &'static str {
4857        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateNetworkPolicyRequest"
4858    }
4859}
4860
4861/// Request message for
4862/// [VmwareEngine.DeleteNetworkPolicy][google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]
4863///
4864/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteNetworkPolicy]: crate::client::VmwareEngine::delete_network_policy
4865#[derive(Clone, Default, PartialEq)]
4866#[non_exhaustive]
4867pub struct DeleteNetworkPolicyRequest {
4868    /// Required. The resource name of the network policy to delete.
4869    /// Resource names are schemeless URIs that follow the conventions in
4870    /// <https://cloud.google.com/apis/design/resource_names>.
4871    /// For example:
4872    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
4873    pub name: std::string::String,
4874
4875    /// Optional. A request ID to identify requests. Specify a unique request ID
4876    /// so that if you must retry your request, the server will know to ignore
4877    /// the request if it has already been completed. The server guarantees that a
4878    /// request doesn't result in creation of duplicate commitments for at least 60
4879    /// minutes.
4880    ///
4881    /// For example, consider a situation where you make an initial request and the
4882    /// request times out. If you make the request again with the same request
4883    /// ID, the server can check if original operation with the same request ID
4884    /// was received, and if so, will ignore the second request. This prevents
4885    /// clients from accidentally creating duplicate commitments.
4886    ///
4887    /// The request ID must be a valid UUID with the exception that zero UUID is
4888    /// not supported (00000000-0000-0000-0000-000000000000).
4889    pub request_id: std::string::String,
4890
4891    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4892}
4893
4894impl DeleteNetworkPolicyRequest {
4895    pub fn new() -> Self {
4896        std::default::Default::default()
4897    }
4898
4899    /// Sets the value of [name][crate::model::DeleteNetworkPolicyRequest::name].
4900    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4901        self.name = v.into();
4902        self
4903    }
4904
4905    /// Sets the value of [request_id][crate::model::DeleteNetworkPolicyRequest::request_id].
4906    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4907        self.request_id = v.into();
4908        self
4909    }
4910}
4911
4912impl wkt::message::Message for DeleteNetworkPolicyRequest {
4913    fn typename() -> &'static str {
4914        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteNetworkPolicyRequest"
4915    }
4916}
4917
4918/// Request message for
4919/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
4920///
4921/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
4922#[derive(Clone, Default, PartialEq)]
4923#[non_exhaustive]
4924pub struct ListManagementDnsZoneBindingsRequest {
4925    /// Required. The resource name of the private cloud to be queried for
4926    /// management DNS zone bindings.
4927    /// Resource names are schemeless URIs that follow the conventions in
4928    /// <https://cloud.google.com/apis/design/resource_names>.
4929    /// For example:
4930    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
4931    pub parent: std::string::String,
4932
4933    /// The maximum number of management DNS zone bindings to return in one page.
4934    /// The service may return fewer than this value.
4935    /// The maximum value is coerced to 1000.
4936    /// The default value of this field is 500.
4937    pub page_size: i32,
4938
4939    /// A page token, received from a previous `ListManagementDnsZoneBindings`
4940    /// call. Provide this to retrieve the subsequent page.
4941    ///
4942    /// When paginating, all other parameters provided to
4943    /// `ListManagementDnsZoneBindings` must match the call that provided the page
4944    /// token.
4945    pub page_token: std::string::String,
4946
4947    /// A filter expression that matches resources returned in the response.
4948    /// The expression must specify the field name, a comparison
4949    /// operator, and the value that you want to use for filtering. The value
4950    /// must be a string, a number, or a boolean. The comparison operator
4951    /// must be `=`, `!=`, `>`, or `<`.
4952    ///
4953    /// For example, if you are filtering a list of Management DNS Zone Bindings,
4954    /// you can exclude the ones named `example-management-dns-zone-binding` by
4955    /// specifying `name != "example-management-dns-zone-binding"`.
4956    ///
4957    /// To filter on multiple expressions, provide each separate expression within
4958    /// parentheses. For example:
4959    ///
4960    /// ```norust
4961    /// (name = "example-management-dns-zone-binding")
4962    /// (createTime > "2021-04-12T08:15:10.40Z")
4963    /// ```
4964    ///
4965    /// By default, each expression is an `AND` expression. However, you
4966    /// can include `AND` and `OR` expressions explicitly.
4967    /// For example:
4968    ///
4969    /// ```norust
4970    /// (name = "example-management-dns-zone-binding-1") AND
4971    /// (createTime > "2021-04-12T08:15:10.40Z") OR
4972    /// (name = "example-management-dns-zone-binding-2")
4973    /// ```
4974    pub filter: std::string::String,
4975
4976    /// Sorts list results by a certain order. By default, returned results
4977    /// are ordered by `name` in ascending order.
4978    /// You can also sort results in descending order based on the `name` value
4979    /// using `orderBy="name desc"`.
4980    /// Currently, only ordering by `name` is supported.
4981    pub order_by: std::string::String,
4982
4983    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
4984}
4985
4986impl ListManagementDnsZoneBindingsRequest {
4987    pub fn new() -> Self {
4988        std::default::Default::default()
4989    }
4990
4991    /// Sets the value of [parent][crate::model::ListManagementDnsZoneBindingsRequest::parent].
4992    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
4993        self.parent = v.into();
4994        self
4995    }
4996
4997    /// Sets the value of [page_size][crate::model::ListManagementDnsZoneBindingsRequest::page_size].
4998    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
4999        self.page_size = v.into();
5000        self
5001    }
5002
5003    /// Sets the value of [page_token][crate::model::ListManagementDnsZoneBindingsRequest::page_token].
5004    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5005        self.page_token = v.into();
5006        self
5007    }
5008
5009    /// Sets the value of [filter][crate::model::ListManagementDnsZoneBindingsRequest::filter].
5010    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5011        self.filter = v.into();
5012        self
5013    }
5014
5015    /// Sets the value of [order_by][crate::model::ListManagementDnsZoneBindingsRequest::order_by].
5016    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5017        self.order_by = v.into();
5018        self
5019    }
5020}
5021
5022impl wkt::message::Message for ListManagementDnsZoneBindingsRequest {
5023    fn typename() -> &'static str {
5024        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsRequest"
5025    }
5026}
5027
5028/// Response message for
5029/// [VmwareEngine.ListManagementDnsZoneBindings][google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]
5030///
5031/// [google.cloud.vmwareengine.v1.VmwareEngine.ListManagementDnsZoneBindings]: crate::client::VmwareEngine::list_management_dns_zone_bindings
5032#[derive(Clone, Default, PartialEq)]
5033#[non_exhaustive]
5034pub struct ListManagementDnsZoneBindingsResponse {
5035    /// A list of management DNS zone bindings.
5036    pub management_dns_zone_bindings: std::vec::Vec<crate::model::ManagementDnsZoneBinding>,
5037
5038    /// A token, which can be sent as `page_token` to retrieve the next page.
5039    /// If this field is omitted, there are no subsequent pages.
5040    pub next_page_token: std::string::String,
5041
5042    /// Locations that could not be reached when making an aggregated query using
5043    /// wildcards.
5044    pub unreachable: std::vec::Vec<std::string::String>,
5045
5046    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5047}
5048
5049impl ListManagementDnsZoneBindingsResponse {
5050    pub fn new() -> Self {
5051        std::default::Default::default()
5052    }
5053
5054    /// Sets the value of [management_dns_zone_bindings][crate::model::ListManagementDnsZoneBindingsResponse::management_dns_zone_bindings].
5055    pub fn set_management_dns_zone_bindings<T, V>(mut self, v: T) -> Self
5056    where
5057        T: std::iter::IntoIterator<Item = V>,
5058        V: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
5059    {
5060        use std::iter::Iterator;
5061        self.management_dns_zone_bindings = v.into_iter().map(|i| i.into()).collect();
5062        self
5063    }
5064
5065    /// Sets the value of [next_page_token][crate::model::ListManagementDnsZoneBindingsResponse::next_page_token].
5066    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5067        self.next_page_token = v.into();
5068        self
5069    }
5070
5071    /// Sets the value of [unreachable][crate::model::ListManagementDnsZoneBindingsResponse::unreachable].
5072    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5073    where
5074        T: std::iter::IntoIterator<Item = V>,
5075        V: std::convert::Into<std::string::String>,
5076    {
5077        use std::iter::Iterator;
5078        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5079        self
5080    }
5081}
5082
5083impl wkt::message::Message for ListManagementDnsZoneBindingsResponse {
5084    fn typename() -> &'static str {
5085        "type.googleapis.com/google.cloud.vmwareengine.v1.ListManagementDnsZoneBindingsResponse"
5086    }
5087}
5088
5089#[doc(hidden)]
5090impl gax::paginator::internal::PageableResponse for ListManagementDnsZoneBindingsResponse {
5091    type PageItem = crate::model::ManagementDnsZoneBinding;
5092
5093    fn items(self) -> std::vec::Vec<Self::PageItem> {
5094        self.management_dns_zone_bindings
5095    }
5096
5097    fn next_page_token(&self) -> std::string::String {
5098        use std::clone::Clone;
5099        self.next_page_token.clone()
5100    }
5101}
5102
5103/// Request message for
5104/// [VmwareEngine.GetManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]
5105///
5106/// [google.cloud.vmwareengine.v1.VmwareEngine.GetManagementDnsZoneBinding]: crate::client::VmwareEngine::get_management_dns_zone_binding
5107#[derive(Clone, Default, PartialEq)]
5108#[non_exhaustive]
5109pub struct GetManagementDnsZoneBindingRequest {
5110    /// Required. The resource name of the management DNS zone binding to
5111    /// retrieve. Resource names are schemeless URIs that follow the conventions in
5112    /// <https://cloud.google.com/apis/design/resource_names>.
5113    /// For example:
5114    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5115    pub name: std::string::String,
5116
5117    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5118}
5119
5120impl GetManagementDnsZoneBindingRequest {
5121    pub fn new() -> Self {
5122        std::default::Default::default()
5123    }
5124
5125    /// Sets the value of [name][crate::model::GetManagementDnsZoneBindingRequest::name].
5126    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5127        self.name = v.into();
5128        self
5129    }
5130}
5131
5132impl wkt::message::Message for GetManagementDnsZoneBindingRequest {
5133    fn typename() -> &'static str {
5134        "type.googleapis.com/google.cloud.vmwareengine.v1.GetManagementDnsZoneBindingRequest"
5135    }
5136}
5137
5138/// Request message for [VmwareEngine.CreateManagementDnsZoneBindings][]
5139#[derive(Clone, Default, PartialEq)]
5140#[non_exhaustive]
5141pub struct CreateManagementDnsZoneBindingRequest {
5142    /// Required. The resource name of the private cloud
5143    /// to create a new management DNS zone binding for.
5144    /// Resource names are schemeless URIs that follow the conventions in
5145    /// <https://cloud.google.com/apis/design/resource_names>.
5146    /// For example:
5147    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
5148    pub parent: std::string::String,
5149
5150    /// Required. The initial values for a new management DNS zone binding.
5151    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
5152
5153    /// Required. The user-provided identifier of the `ManagementDnsZoneBinding`
5154    /// resource to be created. This identifier must be unique among
5155    /// `ManagementDnsZoneBinding` resources within the parent and becomes the
5156    /// final token in the name URI. The identifier must meet the following
5157    /// requirements:
5158    ///
5159    /// * Only contains 1-63 alphanumeric characters and hyphens
5160    /// * Begins with an alphabetical character
5161    /// * Ends with a non-hyphen character
5162    /// * Not formatted as a UUID
5163    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5164    ///   (section 3.5)
5165    pub management_dns_zone_binding_id: std::string::String,
5166
5167    /// Optional. A request ID to identify requests. Specify a unique request ID
5168    /// so that if you must retry your request, the server will know to ignore
5169    /// the request if it has already been completed. The server guarantees that a
5170    /// request doesn't result in creation of duplicate commitments for at least 60
5171    /// minutes.
5172    ///
5173    /// For example, consider a situation where you make an initial request and the
5174    /// request times out. If you make the request again with the same request ID,
5175    /// the server can check if the original operation with the same request ID was
5176    /// received, and if so, will ignore the second request. This prevents clients
5177    /// from accidentally creating duplicate commitments.
5178    ///
5179    /// The request ID must be a valid UUID with the exception that zero UUID is
5180    /// not supported (00000000-0000-0000-0000-000000000000).
5181    pub request_id: std::string::String,
5182
5183    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5184}
5185
5186impl CreateManagementDnsZoneBindingRequest {
5187    pub fn new() -> Self {
5188        std::default::Default::default()
5189    }
5190
5191    /// Sets the value of [parent][crate::model::CreateManagementDnsZoneBindingRequest::parent].
5192    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5193        self.parent = v.into();
5194        self
5195    }
5196
5197    /// Sets the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
5198    pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
5199    where
5200        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
5201    {
5202        self.management_dns_zone_binding = std::option::Option::Some(v.into());
5203        self
5204    }
5205
5206    /// Sets or clears the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
5207    pub fn set_or_clear_management_dns_zone_binding<T>(mut self, v: std::option::Option<T>) -> Self
5208    where
5209        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
5210    {
5211        self.management_dns_zone_binding = v.map(|x| x.into());
5212        self
5213    }
5214
5215    /// Sets the value of [management_dns_zone_binding_id][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding_id].
5216    pub fn set_management_dns_zone_binding_id<T: std::convert::Into<std::string::String>>(
5217        mut self,
5218        v: T,
5219    ) -> Self {
5220        self.management_dns_zone_binding_id = v.into();
5221        self
5222    }
5223
5224    /// Sets the value of [request_id][crate::model::CreateManagementDnsZoneBindingRequest::request_id].
5225    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5226        self.request_id = v.into();
5227        self
5228    }
5229}
5230
5231impl wkt::message::Message for CreateManagementDnsZoneBindingRequest {
5232    fn typename() -> &'static str {
5233        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateManagementDnsZoneBindingRequest"
5234    }
5235}
5236
5237/// Request message for
5238/// [VmwareEngine.UpdateManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]
5239///
5240/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateManagementDnsZoneBinding]: crate::client::VmwareEngine::update_management_dns_zone_binding
5241#[derive(Clone, Default, PartialEq)]
5242#[non_exhaustive]
5243pub struct UpdateManagementDnsZoneBindingRequest {
5244    /// Required. Field mask is used to specify the fields to be overwritten in the
5245    /// `ManagementDnsZoneBinding` resource by the update.
5246    /// The fields specified in the `update_mask` are relative to the resource, not
5247    /// the full request. A field will be overwritten if it is in the mask. If the
5248    /// user does not provide a mask then all fields will be overwritten.
5249    pub update_mask: std::option::Option<wkt::FieldMask>,
5250
5251    /// Required. New values to update the management DNS zone binding with.
5252    pub management_dns_zone_binding: std::option::Option<crate::model::ManagementDnsZoneBinding>,
5253
5254    /// Optional. A request ID to identify requests. Specify a unique request ID
5255    /// so that if you must retry your request, the server will know to ignore
5256    /// the request if it has already been completed. The server guarantees that a
5257    /// request doesn't result in creation of duplicate commitments for at least 60
5258    /// minutes.
5259    ///
5260    /// For example, consider a situation where you make an initial request and the
5261    /// request times out. If you make the request again with the same request ID,
5262    /// the server can check if the original operation with the same request ID was
5263    /// received, and if so, will ignore the second request. This prevents clients
5264    /// from accidentally creating duplicate commitments.
5265    ///
5266    /// The request ID must be a valid UUID with the exception that zero UUID is
5267    /// not supported (00000000-0000-0000-0000-000000000000).
5268    pub request_id: std::string::String,
5269
5270    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5271}
5272
5273impl UpdateManagementDnsZoneBindingRequest {
5274    pub fn new() -> Self {
5275        std::default::Default::default()
5276    }
5277
5278    /// Sets the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
5279    pub fn set_update_mask<T>(mut self, v: T) -> Self
5280    where
5281        T: std::convert::Into<wkt::FieldMask>,
5282    {
5283        self.update_mask = std::option::Option::Some(v.into());
5284        self
5285    }
5286
5287    /// Sets or clears the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
5288    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5289    where
5290        T: std::convert::Into<wkt::FieldMask>,
5291    {
5292        self.update_mask = v.map(|x| x.into());
5293        self
5294    }
5295
5296    /// Sets the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
5297    pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
5298    where
5299        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
5300    {
5301        self.management_dns_zone_binding = std::option::Option::Some(v.into());
5302        self
5303    }
5304
5305    /// Sets or clears the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
5306    pub fn set_or_clear_management_dns_zone_binding<T>(mut self, v: std::option::Option<T>) -> Self
5307    where
5308        T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
5309    {
5310        self.management_dns_zone_binding = v.map(|x| x.into());
5311        self
5312    }
5313
5314    /// Sets the value of [request_id][crate::model::UpdateManagementDnsZoneBindingRequest::request_id].
5315    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5316        self.request_id = v.into();
5317        self
5318    }
5319}
5320
5321impl wkt::message::Message for UpdateManagementDnsZoneBindingRequest {
5322    fn typename() -> &'static str {
5323        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateManagementDnsZoneBindingRequest"
5324    }
5325}
5326
5327/// Request message for
5328/// [VmwareEngine.DeleteManagementDnsZoneBinding][google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]
5329///
5330/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteManagementDnsZoneBinding]: crate::client::VmwareEngine::delete_management_dns_zone_binding
5331#[derive(Clone, Default, PartialEq)]
5332#[non_exhaustive]
5333pub struct DeleteManagementDnsZoneBindingRequest {
5334    /// Required. The resource name of the management DNS zone binding to delete.
5335    /// Resource names are schemeless URIs that follow the conventions in
5336    /// <https://cloud.google.com/apis/design/resource_names>.
5337    /// For example:
5338    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5339    pub name: std::string::String,
5340
5341    /// Optional. A request ID to identify requests. Specify a unique request ID
5342    /// so that if you must retry your request, the server will know to ignore
5343    /// the request if it has already been completed. The server guarantees that a
5344    /// request doesn't result in creation of duplicate commitments for at least 60
5345    /// minutes.
5346    ///
5347    /// For example, consider a situation where you make an initial request and the
5348    /// request times out. If you make the request again with the same request
5349    /// ID, the server can check if the original operation with the same request ID
5350    /// was received, and if so, will ignore the second request. This prevents
5351    /// clients from accidentally creating duplicate commitments.
5352    ///
5353    /// The request ID must be a valid UUID with the exception that zero UUID is
5354    /// not supported (00000000-0000-0000-0000-000000000000).
5355    pub request_id: std::string::String,
5356
5357    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5358}
5359
5360impl DeleteManagementDnsZoneBindingRequest {
5361    pub fn new() -> Self {
5362        std::default::Default::default()
5363    }
5364
5365    /// Sets the value of [name][crate::model::DeleteManagementDnsZoneBindingRequest::name].
5366    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5367        self.name = v.into();
5368        self
5369    }
5370
5371    /// Sets the value of [request_id][crate::model::DeleteManagementDnsZoneBindingRequest::request_id].
5372    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5373        self.request_id = v.into();
5374        self
5375    }
5376}
5377
5378impl wkt::message::Message for DeleteManagementDnsZoneBindingRequest {
5379    fn typename() -> &'static str {
5380        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteManagementDnsZoneBindingRequest"
5381    }
5382}
5383
5384/// Request message for [VmwareEngine.RepairManagementDnsZoneBindings][]
5385#[derive(Clone, Default, PartialEq)]
5386#[non_exhaustive]
5387pub struct RepairManagementDnsZoneBindingRequest {
5388    /// Required. The resource name of the management DNS zone binding to repair.
5389    /// Resource names are schemeless URIs that follow the conventions in
5390    /// <https://cloud.google.com/apis/design/resource_names>.
5391    /// For example:
5392    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
5393    pub name: std::string::String,
5394
5395    /// Optional. A request ID to identify requests. Specify a unique request ID
5396    /// so that if you must retry your request, the server will know to ignore
5397    /// the request if it has already been completed. The server guarantees that a
5398    /// request doesn't result in creation of duplicate commitments for at least 60
5399    /// minutes.
5400    ///
5401    /// For example, consider a situation where you make an initial request and the
5402    /// request times out. If you make the request again with the same request ID,
5403    /// the server can check if the original operation with the same request ID was
5404    /// received, and if so, will ignore the second request. This prevents clients
5405    /// from accidentally creating duplicate commitments.
5406    ///
5407    /// The request ID must be a valid UUID with the exception that zero UUID is
5408    /// not supported (00000000-0000-0000-0000-000000000000).
5409    pub request_id: std::string::String,
5410
5411    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5412}
5413
5414impl RepairManagementDnsZoneBindingRequest {
5415    pub fn new() -> Self {
5416        std::default::Default::default()
5417    }
5418
5419    /// Sets the value of [name][crate::model::RepairManagementDnsZoneBindingRequest::name].
5420    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5421        self.name = v.into();
5422        self
5423    }
5424
5425    /// Sets the value of [request_id][crate::model::RepairManagementDnsZoneBindingRequest::request_id].
5426    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5427        self.request_id = v.into();
5428        self
5429    }
5430}
5431
5432impl wkt::message::Message for RepairManagementDnsZoneBindingRequest {
5433    fn typename() -> &'static str {
5434        "type.googleapis.com/google.cloud.vmwareengine.v1.RepairManagementDnsZoneBindingRequest"
5435    }
5436}
5437
5438/// Request message for
5439/// [VmwareEngine.CreateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]
5440///
5441/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateVmwareEngineNetwork]: crate::client::VmwareEngine::create_vmware_engine_network
5442#[derive(Clone, Default, PartialEq)]
5443#[non_exhaustive]
5444pub struct CreateVmwareEngineNetworkRequest {
5445    /// Required. The resource name of the location to create the new VMware Engine
5446    /// network in. A VMware Engine network of type
5447    /// `LEGACY` is a regional resource, and a VMware
5448    /// Engine network of type `STANDARD` is a global resource.
5449    /// Resource names are schemeless URIs that follow the conventions in
5450    /// <https://cloud.google.com/apis/design/resource_names>. For example:
5451    /// `projects/my-project/locations/global`
5452    pub parent: std::string::String,
5453
5454    /// Required. The user-provided identifier of the new VMware Engine network.
5455    /// This identifier must be unique among VMware Engine network resources
5456    /// within the parent and becomes the final token in the name URI. The
5457    /// identifier must meet the following requirements:
5458    ///
5459    /// * For networks of type LEGACY, adheres to the format:
5460    ///   `{region-id}-default`. Replace `{region-id}` with the region where you want
5461    ///   to create the VMware Engine network. For example, "us-central1-default".
5462    /// * Only contains 1-63 alphanumeric characters and hyphens
5463    /// * Begins with an alphabetical character
5464    /// * Ends with a non-hyphen character
5465    /// * Not formatted as a UUID
5466    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5467    ///   (section 3.5)
5468    pub vmware_engine_network_id: std::string::String,
5469
5470    /// Required. The initial description of the new VMware Engine network.
5471    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
5472
5473    /// Optional. A request ID to identify requests. Specify a unique request ID
5474    /// so that if you must retry your request, the server will know to ignore
5475    /// the request if it has already been completed. The server guarantees that a
5476    /// request doesn't result in creation of duplicate commitments for at least 60
5477    /// minutes.
5478    ///
5479    /// For example, consider a situation where you make an initial request and the
5480    /// request times out. If you make the request again with the same request
5481    /// ID, the server can check if original operation with the same request ID
5482    /// was received, and if so, will ignore the second request. This prevents
5483    /// clients from accidentally creating duplicate commitments.
5484    ///
5485    /// The request ID must be a valid UUID with the exception that zero UUID is
5486    /// not supported (00000000-0000-0000-0000-000000000000).
5487    pub request_id: std::string::String,
5488
5489    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5490}
5491
5492impl CreateVmwareEngineNetworkRequest {
5493    pub fn new() -> Self {
5494        std::default::Default::default()
5495    }
5496
5497    /// Sets the value of [parent][crate::model::CreateVmwareEngineNetworkRequest::parent].
5498    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5499        self.parent = v.into();
5500        self
5501    }
5502
5503    /// Sets the value of [vmware_engine_network_id][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network_id].
5504    pub fn set_vmware_engine_network_id<T: std::convert::Into<std::string::String>>(
5505        mut self,
5506        v: T,
5507    ) -> Self {
5508        self.vmware_engine_network_id = v.into();
5509        self
5510    }
5511
5512    /// Sets the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
5513    pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
5514    where
5515        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
5516    {
5517        self.vmware_engine_network = std::option::Option::Some(v.into());
5518        self
5519    }
5520
5521    /// Sets or clears the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
5522    pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
5523    where
5524        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
5525    {
5526        self.vmware_engine_network = v.map(|x| x.into());
5527        self
5528    }
5529
5530    /// Sets the value of [request_id][crate::model::CreateVmwareEngineNetworkRequest::request_id].
5531    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5532        self.request_id = v.into();
5533        self
5534    }
5535}
5536
5537impl wkt::message::Message for CreateVmwareEngineNetworkRequest {
5538    fn typename() -> &'static str {
5539        "type.googleapis.com/google.cloud.vmwareengine.v1.CreateVmwareEngineNetworkRequest"
5540    }
5541}
5542
5543/// Request message for
5544/// [VmwareEngine.UpdateVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]
5545///
5546/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdateVmwareEngineNetwork]: crate::client::VmwareEngine::update_vmware_engine_network
5547#[derive(Clone, Default, PartialEq)]
5548#[non_exhaustive]
5549pub struct UpdateVmwareEngineNetworkRequest {
5550    /// Required. VMware Engine network description.
5551    pub vmware_engine_network: std::option::Option<crate::model::VmwareEngineNetwork>,
5552
5553    /// Required. Field mask is used to specify the fields to be overwritten in the
5554    /// VMware Engine network resource by the update.
5555    /// The fields specified in the `update_mask` are relative to the resource, not
5556    /// the full request. A field will be overwritten if it is in the mask. If the
5557    /// user does not provide a mask then all fields will be overwritten. Only the
5558    /// following fields can be updated: `description`.
5559    pub update_mask: std::option::Option<wkt::FieldMask>,
5560
5561    /// Optional. A request ID to identify requests. Specify a unique request ID
5562    /// so that if you must retry your request, the server will know to ignore
5563    /// the request if it has already been completed. The server guarantees that a
5564    /// request doesn't result in creation of duplicate commitments for at least 60
5565    /// minutes.
5566    ///
5567    /// For example, consider a situation where you make an initial request and the
5568    /// request times out. If you make the request again with the same request
5569    /// ID, the server can check if original operation with the same request ID
5570    /// was received, and if so, will ignore the second request. This prevents
5571    /// clients from accidentally creating duplicate commitments.
5572    ///
5573    /// The request ID must be a valid UUID with the exception that zero UUID is
5574    /// not supported (00000000-0000-0000-0000-000000000000).
5575    pub request_id: std::string::String,
5576
5577    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5578}
5579
5580impl UpdateVmwareEngineNetworkRequest {
5581    pub fn new() -> Self {
5582        std::default::Default::default()
5583    }
5584
5585    /// Sets the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
5586    pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
5587    where
5588        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
5589    {
5590        self.vmware_engine_network = std::option::Option::Some(v.into());
5591        self
5592    }
5593
5594    /// Sets or clears the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
5595    pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
5596    where
5597        T: std::convert::Into<crate::model::VmwareEngineNetwork>,
5598    {
5599        self.vmware_engine_network = v.map(|x| x.into());
5600        self
5601    }
5602
5603    /// Sets the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
5604    pub fn set_update_mask<T>(mut self, v: T) -> Self
5605    where
5606        T: std::convert::Into<wkt::FieldMask>,
5607    {
5608        self.update_mask = std::option::Option::Some(v.into());
5609        self
5610    }
5611
5612    /// Sets or clears the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
5613    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5614    where
5615        T: std::convert::Into<wkt::FieldMask>,
5616    {
5617        self.update_mask = v.map(|x| x.into());
5618        self
5619    }
5620
5621    /// Sets the value of [request_id][crate::model::UpdateVmwareEngineNetworkRequest::request_id].
5622    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5623        self.request_id = v.into();
5624        self
5625    }
5626}
5627
5628impl wkt::message::Message for UpdateVmwareEngineNetworkRequest {
5629    fn typename() -> &'static str {
5630        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdateVmwareEngineNetworkRequest"
5631    }
5632}
5633
5634/// Request message for
5635/// [VmwareEngine.DeleteVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]
5636///
5637/// [google.cloud.vmwareengine.v1.VmwareEngine.DeleteVmwareEngineNetwork]: crate::client::VmwareEngine::delete_vmware_engine_network
5638#[derive(Clone, Default, PartialEq)]
5639#[non_exhaustive]
5640pub struct DeleteVmwareEngineNetworkRequest {
5641    /// Required. The resource name of the VMware Engine network to be deleted.
5642    /// Resource names are schemeless URIs that follow the conventions in
5643    /// <https://cloud.google.com/apis/design/resource_names>.
5644    /// For example:
5645    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
5646    pub name: std::string::String,
5647
5648    /// Optional. A request ID to identify requests. Specify a unique request ID
5649    /// so that if you must retry your request, the server will know to ignore
5650    /// the request if it has already been completed. The server guarantees that a
5651    /// request doesn't result in creation of duplicate commitments for at least 60
5652    /// minutes.
5653    ///
5654    /// For example, consider a situation where you make an initial request and the
5655    /// request times out. If you make the request again with the same request
5656    /// ID, the server can check if original operation with the same request ID
5657    /// was received, and if so, will ignore the second request. This prevents
5658    /// clients from accidentally creating duplicate commitments.
5659    ///
5660    /// The request ID must be a valid UUID with the exception that zero UUID is
5661    /// not supported (00000000-0000-0000-0000-000000000000).
5662    pub request_id: std::string::String,
5663
5664    /// Optional. Checksum used to ensure that the user-provided value is up to
5665    /// date before the server processes the request. The server compares provided
5666    /// checksum with the current checksum of the resource. If the user-provided
5667    /// value is out of date, this request returns an `ABORTED` error.
5668    pub etag: std::string::String,
5669
5670    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5671}
5672
5673impl DeleteVmwareEngineNetworkRequest {
5674    pub fn new() -> Self {
5675        std::default::Default::default()
5676    }
5677
5678    /// Sets the value of [name][crate::model::DeleteVmwareEngineNetworkRequest::name].
5679    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5680        self.name = v.into();
5681        self
5682    }
5683
5684    /// Sets the value of [request_id][crate::model::DeleteVmwareEngineNetworkRequest::request_id].
5685    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5686        self.request_id = v.into();
5687        self
5688    }
5689
5690    /// Sets the value of [etag][crate::model::DeleteVmwareEngineNetworkRequest::etag].
5691    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5692        self.etag = v.into();
5693        self
5694    }
5695}
5696
5697impl wkt::message::Message for DeleteVmwareEngineNetworkRequest {
5698    fn typename() -> &'static str {
5699        "type.googleapis.com/google.cloud.vmwareengine.v1.DeleteVmwareEngineNetworkRequest"
5700    }
5701}
5702
5703/// Request message for
5704/// [VmwareEngine.GetVmwareEngineNetwork][google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]
5705///
5706/// [google.cloud.vmwareengine.v1.VmwareEngine.GetVmwareEngineNetwork]: crate::client::VmwareEngine::get_vmware_engine_network
5707#[derive(Clone, Default, PartialEq)]
5708#[non_exhaustive]
5709pub struct GetVmwareEngineNetworkRequest {
5710    /// Required. The resource name of the VMware Engine network to retrieve.
5711    /// Resource names are schemeless URIs that follow the conventions in
5712    /// <https://cloud.google.com/apis/design/resource_names>.
5713    /// For example:
5714    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
5715    pub name: std::string::String,
5716
5717    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5718}
5719
5720impl GetVmwareEngineNetworkRequest {
5721    pub fn new() -> Self {
5722        std::default::Default::default()
5723    }
5724
5725    /// Sets the value of [name][crate::model::GetVmwareEngineNetworkRequest::name].
5726    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5727        self.name = v.into();
5728        self
5729    }
5730}
5731
5732impl wkt::message::Message for GetVmwareEngineNetworkRequest {
5733    fn typename() -> &'static str {
5734        "type.googleapis.com/google.cloud.vmwareengine.v1.GetVmwareEngineNetworkRequest"
5735    }
5736}
5737
5738/// Request message for
5739/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
5740///
5741/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
5742#[derive(Clone, Default, PartialEq)]
5743#[non_exhaustive]
5744pub struct ListVmwareEngineNetworksRequest {
5745    /// Required. The resource name of the location to query for
5746    /// VMware Engine networks. Resource names are schemeless URIs that follow the
5747    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
5748    /// example: `projects/my-project/locations/global`
5749    pub parent: std::string::String,
5750
5751    /// The maximum number of results to return in one page.
5752    /// The maximum value is coerced to 1000.
5753    /// The default value of this field is 500.
5754    pub page_size: i32,
5755
5756    /// A page token, received from a previous `ListVmwareEngineNetworks` call.
5757    /// Provide this to retrieve the subsequent page.
5758    ///
5759    /// When paginating, all other parameters provided to
5760    /// `ListVmwareEngineNetworks` must match the call that provided the page
5761    /// token.
5762    pub page_token: std::string::String,
5763
5764    /// A filter expression that matches resources returned in the response.
5765    /// The expression must specify the field name, a comparison
5766    /// operator, and the value that you want to use for filtering. The value
5767    /// must be a string, a number, or a boolean. The comparison operator
5768    /// must be `=`, `!=`, `>`, or `<`.
5769    ///
5770    /// For example, if you are filtering a list of network peerings, you can
5771    /// exclude the ones named `example-network` by specifying
5772    /// `name != "example-network"`.
5773    ///
5774    /// To filter on multiple expressions, provide each separate expression within
5775    /// parentheses. For example:
5776    ///
5777    /// ```norust
5778    /// (name = "example-network")
5779    /// (createTime > "2021-04-12T08:15:10.40Z")
5780    /// ```
5781    ///
5782    /// By default, each expression is an `AND` expression. However, you
5783    /// can include `AND` and `OR` expressions explicitly.
5784    /// For example:
5785    ///
5786    /// ```norust
5787    /// (name = "example-network-1") AND
5788    /// (createTime > "2021-04-12T08:15:10.40Z") OR
5789    /// (name = "example-network-2")
5790    /// ```
5791    pub filter: std::string::String,
5792
5793    /// Sorts list results by a certain order. By default, returned results
5794    /// are ordered by `name` in ascending order.
5795    /// You can also sort results in descending order based on the `name` value
5796    /// using `orderBy="name desc"`.
5797    /// Currently, only ordering by `name` is supported.
5798    pub order_by: std::string::String,
5799
5800    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5801}
5802
5803impl ListVmwareEngineNetworksRequest {
5804    pub fn new() -> Self {
5805        std::default::Default::default()
5806    }
5807
5808    /// Sets the value of [parent][crate::model::ListVmwareEngineNetworksRequest::parent].
5809    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5810        self.parent = v.into();
5811        self
5812    }
5813
5814    /// Sets the value of [page_size][crate::model::ListVmwareEngineNetworksRequest::page_size].
5815    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
5816        self.page_size = v.into();
5817        self
5818    }
5819
5820    /// Sets the value of [page_token][crate::model::ListVmwareEngineNetworksRequest::page_token].
5821    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5822        self.page_token = v.into();
5823        self
5824    }
5825
5826    /// Sets the value of [filter][crate::model::ListVmwareEngineNetworksRequest::filter].
5827    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5828        self.filter = v.into();
5829        self
5830    }
5831
5832    /// Sets the value of [order_by][crate::model::ListVmwareEngineNetworksRequest::order_by].
5833    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5834        self.order_by = v.into();
5835        self
5836    }
5837}
5838
5839impl wkt::message::Message for ListVmwareEngineNetworksRequest {
5840    fn typename() -> &'static str {
5841        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksRequest"
5842    }
5843}
5844
5845/// Response message for
5846/// [VmwareEngine.ListVmwareEngineNetworks][google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]
5847///
5848/// [google.cloud.vmwareengine.v1.VmwareEngine.ListVmwareEngineNetworks]: crate::client::VmwareEngine::list_vmware_engine_networks
5849#[derive(Clone, Default, PartialEq)]
5850#[non_exhaustive]
5851pub struct ListVmwareEngineNetworksResponse {
5852    /// A list of VMware Engine networks.
5853    pub vmware_engine_networks: std::vec::Vec<crate::model::VmwareEngineNetwork>,
5854
5855    /// A token, which can be sent as `page_token` to retrieve the next page.
5856    /// If this field is omitted, there are no subsequent pages.
5857    pub next_page_token: std::string::String,
5858
5859    /// Unreachable resources.
5860    pub unreachable: std::vec::Vec<std::string::String>,
5861
5862    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5863}
5864
5865impl ListVmwareEngineNetworksResponse {
5866    pub fn new() -> Self {
5867        std::default::Default::default()
5868    }
5869
5870    /// Sets the value of [vmware_engine_networks][crate::model::ListVmwareEngineNetworksResponse::vmware_engine_networks].
5871    pub fn set_vmware_engine_networks<T, V>(mut self, v: T) -> Self
5872    where
5873        T: std::iter::IntoIterator<Item = V>,
5874        V: std::convert::Into<crate::model::VmwareEngineNetwork>,
5875    {
5876        use std::iter::Iterator;
5877        self.vmware_engine_networks = v.into_iter().map(|i| i.into()).collect();
5878        self
5879    }
5880
5881    /// Sets the value of [next_page_token][crate::model::ListVmwareEngineNetworksResponse::next_page_token].
5882    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5883        self.next_page_token = v.into();
5884        self
5885    }
5886
5887    /// Sets the value of [unreachable][crate::model::ListVmwareEngineNetworksResponse::unreachable].
5888    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
5889    where
5890        T: std::iter::IntoIterator<Item = V>,
5891        V: std::convert::Into<std::string::String>,
5892    {
5893        use std::iter::Iterator;
5894        self.unreachable = v.into_iter().map(|i| i.into()).collect();
5895        self
5896    }
5897}
5898
5899impl wkt::message::Message for ListVmwareEngineNetworksResponse {
5900    fn typename() -> &'static str {
5901        "type.googleapis.com/google.cloud.vmwareengine.v1.ListVmwareEngineNetworksResponse"
5902    }
5903}
5904
5905#[doc(hidden)]
5906impl gax::paginator::internal::PageableResponse for ListVmwareEngineNetworksResponse {
5907    type PageItem = crate::model::VmwareEngineNetwork;
5908
5909    fn items(self) -> std::vec::Vec<Self::PageItem> {
5910        self.vmware_engine_networks
5911    }
5912
5913    fn next_page_token(&self) -> std::string::String {
5914        use std::clone::Clone;
5915        self.next_page_token.clone()
5916    }
5917}
5918
5919/// Request message for
5920/// [VmwareEngine.CreatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]
5921///
5922/// [google.cloud.vmwareengine.v1.VmwareEngine.CreatePrivateConnection]: crate::client::VmwareEngine::create_private_connection
5923#[derive(Clone, Default, PartialEq)]
5924#[non_exhaustive]
5925pub struct CreatePrivateConnectionRequest {
5926    /// Required. The resource name of the location to create the new private
5927    /// connection in. Private connection is a regional resource.
5928    /// Resource names are schemeless URIs that follow the conventions in
5929    /// <https://cloud.google.com/apis/design/resource_names>. For example:
5930    /// `projects/my-project/locations/us-central1`
5931    pub parent: std::string::String,
5932
5933    /// Required. The user-provided identifier of the new private connection.
5934    /// This identifier must be unique among private connection resources
5935    /// within the parent and becomes the final token in the name URI. The
5936    /// identifier must meet the following requirements:
5937    ///
5938    /// * Only contains 1-63 alphanumeric characters and hyphens
5939    /// * Begins with an alphabetical character
5940    /// * Ends with a non-hyphen character
5941    /// * Not formatted as a UUID
5942    /// * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034)
5943    ///   (section 3.5)
5944    pub private_connection_id: std::string::String,
5945
5946    /// Required. The initial description of the new private connection.
5947    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
5948
5949    /// Optional. A request ID to identify requests. Specify a unique request ID
5950    /// so that if you must retry your request, the server will know to ignore
5951    /// the request if it has already been completed. The server guarantees that a
5952    /// request doesn't result in creation of duplicate commitments for at least 60
5953    /// minutes.
5954    ///
5955    /// For example, consider a situation where you make an initial request and the
5956    /// request times out. If you make the request again with the same request
5957    /// ID, the server can check if original operation with the same request ID
5958    /// was received, and if so, will ignore the second request. This prevents
5959    /// clients from accidentally creating duplicate commitments.
5960    ///
5961    /// The request ID must be a valid UUID with the exception that zero UUID is
5962    /// not supported (00000000-0000-0000-0000-000000000000).
5963    pub request_id: std::string::String,
5964
5965    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
5966}
5967
5968impl CreatePrivateConnectionRequest {
5969    pub fn new() -> Self {
5970        std::default::Default::default()
5971    }
5972
5973    /// Sets the value of [parent][crate::model::CreatePrivateConnectionRequest::parent].
5974    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
5975        self.parent = v.into();
5976        self
5977    }
5978
5979    /// Sets the value of [private_connection_id][crate::model::CreatePrivateConnectionRequest::private_connection_id].
5980    pub fn set_private_connection_id<T: std::convert::Into<std::string::String>>(
5981        mut self,
5982        v: T,
5983    ) -> Self {
5984        self.private_connection_id = v.into();
5985        self
5986    }
5987
5988    /// Sets the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
5989    pub fn set_private_connection<T>(mut self, v: T) -> Self
5990    where
5991        T: std::convert::Into<crate::model::PrivateConnection>,
5992    {
5993        self.private_connection = std::option::Option::Some(v.into());
5994        self
5995    }
5996
5997    /// Sets or clears the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
5998    pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
5999    where
6000        T: std::convert::Into<crate::model::PrivateConnection>,
6001    {
6002        self.private_connection = v.map(|x| x.into());
6003        self
6004    }
6005
6006    /// Sets the value of [request_id][crate::model::CreatePrivateConnectionRequest::request_id].
6007    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6008        self.request_id = v.into();
6009        self
6010    }
6011}
6012
6013impl wkt::message::Message for CreatePrivateConnectionRequest {
6014    fn typename() -> &'static str {
6015        "type.googleapis.com/google.cloud.vmwareengine.v1.CreatePrivateConnectionRequest"
6016    }
6017}
6018
6019/// Request message for
6020/// [VmwareEngine.GetPrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]
6021///
6022/// [google.cloud.vmwareengine.v1.VmwareEngine.GetPrivateConnection]: crate::client::VmwareEngine::get_private_connection
6023#[derive(Clone, Default, PartialEq)]
6024#[non_exhaustive]
6025pub struct GetPrivateConnectionRequest {
6026    /// Required. The resource name of the private connection to retrieve.
6027    /// Resource names are schemeless URIs that follow the conventions in
6028    /// <https://cloud.google.com/apis/design/resource_names>.
6029    /// For example:
6030    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
6031    pub name: std::string::String,
6032
6033    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6034}
6035
6036impl GetPrivateConnectionRequest {
6037    pub fn new() -> Self {
6038        std::default::Default::default()
6039    }
6040
6041    /// Sets the value of [name][crate::model::GetPrivateConnectionRequest::name].
6042    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6043        self.name = v.into();
6044        self
6045    }
6046}
6047
6048impl wkt::message::Message for GetPrivateConnectionRequest {
6049    fn typename() -> &'static str {
6050        "type.googleapis.com/google.cloud.vmwareengine.v1.GetPrivateConnectionRequest"
6051    }
6052}
6053
6054/// Request message for
6055/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
6056///
6057/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
6058#[derive(Clone, Default, PartialEq)]
6059#[non_exhaustive]
6060pub struct ListPrivateConnectionsRequest {
6061    /// Required. The resource name of the location to query for
6062    /// private connections. Resource names are schemeless URIs that follow the
6063    /// conventions in <https://cloud.google.com/apis/design/resource_names>. For
6064    /// example: `projects/my-project/locations/us-central1`
6065    pub parent: std::string::String,
6066
6067    /// The maximum number of private connections to return in one page.
6068    /// The maximum value is coerced to 1000.
6069    /// The default value of this field is 500.
6070    pub page_size: i32,
6071
6072    /// A page token, received from a previous `ListPrivateConnections` call.
6073    /// Provide this to retrieve the subsequent page.
6074    ///
6075    /// When paginating, all other parameters provided to
6076    /// `ListPrivateConnections` must match the call that provided the page
6077    /// token.
6078    pub page_token: std::string::String,
6079
6080    /// A filter expression that matches resources returned in the response.
6081    /// The expression must specify the field name, a comparison
6082    /// operator, and the value that you want to use for filtering. The value
6083    /// must be a string, a number, or a boolean. The comparison operator
6084    /// must be `=`, `!=`, `>`, or `<`.
6085    ///
6086    /// For example, if you are filtering a list of private connections, you can
6087    /// exclude the ones named `example-connection` by specifying
6088    /// `name != "example-connection"`.
6089    ///
6090    /// To filter on multiple expressions, provide each separate expression within
6091    /// parentheses. For example:
6092    ///
6093    /// ```norust
6094    /// (name = "example-connection")
6095    /// (createTime > "2022-09-22T08:15:10.40Z")
6096    /// ```
6097    ///
6098    /// By default, each expression is an `AND` expression. However, you
6099    /// can include `AND` and `OR` expressions explicitly.
6100    /// For example:
6101    ///
6102    /// ```norust
6103    /// (name = "example-connection-1") AND
6104    /// (createTime > "2021-04-12T08:15:10.40Z") OR
6105    /// (name = "example-connection-2")
6106    /// ```
6107    pub filter: std::string::String,
6108
6109    /// Sorts list results by a certain order. By default, returned results
6110    /// are ordered by `name` in ascending order.
6111    /// You can also sort results in descending order based on the `name` value
6112    /// using `orderBy="name desc"`.
6113    /// Currently, only ordering by `name` is supported.
6114    pub order_by: std::string::String,
6115
6116    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6117}
6118
6119impl ListPrivateConnectionsRequest {
6120    pub fn new() -> Self {
6121        std::default::Default::default()
6122    }
6123
6124    /// Sets the value of [parent][crate::model::ListPrivateConnectionsRequest::parent].
6125    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6126        self.parent = v.into();
6127        self
6128    }
6129
6130    /// Sets the value of [page_size][crate::model::ListPrivateConnectionsRequest::page_size].
6131    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6132        self.page_size = v.into();
6133        self
6134    }
6135
6136    /// Sets the value of [page_token][crate::model::ListPrivateConnectionsRequest::page_token].
6137    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6138        self.page_token = v.into();
6139        self
6140    }
6141
6142    /// Sets the value of [filter][crate::model::ListPrivateConnectionsRequest::filter].
6143    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6144        self.filter = v.into();
6145        self
6146    }
6147
6148    /// Sets the value of [order_by][crate::model::ListPrivateConnectionsRequest::order_by].
6149    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6150        self.order_by = v.into();
6151        self
6152    }
6153}
6154
6155impl wkt::message::Message for ListPrivateConnectionsRequest {
6156    fn typename() -> &'static str {
6157        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsRequest"
6158    }
6159}
6160
6161/// Response message for
6162/// [VmwareEngine.ListPrivateConnections][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]
6163///
6164/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnections]: crate::client::VmwareEngine::list_private_connections
6165#[derive(Clone, Default, PartialEq)]
6166#[non_exhaustive]
6167pub struct ListPrivateConnectionsResponse {
6168    /// A list of private connections.
6169    pub private_connections: std::vec::Vec<crate::model::PrivateConnection>,
6170
6171    /// A token, which can be sent as `page_token` to retrieve the next page.
6172    /// If this field is omitted, there are no subsequent pages.
6173    pub next_page_token: std::string::String,
6174
6175    /// Unreachable resources.
6176    pub unreachable: std::vec::Vec<std::string::String>,
6177
6178    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6179}
6180
6181impl ListPrivateConnectionsResponse {
6182    pub fn new() -> Self {
6183        std::default::Default::default()
6184    }
6185
6186    /// Sets the value of [private_connections][crate::model::ListPrivateConnectionsResponse::private_connections].
6187    pub fn set_private_connections<T, V>(mut self, v: T) -> Self
6188    where
6189        T: std::iter::IntoIterator<Item = V>,
6190        V: std::convert::Into<crate::model::PrivateConnection>,
6191    {
6192        use std::iter::Iterator;
6193        self.private_connections = v.into_iter().map(|i| i.into()).collect();
6194        self
6195    }
6196
6197    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionsResponse::next_page_token].
6198    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6199        self.next_page_token = v.into();
6200        self
6201    }
6202
6203    /// Sets the value of [unreachable][crate::model::ListPrivateConnectionsResponse::unreachable].
6204    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
6205    where
6206        T: std::iter::IntoIterator<Item = V>,
6207        V: std::convert::Into<std::string::String>,
6208    {
6209        use std::iter::Iterator;
6210        self.unreachable = v.into_iter().map(|i| i.into()).collect();
6211        self
6212    }
6213}
6214
6215impl wkt::message::Message for ListPrivateConnectionsResponse {
6216    fn typename() -> &'static str {
6217        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionsResponse"
6218    }
6219}
6220
6221#[doc(hidden)]
6222impl gax::paginator::internal::PageableResponse for ListPrivateConnectionsResponse {
6223    type PageItem = crate::model::PrivateConnection;
6224
6225    fn items(self) -> std::vec::Vec<Self::PageItem> {
6226        self.private_connections
6227    }
6228
6229    fn next_page_token(&self) -> std::string::String {
6230        use std::clone::Clone;
6231        self.next_page_token.clone()
6232    }
6233}
6234
6235/// Request message for
6236/// [VmwareEngine.UpdatePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]
6237///
6238/// [google.cloud.vmwareengine.v1.VmwareEngine.UpdatePrivateConnection]: crate::client::VmwareEngine::update_private_connection
6239#[derive(Clone, Default, PartialEq)]
6240#[non_exhaustive]
6241pub struct UpdatePrivateConnectionRequest {
6242    /// Required. Private connection description.
6243    pub private_connection: std::option::Option<crate::model::PrivateConnection>,
6244
6245    /// Required. Field mask is used to specify the fields to be overwritten in the
6246    /// `PrivateConnection` resource by the update.
6247    /// The fields specified in the `update_mask` are relative to the resource, not
6248    /// the full request. A field will be overwritten if it is in the mask. If the
6249    /// user does not provide a mask then all fields will be overwritten.
6250    pub update_mask: std::option::Option<wkt::FieldMask>,
6251
6252    /// Optional. A request ID to identify requests. Specify a unique request ID
6253    /// so that if you must retry your request, the server will know to ignore
6254    /// the request if it has already been completed. The server guarantees that a
6255    /// request doesn't result in creation of duplicate commitments for at least 60
6256    /// minutes.
6257    ///
6258    /// For example, consider a situation where you make an initial request and the
6259    /// request times out. If you make the request again with the same request
6260    /// ID, the server can check if original operation with the same request ID
6261    /// was received, and if so, will ignore the second request. This prevents
6262    /// clients from accidentally creating duplicate commitments.
6263    ///
6264    /// The request ID must be a valid UUID with the exception that zero UUID is
6265    /// not supported (00000000-0000-0000-0000-000000000000).
6266    pub request_id: std::string::String,
6267
6268    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6269}
6270
6271impl UpdatePrivateConnectionRequest {
6272    pub fn new() -> Self {
6273        std::default::Default::default()
6274    }
6275
6276    /// Sets the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
6277    pub fn set_private_connection<T>(mut self, v: T) -> Self
6278    where
6279        T: std::convert::Into<crate::model::PrivateConnection>,
6280    {
6281        self.private_connection = std::option::Option::Some(v.into());
6282        self
6283    }
6284
6285    /// Sets or clears the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
6286    pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
6287    where
6288        T: std::convert::Into<crate::model::PrivateConnection>,
6289    {
6290        self.private_connection = v.map(|x| x.into());
6291        self
6292    }
6293
6294    /// Sets the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
6295    pub fn set_update_mask<T>(mut self, v: T) -> Self
6296    where
6297        T: std::convert::Into<wkt::FieldMask>,
6298    {
6299        self.update_mask = std::option::Option::Some(v.into());
6300        self
6301    }
6302
6303    /// Sets or clears the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
6304    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6305    where
6306        T: std::convert::Into<wkt::FieldMask>,
6307    {
6308        self.update_mask = v.map(|x| x.into());
6309        self
6310    }
6311
6312    /// Sets the value of [request_id][crate::model::UpdatePrivateConnectionRequest::request_id].
6313    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6314        self.request_id = v.into();
6315        self
6316    }
6317}
6318
6319impl wkt::message::Message for UpdatePrivateConnectionRequest {
6320    fn typename() -> &'static str {
6321        "type.googleapis.com/google.cloud.vmwareengine.v1.UpdatePrivateConnectionRequest"
6322    }
6323}
6324
6325/// Request message for
6326/// [VmwareEngine.DeletePrivateConnection][google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]
6327///
6328/// [google.cloud.vmwareengine.v1.VmwareEngine.DeletePrivateConnection]: crate::client::VmwareEngine::delete_private_connection
6329#[derive(Clone, Default, PartialEq)]
6330#[non_exhaustive]
6331pub struct DeletePrivateConnectionRequest {
6332    /// Required. The resource name of the private connection to be deleted.
6333    /// Resource names are schemeless URIs that follow the conventions in
6334    /// <https://cloud.google.com/apis/design/resource_names>.
6335    /// For example:
6336    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
6337    pub name: std::string::String,
6338
6339    /// Optional. A request ID to identify requests. Specify a unique request ID
6340    /// so that if you must retry your request, the server will know to ignore
6341    /// the request if it has already been completed. The server guarantees that a
6342    /// request doesn't result in creation of duplicate commitments for at least 60
6343    /// minutes.
6344    ///
6345    /// For example, consider a situation where you make an initial request and the
6346    /// request times out. If you make the request again with the same request
6347    /// ID, the server can check if original operation with the same request ID
6348    /// was received, and if so, will ignore the second request. This prevents
6349    /// clients from accidentally creating duplicate commitments.
6350    ///
6351    /// The request ID must be a valid UUID with the exception that zero UUID is
6352    /// not supported (00000000-0000-0000-0000-000000000000).
6353    pub request_id: std::string::String,
6354
6355    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6356}
6357
6358impl DeletePrivateConnectionRequest {
6359    pub fn new() -> Self {
6360        std::default::Default::default()
6361    }
6362
6363    /// Sets the value of [name][crate::model::DeletePrivateConnectionRequest::name].
6364    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6365        self.name = v.into();
6366        self
6367    }
6368
6369    /// Sets the value of [request_id][crate::model::DeletePrivateConnectionRequest::request_id].
6370    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6371        self.request_id = v.into();
6372        self
6373    }
6374}
6375
6376impl wkt::message::Message for DeletePrivateConnectionRequest {
6377    fn typename() -> &'static str {
6378        "type.googleapis.com/google.cloud.vmwareengine.v1.DeletePrivateConnectionRequest"
6379    }
6380}
6381
6382/// Request message for
6383/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
6384///
6385/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
6386#[derive(Clone, Default, PartialEq)]
6387#[non_exhaustive]
6388pub struct ListPrivateConnectionPeeringRoutesRequest {
6389    /// Required. The resource name of the private connection to retrieve peering
6390    /// routes from. Resource names are schemeless URIs that follow the conventions
6391    /// in <https://cloud.google.com/apis/design/resource_names>. For example:
6392    /// `projects/my-project/locations/us-west1/privateConnections/my-connection`
6393    pub parent: std::string::String,
6394
6395    /// The maximum number of peering routes to return in one page.
6396    /// The service may return fewer than this value.
6397    /// The maximum value is coerced to 1000.
6398    /// The default value of this field is 500.
6399    pub page_size: i32,
6400
6401    /// A page token, received from a previous `ListPrivateConnectionPeeringRoutes`
6402    /// call. Provide this to retrieve the subsequent page. When paginating, all
6403    /// other parameters provided to `ListPrivateConnectionPeeringRoutes` must
6404    /// match the call that provided the page token.
6405    pub page_token: std::string::String,
6406
6407    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6408}
6409
6410impl ListPrivateConnectionPeeringRoutesRequest {
6411    pub fn new() -> Self {
6412        std::default::Default::default()
6413    }
6414
6415    /// Sets the value of [parent][crate::model::ListPrivateConnectionPeeringRoutesRequest::parent].
6416    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6417        self.parent = v.into();
6418        self
6419    }
6420
6421    /// Sets the value of [page_size][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_size].
6422    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6423        self.page_size = v.into();
6424        self
6425    }
6426
6427    /// Sets the value of [page_token][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_token].
6428    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6429        self.page_token = v.into();
6430        self
6431    }
6432}
6433
6434impl wkt::message::Message for ListPrivateConnectionPeeringRoutesRequest {
6435    fn typename() -> &'static str {
6436        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesRequest"
6437    }
6438}
6439
6440/// Response message for
6441/// [VmwareEngine.ListPrivateConnectionPeeringRoutes][google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]
6442///
6443/// [google.cloud.vmwareengine.v1.VmwareEngine.ListPrivateConnectionPeeringRoutes]: crate::client::VmwareEngine::list_private_connection_peering_routes
6444#[derive(Clone, Default, PartialEq)]
6445#[non_exhaustive]
6446pub struct ListPrivateConnectionPeeringRoutesResponse {
6447    /// A list of peering routes.
6448    pub peering_routes: std::vec::Vec<crate::model::PeeringRoute>,
6449
6450    /// A token, which can be sent as `page_token` to retrieve the next page.
6451    /// If this field is omitted, there are no subsequent pages.
6452    pub next_page_token: std::string::String,
6453
6454    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6455}
6456
6457impl ListPrivateConnectionPeeringRoutesResponse {
6458    pub fn new() -> Self {
6459        std::default::Default::default()
6460    }
6461
6462    /// Sets the value of [peering_routes][crate::model::ListPrivateConnectionPeeringRoutesResponse::peering_routes].
6463    pub fn set_peering_routes<T, V>(mut self, v: T) -> Self
6464    where
6465        T: std::iter::IntoIterator<Item = V>,
6466        V: std::convert::Into<crate::model::PeeringRoute>,
6467    {
6468        use std::iter::Iterator;
6469        self.peering_routes = v.into_iter().map(|i| i.into()).collect();
6470        self
6471    }
6472
6473    /// Sets the value of [next_page_token][crate::model::ListPrivateConnectionPeeringRoutesResponse::next_page_token].
6474    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6475        self.next_page_token = v.into();
6476        self
6477    }
6478}
6479
6480impl wkt::message::Message for ListPrivateConnectionPeeringRoutesResponse {
6481    fn typename() -> &'static str {
6482        "type.googleapis.com/google.cloud.vmwareengine.v1.ListPrivateConnectionPeeringRoutesResponse"
6483    }
6484}
6485
6486#[doc(hidden)]
6487impl gax::paginator::internal::PageableResponse for ListPrivateConnectionPeeringRoutesResponse {
6488    type PageItem = crate::model::PeeringRoute;
6489
6490    fn items(self) -> std::vec::Vec<Self::PageItem> {
6491        self.peering_routes
6492    }
6493
6494    fn next_page_token(&self) -> std::string::String {
6495        use std::clone::Clone;
6496        self.next_page_token.clone()
6497    }
6498}
6499
6500/// Request message for
6501/// [VmwareEngine.GrantDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]
6502///
6503/// [google.cloud.vmwareengine.v1.VmwareEngine.GrantDnsBindPermission]: crate::client::VmwareEngine::grant_dns_bind_permission
6504#[derive(Clone, Default, PartialEq)]
6505#[non_exhaustive]
6506pub struct GrantDnsBindPermissionRequest {
6507    /// Required. The name of the resource which stores the users/service accounts
6508    /// having the permission to bind to the corresponding intranet VPC of the
6509    /// consumer project. DnsBindPermission is a global resource. Resource names
6510    /// are schemeless URIs that follow the conventions in
6511    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6512    /// `projects/my-project/locations/global/dnsBindPermission`
6513    pub name: std::string::String,
6514
6515    /// Required. The consumer provided user/service account which needs to be
6516    /// granted permission to bind with the intranet VPC corresponding to the
6517    /// consumer project.
6518    pub principal: std::option::Option<crate::model::Principal>,
6519
6520    /// Optional. A request ID to identify requests. Specify a unique request ID
6521    /// so that if you must retry your request, the server will know to ignore
6522    /// the request if it has already been completed. The server guarantees that a
6523    /// request doesn't result in creation of duplicate commitments for at least 60
6524    /// minutes.
6525    ///
6526    /// For example, consider a situation where you make an initial request and the
6527    /// request times out. If you make the request again with the same request
6528    /// ID, the server can check if original operation with the same request ID
6529    /// was received, and if so, will ignore the second request. This prevents
6530    /// clients from accidentally creating duplicate commitments.
6531    ///
6532    /// The request ID must be a valid UUID with the exception that zero UUID is
6533    /// not supported (00000000-0000-0000-0000-000000000000).
6534    pub request_id: std::string::String,
6535
6536    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6537}
6538
6539impl GrantDnsBindPermissionRequest {
6540    pub fn new() -> Self {
6541        std::default::Default::default()
6542    }
6543
6544    /// Sets the value of [name][crate::model::GrantDnsBindPermissionRequest::name].
6545    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6546        self.name = v.into();
6547        self
6548    }
6549
6550    /// Sets the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
6551    pub fn set_principal<T>(mut self, v: T) -> Self
6552    where
6553        T: std::convert::Into<crate::model::Principal>,
6554    {
6555        self.principal = std::option::Option::Some(v.into());
6556        self
6557    }
6558
6559    /// Sets or clears the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
6560    pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
6561    where
6562        T: std::convert::Into<crate::model::Principal>,
6563    {
6564        self.principal = v.map(|x| x.into());
6565        self
6566    }
6567
6568    /// Sets the value of [request_id][crate::model::GrantDnsBindPermissionRequest::request_id].
6569    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6570        self.request_id = v.into();
6571        self
6572    }
6573}
6574
6575impl wkt::message::Message for GrantDnsBindPermissionRequest {
6576    fn typename() -> &'static str {
6577        "type.googleapis.com/google.cloud.vmwareengine.v1.GrantDnsBindPermissionRequest"
6578    }
6579}
6580
6581/// Request message for
6582/// [VmwareEngine.RevokeDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]
6583///
6584/// [google.cloud.vmwareengine.v1.VmwareEngine.RevokeDnsBindPermission]: crate::client::VmwareEngine::revoke_dns_bind_permission
6585#[derive(Clone, Default, PartialEq)]
6586#[non_exhaustive]
6587pub struct RevokeDnsBindPermissionRequest {
6588    /// Required. The name of the resource which stores the users/service accounts
6589    /// having the permission to bind to the corresponding intranet VPC of the
6590    /// consumer project. DnsBindPermission is a global resource. Resource names
6591    /// are schemeless URIs that follow the conventions in
6592    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6593    /// `projects/my-project/locations/global/dnsBindPermission`
6594    pub name: std::string::String,
6595
6596    /// Required. The consumer provided user/service account which needs to be
6597    /// granted permission to bind with the intranet VPC corresponding to the
6598    /// consumer project.
6599    pub principal: std::option::Option<crate::model::Principal>,
6600
6601    /// Optional. A request ID to identify requests. Specify a unique request ID
6602    /// so that if you must retry your request, the server will know to ignore
6603    /// the request if it has already been completed. The server guarantees that a
6604    /// request doesn't result in creation of duplicate commitments for at least 60
6605    /// minutes.
6606    ///
6607    /// For example, consider a situation where you make an initial request and the
6608    /// request times out. If you make the request again with the same request
6609    /// ID, the server can check if original operation with the same request ID
6610    /// was received, and if so, will ignore the second request. This prevents
6611    /// clients from accidentally creating duplicate commitments.
6612    ///
6613    /// The request ID must be a valid UUID with the exception that zero UUID is
6614    /// not supported (00000000-0000-0000-0000-000000000000).
6615    pub request_id: std::string::String,
6616
6617    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6618}
6619
6620impl RevokeDnsBindPermissionRequest {
6621    pub fn new() -> Self {
6622        std::default::Default::default()
6623    }
6624
6625    /// Sets the value of [name][crate::model::RevokeDnsBindPermissionRequest::name].
6626    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6627        self.name = v.into();
6628        self
6629    }
6630
6631    /// Sets the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
6632    pub fn set_principal<T>(mut self, v: T) -> Self
6633    where
6634        T: std::convert::Into<crate::model::Principal>,
6635    {
6636        self.principal = std::option::Option::Some(v.into());
6637        self
6638    }
6639
6640    /// Sets or clears the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
6641    pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
6642    where
6643        T: std::convert::Into<crate::model::Principal>,
6644    {
6645        self.principal = v.map(|x| x.into());
6646        self
6647    }
6648
6649    /// Sets the value of [request_id][crate::model::RevokeDnsBindPermissionRequest::request_id].
6650    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6651        self.request_id = v.into();
6652        self
6653    }
6654}
6655
6656impl wkt::message::Message for RevokeDnsBindPermissionRequest {
6657    fn typename() -> &'static str {
6658        "type.googleapis.com/google.cloud.vmwareengine.v1.RevokeDnsBindPermissionRequest"
6659    }
6660}
6661
6662/// Request message for
6663/// [VmwareEngine.GetDnsBindPermission][google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]
6664///
6665/// [google.cloud.vmwareengine.v1.VmwareEngine.GetDnsBindPermission]: crate::client::VmwareEngine::get_dns_bind_permission
6666#[derive(Clone, Default, PartialEq)]
6667#[non_exhaustive]
6668pub struct GetDnsBindPermissionRequest {
6669    /// Required. The name of the resource which stores the users/service accounts
6670    /// having the permission to bind to the corresponding intranet VPC of the
6671    /// consumer project. DnsBindPermission is a global resource. Resource names
6672    /// are schemeless URIs that follow the conventions in
6673    /// <https://cloud.google.com/apis/design/resource_names>. For example:
6674    /// `projects/my-project/locations/global/dnsBindPermission`
6675    pub name: std::string::String,
6676
6677    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6678}
6679
6680impl GetDnsBindPermissionRequest {
6681    pub fn new() -> Self {
6682        std::default::Default::default()
6683    }
6684
6685    /// Sets the value of [name][crate::model::GetDnsBindPermissionRequest::name].
6686    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6687        self.name = v.into();
6688        self
6689    }
6690}
6691
6692impl wkt::message::Message for GetDnsBindPermissionRequest {
6693    fn typename() -> &'static str {
6694        "type.googleapis.com/google.cloud.vmwareengine.v1.GetDnsBindPermissionRequest"
6695    }
6696}
6697
6698/// Network configuration in the consumer project
6699/// with which the peering has to be done.
6700#[derive(Clone, Default, PartialEq)]
6701#[non_exhaustive]
6702pub struct NetworkConfig {
6703    /// Required. Management CIDR used by VMware management appliances.
6704    pub management_cidr: std::string::String,
6705
6706    /// Optional. The relative resource name of the VMware Engine network attached
6707    /// to the private cloud. Specify the name in the following form:
6708    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
6709    /// where `{project}` can either be a project number or a project ID.
6710    pub vmware_engine_network: std::string::String,
6711
6712    /// Output only. The canonical name of the VMware Engine network in the form:
6713    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
6714    pub vmware_engine_network_canonical: std::string::String,
6715
6716    /// Output only. The IP address layout version of the management IP address
6717    /// range. Possible versions include:
6718    ///
6719    /// * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address
6720    ///   layout used by some existing private clouds. This is no longer supported
6721    ///   for new private clouds as it does not support all features.
6722    /// * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address
6723    ///   layout used by all newly created private clouds. This version supports all
6724    ///   current features.
6725    pub management_ip_address_layout_version: i32,
6726
6727    /// Output only. DNS Server IP of the Private Cloud.
6728    /// All DNS queries can be forwarded to this address for name resolution of
6729    /// Private Cloud's management entities like vCenter, NSX-T Manager and
6730    /// ESXi hosts.
6731    pub dns_server_ip: std::string::String,
6732
6733    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6734}
6735
6736impl NetworkConfig {
6737    pub fn new() -> Self {
6738        std::default::Default::default()
6739    }
6740
6741    /// Sets the value of [management_cidr][crate::model::NetworkConfig::management_cidr].
6742    pub fn set_management_cidr<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6743        self.management_cidr = v.into();
6744        self
6745    }
6746
6747    /// Sets the value of [vmware_engine_network][crate::model::NetworkConfig::vmware_engine_network].
6748    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
6749        mut self,
6750        v: T,
6751    ) -> Self {
6752        self.vmware_engine_network = v.into();
6753        self
6754    }
6755
6756    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkConfig::vmware_engine_network_canonical].
6757    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
6758        mut self,
6759        v: T,
6760    ) -> Self {
6761        self.vmware_engine_network_canonical = v.into();
6762        self
6763    }
6764
6765    /// Sets the value of [management_ip_address_layout_version][crate::model::NetworkConfig::management_ip_address_layout_version].
6766    pub fn set_management_ip_address_layout_version<T: std::convert::Into<i32>>(
6767        mut self,
6768        v: T,
6769    ) -> Self {
6770        self.management_ip_address_layout_version = v.into();
6771        self
6772    }
6773
6774    /// Sets the value of [dns_server_ip][crate::model::NetworkConfig::dns_server_ip].
6775    pub fn set_dns_server_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6776        self.dns_server_ip = v.into();
6777        self
6778    }
6779}
6780
6781impl wkt::message::Message for NetworkConfig {
6782    fn typename() -> &'static str {
6783        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkConfig"
6784    }
6785}
6786
6787/// Information about the type and number of nodes associated with the cluster.
6788#[derive(Clone, Default, PartialEq)]
6789#[non_exhaustive]
6790pub struct NodeTypeConfig {
6791    /// Required. The number of nodes of this type in the cluster
6792    pub node_count: i32,
6793
6794    /// Optional. Customized number of cores available to each node of the type.
6795    /// This number must always be one of `nodeType.availableCustomCoreCounts`.
6796    /// If zero is provided max value from `nodeType.availableCustomCoreCounts`
6797    /// will be used.
6798    pub custom_core_count: i32,
6799
6800    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6801}
6802
6803impl NodeTypeConfig {
6804    pub fn new() -> Self {
6805        std::default::Default::default()
6806    }
6807
6808    /// Sets the value of [node_count][crate::model::NodeTypeConfig::node_count].
6809    pub fn set_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6810        self.node_count = v.into();
6811        self
6812    }
6813
6814    /// Sets the value of [custom_core_count][crate::model::NodeTypeConfig::custom_core_count].
6815    pub fn set_custom_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
6816        self.custom_core_count = v.into();
6817        self
6818    }
6819}
6820
6821impl wkt::message::Message for NodeTypeConfig {
6822    fn typename() -> &'static str {
6823        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeTypeConfig"
6824    }
6825}
6826
6827/// Configuration of a stretched cluster.
6828#[derive(Clone, Default, PartialEq)]
6829#[non_exhaustive]
6830pub struct StretchedClusterConfig {
6831    /// Required. Zone that will remain operational when connection between the two
6832    /// zones is lost. Specify the resource name of a zone that belongs to the
6833    /// region of the private cloud. For example:
6834    /// `projects/{project}/locations/europe-west3-a` where `{project}` can either
6835    /// be a project number or a project ID.
6836    pub preferred_location: std::string::String,
6837
6838    /// Required. Additional zone for a higher level of availability and load
6839    /// balancing. Specify the resource name of a zone that belongs to the region
6840    /// of the private cloud. For example:
6841    /// `projects/{project}/locations/europe-west3-b` where `{project}` can either
6842    /// be a project number or a project ID.
6843    pub secondary_location: std::string::String,
6844
6845    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6846}
6847
6848impl StretchedClusterConfig {
6849    pub fn new() -> Self {
6850        std::default::Default::default()
6851    }
6852
6853    /// Sets the value of [preferred_location][crate::model::StretchedClusterConfig::preferred_location].
6854    pub fn set_preferred_location<T: std::convert::Into<std::string::String>>(
6855        mut self,
6856        v: T,
6857    ) -> Self {
6858        self.preferred_location = v.into();
6859        self
6860    }
6861
6862    /// Sets the value of [secondary_location][crate::model::StretchedClusterConfig::secondary_location].
6863    pub fn set_secondary_location<T: std::convert::Into<std::string::String>>(
6864        mut self,
6865        v: T,
6866    ) -> Self {
6867        self.secondary_location = v.into();
6868        self
6869    }
6870}
6871
6872impl wkt::message::Message for StretchedClusterConfig {
6873    fn typename() -> &'static str {
6874        "type.googleapis.com/google.cloud.vmwareengine.v1.StretchedClusterConfig"
6875    }
6876}
6877
6878/// Represents a private cloud resource. Private clouds of type `STANDARD` and
6879/// `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are
6880/// regional.
6881#[derive(Clone, Default, PartialEq)]
6882#[non_exhaustive]
6883pub struct PrivateCloud {
6884    /// Output only. The resource name of this private cloud.
6885    /// Resource names are schemeless URIs that follow the conventions in
6886    /// <https://cloud.google.com/apis/design/resource_names>.
6887    /// For example:
6888    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`
6889    pub name: std::string::String,
6890
6891    /// Output only. Creation time of this resource.
6892    pub create_time: std::option::Option<wkt::Timestamp>,
6893
6894    /// Output only. Last update time of this resource.
6895    pub update_time: std::option::Option<wkt::Timestamp>,
6896
6897    /// Output only. Time when the resource was scheduled for deletion.
6898    pub delete_time: std::option::Option<wkt::Timestamp>,
6899
6900    /// Output only. Time when the resource will be irreversibly deleted.
6901    pub expire_time: std::option::Option<wkt::Timestamp>,
6902
6903    /// Output only. State of the resource. New values may be added to this enum
6904    /// when appropriate.
6905    pub state: crate::model::private_cloud::State,
6906
6907    /// Required. Network configuration of the private cloud.
6908    pub network_config: std::option::Option<crate::model::NetworkConfig>,
6909
6910    /// Required. Input only. The management cluster for this private cloud.
6911    /// This field is required during creation of the private cloud to provide
6912    /// details for the default cluster.
6913    ///
6914    /// The following fields can't be changed after private cloud creation:
6915    /// `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`.
6916    pub management_cluster: std::option::Option<crate::model::private_cloud::ManagementCluster>,
6917
6918    /// User-provided description for this private cloud.
6919    pub description: std::string::String,
6920
6921    /// Output only. HCX appliance.
6922    pub hcx: std::option::Option<crate::model::Hcx>,
6923
6924    /// Output only. NSX appliance.
6925    pub nsx: std::option::Option<crate::model::Nsx>,
6926
6927    /// Output only. Vcenter appliance.
6928    pub vcenter: std::option::Option<crate::model::Vcenter>,
6929
6930    /// Output only. System-generated unique identifier for the resource.
6931    pub uid: std::string::String,
6932
6933    /// Optional. Type of the private cloud. Defaults to STANDARD.
6934    pub r#type: crate::model::private_cloud::Type,
6935
6936    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
6937}
6938
6939impl PrivateCloud {
6940    pub fn new() -> Self {
6941        std::default::Default::default()
6942    }
6943
6944    /// Sets the value of [name][crate::model::PrivateCloud::name].
6945    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
6946        self.name = v.into();
6947        self
6948    }
6949
6950    /// Sets the value of [create_time][crate::model::PrivateCloud::create_time].
6951    pub fn set_create_time<T>(mut self, v: T) -> Self
6952    where
6953        T: std::convert::Into<wkt::Timestamp>,
6954    {
6955        self.create_time = std::option::Option::Some(v.into());
6956        self
6957    }
6958
6959    /// Sets or clears the value of [create_time][crate::model::PrivateCloud::create_time].
6960    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
6961    where
6962        T: std::convert::Into<wkt::Timestamp>,
6963    {
6964        self.create_time = v.map(|x| x.into());
6965        self
6966    }
6967
6968    /// Sets the value of [update_time][crate::model::PrivateCloud::update_time].
6969    pub fn set_update_time<T>(mut self, v: T) -> Self
6970    where
6971        T: std::convert::Into<wkt::Timestamp>,
6972    {
6973        self.update_time = std::option::Option::Some(v.into());
6974        self
6975    }
6976
6977    /// Sets or clears the value of [update_time][crate::model::PrivateCloud::update_time].
6978    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
6979    where
6980        T: std::convert::Into<wkt::Timestamp>,
6981    {
6982        self.update_time = v.map(|x| x.into());
6983        self
6984    }
6985
6986    /// Sets the value of [delete_time][crate::model::PrivateCloud::delete_time].
6987    pub fn set_delete_time<T>(mut self, v: T) -> Self
6988    where
6989        T: std::convert::Into<wkt::Timestamp>,
6990    {
6991        self.delete_time = std::option::Option::Some(v.into());
6992        self
6993    }
6994
6995    /// Sets or clears the value of [delete_time][crate::model::PrivateCloud::delete_time].
6996    pub fn set_or_clear_delete_time<T>(mut self, v: std::option::Option<T>) -> Self
6997    where
6998        T: std::convert::Into<wkt::Timestamp>,
6999    {
7000        self.delete_time = v.map(|x| x.into());
7001        self
7002    }
7003
7004    /// Sets the value of [expire_time][crate::model::PrivateCloud::expire_time].
7005    pub fn set_expire_time<T>(mut self, v: T) -> Self
7006    where
7007        T: std::convert::Into<wkt::Timestamp>,
7008    {
7009        self.expire_time = std::option::Option::Some(v.into());
7010        self
7011    }
7012
7013    /// Sets or clears the value of [expire_time][crate::model::PrivateCloud::expire_time].
7014    pub fn set_or_clear_expire_time<T>(mut self, v: std::option::Option<T>) -> Self
7015    where
7016        T: std::convert::Into<wkt::Timestamp>,
7017    {
7018        self.expire_time = v.map(|x| x.into());
7019        self
7020    }
7021
7022    /// Sets the value of [state][crate::model::PrivateCloud::state].
7023    pub fn set_state<T: std::convert::Into<crate::model::private_cloud::State>>(
7024        mut self,
7025        v: T,
7026    ) -> Self {
7027        self.state = v.into();
7028        self
7029    }
7030
7031    /// Sets the value of [network_config][crate::model::PrivateCloud::network_config].
7032    pub fn set_network_config<T>(mut self, v: T) -> Self
7033    where
7034        T: std::convert::Into<crate::model::NetworkConfig>,
7035    {
7036        self.network_config = std::option::Option::Some(v.into());
7037        self
7038    }
7039
7040    /// Sets or clears the value of [network_config][crate::model::PrivateCloud::network_config].
7041    pub fn set_or_clear_network_config<T>(mut self, v: std::option::Option<T>) -> Self
7042    where
7043        T: std::convert::Into<crate::model::NetworkConfig>,
7044    {
7045        self.network_config = v.map(|x| x.into());
7046        self
7047    }
7048
7049    /// Sets the value of [management_cluster][crate::model::PrivateCloud::management_cluster].
7050    pub fn set_management_cluster<T>(mut self, v: T) -> Self
7051    where
7052        T: std::convert::Into<crate::model::private_cloud::ManagementCluster>,
7053    {
7054        self.management_cluster = std::option::Option::Some(v.into());
7055        self
7056    }
7057
7058    /// Sets or clears the value of [management_cluster][crate::model::PrivateCloud::management_cluster].
7059    pub fn set_or_clear_management_cluster<T>(mut self, v: std::option::Option<T>) -> Self
7060    where
7061        T: std::convert::Into<crate::model::private_cloud::ManagementCluster>,
7062    {
7063        self.management_cluster = v.map(|x| x.into());
7064        self
7065    }
7066
7067    /// Sets the value of [description][crate::model::PrivateCloud::description].
7068    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7069        self.description = v.into();
7070        self
7071    }
7072
7073    /// Sets the value of [hcx][crate::model::PrivateCloud::hcx].
7074    pub fn set_hcx<T>(mut self, v: T) -> Self
7075    where
7076        T: std::convert::Into<crate::model::Hcx>,
7077    {
7078        self.hcx = std::option::Option::Some(v.into());
7079        self
7080    }
7081
7082    /// Sets or clears the value of [hcx][crate::model::PrivateCloud::hcx].
7083    pub fn set_or_clear_hcx<T>(mut self, v: std::option::Option<T>) -> Self
7084    where
7085        T: std::convert::Into<crate::model::Hcx>,
7086    {
7087        self.hcx = v.map(|x| x.into());
7088        self
7089    }
7090
7091    /// Sets the value of [nsx][crate::model::PrivateCloud::nsx].
7092    pub fn set_nsx<T>(mut self, v: T) -> Self
7093    where
7094        T: std::convert::Into<crate::model::Nsx>,
7095    {
7096        self.nsx = std::option::Option::Some(v.into());
7097        self
7098    }
7099
7100    /// Sets or clears the value of [nsx][crate::model::PrivateCloud::nsx].
7101    pub fn set_or_clear_nsx<T>(mut self, v: std::option::Option<T>) -> Self
7102    where
7103        T: std::convert::Into<crate::model::Nsx>,
7104    {
7105        self.nsx = v.map(|x| x.into());
7106        self
7107    }
7108
7109    /// Sets the value of [vcenter][crate::model::PrivateCloud::vcenter].
7110    pub fn set_vcenter<T>(mut self, v: T) -> Self
7111    where
7112        T: std::convert::Into<crate::model::Vcenter>,
7113    {
7114        self.vcenter = std::option::Option::Some(v.into());
7115        self
7116    }
7117
7118    /// Sets or clears the value of [vcenter][crate::model::PrivateCloud::vcenter].
7119    pub fn set_or_clear_vcenter<T>(mut self, v: std::option::Option<T>) -> Self
7120    where
7121        T: std::convert::Into<crate::model::Vcenter>,
7122    {
7123        self.vcenter = v.map(|x| x.into());
7124        self
7125    }
7126
7127    /// Sets the value of [uid][crate::model::PrivateCloud::uid].
7128    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7129        self.uid = v.into();
7130        self
7131    }
7132
7133    /// Sets the value of [r#type][crate::model::PrivateCloud::type].
7134    pub fn set_type<T: std::convert::Into<crate::model::private_cloud::Type>>(
7135        mut self,
7136        v: T,
7137    ) -> Self {
7138        self.r#type = v.into();
7139        self
7140    }
7141}
7142
7143impl wkt::message::Message for PrivateCloud {
7144    fn typename() -> &'static str {
7145        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud"
7146    }
7147}
7148
7149/// Defines additional types related to [PrivateCloud].
7150pub mod private_cloud {
7151    #[allow(unused_imports)]
7152    use super::*;
7153
7154    /// Management cluster configuration.
7155    #[derive(Clone, Default, PartialEq)]
7156    #[non_exhaustive]
7157    pub struct ManagementCluster {
7158        /// Required. The user-provided identifier of the new `Cluster`.
7159        /// The identifier must meet the following requirements:
7160        ///
7161        /// * Only contains 1-63 alphanumeric characters and hyphens
7162        /// * Begins with an alphabetical character
7163        /// * Ends with a non-hyphen character
7164        /// * Not formatted as a UUID
7165        /// * Complies with [RFC
7166        ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
7167        pub cluster_id: std::string::String,
7168
7169        /// Required. The map of cluster node types in this cluster, where the key is
7170        /// canonical identifier of the node type (corresponds to the `NodeType`).
7171        pub node_type_configs:
7172            std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
7173
7174        /// Optional. Configuration of a stretched cluster. Required for STRETCHED
7175        /// private clouds.
7176        pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
7177
7178        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7179    }
7180
7181    impl ManagementCluster {
7182        pub fn new() -> Self {
7183            std::default::Default::default()
7184        }
7185
7186        /// Sets the value of [cluster_id][crate::model::private_cloud::ManagementCluster::cluster_id].
7187        pub fn set_cluster_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7188            self.cluster_id = v.into();
7189            self
7190        }
7191
7192        /// Sets the value of [node_type_configs][crate::model::private_cloud::ManagementCluster::node_type_configs].
7193        pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
7194        where
7195            T: std::iter::IntoIterator<Item = (K, V)>,
7196            K: std::convert::Into<std::string::String>,
7197            V: std::convert::Into<crate::model::NodeTypeConfig>,
7198        {
7199            use std::iter::Iterator;
7200            self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7201            self
7202        }
7203
7204        /// Sets the value of [stretched_cluster_config][crate::model::private_cloud::ManagementCluster::stretched_cluster_config].
7205        pub fn set_stretched_cluster_config<T>(mut self, v: T) -> Self
7206        where
7207            T: std::convert::Into<crate::model::StretchedClusterConfig>,
7208        {
7209            self.stretched_cluster_config = std::option::Option::Some(v.into());
7210            self
7211        }
7212
7213        /// Sets or clears the value of [stretched_cluster_config][crate::model::private_cloud::ManagementCluster::stretched_cluster_config].
7214        pub fn set_or_clear_stretched_cluster_config<T>(mut self, v: std::option::Option<T>) -> Self
7215        where
7216            T: std::convert::Into<crate::model::StretchedClusterConfig>,
7217        {
7218            self.stretched_cluster_config = v.map(|x| x.into());
7219            self
7220        }
7221    }
7222
7223    impl wkt::message::Message for ManagementCluster {
7224        fn typename() -> &'static str {
7225            "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateCloud.ManagementCluster"
7226        }
7227    }
7228
7229    /// Enum State defines possible states of private clouds.
7230    ///
7231    /// # Working with unknown values
7232    ///
7233    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7234    /// additional enum variants at any time. Adding new variants is not considered
7235    /// a breaking change. Applications should write their code in anticipation of:
7236    ///
7237    /// - New values appearing in future releases of the client library, **and**
7238    /// - New values received dynamically, without application changes.
7239    ///
7240    /// Please consult the [Working with enums] section in the user guide for some
7241    /// guidelines.
7242    ///
7243    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7244    #[derive(Clone, Debug, PartialEq)]
7245    #[non_exhaustive]
7246    pub enum State {
7247        /// The default value. This value should never be used.
7248        Unspecified,
7249        /// The private cloud is ready.
7250        Active,
7251        /// The private cloud is being created.
7252        Creating,
7253        /// The private cloud is being updated.
7254        Updating,
7255        /// The private cloud is in failed state.
7256        Failed,
7257        /// The private cloud is scheduled for deletion. The deletion process can be
7258        /// cancelled by using the corresponding undelete method.
7259        Deleted,
7260        /// The private cloud is irreversibly deleted and is being removed from the
7261        /// system.
7262        Purging,
7263        /// If set, the enum was initialized with an unknown value.
7264        ///
7265        /// Applications can examine the value using [State::value] or
7266        /// [State::name].
7267        UnknownValue(state::UnknownValue),
7268    }
7269
7270    #[doc(hidden)]
7271    pub mod state {
7272        #[allow(unused_imports)]
7273        use super::*;
7274        #[derive(Clone, Debug, PartialEq)]
7275        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7276    }
7277
7278    impl State {
7279        /// Gets the enum value.
7280        ///
7281        /// Returns `None` if the enum contains an unknown value deserialized from
7282        /// the string representation of enums.
7283        pub fn value(&self) -> std::option::Option<i32> {
7284            match self {
7285                Self::Unspecified => std::option::Option::Some(0),
7286                Self::Active => std::option::Option::Some(1),
7287                Self::Creating => std::option::Option::Some(2),
7288                Self::Updating => std::option::Option::Some(3),
7289                Self::Failed => std::option::Option::Some(5),
7290                Self::Deleted => std::option::Option::Some(6),
7291                Self::Purging => std::option::Option::Some(7),
7292                Self::UnknownValue(u) => u.0.value(),
7293            }
7294        }
7295
7296        /// Gets the enum value as a string.
7297        ///
7298        /// Returns `None` if the enum contains an unknown value deserialized from
7299        /// the integer representation of enums.
7300        pub fn name(&self) -> std::option::Option<&str> {
7301            match self {
7302                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
7303                Self::Active => std::option::Option::Some("ACTIVE"),
7304                Self::Creating => std::option::Option::Some("CREATING"),
7305                Self::Updating => std::option::Option::Some("UPDATING"),
7306                Self::Failed => std::option::Option::Some("FAILED"),
7307                Self::Deleted => std::option::Option::Some("DELETED"),
7308                Self::Purging => std::option::Option::Some("PURGING"),
7309                Self::UnknownValue(u) => u.0.name(),
7310            }
7311        }
7312    }
7313
7314    impl std::default::Default for State {
7315        fn default() -> Self {
7316            use std::convert::From;
7317            Self::from(0)
7318        }
7319    }
7320
7321    impl std::fmt::Display for State {
7322        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7323            wkt::internal::display_enum(f, self.name(), self.value())
7324        }
7325    }
7326
7327    impl std::convert::From<i32> for State {
7328        fn from(value: i32) -> Self {
7329            match value {
7330                0 => Self::Unspecified,
7331                1 => Self::Active,
7332                2 => Self::Creating,
7333                3 => Self::Updating,
7334                5 => Self::Failed,
7335                6 => Self::Deleted,
7336                7 => Self::Purging,
7337                _ => Self::UnknownValue(state::UnknownValue(
7338                    wkt::internal::UnknownEnumValue::Integer(value),
7339                )),
7340            }
7341        }
7342    }
7343
7344    impl std::convert::From<&str> for State {
7345        fn from(value: &str) -> Self {
7346            use std::string::ToString;
7347            match value {
7348                "STATE_UNSPECIFIED" => Self::Unspecified,
7349                "ACTIVE" => Self::Active,
7350                "CREATING" => Self::Creating,
7351                "UPDATING" => Self::Updating,
7352                "FAILED" => Self::Failed,
7353                "DELETED" => Self::Deleted,
7354                "PURGING" => Self::Purging,
7355                _ => Self::UnknownValue(state::UnknownValue(
7356                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7357                )),
7358            }
7359        }
7360    }
7361
7362    impl serde::ser::Serialize for State {
7363        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7364        where
7365            S: serde::Serializer,
7366        {
7367            match self {
7368                Self::Unspecified => serializer.serialize_i32(0),
7369                Self::Active => serializer.serialize_i32(1),
7370                Self::Creating => serializer.serialize_i32(2),
7371                Self::Updating => serializer.serialize_i32(3),
7372                Self::Failed => serializer.serialize_i32(5),
7373                Self::Deleted => serializer.serialize_i32(6),
7374                Self::Purging => serializer.serialize_i32(7),
7375                Self::UnknownValue(u) => u.0.serialize(serializer),
7376            }
7377        }
7378    }
7379
7380    impl<'de> serde::de::Deserialize<'de> for State {
7381        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7382        where
7383            D: serde::Deserializer<'de>,
7384        {
7385            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
7386                ".google.cloud.vmwareengine.v1.PrivateCloud.State",
7387            ))
7388        }
7389    }
7390
7391    /// Enum Type defines private cloud type.
7392    ///
7393    /// # Working with unknown values
7394    ///
7395    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7396    /// additional enum variants at any time. Adding new variants is not considered
7397    /// a breaking change. Applications should write their code in anticipation of:
7398    ///
7399    /// - New values appearing in future releases of the client library, **and**
7400    /// - New values received dynamically, without application changes.
7401    ///
7402    /// Please consult the [Working with enums] section in the user guide for some
7403    /// guidelines.
7404    ///
7405    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7406    #[derive(Clone, Debug, PartialEq)]
7407    #[non_exhaustive]
7408    pub enum Type {
7409        /// Standard private is a zonal resource, with 3+ nodes. Default type.
7410        Standard,
7411        /// Time limited private cloud is a zonal resource, can have only 1 node and
7412        /// has limited life span. Will be deleted after defined period of time,
7413        /// can be converted into standard private cloud by expanding it up to 3
7414        /// or more nodes.
7415        TimeLimited,
7416        /// Stretched private cloud is a regional resource with redundancy,
7417        /// with a minimum of 6 nodes, nodes count has to be even.
7418        Stretched,
7419        /// If set, the enum was initialized with an unknown value.
7420        ///
7421        /// Applications can examine the value using [Type::value] or
7422        /// [Type::name].
7423        UnknownValue(r#type::UnknownValue),
7424    }
7425
7426    #[doc(hidden)]
7427    pub mod r#type {
7428        #[allow(unused_imports)]
7429        use super::*;
7430        #[derive(Clone, Debug, PartialEq)]
7431        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7432    }
7433
7434    impl Type {
7435        /// Gets the enum value.
7436        ///
7437        /// Returns `None` if the enum contains an unknown value deserialized from
7438        /// the string representation of enums.
7439        pub fn value(&self) -> std::option::Option<i32> {
7440            match self {
7441                Self::Standard => std::option::Option::Some(0),
7442                Self::TimeLimited => std::option::Option::Some(1),
7443                Self::Stretched => std::option::Option::Some(2),
7444                Self::UnknownValue(u) => u.0.value(),
7445            }
7446        }
7447
7448        /// Gets the enum value as a string.
7449        ///
7450        /// Returns `None` if the enum contains an unknown value deserialized from
7451        /// the integer representation of enums.
7452        pub fn name(&self) -> std::option::Option<&str> {
7453            match self {
7454                Self::Standard => std::option::Option::Some("STANDARD"),
7455                Self::TimeLimited => std::option::Option::Some("TIME_LIMITED"),
7456                Self::Stretched => std::option::Option::Some("STRETCHED"),
7457                Self::UnknownValue(u) => u.0.name(),
7458            }
7459        }
7460    }
7461
7462    impl std::default::Default for Type {
7463        fn default() -> Self {
7464            use std::convert::From;
7465            Self::from(0)
7466        }
7467    }
7468
7469    impl std::fmt::Display for Type {
7470        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7471            wkt::internal::display_enum(f, self.name(), self.value())
7472        }
7473    }
7474
7475    impl std::convert::From<i32> for Type {
7476        fn from(value: i32) -> Self {
7477            match value {
7478                0 => Self::Standard,
7479                1 => Self::TimeLimited,
7480                2 => Self::Stretched,
7481                _ => Self::UnknownValue(r#type::UnknownValue(
7482                    wkt::internal::UnknownEnumValue::Integer(value),
7483                )),
7484            }
7485        }
7486    }
7487
7488    impl std::convert::From<&str> for Type {
7489        fn from(value: &str) -> Self {
7490            use std::string::ToString;
7491            match value {
7492                "STANDARD" => Self::Standard,
7493                "TIME_LIMITED" => Self::TimeLimited,
7494                "STRETCHED" => Self::Stretched,
7495                _ => Self::UnknownValue(r#type::UnknownValue(
7496                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7497                )),
7498            }
7499        }
7500    }
7501
7502    impl serde::ser::Serialize for Type {
7503        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7504        where
7505            S: serde::Serializer,
7506        {
7507            match self {
7508                Self::Standard => serializer.serialize_i32(0),
7509                Self::TimeLimited => serializer.serialize_i32(1),
7510                Self::Stretched => serializer.serialize_i32(2),
7511                Self::UnknownValue(u) => u.0.serialize(serializer),
7512            }
7513        }
7514    }
7515
7516    impl<'de> serde::de::Deserialize<'de> for Type {
7517        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7518        where
7519            D: serde::Deserializer<'de>,
7520        {
7521            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
7522                ".google.cloud.vmwareengine.v1.PrivateCloud.Type",
7523            ))
7524        }
7525    }
7526}
7527
7528/// A cluster in a private cloud.
7529#[derive(Clone, Default, PartialEq)]
7530#[non_exhaustive]
7531pub struct Cluster {
7532    /// Output only. The resource name of this cluster.
7533    /// Resource names are schemeless URIs that follow the conventions in
7534    /// <https://cloud.google.com/apis/design/resource_names>.
7535    /// For example:
7536    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`
7537    pub name: std::string::String,
7538
7539    /// Output only. Creation time of this resource.
7540    pub create_time: std::option::Option<wkt::Timestamp>,
7541
7542    /// Output only. Last update time of this resource.
7543    pub update_time: std::option::Option<wkt::Timestamp>,
7544
7545    /// Output only. State of the resource.
7546    pub state: crate::model::cluster::State,
7547
7548    /// Output only. True if the cluster is a management cluster; false otherwise.
7549    /// There can only be one management cluster in a private cloud
7550    /// and it has to be the first one.
7551    pub management: bool,
7552
7553    /// Optional. Configuration of the autoscaling applied to this cluster.
7554    pub autoscaling_settings: std::option::Option<crate::model::AutoscalingSettings>,
7555
7556    /// Output only. System-generated unique identifier for the resource.
7557    pub uid: std::string::String,
7558
7559    /// Required. The map of cluster node types in this cluster, where the key is
7560    /// canonical identifier of the node type (corresponds to the `NodeType`).
7561    pub node_type_configs:
7562        std::collections::HashMap<std::string::String, crate::model::NodeTypeConfig>,
7563
7564    /// Optional. Configuration of a stretched cluster. Required for clusters that
7565    /// belong to a STRETCHED private cloud.
7566    pub stretched_cluster_config: std::option::Option<crate::model::StretchedClusterConfig>,
7567
7568    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7569}
7570
7571impl Cluster {
7572    pub fn new() -> Self {
7573        std::default::Default::default()
7574    }
7575
7576    /// Sets the value of [name][crate::model::Cluster::name].
7577    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7578        self.name = v.into();
7579        self
7580    }
7581
7582    /// Sets the value of [create_time][crate::model::Cluster::create_time].
7583    pub fn set_create_time<T>(mut self, v: T) -> Self
7584    where
7585        T: std::convert::Into<wkt::Timestamp>,
7586    {
7587        self.create_time = std::option::Option::Some(v.into());
7588        self
7589    }
7590
7591    /// Sets or clears the value of [create_time][crate::model::Cluster::create_time].
7592    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
7593    where
7594        T: std::convert::Into<wkt::Timestamp>,
7595    {
7596        self.create_time = v.map(|x| x.into());
7597        self
7598    }
7599
7600    /// Sets the value of [update_time][crate::model::Cluster::update_time].
7601    pub fn set_update_time<T>(mut self, v: T) -> Self
7602    where
7603        T: std::convert::Into<wkt::Timestamp>,
7604    {
7605        self.update_time = std::option::Option::Some(v.into());
7606        self
7607    }
7608
7609    /// Sets or clears the value of [update_time][crate::model::Cluster::update_time].
7610    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
7611    where
7612        T: std::convert::Into<wkt::Timestamp>,
7613    {
7614        self.update_time = v.map(|x| x.into());
7615        self
7616    }
7617
7618    /// Sets the value of [state][crate::model::Cluster::state].
7619    pub fn set_state<T: std::convert::Into<crate::model::cluster::State>>(mut self, v: T) -> Self {
7620        self.state = v.into();
7621        self
7622    }
7623
7624    /// Sets the value of [management][crate::model::Cluster::management].
7625    pub fn set_management<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
7626        self.management = v.into();
7627        self
7628    }
7629
7630    /// Sets the value of [autoscaling_settings][crate::model::Cluster::autoscaling_settings].
7631    pub fn set_autoscaling_settings<T>(mut self, v: T) -> Self
7632    where
7633        T: std::convert::Into<crate::model::AutoscalingSettings>,
7634    {
7635        self.autoscaling_settings = std::option::Option::Some(v.into());
7636        self
7637    }
7638
7639    /// Sets or clears the value of [autoscaling_settings][crate::model::Cluster::autoscaling_settings].
7640    pub fn set_or_clear_autoscaling_settings<T>(mut self, v: std::option::Option<T>) -> Self
7641    where
7642        T: std::convert::Into<crate::model::AutoscalingSettings>,
7643    {
7644        self.autoscaling_settings = v.map(|x| x.into());
7645        self
7646    }
7647
7648    /// Sets the value of [uid][crate::model::Cluster::uid].
7649    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7650        self.uid = v.into();
7651        self
7652    }
7653
7654    /// Sets the value of [node_type_configs][crate::model::Cluster::node_type_configs].
7655    pub fn set_node_type_configs<T, K, V>(mut self, v: T) -> Self
7656    where
7657        T: std::iter::IntoIterator<Item = (K, V)>,
7658        K: std::convert::Into<std::string::String>,
7659        V: std::convert::Into<crate::model::NodeTypeConfig>,
7660    {
7661        use std::iter::Iterator;
7662        self.node_type_configs = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
7663        self
7664    }
7665
7666    /// Sets the value of [stretched_cluster_config][crate::model::Cluster::stretched_cluster_config].
7667    pub fn set_stretched_cluster_config<T>(mut self, v: T) -> Self
7668    where
7669        T: std::convert::Into<crate::model::StretchedClusterConfig>,
7670    {
7671        self.stretched_cluster_config = std::option::Option::Some(v.into());
7672        self
7673    }
7674
7675    /// Sets or clears the value of [stretched_cluster_config][crate::model::Cluster::stretched_cluster_config].
7676    pub fn set_or_clear_stretched_cluster_config<T>(mut self, v: std::option::Option<T>) -> Self
7677    where
7678        T: std::convert::Into<crate::model::StretchedClusterConfig>,
7679    {
7680        self.stretched_cluster_config = v.map(|x| x.into());
7681        self
7682    }
7683}
7684
7685impl wkt::message::Message for Cluster {
7686    fn typename() -> &'static str {
7687        "type.googleapis.com/google.cloud.vmwareengine.v1.Cluster"
7688    }
7689}
7690
7691/// Defines additional types related to [Cluster].
7692pub mod cluster {
7693    #[allow(unused_imports)]
7694    use super::*;
7695
7696    /// Enum State defines possible states of private cloud clusters.
7697    ///
7698    /// # Working with unknown values
7699    ///
7700    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7701    /// additional enum variants at any time. Adding new variants is not considered
7702    /// a breaking change. Applications should write their code in anticipation of:
7703    ///
7704    /// - New values appearing in future releases of the client library, **and**
7705    /// - New values received dynamically, without application changes.
7706    ///
7707    /// Please consult the [Working with enums] section in the user guide for some
7708    /// guidelines.
7709    ///
7710    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7711    #[derive(Clone, Debug, PartialEq)]
7712    #[non_exhaustive]
7713    pub enum State {
7714        /// The default value. This value should never be used.
7715        Unspecified,
7716        /// The Cluster is operational and can be used by the user.
7717        Active,
7718        /// The Cluster is being deployed.
7719        Creating,
7720        /// Adding or removing of a node to the cluster, any other cluster specific
7721        /// updates.
7722        Updating,
7723        /// The Cluster is being deleted.
7724        Deleting,
7725        /// The Cluster is undergoing maintenance, for example: a failed node is
7726        /// getting replaced.
7727        Repairing,
7728        /// If set, the enum was initialized with an unknown value.
7729        ///
7730        /// Applications can examine the value using [State::value] or
7731        /// [State::name].
7732        UnknownValue(state::UnknownValue),
7733    }
7734
7735    #[doc(hidden)]
7736    pub mod state {
7737        #[allow(unused_imports)]
7738        use super::*;
7739        #[derive(Clone, Debug, PartialEq)]
7740        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7741    }
7742
7743    impl State {
7744        /// Gets the enum value.
7745        ///
7746        /// Returns `None` if the enum contains an unknown value deserialized from
7747        /// the string representation of enums.
7748        pub fn value(&self) -> std::option::Option<i32> {
7749            match self {
7750                Self::Unspecified => std::option::Option::Some(0),
7751                Self::Active => std::option::Option::Some(1),
7752                Self::Creating => std::option::Option::Some(2),
7753                Self::Updating => std::option::Option::Some(3),
7754                Self::Deleting => std::option::Option::Some(4),
7755                Self::Repairing => std::option::Option::Some(5),
7756                Self::UnknownValue(u) => u.0.value(),
7757            }
7758        }
7759
7760        /// Gets the enum value as a string.
7761        ///
7762        /// Returns `None` if the enum contains an unknown value deserialized from
7763        /// the integer representation of enums.
7764        pub fn name(&self) -> std::option::Option<&str> {
7765            match self {
7766                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
7767                Self::Active => std::option::Option::Some("ACTIVE"),
7768                Self::Creating => std::option::Option::Some("CREATING"),
7769                Self::Updating => std::option::Option::Some("UPDATING"),
7770                Self::Deleting => std::option::Option::Some("DELETING"),
7771                Self::Repairing => std::option::Option::Some("REPAIRING"),
7772                Self::UnknownValue(u) => u.0.name(),
7773            }
7774        }
7775    }
7776
7777    impl std::default::Default for State {
7778        fn default() -> Self {
7779            use std::convert::From;
7780            Self::from(0)
7781        }
7782    }
7783
7784    impl std::fmt::Display for State {
7785        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
7786            wkt::internal::display_enum(f, self.name(), self.value())
7787        }
7788    }
7789
7790    impl std::convert::From<i32> for State {
7791        fn from(value: i32) -> Self {
7792            match value {
7793                0 => Self::Unspecified,
7794                1 => Self::Active,
7795                2 => Self::Creating,
7796                3 => Self::Updating,
7797                4 => Self::Deleting,
7798                5 => Self::Repairing,
7799                _ => Self::UnknownValue(state::UnknownValue(
7800                    wkt::internal::UnknownEnumValue::Integer(value),
7801                )),
7802            }
7803        }
7804    }
7805
7806    impl std::convert::From<&str> for State {
7807        fn from(value: &str) -> Self {
7808            use std::string::ToString;
7809            match value {
7810                "STATE_UNSPECIFIED" => Self::Unspecified,
7811                "ACTIVE" => Self::Active,
7812                "CREATING" => Self::Creating,
7813                "UPDATING" => Self::Updating,
7814                "DELETING" => Self::Deleting,
7815                "REPAIRING" => Self::Repairing,
7816                _ => Self::UnknownValue(state::UnknownValue(
7817                    wkt::internal::UnknownEnumValue::String(value.to_string()),
7818                )),
7819            }
7820        }
7821    }
7822
7823    impl serde::ser::Serialize for State {
7824        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
7825        where
7826            S: serde::Serializer,
7827        {
7828            match self {
7829                Self::Unspecified => serializer.serialize_i32(0),
7830                Self::Active => serializer.serialize_i32(1),
7831                Self::Creating => serializer.serialize_i32(2),
7832                Self::Updating => serializer.serialize_i32(3),
7833                Self::Deleting => serializer.serialize_i32(4),
7834                Self::Repairing => serializer.serialize_i32(5),
7835                Self::UnknownValue(u) => u.0.serialize(serializer),
7836            }
7837        }
7838    }
7839
7840    impl<'de> serde::de::Deserialize<'de> for State {
7841        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
7842        where
7843            D: serde::Deserializer<'de>,
7844        {
7845            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
7846                ".google.cloud.vmwareengine.v1.Cluster.State",
7847            ))
7848        }
7849    }
7850}
7851
7852/// Node in a cluster.
7853#[derive(Clone, Default, PartialEq)]
7854#[non_exhaustive]
7855pub struct Node {
7856    /// Output only. The resource name of this node.
7857    /// Resource names are schemeless URIs that follow the conventions in
7858    /// <https://cloud.google.com/apis/design/resource_names>.
7859    /// For example:
7860    /// projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node
7861    pub name: std::string::String,
7862
7863    /// Output only. Fully qualified domain name of the node.
7864    pub fqdn: std::string::String,
7865
7866    /// Output only. Internal IP address of the node.
7867    pub internal_ip: std::string::String,
7868
7869    /// Output only. The canonical identifier of the node type (corresponds to the
7870    /// `NodeType`).
7871    /// For example: standard-72.
7872    pub node_type_id: std::string::String,
7873
7874    /// Output only. The version number of the VMware ESXi
7875    /// management component in this cluster.
7876    pub version: std::string::String,
7877
7878    /// Output only. Customized number of cores
7879    pub custom_core_count: i64,
7880
7881    /// Output only. The state of the appliance.
7882    pub state: crate::model::node::State,
7883
7884    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
7885}
7886
7887impl Node {
7888    pub fn new() -> Self {
7889        std::default::Default::default()
7890    }
7891
7892    /// Sets the value of [name][crate::model::Node::name].
7893    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7894        self.name = v.into();
7895        self
7896    }
7897
7898    /// Sets the value of [fqdn][crate::model::Node::fqdn].
7899    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7900        self.fqdn = v.into();
7901        self
7902    }
7903
7904    /// Sets the value of [internal_ip][crate::model::Node::internal_ip].
7905    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7906        self.internal_ip = v.into();
7907        self
7908    }
7909
7910    /// Sets the value of [node_type_id][crate::model::Node::node_type_id].
7911    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7912        self.node_type_id = v.into();
7913        self
7914    }
7915
7916    /// Sets the value of [version][crate::model::Node::version].
7917    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
7918        self.version = v.into();
7919        self
7920    }
7921
7922    /// Sets the value of [custom_core_count][crate::model::Node::custom_core_count].
7923    pub fn set_custom_core_count<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
7924        self.custom_core_count = v.into();
7925        self
7926    }
7927
7928    /// Sets the value of [state][crate::model::Node::state].
7929    pub fn set_state<T: std::convert::Into<crate::model::node::State>>(mut self, v: T) -> Self {
7930        self.state = v.into();
7931        self
7932    }
7933}
7934
7935impl wkt::message::Message for Node {
7936    fn typename() -> &'static str {
7937        "type.googleapis.com/google.cloud.vmwareengine.v1.Node"
7938    }
7939}
7940
7941/// Defines additional types related to [Node].
7942pub mod node {
7943    #[allow(unused_imports)]
7944    use super::*;
7945
7946    /// Enum State defines possible states of a node in a cluster.
7947    ///
7948    /// # Working with unknown values
7949    ///
7950    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
7951    /// additional enum variants at any time. Adding new variants is not considered
7952    /// a breaking change. Applications should write their code in anticipation of:
7953    ///
7954    /// - New values appearing in future releases of the client library, **and**
7955    /// - New values received dynamically, without application changes.
7956    ///
7957    /// Please consult the [Working with enums] section in the user guide for some
7958    /// guidelines.
7959    ///
7960    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
7961    #[derive(Clone, Debug, PartialEq)]
7962    #[non_exhaustive]
7963    pub enum State {
7964        /// The default value. This value should never be used.
7965        Unspecified,
7966        /// Node is operational and can be used by the user.
7967        Active,
7968        /// Node is being provisioned.
7969        Creating,
7970        /// Node is in a failed state.
7971        Failed,
7972        /// Node is undergoing maintenance, e.g.: during private cloud upgrade.
7973        Upgrading,
7974        /// If set, the enum was initialized with an unknown value.
7975        ///
7976        /// Applications can examine the value using [State::value] or
7977        /// [State::name].
7978        UnknownValue(state::UnknownValue),
7979    }
7980
7981    #[doc(hidden)]
7982    pub mod state {
7983        #[allow(unused_imports)]
7984        use super::*;
7985        #[derive(Clone, Debug, PartialEq)]
7986        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
7987    }
7988
7989    impl State {
7990        /// Gets the enum value.
7991        ///
7992        /// Returns `None` if the enum contains an unknown value deserialized from
7993        /// the string representation of enums.
7994        pub fn value(&self) -> std::option::Option<i32> {
7995            match self {
7996                Self::Unspecified => std::option::Option::Some(0),
7997                Self::Active => std::option::Option::Some(1),
7998                Self::Creating => std::option::Option::Some(2),
7999                Self::Failed => std::option::Option::Some(3),
8000                Self::Upgrading => std::option::Option::Some(4),
8001                Self::UnknownValue(u) => u.0.value(),
8002            }
8003        }
8004
8005        /// Gets the enum value as a string.
8006        ///
8007        /// Returns `None` if the enum contains an unknown value deserialized from
8008        /// the integer representation of enums.
8009        pub fn name(&self) -> std::option::Option<&str> {
8010            match self {
8011                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8012                Self::Active => std::option::Option::Some("ACTIVE"),
8013                Self::Creating => std::option::Option::Some("CREATING"),
8014                Self::Failed => std::option::Option::Some("FAILED"),
8015                Self::Upgrading => std::option::Option::Some("UPGRADING"),
8016                Self::UnknownValue(u) => u.0.name(),
8017            }
8018        }
8019    }
8020
8021    impl std::default::Default for State {
8022        fn default() -> Self {
8023            use std::convert::From;
8024            Self::from(0)
8025        }
8026    }
8027
8028    impl std::fmt::Display for State {
8029        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8030            wkt::internal::display_enum(f, self.name(), self.value())
8031        }
8032    }
8033
8034    impl std::convert::From<i32> for State {
8035        fn from(value: i32) -> Self {
8036            match value {
8037                0 => Self::Unspecified,
8038                1 => Self::Active,
8039                2 => Self::Creating,
8040                3 => Self::Failed,
8041                4 => Self::Upgrading,
8042                _ => Self::UnknownValue(state::UnknownValue(
8043                    wkt::internal::UnknownEnumValue::Integer(value),
8044                )),
8045            }
8046        }
8047    }
8048
8049    impl std::convert::From<&str> for State {
8050        fn from(value: &str) -> Self {
8051            use std::string::ToString;
8052            match value {
8053                "STATE_UNSPECIFIED" => Self::Unspecified,
8054                "ACTIVE" => Self::Active,
8055                "CREATING" => Self::Creating,
8056                "FAILED" => Self::Failed,
8057                "UPGRADING" => Self::Upgrading,
8058                _ => Self::UnknownValue(state::UnknownValue(
8059                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8060                )),
8061            }
8062        }
8063    }
8064
8065    impl serde::ser::Serialize for State {
8066        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8067        where
8068            S: serde::Serializer,
8069        {
8070            match self {
8071                Self::Unspecified => serializer.serialize_i32(0),
8072                Self::Active => serializer.serialize_i32(1),
8073                Self::Creating => serializer.serialize_i32(2),
8074                Self::Failed => serializer.serialize_i32(3),
8075                Self::Upgrading => serializer.serialize_i32(4),
8076                Self::UnknownValue(u) => u.0.serialize(serializer),
8077            }
8078        }
8079    }
8080
8081    impl<'de> serde::de::Deserialize<'de> for State {
8082        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8083        where
8084            D: serde::Deserializer<'de>,
8085        {
8086            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8087                ".google.cloud.vmwareengine.v1.Node.State",
8088            ))
8089        }
8090    }
8091}
8092
8093/// Represents an allocated external IP address and its corresponding internal IP
8094/// address in a private cloud.
8095#[derive(Clone, Default, PartialEq)]
8096#[non_exhaustive]
8097pub struct ExternalAddress {
8098    /// Output only. The resource name of this external IP address.
8099    /// Resource names are schemeless URIs that follow the conventions in
8100    /// <https://cloud.google.com/apis/design/resource_names>.
8101    /// For example:
8102    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`
8103    pub name: std::string::String,
8104
8105    /// Output only. Creation time of this resource.
8106    pub create_time: std::option::Option<wkt::Timestamp>,
8107
8108    /// Output only. Last update time of this resource.
8109    pub update_time: std::option::Option<wkt::Timestamp>,
8110
8111    /// The internal IP address of a workload VM.
8112    pub internal_ip: std::string::String,
8113
8114    /// Output only. The external IP address of a workload VM.
8115    pub external_ip: std::string::String,
8116
8117    /// Output only. The state of the resource.
8118    pub state: crate::model::external_address::State,
8119
8120    /// Output only. System-generated unique identifier for the resource.
8121    pub uid: std::string::String,
8122
8123    /// User-provided description for this resource.
8124    pub description: std::string::String,
8125
8126    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8127}
8128
8129impl ExternalAddress {
8130    pub fn new() -> Self {
8131        std::default::Default::default()
8132    }
8133
8134    /// Sets the value of [name][crate::model::ExternalAddress::name].
8135    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8136        self.name = v.into();
8137        self
8138    }
8139
8140    /// Sets the value of [create_time][crate::model::ExternalAddress::create_time].
8141    pub fn set_create_time<T>(mut self, v: T) -> Self
8142    where
8143        T: std::convert::Into<wkt::Timestamp>,
8144    {
8145        self.create_time = std::option::Option::Some(v.into());
8146        self
8147    }
8148
8149    /// Sets or clears the value of [create_time][crate::model::ExternalAddress::create_time].
8150    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
8151    where
8152        T: std::convert::Into<wkt::Timestamp>,
8153    {
8154        self.create_time = v.map(|x| x.into());
8155        self
8156    }
8157
8158    /// Sets the value of [update_time][crate::model::ExternalAddress::update_time].
8159    pub fn set_update_time<T>(mut self, v: T) -> Self
8160    where
8161        T: std::convert::Into<wkt::Timestamp>,
8162    {
8163        self.update_time = std::option::Option::Some(v.into());
8164        self
8165    }
8166
8167    /// Sets or clears the value of [update_time][crate::model::ExternalAddress::update_time].
8168    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
8169    where
8170        T: std::convert::Into<wkt::Timestamp>,
8171    {
8172        self.update_time = v.map(|x| x.into());
8173        self
8174    }
8175
8176    /// Sets the value of [internal_ip][crate::model::ExternalAddress::internal_ip].
8177    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8178        self.internal_ip = v.into();
8179        self
8180    }
8181
8182    /// Sets the value of [external_ip][crate::model::ExternalAddress::external_ip].
8183    pub fn set_external_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8184        self.external_ip = v.into();
8185        self
8186    }
8187
8188    /// Sets the value of [state][crate::model::ExternalAddress::state].
8189    pub fn set_state<T: std::convert::Into<crate::model::external_address::State>>(
8190        mut self,
8191        v: T,
8192    ) -> Self {
8193        self.state = v.into();
8194        self
8195    }
8196
8197    /// Sets the value of [uid][crate::model::ExternalAddress::uid].
8198    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8199        self.uid = v.into();
8200        self
8201    }
8202
8203    /// Sets the value of [description][crate::model::ExternalAddress::description].
8204    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8205        self.description = v.into();
8206        self
8207    }
8208}
8209
8210impl wkt::message::Message for ExternalAddress {
8211    fn typename() -> &'static str {
8212        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAddress"
8213    }
8214}
8215
8216/// Defines additional types related to [ExternalAddress].
8217pub mod external_address {
8218    #[allow(unused_imports)]
8219    use super::*;
8220
8221    /// Enum State defines possible states of external addresses.
8222    ///
8223    /// # Working with unknown values
8224    ///
8225    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8226    /// additional enum variants at any time. Adding new variants is not considered
8227    /// a breaking change. Applications should write their code in anticipation of:
8228    ///
8229    /// - New values appearing in future releases of the client library, **and**
8230    /// - New values received dynamically, without application changes.
8231    ///
8232    /// Please consult the [Working with enums] section in the user guide for some
8233    /// guidelines.
8234    ///
8235    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8236    #[derive(Clone, Debug, PartialEq)]
8237    #[non_exhaustive]
8238    pub enum State {
8239        /// The default value. This value should never be used.
8240        Unspecified,
8241        /// The address is ready.
8242        Active,
8243        /// The address is being created.
8244        Creating,
8245        /// The address is being updated.
8246        Updating,
8247        /// The address is being deleted.
8248        Deleting,
8249        /// If set, the enum was initialized with an unknown value.
8250        ///
8251        /// Applications can examine the value using [State::value] or
8252        /// [State::name].
8253        UnknownValue(state::UnknownValue),
8254    }
8255
8256    #[doc(hidden)]
8257    pub mod state {
8258        #[allow(unused_imports)]
8259        use super::*;
8260        #[derive(Clone, Debug, PartialEq)]
8261        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8262    }
8263
8264    impl State {
8265        /// Gets the enum value.
8266        ///
8267        /// Returns `None` if the enum contains an unknown value deserialized from
8268        /// the string representation of enums.
8269        pub fn value(&self) -> std::option::Option<i32> {
8270            match self {
8271                Self::Unspecified => std::option::Option::Some(0),
8272                Self::Active => std::option::Option::Some(1),
8273                Self::Creating => std::option::Option::Some(2),
8274                Self::Updating => std::option::Option::Some(3),
8275                Self::Deleting => std::option::Option::Some(4),
8276                Self::UnknownValue(u) => u.0.value(),
8277            }
8278        }
8279
8280        /// Gets the enum value as a string.
8281        ///
8282        /// Returns `None` if the enum contains an unknown value deserialized from
8283        /// the integer representation of enums.
8284        pub fn name(&self) -> std::option::Option<&str> {
8285            match self {
8286                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8287                Self::Active => std::option::Option::Some("ACTIVE"),
8288                Self::Creating => std::option::Option::Some("CREATING"),
8289                Self::Updating => std::option::Option::Some("UPDATING"),
8290                Self::Deleting => std::option::Option::Some("DELETING"),
8291                Self::UnknownValue(u) => u.0.name(),
8292            }
8293        }
8294    }
8295
8296    impl std::default::Default for State {
8297        fn default() -> Self {
8298            use std::convert::From;
8299            Self::from(0)
8300        }
8301    }
8302
8303    impl std::fmt::Display for State {
8304        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8305            wkt::internal::display_enum(f, self.name(), self.value())
8306        }
8307    }
8308
8309    impl std::convert::From<i32> for State {
8310        fn from(value: i32) -> Self {
8311            match value {
8312                0 => Self::Unspecified,
8313                1 => Self::Active,
8314                2 => Self::Creating,
8315                3 => Self::Updating,
8316                4 => Self::Deleting,
8317                _ => Self::UnknownValue(state::UnknownValue(
8318                    wkt::internal::UnknownEnumValue::Integer(value),
8319                )),
8320            }
8321        }
8322    }
8323
8324    impl std::convert::From<&str> for State {
8325        fn from(value: &str) -> Self {
8326            use std::string::ToString;
8327            match value {
8328                "STATE_UNSPECIFIED" => Self::Unspecified,
8329                "ACTIVE" => Self::Active,
8330                "CREATING" => Self::Creating,
8331                "UPDATING" => Self::Updating,
8332                "DELETING" => Self::Deleting,
8333                _ => Self::UnknownValue(state::UnknownValue(
8334                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8335                )),
8336            }
8337        }
8338    }
8339
8340    impl serde::ser::Serialize for State {
8341        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8342        where
8343            S: serde::Serializer,
8344        {
8345            match self {
8346                Self::Unspecified => serializer.serialize_i32(0),
8347                Self::Active => serializer.serialize_i32(1),
8348                Self::Creating => serializer.serialize_i32(2),
8349                Self::Updating => serializer.serialize_i32(3),
8350                Self::Deleting => serializer.serialize_i32(4),
8351                Self::UnknownValue(u) => u.0.serialize(serializer),
8352            }
8353        }
8354    }
8355
8356    impl<'de> serde::de::Deserialize<'de> for State {
8357        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8358        where
8359            D: serde::Deserializer<'de>,
8360        {
8361            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8362                ".google.cloud.vmwareengine.v1.ExternalAddress.State",
8363            ))
8364        }
8365    }
8366}
8367
8368/// Subnet in a private cloud. Either `management` subnets (such as vMotion) that
8369/// are read-only, or `userDefined`, which can also be updated.
8370#[derive(Clone, Default, PartialEq)]
8371#[non_exhaustive]
8372pub struct Subnet {
8373    /// Output only. The resource name of this subnet.
8374    /// Resource names are schemeless URIs that follow the conventions in
8375    /// <https://cloud.google.com/apis/design/resource_names>.
8376    /// For example:
8377    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`
8378    pub name: std::string::String,
8379
8380    /// The IP address range of the subnet in CIDR format '10.0.0.0/24'.
8381    pub ip_cidr_range: std::string::String,
8382
8383    /// The IP address of the gateway of this subnet.
8384    /// Must fall within the IP prefix defined above.
8385    pub gateway_ip: std::string::String,
8386
8387    /// Output only. The type of the subnet. For example "management" or
8388    /// "userDefined".
8389    pub r#type: std::string::String,
8390
8391    /// Output only. The state of the resource.
8392    pub state: crate::model::subnet::State,
8393
8394    /// Output only. VLAN ID of the VLAN on which the subnet is configured
8395    pub vlan_id: i32,
8396
8397    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8398}
8399
8400impl Subnet {
8401    pub fn new() -> Self {
8402        std::default::Default::default()
8403    }
8404
8405    /// Sets the value of [name][crate::model::Subnet::name].
8406    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8407        self.name = v.into();
8408        self
8409    }
8410
8411    /// Sets the value of [ip_cidr_range][crate::model::Subnet::ip_cidr_range].
8412    pub fn set_ip_cidr_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8413        self.ip_cidr_range = v.into();
8414        self
8415    }
8416
8417    /// Sets the value of [gateway_ip][crate::model::Subnet::gateway_ip].
8418    pub fn set_gateway_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8419        self.gateway_ip = v.into();
8420        self
8421    }
8422
8423    /// Sets the value of [r#type][crate::model::Subnet::type].
8424    pub fn set_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8425        self.r#type = v.into();
8426        self
8427    }
8428
8429    /// Sets the value of [state][crate::model::Subnet::state].
8430    pub fn set_state<T: std::convert::Into<crate::model::subnet::State>>(mut self, v: T) -> Self {
8431        self.state = v.into();
8432        self
8433    }
8434
8435    /// Sets the value of [vlan_id][crate::model::Subnet::vlan_id].
8436    pub fn set_vlan_id<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8437        self.vlan_id = v.into();
8438        self
8439    }
8440}
8441
8442impl wkt::message::Message for Subnet {
8443    fn typename() -> &'static str {
8444        "type.googleapis.com/google.cloud.vmwareengine.v1.Subnet"
8445    }
8446}
8447
8448/// Defines additional types related to [Subnet].
8449pub mod subnet {
8450    #[allow(unused_imports)]
8451    use super::*;
8452
8453    /// Defines possible states of subnets.
8454    ///
8455    /// # Working with unknown values
8456    ///
8457    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8458    /// additional enum variants at any time. Adding new variants is not considered
8459    /// a breaking change. Applications should write their code in anticipation of:
8460    ///
8461    /// - New values appearing in future releases of the client library, **and**
8462    /// - New values received dynamically, without application changes.
8463    ///
8464    /// Please consult the [Working with enums] section in the user guide for some
8465    /// guidelines.
8466    ///
8467    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8468    #[derive(Clone, Debug, PartialEq)]
8469    #[non_exhaustive]
8470    pub enum State {
8471        /// The default value. This value should never be used.
8472        Unspecified,
8473        /// The subnet is ready.
8474        Active,
8475        /// The subnet is being created.
8476        Creating,
8477        /// The subnet is being updated.
8478        Updating,
8479        /// The subnet is being deleted.
8480        Deleting,
8481        /// Changes requested in the last operation are being propagated.
8482        Reconciling,
8483        /// Last operation on the subnet did not succeed. Subnet's payload is
8484        /// reverted back to its most recent working state.
8485        Failed,
8486        /// If set, the enum was initialized with an unknown value.
8487        ///
8488        /// Applications can examine the value using [State::value] or
8489        /// [State::name].
8490        UnknownValue(state::UnknownValue),
8491    }
8492
8493    #[doc(hidden)]
8494    pub mod state {
8495        #[allow(unused_imports)]
8496        use super::*;
8497        #[derive(Clone, Debug, PartialEq)]
8498        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
8499    }
8500
8501    impl State {
8502        /// Gets the enum value.
8503        ///
8504        /// Returns `None` if the enum contains an unknown value deserialized from
8505        /// the string representation of enums.
8506        pub fn value(&self) -> std::option::Option<i32> {
8507            match self {
8508                Self::Unspecified => std::option::Option::Some(0),
8509                Self::Active => std::option::Option::Some(1),
8510                Self::Creating => std::option::Option::Some(2),
8511                Self::Updating => std::option::Option::Some(3),
8512                Self::Deleting => std::option::Option::Some(4),
8513                Self::Reconciling => std::option::Option::Some(5),
8514                Self::Failed => std::option::Option::Some(6),
8515                Self::UnknownValue(u) => u.0.value(),
8516            }
8517        }
8518
8519        /// Gets the enum value as a string.
8520        ///
8521        /// Returns `None` if the enum contains an unknown value deserialized from
8522        /// the integer representation of enums.
8523        pub fn name(&self) -> std::option::Option<&str> {
8524            match self {
8525                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
8526                Self::Active => std::option::Option::Some("ACTIVE"),
8527                Self::Creating => std::option::Option::Some("CREATING"),
8528                Self::Updating => std::option::Option::Some("UPDATING"),
8529                Self::Deleting => std::option::Option::Some("DELETING"),
8530                Self::Reconciling => std::option::Option::Some("RECONCILING"),
8531                Self::Failed => std::option::Option::Some("FAILED"),
8532                Self::UnknownValue(u) => u.0.name(),
8533            }
8534        }
8535    }
8536
8537    impl std::default::Default for State {
8538        fn default() -> Self {
8539            use std::convert::From;
8540            Self::from(0)
8541        }
8542    }
8543
8544    impl std::fmt::Display for State {
8545        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
8546            wkt::internal::display_enum(f, self.name(), self.value())
8547        }
8548    }
8549
8550    impl std::convert::From<i32> for State {
8551        fn from(value: i32) -> Self {
8552            match value {
8553                0 => Self::Unspecified,
8554                1 => Self::Active,
8555                2 => Self::Creating,
8556                3 => Self::Updating,
8557                4 => Self::Deleting,
8558                5 => Self::Reconciling,
8559                6 => Self::Failed,
8560                _ => Self::UnknownValue(state::UnknownValue(
8561                    wkt::internal::UnknownEnumValue::Integer(value),
8562                )),
8563            }
8564        }
8565    }
8566
8567    impl std::convert::From<&str> for State {
8568        fn from(value: &str) -> Self {
8569            use std::string::ToString;
8570            match value {
8571                "STATE_UNSPECIFIED" => Self::Unspecified,
8572                "ACTIVE" => Self::Active,
8573                "CREATING" => Self::Creating,
8574                "UPDATING" => Self::Updating,
8575                "DELETING" => Self::Deleting,
8576                "RECONCILING" => Self::Reconciling,
8577                "FAILED" => Self::Failed,
8578                _ => Self::UnknownValue(state::UnknownValue(
8579                    wkt::internal::UnknownEnumValue::String(value.to_string()),
8580                )),
8581            }
8582        }
8583    }
8584
8585    impl serde::ser::Serialize for State {
8586        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
8587        where
8588            S: serde::Serializer,
8589        {
8590            match self {
8591                Self::Unspecified => serializer.serialize_i32(0),
8592                Self::Active => serializer.serialize_i32(1),
8593                Self::Creating => serializer.serialize_i32(2),
8594                Self::Updating => serializer.serialize_i32(3),
8595                Self::Deleting => serializer.serialize_i32(4),
8596                Self::Reconciling => serializer.serialize_i32(5),
8597                Self::Failed => serializer.serialize_i32(6),
8598                Self::UnknownValue(u) => u.0.serialize(serializer),
8599            }
8600        }
8601    }
8602
8603    impl<'de> serde::de::Deserialize<'de> for State {
8604        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
8605        where
8606            D: serde::Deserializer<'de>,
8607        {
8608            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
8609                ".google.cloud.vmwareengine.v1.Subnet.State",
8610            ))
8611        }
8612    }
8613}
8614
8615/// External access firewall rules for filtering incoming traffic destined to
8616/// `ExternalAddress` resources.
8617#[derive(Clone, Default, PartialEq)]
8618#[non_exhaustive]
8619pub struct ExternalAccessRule {
8620    /// Output only. The resource name of this external access rule.
8621    /// Resource names are schemeless URIs that follow the conventions in
8622    /// <https://cloud.google.com/apis/design/resource_names>.
8623    /// For example:
8624    /// `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`
8625    pub name: std::string::String,
8626
8627    /// Output only. Creation time of this resource.
8628    pub create_time: std::option::Option<wkt::Timestamp>,
8629
8630    /// Output only. Last update time of this resource.
8631    pub update_time: std::option::Option<wkt::Timestamp>,
8632
8633    /// User-provided description for this external access rule.
8634    pub description: std::string::String,
8635
8636    /// External access rule priority, which determines the external access rule to
8637    /// use when multiple rules apply. If multiple rules have the same priority,
8638    /// their ordering is non-deterministic. If specific ordering is required,
8639    /// assign unique priorities to enforce such ordering. The external access rule
8640    /// priority is an integer from 100 to 4096, both inclusive. Lower integers
8641    /// indicate higher precedence. For example, a rule with priority `100` has
8642    /// higher precedence than a rule with priority `101`.
8643    pub priority: i32,
8644
8645    /// The action that the external access rule performs.
8646    pub action: crate::model::external_access_rule::Action,
8647
8648    /// The IP protocol to which the external access rule applies. This value can
8649    /// be one of the following three protocol strings (not case-sensitive):
8650    /// `tcp`, `udp`, or `icmp`.
8651    pub ip_protocol: std::string::String,
8652
8653    /// If source ranges are specified, the external access rule applies only to
8654    /// traffic that has a source IP address in these ranges. These ranges can
8655    /// either be expressed in the CIDR format or as an IP address. As only inbound
8656    /// rules are supported, `ExternalAddress` resources cannot be the source IP
8657    /// addresses of an external access rule. To match all source addresses,
8658    /// specify `0.0.0.0/0`.
8659    pub source_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
8660
8661    /// A list of source ports to which the external access rule applies. This
8662    /// field is only applicable for the UDP or TCP protocol.
8663    /// Each entry must be either an integer or a range. For example: `["22"]`,
8664    /// `["80","443"]`, or `["12345-12349"]`. To match all source ports, specify
8665    /// `["0-65535"]`.
8666    pub source_ports: std::vec::Vec<std::string::String>,
8667
8668    /// If destination ranges are specified, the external access rule applies only
8669    /// to the traffic that has a destination IP address in these ranges. The
8670    /// specified IP addresses must have reserved external IP addresses in the
8671    /// scope of the parent network policy. To match all external IP addresses in
8672    /// the scope of the parent network policy, specify `0.0.0.0/0`. To match a
8673    /// specific external IP address, specify it using the
8674    /// `IpRange.external_address` property.
8675    pub destination_ip_ranges: std::vec::Vec<crate::model::external_access_rule::IpRange>,
8676
8677    /// A list of destination ports to which the external access rule applies. This
8678    /// field is only applicable for the UDP or TCP protocol.
8679    /// Each entry must be either an integer or a range. For example: `["22"]`,
8680    /// `["80","443"]`, or `["12345-12349"]`. To match all destination ports,
8681    /// specify `["0-65535"]`.
8682    pub destination_ports: std::vec::Vec<std::string::String>,
8683
8684    /// Output only. The state of the resource.
8685    pub state: crate::model::external_access_rule::State,
8686
8687    /// Output only. System-generated unique identifier for the resource.
8688    pub uid: std::string::String,
8689
8690    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8691}
8692
8693impl ExternalAccessRule {
8694    pub fn new() -> Self {
8695        std::default::Default::default()
8696    }
8697
8698    /// Sets the value of [name][crate::model::ExternalAccessRule::name].
8699    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8700        self.name = v.into();
8701        self
8702    }
8703
8704    /// Sets the value of [create_time][crate::model::ExternalAccessRule::create_time].
8705    pub fn set_create_time<T>(mut self, v: T) -> Self
8706    where
8707        T: std::convert::Into<wkt::Timestamp>,
8708    {
8709        self.create_time = std::option::Option::Some(v.into());
8710        self
8711    }
8712
8713    /// Sets or clears the value of [create_time][crate::model::ExternalAccessRule::create_time].
8714    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
8715    where
8716        T: std::convert::Into<wkt::Timestamp>,
8717    {
8718        self.create_time = v.map(|x| x.into());
8719        self
8720    }
8721
8722    /// Sets the value of [update_time][crate::model::ExternalAccessRule::update_time].
8723    pub fn set_update_time<T>(mut self, v: T) -> Self
8724    where
8725        T: std::convert::Into<wkt::Timestamp>,
8726    {
8727        self.update_time = std::option::Option::Some(v.into());
8728        self
8729    }
8730
8731    /// Sets or clears the value of [update_time][crate::model::ExternalAccessRule::update_time].
8732    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
8733    where
8734        T: std::convert::Into<wkt::Timestamp>,
8735    {
8736        self.update_time = v.map(|x| x.into());
8737        self
8738    }
8739
8740    /// Sets the value of [description][crate::model::ExternalAccessRule::description].
8741    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8742        self.description = v.into();
8743        self
8744    }
8745
8746    /// Sets the value of [priority][crate::model::ExternalAccessRule::priority].
8747    pub fn set_priority<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
8748        self.priority = v.into();
8749        self
8750    }
8751
8752    /// Sets the value of [action][crate::model::ExternalAccessRule::action].
8753    pub fn set_action<T: std::convert::Into<crate::model::external_access_rule::Action>>(
8754        mut self,
8755        v: T,
8756    ) -> Self {
8757        self.action = v.into();
8758        self
8759    }
8760
8761    /// Sets the value of [ip_protocol][crate::model::ExternalAccessRule::ip_protocol].
8762    pub fn set_ip_protocol<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8763        self.ip_protocol = v.into();
8764        self
8765    }
8766
8767    /// Sets the value of [source_ip_ranges][crate::model::ExternalAccessRule::source_ip_ranges].
8768    pub fn set_source_ip_ranges<T, V>(mut self, v: T) -> Self
8769    where
8770        T: std::iter::IntoIterator<Item = V>,
8771        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
8772    {
8773        use std::iter::Iterator;
8774        self.source_ip_ranges = v.into_iter().map(|i| i.into()).collect();
8775        self
8776    }
8777
8778    /// Sets the value of [source_ports][crate::model::ExternalAccessRule::source_ports].
8779    pub fn set_source_ports<T, V>(mut self, v: T) -> Self
8780    where
8781        T: std::iter::IntoIterator<Item = V>,
8782        V: std::convert::Into<std::string::String>,
8783    {
8784        use std::iter::Iterator;
8785        self.source_ports = v.into_iter().map(|i| i.into()).collect();
8786        self
8787    }
8788
8789    /// Sets the value of [destination_ip_ranges][crate::model::ExternalAccessRule::destination_ip_ranges].
8790    pub fn set_destination_ip_ranges<T, V>(mut self, v: T) -> Self
8791    where
8792        T: std::iter::IntoIterator<Item = V>,
8793        V: std::convert::Into<crate::model::external_access_rule::IpRange>,
8794    {
8795        use std::iter::Iterator;
8796        self.destination_ip_ranges = v.into_iter().map(|i| i.into()).collect();
8797        self
8798    }
8799
8800    /// Sets the value of [destination_ports][crate::model::ExternalAccessRule::destination_ports].
8801    pub fn set_destination_ports<T, V>(mut self, v: T) -> Self
8802    where
8803        T: std::iter::IntoIterator<Item = V>,
8804        V: std::convert::Into<std::string::String>,
8805    {
8806        use std::iter::Iterator;
8807        self.destination_ports = v.into_iter().map(|i| i.into()).collect();
8808        self
8809    }
8810
8811    /// Sets the value of [state][crate::model::ExternalAccessRule::state].
8812    pub fn set_state<T: std::convert::Into<crate::model::external_access_rule::State>>(
8813        mut self,
8814        v: T,
8815    ) -> Self {
8816        self.state = v.into();
8817        self
8818    }
8819
8820    /// Sets the value of [uid][crate::model::ExternalAccessRule::uid].
8821    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8822        self.uid = v.into();
8823        self
8824    }
8825}
8826
8827impl wkt::message::Message for ExternalAccessRule {
8828    fn typename() -> &'static str {
8829        "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule"
8830    }
8831}
8832
8833/// Defines additional types related to [ExternalAccessRule].
8834pub mod external_access_rule {
8835    #[allow(unused_imports)]
8836    use super::*;
8837
8838    /// An IP range provided in any one of the supported formats.
8839    #[derive(Clone, Default, PartialEq)]
8840    #[non_exhaustive]
8841    pub struct IpRange {
8842        pub ip_range: std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
8843
8844        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
8845    }
8846
8847    impl IpRange {
8848        pub fn new() -> Self {
8849            std::default::Default::default()
8850        }
8851
8852        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range].
8853        ///
8854        /// Note that all the setters affecting `ip_range` are mutually
8855        /// exclusive.
8856        pub fn set_ip_range<
8857            T: std::convert::Into<
8858                    std::option::Option<crate::model::external_access_rule::ip_range::IpRange>,
8859                >,
8860        >(
8861            mut self,
8862            v: T,
8863        ) -> Self {
8864            self.ip_range = v.into();
8865            self
8866        }
8867
8868        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8869        /// if it holds a `IpAddress`, `None` if the field is not set or
8870        /// holds a different branch.
8871        pub fn ip_address(&self) -> std::option::Option<&std::string::String> {
8872            #[allow(unreachable_patterns)]
8873            self.ip_range.as_ref().and_then(|v| match v {
8874                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v) => {
8875                    std::option::Option::Some(v)
8876                }
8877                _ => std::option::Option::None,
8878            })
8879        }
8880
8881        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8882        /// to hold a `IpAddress`.
8883        ///
8884        /// Note that all the setters affecting `ip_range` are
8885        /// mutually exclusive.
8886        pub fn set_ip_address<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
8887            self.ip_range = std::option::Option::Some(
8888                crate::model::external_access_rule::ip_range::IpRange::IpAddress(v.into()),
8889            );
8890            self
8891        }
8892
8893        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8894        /// if it holds a `IpAddressRange`, `None` if the field is not set or
8895        /// holds a different branch.
8896        pub fn ip_address_range(&self) -> std::option::Option<&std::string::String> {
8897            #[allow(unreachable_patterns)]
8898            self.ip_range.as_ref().and_then(|v| match v {
8899                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v) => {
8900                    std::option::Option::Some(v)
8901                }
8902                _ => std::option::Option::None,
8903            })
8904        }
8905
8906        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8907        /// to hold a `IpAddressRange`.
8908        ///
8909        /// Note that all the setters affecting `ip_range` are
8910        /// mutually exclusive.
8911        pub fn set_ip_address_range<T: std::convert::Into<std::string::String>>(
8912            mut self,
8913            v: T,
8914        ) -> Self {
8915            self.ip_range = std::option::Option::Some(
8916                crate::model::external_access_rule::ip_range::IpRange::IpAddressRange(v.into()),
8917            );
8918            self
8919        }
8920
8921        /// The value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8922        /// if it holds a `ExternalAddress`, `None` if the field is not set or
8923        /// holds a different branch.
8924        pub fn external_address(&self) -> std::option::Option<&std::string::String> {
8925            #[allow(unreachable_patterns)]
8926            self.ip_range.as_ref().and_then(|v| match v {
8927                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v) => {
8928                    std::option::Option::Some(v)
8929                }
8930                _ => std::option::Option::None,
8931            })
8932        }
8933
8934        /// Sets the value of [ip_range][crate::model::external_access_rule::IpRange::ip_range]
8935        /// to hold a `ExternalAddress`.
8936        ///
8937        /// Note that all the setters affecting `ip_range` are
8938        /// mutually exclusive.
8939        pub fn set_external_address<T: std::convert::Into<std::string::String>>(
8940            mut self,
8941            v: T,
8942        ) -> Self {
8943            self.ip_range = std::option::Option::Some(
8944                crate::model::external_access_rule::ip_range::IpRange::ExternalAddress(v.into()),
8945            );
8946            self
8947        }
8948    }
8949
8950    impl wkt::message::Message for IpRange {
8951        fn typename() -> &'static str {
8952            "type.googleapis.com/google.cloud.vmwareengine.v1.ExternalAccessRule.IpRange"
8953        }
8954    }
8955
8956    /// Defines additional types related to [IpRange].
8957    pub mod ip_range {
8958        #[allow(unused_imports)]
8959        use super::*;
8960
8961        #[derive(Clone, Debug, PartialEq)]
8962        #[non_exhaustive]
8963        pub enum IpRange {
8964            /// A single IP address. For example: `10.0.0.5`.
8965            IpAddress(std::string::String),
8966            /// An IP address range in the CIDR format. For example: `10.0.0.0/24`.
8967            IpAddressRange(std::string::String),
8968            /// The name of an `ExternalAddress` resource. The external address must
8969            /// have been reserved in the scope of this external access rule's parent
8970            /// network policy.  Provide the external address name in the form of
8971            /// `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`.
8972            /// For example:
8973            /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`.
8974            ExternalAddress(std::string::String),
8975        }
8976    }
8977
8978    /// Action determines whether the external access rule permits or blocks
8979    /// traffic, subject to the other components of the rule matching the traffic.
8980    ///
8981    /// # Working with unknown values
8982    ///
8983    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
8984    /// additional enum variants at any time. Adding new variants is not considered
8985    /// a breaking change. Applications should write their code in anticipation of:
8986    ///
8987    /// - New values appearing in future releases of the client library, **and**
8988    /// - New values received dynamically, without application changes.
8989    ///
8990    /// Please consult the [Working with enums] section in the user guide for some
8991    /// guidelines.
8992    ///
8993    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
8994    #[derive(Clone, Debug, PartialEq)]
8995    #[non_exhaustive]
8996    pub enum Action {
8997        /// Defaults to allow.
8998        Unspecified,
8999        /// Allows connections that match the other specified components.
9000        Allow,
9001        /// Blocks connections that match the other specified components.
9002        Deny,
9003        /// If set, the enum was initialized with an unknown value.
9004        ///
9005        /// Applications can examine the value using [Action::value] or
9006        /// [Action::name].
9007        UnknownValue(action::UnknownValue),
9008    }
9009
9010    #[doc(hidden)]
9011    pub mod action {
9012        #[allow(unused_imports)]
9013        use super::*;
9014        #[derive(Clone, Debug, PartialEq)]
9015        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9016    }
9017
9018    impl Action {
9019        /// Gets the enum value.
9020        ///
9021        /// Returns `None` if the enum contains an unknown value deserialized from
9022        /// the string representation of enums.
9023        pub fn value(&self) -> std::option::Option<i32> {
9024            match self {
9025                Self::Unspecified => std::option::Option::Some(0),
9026                Self::Allow => std::option::Option::Some(1),
9027                Self::Deny => std::option::Option::Some(2),
9028                Self::UnknownValue(u) => u.0.value(),
9029            }
9030        }
9031
9032        /// Gets the enum value as a string.
9033        ///
9034        /// Returns `None` if the enum contains an unknown value deserialized from
9035        /// the integer representation of enums.
9036        pub fn name(&self) -> std::option::Option<&str> {
9037            match self {
9038                Self::Unspecified => std::option::Option::Some("ACTION_UNSPECIFIED"),
9039                Self::Allow => std::option::Option::Some("ALLOW"),
9040                Self::Deny => std::option::Option::Some("DENY"),
9041                Self::UnknownValue(u) => u.0.name(),
9042            }
9043        }
9044    }
9045
9046    impl std::default::Default for Action {
9047        fn default() -> Self {
9048            use std::convert::From;
9049            Self::from(0)
9050        }
9051    }
9052
9053    impl std::fmt::Display for Action {
9054        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9055            wkt::internal::display_enum(f, self.name(), self.value())
9056        }
9057    }
9058
9059    impl std::convert::From<i32> for Action {
9060        fn from(value: i32) -> Self {
9061            match value {
9062                0 => Self::Unspecified,
9063                1 => Self::Allow,
9064                2 => Self::Deny,
9065                _ => Self::UnknownValue(action::UnknownValue(
9066                    wkt::internal::UnknownEnumValue::Integer(value),
9067                )),
9068            }
9069        }
9070    }
9071
9072    impl std::convert::From<&str> for Action {
9073        fn from(value: &str) -> Self {
9074            use std::string::ToString;
9075            match value {
9076                "ACTION_UNSPECIFIED" => Self::Unspecified,
9077                "ALLOW" => Self::Allow,
9078                "DENY" => Self::Deny,
9079                _ => Self::UnknownValue(action::UnknownValue(
9080                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9081                )),
9082            }
9083        }
9084    }
9085
9086    impl serde::ser::Serialize for Action {
9087        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9088        where
9089            S: serde::Serializer,
9090        {
9091            match self {
9092                Self::Unspecified => serializer.serialize_i32(0),
9093                Self::Allow => serializer.serialize_i32(1),
9094                Self::Deny => serializer.serialize_i32(2),
9095                Self::UnknownValue(u) => u.0.serialize(serializer),
9096            }
9097        }
9098    }
9099
9100    impl<'de> serde::de::Deserialize<'de> for Action {
9101        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9102        where
9103            D: serde::Deserializer<'de>,
9104        {
9105            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Action>::new(
9106                ".google.cloud.vmwareengine.v1.ExternalAccessRule.Action",
9107            ))
9108        }
9109    }
9110
9111    /// Defines possible states of external access firewall rules.
9112    ///
9113    /// # Working with unknown values
9114    ///
9115    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9116    /// additional enum variants at any time. Adding new variants is not considered
9117    /// a breaking change. Applications should write their code in anticipation of:
9118    ///
9119    /// - New values appearing in future releases of the client library, **and**
9120    /// - New values received dynamically, without application changes.
9121    ///
9122    /// Please consult the [Working with enums] section in the user guide for some
9123    /// guidelines.
9124    ///
9125    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9126    #[derive(Clone, Debug, PartialEq)]
9127    #[non_exhaustive]
9128    pub enum State {
9129        /// The default value. This value is used if the state is omitted.
9130        Unspecified,
9131        /// The rule is ready.
9132        Active,
9133        /// The rule is being created.
9134        Creating,
9135        /// The rule is being updated.
9136        Updating,
9137        /// The rule is being deleted.
9138        Deleting,
9139        /// If set, the enum was initialized with an unknown value.
9140        ///
9141        /// Applications can examine the value using [State::value] or
9142        /// [State::name].
9143        UnknownValue(state::UnknownValue),
9144    }
9145
9146    #[doc(hidden)]
9147    pub mod state {
9148        #[allow(unused_imports)]
9149        use super::*;
9150        #[derive(Clone, Debug, PartialEq)]
9151        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9152    }
9153
9154    impl State {
9155        /// Gets the enum value.
9156        ///
9157        /// Returns `None` if the enum contains an unknown value deserialized from
9158        /// the string representation of enums.
9159        pub fn value(&self) -> std::option::Option<i32> {
9160            match self {
9161                Self::Unspecified => std::option::Option::Some(0),
9162                Self::Active => std::option::Option::Some(1),
9163                Self::Creating => std::option::Option::Some(2),
9164                Self::Updating => std::option::Option::Some(3),
9165                Self::Deleting => std::option::Option::Some(4),
9166                Self::UnknownValue(u) => u.0.value(),
9167            }
9168        }
9169
9170        /// Gets the enum value as a string.
9171        ///
9172        /// Returns `None` if the enum contains an unknown value deserialized from
9173        /// the integer representation of enums.
9174        pub fn name(&self) -> std::option::Option<&str> {
9175            match self {
9176                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
9177                Self::Active => std::option::Option::Some("ACTIVE"),
9178                Self::Creating => std::option::Option::Some("CREATING"),
9179                Self::Updating => std::option::Option::Some("UPDATING"),
9180                Self::Deleting => std::option::Option::Some("DELETING"),
9181                Self::UnknownValue(u) => u.0.name(),
9182            }
9183        }
9184    }
9185
9186    impl std::default::Default for State {
9187        fn default() -> Self {
9188            use std::convert::From;
9189            Self::from(0)
9190        }
9191    }
9192
9193    impl std::fmt::Display for State {
9194        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9195            wkt::internal::display_enum(f, self.name(), self.value())
9196        }
9197    }
9198
9199    impl std::convert::From<i32> for State {
9200        fn from(value: i32) -> Self {
9201            match value {
9202                0 => Self::Unspecified,
9203                1 => Self::Active,
9204                2 => Self::Creating,
9205                3 => Self::Updating,
9206                4 => Self::Deleting,
9207                _ => Self::UnknownValue(state::UnknownValue(
9208                    wkt::internal::UnknownEnumValue::Integer(value),
9209                )),
9210            }
9211        }
9212    }
9213
9214    impl std::convert::From<&str> for State {
9215        fn from(value: &str) -> Self {
9216            use std::string::ToString;
9217            match value {
9218                "STATE_UNSPECIFIED" => Self::Unspecified,
9219                "ACTIVE" => Self::Active,
9220                "CREATING" => Self::Creating,
9221                "UPDATING" => Self::Updating,
9222                "DELETING" => Self::Deleting,
9223                _ => Self::UnknownValue(state::UnknownValue(
9224                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9225                )),
9226            }
9227        }
9228    }
9229
9230    impl serde::ser::Serialize for State {
9231        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9232        where
9233            S: serde::Serializer,
9234        {
9235            match self {
9236                Self::Unspecified => serializer.serialize_i32(0),
9237                Self::Active => serializer.serialize_i32(1),
9238                Self::Creating => serializer.serialize_i32(2),
9239                Self::Updating => serializer.serialize_i32(3),
9240                Self::Deleting => serializer.serialize_i32(4),
9241                Self::UnknownValue(u) => u.0.serialize(serializer),
9242            }
9243        }
9244    }
9245
9246    impl<'de> serde::de::Deserialize<'de> for State {
9247        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9248        where
9249            D: serde::Deserializer<'de>,
9250        {
9251            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
9252                ".google.cloud.vmwareengine.v1.ExternalAccessRule.State",
9253            ))
9254        }
9255    }
9256}
9257
9258/// Logging server to receive vCenter or ESXi logs.
9259#[derive(Clone, Default, PartialEq)]
9260#[non_exhaustive]
9261pub struct LoggingServer {
9262    /// Output only. The resource name of this logging server.
9263    /// Resource names are schemeless URIs that follow the conventions in
9264    /// <https://cloud.google.com/apis/design/resource_names>.
9265    /// For example:
9266    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`
9267    pub name: std::string::String,
9268
9269    /// Output only. Creation time of this resource.
9270    pub create_time: std::option::Option<wkt::Timestamp>,
9271
9272    /// Output only. Last update time of this resource.
9273    pub update_time: std::option::Option<wkt::Timestamp>,
9274
9275    /// Required. Fully-qualified domain name (FQDN) or IP Address of the logging
9276    /// server.
9277    pub hostname: std::string::String,
9278
9279    /// Required. Port number at which the logging server receives logs.
9280    pub port: i32,
9281
9282    /// Required. Protocol used by vCenter to send logs to a logging server.
9283    pub protocol: crate::model::logging_server::Protocol,
9284
9285    /// Required. The type of component that produces logs that will be forwarded
9286    /// to this logging server.
9287    pub source_type: crate::model::logging_server::SourceType,
9288
9289    /// Output only. System-generated unique identifier for the resource.
9290    pub uid: std::string::String,
9291
9292    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9293}
9294
9295impl LoggingServer {
9296    pub fn new() -> Self {
9297        std::default::Default::default()
9298    }
9299
9300    /// Sets the value of [name][crate::model::LoggingServer::name].
9301    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9302        self.name = v.into();
9303        self
9304    }
9305
9306    /// Sets the value of [create_time][crate::model::LoggingServer::create_time].
9307    pub fn set_create_time<T>(mut self, v: T) -> Self
9308    where
9309        T: std::convert::Into<wkt::Timestamp>,
9310    {
9311        self.create_time = std::option::Option::Some(v.into());
9312        self
9313    }
9314
9315    /// Sets or clears the value of [create_time][crate::model::LoggingServer::create_time].
9316    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
9317    where
9318        T: std::convert::Into<wkt::Timestamp>,
9319    {
9320        self.create_time = v.map(|x| x.into());
9321        self
9322    }
9323
9324    /// Sets the value of [update_time][crate::model::LoggingServer::update_time].
9325    pub fn set_update_time<T>(mut self, v: T) -> Self
9326    where
9327        T: std::convert::Into<wkt::Timestamp>,
9328    {
9329        self.update_time = std::option::Option::Some(v.into());
9330        self
9331    }
9332
9333    /// Sets or clears the value of [update_time][crate::model::LoggingServer::update_time].
9334    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
9335    where
9336        T: std::convert::Into<wkt::Timestamp>,
9337    {
9338        self.update_time = v.map(|x| x.into());
9339        self
9340    }
9341
9342    /// Sets the value of [hostname][crate::model::LoggingServer::hostname].
9343    pub fn set_hostname<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9344        self.hostname = v.into();
9345        self
9346    }
9347
9348    /// Sets the value of [port][crate::model::LoggingServer::port].
9349    pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9350        self.port = v.into();
9351        self
9352    }
9353
9354    /// Sets the value of [protocol][crate::model::LoggingServer::protocol].
9355    pub fn set_protocol<T: std::convert::Into<crate::model::logging_server::Protocol>>(
9356        mut self,
9357        v: T,
9358    ) -> Self {
9359        self.protocol = v.into();
9360        self
9361    }
9362
9363    /// Sets the value of [source_type][crate::model::LoggingServer::source_type].
9364    pub fn set_source_type<T: std::convert::Into<crate::model::logging_server::SourceType>>(
9365        mut self,
9366        v: T,
9367    ) -> Self {
9368        self.source_type = v.into();
9369        self
9370    }
9371
9372    /// Sets the value of [uid][crate::model::LoggingServer::uid].
9373    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9374        self.uid = v.into();
9375        self
9376    }
9377}
9378
9379impl wkt::message::Message for LoggingServer {
9380    fn typename() -> &'static str {
9381        "type.googleapis.com/google.cloud.vmwareengine.v1.LoggingServer"
9382    }
9383}
9384
9385/// Defines additional types related to [LoggingServer].
9386pub mod logging_server {
9387    #[allow(unused_imports)]
9388    use super::*;
9389
9390    /// Defines possible protocols used to send logs to
9391    /// a logging server.
9392    ///
9393    /// # Working with unknown values
9394    ///
9395    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9396    /// additional enum variants at any time. Adding new variants is not considered
9397    /// a breaking change. Applications should write their code in anticipation of:
9398    ///
9399    /// - New values appearing in future releases of the client library, **and**
9400    /// - New values received dynamically, without application changes.
9401    ///
9402    /// Please consult the [Working with enums] section in the user guide for some
9403    /// guidelines.
9404    ///
9405    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9406    #[derive(Clone, Debug, PartialEq)]
9407    #[non_exhaustive]
9408    pub enum Protocol {
9409        /// Unspecified communications protocol. This is the default value.
9410        Unspecified,
9411        /// UDP
9412        Udp,
9413        /// TCP
9414        Tcp,
9415        /// TLS
9416        Tls,
9417        /// SSL
9418        Ssl,
9419        /// RELP
9420        Relp,
9421        /// If set, the enum was initialized with an unknown value.
9422        ///
9423        /// Applications can examine the value using [Protocol::value] or
9424        /// [Protocol::name].
9425        UnknownValue(protocol::UnknownValue),
9426    }
9427
9428    #[doc(hidden)]
9429    pub mod protocol {
9430        #[allow(unused_imports)]
9431        use super::*;
9432        #[derive(Clone, Debug, PartialEq)]
9433        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9434    }
9435
9436    impl Protocol {
9437        /// Gets the enum value.
9438        ///
9439        /// Returns `None` if the enum contains an unknown value deserialized from
9440        /// the string representation of enums.
9441        pub fn value(&self) -> std::option::Option<i32> {
9442            match self {
9443                Self::Unspecified => std::option::Option::Some(0),
9444                Self::Udp => std::option::Option::Some(1),
9445                Self::Tcp => std::option::Option::Some(2),
9446                Self::Tls => std::option::Option::Some(3),
9447                Self::Ssl => std::option::Option::Some(4),
9448                Self::Relp => std::option::Option::Some(5),
9449                Self::UnknownValue(u) => u.0.value(),
9450            }
9451        }
9452
9453        /// Gets the enum value as a string.
9454        ///
9455        /// Returns `None` if the enum contains an unknown value deserialized from
9456        /// the integer representation of enums.
9457        pub fn name(&self) -> std::option::Option<&str> {
9458            match self {
9459                Self::Unspecified => std::option::Option::Some("PROTOCOL_UNSPECIFIED"),
9460                Self::Udp => std::option::Option::Some("UDP"),
9461                Self::Tcp => std::option::Option::Some("TCP"),
9462                Self::Tls => std::option::Option::Some("TLS"),
9463                Self::Ssl => std::option::Option::Some("SSL"),
9464                Self::Relp => std::option::Option::Some("RELP"),
9465                Self::UnknownValue(u) => u.0.name(),
9466            }
9467        }
9468    }
9469
9470    impl std::default::Default for Protocol {
9471        fn default() -> Self {
9472            use std::convert::From;
9473            Self::from(0)
9474        }
9475    }
9476
9477    impl std::fmt::Display for Protocol {
9478        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9479            wkt::internal::display_enum(f, self.name(), self.value())
9480        }
9481    }
9482
9483    impl std::convert::From<i32> for Protocol {
9484        fn from(value: i32) -> Self {
9485            match value {
9486                0 => Self::Unspecified,
9487                1 => Self::Udp,
9488                2 => Self::Tcp,
9489                3 => Self::Tls,
9490                4 => Self::Ssl,
9491                5 => Self::Relp,
9492                _ => Self::UnknownValue(protocol::UnknownValue(
9493                    wkt::internal::UnknownEnumValue::Integer(value),
9494                )),
9495            }
9496        }
9497    }
9498
9499    impl std::convert::From<&str> for Protocol {
9500        fn from(value: &str) -> Self {
9501            use std::string::ToString;
9502            match value {
9503                "PROTOCOL_UNSPECIFIED" => Self::Unspecified,
9504                "UDP" => Self::Udp,
9505                "TCP" => Self::Tcp,
9506                "TLS" => Self::Tls,
9507                "SSL" => Self::Ssl,
9508                "RELP" => Self::Relp,
9509                _ => Self::UnknownValue(protocol::UnknownValue(
9510                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9511                )),
9512            }
9513        }
9514    }
9515
9516    impl serde::ser::Serialize for Protocol {
9517        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9518        where
9519            S: serde::Serializer,
9520        {
9521            match self {
9522                Self::Unspecified => serializer.serialize_i32(0),
9523                Self::Udp => serializer.serialize_i32(1),
9524                Self::Tcp => serializer.serialize_i32(2),
9525                Self::Tls => serializer.serialize_i32(3),
9526                Self::Ssl => serializer.serialize_i32(4),
9527                Self::Relp => serializer.serialize_i32(5),
9528                Self::UnknownValue(u) => u.0.serialize(serializer),
9529            }
9530        }
9531    }
9532
9533    impl<'de> serde::de::Deserialize<'de> for Protocol {
9534        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9535        where
9536            D: serde::Deserializer<'de>,
9537        {
9538            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Protocol>::new(
9539                ".google.cloud.vmwareengine.v1.LoggingServer.Protocol",
9540            ))
9541        }
9542    }
9543
9544    /// Defines possible types of component that produces logs.
9545    ///
9546    /// # Working with unknown values
9547    ///
9548    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9549    /// additional enum variants at any time. Adding new variants is not considered
9550    /// a breaking change. Applications should write their code in anticipation of:
9551    ///
9552    /// - New values appearing in future releases of the client library, **and**
9553    /// - New values received dynamically, without application changes.
9554    ///
9555    /// Please consult the [Working with enums] section in the user guide for some
9556    /// guidelines.
9557    ///
9558    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9559    #[derive(Clone, Debug, PartialEq)]
9560    #[non_exhaustive]
9561    pub enum SourceType {
9562        /// The default value. This value should never be used.
9563        Unspecified,
9564        /// Logs produced by ESXI hosts
9565        Esxi,
9566        /// Logs produced by vCenter server
9567        Vcsa,
9568        /// If set, the enum was initialized with an unknown value.
9569        ///
9570        /// Applications can examine the value using [SourceType::value] or
9571        /// [SourceType::name].
9572        UnknownValue(source_type::UnknownValue),
9573    }
9574
9575    #[doc(hidden)]
9576    pub mod source_type {
9577        #[allow(unused_imports)]
9578        use super::*;
9579        #[derive(Clone, Debug, PartialEq)]
9580        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9581    }
9582
9583    impl SourceType {
9584        /// Gets the enum value.
9585        ///
9586        /// Returns `None` if the enum contains an unknown value deserialized from
9587        /// the string representation of enums.
9588        pub fn value(&self) -> std::option::Option<i32> {
9589            match self {
9590                Self::Unspecified => std::option::Option::Some(0),
9591                Self::Esxi => std::option::Option::Some(1),
9592                Self::Vcsa => std::option::Option::Some(2),
9593                Self::UnknownValue(u) => u.0.value(),
9594            }
9595        }
9596
9597        /// Gets the enum value as a string.
9598        ///
9599        /// Returns `None` if the enum contains an unknown value deserialized from
9600        /// the integer representation of enums.
9601        pub fn name(&self) -> std::option::Option<&str> {
9602            match self {
9603                Self::Unspecified => std::option::Option::Some("SOURCE_TYPE_UNSPECIFIED"),
9604                Self::Esxi => std::option::Option::Some("ESXI"),
9605                Self::Vcsa => std::option::Option::Some("VCSA"),
9606                Self::UnknownValue(u) => u.0.name(),
9607            }
9608        }
9609    }
9610
9611    impl std::default::Default for SourceType {
9612        fn default() -> Self {
9613            use std::convert::From;
9614            Self::from(0)
9615        }
9616    }
9617
9618    impl std::fmt::Display for SourceType {
9619        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9620            wkt::internal::display_enum(f, self.name(), self.value())
9621        }
9622    }
9623
9624    impl std::convert::From<i32> for SourceType {
9625        fn from(value: i32) -> Self {
9626            match value {
9627                0 => Self::Unspecified,
9628                1 => Self::Esxi,
9629                2 => Self::Vcsa,
9630                _ => Self::UnknownValue(source_type::UnknownValue(
9631                    wkt::internal::UnknownEnumValue::Integer(value),
9632                )),
9633            }
9634        }
9635    }
9636
9637    impl std::convert::From<&str> for SourceType {
9638        fn from(value: &str) -> Self {
9639            use std::string::ToString;
9640            match value {
9641                "SOURCE_TYPE_UNSPECIFIED" => Self::Unspecified,
9642                "ESXI" => Self::Esxi,
9643                "VCSA" => Self::Vcsa,
9644                _ => Self::UnknownValue(source_type::UnknownValue(
9645                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9646                )),
9647            }
9648        }
9649    }
9650
9651    impl serde::ser::Serialize for SourceType {
9652        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9653        where
9654            S: serde::Serializer,
9655        {
9656            match self {
9657                Self::Unspecified => serializer.serialize_i32(0),
9658                Self::Esxi => serializer.serialize_i32(1),
9659                Self::Vcsa => serializer.serialize_i32(2),
9660                Self::UnknownValue(u) => u.0.serialize(serializer),
9661            }
9662        }
9663    }
9664
9665    impl<'de> serde::de::Deserialize<'de> for SourceType {
9666        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9667        where
9668            D: serde::Deserializer<'de>,
9669        {
9670            deserializer.deserialize_any(wkt::internal::EnumVisitor::<SourceType>::new(
9671                ".google.cloud.vmwareengine.v1.LoggingServer.SourceType",
9672            ))
9673        }
9674    }
9675}
9676
9677/// Describes node type.
9678#[derive(Clone, Default, PartialEq)]
9679#[non_exhaustive]
9680pub struct NodeType {
9681    /// Output only. The resource name of this node type.
9682    /// Resource names are schemeless URIs that follow the conventions in
9683    /// <https://cloud.google.com/apis/design/resource_names>.
9684    /// For example:
9685    /// `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`
9686    pub name: std::string::String,
9687
9688    /// Output only. The canonical identifier of the node type
9689    /// (corresponds to the `NodeType`). For example: standard-72.
9690    pub node_type_id: std::string::String,
9691
9692    /// Output only. The friendly name for this node type.
9693    /// For example: ve1-standard-72
9694    pub display_name: std::string::String,
9695
9696    /// Output only. The total number of virtual CPUs in a single node.
9697    pub virtual_cpu_count: i32,
9698
9699    /// Output only. The total number of CPU cores in a single node.
9700    pub total_core_count: i32,
9701
9702    /// Output only. The amount of physical memory available, defined in GB.
9703    pub memory_gb: i32,
9704
9705    /// Output only. The amount of storage available, defined in GB.
9706    pub disk_size_gb: i32,
9707
9708    /// Output only. List of possible values of custom core count.
9709    pub available_custom_core_counts: std::vec::Vec<i32>,
9710
9711    /// Output only. The type of the resource.
9712    pub kind: crate::model::node_type::Kind,
9713
9714    /// Output only. Families of the node type.
9715    /// For node types to be in the same cluster
9716    /// they must share at least one element in the `families`.
9717    pub families: std::vec::Vec<std::string::String>,
9718
9719    /// Output only. Capabilities of this node type.
9720    pub capabilities: std::vec::Vec<crate::model::node_type::Capability>,
9721
9722    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
9723}
9724
9725impl NodeType {
9726    pub fn new() -> Self {
9727        std::default::Default::default()
9728    }
9729
9730    /// Sets the value of [name][crate::model::NodeType::name].
9731    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9732        self.name = v.into();
9733        self
9734    }
9735
9736    /// Sets the value of [node_type_id][crate::model::NodeType::node_type_id].
9737    pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9738        self.node_type_id = v.into();
9739        self
9740    }
9741
9742    /// Sets the value of [display_name][crate::model::NodeType::display_name].
9743    pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
9744        self.display_name = v.into();
9745        self
9746    }
9747
9748    /// Sets the value of [virtual_cpu_count][crate::model::NodeType::virtual_cpu_count].
9749    pub fn set_virtual_cpu_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9750        self.virtual_cpu_count = v.into();
9751        self
9752    }
9753
9754    /// Sets the value of [total_core_count][crate::model::NodeType::total_core_count].
9755    pub fn set_total_core_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9756        self.total_core_count = v.into();
9757        self
9758    }
9759
9760    /// Sets the value of [memory_gb][crate::model::NodeType::memory_gb].
9761    pub fn set_memory_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9762        self.memory_gb = v.into();
9763        self
9764    }
9765
9766    /// Sets the value of [disk_size_gb][crate::model::NodeType::disk_size_gb].
9767    pub fn set_disk_size_gb<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
9768        self.disk_size_gb = v.into();
9769        self
9770    }
9771
9772    /// Sets the value of [available_custom_core_counts][crate::model::NodeType::available_custom_core_counts].
9773    pub fn set_available_custom_core_counts<T, V>(mut self, v: T) -> Self
9774    where
9775        T: std::iter::IntoIterator<Item = V>,
9776        V: std::convert::Into<i32>,
9777    {
9778        use std::iter::Iterator;
9779        self.available_custom_core_counts = v.into_iter().map(|i| i.into()).collect();
9780        self
9781    }
9782
9783    /// Sets the value of [kind][crate::model::NodeType::kind].
9784    pub fn set_kind<T: std::convert::Into<crate::model::node_type::Kind>>(mut self, v: T) -> Self {
9785        self.kind = v.into();
9786        self
9787    }
9788
9789    /// Sets the value of [families][crate::model::NodeType::families].
9790    pub fn set_families<T, V>(mut self, v: T) -> Self
9791    where
9792        T: std::iter::IntoIterator<Item = V>,
9793        V: std::convert::Into<std::string::String>,
9794    {
9795        use std::iter::Iterator;
9796        self.families = v.into_iter().map(|i| i.into()).collect();
9797        self
9798    }
9799
9800    /// Sets the value of [capabilities][crate::model::NodeType::capabilities].
9801    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
9802    where
9803        T: std::iter::IntoIterator<Item = V>,
9804        V: std::convert::Into<crate::model::node_type::Capability>,
9805    {
9806        use std::iter::Iterator;
9807        self.capabilities = v.into_iter().map(|i| i.into()).collect();
9808        self
9809    }
9810}
9811
9812impl wkt::message::Message for NodeType {
9813    fn typename() -> &'static str {
9814        "type.googleapis.com/google.cloud.vmwareengine.v1.NodeType"
9815    }
9816}
9817
9818/// Defines additional types related to [NodeType].
9819pub mod node_type {
9820    #[allow(unused_imports)]
9821    use super::*;
9822
9823    /// Enum Kind defines possible types of a NodeType.
9824    ///
9825    /// # Working with unknown values
9826    ///
9827    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9828    /// additional enum variants at any time. Adding new variants is not considered
9829    /// a breaking change. Applications should write their code in anticipation of:
9830    ///
9831    /// - New values appearing in future releases of the client library, **and**
9832    /// - New values received dynamically, without application changes.
9833    ///
9834    /// Please consult the [Working with enums] section in the user guide for some
9835    /// guidelines.
9836    ///
9837    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9838    #[derive(Clone, Debug, PartialEq)]
9839    #[non_exhaustive]
9840    pub enum Kind {
9841        /// The default value. This value should never be used.
9842        Unspecified,
9843        /// Standard HCI node.
9844        Standard,
9845        /// Storage only Node.
9846        StorageOnly,
9847        /// If set, the enum was initialized with an unknown value.
9848        ///
9849        /// Applications can examine the value using [Kind::value] or
9850        /// [Kind::name].
9851        UnknownValue(kind::UnknownValue),
9852    }
9853
9854    #[doc(hidden)]
9855    pub mod kind {
9856        #[allow(unused_imports)]
9857        use super::*;
9858        #[derive(Clone, Debug, PartialEq)]
9859        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9860    }
9861
9862    impl Kind {
9863        /// Gets the enum value.
9864        ///
9865        /// Returns `None` if the enum contains an unknown value deserialized from
9866        /// the string representation of enums.
9867        pub fn value(&self) -> std::option::Option<i32> {
9868            match self {
9869                Self::Unspecified => std::option::Option::Some(0),
9870                Self::Standard => std::option::Option::Some(1),
9871                Self::StorageOnly => std::option::Option::Some(2),
9872                Self::UnknownValue(u) => u.0.value(),
9873            }
9874        }
9875
9876        /// Gets the enum value as a string.
9877        ///
9878        /// Returns `None` if the enum contains an unknown value deserialized from
9879        /// the integer representation of enums.
9880        pub fn name(&self) -> std::option::Option<&str> {
9881            match self {
9882                Self::Unspecified => std::option::Option::Some("KIND_UNSPECIFIED"),
9883                Self::Standard => std::option::Option::Some("STANDARD"),
9884                Self::StorageOnly => std::option::Option::Some("STORAGE_ONLY"),
9885                Self::UnknownValue(u) => u.0.name(),
9886            }
9887        }
9888    }
9889
9890    impl std::default::Default for Kind {
9891        fn default() -> Self {
9892            use std::convert::From;
9893            Self::from(0)
9894        }
9895    }
9896
9897    impl std::fmt::Display for Kind {
9898        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
9899            wkt::internal::display_enum(f, self.name(), self.value())
9900        }
9901    }
9902
9903    impl std::convert::From<i32> for Kind {
9904        fn from(value: i32) -> Self {
9905            match value {
9906                0 => Self::Unspecified,
9907                1 => Self::Standard,
9908                2 => Self::StorageOnly,
9909                _ => Self::UnknownValue(kind::UnknownValue(
9910                    wkt::internal::UnknownEnumValue::Integer(value),
9911                )),
9912            }
9913        }
9914    }
9915
9916    impl std::convert::From<&str> for Kind {
9917        fn from(value: &str) -> Self {
9918            use std::string::ToString;
9919            match value {
9920                "KIND_UNSPECIFIED" => Self::Unspecified,
9921                "STANDARD" => Self::Standard,
9922                "STORAGE_ONLY" => Self::StorageOnly,
9923                _ => Self::UnknownValue(kind::UnknownValue(
9924                    wkt::internal::UnknownEnumValue::String(value.to_string()),
9925                )),
9926            }
9927        }
9928    }
9929
9930    impl serde::ser::Serialize for Kind {
9931        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
9932        where
9933            S: serde::Serializer,
9934        {
9935            match self {
9936                Self::Unspecified => serializer.serialize_i32(0),
9937                Self::Standard => serializer.serialize_i32(1),
9938                Self::StorageOnly => serializer.serialize_i32(2),
9939                Self::UnknownValue(u) => u.0.serialize(serializer),
9940            }
9941        }
9942    }
9943
9944    impl<'de> serde::de::Deserialize<'de> for Kind {
9945        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
9946        where
9947            D: serde::Deserializer<'de>,
9948        {
9949            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Kind>::new(
9950                ".google.cloud.vmwareengine.v1.NodeType.Kind",
9951            ))
9952        }
9953    }
9954
9955    /// Capability of a node type.
9956    ///
9957    /// # Working with unknown values
9958    ///
9959    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
9960    /// additional enum variants at any time. Adding new variants is not considered
9961    /// a breaking change. Applications should write their code in anticipation of:
9962    ///
9963    /// - New values appearing in future releases of the client library, **and**
9964    /// - New values received dynamically, without application changes.
9965    ///
9966    /// Please consult the [Working with enums] section in the user guide for some
9967    /// guidelines.
9968    ///
9969    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
9970    #[derive(Clone, Debug, PartialEq)]
9971    #[non_exhaustive]
9972    pub enum Capability {
9973        /// The default value. This value is used if the capability is omitted or
9974        /// unknown.
9975        Unspecified,
9976        /// This node type supports stretch clusters.
9977        StretchedClusters,
9978        /// If set, the enum was initialized with an unknown value.
9979        ///
9980        /// Applications can examine the value using [Capability::value] or
9981        /// [Capability::name].
9982        UnknownValue(capability::UnknownValue),
9983    }
9984
9985    #[doc(hidden)]
9986    pub mod capability {
9987        #[allow(unused_imports)]
9988        use super::*;
9989        #[derive(Clone, Debug, PartialEq)]
9990        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
9991    }
9992
9993    impl Capability {
9994        /// Gets the enum value.
9995        ///
9996        /// Returns `None` if the enum contains an unknown value deserialized from
9997        /// the string representation of enums.
9998        pub fn value(&self) -> std::option::Option<i32> {
9999            match self {
10000                Self::Unspecified => std::option::Option::Some(0),
10001                Self::StretchedClusters => std::option::Option::Some(1),
10002                Self::UnknownValue(u) => u.0.value(),
10003            }
10004        }
10005
10006        /// Gets the enum value as a string.
10007        ///
10008        /// Returns `None` if the enum contains an unknown value deserialized from
10009        /// the integer representation of enums.
10010        pub fn name(&self) -> std::option::Option<&str> {
10011            match self {
10012                Self::Unspecified => std::option::Option::Some("CAPABILITY_UNSPECIFIED"),
10013                Self::StretchedClusters => std::option::Option::Some("STRETCHED_CLUSTERS"),
10014                Self::UnknownValue(u) => u.0.name(),
10015            }
10016        }
10017    }
10018
10019    impl std::default::Default for Capability {
10020        fn default() -> Self {
10021            use std::convert::From;
10022            Self::from(0)
10023        }
10024    }
10025
10026    impl std::fmt::Display for Capability {
10027        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10028            wkt::internal::display_enum(f, self.name(), self.value())
10029        }
10030    }
10031
10032    impl std::convert::From<i32> for Capability {
10033        fn from(value: i32) -> Self {
10034            match value {
10035                0 => Self::Unspecified,
10036                1 => Self::StretchedClusters,
10037                _ => Self::UnknownValue(capability::UnknownValue(
10038                    wkt::internal::UnknownEnumValue::Integer(value),
10039                )),
10040            }
10041        }
10042    }
10043
10044    impl std::convert::From<&str> for Capability {
10045        fn from(value: &str) -> Self {
10046            use std::string::ToString;
10047            match value {
10048                "CAPABILITY_UNSPECIFIED" => Self::Unspecified,
10049                "STRETCHED_CLUSTERS" => Self::StretchedClusters,
10050                _ => Self::UnknownValue(capability::UnknownValue(
10051                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10052                )),
10053            }
10054        }
10055    }
10056
10057    impl serde::ser::Serialize for Capability {
10058        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10059        where
10060            S: serde::Serializer,
10061        {
10062            match self {
10063                Self::Unspecified => serializer.serialize_i32(0),
10064                Self::StretchedClusters => serializer.serialize_i32(1),
10065                Self::UnknownValue(u) => u.0.serialize(serializer),
10066            }
10067        }
10068    }
10069
10070    impl<'de> serde::de::Deserialize<'de> for Capability {
10071        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10072        where
10073            D: serde::Deserializer<'de>,
10074        {
10075            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Capability>::new(
10076                ".google.cloud.vmwareengine.v1.NodeType.Capability",
10077            ))
10078        }
10079    }
10080}
10081
10082/// Credentials for a private cloud.
10083#[derive(Clone, Default, PartialEq)]
10084#[non_exhaustive]
10085pub struct Credentials {
10086    /// Initial username.
10087    pub username: std::string::String,
10088
10089    /// Initial password.
10090    pub password: std::string::String,
10091
10092    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10093}
10094
10095impl Credentials {
10096    pub fn new() -> Self {
10097        std::default::Default::default()
10098    }
10099
10100    /// Sets the value of [username][crate::model::Credentials::username].
10101    pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10102        self.username = v.into();
10103        self
10104    }
10105
10106    /// Sets the value of [password][crate::model::Credentials::password].
10107    pub fn set_password<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10108        self.password = v.into();
10109        self
10110    }
10111}
10112
10113impl wkt::message::Message for Credentials {
10114    fn typename() -> &'static str {
10115        "type.googleapis.com/google.cloud.vmwareengine.v1.Credentials"
10116    }
10117}
10118
10119/// HCX activation key. A default key is created during
10120/// private cloud provisioning, but this behavior is subject to change
10121/// and you should always verify active keys.
10122/// Use
10123/// [VmwareEngine.ListHcxActivationKeys][google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]
10124/// to retrieve existing keys and
10125/// [VmwareEngine.CreateHcxActivationKey][google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]
10126/// to create new ones.
10127///
10128/// [google.cloud.vmwareengine.v1.VmwareEngine.CreateHcxActivationKey]: crate::client::VmwareEngine::create_hcx_activation_key
10129/// [google.cloud.vmwareengine.v1.VmwareEngine.ListHcxActivationKeys]: crate::client::VmwareEngine::list_hcx_activation_keys
10130#[derive(Clone, Default, PartialEq)]
10131#[non_exhaustive]
10132pub struct HcxActivationKey {
10133    /// Output only. The resource name of this HcxActivationKey.
10134    /// Resource names are schemeless URIs that follow the conventions in
10135    /// <https://cloud.google.com/apis/design/resource_names>.
10136    /// For example:
10137    /// `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`
10138    pub name: std::string::String,
10139
10140    /// Output only. Creation time of HCX activation key.
10141    pub create_time: std::option::Option<wkt::Timestamp>,
10142
10143    /// Output only. State of HCX activation key.
10144    pub state: crate::model::hcx_activation_key::State,
10145
10146    /// Output only. HCX activation key.
10147    pub activation_key: std::string::String,
10148
10149    /// Output only. System-generated unique identifier for the resource.
10150    pub uid: std::string::String,
10151
10152    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10153}
10154
10155impl HcxActivationKey {
10156    pub fn new() -> Self {
10157        std::default::Default::default()
10158    }
10159
10160    /// Sets the value of [name][crate::model::HcxActivationKey::name].
10161    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10162        self.name = v.into();
10163        self
10164    }
10165
10166    /// Sets the value of [create_time][crate::model::HcxActivationKey::create_time].
10167    pub fn set_create_time<T>(mut self, v: T) -> Self
10168    where
10169        T: std::convert::Into<wkt::Timestamp>,
10170    {
10171        self.create_time = std::option::Option::Some(v.into());
10172        self
10173    }
10174
10175    /// Sets or clears the value of [create_time][crate::model::HcxActivationKey::create_time].
10176    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
10177    where
10178        T: std::convert::Into<wkt::Timestamp>,
10179    {
10180        self.create_time = v.map(|x| x.into());
10181        self
10182    }
10183
10184    /// Sets the value of [state][crate::model::HcxActivationKey::state].
10185    pub fn set_state<T: std::convert::Into<crate::model::hcx_activation_key::State>>(
10186        mut self,
10187        v: T,
10188    ) -> Self {
10189        self.state = v.into();
10190        self
10191    }
10192
10193    /// Sets the value of [activation_key][crate::model::HcxActivationKey::activation_key].
10194    pub fn set_activation_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10195        self.activation_key = v.into();
10196        self
10197    }
10198
10199    /// Sets the value of [uid][crate::model::HcxActivationKey::uid].
10200    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10201        self.uid = v.into();
10202        self
10203    }
10204}
10205
10206impl wkt::message::Message for HcxActivationKey {
10207    fn typename() -> &'static str {
10208        "type.googleapis.com/google.cloud.vmwareengine.v1.HcxActivationKey"
10209    }
10210}
10211
10212/// Defines additional types related to [HcxActivationKey].
10213pub mod hcx_activation_key {
10214    #[allow(unused_imports)]
10215    use super::*;
10216
10217    /// State of HCX activation key
10218    ///
10219    /// # Working with unknown values
10220    ///
10221    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10222    /// additional enum variants at any time. Adding new variants is not considered
10223    /// a breaking change. Applications should write their code in anticipation of:
10224    ///
10225    /// - New values appearing in future releases of the client library, **and**
10226    /// - New values received dynamically, without application changes.
10227    ///
10228    /// Please consult the [Working with enums] section in the user guide for some
10229    /// guidelines.
10230    ///
10231    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10232    #[derive(Clone, Debug, PartialEq)]
10233    #[non_exhaustive]
10234    pub enum State {
10235        /// Unspecified state.
10236        Unspecified,
10237        /// State of a newly generated activation key.
10238        Available,
10239        /// State of key when it has been used to activate HCX appliance.
10240        Consumed,
10241        /// State of key when it is being created.
10242        Creating,
10243        /// If set, the enum was initialized with an unknown value.
10244        ///
10245        /// Applications can examine the value using [State::value] or
10246        /// [State::name].
10247        UnknownValue(state::UnknownValue),
10248    }
10249
10250    #[doc(hidden)]
10251    pub mod state {
10252        #[allow(unused_imports)]
10253        use super::*;
10254        #[derive(Clone, Debug, PartialEq)]
10255        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10256    }
10257
10258    impl State {
10259        /// Gets the enum value.
10260        ///
10261        /// Returns `None` if the enum contains an unknown value deserialized from
10262        /// the string representation of enums.
10263        pub fn value(&self) -> std::option::Option<i32> {
10264            match self {
10265                Self::Unspecified => std::option::Option::Some(0),
10266                Self::Available => std::option::Option::Some(1),
10267                Self::Consumed => std::option::Option::Some(2),
10268                Self::Creating => std::option::Option::Some(3),
10269                Self::UnknownValue(u) => u.0.value(),
10270            }
10271        }
10272
10273        /// Gets the enum value as a string.
10274        ///
10275        /// Returns `None` if the enum contains an unknown value deserialized from
10276        /// the integer representation of enums.
10277        pub fn name(&self) -> std::option::Option<&str> {
10278            match self {
10279                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10280                Self::Available => std::option::Option::Some("AVAILABLE"),
10281                Self::Consumed => std::option::Option::Some("CONSUMED"),
10282                Self::Creating => std::option::Option::Some("CREATING"),
10283                Self::UnknownValue(u) => u.0.name(),
10284            }
10285        }
10286    }
10287
10288    impl std::default::Default for State {
10289        fn default() -> Self {
10290            use std::convert::From;
10291            Self::from(0)
10292        }
10293    }
10294
10295    impl std::fmt::Display for State {
10296        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10297            wkt::internal::display_enum(f, self.name(), self.value())
10298        }
10299    }
10300
10301    impl std::convert::From<i32> for State {
10302        fn from(value: i32) -> Self {
10303            match value {
10304                0 => Self::Unspecified,
10305                1 => Self::Available,
10306                2 => Self::Consumed,
10307                3 => Self::Creating,
10308                _ => Self::UnknownValue(state::UnknownValue(
10309                    wkt::internal::UnknownEnumValue::Integer(value),
10310                )),
10311            }
10312        }
10313    }
10314
10315    impl std::convert::From<&str> for State {
10316        fn from(value: &str) -> Self {
10317            use std::string::ToString;
10318            match value {
10319                "STATE_UNSPECIFIED" => Self::Unspecified,
10320                "AVAILABLE" => Self::Available,
10321                "CONSUMED" => Self::Consumed,
10322                "CREATING" => Self::Creating,
10323                _ => Self::UnknownValue(state::UnknownValue(
10324                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10325                )),
10326            }
10327        }
10328    }
10329
10330    impl serde::ser::Serialize for State {
10331        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10332        where
10333            S: serde::Serializer,
10334        {
10335            match self {
10336                Self::Unspecified => serializer.serialize_i32(0),
10337                Self::Available => serializer.serialize_i32(1),
10338                Self::Consumed => serializer.serialize_i32(2),
10339                Self::Creating => serializer.serialize_i32(3),
10340                Self::UnknownValue(u) => u.0.serialize(serializer),
10341            }
10342        }
10343    }
10344
10345    impl<'de> serde::de::Deserialize<'de> for State {
10346        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10347        where
10348            D: serde::Deserializer<'de>,
10349        {
10350            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10351                ".google.cloud.vmwareengine.v1.HcxActivationKey.State",
10352            ))
10353        }
10354    }
10355}
10356
10357/// Details about a HCX Cloud Manager appliance.
10358#[derive(Clone, Default, PartialEq)]
10359#[non_exhaustive]
10360pub struct Hcx {
10361    /// Internal IP address of the appliance.
10362    pub internal_ip: std::string::String,
10363
10364    /// Version of the appliance.
10365    pub version: std::string::String,
10366
10367    /// Output only. The state of the appliance.
10368    pub state: crate::model::hcx::State,
10369
10370    /// Fully qualified domain name of the appliance.
10371    pub fqdn: std::string::String,
10372
10373    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10374}
10375
10376impl Hcx {
10377    pub fn new() -> Self {
10378        std::default::Default::default()
10379    }
10380
10381    /// Sets the value of [internal_ip][crate::model::Hcx::internal_ip].
10382    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10383        self.internal_ip = v.into();
10384        self
10385    }
10386
10387    /// Sets the value of [version][crate::model::Hcx::version].
10388    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10389        self.version = v.into();
10390        self
10391    }
10392
10393    /// Sets the value of [state][crate::model::Hcx::state].
10394    pub fn set_state<T: std::convert::Into<crate::model::hcx::State>>(mut self, v: T) -> Self {
10395        self.state = v.into();
10396        self
10397    }
10398
10399    /// Sets the value of [fqdn][crate::model::Hcx::fqdn].
10400    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10401        self.fqdn = v.into();
10402        self
10403    }
10404}
10405
10406impl wkt::message::Message for Hcx {
10407    fn typename() -> &'static str {
10408        "type.googleapis.com/google.cloud.vmwareengine.v1.Hcx"
10409    }
10410}
10411
10412/// Defines additional types related to [Hcx].
10413pub mod hcx {
10414    #[allow(unused_imports)]
10415    use super::*;
10416
10417    /// State of the appliance
10418    ///
10419    /// # Working with unknown values
10420    ///
10421    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10422    /// additional enum variants at any time. Adding new variants is not considered
10423    /// a breaking change. Applications should write their code in anticipation of:
10424    ///
10425    /// - New values appearing in future releases of the client library, **and**
10426    /// - New values received dynamically, without application changes.
10427    ///
10428    /// Please consult the [Working with enums] section in the user guide for some
10429    /// guidelines.
10430    ///
10431    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10432    #[derive(Clone, Debug, PartialEq)]
10433    #[non_exhaustive]
10434    pub enum State {
10435        /// Unspecified appliance state. This is the default value.
10436        Unspecified,
10437        /// The appliance is operational and can be used.
10438        Active,
10439        /// The appliance is being deployed.
10440        Creating,
10441        /// The appliance is being activated.
10442        Activating,
10443        /// If set, the enum was initialized with an unknown value.
10444        ///
10445        /// Applications can examine the value using [State::value] or
10446        /// [State::name].
10447        UnknownValue(state::UnknownValue),
10448    }
10449
10450    #[doc(hidden)]
10451    pub mod state {
10452        #[allow(unused_imports)]
10453        use super::*;
10454        #[derive(Clone, Debug, PartialEq)]
10455        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10456    }
10457
10458    impl State {
10459        /// Gets the enum value.
10460        ///
10461        /// Returns `None` if the enum contains an unknown value deserialized from
10462        /// the string representation of enums.
10463        pub fn value(&self) -> std::option::Option<i32> {
10464            match self {
10465                Self::Unspecified => std::option::Option::Some(0),
10466                Self::Active => std::option::Option::Some(1),
10467                Self::Creating => std::option::Option::Some(2),
10468                Self::Activating => std::option::Option::Some(3),
10469                Self::UnknownValue(u) => u.0.value(),
10470            }
10471        }
10472
10473        /// Gets the enum value as a string.
10474        ///
10475        /// Returns `None` if the enum contains an unknown value deserialized from
10476        /// the integer representation of enums.
10477        pub fn name(&self) -> std::option::Option<&str> {
10478            match self {
10479                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10480                Self::Active => std::option::Option::Some("ACTIVE"),
10481                Self::Creating => std::option::Option::Some("CREATING"),
10482                Self::Activating => std::option::Option::Some("ACTIVATING"),
10483                Self::UnknownValue(u) => u.0.name(),
10484            }
10485        }
10486    }
10487
10488    impl std::default::Default for State {
10489        fn default() -> Self {
10490            use std::convert::From;
10491            Self::from(0)
10492        }
10493    }
10494
10495    impl std::fmt::Display for State {
10496        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10497            wkt::internal::display_enum(f, self.name(), self.value())
10498        }
10499    }
10500
10501    impl std::convert::From<i32> for State {
10502        fn from(value: i32) -> Self {
10503            match value {
10504                0 => Self::Unspecified,
10505                1 => Self::Active,
10506                2 => Self::Creating,
10507                3 => Self::Activating,
10508                _ => Self::UnknownValue(state::UnknownValue(
10509                    wkt::internal::UnknownEnumValue::Integer(value),
10510                )),
10511            }
10512        }
10513    }
10514
10515    impl std::convert::From<&str> for State {
10516        fn from(value: &str) -> Self {
10517            use std::string::ToString;
10518            match value {
10519                "STATE_UNSPECIFIED" => Self::Unspecified,
10520                "ACTIVE" => Self::Active,
10521                "CREATING" => Self::Creating,
10522                "ACTIVATING" => Self::Activating,
10523                _ => Self::UnknownValue(state::UnknownValue(
10524                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10525                )),
10526            }
10527        }
10528    }
10529
10530    impl serde::ser::Serialize for State {
10531        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10532        where
10533            S: serde::Serializer,
10534        {
10535            match self {
10536                Self::Unspecified => serializer.serialize_i32(0),
10537                Self::Active => serializer.serialize_i32(1),
10538                Self::Creating => serializer.serialize_i32(2),
10539                Self::Activating => serializer.serialize_i32(3),
10540                Self::UnknownValue(u) => u.0.serialize(serializer),
10541            }
10542        }
10543    }
10544
10545    impl<'de> serde::de::Deserialize<'de> for State {
10546        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10547        where
10548            D: serde::Deserializer<'de>,
10549        {
10550            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10551                ".google.cloud.vmwareengine.v1.Hcx.State",
10552            ))
10553        }
10554    }
10555}
10556
10557/// Details about a NSX Manager appliance.
10558#[derive(Clone, Default, PartialEq)]
10559#[non_exhaustive]
10560pub struct Nsx {
10561    /// Internal IP address of the appliance.
10562    pub internal_ip: std::string::String,
10563
10564    /// Version of the appliance.
10565    pub version: std::string::String,
10566
10567    /// Output only. The state of the appliance.
10568    pub state: crate::model::nsx::State,
10569
10570    /// Fully qualified domain name of the appliance.
10571    pub fqdn: std::string::String,
10572
10573    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10574}
10575
10576impl Nsx {
10577    pub fn new() -> Self {
10578        std::default::Default::default()
10579    }
10580
10581    /// Sets the value of [internal_ip][crate::model::Nsx::internal_ip].
10582    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10583        self.internal_ip = v.into();
10584        self
10585    }
10586
10587    /// Sets the value of [version][crate::model::Nsx::version].
10588    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10589        self.version = v.into();
10590        self
10591    }
10592
10593    /// Sets the value of [state][crate::model::Nsx::state].
10594    pub fn set_state<T: std::convert::Into<crate::model::nsx::State>>(mut self, v: T) -> Self {
10595        self.state = v.into();
10596        self
10597    }
10598
10599    /// Sets the value of [fqdn][crate::model::Nsx::fqdn].
10600    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10601        self.fqdn = v.into();
10602        self
10603    }
10604}
10605
10606impl wkt::message::Message for Nsx {
10607    fn typename() -> &'static str {
10608        "type.googleapis.com/google.cloud.vmwareengine.v1.Nsx"
10609    }
10610}
10611
10612/// Defines additional types related to [Nsx].
10613pub mod nsx {
10614    #[allow(unused_imports)]
10615    use super::*;
10616
10617    /// State of the appliance
10618    ///
10619    /// # Working with unknown values
10620    ///
10621    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10622    /// additional enum variants at any time. Adding new variants is not considered
10623    /// a breaking change. Applications should write their code in anticipation of:
10624    ///
10625    /// - New values appearing in future releases of the client library, **and**
10626    /// - New values received dynamically, without application changes.
10627    ///
10628    /// Please consult the [Working with enums] section in the user guide for some
10629    /// guidelines.
10630    ///
10631    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10632    #[derive(Clone, Debug, PartialEq)]
10633    #[non_exhaustive]
10634    pub enum State {
10635        /// Unspecified appliance state. This is the default value.
10636        Unspecified,
10637        /// The appliance is operational and can be used.
10638        Active,
10639        /// The appliance is being deployed.
10640        Creating,
10641        /// If set, the enum was initialized with an unknown value.
10642        ///
10643        /// Applications can examine the value using [State::value] or
10644        /// [State::name].
10645        UnknownValue(state::UnknownValue),
10646    }
10647
10648    #[doc(hidden)]
10649    pub mod state {
10650        #[allow(unused_imports)]
10651        use super::*;
10652        #[derive(Clone, Debug, PartialEq)]
10653        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10654    }
10655
10656    impl State {
10657        /// Gets the enum value.
10658        ///
10659        /// Returns `None` if the enum contains an unknown value deserialized from
10660        /// the string representation of enums.
10661        pub fn value(&self) -> std::option::Option<i32> {
10662            match self {
10663                Self::Unspecified => std::option::Option::Some(0),
10664                Self::Active => std::option::Option::Some(1),
10665                Self::Creating => std::option::Option::Some(2),
10666                Self::UnknownValue(u) => u.0.value(),
10667            }
10668        }
10669
10670        /// Gets the enum value as a string.
10671        ///
10672        /// Returns `None` if the enum contains an unknown value deserialized from
10673        /// the integer representation of enums.
10674        pub fn name(&self) -> std::option::Option<&str> {
10675            match self {
10676                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10677                Self::Active => std::option::Option::Some("ACTIVE"),
10678                Self::Creating => std::option::Option::Some("CREATING"),
10679                Self::UnknownValue(u) => u.0.name(),
10680            }
10681        }
10682    }
10683
10684    impl std::default::Default for State {
10685        fn default() -> Self {
10686            use std::convert::From;
10687            Self::from(0)
10688        }
10689    }
10690
10691    impl std::fmt::Display for State {
10692        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10693            wkt::internal::display_enum(f, self.name(), self.value())
10694        }
10695    }
10696
10697    impl std::convert::From<i32> for State {
10698        fn from(value: i32) -> Self {
10699            match value {
10700                0 => Self::Unspecified,
10701                1 => Self::Active,
10702                2 => Self::Creating,
10703                _ => Self::UnknownValue(state::UnknownValue(
10704                    wkt::internal::UnknownEnumValue::Integer(value),
10705                )),
10706            }
10707        }
10708    }
10709
10710    impl std::convert::From<&str> for State {
10711        fn from(value: &str) -> Self {
10712            use std::string::ToString;
10713            match value {
10714                "STATE_UNSPECIFIED" => Self::Unspecified,
10715                "ACTIVE" => Self::Active,
10716                "CREATING" => Self::Creating,
10717                _ => Self::UnknownValue(state::UnknownValue(
10718                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10719                )),
10720            }
10721        }
10722    }
10723
10724    impl serde::ser::Serialize for State {
10725        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10726        where
10727            S: serde::Serializer,
10728        {
10729            match self {
10730                Self::Unspecified => serializer.serialize_i32(0),
10731                Self::Active => serializer.serialize_i32(1),
10732                Self::Creating => serializer.serialize_i32(2),
10733                Self::UnknownValue(u) => u.0.serialize(serializer),
10734            }
10735        }
10736    }
10737
10738    impl<'de> serde::de::Deserialize<'de> for State {
10739        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10740        where
10741            D: serde::Deserializer<'de>,
10742        {
10743            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10744                ".google.cloud.vmwareengine.v1.Nsx.State",
10745            ))
10746        }
10747    }
10748}
10749
10750/// Details about a vCenter Server management appliance.
10751#[derive(Clone, Default, PartialEq)]
10752#[non_exhaustive]
10753pub struct Vcenter {
10754    /// Internal IP address of the appliance.
10755    pub internal_ip: std::string::String,
10756
10757    /// Version of the appliance.
10758    pub version: std::string::String,
10759
10760    /// Output only. The state of the appliance.
10761    pub state: crate::model::vcenter::State,
10762
10763    /// Fully qualified domain name of the appliance.
10764    pub fqdn: std::string::String,
10765
10766    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10767}
10768
10769impl Vcenter {
10770    pub fn new() -> Self {
10771        std::default::Default::default()
10772    }
10773
10774    /// Sets the value of [internal_ip][crate::model::Vcenter::internal_ip].
10775    pub fn set_internal_ip<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10776        self.internal_ip = v.into();
10777        self
10778    }
10779
10780    /// Sets the value of [version][crate::model::Vcenter::version].
10781    pub fn set_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10782        self.version = v.into();
10783        self
10784    }
10785
10786    /// Sets the value of [state][crate::model::Vcenter::state].
10787    pub fn set_state<T: std::convert::Into<crate::model::vcenter::State>>(mut self, v: T) -> Self {
10788        self.state = v.into();
10789        self
10790    }
10791
10792    /// Sets the value of [fqdn][crate::model::Vcenter::fqdn].
10793    pub fn set_fqdn<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
10794        self.fqdn = v.into();
10795        self
10796    }
10797}
10798
10799impl wkt::message::Message for Vcenter {
10800    fn typename() -> &'static str {
10801        "type.googleapis.com/google.cloud.vmwareengine.v1.Vcenter"
10802    }
10803}
10804
10805/// Defines additional types related to [Vcenter].
10806pub mod vcenter {
10807    #[allow(unused_imports)]
10808    use super::*;
10809
10810    /// State of the appliance
10811    ///
10812    /// # Working with unknown values
10813    ///
10814    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
10815    /// additional enum variants at any time. Adding new variants is not considered
10816    /// a breaking change. Applications should write their code in anticipation of:
10817    ///
10818    /// - New values appearing in future releases of the client library, **and**
10819    /// - New values received dynamically, without application changes.
10820    ///
10821    /// Please consult the [Working with enums] section in the user guide for some
10822    /// guidelines.
10823    ///
10824    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
10825    #[derive(Clone, Debug, PartialEq)]
10826    #[non_exhaustive]
10827    pub enum State {
10828        /// Unspecified appliance state. This is the default value.
10829        Unspecified,
10830        /// The appliance is operational and can be used.
10831        Active,
10832        /// The appliance is being deployed.
10833        Creating,
10834        /// If set, the enum was initialized with an unknown value.
10835        ///
10836        /// Applications can examine the value using [State::value] or
10837        /// [State::name].
10838        UnknownValue(state::UnknownValue),
10839    }
10840
10841    #[doc(hidden)]
10842    pub mod state {
10843        #[allow(unused_imports)]
10844        use super::*;
10845        #[derive(Clone, Debug, PartialEq)]
10846        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
10847    }
10848
10849    impl State {
10850        /// Gets the enum value.
10851        ///
10852        /// Returns `None` if the enum contains an unknown value deserialized from
10853        /// the string representation of enums.
10854        pub fn value(&self) -> std::option::Option<i32> {
10855            match self {
10856                Self::Unspecified => std::option::Option::Some(0),
10857                Self::Active => std::option::Option::Some(1),
10858                Self::Creating => std::option::Option::Some(2),
10859                Self::UnknownValue(u) => u.0.value(),
10860            }
10861        }
10862
10863        /// Gets the enum value as a string.
10864        ///
10865        /// Returns `None` if the enum contains an unknown value deserialized from
10866        /// the integer representation of enums.
10867        pub fn name(&self) -> std::option::Option<&str> {
10868            match self {
10869                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
10870                Self::Active => std::option::Option::Some("ACTIVE"),
10871                Self::Creating => std::option::Option::Some("CREATING"),
10872                Self::UnknownValue(u) => u.0.name(),
10873            }
10874        }
10875    }
10876
10877    impl std::default::Default for State {
10878        fn default() -> Self {
10879            use std::convert::From;
10880            Self::from(0)
10881        }
10882    }
10883
10884    impl std::fmt::Display for State {
10885        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
10886            wkt::internal::display_enum(f, self.name(), self.value())
10887        }
10888    }
10889
10890    impl std::convert::From<i32> for State {
10891        fn from(value: i32) -> Self {
10892            match value {
10893                0 => Self::Unspecified,
10894                1 => Self::Active,
10895                2 => Self::Creating,
10896                _ => Self::UnknownValue(state::UnknownValue(
10897                    wkt::internal::UnknownEnumValue::Integer(value),
10898                )),
10899            }
10900        }
10901    }
10902
10903    impl std::convert::From<&str> for State {
10904        fn from(value: &str) -> Self {
10905            use std::string::ToString;
10906            match value {
10907                "STATE_UNSPECIFIED" => Self::Unspecified,
10908                "ACTIVE" => Self::Active,
10909                "CREATING" => Self::Creating,
10910                _ => Self::UnknownValue(state::UnknownValue(
10911                    wkt::internal::UnknownEnumValue::String(value.to_string()),
10912                )),
10913            }
10914        }
10915    }
10916
10917    impl serde::ser::Serialize for State {
10918        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
10919        where
10920            S: serde::Serializer,
10921        {
10922            match self {
10923                Self::Unspecified => serializer.serialize_i32(0),
10924                Self::Active => serializer.serialize_i32(1),
10925                Self::Creating => serializer.serialize_i32(2),
10926                Self::UnknownValue(u) => u.0.serialize(serializer),
10927            }
10928        }
10929    }
10930
10931    impl<'de> serde::de::Deserialize<'de> for State {
10932        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
10933        where
10934            D: serde::Deserializer<'de>,
10935        {
10936            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
10937                ".google.cloud.vmwareengine.v1.Vcenter.State",
10938            ))
10939        }
10940    }
10941}
10942
10943/// Autoscaling settings define the rules used by VMware Engine to
10944/// automatically scale-out and scale-in the clusters in a private cloud.
10945#[derive(Clone, Default, PartialEq)]
10946#[non_exhaustive]
10947pub struct AutoscalingSettings {
10948    /// Required. The map with autoscaling policies applied to the cluster.
10949    /// The key is the identifier of the policy.
10950    /// It must meet the following requirements:
10951    ///
10952    /// * Only contains 1-63 alphanumeric characters and hyphens
10953    /// * Begins with an alphabetical character
10954    /// * Ends with a non-hyphen character
10955    /// * Not formatted as a UUID
10956    /// * Complies with [RFC
10957    ///   1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
10958    ///
10959    /// Currently there map must contain only one element
10960    /// that describes the autoscaling policy for compute nodes.
10961    pub autoscaling_policies: std::collections::HashMap<
10962        std::string::String,
10963        crate::model::autoscaling_settings::AutoscalingPolicy,
10964    >,
10965
10966    /// Optional. Minimum number of nodes of any type in a cluster.
10967    /// If not specified the default limits apply.
10968    pub min_cluster_node_count: i32,
10969
10970    /// Optional. Maximum number of nodes of any type in a cluster.
10971    /// If not specified the default limits apply.
10972    pub max_cluster_node_count: i32,
10973
10974    /// Optional. The minimum duration between consecutive autoscale operations.
10975    /// It starts once addition or removal of nodes is fully completed.
10976    /// Defaults to 30 minutes if not specified. Cool down period must be in whole
10977    /// minutes (for example, 30, 31, 50, 180 minutes).
10978    pub cool_down_period: std::option::Option<wkt::Duration>,
10979
10980    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
10981}
10982
10983impl AutoscalingSettings {
10984    pub fn new() -> Self {
10985        std::default::Default::default()
10986    }
10987
10988    /// Sets the value of [autoscaling_policies][crate::model::AutoscalingSettings::autoscaling_policies].
10989    pub fn set_autoscaling_policies<T, K, V>(mut self, v: T) -> Self
10990    where
10991        T: std::iter::IntoIterator<Item = (K, V)>,
10992        K: std::convert::Into<std::string::String>,
10993        V: std::convert::Into<crate::model::autoscaling_settings::AutoscalingPolicy>,
10994    {
10995        use std::iter::Iterator;
10996        self.autoscaling_policies = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
10997        self
10998    }
10999
11000    /// Sets the value of [min_cluster_node_count][crate::model::AutoscalingSettings::min_cluster_node_count].
11001    pub fn set_min_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11002        self.min_cluster_node_count = v.into();
11003        self
11004    }
11005
11006    /// Sets the value of [max_cluster_node_count][crate::model::AutoscalingSettings::max_cluster_node_count].
11007    pub fn set_max_cluster_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11008        self.max_cluster_node_count = v.into();
11009        self
11010    }
11011
11012    /// Sets the value of [cool_down_period][crate::model::AutoscalingSettings::cool_down_period].
11013    pub fn set_cool_down_period<T>(mut self, v: T) -> Self
11014    where
11015        T: std::convert::Into<wkt::Duration>,
11016    {
11017        self.cool_down_period = std::option::Option::Some(v.into());
11018        self
11019    }
11020
11021    /// Sets or clears the value of [cool_down_period][crate::model::AutoscalingSettings::cool_down_period].
11022    pub fn set_or_clear_cool_down_period<T>(mut self, v: std::option::Option<T>) -> Self
11023    where
11024        T: std::convert::Into<wkt::Duration>,
11025    {
11026        self.cool_down_period = v.map(|x| x.into());
11027        self
11028    }
11029}
11030
11031impl wkt::message::Message for AutoscalingSettings {
11032    fn typename() -> &'static str {
11033        "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings"
11034    }
11035}
11036
11037/// Defines additional types related to [AutoscalingSettings].
11038pub mod autoscaling_settings {
11039    #[allow(unused_imports)]
11040    use super::*;
11041
11042    /// Thresholds define the utilization of resources triggering
11043    /// scale-out and scale-in operations.
11044    #[derive(Clone, Default, PartialEq)]
11045    #[non_exhaustive]
11046    pub struct Thresholds {
11047        /// Required. The utilization triggering the scale-out operation in percent.
11048        pub scale_out: i32,
11049
11050        /// Required. The utilization triggering the scale-in operation in percent.
11051        pub scale_in: i32,
11052
11053        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11054    }
11055
11056    impl Thresholds {
11057        pub fn new() -> Self {
11058            std::default::Default::default()
11059        }
11060
11061        /// Sets the value of [scale_out][crate::model::autoscaling_settings::Thresholds::scale_out].
11062        pub fn set_scale_out<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11063            self.scale_out = v.into();
11064            self
11065        }
11066
11067        /// Sets the value of [scale_in][crate::model::autoscaling_settings::Thresholds::scale_in].
11068        pub fn set_scale_in<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11069            self.scale_in = v.into();
11070            self
11071        }
11072    }
11073
11074    impl wkt::message::Message for Thresholds {
11075        fn typename() -> &'static str {
11076            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.Thresholds"
11077        }
11078    }
11079
11080    /// Autoscaling policy describes the behavior of the autoscaling
11081    /// with respect to the resource utilization.
11082    /// The scale-out operation is initiated if the utilization
11083    /// exceeds ANY of the respective thresholds.
11084    /// The scale-in operation is initiated if the utilization
11085    /// is below ALL of the respective thresholds.
11086    #[derive(Clone, Default, PartialEq)]
11087    #[non_exhaustive]
11088    pub struct AutoscalingPolicy {
11089        /// Required. The canonical identifier of the node type to add or remove.
11090        /// Corresponds to the `NodeType`.
11091        pub node_type_id: std::string::String,
11092
11093        /// Required. Number of nodes to add to a cluster during a scale-out
11094        /// operation. Must be divisible by 2 for stretched clusters. During a
11095        /// scale-in operation only one node (or 2 for stretched clusters) are
11096        /// removed in a single iteration.
11097        pub scale_out_size: i32,
11098
11099        /// Optional. Utilization thresholds pertaining to CPU utilization.
11100        pub cpu_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
11101
11102        /// Optional. Utilization thresholds pertaining to amount of granted memory.
11103        pub granted_memory_thresholds:
11104            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
11105
11106        /// Optional. Utilization thresholds pertaining to amount of consumed memory.
11107        pub consumed_memory_thresholds:
11108            std::option::Option<crate::model::autoscaling_settings::Thresholds>,
11109
11110        /// Optional. Utilization thresholds pertaining to amount of consumed
11111        /// storage.
11112        pub storage_thresholds: std::option::Option<crate::model::autoscaling_settings::Thresholds>,
11113
11114        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11115    }
11116
11117    impl AutoscalingPolicy {
11118        pub fn new() -> Self {
11119            std::default::Default::default()
11120        }
11121
11122        /// Sets the value of [node_type_id][crate::model::autoscaling_settings::AutoscalingPolicy::node_type_id].
11123        pub fn set_node_type_id<T: std::convert::Into<std::string::String>>(
11124            mut self,
11125            v: T,
11126        ) -> Self {
11127            self.node_type_id = v.into();
11128            self
11129        }
11130
11131        /// Sets the value of [scale_out_size][crate::model::autoscaling_settings::AutoscalingPolicy::scale_out_size].
11132        pub fn set_scale_out_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11133            self.scale_out_size = v.into();
11134            self
11135        }
11136
11137        /// Sets the value of [cpu_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::cpu_thresholds].
11138        pub fn set_cpu_thresholds<T>(mut self, v: T) -> Self
11139        where
11140            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
11141        {
11142            self.cpu_thresholds = std::option::Option::Some(v.into());
11143            self
11144        }
11145
11146        /// Sets or clears the value of [cpu_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::cpu_thresholds].
11147        pub fn set_or_clear_cpu_thresholds<T>(mut self, v: std::option::Option<T>) -> Self
11148        where
11149            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
11150        {
11151            self.cpu_thresholds = v.map(|x| x.into());
11152            self
11153        }
11154
11155        /// Sets the value of [granted_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::granted_memory_thresholds].
11156        pub fn set_granted_memory_thresholds<T>(mut self, v: T) -> Self
11157        where
11158            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
11159        {
11160            self.granted_memory_thresholds = std::option::Option::Some(v.into());
11161            self
11162        }
11163
11164        /// Sets or clears the value of [granted_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::granted_memory_thresholds].
11165        pub fn set_or_clear_granted_memory_thresholds<T>(
11166            mut self,
11167            v: std::option::Option<T>,
11168        ) -> Self
11169        where
11170            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
11171        {
11172            self.granted_memory_thresholds = v.map(|x| x.into());
11173            self
11174        }
11175
11176        /// Sets the value of [consumed_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::consumed_memory_thresholds].
11177        pub fn set_consumed_memory_thresholds<T>(mut self, v: T) -> Self
11178        where
11179            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
11180        {
11181            self.consumed_memory_thresholds = std::option::Option::Some(v.into());
11182            self
11183        }
11184
11185        /// Sets or clears the value of [consumed_memory_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::consumed_memory_thresholds].
11186        pub fn set_or_clear_consumed_memory_thresholds<T>(
11187            mut self,
11188            v: std::option::Option<T>,
11189        ) -> Self
11190        where
11191            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
11192        {
11193            self.consumed_memory_thresholds = v.map(|x| x.into());
11194            self
11195        }
11196
11197        /// Sets the value of [storage_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::storage_thresholds].
11198        pub fn set_storage_thresholds<T>(mut self, v: T) -> Self
11199        where
11200            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
11201        {
11202            self.storage_thresholds = std::option::Option::Some(v.into());
11203            self
11204        }
11205
11206        /// Sets or clears the value of [storage_thresholds][crate::model::autoscaling_settings::AutoscalingPolicy::storage_thresholds].
11207        pub fn set_or_clear_storage_thresholds<T>(mut self, v: std::option::Option<T>) -> Self
11208        where
11209            T: std::convert::Into<crate::model::autoscaling_settings::Thresholds>,
11210        {
11211            self.storage_thresholds = v.map(|x| x.into());
11212            self
11213        }
11214    }
11215
11216    impl wkt::message::Message for AutoscalingPolicy {
11217        fn typename() -> &'static str {
11218            "type.googleapis.com/google.cloud.vmwareengine.v1.AutoscalingSettings.AutoscalingPolicy"
11219        }
11220    }
11221}
11222
11223/// DNS forwarding config.
11224/// This config defines a list of domain to name server mappings,
11225/// and is attached to the private cloud for custom domain resolution.
11226#[derive(Clone, Default, PartialEq)]
11227#[non_exhaustive]
11228pub struct DnsForwarding {
11229    /// Output only. The resource name of this DNS profile.
11230    /// Resource names are schemeless URIs that follow the conventions in
11231    /// <https://cloud.google.com/apis/design/resource_names>.
11232    /// For example:
11233    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`
11234    pub name: std::string::String,
11235
11236    /// Output only. Creation time of this resource.
11237    pub create_time: std::option::Option<wkt::Timestamp>,
11238
11239    /// Output only. Last update time of this resource.
11240    pub update_time: std::option::Option<wkt::Timestamp>,
11241
11242    /// Required. List of domain mappings to configure
11243    pub forwarding_rules: std::vec::Vec<crate::model::dns_forwarding::ForwardingRule>,
11244
11245    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11246}
11247
11248impl DnsForwarding {
11249    pub fn new() -> Self {
11250        std::default::Default::default()
11251    }
11252
11253    /// Sets the value of [name][crate::model::DnsForwarding::name].
11254    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11255        self.name = v.into();
11256        self
11257    }
11258
11259    /// Sets the value of [create_time][crate::model::DnsForwarding::create_time].
11260    pub fn set_create_time<T>(mut self, v: T) -> Self
11261    where
11262        T: std::convert::Into<wkt::Timestamp>,
11263    {
11264        self.create_time = std::option::Option::Some(v.into());
11265        self
11266    }
11267
11268    /// Sets or clears the value of [create_time][crate::model::DnsForwarding::create_time].
11269    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11270    where
11271        T: std::convert::Into<wkt::Timestamp>,
11272    {
11273        self.create_time = v.map(|x| x.into());
11274        self
11275    }
11276
11277    /// Sets the value of [update_time][crate::model::DnsForwarding::update_time].
11278    pub fn set_update_time<T>(mut self, v: T) -> Self
11279    where
11280        T: std::convert::Into<wkt::Timestamp>,
11281    {
11282        self.update_time = std::option::Option::Some(v.into());
11283        self
11284    }
11285
11286    /// Sets or clears the value of [update_time][crate::model::DnsForwarding::update_time].
11287    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11288    where
11289        T: std::convert::Into<wkt::Timestamp>,
11290    {
11291        self.update_time = v.map(|x| x.into());
11292        self
11293    }
11294
11295    /// Sets the value of [forwarding_rules][crate::model::DnsForwarding::forwarding_rules].
11296    pub fn set_forwarding_rules<T, V>(mut self, v: T) -> Self
11297    where
11298        T: std::iter::IntoIterator<Item = V>,
11299        V: std::convert::Into<crate::model::dns_forwarding::ForwardingRule>,
11300    {
11301        use std::iter::Iterator;
11302        self.forwarding_rules = v.into_iter().map(|i| i.into()).collect();
11303        self
11304    }
11305}
11306
11307impl wkt::message::Message for DnsForwarding {
11308    fn typename() -> &'static str {
11309        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding"
11310    }
11311}
11312
11313/// Defines additional types related to [DnsForwarding].
11314pub mod dns_forwarding {
11315    #[allow(unused_imports)]
11316    use super::*;
11317
11318    /// A forwarding rule is a mapping of a `domain` to `name_servers`.
11319    /// This mapping allows VMware Engine to resolve domains for attached private
11320    /// clouds by forwarding DNS requests for a given domain to the specified
11321    /// nameservers.
11322    #[derive(Clone, Default, PartialEq)]
11323    #[non_exhaustive]
11324    pub struct ForwardingRule {
11325        /// Required. Domain used to resolve a `name_servers` list.
11326        pub domain: std::string::String,
11327
11328        /// Required. List of DNS servers to use for domain resolution
11329        pub name_servers: std::vec::Vec<std::string::String>,
11330
11331        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11332    }
11333
11334    impl ForwardingRule {
11335        pub fn new() -> Self {
11336            std::default::Default::default()
11337        }
11338
11339        /// Sets the value of [domain][crate::model::dns_forwarding::ForwardingRule::domain].
11340        pub fn set_domain<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11341            self.domain = v.into();
11342            self
11343        }
11344
11345        /// Sets the value of [name_servers][crate::model::dns_forwarding::ForwardingRule::name_servers].
11346        pub fn set_name_servers<T, V>(mut self, v: T) -> Self
11347        where
11348            T: std::iter::IntoIterator<Item = V>,
11349            V: std::convert::Into<std::string::String>,
11350        {
11351            use std::iter::Iterator;
11352            self.name_servers = v.into_iter().map(|i| i.into()).collect();
11353            self
11354        }
11355    }
11356
11357    impl wkt::message::Message for ForwardingRule {
11358        fn typename() -> &'static str {
11359            "type.googleapis.com/google.cloud.vmwareengine.v1.DnsForwarding.ForwardingRule"
11360        }
11361    }
11362}
11363
11364/// Details of a network peering.
11365#[derive(Clone, Default, PartialEq)]
11366#[non_exhaustive]
11367pub struct NetworkPeering {
11368    /// Output only. The resource name of the network peering. NetworkPeering is a
11369    /// global resource and location can only be global. Resource names are
11370    /// scheme-less URIs that follow the conventions in
11371    /// <https://cloud.google.com/apis/design/resource_names>.
11372    /// For example:
11373    /// `projects/my-project/locations/global/networkPeerings/my-peering`
11374    pub name: std::string::String,
11375
11376    /// Output only. Creation time of this resource.
11377    pub create_time: std::option::Option<wkt::Timestamp>,
11378
11379    /// Output only. Last update time of this resource.
11380    pub update_time: std::option::Option<wkt::Timestamp>,
11381
11382    /// Required. The relative resource name of the network to peer with
11383    /// a standard VMware Engine network. The provided network can be a
11384    /// consumer VPC network or another standard VMware Engine network. If the
11385    /// `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form:
11386    /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
11387    /// Otherwise specify the name in the form:
11388    /// `projects/{project}/global/networks/{network_id}`, where
11389    /// `{project}` can either be a project number or a project ID.
11390    pub peer_network: std::string::String,
11391
11392    /// Optional. True if custom routes are exported to the peered network;
11393    /// false otherwise. The default value is true.
11394    pub export_custom_routes: std::option::Option<bool>,
11395
11396    /// Optional. True if custom routes are imported from the peered network;
11397    /// false otherwise. The default value is true.
11398    pub import_custom_routes: std::option::Option<bool>,
11399
11400    /// Optional. True if full mesh connectivity is created and managed
11401    /// automatically between peered networks; false otherwise. Currently this
11402    /// field is always true because Google Compute Engine automatically creates
11403    /// and manages subnetwork routes between two VPC networks when peering state
11404    /// is 'ACTIVE'.
11405    pub exchange_subnet_routes: std::option::Option<bool>,
11406
11407    /// Optional. True if all subnet routes with a public IP address range are
11408    /// exported; false otherwise. The default value is true. IPv4 special-use
11409    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
11410    /// exported to peers and are not controlled by this field.
11411    pub export_custom_routes_with_public_ip: std::option::Option<bool>,
11412
11413    /// Optional. True if all subnet routes with public IP address range are
11414    /// imported; false otherwise. The default value is true. IPv4 special-use
11415    /// ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
11416    /// imported to peers and are not controlled by this field.
11417    pub import_custom_routes_with_public_ip: std::option::Option<bool>,
11418
11419    /// Output only. State of the network peering. This field
11420    /// has a value of 'ACTIVE' when there's a matching configuration in the peer
11421    /// network. New values may be added to this enum when appropriate.
11422    pub state: crate::model::network_peering::State,
11423
11424    /// Output only. Output Only. Details about the current state of the network
11425    /// peering.
11426    pub state_details: std::string::String,
11427
11428    /// Optional. Maximum transmission unit (MTU) in bytes.
11429    /// The default value is `1500`. If a value of `0` is provided for this field,
11430    /// VMware Engine uses the default value instead.
11431    pub peer_mtu: i32,
11432
11433    /// Required. The type of the network to peer with the VMware Engine network.
11434    pub peer_network_type: crate::model::network_peering::PeerNetworkType,
11435
11436    /// Output only. System-generated unique identifier for the resource.
11437    pub uid: std::string::String,
11438
11439    /// Required. The relative resource name of the VMware Engine network.
11440    /// Specify the name in the following form:
11441    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
11442    /// where `{project}` can either be a project number or a project ID.
11443    pub vmware_engine_network: std::string::String,
11444
11445    /// Optional. User-provided description for this network peering.
11446    pub description: std::string::String,
11447
11448    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
11449}
11450
11451impl NetworkPeering {
11452    pub fn new() -> Self {
11453        std::default::Default::default()
11454    }
11455
11456    /// Sets the value of [name][crate::model::NetworkPeering::name].
11457    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11458        self.name = v.into();
11459        self
11460    }
11461
11462    /// Sets the value of [create_time][crate::model::NetworkPeering::create_time].
11463    pub fn set_create_time<T>(mut self, v: T) -> Self
11464    where
11465        T: std::convert::Into<wkt::Timestamp>,
11466    {
11467        self.create_time = std::option::Option::Some(v.into());
11468        self
11469    }
11470
11471    /// Sets or clears the value of [create_time][crate::model::NetworkPeering::create_time].
11472    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
11473    where
11474        T: std::convert::Into<wkt::Timestamp>,
11475    {
11476        self.create_time = v.map(|x| x.into());
11477        self
11478    }
11479
11480    /// Sets the value of [update_time][crate::model::NetworkPeering::update_time].
11481    pub fn set_update_time<T>(mut self, v: T) -> Self
11482    where
11483        T: std::convert::Into<wkt::Timestamp>,
11484    {
11485        self.update_time = std::option::Option::Some(v.into());
11486        self
11487    }
11488
11489    /// Sets or clears the value of [update_time][crate::model::NetworkPeering::update_time].
11490    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
11491    where
11492        T: std::convert::Into<wkt::Timestamp>,
11493    {
11494        self.update_time = v.map(|x| x.into());
11495        self
11496    }
11497
11498    /// Sets the value of [peer_network][crate::model::NetworkPeering::peer_network].
11499    pub fn set_peer_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11500        self.peer_network = v.into();
11501        self
11502    }
11503
11504    /// Sets the value of [export_custom_routes][crate::model::NetworkPeering::export_custom_routes].
11505    pub fn set_export_custom_routes<T>(mut self, v: T) -> Self
11506    where
11507        T: std::convert::Into<bool>,
11508    {
11509        self.export_custom_routes = std::option::Option::Some(v.into());
11510        self
11511    }
11512
11513    /// Sets or clears the value of [export_custom_routes][crate::model::NetworkPeering::export_custom_routes].
11514    pub fn set_or_clear_export_custom_routes<T>(mut self, v: std::option::Option<T>) -> Self
11515    where
11516        T: std::convert::Into<bool>,
11517    {
11518        self.export_custom_routes = v.map(|x| x.into());
11519        self
11520    }
11521
11522    /// Sets the value of [import_custom_routes][crate::model::NetworkPeering::import_custom_routes].
11523    pub fn set_import_custom_routes<T>(mut self, v: T) -> Self
11524    where
11525        T: std::convert::Into<bool>,
11526    {
11527        self.import_custom_routes = std::option::Option::Some(v.into());
11528        self
11529    }
11530
11531    /// Sets or clears the value of [import_custom_routes][crate::model::NetworkPeering::import_custom_routes].
11532    pub fn set_or_clear_import_custom_routes<T>(mut self, v: std::option::Option<T>) -> Self
11533    where
11534        T: std::convert::Into<bool>,
11535    {
11536        self.import_custom_routes = v.map(|x| x.into());
11537        self
11538    }
11539
11540    /// Sets the value of [exchange_subnet_routes][crate::model::NetworkPeering::exchange_subnet_routes].
11541    pub fn set_exchange_subnet_routes<T>(mut self, v: T) -> Self
11542    where
11543        T: std::convert::Into<bool>,
11544    {
11545        self.exchange_subnet_routes = std::option::Option::Some(v.into());
11546        self
11547    }
11548
11549    /// Sets or clears the value of [exchange_subnet_routes][crate::model::NetworkPeering::exchange_subnet_routes].
11550    pub fn set_or_clear_exchange_subnet_routes<T>(mut self, v: std::option::Option<T>) -> Self
11551    where
11552        T: std::convert::Into<bool>,
11553    {
11554        self.exchange_subnet_routes = v.map(|x| x.into());
11555        self
11556    }
11557
11558    /// Sets the value of [export_custom_routes_with_public_ip][crate::model::NetworkPeering::export_custom_routes_with_public_ip].
11559    pub fn set_export_custom_routes_with_public_ip<T>(mut self, v: T) -> Self
11560    where
11561        T: std::convert::Into<bool>,
11562    {
11563        self.export_custom_routes_with_public_ip = std::option::Option::Some(v.into());
11564        self
11565    }
11566
11567    /// Sets or clears the value of [export_custom_routes_with_public_ip][crate::model::NetworkPeering::export_custom_routes_with_public_ip].
11568    pub fn set_or_clear_export_custom_routes_with_public_ip<T>(
11569        mut self,
11570        v: std::option::Option<T>,
11571    ) -> Self
11572    where
11573        T: std::convert::Into<bool>,
11574    {
11575        self.export_custom_routes_with_public_ip = v.map(|x| x.into());
11576        self
11577    }
11578
11579    /// Sets the value of [import_custom_routes_with_public_ip][crate::model::NetworkPeering::import_custom_routes_with_public_ip].
11580    pub fn set_import_custom_routes_with_public_ip<T>(mut self, v: T) -> Self
11581    where
11582        T: std::convert::Into<bool>,
11583    {
11584        self.import_custom_routes_with_public_ip = std::option::Option::Some(v.into());
11585        self
11586    }
11587
11588    /// Sets or clears the value of [import_custom_routes_with_public_ip][crate::model::NetworkPeering::import_custom_routes_with_public_ip].
11589    pub fn set_or_clear_import_custom_routes_with_public_ip<T>(
11590        mut self,
11591        v: std::option::Option<T>,
11592    ) -> Self
11593    where
11594        T: std::convert::Into<bool>,
11595    {
11596        self.import_custom_routes_with_public_ip = v.map(|x| x.into());
11597        self
11598    }
11599
11600    /// Sets the value of [state][crate::model::NetworkPeering::state].
11601    pub fn set_state<T: std::convert::Into<crate::model::network_peering::State>>(
11602        mut self,
11603        v: T,
11604    ) -> Self {
11605        self.state = v.into();
11606        self
11607    }
11608
11609    /// Sets the value of [state_details][crate::model::NetworkPeering::state_details].
11610    pub fn set_state_details<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11611        self.state_details = v.into();
11612        self
11613    }
11614
11615    /// Sets the value of [peer_mtu][crate::model::NetworkPeering::peer_mtu].
11616    pub fn set_peer_mtu<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
11617        self.peer_mtu = v.into();
11618        self
11619    }
11620
11621    /// Sets the value of [peer_network_type][crate::model::NetworkPeering::peer_network_type].
11622    pub fn set_peer_network_type<
11623        T: std::convert::Into<crate::model::network_peering::PeerNetworkType>,
11624    >(
11625        mut self,
11626        v: T,
11627    ) -> Self {
11628        self.peer_network_type = v.into();
11629        self
11630    }
11631
11632    /// Sets the value of [uid][crate::model::NetworkPeering::uid].
11633    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11634        self.uid = v.into();
11635        self
11636    }
11637
11638    /// Sets the value of [vmware_engine_network][crate::model::NetworkPeering::vmware_engine_network].
11639    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
11640        mut self,
11641        v: T,
11642    ) -> Self {
11643        self.vmware_engine_network = v.into();
11644        self
11645    }
11646
11647    /// Sets the value of [description][crate::model::NetworkPeering::description].
11648    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
11649        self.description = v.into();
11650        self
11651    }
11652}
11653
11654impl wkt::message::Message for NetworkPeering {
11655    fn typename() -> &'static str {
11656        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPeering"
11657    }
11658}
11659
11660/// Defines additional types related to [NetworkPeering].
11661pub mod network_peering {
11662    #[allow(unused_imports)]
11663    use super::*;
11664
11665    /// Possible states of a network peering.
11666    ///
11667    /// # Working with unknown values
11668    ///
11669    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11670    /// additional enum variants at any time. Adding new variants is not considered
11671    /// a breaking change. Applications should write their code in anticipation of:
11672    ///
11673    /// - New values appearing in future releases of the client library, **and**
11674    /// - New values received dynamically, without application changes.
11675    ///
11676    /// Please consult the [Working with enums] section in the user guide for some
11677    /// guidelines.
11678    ///
11679    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11680    #[derive(Clone, Debug, PartialEq)]
11681    #[non_exhaustive]
11682    pub enum State {
11683        /// Unspecified network peering state. This is the default value.
11684        Unspecified,
11685        /// The peering is not active.
11686        Inactive,
11687        /// The peering is active.
11688        Active,
11689        /// The peering is being created.
11690        Creating,
11691        /// The peering is being deleted.
11692        Deleting,
11693        /// If set, the enum was initialized with an unknown value.
11694        ///
11695        /// Applications can examine the value using [State::value] or
11696        /// [State::name].
11697        UnknownValue(state::UnknownValue),
11698    }
11699
11700    #[doc(hidden)]
11701    pub mod state {
11702        #[allow(unused_imports)]
11703        use super::*;
11704        #[derive(Clone, Debug, PartialEq)]
11705        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11706    }
11707
11708    impl State {
11709        /// Gets the enum value.
11710        ///
11711        /// Returns `None` if the enum contains an unknown value deserialized from
11712        /// the string representation of enums.
11713        pub fn value(&self) -> std::option::Option<i32> {
11714            match self {
11715                Self::Unspecified => std::option::Option::Some(0),
11716                Self::Inactive => std::option::Option::Some(1),
11717                Self::Active => std::option::Option::Some(2),
11718                Self::Creating => std::option::Option::Some(3),
11719                Self::Deleting => std::option::Option::Some(4),
11720                Self::UnknownValue(u) => u.0.value(),
11721            }
11722        }
11723
11724        /// Gets the enum value as a string.
11725        ///
11726        /// Returns `None` if the enum contains an unknown value deserialized from
11727        /// the integer representation of enums.
11728        pub fn name(&self) -> std::option::Option<&str> {
11729            match self {
11730                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
11731                Self::Inactive => std::option::Option::Some("INACTIVE"),
11732                Self::Active => std::option::Option::Some("ACTIVE"),
11733                Self::Creating => std::option::Option::Some("CREATING"),
11734                Self::Deleting => std::option::Option::Some("DELETING"),
11735                Self::UnknownValue(u) => u.0.name(),
11736            }
11737        }
11738    }
11739
11740    impl std::default::Default for State {
11741        fn default() -> Self {
11742            use std::convert::From;
11743            Self::from(0)
11744        }
11745    }
11746
11747    impl std::fmt::Display for State {
11748        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11749            wkt::internal::display_enum(f, self.name(), self.value())
11750        }
11751    }
11752
11753    impl std::convert::From<i32> for State {
11754        fn from(value: i32) -> Self {
11755            match value {
11756                0 => Self::Unspecified,
11757                1 => Self::Inactive,
11758                2 => Self::Active,
11759                3 => Self::Creating,
11760                4 => Self::Deleting,
11761                _ => Self::UnknownValue(state::UnknownValue(
11762                    wkt::internal::UnknownEnumValue::Integer(value),
11763                )),
11764            }
11765        }
11766    }
11767
11768    impl std::convert::From<&str> for State {
11769        fn from(value: &str) -> Self {
11770            use std::string::ToString;
11771            match value {
11772                "STATE_UNSPECIFIED" => Self::Unspecified,
11773                "INACTIVE" => Self::Inactive,
11774                "ACTIVE" => Self::Active,
11775                "CREATING" => Self::Creating,
11776                "DELETING" => Self::Deleting,
11777                _ => Self::UnknownValue(state::UnknownValue(
11778                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11779                )),
11780            }
11781        }
11782    }
11783
11784    impl serde::ser::Serialize for State {
11785        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11786        where
11787            S: serde::Serializer,
11788        {
11789            match self {
11790                Self::Unspecified => serializer.serialize_i32(0),
11791                Self::Inactive => serializer.serialize_i32(1),
11792                Self::Active => serializer.serialize_i32(2),
11793                Self::Creating => serializer.serialize_i32(3),
11794                Self::Deleting => serializer.serialize_i32(4),
11795                Self::UnknownValue(u) => u.0.serialize(serializer),
11796            }
11797        }
11798    }
11799
11800    impl<'de> serde::de::Deserialize<'de> for State {
11801        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11802        where
11803            D: serde::Deserializer<'de>,
11804        {
11805            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
11806                ".google.cloud.vmwareengine.v1.NetworkPeering.State",
11807            ))
11808        }
11809    }
11810
11811    /// Type or purpose of the network peering connection.
11812    ///
11813    /// # Working with unknown values
11814    ///
11815    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
11816    /// additional enum variants at any time. Adding new variants is not considered
11817    /// a breaking change. Applications should write their code in anticipation of:
11818    ///
11819    /// - New values appearing in future releases of the client library, **and**
11820    /// - New values received dynamically, without application changes.
11821    ///
11822    /// Please consult the [Working with enums] section in the user guide for some
11823    /// guidelines.
11824    ///
11825    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
11826    #[derive(Clone, Debug, PartialEq)]
11827    #[non_exhaustive]
11828    pub enum PeerNetworkType {
11829        /// Unspecified
11830        Unspecified,
11831        /// Peering connection used for connecting to another VPC network established
11832        /// by the same user. For example, a peering connection to another VPC
11833        /// network in the same project or to an on-premises network.
11834        Standard,
11835        /// Peering connection used for connecting to another VMware Engine network.
11836        VmwareEngineNetwork,
11837        /// Peering connection used for establishing [private services
11838        /// access](https://cloud.google.com/vpc/docs/private-services-access).
11839        PrivateServicesAccess,
11840        /// Peering connection used for connecting to NetApp Cloud Volumes.
11841        NetappCloudVolumes,
11842        /// Peering connection used for connecting to third-party services. Most
11843        /// third-party services require manual setup of reverse peering on the VPC
11844        /// network associated with the third-party service.
11845        ThirdPartyService,
11846        /// Peering connection used for connecting to Dell PowerScale Filers
11847        DellPowerscale,
11848        /// Peering connection used for connecting to Google Cloud NetApp Volumes.
11849        GoogleCloudNetappVolumes,
11850        /// If set, the enum was initialized with an unknown value.
11851        ///
11852        /// Applications can examine the value using [PeerNetworkType::value] or
11853        /// [PeerNetworkType::name].
11854        UnknownValue(peer_network_type::UnknownValue),
11855    }
11856
11857    #[doc(hidden)]
11858    pub mod peer_network_type {
11859        #[allow(unused_imports)]
11860        use super::*;
11861        #[derive(Clone, Debug, PartialEq)]
11862        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
11863    }
11864
11865    impl PeerNetworkType {
11866        /// Gets the enum value.
11867        ///
11868        /// Returns `None` if the enum contains an unknown value deserialized from
11869        /// the string representation of enums.
11870        pub fn value(&self) -> std::option::Option<i32> {
11871            match self {
11872                Self::Unspecified => std::option::Option::Some(0),
11873                Self::Standard => std::option::Option::Some(1),
11874                Self::VmwareEngineNetwork => std::option::Option::Some(2),
11875                Self::PrivateServicesAccess => std::option::Option::Some(3),
11876                Self::NetappCloudVolumes => std::option::Option::Some(4),
11877                Self::ThirdPartyService => std::option::Option::Some(5),
11878                Self::DellPowerscale => std::option::Option::Some(6),
11879                Self::GoogleCloudNetappVolumes => std::option::Option::Some(7),
11880                Self::UnknownValue(u) => u.0.value(),
11881            }
11882        }
11883
11884        /// Gets the enum value as a string.
11885        ///
11886        /// Returns `None` if the enum contains an unknown value deserialized from
11887        /// the integer representation of enums.
11888        pub fn name(&self) -> std::option::Option<&str> {
11889            match self {
11890                Self::Unspecified => std::option::Option::Some("PEER_NETWORK_TYPE_UNSPECIFIED"),
11891                Self::Standard => std::option::Option::Some("STANDARD"),
11892                Self::VmwareEngineNetwork => std::option::Option::Some("VMWARE_ENGINE_NETWORK"),
11893                Self::PrivateServicesAccess => std::option::Option::Some("PRIVATE_SERVICES_ACCESS"),
11894                Self::NetappCloudVolumes => std::option::Option::Some("NETAPP_CLOUD_VOLUMES"),
11895                Self::ThirdPartyService => std::option::Option::Some("THIRD_PARTY_SERVICE"),
11896                Self::DellPowerscale => std::option::Option::Some("DELL_POWERSCALE"),
11897                Self::GoogleCloudNetappVolumes => {
11898                    std::option::Option::Some("GOOGLE_CLOUD_NETAPP_VOLUMES")
11899                }
11900                Self::UnknownValue(u) => u.0.name(),
11901            }
11902        }
11903    }
11904
11905    impl std::default::Default for PeerNetworkType {
11906        fn default() -> Self {
11907            use std::convert::From;
11908            Self::from(0)
11909        }
11910    }
11911
11912    impl std::fmt::Display for PeerNetworkType {
11913        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
11914            wkt::internal::display_enum(f, self.name(), self.value())
11915        }
11916    }
11917
11918    impl std::convert::From<i32> for PeerNetworkType {
11919        fn from(value: i32) -> Self {
11920            match value {
11921                0 => Self::Unspecified,
11922                1 => Self::Standard,
11923                2 => Self::VmwareEngineNetwork,
11924                3 => Self::PrivateServicesAccess,
11925                4 => Self::NetappCloudVolumes,
11926                5 => Self::ThirdPartyService,
11927                6 => Self::DellPowerscale,
11928                7 => Self::GoogleCloudNetappVolumes,
11929                _ => Self::UnknownValue(peer_network_type::UnknownValue(
11930                    wkt::internal::UnknownEnumValue::Integer(value),
11931                )),
11932            }
11933        }
11934    }
11935
11936    impl std::convert::From<&str> for PeerNetworkType {
11937        fn from(value: &str) -> Self {
11938            use std::string::ToString;
11939            match value {
11940                "PEER_NETWORK_TYPE_UNSPECIFIED" => Self::Unspecified,
11941                "STANDARD" => Self::Standard,
11942                "VMWARE_ENGINE_NETWORK" => Self::VmwareEngineNetwork,
11943                "PRIVATE_SERVICES_ACCESS" => Self::PrivateServicesAccess,
11944                "NETAPP_CLOUD_VOLUMES" => Self::NetappCloudVolumes,
11945                "THIRD_PARTY_SERVICE" => Self::ThirdPartyService,
11946                "DELL_POWERSCALE" => Self::DellPowerscale,
11947                "GOOGLE_CLOUD_NETAPP_VOLUMES" => Self::GoogleCloudNetappVolumes,
11948                _ => Self::UnknownValue(peer_network_type::UnknownValue(
11949                    wkt::internal::UnknownEnumValue::String(value.to_string()),
11950                )),
11951            }
11952        }
11953    }
11954
11955    impl serde::ser::Serialize for PeerNetworkType {
11956        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
11957        where
11958            S: serde::Serializer,
11959        {
11960            match self {
11961                Self::Unspecified => serializer.serialize_i32(0),
11962                Self::Standard => serializer.serialize_i32(1),
11963                Self::VmwareEngineNetwork => serializer.serialize_i32(2),
11964                Self::PrivateServicesAccess => serializer.serialize_i32(3),
11965                Self::NetappCloudVolumes => serializer.serialize_i32(4),
11966                Self::ThirdPartyService => serializer.serialize_i32(5),
11967                Self::DellPowerscale => serializer.serialize_i32(6),
11968                Self::GoogleCloudNetappVolumes => serializer.serialize_i32(7),
11969                Self::UnknownValue(u) => u.0.serialize(serializer),
11970            }
11971        }
11972    }
11973
11974    impl<'de> serde::de::Deserialize<'de> for PeerNetworkType {
11975        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
11976        where
11977            D: serde::Deserializer<'de>,
11978        {
11979            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PeerNetworkType>::new(
11980                ".google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType",
11981            ))
11982        }
11983    }
11984}
11985
11986/// Exchanged network peering route.
11987#[derive(Clone, Default, PartialEq)]
11988#[non_exhaustive]
11989pub struct PeeringRoute {
11990    /// Output only. Destination range of the peering route in CIDR notation.
11991    pub dest_range: std::string::String,
11992
11993    /// Output only. Type of the route in the peer VPC network.
11994    pub r#type: crate::model::peering_route::Type,
11995
11996    /// Output only. Region containing the next hop of the peering route. This
11997    /// field only applies to dynamic routes in the peer VPC network.
11998    pub next_hop_region: std::string::String,
11999
12000    /// Output only. The priority of the peering route.
12001    pub priority: i64,
12002
12003    /// Output only. True if the peering route has been imported from a peered
12004    /// VPC network; false otherwise. The import happens if the field
12005    /// `NetworkPeering.importCustomRoutes` is true for this network,
12006    /// `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and
12007    /// the import does not result in a route conflict.
12008    pub imported: bool,
12009
12010    /// Output only. Direction of the routes exchanged with the peer network, from
12011    /// the VMware Engine network perspective:
12012    ///
12013    /// * Routes of direction `INCOMING` are imported from the peer network.
12014    /// * Routes of direction `OUTGOING` are exported from the intranet VPC network
12015    ///   of the VMware Engine network.
12016    pub direction: crate::model::peering_route::Direction,
12017
12018    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12019}
12020
12021impl PeeringRoute {
12022    pub fn new() -> Self {
12023        std::default::Default::default()
12024    }
12025
12026    /// Sets the value of [dest_range][crate::model::PeeringRoute::dest_range].
12027    pub fn set_dest_range<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12028        self.dest_range = v.into();
12029        self
12030    }
12031
12032    /// Sets the value of [r#type][crate::model::PeeringRoute::type].
12033    pub fn set_type<T: std::convert::Into<crate::model::peering_route::Type>>(
12034        mut self,
12035        v: T,
12036    ) -> Self {
12037        self.r#type = v.into();
12038        self
12039    }
12040
12041    /// Sets the value of [next_hop_region][crate::model::PeeringRoute::next_hop_region].
12042    pub fn set_next_hop_region<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12043        self.next_hop_region = v.into();
12044        self
12045    }
12046
12047    /// Sets the value of [priority][crate::model::PeeringRoute::priority].
12048    pub fn set_priority<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
12049        self.priority = v.into();
12050        self
12051    }
12052
12053    /// Sets the value of [imported][crate::model::PeeringRoute::imported].
12054    pub fn set_imported<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12055        self.imported = v.into();
12056        self
12057    }
12058
12059    /// Sets the value of [direction][crate::model::PeeringRoute::direction].
12060    pub fn set_direction<T: std::convert::Into<crate::model::peering_route::Direction>>(
12061        mut self,
12062        v: T,
12063    ) -> Self {
12064        self.direction = v.into();
12065        self
12066    }
12067}
12068
12069impl wkt::message::Message for PeeringRoute {
12070    fn typename() -> &'static str {
12071        "type.googleapis.com/google.cloud.vmwareengine.v1.PeeringRoute"
12072    }
12073}
12074
12075/// Defines additional types related to [PeeringRoute].
12076pub mod peering_route {
12077    #[allow(unused_imports)]
12078    use super::*;
12079
12080    /// The type of the peering route.
12081    ///
12082    /// # Working with unknown values
12083    ///
12084    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12085    /// additional enum variants at any time. Adding new variants is not considered
12086    /// a breaking change. Applications should write their code in anticipation of:
12087    ///
12088    /// - New values appearing in future releases of the client library, **and**
12089    /// - New values received dynamically, without application changes.
12090    ///
12091    /// Please consult the [Working with enums] section in the user guide for some
12092    /// guidelines.
12093    ///
12094    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12095    #[derive(Clone, Debug, PartialEq)]
12096    #[non_exhaustive]
12097    pub enum Type {
12098        /// Unspecified peering route type. This is the default value.
12099        Unspecified,
12100        /// Dynamic routes in the peer network.
12101        DynamicPeeringRoute,
12102        /// Static routes in the peer network.
12103        StaticPeeringRoute,
12104        /// Created, updated, and removed automatically by Google Cloud when subnets
12105        /// are created, modified, or deleted in the peer network.
12106        SubnetPeeringRoute,
12107        /// If set, the enum was initialized with an unknown value.
12108        ///
12109        /// Applications can examine the value using [Type::value] or
12110        /// [Type::name].
12111        UnknownValue(r#type::UnknownValue),
12112    }
12113
12114    #[doc(hidden)]
12115    pub mod r#type {
12116        #[allow(unused_imports)]
12117        use super::*;
12118        #[derive(Clone, Debug, PartialEq)]
12119        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12120    }
12121
12122    impl Type {
12123        /// Gets the enum value.
12124        ///
12125        /// Returns `None` if the enum contains an unknown value deserialized from
12126        /// the string representation of enums.
12127        pub fn value(&self) -> std::option::Option<i32> {
12128            match self {
12129                Self::Unspecified => std::option::Option::Some(0),
12130                Self::DynamicPeeringRoute => std::option::Option::Some(1),
12131                Self::StaticPeeringRoute => std::option::Option::Some(2),
12132                Self::SubnetPeeringRoute => std::option::Option::Some(3),
12133                Self::UnknownValue(u) => u.0.value(),
12134            }
12135        }
12136
12137        /// Gets the enum value as a string.
12138        ///
12139        /// Returns `None` if the enum contains an unknown value deserialized from
12140        /// the integer representation of enums.
12141        pub fn name(&self) -> std::option::Option<&str> {
12142            match self {
12143                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
12144                Self::DynamicPeeringRoute => std::option::Option::Some("DYNAMIC_PEERING_ROUTE"),
12145                Self::StaticPeeringRoute => std::option::Option::Some("STATIC_PEERING_ROUTE"),
12146                Self::SubnetPeeringRoute => std::option::Option::Some("SUBNET_PEERING_ROUTE"),
12147                Self::UnknownValue(u) => u.0.name(),
12148            }
12149        }
12150    }
12151
12152    impl std::default::Default for Type {
12153        fn default() -> Self {
12154            use std::convert::From;
12155            Self::from(0)
12156        }
12157    }
12158
12159    impl std::fmt::Display for Type {
12160        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12161            wkt::internal::display_enum(f, self.name(), self.value())
12162        }
12163    }
12164
12165    impl std::convert::From<i32> for Type {
12166        fn from(value: i32) -> Self {
12167            match value {
12168                0 => Self::Unspecified,
12169                1 => Self::DynamicPeeringRoute,
12170                2 => Self::StaticPeeringRoute,
12171                3 => Self::SubnetPeeringRoute,
12172                _ => Self::UnknownValue(r#type::UnknownValue(
12173                    wkt::internal::UnknownEnumValue::Integer(value),
12174                )),
12175            }
12176        }
12177    }
12178
12179    impl std::convert::From<&str> for Type {
12180        fn from(value: &str) -> Self {
12181            use std::string::ToString;
12182            match value {
12183                "TYPE_UNSPECIFIED" => Self::Unspecified,
12184                "DYNAMIC_PEERING_ROUTE" => Self::DynamicPeeringRoute,
12185                "STATIC_PEERING_ROUTE" => Self::StaticPeeringRoute,
12186                "SUBNET_PEERING_ROUTE" => Self::SubnetPeeringRoute,
12187                _ => Self::UnknownValue(r#type::UnknownValue(
12188                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12189                )),
12190            }
12191        }
12192    }
12193
12194    impl serde::ser::Serialize for Type {
12195        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12196        where
12197            S: serde::Serializer,
12198        {
12199            match self {
12200                Self::Unspecified => serializer.serialize_i32(0),
12201                Self::DynamicPeeringRoute => serializer.serialize_i32(1),
12202                Self::StaticPeeringRoute => serializer.serialize_i32(2),
12203                Self::SubnetPeeringRoute => serializer.serialize_i32(3),
12204                Self::UnknownValue(u) => u.0.serialize(serializer),
12205            }
12206        }
12207    }
12208
12209    impl<'de> serde::de::Deserialize<'de> for Type {
12210        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12211        where
12212            D: serde::Deserializer<'de>,
12213        {
12214            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
12215                ".google.cloud.vmwareengine.v1.PeeringRoute.Type",
12216            ))
12217        }
12218    }
12219
12220    /// The direction of the exchanged routes.
12221    ///
12222    /// # Working with unknown values
12223    ///
12224    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12225    /// additional enum variants at any time. Adding new variants is not considered
12226    /// a breaking change. Applications should write their code in anticipation of:
12227    ///
12228    /// - New values appearing in future releases of the client library, **and**
12229    /// - New values received dynamically, without application changes.
12230    ///
12231    /// Please consult the [Working with enums] section in the user guide for some
12232    /// guidelines.
12233    ///
12234    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12235    #[derive(Clone, Debug, PartialEq)]
12236    #[non_exhaustive]
12237    pub enum Direction {
12238        /// Unspecified exchanged routes direction. This is default.
12239        Unspecified,
12240        /// Routes imported from the peer network.
12241        Incoming,
12242        /// Routes exported to the peer network.
12243        Outgoing,
12244        /// If set, the enum was initialized with an unknown value.
12245        ///
12246        /// Applications can examine the value using [Direction::value] or
12247        /// [Direction::name].
12248        UnknownValue(direction::UnknownValue),
12249    }
12250
12251    #[doc(hidden)]
12252    pub mod direction {
12253        #[allow(unused_imports)]
12254        use super::*;
12255        #[derive(Clone, Debug, PartialEq)]
12256        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12257    }
12258
12259    impl Direction {
12260        /// Gets the enum value.
12261        ///
12262        /// Returns `None` if the enum contains an unknown value deserialized from
12263        /// the string representation of enums.
12264        pub fn value(&self) -> std::option::Option<i32> {
12265            match self {
12266                Self::Unspecified => std::option::Option::Some(0),
12267                Self::Incoming => std::option::Option::Some(1),
12268                Self::Outgoing => std::option::Option::Some(2),
12269                Self::UnknownValue(u) => u.0.value(),
12270            }
12271        }
12272
12273        /// Gets the enum value as a string.
12274        ///
12275        /// Returns `None` if the enum contains an unknown value deserialized from
12276        /// the integer representation of enums.
12277        pub fn name(&self) -> std::option::Option<&str> {
12278            match self {
12279                Self::Unspecified => std::option::Option::Some("DIRECTION_UNSPECIFIED"),
12280                Self::Incoming => std::option::Option::Some("INCOMING"),
12281                Self::Outgoing => std::option::Option::Some("OUTGOING"),
12282                Self::UnknownValue(u) => u.0.name(),
12283            }
12284        }
12285    }
12286
12287    impl std::default::Default for Direction {
12288        fn default() -> Self {
12289            use std::convert::From;
12290            Self::from(0)
12291        }
12292    }
12293
12294    impl std::fmt::Display for Direction {
12295        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
12296            wkt::internal::display_enum(f, self.name(), self.value())
12297        }
12298    }
12299
12300    impl std::convert::From<i32> for Direction {
12301        fn from(value: i32) -> Self {
12302            match value {
12303                0 => Self::Unspecified,
12304                1 => Self::Incoming,
12305                2 => Self::Outgoing,
12306                _ => Self::UnknownValue(direction::UnknownValue(
12307                    wkt::internal::UnknownEnumValue::Integer(value),
12308                )),
12309            }
12310        }
12311    }
12312
12313    impl std::convert::From<&str> for Direction {
12314        fn from(value: &str) -> Self {
12315            use std::string::ToString;
12316            match value {
12317                "DIRECTION_UNSPECIFIED" => Self::Unspecified,
12318                "INCOMING" => Self::Incoming,
12319                "OUTGOING" => Self::Outgoing,
12320                _ => Self::UnknownValue(direction::UnknownValue(
12321                    wkt::internal::UnknownEnumValue::String(value.to_string()),
12322                )),
12323            }
12324        }
12325    }
12326
12327    impl serde::ser::Serialize for Direction {
12328        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12329        where
12330            S: serde::Serializer,
12331        {
12332            match self {
12333                Self::Unspecified => serializer.serialize_i32(0),
12334                Self::Incoming => serializer.serialize_i32(1),
12335                Self::Outgoing => serializer.serialize_i32(2),
12336                Self::UnknownValue(u) => u.0.serialize(serializer),
12337            }
12338        }
12339    }
12340
12341    impl<'de> serde::de::Deserialize<'de> for Direction {
12342        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12343        where
12344            D: serde::Deserializer<'de>,
12345        {
12346            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Direction>::new(
12347                ".google.cloud.vmwareengine.v1.PeeringRoute.Direction",
12348            ))
12349        }
12350    }
12351}
12352
12353/// Represents a network policy resource. Network policies are regional
12354/// resources. You can use a network policy to enable or disable internet access
12355/// and external IP access. Network policies are associated with a VMware Engine
12356/// network, which might span across regions. For a given region, a network
12357/// policy applies to all private clouds in the VMware Engine network associated
12358/// with the policy.
12359#[derive(Clone, Default, PartialEq)]
12360#[non_exhaustive]
12361pub struct NetworkPolicy {
12362    /// Output only. The resource name of this network policy.
12363    /// Resource names are schemeless URIs that follow the conventions in
12364    /// <https://cloud.google.com/apis/design/resource_names>.
12365    /// For example:
12366    /// `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`
12367    pub name: std::string::String,
12368
12369    /// Output only. Creation time of this resource.
12370    pub create_time: std::option::Option<wkt::Timestamp>,
12371
12372    /// Output only. Last update time of this resource.
12373    pub update_time: std::option::Option<wkt::Timestamp>,
12374
12375    /// Network service that allows VMware workloads to access the internet.
12376    pub internet_access: std::option::Option<crate::model::network_policy::NetworkService>,
12377
12378    /// Network service that allows External IP addresses to be assigned to VMware
12379    /// workloads. This service can only be enabled when `internet_access` is also
12380    /// enabled.
12381    pub external_ip: std::option::Option<crate::model::network_policy::NetworkService>,
12382
12383    /// Required. IP address range in CIDR notation used to create internet access
12384    /// and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is
12385    /// required. The range cannot overlap with any prefixes either in the consumer
12386    /// VPC network or in use by the private clouds attached to that VPC network.
12387    pub edge_services_cidr: std::string::String,
12388
12389    /// Output only. System-generated unique identifier for the resource.
12390    pub uid: std::string::String,
12391
12392    /// Optional. The relative resource name of the VMware Engine network.
12393    /// Specify the name in the following form:
12394    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
12395    /// where `{project}` can either be a project number or a project ID.
12396    pub vmware_engine_network: std::string::String,
12397
12398    /// Optional. User-provided description for this network policy.
12399    pub description: std::string::String,
12400
12401    /// Output only. The canonical name of the VMware Engine network in the form:
12402    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
12403    pub vmware_engine_network_canonical: std::string::String,
12404
12405    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12406}
12407
12408impl NetworkPolicy {
12409    pub fn new() -> Self {
12410        std::default::Default::default()
12411    }
12412
12413    /// Sets the value of [name][crate::model::NetworkPolicy::name].
12414    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12415        self.name = v.into();
12416        self
12417    }
12418
12419    /// Sets the value of [create_time][crate::model::NetworkPolicy::create_time].
12420    pub fn set_create_time<T>(mut self, v: T) -> Self
12421    where
12422        T: std::convert::Into<wkt::Timestamp>,
12423    {
12424        self.create_time = std::option::Option::Some(v.into());
12425        self
12426    }
12427
12428    /// Sets or clears the value of [create_time][crate::model::NetworkPolicy::create_time].
12429    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
12430    where
12431        T: std::convert::Into<wkt::Timestamp>,
12432    {
12433        self.create_time = v.map(|x| x.into());
12434        self
12435    }
12436
12437    /// Sets the value of [update_time][crate::model::NetworkPolicy::update_time].
12438    pub fn set_update_time<T>(mut self, v: T) -> Self
12439    where
12440        T: std::convert::Into<wkt::Timestamp>,
12441    {
12442        self.update_time = std::option::Option::Some(v.into());
12443        self
12444    }
12445
12446    /// Sets or clears the value of [update_time][crate::model::NetworkPolicy::update_time].
12447    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
12448    where
12449        T: std::convert::Into<wkt::Timestamp>,
12450    {
12451        self.update_time = v.map(|x| x.into());
12452        self
12453    }
12454
12455    /// Sets the value of [internet_access][crate::model::NetworkPolicy::internet_access].
12456    pub fn set_internet_access<T>(mut self, v: T) -> Self
12457    where
12458        T: std::convert::Into<crate::model::network_policy::NetworkService>,
12459    {
12460        self.internet_access = std::option::Option::Some(v.into());
12461        self
12462    }
12463
12464    /// Sets or clears the value of [internet_access][crate::model::NetworkPolicy::internet_access].
12465    pub fn set_or_clear_internet_access<T>(mut self, v: std::option::Option<T>) -> Self
12466    where
12467        T: std::convert::Into<crate::model::network_policy::NetworkService>,
12468    {
12469        self.internet_access = v.map(|x| x.into());
12470        self
12471    }
12472
12473    /// Sets the value of [external_ip][crate::model::NetworkPolicy::external_ip].
12474    pub fn set_external_ip<T>(mut self, v: T) -> Self
12475    where
12476        T: std::convert::Into<crate::model::network_policy::NetworkService>,
12477    {
12478        self.external_ip = std::option::Option::Some(v.into());
12479        self
12480    }
12481
12482    /// Sets or clears the value of [external_ip][crate::model::NetworkPolicy::external_ip].
12483    pub fn set_or_clear_external_ip<T>(mut self, v: std::option::Option<T>) -> Self
12484    where
12485        T: std::convert::Into<crate::model::network_policy::NetworkService>,
12486    {
12487        self.external_ip = v.map(|x| x.into());
12488        self
12489    }
12490
12491    /// Sets the value of [edge_services_cidr][crate::model::NetworkPolicy::edge_services_cidr].
12492    pub fn set_edge_services_cidr<T: std::convert::Into<std::string::String>>(
12493        mut self,
12494        v: T,
12495    ) -> Self {
12496        self.edge_services_cidr = v.into();
12497        self
12498    }
12499
12500    /// Sets the value of [uid][crate::model::NetworkPolicy::uid].
12501    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12502        self.uid = v.into();
12503        self
12504    }
12505
12506    /// Sets the value of [vmware_engine_network][crate::model::NetworkPolicy::vmware_engine_network].
12507    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
12508        mut self,
12509        v: T,
12510    ) -> Self {
12511        self.vmware_engine_network = v.into();
12512        self
12513    }
12514
12515    /// Sets the value of [description][crate::model::NetworkPolicy::description].
12516    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12517        self.description = v.into();
12518        self
12519    }
12520
12521    /// Sets the value of [vmware_engine_network_canonical][crate::model::NetworkPolicy::vmware_engine_network_canonical].
12522    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
12523        mut self,
12524        v: T,
12525    ) -> Self {
12526        self.vmware_engine_network_canonical = v.into();
12527        self
12528    }
12529}
12530
12531impl wkt::message::Message for NetworkPolicy {
12532    fn typename() -> &'static str {
12533        "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy"
12534    }
12535}
12536
12537/// Defines additional types related to [NetworkPolicy].
12538pub mod network_policy {
12539    #[allow(unused_imports)]
12540    use super::*;
12541
12542    /// Represents a network service that is managed by a `NetworkPolicy` resource.
12543    /// A network service provides a way to control an aspect of external access to
12544    /// VMware workloads. For example, whether the VMware workloads in the
12545    /// private clouds governed by a network policy can access or be accessed from
12546    /// the internet.
12547    #[derive(Clone, Default, PartialEq)]
12548    #[non_exhaustive]
12549    pub struct NetworkService {
12550        /// True if the service is enabled; false otherwise.
12551        pub enabled: bool,
12552
12553        /// Output only. State of the service. New values may be added to this enum
12554        /// when appropriate.
12555        pub state: crate::model::network_policy::network_service::State,
12556
12557        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12558    }
12559
12560    impl NetworkService {
12561        pub fn new() -> Self {
12562            std::default::Default::default()
12563        }
12564
12565        /// Sets the value of [enabled][crate::model::network_policy::NetworkService::enabled].
12566        pub fn set_enabled<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
12567            self.enabled = v.into();
12568            self
12569        }
12570
12571        /// Sets the value of [state][crate::model::network_policy::NetworkService::state].
12572        pub fn set_state<
12573            T: std::convert::Into<crate::model::network_policy::network_service::State>,
12574        >(
12575            mut self,
12576            v: T,
12577        ) -> Self {
12578            self.state = v.into();
12579            self
12580        }
12581    }
12582
12583    impl wkt::message::Message for NetworkService {
12584        fn typename() -> &'static str {
12585            "type.googleapis.com/google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService"
12586        }
12587    }
12588
12589    /// Defines additional types related to [NetworkService].
12590    pub mod network_service {
12591        #[allow(unused_imports)]
12592        use super::*;
12593
12594        /// Enum State defines possible states of a network policy controlled
12595        /// service.
12596        ///
12597        /// # Working with unknown values
12598        ///
12599        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12600        /// additional enum variants at any time. Adding new variants is not considered
12601        /// a breaking change. Applications should write their code in anticipation of:
12602        ///
12603        /// - New values appearing in future releases of the client library, **and**
12604        /// - New values received dynamically, without application changes.
12605        ///
12606        /// Please consult the [Working with enums] section in the user guide for some
12607        /// guidelines.
12608        ///
12609        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12610        #[derive(Clone, Debug, PartialEq)]
12611        #[non_exhaustive]
12612        pub enum State {
12613            /// Unspecified service state. This is the default value.
12614            Unspecified,
12615            /// Service is not provisioned.
12616            Unprovisioned,
12617            /// Service is in the process of being provisioned/deprovisioned.
12618            Reconciling,
12619            /// Service is active.
12620            Active,
12621            /// If set, the enum was initialized with an unknown value.
12622            ///
12623            /// Applications can examine the value using [State::value] or
12624            /// [State::name].
12625            UnknownValue(state::UnknownValue),
12626        }
12627
12628        #[doc(hidden)]
12629        pub mod state {
12630            #[allow(unused_imports)]
12631            use super::*;
12632            #[derive(Clone, Debug, PartialEq)]
12633            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12634        }
12635
12636        impl State {
12637            /// Gets the enum value.
12638            ///
12639            /// Returns `None` if the enum contains an unknown value deserialized from
12640            /// the string representation of enums.
12641            pub fn value(&self) -> std::option::Option<i32> {
12642                match self {
12643                    Self::Unspecified => std::option::Option::Some(0),
12644                    Self::Unprovisioned => std::option::Option::Some(1),
12645                    Self::Reconciling => std::option::Option::Some(2),
12646                    Self::Active => std::option::Option::Some(3),
12647                    Self::UnknownValue(u) => u.0.value(),
12648                }
12649            }
12650
12651            /// Gets the enum value as a string.
12652            ///
12653            /// Returns `None` if the enum contains an unknown value deserialized from
12654            /// the integer representation of enums.
12655            pub fn name(&self) -> std::option::Option<&str> {
12656                match self {
12657                    Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
12658                    Self::Unprovisioned => std::option::Option::Some("UNPROVISIONED"),
12659                    Self::Reconciling => std::option::Option::Some("RECONCILING"),
12660                    Self::Active => std::option::Option::Some("ACTIVE"),
12661                    Self::UnknownValue(u) => u.0.name(),
12662                }
12663            }
12664        }
12665
12666        impl std::default::Default for State {
12667            fn default() -> Self {
12668                use std::convert::From;
12669                Self::from(0)
12670            }
12671        }
12672
12673        impl std::fmt::Display for State {
12674            fn fmt(
12675                &self,
12676                f: &mut std::fmt::Formatter<'_>,
12677            ) -> std::result::Result<(), std::fmt::Error> {
12678                wkt::internal::display_enum(f, self.name(), self.value())
12679            }
12680        }
12681
12682        impl std::convert::From<i32> for State {
12683            fn from(value: i32) -> Self {
12684                match value {
12685                    0 => Self::Unspecified,
12686                    1 => Self::Unprovisioned,
12687                    2 => Self::Reconciling,
12688                    3 => Self::Active,
12689                    _ => Self::UnknownValue(state::UnknownValue(
12690                        wkt::internal::UnknownEnumValue::Integer(value),
12691                    )),
12692                }
12693            }
12694        }
12695
12696        impl std::convert::From<&str> for State {
12697            fn from(value: &str) -> Self {
12698                use std::string::ToString;
12699                match value {
12700                    "STATE_UNSPECIFIED" => Self::Unspecified,
12701                    "UNPROVISIONED" => Self::Unprovisioned,
12702                    "RECONCILING" => Self::Reconciling,
12703                    "ACTIVE" => Self::Active,
12704                    _ => Self::UnknownValue(state::UnknownValue(
12705                        wkt::internal::UnknownEnumValue::String(value.to_string()),
12706                    )),
12707                }
12708            }
12709        }
12710
12711        impl serde::ser::Serialize for State {
12712            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
12713            where
12714                S: serde::Serializer,
12715            {
12716                match self {
12717                    Self::Unspecified => serializer.serialize_i32(0),
12718                    Self::Unprovisioned => serializer.serialize_i32(1),
12719                    Self::Reconciling => serializer.serialize_i32(2),
12720                    Self::Active => serializer.serialize_i32(3),
12721                    Self::UnknownValue(u) => u.0.serialize(serializer),
12722                }
12723            }
12724        }
12725
12726        impl<'de> serde::de::Deserialize<'de> for State {
12727            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
12728            where
12729                D: serde::Deserializer<'de>,
12730            {
12731                deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
12732                    ".google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State",
12733                ))
12734            }
12735        }
12736    }
12737}
12738
12739/// Represents a binding between a network and the management DNS zone.
12740/// A management DNS zone is the Cloud DNS cross-project binding zone that
12741/// VMware Engine creates for each private cloud. It contains FQDNs and
12742/// corresponding IP addresses for the private cloud's ESXi hosts and management
12743/// VM appliances like vCenter and NSX Manager.
12744#[derive(Clone, Default, PartialEq)]
12745#[non_exhaustive]
12746pub struct ManagementDnsZoneBinding {
12747    /// Output only. The resource name of this binding.
12748    /// Resource names are schemeless URIs that follow the conventions in
12749    /// <https://cloud.google.com/apis/design/resource_names>.
12750    /// For example:
12751    /// `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`
12752    pub name: std::string::String,
12753
12754    /// Output only. Creation time of this resource.
12755    pub create_time: std::option::Option<wkt::Timestamp>,
12756
12757    /// Output only. Last update time of this resource.
12758    pub update_time: std::option::Option<wkt::Timestamp>,
12759
12760    /// Output only. The state of the resource.
12761    pub state: crate::model::management_dns_zone_binding::State,
12762
12763    /// User-provided description for this resource.
12764    pub description: std::string::String,
12765
12766    /// Output only. System-generated unique identifier for the resource.
12767    pub uid: std::string::String,
12768
12769    /// Required. The relative resource name of the network to bind to the
12770    /// management DNS zone. This network can be a consumer VPC network or a
12771    /// VMware engine network.
12772    pub bind_network: std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
12773
12774    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
12775}
12776
12777impl ManagementDnsZoneBinding {
12778    pub fn new() -> Self {
12779        std::default::Default::default()
12780    }
12781
12782    /// Sets the value of [name][crate::model::ManagementDnsZoneBinding::name].
12783    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12784        self.name = v.into();
12785        self
12786    }
12787
12788    /// Sets the value of [create_time][crate::model::ManagementDnsZoneBinding::create_time].
12789    pub fn set_create_time<T>(mut self, v: T) -> Self
12790    where
12791        T: std::convert::Into<wkt::Timestamp>,
12792    {
12793        self.create_time = std::option::Option::Some(v.into());
12794        self
12795    }
12796
12797    /// Sets or clears the value of [create_time][crate::model::ManagementDnsZoneBinding::create_time].
12798    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
12799    where
12800        T: std::convert::Into<wkt::Timestamp>,
12801    {
12802        self.create_time = v.map(|x| x.into());
12803        self
12804    }
12805
12806    /// Sets the value of [update_time][crate::model::ManagementDnsZoneBinding::update_time].
12807    pub fn set_update_time<T>(mut self, v: T) -> Self
12808    where
12809        T: std::convert::Into<wkt::Timestamp>,
12810    {
12811        self.update_time = std::option::Option::Some(v.into());
12812        self
12813    }
12814
12815    /// Sets or clears the value of [update_time][crate::model::ManagementDnsZoneBinding::update_time].
12816    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
12817    where
12818        T: std::convert::Into<wkt::Timestamp>,
12819    {
12820        self.update_time = v.map(|x| x.into());
12821        self
12822    }
12823
12824    /// Sets the value of [state][crate::model::ManagementDnsZoneBinding::state].
12825    pub fn set_state<T: std::convert::Into<crate::model::management_dns_zone_binding::State>>(
12826        mut self,
12827        v: T,
12828    ) -> Self {
12829        self.state = v.into();
12830        self
12831    }
12832
12833    /// Sets the value of [description][crate::model::ManagementDnsZoneBinding::description].
12834    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12835        self.description = v.into();
12836        self
12837    }
12838
12839    /// Sets the value of [uid][crate::model::ManagementDnsZoneBinding::uid].
12840    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12841        self.uid = v.into();
12842        self
12843    }
12844
12845    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network].
12846    ///
12847    /// Note that all the setters affecting `bind_network` are mutually
12848    /// exclusive.
12849    pub fn set_bind_network<
12850        T: std::convert::Into<
12851                std::option::Option<crate::model::management_dns_zone_binding::BindNetwork>,
12852            >,
12853    >(
12854        mut self,
12855        v: T,
12856    ) -> Self {
12857        self.bind_network = v.into();
12858        self
12859    }
12860
12861    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
12862    /// if it holds a `VpcNetwork`, `None` if the field is not set or
12863    /// holds a different branch.
12864    pub fn vpc_network(&self) -> std::option::Option<&std::string::String> {
12865        #[allow(unreachable_patterns)]
12866        self.bind_network.as_ref().and_then(|v| match v {
12867            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v) => {
12868                std::option::Option::Some(v)
12869            }
12870            _ => std::option::Option::None,
12871        })
12872    }
12873
12874    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
12875    /// to hold a `VpcNetwork`.
12876    ///
12877    /// Note that all the setters affecting `bind_network` are
12878    /// mutually exclusive.
12879    pub fn set_vpc_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
12880        self.bind_network = std::option::Option::Some(
12881            crate::model::management_dns_zone_binding::BindNetwork::VpcNetwork(v.into()),
12882        );
12883        self
12884    }
12885
12886    /// The value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
12887    /// if it holds a `VmwareEngineNetwork`, `None` if the field is not set or
12888    /// holds a different branch.
12889    pub fn vmware_engine_network(&self) -> std::option::Option<&std::string::String> {
12890        #[allow(unreachable_patterns)]
12891        self.bind_network.as_ref().and_then(|v| match v {
12892            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v) => {
12893                std::option::Option::Some(v)
12894            }
12895            _ => std::option::Option::None,
12896        })
12897    }
12898
12899    /// Sets the value of [bind_network][crate::model::ManagementDnsZoneBinding::bind_network]
12900    /// to hold a `VmwareEngineNetwork`.
12901    ///
12902    /// Note that all the setters affecting `bind_network` are
12903    /// mutually exclusive.
12904    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
12905        mut self,
12906        v: T,
12907    ) -> Self {
12908        self.bind_network = std::option::Option::Some(
12909            crate::model::management_dns_zone_binding::BindNetwork::VmwareEngineNetwork(v.into()),
12910        );
12911        self
12912    }
12913}
12914
12915impl wkt::message::Message for ManagementDnsZoneBinding {
12916    fn typename() -> &'static str {
12917        "type.googleapis.com/google.cloud.vmwareengine.v1.ManagementDnsZoneBinding"
12918    }
12919}
12920
12921/// Defines additional types related to [ManagementDnsZoneBinding].
12922pub mod management_dns_zone_binding {
12923    #[allow(unused_imports)]
12924    use super::*;
12925
12926    /// Enum State defines possible states of binding between the consumer VPC
12927    /// network and the management DNS zone.
12928    ///
12929    /// # Working with unknown values
12930    ///
12931    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
12932    /// additional enum variants at any time. Adding new variants is not considered
12933    /// a breaking change. Applications should write their code in anticipation of:
12934    ///
12935    /// - New values appearing in future releases of the client library, **and**
12936    /// - New values received dynamically, without application changes.
12937    ///
12938    /// Please consult the [Working with enums] section in the user guide for some
12939    /// guidelines.
12940    ///
12941    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
12942    #[derive(Clone, Debug, PartialEq)]
12943    #[non_exhaustive]
12944    pub enum State {
12945        /// The default value. This value should never be used.
12946        Unspecified,
12947        /// The binding is ready.
12948        Active,
12949        /// The binding is being created.
12950        Creating,
12951        /// The binding is being updated.
12952        Updating,
12953        /// The binding is being deleted.
12954        Deleting,
12955        /// The binding has failed.
12956        Failed,
12957        /// If set, the enum was initialized with an unknown value.
12958        ///
12959        /// Applications can examine the value using [State::value] or
12960        /// [State::name].
12961        UnknownValue(state::UnknownValue),
12962    }
12963
12964    #[doc(hidden)]
12965    pub mod state {
12966        #[allow(unused_imports)]
12967        use super::*;
12968        #[derive(Clone, Debug, PartialEq)]
12969        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
12970    }
12971
12972    impl State {
12973        /// Gets the enum value.
12974        ///
12975        /// Returns `None` if the enum contains an unknown value deserialized from
12976        /// the string representation of enums.
12977        pub fn value(&self) -> std::option::Option<i32> {
12978            match self {
12979                Self::Unspecified => std::option::Option::Some(0),
12980                Self::Active => std::option::Option::Some(1),
12981                Self::Creating => std::option::Option::Some(2),
12982                Self::Updating => std::option::Option::Some(3),
12983                Self::Deleting => std::option::Option::Some(4),
12984                Self::Failed => std::option::Option::Some(5),
12985                Self::UnknownValue(u) => u.0.value(),
12986            }
12987        }
12988
12989        /// Gets the enum value as a string.
12990        ///
12991        /// Returns `None` if the enum contains an unknown value deserialized from
12992        /// the integer representation of enums.
12993        pub fn name(&self) -> std::option::Option<&str> {
12994            match self {
12995                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
12996                Self::Active => std::option::Option::Some("ACTIVE"),
12997                Self::Creating => std::option::Option::Some("CREATING"),
12998                Self::Updating => std::option::Option::Some("UPDATING"),
12999                Self::Deleting => std::option::Option::Some("DELETING"),
13000                Self::Failed => std::option::Option::Some("FAILED"),
13001                Self::UnknownValue(u) => u.0.name(),
13002            }
13003        }
13004    }
13005
13006    impl std::default::Default for State {
13007        fn default() -> Self {
13008            use std::convert::From;
13009            Self::from(0)
13010        }
13011    }
13012
13013    impl std::fmt::Display for State {
13014        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13015            wkt::internal::display_enum(f, self.name(), self.value())
13016        }
13017    }
13018
13019    impl std::convert::From<i32> for State {
13020        fn from(value: i32) -> Self {
13021            match value {
13022                0 => Self::Unspecified,
13023                1 => Self::Active,
13024                2 => Self::Creating,
13025                3 => Self::Updating,
13026                4 => Self::Deleting,
13027                5 => Self::Failed,
13028                _ => Self::UnknownValue(state::UnknownValue(
13029                    wkt::internal::UnknownEnumValue::Integer(value),
13030                )),
13031            }
13032        }
13033    }
13034
13035    impl std::convert::From<&str> for State {
13036        fn from(value: &str) -> Self {
13037            use std::string::ToString;
13038            match value {
13039                "STATE_UNSPECIFIED" => Self::Unspecified,
13040                "ACTIVE" => Self::Active,
13041                "CREATING" => Self::Creating,
13042                "UPDATING" => Self::Updating,
13043                "DELETING" => Self::Deleting,
13044                "FAILED" => Self::Failed,
13045                _ => Self::UnknownValue(state::UnknownValue(
13046                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13047                )),
13048            }
13049        }
13050    }
13051
13052    impl serde::ser::Serialize for State {
13053        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13054        where
13055            S: serde::Serializer,
13056        {
13057            match self {
13058                Self::Unspecified => serializer.serialize_i32(0),
13059                Self::Active => serializer.serialize_i32(1),
13060                Self::Creating => serializer.serialize_i32(2),
13061                Self::Updating => serializer.serialize_i32(3),
13062                Self::Deleting => serializer.serialize_i32(4),
13063                Self::Failed => serializer.serialize_i32(5),
13064                Self::UnknownValue(u) => u.0.serialize(serializer),
13065            }
13066        }
13067    }
13068
13069    impl<'de> serde::de::Deserialize<'de> for State {
13070        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13071        where
13072            D: serde::Deserializer<'de>,
13073        {
13074            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13075                ".google.cloud.vmwareengine.v1.ManagementDnsZoneBinding.State",
13076            ))
13077        }
13078    }
13079
13080    /// Required. The relative resource name of the network to bind to the
13081    /// management DNS zone. This network can be a consumer VPC network or a
13082    /// VMware engine network.
13083    #[derive(Clone, Debug, PartialEq)]
13084    #[non_exhaustive]
13085    pub enum BindNetwork {
13086        /// Network to bind is a standard consumer VPC.
13087        /// Specify the name in the following form for consumer
13088        /// VPC network: `projects/{project}/global/networks/{network_id}`.
13089        /// `{project}` can either be a project number or a project ID.
13090        VpcNetwork(std::string::String),
13091        /// Network to bind is a VMware Engine network.
13092        /// Specify the name in the following form for VMware engine network:
13093        /// `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
13094        /// `{project}` can either be a project number or a project ID.
13095        VmwareEngineNetwork(std::string::String),
13096    }
13097}
13098
13099/// VMware Engine network resource that provides connectivity for VMware Engine
13100/// private clouds.
13101#[derive(Clone, Default, PartialEq)]
13102#[non_exhaustive]
13103pub struct VmwareEngineNetwork {
13104    /// Output only. The resource name of the VMware Engine network.
13105    /// Resource names are schemeless URIs that follow the conventions in
13106    /// <https://cloud.google.com/apis/design/resource_names>.
13107    /// For example:
13108    /// `projects/my-project/locations/global/vmwareEngineNetworks/my-network`
13109    pub name: std::string::String,
13110
13111    /// Output only. Creation time of this resource.
13112    pub create_time: std::option::Option<wkt::Timestamp>,
13113
13114    /// Output only. Last update time of this resource.
13115    pub update_time: std::option::Option<wkt::Timestamp>,
13116
13117    /// User-provided description for this VMware Engine network.
13118    pub description: std::string::String,
13119
13120    /// Output only. VMware Engine service VPC networks that provide connectivity
13121    /// from a private cloud to customer projects, the internet, and other Google
13122    /// Cloud services.
13123    pub vpc_networks: std::vec::Vec<crate::model::vmware_engine_network::VpcNetwork>,
13124
13125    /// Output only. State of the VMware Engine network.
13126    pub state: crate::model::vmware_engine_network::State,
13127
13128    /// Required. VMware Engine network type.
13129    pub r#type: crate::model::vmware_engine_network::Type,
13130
13131    /// Output only. System-generated unique identifier for the resource.
13132    pub uid: std::string::String,
13133
13134    /// Checksum that may be sent on update and delete requests to ensure that the
13135    /// user-provided value is up to date before the server processes a request.
13136    /// The server computes checksums based on the value of other fields in the
13137    /// request.
13138    pub etag: std::string::String,
13139
13140    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13141}
13142
13143impl VmwareEngineNetwork {
13144    pub fn new() -> Self {
13145        std::default::Default::default()
13146    }
13147
13148    /// Sets the value of [name][crate::model::VmwareEngineNetwork::name].
13149    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13150        self.name = v.into();
13151        self
13152    }
13153
13154    /// Sets the value of [create_time][crate::model::VmwareEngineNetwork::create_time].
13155    pub fn set_create_time<T>(mut self, v: T) -> Self
13156    where
13157        T: std::convert::Into<wkt::Timestamp>,
13158    {
13159        self.create_time = std::option::Option::Some(v.into());
13160        self
13161    }
13162
13163    /// Sets or clears the value of [create_time][crate::model::VmwareEngineNetwork::create_time].
13164    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
13165    where
13166        T: std::convert::Into<wkt::Timestamp>,
13167    {
13168        self.create_time = v.map(|x| x.into());
13169        self
13170    }
13171
13172    /// Sets the value of [update_time][crate::model::VmwareEngineNetwork::update_time].
13173    pub fn set_update_time<T>(mut self, v: T) -> Self
13174    where
13175        T: std::convert::Into<wkt::Timestamp>,
13176    {
13177        self.update_time = std::option::Option::Some(v.into());
13178        self
13179    }
13180
13181    /// Sets or clears the value of [update_time][crate::model::VmwareEngineNetwork::update_time].
13182    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
13183    where
13184        T: std::convert::Into<wkt::Timestamp>,
13185    {
13186        self.update_time = v.map(|x| x.into());
13187        self
13188    }
13189
13190    /// Sets the value of [description][crate::model::VmwareEngineNetwork::description].
13191    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13192        self.description = v.into();
13193        self
13194    }
13195
13196    /// Sets the value of [vpc_networks][crate::model::VmwareEngineNetwork::vpc_networks].
13197    pub fn set_vpc_networks<T, V>(mut self, v: T) -> Self
13198    where
13199        T: std::iter::IntoIterator<Item = V>,
13200        V: std::convert::Into<crate::model::vmware_engine_network::VpcNetwork>,
13201    {
13202        use std::iter::Iterator;
13203        self.vpc_networks = v.into_iter().map(|i| i.into()).collect();
13204        self
13205    }
13206
13207    /// Sets the value of [state][crate::model::VmwareEngineNetwork::state].
13208    pub fn set_state<T: std::convert::Into<crate::model::vmware_engine_network::State>>(
13209        mut self,
13210        v: T,
13211    ) -> Self {
13212        self.state = v.into();
13213        self
13214    }
13215
13216    /// Sets the value of [r#type][crate::model::VmwareEngineNetwork::type].
13217    pub fn set_type<T: std::convert::Into<crate::model::vmware_engine_network::Type>>(
13218        mut self,
13219        v: T,
13220    ) -> Self {
13221        self.r#type = v.into();
13222        self
13223    }
13224
13225    /// Sets the value of [uid][crate::model::VmwareEngineNetwork::uid].
13226    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13227        self.uid = v.into();
13228        self
13229    }
13230
13231    /// Sets the value of [etag][crate::model::VmwareEngineNetwork::etag].
13232    pub fn set_etag<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13233        self.etag = v.into();
13234        self
13235    }
13236}
13237
13238impl wkt::message::Message for VmwareEngineNetwork {
13239    fn typename() -> &'static str {
13240        "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork"
13241    }
13242}
13243
13244/// Defines additional types related to [VmwareEngineNetwork].
13245pub mod vmware_engine_network {
13246    #[allow(unused_imports)]
13247    use super::*;
13248
13249    /// Represents a VMware Engine VPC network that is managed by a
13250    /// VMware Engine network resource.
13251    #[derive(Clone, Default, PartialEq)]
13252    #[non_exhaustive]
13253    pub struct VpcNetwork {
13254        /// Output only. Type of VPC network (INTRANET, INTERNET, or
13255        /// GOOGLE_CLOUD)
13256        pub r#type: crate::model::vmware_engine_network::vpc_network::Type,
13257
13258        /// Output only. The relative resource name of the service VPC network this
13259        /// VMware Engine network is attached to. For example:
13260        /// `projects/123123/global/networks/my-network`
13261        pub network: std::string::String,
13262
13263        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13264    }
13265
13266    impl VpcNetwork {
13267        pub fn new() -> Self {
13268            std::default::Default::default()
13269        }
13270
13271        /// Sets the value of [r#type][crate::model::vmware_engine_network::VpcNetwork::type].
13272        pub fn set_type<
13273            T: std::convert::Into<crate::model::vmware_engine_network::vpc_network::Type>,
13274        >(
13275            mut self,
13276            v: T,
13277        ) -> Self {
13278            self.r#type = v.into();
13279            self
13280        }
13281
13282        /// Sets the value of [network][crate::model::vmware_engine_network::VpcNetwork::network].
13283        pub fn set_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13284            self.network = v.into();
13285            self
13286        }
13287    }
13288
13289    impl wkt::message::Message for VpcNetwork {
13290        fn typename() -> &'static str {
13291            "type.googleapis.com/google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork"
13292        }
13293    }
13294
13295    /// Defines additional types related to [VpcNetwork].
13296    pub mod vpc_network {
13297        #[allow(unused_imports)]
13298        use super::*;
13299
13300        /// Enum Type defines possible types of a VMware Engine network controlled
13301        /// service.
13302        ///
13303        /// # Working with unknown values
13304        ///
13305        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13306        /// additional enum variants at any time. Adding new variants is not considered
13307        /// a breaking change. Applications should write their code in anticipation of:
13308        ///
13309        /// - New values appearing in future releases of the client library, **and**
13310        /// - New values received dynamically, without application changes.
13311        ///
13312        /// Please consult the [Working with enums] section in the user guide for some
13313        /// guidelines.
13314        ///
13315        /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13316        #[derive(Clone, Debug, PartialEq)]
13317        #[non_exhaustive]
13318        pub enum Type {
13319            /// The default value. This value should never be used.
13320            Unspecified,
13321            /// VPC network that will be peered with a consumer VPC network or the
13322            /// intranet VPC of another VMware Engine network. Access a private cloud
13323            /// through Compute Engine VMs on a peered VPC network or an on-premises
13324            /// resource connected to a peered consumer VPC network.
13325            Intranet,
13326            /// VPC network used for internet access to and from a private cloud.
13327            Internet,
13328            /// VPC network used for access to Google Cloud services like
13329            /// Cloud Storage.
13330            GoogleCloud,
13331            /// If set, the enum was initialized with an unknown value.
13332            ///
13333            /// Applications can examine the value using [Type::value] or
13334            /// [Type::name].
13335            UnknownValue(r#type::UnknownValue),
13336        }
13337
13338        #[doc(hidden)]
13339        pub mod r#type {
13340            #[allow(unused_imports)]
13341            use super::*;
13342            #[derive(Clone, Debug, PartialEq)]
13343            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13344        }
13345
13346        impl Type {
13347            /// Gets the enum value.
13348            ///
13349            /// Returns `None` if the enum contains an unknown value deserialized from
13350            /// the string representation of enums.
13351            pub fn value(&self) -> std::option::Option<i32> {
13352                match self {
13353                    Self::Unspecified => std::option::Option::Some(0),
13354                    Self::Intranet => std::option::Option::Some(1),
13355                    Self::Internet => std::option::Option::Some(2),
13356                    Self::GoogleCloud => std::option::Option::Some(3),
13357                    Self::UnknownValue(u) => u.0.value(),
13358                }
13359            }
13360
13361            /// Gets the enum value as a string.
13362            ///
13363            /// Returns `None` if the enum contains an unknown value deserialized from
13364            /// the integer representation of enums.
13365            pub fn name(&self) -> std::option::Option<&str> {
13366                match self {
13367                    Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
13368                    Self::Intranet => std::option::Option::Some("INTRANET"),
13369                    Self::Internet => std::option::Option::Some("INTERNET"),
13370                    Self::GoogleCloud => std::option::Option::Some("GOOGLE_CLOUD"),
13371                    Self::UnknownValue(u) => u.0.name(),
13372                }
13373            }
13374        }
13375
13376        impl std::default::Default for Type {
13377            fn default() -> Self {
13378                use std::convert::From;
13379                Self::from(0)
13380            }
13381        }
13382
13383        impl std::fmt::Display for Type {
13384            fn fmt(
13385                &self,
13386                f: &mut std::fmt::Formatter<'_>,
13387            ) -> std::result::Result<(), std::fmt::Error> {
13388                wkt::internal::display_enum(f, self.name(), self.value())
13389            }
13390        }
13391
13392        impl std::convert::From<i32> for Type {
13393            fn from(value: i32) -> Self {
13394                match value {
13395                    0 => Self::Unspecified,
13396                    1 => Self::Intranet,
13397                    2 => Self::Internet,
13398                    3 => Self::GoogleCloud,
13399                    _ => Self::UnknownValue(r#type::UnknownValue(
13400                        wkt::internal::UnknownEnumValue::Integer(value),
13401                    )),
13402                }
13403            }
13404        }
13405
13406        impl std::convert::From<&str> for Type {
13407            fn from(value: &str) -> Self {
13408                use std::string::ToString;
13409                match value {
13410                    "TYPE_UNSPECIFIED" => Self::Unspecified,
13411                    "INTRANET" => Self::Intranet,
13412                    "INTERNET" => Self::Internet,
13413                    "GOOGLE_CLOUD" => Self::GoogleCloud,
13414                    _ => Self::UnknownValue(r#type::UnknownValue(
13415                        wkt::internal::UnknownEnumValue::String(value.to_string()),
13416                    )),
13417                }
13418            }
13419        }
13420
13421        impl serde::ser::Serialize for Type {
13422            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13423            where
13424                S: serde::Serializer,
13425            {
13426                match self {
13427                    Self::Unspecified => serializer.serialize_i32(0),
13428                    Self::Intranet => serializer.serialize_i32(1),
13429                    Self::Internet => serializer.serialize_i32(2),
13430                    Self::GoogleCloud => serializer.serialize_i32(3),
13431                    Self::UnknownValue(u) => u.0.serialize(serializer),
13432                }
13433            }
13434        }
13435
13436        impl<'de> serde::de::Deserialize<'de> for Type {
13437            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13438            where
13439                D: serde::Deserializer<'de>,
13440            {
13441                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
13442                    ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.VpcNetwork.Type",
13443                ))
13444            }
13445        }
13446    }
13447
13448    /// Enum State defines possible states of VMware Engine network.
13449    ///
13450    /// # Working with unknown values
13451    ///
13452    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13453    /// additional enum variants at any time. Adding new variants is not considered
13454    /// a breaking change. Applications should write their code in anticipation of:
13455    ///
13456    /// - New values appearing in future releases of the client library, **and**
13457    /// - New values received dynamically, without application changes.
13458    ///
13459    /// Please consult the [Working with enums] section in the user guide for some
13460    /// guidelines.
13461    ///
13462    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13463    #[derive(Clone, Debug, PartialEq)]
13464    #[non_exhaustive]
13465    pub enum State {
13466        /// The default value. This value is used if the state is omitted.
13467        Unspecified,
13468        /// The VMware Engine network is being created.
13469        Creating,
13470        /// The VMware Engine network is ready.
13471        Active,
13472        /// The VMware Engine network is being updated.
13473        Updating,
13474        /// The VMware Engine network is being deleted.
13475        Deleting,
13476        /// If set, the enum was initialized with an unknown value.
13477        ///
13478        /// Applications can examine the value using [State::value] or
13479        /// [State::name].
13480        UnknownValue(state::UnknownValue),
13481    }
13482
13483    #[doc(hidden)]
13484    pub mod state {
13485        #[allow(unused_imports)]
13486        use super::*;
13487        #[derive(Clone, Debug, PartialEq)]
13488        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13489    }
13490
13491    impl State {
13492        /// Gets the enum value.
13493        ///
13494        /// Returns `None` if the enum contains an unknown value deserialized from
13495        /// the string representation of enums.
13496        pub fn value(&self) -> std::option::Option<i32> {
13497            match self {
13498                Self::Unspecified => std::option::Option::Some(0),
13499                Self::Creating => std::option::Option::Some(1),
13500                Self::Active => std::option::Option::Some(2),
13501                Self::Updating => std::option::Option::Some(3),
13502                Self::Deleting => std::option::Option::Some(4),
13503                Self::UnknownValue(u) => u.0.value(),
13504            }
13505        }
13506
13507        /// Gets the enum value as a string.
13508        ///
13509        /// Returns `None` if the enum contains an unknown value deserialized from
13510        /// the integer representation of enums.
13511        pub fn name(&self) -> std::option::Option<&str> {
13512            match self {
13513                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
13514                Self::Creating => std::option::Option::Some("CREATING"),
13515                Self::Active => std::option::Option::Some("ACTIVE"),
13516                Self::Updating => std::option::Option::Some("UPDATING"),
13517                Self::Deleting => std::option::Option::Some("DELETING"),
13518                Self::UnknownValue(u) => u.0.name(),
13519            }
13520        }
13521    }
13522
13523    impl std::default::Default for State {
13524        fn default() -> Self {
13525            use std::convert::From;
13526            Self::from(0)
13527        }
13528    }
13529
13530    impl std::fmt::Display for State {
13531        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13532            wkt::internal::display_enum(f, self.name(), self.value())
13533        }
13534    }
13535
13536    impl std::convert::From<i32> for State {
13537        fn from(value: i32) -> Self {
13538            match value {
13539                0 => Self::Unspecified,
13540                1 => Self::Creating,
13541                2 => Self::Active,
13542                3 => Self::Updating,
13543                4 => Self::Deleting,
13544                _ => Self::UnknownValue(state::UnknownValue(
13545                    wkt::internal::UnknownEnumValue::Integer(value),
13546                )),
13547            }
13548        }
13549    }
13550
13551    impl std::convert::From<&str> for State {
13552        fn from(value: &str) -> Self {
13553            use std::string::ToString;
13554            match value {
13555                "STATE_UNSPECIFIED" => Self::Unspecified,
13556                "CREATING" => Self::Creating,
13557                "ACTIVE" => Self::Active,
13558                "UPDATING" => Self::Updating,
13559                "DELETING" => Self::Deleting,
13560                _ => Self::UnknownValue(state::UnknownValue(
13561                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13562                )),
13563            }
13564        }
13565    }
13566
13567    impl serde::ser::Serialize for State {
13568        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13569        where
13570            S: serde::Serializer,
13571        {
13572            match self {
13573                Self::Unspecified => serializer.serialize_i32(0),
13574                Self::Creating => serializer.serialize_i32(1),
13575                Self::Active => serializer.serialize_i32(2),
13576                Self::Updating => serializer.serialize_i32(3),
13577                Self::Deleting => serializer.serialize_i32(4),
13578                Self::UnknownValue(u) => u.0.serialize(serializer),
13579            }
13580        }
13581    }
13582
13583    impl<'de> serde::de::Deserialize<'de> for State {
13584        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13585        where
13586            D: serde::Deserializer<'de>,
13587        {
13588            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
13589                ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.State",
13590            ))
13591        }
13592    }
13593
13594    /// Enum Type defines possible types of VMware Engine network.
13595    ///
13596    /// # Working with unknown values
13597    ///
13598    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13599    /// additional enum variants at any time. Adding new variants is not considered
13600    /// a breaking change. Applications should write their code in anticipation of:
13601    ///
13602    /// - New values appearing in future releases of the client library, **and**
13603    /// - New values received dynamically, without application changes.
13604    ///
13605    /// Please consult the [Working with enums] section in the user guide for some
13606    /// guidelines.
13607    ///
13608    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13609    #[derive(Clone, Debug, PartialEq)]
13610    #[non_exhaustive]
13611    pub enum Type {
13612        /// The default value. This value should never be used.
13613        Unspecified,
13614        /// Network type used by private clouds created in projects without a network
13615        /// of type `STANDARD`. This network type is no longer used for new VMware
13616        /// Engine private cloud deployments.
13617        Legacy,
13618        /// Standard network type used for private cloud connectivity.
13619        Standard,
13620        /// If set, the enum was initialized with an unknown value.
13621        ///
13622        /// Applications can examine the value using [Type::value] or
13623        /// [Type::name].
13624        UnknownValue(r#type::UnknownValue),
13625    }
13626
13627    #[doc(hidden)]
13628    pub mod r#type {
13629        #[allow(unused_imports)]
13630        use super::*;
13631        #[derive(Clone, Debug, PartialEq)]
13632        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13633    }
13634
13635    impl Type {
13636        /// Gets the enum value.
13637        ///
13638        /// Returns `None` if the enum contains an unknown value deserialized from
13639        /// the string representation of enums.
13640        pub fn value(&self) -> std::option::Option<i32> {
13641            match self {
13642                Self::Unspecified => std::option::Option::Some(0),
13643                Self::Legacy => std::option::Option::Some(1),
13644                Self::Standard => std::option::Option::Some(2),
13645                Self::UnknownValue(u) => u.0.value(),
13646            }
13647        }
13648
13649        /// Gets the enum value as a string.
13650        ///
13651        /// Returns `None` if the enum contains an unknown value deserialized from
13652        /// the integer representation of enums.
13653        pub fn name(&self) -> std::option::Option<&str> {
13654            match self {
13655                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
13656                Self::Legacy => std::option::Option::Some("LEGACY"),
13657                Self::Standard => std::option::Option::Some("STANDARD"),
13658                Self::UnknownValue(u) => u.0.name(),
13659            }
13660        }
13661    }
13662
13663    impl std::default::Default for Type {
13664        fn default() -> Self {
13665            use std::convert::From;
13666            Self::from(0)
13667        }
13668    }
13669
13670    impl std::fmt::Display for Type {
13671        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
13672            wkt::internal::display_enum(f, self.name(), self.value())
13673        }
13674    }
13675
13676    impl std::convert::From<i32> for Type {
13677        fn from(value: i32) -> Self {
13678            match value {
13679                0 => Self::Unspecified,
13680                1 => Self::Legacy,
13681                2 => Self::Standard,
13682                _ => Self::UnknownValue(r#type::UnknownValue(
13683                    wkt::internal::UnknownEnumValue::Integer(value),
13684                )),
13685            }
13686        }
13687    }
13688
13689    impl std::convert::From<&str> for Type {
13690        fn from(value: &str) -> Self {
13691            use std::string::ToString;
13692            match value {
13693                "TYPE_UNSPECIFIED" => Self::Unspecified,
13694                "LEGACY" => Self::Legacy,
13695                "STANDARD" => Self::Standard,
13696                _ => Self::UnknownValue(r#type::UnknownValue(
13697                    wkt::internal::UnknownEnumValue::String(value.to_string()),
13698                )),
13699            }
13700        }
13701    }
13702
13703    impl serde::ser::Serialize for Type {
13704        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
13705        where
13706            S: serde::Serializer,
13707        {
13708            match self {
13709                Self::Unspecified => serializer.serialize_i32(0),
13710                Self::Legacy => serializer.serialize_i32(1),
13711                Self::Standard => serializer.serialize_i32(2),
13712                Self::UnknownValue(u) => u.0.serialize(serializer),
13713            }
13714        }
13715    }
13716
13717    impl<'de> serde::de::Deserialize<'de> for Type {
13718        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
13719        where
13720            D: serde::Deserializer<'de>,
13721        {
13722            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
13723                ".google.cloud.vmwareengine.v1.VmwareEngineNetwork.Type",
13724            ))
13725        }
13726    }
13727}
13728
13729/// Private connection resource that provides connectivity for VMware Engine
13730/// private clouds.
13731#[derive(Clone, Default, PartialEq)]
13732#[non_exhaustive]
13733pub struct PrivateConnection {
13734    /// Output only. The resource name of the private connection.
13735    /// Resource names are schemeless URIs that follow the conventions in
13736    /// <https://cloud.google.com/apis/design/resource_names>.
13737    /// For example:
13738    /// `projects/my-project/locations/us-central1/privateConnections/my-connection`
13739    pub name: std::string::String,
13740
13741    /// Output only. Creation time of this resource.
13742    pub create_time: std::option::Option<wkt::Timestamp>,
13743
13744    /// Output only. Last update time of this resource.
13745    pub update_time: std::option::Option<wkt::Timestamp>,
13746
13747    /// Optional. User-provided description for this private connection.
13748    pub description: std::string::String,
13749
13750    /// Output only. State of the private connection.
13751    pub state: crate::model::private_connection::State,
13752
13753    /// Required. The relative resource name of Legacy VMware Engine network.
13754    /// Specify the name in the following form:
13755    /// `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
13756    /// where `{project}`, `{location}` will be same as specified in private
13757    /// connection resource name and `{vmware_engine_network_id}` will be in the
13758    /// form of `{location}`-default e.g.
13759    /// projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default.
13760    pub vmware_engine_network: std::string::String,
13761
13762    /// Output only. The canonical name of the VMware Engine network in the form:
13763    /// `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
13764    pub vmware_engine_network_canonical: std::string::String,
13765
13766    /// Required. Private connection type.
13767    pub r#type: crate::model::private_connection::Type,
13768
13769    /// Output only. VPC network peering id between given network VPC and
13770    /// VMwareEngineNetwork.
13771    pub peering_id: std::string::String,
13772
13773    /// Optional. Routing Mode.
13774    /// Default value is set to GLOBAL.
13775    /// For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or
13776    /// REGIONAL, for other types only GLOBAL is supported.
13777    pub routing_mode: crate::model::private_connection::RoutingMode,
13778
13779    /// Output only. System-generated unique identifier for the resource.
13780    pub uid: std::string::String,
13781
13782    /// Required. Service network to create private connection.
13783    /// Specify the name in the following form:
13784    /// `projects/{project}/global/networks/{network_id}`
13785    /// For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking
13786    /// VPC, e.g. projects/project-tp/global/networks/servicenetworking.
13787    /// For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC,
13788    /// e.g. projects/project-tp/global/networks/netapp-tenant-vpc.
13789    /// For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g.
13790    /// projects/project-tp/global/networks/dell-tenant-vpc.
13791    /// For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or
13792    /// any other producer VPC to which the VMware Engine Network needs to be
13793    /// connected, e.g. projects/project/global/networks/vpc.
13794    pub service_network: std::string::String,
13795
13796    /// Output only. Peering state between service network and VMware Engine
13797    /// network.
13798    pub peering_state: crate::model::private_connection::PeeringState,
13799
13800    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
13801}
13802
13803impl PrivateConnection {
13804    pub fn new() -> Self {
13805        std::default::Default::default()
13806    }
13807
13808    /// Sets the value of [name][crate::model::PrivateConnection::name].
13809    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13810        self.name = v.into();
13811        self
13812    }
13813
13814    /// Sets the value of [create_time][crate::model::PrivateConnection::create_time].
13815    pub fn set_create_time<T>(mut self, v: T) -> Self
13816    where
13817        T: std::convert::Into<wkt::Timestamp>,
13818    {
13819        self.create_time = std::option::Option::Some(v.into());
13820        self
13821    }
13822
13823    /// Sets or clears the value of [create_time][crate::model::PrivateConnection::create_time].
13824    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
13825    where
13826        T: std::convert::Into<wkt::Timestamp>,
13827    {
13828        self.create_time = v.map(|x| x.into());
13829        self
13830    }
13831
13832    /// Sets the value of [update_time][crate::model::PrivateConnection::update_time].
13833    pub fn set_update_time<T>(mut self, v: T) -> Self
13834    where
13835        T: std::convert::Into<wkt::Timestamp>,
13836    {
13837        self.update_time = std::option::Option::Some(v.into());
13838        self
13839    }
13840
13841    /// Sets or clears the value of [update_time][crate::model::PrivateConnection::update_time].
13842    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
13843    where
13844        T: std::convert::Into<wkt::Timestamp>,
13845    {
13846        self.update_time = v.map(|x| x.into());
13847        self
13848    }
13849
13850    /// Sets the value of [description][crate::model::PrivateConnection::description].
13851    pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13852        self.description = v.into();
13853        self
13854    }
13855
13856    /// Sets the value of [state][crate::model::PrivateConnection::state].
13857    pub fn set_state<T: std::convert::Into<crate::model::private_connection::State>>(
13858        mut self,
13859        v: T,
13860    ) -> Self {
13861        self.state = v.into();
13862        self
13863    }
13864
13865    /// Sets the value of [vmware_engine_network][crate::model::PrivateConnection::vmware_engine_network].
13866    pub fn set_vmware_engine_network<T: std::convert::Into<std::string::String>>(
13867        mut self,
13868        v: T,
13869    ) -> Self {
13870        self.vmware_engine_network = v.into();
13871        self
13872    }
13873
13874    /// Sets the value of [vmware_engine_network_canonical][crate::model::PrivateConnection::vmware_engine_network_canonical].
13875    pub fn set_vmware_engine_network_canonical<T: std::convert::Into<std::string::String>>(
13876        mut self,
13877        v: T,
13878    ) -> Self {
13879        self.vmware_engine_network_canonical = v.into();
13880        self
13881    }
13882
13883    /// Sets the value of [r#type][crate::model::PrivateConnection::type].
13884    pub fn set_type<T: std::convert::Into<crate::model::private_connection::Type>>(
13885        mut self,
13886        v: T,
13887    ) -> Self {
13888        self.r#type = v.into();
13889        self
13890    }
13891
13892    /// Sets the value of [peering_id][crate::model::PrivateConnection::peering_id].
13893    pub fn set_peering_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13894        self.peering_id = v.into();
13895        self
13896    }
13897
13898    /// Sets the value of [routing_mode][crate::model::PrivateConnection::routing_mode].
13899    pub fn set_routing_mode<
13900        T: std::convert::Into<crate::model::private_connection::RoutingMode>,
13901    >(
13902        mut self,
13903        v: T,
13904    ) -> Self {
13905        self.routing_mode = v.into();
13906        self
13907    }
13908
13909    /// Sets the value of [uid][crate::model::PrivateConnection::uid].
13910    pub fn set_uid<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13911        self.uid = v.into();
13912        self
13913    }
13914
13915    /// Sets the value of [service_network][crate::model::PrivateConnection::service_network].
13916    pub fn set_service_network<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
13917        self.service_network = v.into();
13918        self
13919    }
13920
13921    /// Sets the value of [peering_state][crate::model::PrivateConnection::peering_state].
13922    pub fn set_peering_state<
13923        T: std::convert::Into<crate::model::private_connection::PeeringState>,
13924    >(
13925        mut self,
13926        v: T,
13927    ) -> Self {
13928        self.peering_state = v.into();
13929        self
13930    }
13931}
13932
13933impl wkt::message::Message for PrivateConnection {
13934    fn typename() -> &'static str {
13935        "type.googleapis.com/google.cloud.vmwareengine.v1.PrivateConnection"
13936    }
13937}
13938
13939/// Defines additional types related to [PrivateConnection].
13940pub mod private_connection {
13941    #[allow(unused_imports)]
13942    use super::*;
13943
13944    /// Enum State defines possible states of private connection.
13945    ///
13946    /// # Working with unknown values
13947    ///
13948    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
13949    /// additional enum variants at any time. Adding new variants is not considered
13950    /// a breaking change. Applications should write their code in anticipation of:
13951    ///
13952    /// - New values appearing in future releases of the client library, **and**
13953    /// - New values received dynamically, without application changes.
13954    ///
13955    /// Please consult the [Working with enums] section in the user guide for some
13956    /// guidelines.
13957    ///
13958    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
13959    #[derive(Clone, Debug, PartialEq)]
13960    #[non_exhaustive]
13961    pub enum State {
13962        /// The default value. This value is used if the state is omitted.
13963        Unspecified,
13964        /// The private connection is being created.
13965        Creating,
13966        /// The private connection is ready.
13967        Active,
13968        /// The private connection is being updated.
13969        Updating,
13970        /// The private connection is being deleted.
13971        Deleting,
13972        /// The private connection is not provisioned, since no private cloud is
13973        /// present for which this private connection is needed.
13974        Unprovisioned,
13975        /// The private connection is in failed state.
13976        Failed,
13977        /// If set, the enum was initialized with an unknown value.
13978        ///
13979        /// Applications can examine the value using [State::value] or
13980        /// [State::name].
13981        UnknownValue(state::UnknownValue),
13982    }
13983
13984    #[doc(hidden)]
13985    pub mod state {
13986        #[allow(unused_imports)]
13987        use super::*;
13988        #[derive(Clone, Debug, PartialEq)]
13989        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
13990    }
13991
13992    impl State {
13993        /// Gets the enum value.
13994        ///
13995        /// Returns `None` if the enum contains an unknown value deserialized from
13996        /// the string representation of enums.
13997        pub fn value(&self) -> std::option::Option<i32> {
13998            match self {
13999                Self::Unspecified => std::option::Option::Some(0),
14000                Self::Creating => std::option::Option::Some(1),
14001                Self::Active => std::option::Option::Some(2),
14002                Self::Updating => std::option::Option::Some(3),
14003                Self::Deleting => std::option::Option::Some(4),
14004                Self::Unprovisioned => std::option::Option::Some(5),
14005                Self::Failed => std::option::Option::Some(6),
14006                Self::UnknownValue(u) => u.0.value(),
14007            }
14008        }
14009
14010        /// Gets the enum value as a string.
14011        ///
14012        /// Returns `None` if the enum contains an unknown value deserialized from
14013        /// the integer representation of enums.
14014        pub fn name(&self) -> std::option::Option<&str> {
14015            match self {
14016                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
14017                Self::Creating => std::option::Option::Some("CREATING"),
14018                Self::Active => std::option::Option::Some("ACTIVE"),
14019                Self::Updating => std::option::Option::Some("UPDATING"),
14020                Self::Deleting => std::option::Option::Some("DELETING"),
14021                Self::Unprovisioned => std::option::Option::Some("UNPROVISIONED"),
14022                Self::Failed => std::option::Option::Some("FAILED"),
14023                Self::UnknownValue(u) => u.0.name(),
14024            }
14025        }
14026    }
14027
14028    impl std::default::Default for State {
14029        fn default() -> Self {
14030            use std::convert::From;
14031            Self::from(0)
14032        }
14033    }
14034
14035    impl std::fmt::Display for State {
14036        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14037            wkt::internal::display_enum(f, self.name(), self.value())
14038        }
14039    }
14040
14041    impl std::convert::From<i32> for State {
14042        fn from(value: i32) -> Self {
14043            match value {
14044                0 => Self::Unspecified,
14045                1 => Self::Creating,
14046                2 => Self::Active,
14047                3 => Self::Updating,
14048                4 => Self::Deleting,
14049                5 => Self::Unprovisioned,
14050                6 => Self::Failed,
14051                _ => Self::UnknownValue(state::UnknownValue(
14052                    wkt::internal::UnknownEnumValue::Integer(value),
14053                )),
14054            }
14055        }
14056    }
14057
14058    impl std::convert::From<&str> for State {
14059        fn from(value: &str) -> Self {
14060            use std::string::ToString;
14061            match value {
14062                "STATE_UNSPECIFIED" => Self::Unspecified,
14063                "CREATING" => Self::Creating,
14064                "ACTIVE" => Self::Active,
14065                "UPDATING" => Self::Updating,
14066                "DELETING" => Self::Deleting,
14067                "UNPROVISIONED" => Self::Unprovisioned,
14068                "FAILED" => Self::Failed,
14069                _ => Self::UnknownValue(state::UnknownValue(
14070                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14071                )),
14072            }
14073        }
14074    }
14075
14076    impl serde::ser::Serialize for State {
14077        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14078        where
14079            S: serde::Serializer,
14080        {
14081            match self {
14082                Self::Unspecified => serializer.serialize_i32(0),
14083                Self::Creating => serializer.serialize_i32(1),
14084                Self::Active => serializer.serialize_i32(2),
14085                Self::Updating => serializer.serialize_i32(3),
14086                Self::Deleting => serializer.serialize_i32(4),
14087                Self::Unprovisioned => serializer.serialize_i32(5),
14088                Self::Failed => serializer.serialize_i32(6),
14089                Self::UnknownValue(u) => u.0.serialize(serializer),
14090            }
14091        }
14092    }
14093
14094    impl<'de> serde::de::Deserialize<'de> for State {
14095        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14096        where
14097            D: serde::Deserializer<'de>,
14098        {
14099            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
14100                ".google.cloud.vmwareengine.v1.PrivateConnection.State",
14101            ))
14102        }
14103    }
14104
14105    /// Enum Type defines possible types of private connection.
14106    ///
14107    /// # Working with unknown values
14108    ///
14109    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14110    /// additional enum variants at any time. Adding new variants is not considered
14111    /// a breaking change. Applications should write their code in anticipation of:
14112    ///
14113    /// - New values appearing in future releases of the client library, **and**
14114    /// - New values received dynamically, without application changes.
14115    ///
14116    /// Please consult the [Working with enums] section in the user guide for some
14117    /// guidelines.
14118    ///
14119    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14120    #[derive(Clone, Debug, PartialEq)]
14121    #[non_exhaustive]
14122    pub enum Type {
14123        /// The default value. This value should never be used.
14124        Unspecified,
14125        /// Connection used for establishing [private services
14126        /// access](https://cloud.google.com/vpc/docs/private-services-access).
14127        PrivateServiceAccess,
14128        /// Connection used for connecting to NetApp Cloud Volumes.
14129        NetappCloudVolumes,
14130        /// Connection used for connecting to Dell PowerScale.
14131        DellPowerscale,
14132        /// Connection used for connecting to third-party services.
14133        ThirdPartyService,
14134        /// If set, the enum was initialized with an unknown value.
14135        ///
14136        /// Applications can examine the value using [Type::value] or
14137        /// [Type::name].
14138        UnknownValue(r#type::UnknownValue),
14139    }
14140
14141    #[doc(hidden)]
14142    pub mod r#type {
14143        #[allow(unused_imports)]
14144        use super::*;
14145        #[derive(Clone, Debug, PartialEq)]
14146        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14147    }
14148
14149    impl Type {
14150        /// Gets the enum value.
14151        ///
14152        /// Returns `None` if the enum contains an unknown value deserialized from
14153        /// the string representation of enums.
14154        pub fn value(&self) -> std::option::Option<i32> {
14155            match self {
14156                Self::Unspecified => std::option::Option::Some(0),
14157                Self::PrivateServiceAccess => std::option::Option::Some(1),
14158                Self::NetappCloudVolumes => std::option::Option::Some(2),
14159                Self::DellPowerscale => std::option::Option::Some(3),
14160                Self::ThirdPartyService => std::option::Option::Some(4),
14161                Self::UnknownValue(u) => u.0.value(),
14162            }
14163        }
14164
14165        /// Gets the enum value as a string.
14166        ///
14167        /// Returns `None` if the enum contains an unknown value deserialized from
14168        /// the integer representation of enums.
14169        pub fn name(&self) -> std::option::Option<&str> {
14170            match self {
14171                Self::Unspecified => std::option::Option::Some("TYPE_UNSPECIFIED"),
14172                Self::PrivateServiceAccess => std::option::Option::Some("PRIVATE_SERVICE_ACCESS"),
14173                Self::NetappCloudVolumes => std::option::Option::Some("NETAPP_CLOUD_VOLUMES"),
14174                Self::DellPowerscale => std::option::Option::Some("DELL_POWERSCALE"),
14175                Self::ThirdPartyService => std::option::Option::Some("THIRD_PARTY_SERVICE"),
14176                Self::UnknownValue(u) => u.0.name(),
14177            }
14178        }
14179    }
14180
14181    impl std::default::Default for Type {
14182        fn default() -> Self {
14183            use std::convert::From;
14184            Self::from(0)
14185        }
14186    }
14187
14188    impl std::fmt::Display for Type {
14189        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14190            wkt::internal::display_enum(f, self.name(), self.value())
14191        }
14192    }
14193
14194    impl std::convert::From<i32> for Type {
14195        fn from(value: i32) -> Self {
14196            match value {
14197                0 => Self::Unspecified,
14198                1 => Self::PrivateServiceAccess,
14199                2 => Self::NetappCloudVolumes,
14200                3 => Self::DellPowerscale,
14201                4 => Self::ThirdPartyService,
14202                _ => Self::UnknownValue(r#type::UnknownValue(
14203                    wkt::internal::UnknownEnumValue::Integer(value),
14204                )),
14205            }
14206        }
14207    }
14208
14209    impl std::convert::From<&str> for Type {
14210        fn from(value: &str) -> Self {
14211            use std::string::ToString;
14212            match value {
14213                "TYPE_UNSPECIFIED" => Self::Unspecified,
14214                "PRIVATE_SERVICE_ACCESS" => Self::PrivateServiceAccess,
14215                "NETAPP_CLOUD_VOLUMES" => Self::NetappCloudVolumes,
14216                "DELL_POWERSCALE" => Self::DellPowerscale,
14217                "THIRD_PARTY_SERVICE" => Self::ThirdPartyService,
14218                _ => Self::UnknownValue(r#type::UnknownValue(
14219                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14220                )),
14221            }
14222        }
14223    }
14224
14225    impl serde::ser::Serialize for Type {
14226        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14227        where
14228            S: serde::Serializer,
14229        {
14230            match self {
14231                Self::Unspecified => serializer.serialize_i32(0),
14232                Self::PrivateServiceAccess => serializer.serialize_i32(1),
14233                Self::NetappCloudVolumes => serializer.serialize_i32(2),
14234                Self::DellPowerscale => serializer.serialize_i32(3),
14235                Self::ThirdPartyService => serializer.serialize_i32(4),
14236                Self::UnknownValue(u) => u.0.serialize(serializer),
14237            }
14238        }
14239    }
14240
14241    impl<'de> serde::de::Deserialize<'de> for Type {
14242        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14243        where
14244            D: serde::Deserializer<'de>,
14245        {
14246            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Type>::new(
14247                ".google.cloud.vmwareengine.v1.PrivateConnection.Type",
14248            ))
14249        }
14250    }
14251
14252    /// Possible types for RoutingMode
14253    ///
14254    /// # Working with unknown values
14255    ///
14256    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14257    /// additional enum variants at any time. Adding new variants is not considered
14258    /// a breaking change. Applications should write their code in anticipation of:
14259    ///
14260    /// - New values appearing in future releases of the client library, **and**
14261    /// - New values received dynamically, without application changes.
14262    ///
14263    /// Please consult the [Working with enums] section in the user guide for some
14264    /// guidelines.
14265    ///
14266    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14267    #[derive(Clone, Debug, PartialEq)]
14268    #[non_exhaustive]
14269    pub enum RoutingMode {
14270        /// The default value. This value should never be used.
14271        Unspecified,
14272        /// Global Routing Mode
14273        Global,
14274        /// Regional Routing Mode
14275        Regional,
14276        /// If set, the enum was initialized with an unknown value.
14277        ///
14278        /// Applications can examine the value using [RoutingMode::value] or
14279        /// [RoutingMode::name].
14280        UnknownValue(routing_mode::UnknownValue),
14281    }
14282
14283    #[doc(hidden)]
14284    pub mod routing_mode {
14285        #[allow(unused_imports)]
14286        use super::*;
14287        #[derive(Clone, Debug, PartialEq)]
14288        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14289    }
14290
14291    impl RoutingMode {
14292        /// Gets the enum value.
14293        ///
14294        /// Returns `None` if the enum contains an unknown value deserialized from
14295        /// the string representation of enums.
14296        pub fn value(&self) -> std::option::Option<i32> {
14297            match self {
14298                Self::Unspecified => std::option::Option::Some(0),
14299                Self::Global => std::option::Option::Some(1),
14300                Self::Regional => std::option::Option::Some(2),
14301                Self::UnknownValue(u) => u.0.value(),
14302            }
14303        }
14304
14305        /// Gets the enum value as a string.
14306        ///
14307        /// Returns `None` if the enum contains an unknown value deserialized from
14308        /// the integer representation of enums.
14309        pub fn name(&self) -> std::option::Option<&str> {
14310            match self {
14311                Self::Unspecified => std::option::Option::Some("ROUTING_MODE_UNSPECIFIED"),
14312                Self::Global => std::option::Option::Some("GLOBAL"),
14313                Self::Regional => std::option::Option::Some("REGIONAL"),
14314                Self::UnknownValue(u) => u.0.name(),
14315            }
14316        }
14317    }
14318
14319    impl std::default::Default for RoutingMode {
14320        fn default() -> Self {
14321            use std::convert::From;
14322            Self::from(0)
14323        }
14324    }
14325
14326    impl std::fmt::Display for RoutingMode {
14327        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14328            wkt::internal::display_enum(f, self.name(), self.value())
14329        }
14330    }
14331
14332    impl std::convert::From<i32> for RoutingMode {
14333        fn from(value: i32) -> Self {
14334            match value {
14335                0 => Self::Unspecified,
14336                1 => Self::Global,
14337                2 => Self::Regional,
14338                _ => Self::UnknownValue(routing_mode::UnknownValue(
14339                    wkt::internal::UnknownEnumValue::Integer(value),
14340                )),
14341            }
14342        }
14343    }
14344
14345    impl std::convert::From<&str> for RoutingMode {
14346        fn from(value: &str) -> Self {
14347            use std::string::ToString;
14348            match value {
14349                "ROUTING_MODE_UNSPECIFIED" => Self::Unspecified,
14350                "GLOBAL" => Self::Global,
14351                "REGIONAL" => Self::Regional,
14352                _ => Self::UnknownValue(routing_mode::UnknownValue(
14353                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14354                )),
14355            }
14356        }
14357    }
14358
14359    impl serde::ser::Serialize for RoutingMode {
14360        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14361        where
14362            S: serde::Serializer,
14363        {
14364            match self {
14365                Self::Unspecified => serializer.serialize_i32(0),
14366                Self::Global => serializer.serialize_i32(1),
14367                Self::Regional => serializer.serialize_i32(2),
14368                Self::UnknownValue(u) => u.0.serialize(serializer),
14369            }
14370        }
14371    }
14372
14373    impl<'de> serde::de::Deserialize<'de> for RoutingMode {
14374        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14375        where
14376            D: serde::Deserializer<'de>,
14377        {
14378            deserializer.deserialize_any(wkt::internal::EnumVisitor::<RoutingMode>::new(
14379                ".google.cloud.vmwareengine.v1.PrivateConnection.RoutingMode",
14380            ))
14381        }
14382    }
14383
14384    /// Enum PeeringState defines the possible states of peering between service
14385    /// network and the vpc network peered to service network
14386    ///
14387    /// # Working with unknown values
14388    ///
14389    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14390    /// additional enum variants at any time. Adding new variants is not considered
14391    /// a breaking change. Applications should write their code in anticipation of:
14392    ///
14393    /// - New values appearing in future releases of the client library, **and**
14394    /// - New values received dynamically, without application changes.
14395    ///
14396    /// Please consult the [Working with enums] section in the user guide for some
14397    /// guidelines.
14398    ///
14399    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14400    #[derive(Clone, Debug, PartialEq)]
14401    #[non_exhaustive]
14402    pub enum PeeringState {
14403        /// The default value. This value is used if the peering state is omitted or
14404        /// unknown.
14405        Unspecified,
14406        /// The peering is in active state.
14407        PeeringActive,
14408        /// The peering is in inactive state.
14409        PeeringInactive,
14410        /// If set, the enum was initialized with an unknown value.
14411        ///
14412        /// Applications can examine the value using [PeeringState::value] or
14413        /// [PeeringState::name].
14414        UnknownValue(peering_state::UnknownValue),
14415    }
14416
14417    #[doc(hidden)]
14418    pub mod peering_state {
14419        #[allow(unused_imports)]
14420        use super::*;
14421        #[derive(Clone, Debug, PartialEq)]
14422        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14423    }
14424
14425    impl PeeringState {
14426        /// Gets the enum value.
14427        ///
14428        /// Returns `None` if the enum contains an unknown value deserialized from
14429        /// the string representation of enums.
14430        pub fn value(&self) -> std::option::Option<i32> {
14431            match self {
14432                Self::Unspecified => std::option::Option::Some(0),
14433                Self::PeeringActive => std::option::Option::Some(1),
14434                Self::PeeringInactive => std::option::Option::Some(2),
14435                Self::UnknownValue(u) => u.0.value(),
14436            }
14437        }
14438
14439        /// Gets the enum value as a string.
14440        ///
14441        /// Returns `None` if the enum contains an unknown value deserialized from
14442        /// the integer representation of enums.
14443        pub fn name(&self) -> std::option::Option<&str> {
14444            match self {
14445                Self::Unspecified => std::option::Option::Some("PEERING_STATE_UNSPECIFIED"),
14446                Self::PeeringActive => std::option::Option::Some("PEERING_ACTIVE"),
14447                Self::PeeringInactive => std::option::Option::Some("PEERING_INACTIVE"),
14448                Self::UnknownValue(u) => u.0.name(),
14449            }
14450        }
14451    }
14452
14453    impl std::default::Default for PeeringState {
14454        fn default() -> Self {
14455            use std::convert::From;
14456            Self::from(0)
14457        }
14458    }
14459
14460    impl std::fmt::Display for PeeringState {
14461        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14462            wkt::internal::display_enum(f, self.name(), self.value())
14463        }
14464    }
14465
14466    impl std::convert::From<i32> for PeeringState {
14467        fn from(value: i32) -> Self {
14468            match value {
14469                0 => Self::Unspecified,
14470                1 => Self::PeeringActive,
14471                2 => Self::PeeringInactive,
14472                _ => Self::UnknownValue(peering_state::UnknownValue(
14473                    wkt::internal::UnknownEnumValue::Integer(value),
14474                )),
14475            }
14476        }
14477    }
14478
14479    impl std::convert::From<&str> for PeeringState {
14480        fn from(value: &str) -> Self {
14481            use std::string::ToString;
14482            match value {
14483                "PEERING_STATE_UNSPECIFIED" => Self::Unspecified,
14484                "PEERING_ACTIVE" => Self::PeeringActive,
14485                "PEERING_INACTIVE" => Self::PeeringInactive,
14486                _ => Self::UnknownValue(peering_state::UnknownValue(
14487                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14488                )),
14489            }
14490        }
14491    }
14492
14493    impl serde::ser::Serialize for PeeringState {
14494        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14495        where
14496            S: serde::Serializer,
14497        {
14498            match self {
14499                Self::Unspecified => serializer.serialize_i32(0),
14500                Self::PeeringActive => serializer.serialize_i32(1),
14501                Self::PeeringInactive => serializer.serialize_i32(2),
14502                Self::UnknownValue(u) => u.0.serialize(serializer),
14503            }
14504        }
14505    }
14506
14507    impl<'de> serde::de::Deserialize<'de> for PeeringState {
14508        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14509        where
14510            D: serde::Deserializer<'de>,
14511        {
14512            deserializer.deserialize_any(wkt::internal::EnumVisitor::<PeeringState>::new(
14513                ".google.cloud.vmwareengine.v1.PrivateConnection.PeeringState",
14514            ))
14515        }
14516    }
14517}
14518
14519/// VmwareEngine specific metadata for the given
14520/// [google.cloud.location.Location][google.cloud.location.Location]. It is
14521/// returned as a content of the `google.cloud.location.Location.metadata` field.
14522///
14523/// [google.cloud.location.Location]: location::model::Location
14524#[derive(Clone, Default, PartialEq)]
14525#[non_exhaustive]
14526pub struct LocationMetadata {
14527    /// Output only. Capabilities of this location.
14528    pub capabilities: std::vec::Vec<crate::model::location_metadata::Capability>,
14529
14530    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14531}
14532
14533impl LocationMetadata {
14534    pub fn new() -> Self {
14535        std::default::Default::default()
14536    }
14537
14538    /// Sets the value of [capabilities][crate::model::LocationMetadata::capabilities].
14539    pub fn set_capabilities<T, V>(mut self, v: T) -> Self
14540    where
14541        T: std::iter::IntoIterator<Item = V>,
14542        V: std::convert::Into<crate::model::location_metadata::Capability>,
14543    {
14544        use std::iter::Iterator;
14545        self.capabilities = v.into_iter().map(|i| i.into()).collect();
14546        self
14547    }
14548}
14549
14550impl wkt::message::Message for LocationMetadata {
14551    fn typename() -> &'static str {
14552        "type.googleapis.com/google.cloud.vmwareengine.v1.LocationMetadata"
14553    }
14554}
14555
14556/// Defines additional types related to [LocationMetadata].
14557pub mod location_metadata {
14558    #[allow(unused_imports)]
14559    use super::*;
14560
14561    /// Capability of a location.
14562    ///
14563    /// # Working with unknown values
14564    ///
14565    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
14566    /// additional enum variants at any time. Adding new variants is not considered
14567    /// a breaking change. Applications should write their code in anticipation of:
14568    ///
14569    /// - New values appearing in future releases of the client library, **and**
14570    /// - New values received dynamically, without application changes.
14571    ///
14572    /// Please consult the [Working with enums] section in the user guide for some
14573    /// guidelines.
14574    ///
14575    /// [Working with enums]: https://google-cloud-rust.github.io/working_with_enums.html
14576    #[derive(Clone, Debug, PartialEq)]
14577    #[non_exhaustive]
14578    pub enum Capability {
14579        /// The default value. This value is used if the capability is omitted or
14580        /// unknown.
14581        Unspecified,
14582        /// Stretch clusters are supported in this location.
14583        StretchedClusters,
14584        /// If set, the enum was initialized with an unknown value.
14585        ///
14586        /// Applications can examine the value using [Capability::value] or
14587        /// [Capability::name].
14588        UnknownValue(capability::UnknownValue),
14589    }
14590
14591    #[doc(hidden)]
14592    pub mod capability {
14593        #[allow(unused_imports)]
14594        use super::*;
14595        #[derive(Clone, Debug, PartialEq)]
14596        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
14597    }
14598
14599    impl Capability {
14600        /// Gets the enum value.
14601        ///
14602        /// Returns `None` if the enum contains an unknown value deserialized from
14603        /// the string representation of enums.
14604        pub fn value(&self) -> std::option::Option<i32> {
14605            match self {
14606                Self::Unspecified => std::option::Option::Some(0),
14607                Self::StretchedClusters => std::option::Option::Some(1),
14608                Self::UnknownValue(u) => u.0.value(),
14609            }
14610        }
14611
14612        /// Gets the enum value as a string.
14613        ///
14614        /// Returns `None` if the enum contains an unknown value deserialized from
14615        /// the integer representation of enums.
14616        pub fn name(&self) -> std::option::Option<&str> {
14617            match self {
14618                Self::Unspecified => std::option::Option::Some("CAPABILITY_UNSPECIFIED"),
14619                Self::StretchedClusters => std::option::Option::Some("STRETCHED_CLUSTERS"),
14620                Self::UnknownValue(u) => u.0.name(),
14621            }
14622        }
14623    }
14624
14625    impl std::default::Default for Capability {
14626        fn default() -> Self {
14627            use std::convert::From;
14628            Self::from(0)
14629        }
14630    }
14631
14632    impl std::fmt::Display for Capability {
14633        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
14634            wkt::internal::display_enum(f, self.name(), self.value())
14635        }
14636    }
14637
14638    impl std::convert::From<i32> for Capability {
14639        fn from(value: i32) -> Self {
14640            match value {
14641                0 => Self::Unspecified,
14642                1 => Self::StretchedClusters,
14643                _ => Self::UnknownValue(capability::UnknownValue(
14644                    wkt::internal::UnknownEnumValue::Integer(value),
14645                )),
14646            }
14647        }
14648    }
14649
14650    impl std::convert::From<&str> for Capability {
14651        fn from(value: &str) -> Self {
14652            use std::string::ToString;
14653            match value {
14654                "CAPABILITY_UNSPECIFIED" => Self::Unspecified,
14655                "STRETCHED_CLUSTERS" => Self::StretchedClusters,
14656                _ => Self::UnknownValue(capability::UnknownValue(
14657                    wkt::internal::UnknownEnumValue::String(value.to_string()),
14658                )),
14659            }
14660        }
14661    }
14662
14663    impl serde::ser::Serialize for Capability {
14664        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
14665        where
14666            S: serde::Serializer,
14667        {
14668            match self {
14669                Self::Unspecified => serializer.serialize_i32(0),
14670                Self::StretchedClusters => serializer.serialize_i32(1),
14671                Self::UnknownValue(u) => u.0.serialize(serializer),
14672            }
14673        }
14674    }
14675
14676    impl<'de> serde::de::Deserialize<'de> for Capability {
14677        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
14678        where
14679            D: serde::Deserializer<'de>,
14680        {
14681            deserializer.deserialize_any(wkt::internal::EnumVisitor::<Capability>::new(
14682                ".google.cloud.vmwareengine.v1.LocationMetadata.Capability",
14683            ))
14684        }
14685    }
14686}
14687
14688/// DnsBindPermission resource that contains the accounts having the consumer DNS
14689/// bind permission on the corresponding intranet VPC of the consumer project.
14690#[derive(Clone, Default, PartialEq)]
14691#[non_exhaustive]
14692pub struct DnsBindPermission {
14693    /// Required. Output only. The name of the resource which stores the
14694    /// users/service accounts having the permission to bind to the corresponding
14695    /// intranet VPC of the consumer project. DnsBindPermission is a global
14696    /// resource and location can only be global. Resource names are schemeless
14697    /// URIs that follow the conventions in
14698    /// <https://cloud.google.com/apis/design/resource_names>. For example:
14699    /// `projects/my-project/locations/global/dnsBindPermission`
14700    pub name: std::string::String,
14701
14702    /// Output only. Users/Service accounts which have access for binding on the
14703    /// intranet VPC project corresponding to the consumer project.
14704    pub principals: std::vec::Vec<crate::model::Principal>,
14705
14706    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14707}
14708
14709impl DnsBindPermission {
14710    pub fn new() -> Self {
14711        std::default::Default::default()
14712    }
14713
14714    /// Sets the value of [name][crate::model::DnsBindPermission::name].
14715    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14716        self.name = v.into();
14717        self
14718    }
14719
14720    /// Sets the value of [principals][crate::model::DnsBindPermission::principals].
14721    pub fn set_principals<T, V>(mut self, v: T) -> Self
14722    where
14723        T: std::iter::IntoIterator<Item = V>,
14724        V: std::convert::Into<crate::model::Principal>,
14725    {
14726        use std::iter::Iterator;
14727        self.principals = v.into_iter().map(|i| i.into()).collect();
14728        self
14729    }
14730}
14731
14732impl wkt::message::Message for DnsBindPermission {
14733    fn typename() -> &'static str {
14734        "type.googleapis.com/google.cloud.vmwareengine.v1.DnsBindPermission"
14735    }
14736}
14737
14738/// Users/Service accounts which have access for DNS binding on the intranet
14739/// VPC corresponding to the consumer project.
14740#[derive(Clone, Default, PartialEq)]
14741#[non_exhaustive]
14742pub struct Principal {
14743    /// The consumer provided user/service account which needs to be
14744    /// granted permission to DNS bind with the intranet VPC corresponding to the
14745    /// consumer project.
14746    pub principal: std::option::Option<crate::model::principal::Principal>,
14747
14748    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
14749}
14750
14751impl Principal {
14752    pub fn new() -> Self {
14753        std::default::Default::default()
14754    }
14755
14756    /// Sets the value of [principal][crate::model::Principal::principal].
14757    ///
14758    /// Note that all the setters affecting `principal` are mutually
14759    /// exclusive.
14760    pub fn set_principal<
14761        T: std::convert::Into<std::option::Option<crate::model::principal::Principal>>,
14762    >(
14763        mut self,
14764        v: T,
14765    ) -> Self {
14766        self.principal = v.into();
14767        self
14768    }
14769
14770    /// The value of [principal][crate::model::Principal::principal]
14771    /// if it holds a `User`, `None` if the field is not set or
14772    /// holds a different branch.
14773    pub fn user(&self) -> std::option::Option<&std::string::String> {
14774        #[allow(unreachable_patterns)]
14775        self.principal.as_ref().and_then(|v| match v {
14776            crate::model::principal::Principal::User(v) => std::option::Option::Some(v),
14777            _ => std::option::Option::None,
14778        })
14779    }
14780
14781    /// Sets the value of [principal][crate::model::Principal::principal]
14782    /// to hold a `User`.
14783    ///
14784    /// Note that all the setters affecting `principal` are
14785    /// mutually exclusive.
14786    pub fn set_user<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14787        self.principal =
14788            std::option::Option::Some(crate::model::principal::Principal::User(v.into()));
14789        self
14790    }
14791
14792    /// The value of [principal][crate::model::Principal::principal]
14793    /// if it holds a `ServiceAccount`, `None` if the field is not set or
14794    /// holds a different branch.
14795    pub fn service_account(&self) -> std::option::Option<&std::string::String> {
14796        #[allow(unreachable_patterns)]
14797        self.principal.as_ref().and_then(|v| match v {
14798            crate::model::principal::Principal::ServiceAccount(v) => std::option::Option::Some(v),
14799            _ => std::option::Option::None,
14800        })
14801    }
14802
14803    /// Sets the value of [principal][crate::model::Principal::principal]
14804    /// to hold a `ServiceAccount`.
14805    ///
14806    /// Note that all the setters affecting `principal` are
14807    /// mutually exclusive.
14808    pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
14809        self.principal =
14810            std::option::Option::Some(crate::model::principal::Principal::ServiceAccount(v.into()));
14811        self
14812    }
14813}
14814
14815impl wkt::message::Message for Principal {
14816    fn typename() -> &'static str {
14817        "type.googleapis.com/google.cloud.vmwareengine.v1.Principal"
14818    }
14819}
14820
14821/// Defines additional types related to [Principal].
14822pub mod principal {
14823    #[allow(unused_imports)]
14824    use super::*;
14825
14826    /// The consumer provided user/service account which needs to be
14827    /// granted permission to DNS bind with the intranet VPC corresponding to the
14828    /// consumer project.
14829    #[derive(Clone, Debug, PartialEq)]
14830    #[non_exhaustive]
14831    pub enum Principal {
14832        /// The user who needs to be granted permission.
14833        User(std::string::String),
14834        /// The service account which needs to be granted the permission.
14835        ServiceAccount(std::string::String),
14836    }
14837}