Skip to main content

google_cloud_vmwareengine_v1/
client.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#![allow(rustdoc::bare_urls)]
17#![allow(rustdoc::broken_intra_doc_links)]
18#![allow(rustdoc::invalid_html_tags)]
19#![allow(rustdoc::redundant_explicit_links)]
20
21/// Implements a client for the VMware Engine API.
22///
23/// # Example
24/// ```
25/// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
26/// use google_cloud_gax::paginator::ItemPaginator as _;
27/// async fn sample(
28///    parent: &str,
29/// ) -> anyhow::Result<()> {
30///     let client = VmwareEngine::builder().build().await?;
31///     let mut list = client.list_vmware_engine_networks()
32///         .set_parent(parent)
33///         .by_item();
34///     while let Some(item) = list.next().await.transpose()? {
35///         println!("{:?}", item);
36///     }
37///     Ok(())
38/// }
39/// ```
40///
41/// # Service Description
42///
43/// VMwareEngine manages VMware's private clusters in the Cloud.
44///
45/// # Configuration
46///
47/// To configure `VmwareEngine` use the `with_*` methods in the type returned
48/// by [builder()][VmwareEngine::builder]. The default configuration should
49/// work for most applications. Common configuration changes include
50///
51/// * [with_endpoint()]: by default this client uses the global default endpoint
52///   (`https://vmwareengine.googleapis.com`). Applications using regional
53///   endpoints or running in restricted networks (e.g. a network configured
54///   with [Private Google Access with VPC Service Controls]) may want to
55///   override this default.
56/// * [with_credentials()]: by default this client uses
57///   [Application Default Credentials]. Applications using custom
58///   authentication may need to override this default.
59///
60/// [with_endpoint()]: super::builder::vmware_engine::ClientBuilder::with_endpoint
61/// [with_credentials()]: super::builder::vmware_engine::ClientBuilder::with_credentials
62/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
63/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
64///
65/// # Pooling and Cloning
66///
67/// `VmwareEngine` holds a connection pool internally, it is advised to
68/// create one and reuse it. You do not need to wrap `VmwareEngine` in
69/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
70/// already uses an `Arc` internally.
71#[derive(Clone, Debug)]
72pub struct VmwareEngine {
73    inner: std::sync::Arc<dyn super::stub::dynamic::VmwareEngine>,
74}
75
76impl VmwareEngine {
77    /// Returns a builder for [VmwareEngine].
78    ///
79    /// ```
80    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
81    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
82    /// let client = VmwareEngine::builder().build().await?;
83    /// # Ok(()) }
84    /// ```
85    pub fn builder() -> super::builder::vmware_engine::ClientBuilder {
86        crate::new_client_builder(super::builder::vmware_engine::client::Factory)
87    }
88
89    /// Creates a new client from the provided stub.
90    ///
91    /// The most common case for calling this function is in tests mocking the
92    /// client's behavior.
93    pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
94    where
95        T: super::stub::VmwareEngine + 'static,
96    {
97        Self { inner: stub.into() }
98    }
99
100    pub(crate) async fn new(
101        config: gaxi::options::ClientConfig,
102    ) -> crate::ClientBuilderResult<Self> {
103        let inner = Self::build_inner(config).await?;
104        Ok(Self { inner })
105    }
106
107    async fn build_inner(
108        conf: gaxi::options::ClientConfig,
109    ) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::VmwareEngine>> {
110        if gaxi::options::tracing_enabled(&conf) {
111            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
112        }
113        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
114    }
115
116    async fn build_transport(
117        conf: gaxi::options::ClientConfig,
118    ) -> crate::ClientBuilderResult<impl super::stub::VmwareEngine> {
119        super::transport::VmwareEngine::new(conf).await
120    }
121
122    async fn build_with_tracing(
123        conf: gaxi::options::ClientConfig,
124    ) -> crate::ClientBuilderResult<impl super::stub::VmwareEngine> {
125        Self::build_transport(conf)
126            .await
127            .map(super::tracing::VmwareEngine::new)
128    }
129
130    /// Lists `PrivateCloud` resources in a given project and location.
131    ///
132    /// # Example
133    /// ```
134    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
135    /// use google_cloud_gax::paginator::ItemPaginator as _;
136    /// use google_cloud_vmwareengine_v1::Result;
137    /// async fn sample(
138    ///    client: &VmwareEngine, parent: &str
139    /// ) -> Result<()> {
140    ///     let mut list = client.list_private_clouds()
141    ///         .set_parent(parent)
142    ///         .by_item();
143    ///     while let Some(item) = list.next().await.transpose()? {
144    ///         println!("{:?}", item);
145    ///     }
146    ///     Ok(())
147    /// }
148    /// ```
149    pub fn list_private_clouds(&self) -> super::builder::vmware_engine::ListPrivateClouds {
150        super::builder::vmware_engine::ListPrivateClouds::new(self.inner.clone())
151    }
152
153    /// Retrieves a `PrivateCloud` resource by its resource name.
154    ///
155    /// # Example
156    /// ```
157    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
158    /// use google_cloud_vmwareengine_v1::Result;
159    /// async fn sample(
160    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
161    /// ) -> Result<()> {
162    ///     let response = client.get_private_cloud()
163    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
164    ///         .send().await?;
165    ///     println!("response {:?}", response);
166    ///     Ok(())
167    /// }
168    /// ```
169    pub fn get_private_cloud(&self) -> super::builder::vmware_engine::GetPrivateCloud {
170        super::builder::vmware_engine::GetPrivateCloud::new(self.inner.clone())
171    }
172
173    /// Creates a new `PrivateCloud` resource in a given project and location.
174    /// Private clouds of type `STANDARD` and
175    /// `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are
176    /// regional.
177    /// Creating a private cloud also creates a [management
178    /// cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components)
179    /// for that private cloud.
180    ///
181    /// # Long running operations
182    ///
183    /// This method is used to start, and/or poll a [long-running Operation].
184    /// The [Working with long-running operations] chapter in the [user guide]
185    /// covers these operations in detail.
186    ///
187    /// [long-running operation]: https://google.aip.dev/151
188    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
189    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
190    ///
191    /// # Example
192    /// ```
193    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
194    /// use google_cloud_lro::Poller;
195    /// use google_cloud_vmwareengine_v1::model::PrivateCloud;
196    /// use google_cloud_vmwareengine_v1::Result;
197    /// async fn sample(
198    ///    client: &VmwareEngine, parent: &str
199    /// ) -> Result<()> {
200    ///     let response = client.create_private_cloud()
201    ///         .set_parent(parent)
202    ///         .set_private_cloud(
203    ///             PrivateCloud::new()/* set fields */
204    ///         )
205    ///         .poller().until_done().await?;
206    ///     println!("response {:?}", response);
207    ///     Ok(())
208    /// }
209    /// ```
210    pub fn create_private_cloud(&self) -> super::builder::vmware_engine::CreatePrivateCloud {
211        super::builder::vmware_engine::CreatePrivateCloud::new(self.inner.clone())
212    }
213
214    /// Modifies a `PrivateCloud` resource. Only the following fields can be
215    /// updated: `description`.
216    /// Only fields specified in `updateMask` are applied.
217    ///
218    /// During operation processing, the resource is temporarily in the `ACTIVE`
219    /// state before the operation fully completes. For that period of time, you
220    /// can't update the resource. Use the operation status to determine when the
221    /// processing fully completes.
222    ///
223    /// # Long running operations
224    ///
225    /// This method is used to start, and/or poll a [long-running Operation].
226    /// The [Working with long-running operations] chapter in the [user guide]
227    /// covers these operations in detail.
228    ///
229    /// [long-running operation]: https://google.aip.dev/151
230    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
231    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
232    ///
233    /// # Example
234    /// ```
235    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
236    /// use google_cloud_lro::Poller;
237    /// # extern crate wkt as google_cloud_wkt;
238    /// use google_cloud_wkt::FieldMask;
239    /// use google_cloud_vmwareengine_v1::model::PrivateCloud;
240    /// use google_cloud_vmwareengine_v1::Result;
241    /// async fn sample(
242    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
243    /// ) -> Result<()> {
244    ///     let response = client.update_private_cloud()
245    ///         .set_private_cloud(
246    ///             PrivateCloud::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))/* set fields */
247    ///         )
248    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
249    ///         .poller().until_done().await?;
250    ///     println!("response {:?}", response);
251    ///     Ok(())
252    /// }
253    /// ```
254    pub fn update_private_cloud(&self) -> super::builder::vmware_engine::UpdatePrivateCloud {
255        super::builder::vmware_engine::UpdatePrivateCloud::new(self.inner.clone())
256    }
257
258    /// Schedules a `PrivateCloud` resource for deletion.
259    ///
260    /// A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state`
261    /// set to `DELETED` and `expireTime` set to the time when deletion is final
262    /// and can no longer be reversed. The delete operation is marked as done
263    /// as soon as the `PrivateCloud` is successfully scheduled for deletion
264    /// (this also applies when `delayHours` is set to zero), and the operation is
265    /// not kept in pending state until `PrivateCloud` is purged.
266    /// `PrivateCloud` can be restored using `UndeletePrivateCloud` method before
267    /// the `expireTime` elapses. When `expireTime` is reached, deletion is final
268    /// and all private cloud resources are irreversibly removed and billing stops.
269    /// During the final removal process, `PrivateCloud.state` is set to `PURGING`.
270    /// `PrivateCloud` can be polled using standard `GET` method for the whole
271    /// period of deletion and purging. It will not be returned only
272    /// when it is completely purged.
273    ///
274    /// # Long running operations
275    ///
276    /// This method is used to start, and/or poll a [long-running Operation].
277    /// The [Working with long-running operations] chapter in the [user guide]
278    /// covers these operations in detail.
279    ///
280    /// [long-running operation]: https://google.aip.dev/151
281    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
282    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
283    ///
284    /// # Example
285    /// ```
286    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
287    /// use google_cloud_lro::Poller;
288    /// use google_cloud_vmwareengine_v1::Result;
289    /// async fn sample(
290    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
291    /// ) -> Result<()> {
292    ///     let response = client.delete_private_cloud()
293    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
294    ///         .poller().until_done().await?;
295    ///     println!("response {:?}", response);
296    ///     Ok(())
297    /// }
298    /// ```
299    pub fn delete_private_cloud(&self) -> super::builder::vmware_engine::DeletePrivateCloud {
300        super::builder::vmware_engine::DeletePrivateCloud::new(self.inner.clone())
301    }
302
303    /// Restores a private cloud that was previously scheduled for deletion by
304    /// `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has
305    /// `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to
306    /// the time when deletion can no longer be reversed.
307    ///
308    /// # Long running operations
309    ///
310    /// This method is used to start, and/or poll a [long-running Operation].
311    /// The [Working with long-running operations] chapter in the [user guide]
312    /// covers these operations in detail.
313    ///
314    /// [long-running operation]: https://google.aip.dev/151
315    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
316    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
317    ///
318    /// # Example
319    /// ```
320    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
321    /// use google_cloud_lro::Poller;
322    /// use google_cloud_vmwareengine_v1::Result;
323    /// async fn sample(
324    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
325    /// ) -> Result<()> {
326    ///     let response = client.undelete_private_cloud()
327    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
328    ///         .poller().until_done().await?;
329    ///     println!("response {:?}", response);
330    ///     Ok(())
331    /// }
332    /// ```
333    pub fn undelete_private_cloud(&self) -> super::builder::vmware_engine::UndeletePrivateCloud {
334        super::builder::vmware_engine::UndeletePrivateCloud::new(self.inner.clone())
335    }
336
337    /// Lists `Cluster` resources in a given private cloud.
338    ///
339    /// # Example
340    /// ```
341    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
342    /// use google_cloud_gax::paginator::ItemPaginator as _;
343    /// use google_cloud_vmwareengine_v1::Result;
344    /// async fn sample(
345    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
346    /// ) -> Result<()> {
347    ///     let mut list = client.list_clusters()
348    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
349    ///         .by_item();
350    ///     while let Some(item) = list.next().await.transpose()? {
351    ///         println!("{:?}", item);
352    ///     }
353    ///     Ok(())
354    /// }
355    /// ```
356    pub fn list_clusters(&self) -> super::builder::vmware_engine::ListClusters {
357        super::builder::vmware_engine::ListClusters::new(self.inner.clone())
358    }
359
360    /// Retrieves a `Cluster` resource by its resource name.
361    ///
362    /// # Example
363    /// ```
364    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
365    /// use google_cloud_vmwareengine_v1::Result;
366    /// async fn sample(
367    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, cluster_id: &str
368    /// ) -> Result<()> {
369    ///     let response = client.get_cluster()
370    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/clusters/{cluster_id}"))
371    ///         .send().await?;
372    ///     println!("response {:?}", response);
373    ///     Ok(())
374    /// }
375    /// ```
376    pub fn get_cluster(&self) -> super::builder::vmware_engine::GetCluster {
377        super::builder::vmware_engine::GetCluster::new(self.inner.clone())
378    }
379
380    /// Creates a new cluster in a given private cloud.
381    /// Creating a new cluster provides additional nodes for
382    /// use in the parent private cloud and requires sufficient [node
383    /// quota](https://cloud.google.com/vmware-engine/quotas).
384    ///
385    /// # Long running operations
386    ///
387    /// This method is used to start, and/or poll a [long-running Operation].
388    /// The [Working with long-running operations] chapter in the [user guide]
389    /// covers these operations in detail.
390    ///
391    /// [long-running operation]: https://google.aip.dev/151
392    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
393    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
394    ///
395    /// # Example
396    /// ```
397    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
398    /// use google_cloud_lro::Poller;
399    /// use google_cloud_vmwareengine_v1::model::Cluster;
400    /// use google_cloud_vmwareengine_v1::Result;
401    /// async fn sample(
402    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
403    /// ) -> Result<()> {
404    ///     let response = client.create_cluster()
405    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
406    ///         .set_cluster_id("cluster_id_value")
407    ///         .set_cluster(
408    ///             Cluster::new()/* set fields */
409    ///         )
410    ///         .poller().until_done().await?;
411    ///     println!("response {:?}", response);
412    ///     Ok(())
413    /// }
414    /// ```
415    pub fn create_cluster(&self) -> super::builder::vmware_engine::CreateCluster {
416        super::builder::vmware_engine::CreateCluster::new(self.inner.clone())
417    }
418
419    /// Modifies a `Cluster` resource. Only fields specified in `updateMask` are
420    /// applied.
421    ///
422    /// During operation processing, the resource is temporarily in the `ACTIVE`
423    /// state before the operation fully completes. For that period of time, you
424    /// can't update the resource. Use the operation status to determine when the
425    /// processing fully completes.
426    ///
427    /// # Long running operations
428    ///
429    /// This method is used to start, and/or poll a [long-running Operation].
430    /// The [Working with long-running operations] chapter in the [user guide]
431    /// covers these operations in detail.
432    ///
433    /// [long-running operation]: https://google.aip.dev/151
434    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
435    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
436    ///
437    /// # Example
438    /// ```
439    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
440    /// use google_cloud_lro::Poller;
441    /// # extern crate wkt as google_cloud_wkt;
442    /// use google_cloud_wkt::FieldMask;
443    /// use google_cloud_vmwareengine_v1::model::Cluster;
444    /// use google_cloud_vmwareengine_v1::Result;
445    /// async fn sample(
446    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, cluster_id: &str
447    /// ) -> Result<()> {
448    ///     let response = client.update_cluster()
449    ///         .set_cluster(
450    ///             Cluster::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/clusters/{cluster_id}"))/* set fields */
451    ///         )
452    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
453    ///         .poller().until_done().await?;
454    ///     println!("response {:?}", response);
455    ///     Ok(())
456    /// }
457    /// ```
458    pub fn update_cluster(&self) -> super::builder::vmware_engine::UpdateCluster {
459        super::builder::vmware_engine::UpdateCluster::new(self.inner.clone())
460    }
461
462    /// Deletes a `Cluster` resource. To avoid unintended data loss, migrate or
463    /// gracefully shut down any workloads running on the cluster before deletion.
464    /// You cannot delete the management cluster of a private cloud using this
465    /// method.
466    ///
467    /// # Long running operations
468    ///
469    /// This method is used to start, and/or poll a [long-running Operation].
470    /// The [Working with long-running operations] chapter in the [user guide]
471    /// covers these operations in detail.
472    ///
473    /// [long-running operation]: https://google.aip.dev/151
474    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
475    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
476    ///
477    /// # Example
478    /// ```
479    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
480    /// use google_cloud_lro::Poller;
481    /// use google_cloud_vmwareengine_v1::Result;
482    /// async fn sample(
483    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, cluster_id: &str
484    /// ) -> Result<()> {
485    ///     client.delete_cluster()
486    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/clusters/{cluster_id}"))
487    ///         .poller().until_done().await?;
488    ///     Ok(())
489    /// }
490    /// ```
491    pub fn delete_cluster(&self) -> super::builder::vmware_engine::DeleteCluster {
492        super::builder::vmware_engine::DeleteCluster::new(self.inner.clone())
493    }
494
495    /// Lists nodes in a given cluster.
496    ///
497    /// # Example
498    /// ```
499    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
500    /// use google_cloud_gax::paginator::ItemPaginator as _;
501    /// use google_cloud_vmwareengine_v1::Result;
502    /// async fn sample(
503    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, cluster_id: &str
504    /// ) -> Result<()> {
505    ///     let mut list = client.list_nodes()
506    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/clusters/{cluster_id}"))
507    ///         .by_item();
508    ///     while let Some(item) = list.next().await.transpose()? {
509    ///         println!("{:?}", item);
510    ///     }
511    ///     Ok(())
512    /// }
513    /// ```
514    pub fn list_nodes(&self) -> super::builder::vmware_engine::ListNodes {
515        super::builder::vmware_engine::ListNodes::new(self.inner.clone())
516    }
517
518    /// Gets details of a single node.
519    ///
520    /// # Example
521    /// ```
522    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
523    /// use google_cloud_vmwareengine_v1::Result;
524    /// async fn sample(
525    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, cluster_id: &str, node_id: &str
526    /// ) -> Result<()> {
527    ///     let response = client.get_node()
528    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/clusters/{cluster_id}/nodes/{node_id}"))
529    ///         .send().await?;
530    ///     println!("response {:?}", response);
531    ///     Ok(())
532    /// }
533    /// ```
534    pub fn get_node(&self) -> super::builder::vmware_engine::GetNode {
535        super::builder::vmware_engine::GetNode::new(self.inner.clone())
536    }
537
538    /// Lists external IP addresses assigned to VMware workload VMs in a given
539    /// private cloud.
540    ///
541    /// # Example
542    /// ```
543    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
544    /// use google_cloud_gax::paginator::ItemPaginator as _;
545    /// use google_cloud_vmwareengine_v1::Result;
546    /// async fn sample(
547    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
548    /// ) -> Result<()> {
549    ///     let mut list = client.list_external_addresses()
550    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
551    ///         .by_item();
552    ///     while let Some(item) = list.next().await.transpose()? {
553    ///         println!("{:?}", item);
554    ///     }
555    ///     Ok(())
556    /// }
557    /// ```
558    pub fn list_external_addresses(&self) -> super::builder::vmware_engine::ListExternalAddresses {
559        super::builder::vmware_engine::ListExternalAddresses::new(self.inner.clone())
560    }
561
562    /// Lists external IP addresses assigned to VMware workload VMs within the
563    /// scope of the given network policy.
564    ///
565    /// # Example
566    /// ```
567    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
568    /// use google_cloud_gax::paginator::ItemPaginator as _;
569    /// use google_cloud_vmwareengine_v1::Result;
570    /// async fn sample(
571    ///    client: &VmwareEngine
572    /// ) -> Result<()> {
573    ///     let mut list = client.fetch_network_policy_external_addresses()
574    ///         /* set fields */
575    ///         .by_item();
576    ///     while let Some(item) = list.next().await.transpose()? {
577    ///         println!("{:?}", item);
578    ///     }
579    ///     Ok(())
580    /// }
581    /// ```
582    pub fn fetch_network_policy_external_addresses(
583        &self,
584    ) -> super::builder::vmware_engine::FetchNetworkPolicyExternalAddresses {
585        super::builder::vmware_engine::FetchNetworkPolicyExternalAddresses::new(self.inner.clone())
586    }
587
588    /// Gets details of a single external IP address.
589    ///
590    /// # Example
591    /// ```
592    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
593    /// use google_cloud_vmwareengine_v1::Result;
594    /// async fn sample(
595    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, external_address_id: &str
596    /// ) -> Result<()> {
597    ///     let response = client.get_external_address()
598    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/externalAddresses/{external_address_id}"))
599    ///         .send().await?;
600    ///     println!("response {:?}", response);
601    ///     Ok(())
602    /// }
603    /// ```
604    pub fn get_external_address(&self) -> super::builder::vmware_engine::GetExternalAddress {
605        super::builder::vmware_engine::GetExternalAddress::new(self.inner.clone())
606    }
607
608    /// Creates a new `ExternalAddress` resource in a given private cloud. The
609    /// network policy that corresponds to the private cloud must have the external
610    /// IP address network service enabled (`NetworkPolicy.external_ip`).
611    ///
612    /// # Long running operations
613    ///
614    /// This method is used to start, and/or poll a [long-running Operation].
615    /// The [Working with long-running operations] chapter in the [user guide]
616    /// covers these operations in detail.
617    ///
618    /// [long-running operation]: https://google.aip.dev/151
619    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
620    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
621    ///
622    /// # Example
623    /// ```
624    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
625    /// use google_cloud_lro::Poller;
626    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
627    /// use google_cloud_vmwareengine_v1::Result;
628    /// async fn sample(
629    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
630    /// ) -> Result<()> {
631    ///     let response = client.create_external_address()
632    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
633    ///         .set_external_address(
634    ///             ExternalAddress::new()/* set fields */
635    ///         )
636    ///         .poller().until_done().await?;
637    ///     println!("response {:?}", response);
638    ///     Ok(())
639    /// }
640    /// ```
641    pub fn create_external_address(&self) -> super::builder::vmware_engine::CreateExternalAddress {
642        super::builder::vmware_engine::CreateExternalAddress::new(self.inner.clone())
643    }
644
645    /// Updates the parameters of a single external IP address.
646    /// Only fields specified in `update_mask` are applied.
647    ///
648    /// During operation processing, the resource is temporarily in the `ACTIVE`
649    /// state before the operation fully completes. For that period of time, you
650    /// can't update the resource. Use the operation status to determine when the
651    /// processing fully completes.
652    ///
653    /// # Long running operations
654    ///
655    /// This method is used to start, and/or poll a [long-running Operation].
656    /// The [Working with long-running operations] chapter in the [user guide]
657    /// covers these operations in detail.
658    ///
659    /// [long-running operation]: https://google.aip.dev/151
660    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
661    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
662    ///
663    /// # Example
664    /// ```
665    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
666    /// use google_cloud_lro::Poller;
667    /// # extern crate wkt as google_cloud_wkt;
668    /// use google_cloud_wkt::FieldMask;
669    /// use google_cloud_vmwareengine_v1::model::ExternalAddress;
670    /// use google_cloud_vmwareengine_v1::Result;
671    /// async fn sample(
672    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, external_address_id: &str
673    /// ) -> Result<()> {
674    ///     let response = client.update_external_address()
675    ///         .set_external_address(
676    ///             ExternalAddress::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/externalAddresses/{external_address_id}"))/* set fields */
677    ///         )
678    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
679    ///         .poller().until_done().await?;
680    ///     println!("response {:?}", response);
681    ///     Ok(())
682    /// }
683    /// ```
684    pub fn update_external_address(&self) -> super::builder::vmware_engine::UpdateExternalAddress {
685        super::builder::vmware_engine::UpdateExternalAddress::new(self.inner.clone())
686    }
687
688    /// Deletes a single external IP address. When you delete an external IP
689    /// address, connectivity between the external IP address and the corresponding
690    /// internal IP address is lost.
691    ///
692    /// # Long running operations
693    ///
694    /// This method is used to start, and/or poll a [long-running Operation].
695    /// The [Working with long-running operations] chapter in the [user guide]
696    /// covers these operations in detail.
697    ///
698    /// [long-running operation]: https://google.aip.dev/151
699    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
700    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
701    ///
702    /// # Example
703    /// ```
704    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
705    /// use google_cloud_lro::Poller;
706    /// use google_cloud_vmwareengine_v1::Result;
707    /// async fn sample(
708    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, external_address_id: &str
709    /// ) -> Result<()> {
710    ///     client.delete_external_address()
711    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/externalAddresses/{external_address_id}"))
712    ///         .poller().until_done().await?;
713    ///     Ok(())
714    /// }
715    /// ```
716    pub fn delete_external_address(&self) -> super::builder::vmware_engine::DeleteExternalAddress {
717        super::builder::vmware_engine::DeleteExternalAddress::new(self.inner.clone())
718    }
719
720    /// Lists subnets in a given private cloud.
721    ///
722    /// # Example
723    /// ```
724    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
725    /// use google_cloud_gax::paginator::ItemPaginator as _;
726    /// use google_cloud_vmwareengine_v1::Result;
727    /// async fn sample(
728    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
729    /// ) -> Result<()> {
730    ///     let mut list = client.list_subnets()
731    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
732    ///         .by_item();
733    ///     while let Some(item) = list.next().await.transpose()? {
734    ///         println!("{:?}", item);
735    ///     }
736    ///     Ok(())
737    /// }
738    /// ```
739    pub fn list_subnets(&self) -> super::builder::vmware_engine::ListSubnets {
740        super::builder::vmware_engine::ListSubnets::new(self.inner.clone())
741    }
742
743    /// Gets details of a single subnet.
744    ///
745    /// # Example
746    /// ```
747    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
748    /// use google_cloud_vmwareengine_v1::Result;
749    /// async fn sample(
750    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, subnet_id: &str
751    /// ) -> Result<()> {
752    ///     let response = client.get_subnet()
753    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/subnets/{subnet_id}"))
754    ///         .send().await?;
755    ///     println!("response {:?}", response);
756    ///     Ok(())
757    /// }
758    /// ```
759    pub fn get_subnet(&self) -> super::builder::vmware_engine::GetSubnet {
760        super::builder::vmware_engine::GetSubnet::new(self.inner.clone())
761    }
762
763    /// Updates the parameters of a single subnet. Only fields specified in
764    /// `update_mask` are applied.
765    ///
766    /// *Note*: This API is synchronous and always returns a successful
767    /// `google.longrunning.Operation` (LRO). The returned LRO will only have
768    /// `done` and `response` fields.
769    ///
770    /// # Long running operations
771    ///
772    /// This method is used to start, and/or poll a [long-running Operation].
773    /// The [Working with long-running operations] chapter in the [user guide]
774    /// covers these operations in detail.
775    ///
776    /// [long-running operation]: https://google.aip.dev/151
777    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
778    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
779    ///
780    /// # Example
781    /// ```
782    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
783    /// use google_cloud_lro::Poller;
784    /// # extern crate wkt as google_cloud_wkt;
785    /// use google_cloud_wkt::FieldMask;
786    /// use google_cloud_vmwareengine_v1::model::Subnet;
787    /// use google_cloud_vmwareengine_v1::Result;
788    /// async fn sample(
789    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, subnet_id: &str
790    /// ) -> Result<()> {
791    ///     let response = client.update_subnet()
792    ///         .set_subnet(
793    ///             Subnet::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/subnets/{subnet_id}"))/* set fields */
794    ///         )
795    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
796    ///         .poller().until_done().await?;
797    ///     println!("response {:?}", response);
798    ///     Ok(())
799    /// }
800    /// ```
801    pub fn update_subnet(&self) -> super::builder::vmware_engine::UpdateSubnet {
802        super::builder::vmware_engine::UpdateSubnet::new(self.inner.clone())
803    }
804
805    /// Lists `ExternalAccessRule` resources in the specified network policy.
806    ///
807    /// # Example
808    /// ```
809    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
810    /// use google_cloud_gax::paginator::ItemPaginator as _;
811    /// use google_cloud_vmwareengine_v1::Result;
812    /// async fn sample(
813    ///    client: &VmwareEngine, project_id: &str, location_id: &str, network_policy_id: &str
814    /// ) -> Result<()> {
815    ///     let mut list = client.list_external_access_rules()
816    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}"))
817    ///         .by_item();
818    ///     while let Some(item) = list.next().await.transpose()? {
819    ///         println!("{:?}", item);
820    ///     }
821    ///     Ok(())
822    /// }
823    /// ```
824    pub fn list_external_access_rules(
825        &self,
826    ) -> super::builder::vmware_engine::ListExternalAccessRules {
827        super::builder::vmware_engine::ListExternalAccessRules::new(self.inner.clone())
828    }
829
830    /// Gets details of a single external access rule.
831    ///
832    /// # Example
833    /// ```
834    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
835    /// use google_cloud_vmwareengine_v1::Result;
836    /// async fn sample(
837    ///    client: &VmwareEngine, project_id: &str, location_id: &str, network_policy_id: &str, external_access_rule_id: &str
838    /// ) -> Result<()> {
839    ///     let response = client.get_external_access_rule()
840    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}/externalAccessRules/{external_access_rule_id}"))
841    ///         .send().await?;
842    ///     println!("response {:?}", response);
843    ///     Ok(())
844    /// }
845    /// ```
846    pub fn get_external_access_rule(&self) -> super::builder::vmware_engine::GetExternalAccessRule {
847        super::builder::vmware_engine::GetExternalAccessRule::new(self.inner.clone())
848    }
849
850    /// Creates a new external access rule in a given network policy.
851    ///
852    /// # Long running operations
853    ///
854    /// This method is used to start, and/or poll a [long-running Operation].
855    /// The [Working with long-running operations] chapter in the [user guide]
856    /// covers these operations in detail.
857    ///
858    /// [long-running operation]: https://google.aip.dev/151
859    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
860    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
861    ///
862    /// # Example
863    /// ```
864    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
865    /// use google_cloud_lro::Poller;
866    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
867    /// use google_cloud_vmwareengine_v1::Result;
868    /// async fn sample(
869    ///    client: &VmwareEngine, project_id: &str, location_id: &str, network_policy_id: &str
870    /// ) -> Result<()> {
871    ///     let response = client.create_external_access_rule()
872    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}"))
873    ///         .set_external_access_rule(
874    ///             ExternalAccessRule::new()/* set fields */
875    ///         )
876    ///         .poller().until_done().await?;
877    ///     println!("response {:?}", response);
878    ///     Ok(())
879    /// }
880    /// ```
881    pub fn create_external_access_rule(
882        &self,
883    ) -> super::builder::vmware_engine::CreateExternalAccessRule {
884        super::builder::vmware_engine::CreateExternalAccessRule::new(self.inner.clone())
885    }
886
887    /// Updates the parameters of a single external access rule.
888    /// Only fields specified in `update_mask` are applied.
889    ///
890    /// # Long running operations
891    ///
892    /// This method is used to start, and/or poll a [long-running Operation].
893    /// The [Working with long-running operations] chapter in the [user guide]
894    /// covers these operations in detail.
895    ///
896    /// [long-running operation]: https://google.aip.dev/151
897    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
898    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
899    ///
900    /// # Example
901    /// ```
902    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
903    /// use google_cloud_lro::Poller;
904    /// # extern crate wkt as google_cloud_wkt;
905    /// use google_cloud_wkt::FieldMask;
906    /// use google_cloud_vmwareengine_v1::model::ExternalAccessRule;
907    /// use google_cloud_vmwareengine_v1::Result;
908    /// async fn sample(
909    ///    client: &VmwareEngine, project_id: &str, location_id: &str, network_policy_id: &str, external_access_rule_id: &str
910    /// ) -> Result<()> {
911    ///     let response = client.update_external_access_rule()
912    ///         .set_external_access_rule(
913    ///             ExternalAccessRule::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}/externalAccessRules/{external_access_rule_id}"))/* set fields */
914    ///         )
915    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
916    ///         .poller().until_done().await?;
917    ///     println!("response {:?}", response);
918    ///     Ok(())
919    /// }
920    /// ```
921    pub fn update_external_access_rule(
922        &self,
923    ) -> super::builder::vmware_engine::UpdateExternalAccessRule {
924        super::builder::vmware_engine::UpdateExternalAccessRule::new(self.inner.clone())
925    }
926
927    /// Deletes a single external access rule.
928    ///
929    /// # Long running operations
930    ///
931    /// This method is used to start, and/or poll a [long-running Operation].
932    /// The [Working with long-running operations] chapter in the [user guide]
933    /// covers these operations in detail.
934    ///
935    /// [long-running operation]: https://google.aip.dev/151
936    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
937    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
938    ///
939    /// # Example
940    /// ```
941    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
942    /// use google_cloud_lro::Poller;
943    /// use google_cloud_vmwareengine_v1::Result;
944    /// async fn sample(
945    ///    client: &VmwareEngine, project_id: &str, location_id: &str, network_policy_id: &str, external_access_rule_id: &str
946    /// ) -> Result<()> {
947    ///     client.delete_external_access_rule()
948    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}/externalAccessRules/{external_access_rule_id}"))
949    ///         .poller().until_done().await?;
950    ///     Ok(())
951    /// }
952    /// ```
953    pub fn delete_external_access_rule(
954        &self,
955    ) -> super::builder::vmware_engine::DeleteExternalAccessRule {
956        super::builder::vmware_engine::DeleteExternalAccessRule::new(self.inner.clone())
957    }
958
959    /// Lists logging servers configured for a given private
960    /// cloud.
961    ///
962    /// # Example
963    /// ```
964    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
965    /// use google_cloud_gax::paginator::ItemPaginator as _;
966    /// use google_cloud_vmwareengine_v1::Result;
967    /// async fn sample(
968    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
969    /// ) -> Result<()> {
970    ///     let mut list = client.list_logging_servers()
971    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
972    ///         .by_item();
973    ///     while let Some(item) = list.next().await.transpose()? {
974    ///         println!("{:?}", item);
975    ///     }
976    ///     Ok(())
977    /// }
978    /// ```
979    pub fn list_logging_servers(&self) -> super::builder::vmware_engine::ListLoggingServers {
980        super::builder::vmware_engine::ListLoggingServers::new(self.inner.clone())
981    }
982
983    /// Gets details of a logging server.
984    ///
985    /// # Example
986    /// ```
987    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
988    /// use google_cloud_vmwareengine_v1::Result;
989    /// async fn sample(
990    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, logging_server_id: &str
991    /// ) -> Result<()> {
992    ///     let response = client.get_logging_server()
993    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/loggingServers/{logging_server_id}"))
994    ///         .send().await?;
995    ///     println!("response {:?}", response);
996    ///     Ok(())
997    /// }
998    /// ```
999    pub fn get_logging_server(&self) -> super::builder::vmware_engine::GetLoggingServer {
1000        super::builder::vmware_engine::GetLoggingServer::new(self.inner.clone())
1001    }
1002
1003    /// Create a new logging server for a given private cloud.
1004    ///
1005    /// # Long running operations
1006    ///
1007    /// This method is used to start, and/or poll a [long-running Operation].
1008    /// The [Working with long-running operations] chapter in the [user guide]
1009    /// covers these operations in detail.
1010    ///
1011    /// [long-running operation]: https://google.aip.dev/151
1012    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1013    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1014    ///
1015    /// # Example
1016    /// ```
1017    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1018    /// use google_cloud_lro::Poller;
1019    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
1020    /// use google_cloud_vmwareengine_v1::Result;
1021    /// async fn sample(
1022    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
1023    /// ) -> Result<()> {
1024    ///     let response = client.create_logging_server()
1025    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
1026    ///         .set_logging_server(
1027    ///             LoggingServer::new()/* set fields */
1028    ///         )
1029    ///         .poller().until_done().await?;
1030    ///     println!("response {:?}", response);
1031    ///     Ok(())
1032    /// }
1033    /// ```
1034    pub fn create_logging_server(&self) -> super::builder::vmware_engine::CreateLoggingServer {
1035        super::builder::vmware_engine::CreateLoggingServer::new(self.inner.clone())
1036    }
1037
1038    /// Updates the parameters of a single logging server.
1039    /// Only fields specified in `update_mask` are applied.
1040    ///
1041    /// # Long running operations
1042    ///
1043    /// This method is used to start, and/or poll a [long-running Operation].
1044    /// The [Working with long-running operations] chapter in the [user guide]
1045    /// covers these operations in detail.
1046    ///
1047    /// [long-running operation]: https://google.aip.dev/151
1048    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1049    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1050    ///
1051    /// # Example
1052    /// ```
1053    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1054    /// use google_cloud_lro::Poller;
1055    /// # extern crate wkt as google_cloud_wkt;
1056    /// use google_cloud_wkt::FieldMask;
1057    /// use google_cloud_vmwareengine_v1::model::LoggingServer;
1058    /// use google_cloud_vmwareengine_v1::Result;
1059    /// async fn sample(
1060    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, logging_server_id: &str
1061    /// ) -> Result<()> {
1062    ///     let response = client.update_logging_server()
1063    ///         .set_logging_server(
1064    ///             LoggingServer::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/loggingServers/{logging_server_id}"))/* set fields */
1065    ///         )
1066    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1067    ///         .poller().until_done().await?;
1068    ///     println!("response {:?}", response);
1069    ///     Ok(())
1070    /// }
1071    /// ```
1072    pub fn update_logging_server(&self) -> super::builder::vmware_engine::UpdateLoggingServer {
1073        super::builder::vmware_engine::UpdateLoggingServer::new(self.inner.clone())
1074    }
1075
1076    /// Deletes a single logging server.
1077    ///
1078    /// # Long running operations
1079    ///
1080    /// This method is used to start, and/or poll a [long-running Operation].
1081    /// The [Working with long-running operations] chapter in the [user guide]
1082    /// covers these operations in detail.
1083    ///
1084    /// [long-running operation]: https://google.aip.dev/151
1085    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1086    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1087    ///
1088    /// # Example
1089    /// ```
1090    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1091    /// use google_cloud_lro::Poller;
1092    /// use google_cloud_vmwareengine_v1::Result;
1093    /// async fn sample(
1094    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, logging_server_id: &str
1095    /// ) -> Result<()> {
1096    ///     client.delete_logging_server()
1097    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/loggingServers/{logging_server_id}"))
1098    ///         .poller().until_done().await?;
1099    ///     Ok(())
1100    /// }
1101    /// ```
1102    pub fn delete_logging_server(&self) -> super::builder::vmware_engine::DeleteLoggingServer {
1103        super::builder::vmware_engine::DeleteLoggingServer::new(self.inner.clone())
1104    }
1105
1106    /// Lists node types
1107    ///
1108    /// # Example
1109    /// ```
1110    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1111    /// use google_cloud_gax::paginator::ItemPaginator as _;
1112    /// use google_cloud_vmwareengine_v1::Result;
1113    /// async fn sample(
1114    ///    client: &VmwareEngine, parent: &str
1115    /// ) -> Result<()> {
1116    ///     let mut list = client.list_node_types()
1117    ///         .set_parent(parent)
1118    ///         .by_item();
1119    ///     while let Some(item) = list.next().await.transpose()? {
1120    ///         println!("{:?}", item);
1121    ///     }
1122    ///     Ok(())
1123    /// }
1124    /// ```
1125    pub fn list_node_types(&self) -> super::builder::vmware_engine::ListNodeTypes {
1126        super::builder::vmware_engine::ListNodeTypes::new(self.inner.clone())
1127    }
1128
1129    /// Gets details of a single `NodeType`.
1130    ///
1131    /// # Example
1132    /// ```
1133    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1134    /// use google_cloud_vmwareengine_v1::Result;
1135    /// async fn sample(
1136    ///    client: &VmwareEngine, project_id: &str, location_id: &str, node_type_id: &str
1137    /// ) -> Result<()> {
1138    ///     let response = client.get_node_type()
1139    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/nodeTypes/{node_type_id}"))
1140    ///         .send().await?;
1141    ///     println!("response {:?}", response);
1142    ///     Ok(())
1143    /// }
1144    /// ```
1145    pub fn get_node_type(&self) -> super::builder::vmware_engine::GetNodeType {
1146        super::builder::vmware_engine::GetNodeType::new(self.inner.clone())
1147    }
1148
1149    /// Gets details of credentials for NSX appliance.
1150    ///
1151    /// # Example
1152    /// ```
1153    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1154    /// use google_cloud_vmwareengine_v1::Result;
1155    /// async fn sample(
1156    ///    client: &VmwareEngine
1157    /// ) -> Result<()> {
1158    ///     let response = client.show_nsx_credentials()
1159    ///         /* set fields */
1160    ///         .send().await?;
1161    ///     println!("response {:?}", response);
1162    ///     Ok(())
1163    /// }
1164    /// ```
1165    pub fn show_nsx_credentials(&self) -> super::builder::vmware_engine::ShowNsxCredentials {
1166        super::builder::vmware_engine::ShowNsxCredentials::new(self.inner.clone())
1167    }
1168
1169    /// Gets details of credentials for Vcenter appliance.
1170    ///
1171    /// # Example
1172    /// ```
1173    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1174    /// use google_cloud_vmwareengine_v1::Result;
1175    /// async fn sample(
1176    ///    client: &VmwareEngine
1177    /// ) -> Result<()> {
1178    ///     let response = client.show_vcenter_credentials()
1179    ///         /* set fields */
1180    ///         .send().await?;
1181    ///     println!("response {:?}", response);
1182    ///     Ok(())
1183    /// }
1184    /// ```
1185    pub fn show_vcenter_credentials(
1186        &self,
1187    ) -> super::builder::vmware_engine::ShowVcenterCredentials {
1188        super::builder::vmware_engine::ShowVcenterCredentials::new(self.inner.clone())
1189    }
1190
1191    /// Resets credentials of the NSX appliance.
1192    ///
1193    /// # Long running operations
1194    ///
1195    /// This method is used to start, and/or poll a [long-running Operation].
1196    /// The [Working with long-running operations] chapter in the [user guide]
1197    /// covers these operations in detail.
1198    ///
1199    /// [long-running operation]: https://google.aip.dev/151
1200    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1201    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1202    ///
1203    /// # Example
1204    /// ```
1205    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1206    /// use google_cloud_lro::Poller;
1207    /// use google_cloud_vmwareengine_v1::Result;
1208    /// async fn sample(
1209    ///    client: &VmwareEngine
1210    /// ) -> Result<()> {
1211    ///     let response = client.reset_nsx_credentials()
1212    ///         /* set fields */
1213    ///         .poller().until_done().await?;
1214    ///     println!("response {:?}", response);
1215    ///     Ok(())
1216    /// }
1217    /// ```
1218    pub fn reset_nsx_credentials(&self) -> super::builder::vmware_engine::ResetNsxCredentials {
1219        super::builder::vmware_engine::ResetNsxCredentials::new(self.inner.clone())
1220    }
1221
1222    /// Resets credentials of the Vcenter appliance.
1223    ///
1224    /// # Long running operations
1225    ///
1226    /// This method is used to start, and/or poll a [long-running Operation].
1227    /// The [Working with long-running operations] chapter in the [user guide]
1228    /// covers these operations in detail.
1229    ///
1230    /// [long-running operation]: https://google.aip.dev/151
1231    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1232    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1233    ///
1234    /// # Example
1235    /// ```
1236    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1237    /// use google_cloud_lro::Poller;
1238    /// use google_cloud_vmwareengine_v1::Result;
1239    /// async fn sample(
1240    ///    client: &VmwareEngine
1241    /// ) -> Result<()> {
1242    ///     let response = client.reset_vcenter_credentials()
1243    ///         /* set fields */
1244    ///         .poller().until_done().await?;
1245    ///     println!("response {:?}", response);
1246    ///     Ok(())
1247    /// }
1248    /// ```
1249    pub fn reset_vcenter_credentials(
1250        &self,
1251    ) -> super::builder::vmware_engine::ResetVcenterCredentials {
1252        super::builder::vmware_engine::ResetVcenterCredentials::new(self.inner.clone())
1253    }
1254
1255    /// Gets details of the `DnsForwarding` config.
1256    ///
1257    /// # Example
1258    /// ```
1259    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1260    /// use google_cloud_vmwareengine_v1::Result;
1261    /// async fn sample(
1262    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
1263    /// ) -> Result<()> {
1264    ///     let response = client.get_dns_forwarding()
1265    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/dnsForwarding"))
1266    ///         .send().await?;
1267    ///     println!("response {:?}", response);
1268    ///     Ok(())
1269    /// }
1270    /// ```
1271    pub fn get_dns_forwarding(&self) -> super::builder::vmware_engine::GetDnsForwarding {
1272        super::builder::vmware_engine::GetDnsForwarding::new(self.inner.clone())
1273    }
1274
1275    /// Updates the parameters of the `DnsForwarding` config, like associated
1276    /// domains. Only fields specified in `update_mask` are applied.
1277    ///
1278    /// # Long running operations
1279    ///
1280    /// This method is used to start, and/or poll a [long-running Operation].
1281    /// The [Working with long-running operations] chapter in the [user guide]
1282    /// covers these operations in detail.
1283    ///
1284    /// [long-running operation]: https://google.aip.dev/151
1285    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1286    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1287    ///
1288    /// # Example
1289    /// ```
1290    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1291    /// use google_cloud_lro::Poller;
1292    /// # extern crate wkt as google_cloud_wkt;
1293    /// use google_cloud_wkt::FieldMask;
1294    /// use google_cloud_vmwareengine_v1::model::DnsForwarding;
1295    /// use google_cloud_vmwareengine_v1::Result;
1296    /// async fn sample(
1297    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
1298    /// ) -> Result<()> {
1299    ///     let response = client.update_dns_forwarding()
1300    ///         .set_dns_forwarding(
1301    ///             DnsForwarding::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/dnsForwarding"))/* set fields */
1302    ///         )
1303    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1304    ///         .poller().until_done().await?;
1305    ///     println!("response {:?}", response);
1306    ///     Ok(())
1307    /// }
1308    /// ```
1309    pub fn update_dns_forwarding(&self) -> super::builder::vmware_engine::UpdateDnsForwarding {
1310        super::builder::vmware_engine::UpdateDnsForwarding::new(self.inner.clone())
1311    }
1312
1313    /// Retrieves a `NetworkPeering` resource by its resource name. The resource
1314    /// contains details of the network peering, such as peered
1315    /// networks, import and export custom route configurations, and peering state.
1316    /// NetworkPeering is a global resource and location can only be global.
1317    ///
1318    /// # Example
1319    /// ```
1320    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1321    /// use google_cloud_vmwareengine_v1::Result;
1322    /// async fn sample(
1323    ///    client: &VmwareEngine, project_id: &str, location_id: &str, network_peering_id: &str
1324    /// ) -> Result<()> {
1325    ///     let response = client.get_network_peering()
1326    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/networkPeerings/{network_peering_id}"))
1327    ///         .send().await?;
1328    ///     println!("response {:?}", response);
1329    ///     Ok(())
1330    /// }
1331    /// ```
1332    pub fn get_network_peering(&self) -> super::builder::vmware_engine::GetNetworkPeering {
1333        super::builder::vmware_engine::GetNetworkPeering::new(self.inner.clone())
1334    }
1335
1336    /// Lists `NetworkPeering` resources in a given project. NetworkPeering is a
1337    /// global resource and location can only be global.
1338    ///
1339    /// # Example
1340    /// ```
1341    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1342    /// use google_cloud_gax::paginator::ItemPaginator as _;
1343    /// use google_cloud_vmwareengine_v1::Result;
1344    /// async fn sample(
1345    ///    client: &VmwareEngine, project_id: &str, location_id: &str
1346    /// ) -> Result<()> {
1347    ///     let mut list = client.list_network_peerings()
1348    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
1349    ///         .by_item();
1350    ///     while let Some(item) = list.next().await.transpose()? {
1351    ///         println!("{:?}", item);
1352    ///     }
1353    ///     Ok(())
1354    /// }
1355    /// ```
1356    pub fn list_network_peerings(&self) -> super::builder::vmware_engine::ListNetworkPeerings {
1357        super::builder::vmware_engine::ListNetworkPeerings::new(self.inner.clone())
1358    }
1359
1360    /// Creates a new network peering between the peer network and VMware Engine
1361    /// network provided in a `NetworkPeering` resource. NetworkPeering is a
1362    /// global resource and location can only be global.
1363    ///
1364    /// # Long running operations
1365    ///
1366    /// This method is used to start, and/or poll a [long-running Operation].
1367    /// The [Working with long-running operations] chapter in the [user guide]
1368    /// covers these operations in detail.
1369    ///
1370    /// [long-running operation]: https://google.aip.dev/151
1371    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1372    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1373    ///
1374    /// # Example
1375    /// ```
1376    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1377    /// use google_cloud_lro::Poller;
1378    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
1379    /// use google_cloud_vmwareengine_v1::Result;
1380    /// async fn sample(
1381    ///    client: &VmwareEngine, parent: &str
1382    /// ) -> Result<()> {
1383    ///     let response = client.create_network_peering()
1384    ///         .set_parent(parent)
1385    ///         .set_network_peering(
1386    ///             NetworkPeering::new()/* set fields */
1387    ///         )
1388    ///         .poller().until_done().await?;
1389    ///     println!("response {:?}", response);
1390    ///     Ok(())
1391    /// }
1392    /// ```
1393    pub fn create_network_peering(&self) -> super::builder::vmware_engine::CreateNetworkPeering {
1394        super::builder::vmware_engine::CreateNetworkPeering::new(self.inner.clone())
1395    }
1396
1397    /// Deletes a `NetworkPeering` resource. When a network peering is deleted for
1398    /// a VMware Engine network, the peer network becomes inaccessible to that
1399    /// VMware Engine network. NetworkPeering is a global resource and location can
1400    /// only be global.
1401    ///
1402    /// # Long running operations
1403    ///
1404    /// This method is used to start, and/or poll a [long-running Operation].
1405    /// The [Working with long-running operations] chapter in the [user guide]
1406    /// covers these operations in detail.
1407    ///
1408    /// [long-running operation]: https://google.aip.dev/151
1409    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1410    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1411    ///
1412    /// # Example
1413    /// ```
1414    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1415    /// use google_cloud_lro::Poller;
1416    /// use google_cloud_vmwareengine_v1::Result;
1417    /// async fn sample(
1418    ///    client: &VmwareEngine, project_id: &str, location_id: &str, network_peering_id: &str
1419    /// ) -> Result<()> {
1420    ///     client.delete_network_peering()
1421    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/networkPeerings/{network_peering_id}"))
1422    ///         .poller().until_done().await?;
1423    ///     Ok(())
1424    /// }
1425    /// ```
1426    pub fn delete_network_peering(&self) -> super::builder::vmware_engine::DeleteNetworkPeering {
1427        super::builder::vmware_engine::DeleteNetworkPeering::new(self.inner.clone())
1428    }
1429
1430    /// Modifies a `NetworkPeering` resource. Only the `description` field can be
1431    /// updated. Only fields specified in `updateMask` are applied. NetworkPeering
1432    /// is a global resource and location can only be global.
1433    ///
1434    /// # Long running operations
1435    ///
1436    /// This method is used to start, and/or poll a [long-running Operation].
1437    /// The [Working with long-running operations] chapter in the [user guide]
1438    /// covers these operations in detail.
1439    ///
1440    /// [long-running operation]: https://google.aip.dev/151
1441    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1442    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1443    ///
1444    /// # Example
1445    /// ```
1446    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1447    /// use google_cloud_lro::Poller;
1448    /// # extern crate wkt as google_cloud_wkt;
1449    /// use google_cloud_wkt::FieldMask;
1450    /// use google_cloud_vmwareengine_v1::model::NetworkPeering;
1451    /// use google_cloud_vmwareengine_v1::Result;
1452    /// async fn sample(
1453    ///    client: &VmwareEngine, project_id: &str, location_id: &str, network_peering_id: &str
1454    /// ) -> Result<()> {
1455    ///     let response = client.update_network_peering()
1456    ///         .set_network_peering(
1457    ///             NetworkPeering::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPeerings/{network_peering_id}"))/* set fields */
1458    ///         )
1459    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1460    ///         .poller().until_done().await?;
1461    ///     println!("response {:?}", response);
1462    ///     Ok(())
1463    /// }
1464    /// ```
1465    pub fn update_network_peering(&self) -> super::builder::vmware_engine::UpdateNetworkPeering {
1466        super::builder::vmware_engine::UpdateNetworkPeering::new(self.inner.clone())
1467    }
1468
1469    /// Lists the network peering routes exchanged over a peering connection.
1470    /// NetworkPeering is a global resource and location can only be global.
1471    ///
1472    /// # Example
1473    /// ```
1474    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1475    /// use google_cloud_gax::paginator::ItemPaginator as _;
1476    /// use google_cloud_vmwareengine_v1::Result;
1477    /// async fn sample(
1478    ///    client: &VmwareEngine
1479    /// ) -> Result<()> {
1480    ///     let mut list = client.list_peering_routes()
1481    ///         /* set fields */
1482    ///         .by_item();
1483    ///     while let Some(item) = list.next().await.transpose()? {
1484    ///         println!("{:?}", item);
1485    ///     }
1486    ///     Ok(())
1487    /// }
1488    /// ```
1489    pub fn list_peering_routes(&self) -> super::builder::vmware_engine::ListPeeringRoutes {
1490        super::builder::vmware_engine::ListPeeringRoutes::new(self.inner.clone())
1491    }
1492
1493    /// Creates a new HCX activation key in a given private cloud.
1494    ///
1495    /// # Long running operations
1496    ///
1497    /// This method is used to start, and/or poll a [long-running Operation].
1498    /// The [Working with long-running operations] chapter in the [user guide]
1499    /// covers these operations in detail.
1500    ///
1501    /// [long-running operation]: https://google.aip.dev/151
1502    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1503    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1504    ///
1505    /// # Example
1506    /// ```
1507    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1508    /// use google_cloud_lro::Poller;
1509    /// use google_cloud_vmwareengine_v1::model::HcxActivationKey;
1510    /// use google_cloud_vmwareengine_v1::Result;
1511    /// async fn sample(
1512    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
1513    /// ) -> Result<()> {
1514    ///     let response = client.create_hcx_activation_key()
1515    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
1516    ///         .set_hcx_activation_key(
1517    ///             HcxActivationKey::new()/* set fields */
1518    ///         )
1519    ///         .poller().until_done().await?;
1520    ///     println!("response {:?}", response);
1521    ///     Ok(())
1522    /// }
1523    /// ```
1524    pub fn create_hcx_activation_key(
1525        &self,
1526    ) -> super::builder::vmware_engine::CreateHcxActivationKey {
1527        super::builder::vmware_engine::CreateHcxActivationKey::new(self.inner.clone())
1528    }
1529
1530    /// Lists `HcxActivationKey` resources in a given private cloud.
1531    ///
1532    /// # Example
1533    /// ```
1534    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1535    /// use google_cloud_gax::paginator::ItemPaginator as _;
1536    /// use google_cloud_vmwareengine_v1::Result;
1537    /// async fn sample(
1538    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
1539    /// ) -> Result<()> {
1540    ///     let mut list = client.list_hcx_activation_keys()
1541    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
1542    ///         .by_item();
1543    ///     while let Some(item) = list.next().await.transpose()? {
1544    ///         println!("{:?}", item);
1545    ///     }
1546    ///     Ok(())
1547    /// }
1548    /// ```
1549    pub fn list_hcx_activation_keys(&self) -> super::builder::vmware_engine::ListHcxActivationKeys {
1550        super::builder::vmware_engine::ListHcxActivationKeys::new(self.inner.clone())
1551    }
1552
1553    /// Retrieves a `HcxActivationKey` resource by its resource name.
1554    ///
1555    /// # Example
1556    /// ```
1557    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1558    /// use google_cloud_vmwareengine_v1::Result;
1559    /// async fn sample(
1560    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, hcx_activation_key_id: &str
1561    /// ) -> Result<()> {
1562    ///     let response = client.get_hcx_activation_key()
1563    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/hcxActivationKeys/{hcx_activation_key_id}"))
1564    ///         .send().await?;
1565    ///     println!("response {:?}", response);
1566    ///     Ok(())
1567    /// }
1568    /// ```
1569    pub fn get_hcx_activation_key(&self) -> super::builder::vmware_engine::GetHcxActivationKey {
1570        super::builder::vmware_engine::GetHcxActivationKey::new(self.inner.clone())
1571    }
1572
1573    /// Retrieves a `NetworkPolicy` resource by its resource name.
1574    ///
1575    /// # Example
1576    /// ```
1577    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1578    /// use google_cloud_vmwareengine_v1::Result;
1579    /// async fn sample(
1580    ///    client: &VmwareEngine, project_id: &str, location_id: &str, network_policy_id: &str
1581    /// ) -> Result<()> {
1582    ///     let response = client.get_network_policy()
1583    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}"))
1584    ///         .send().await?;
1585    ///     println!("response {:?}", response);
1586    ///     Ok(())
1587    /// }
1588    /// ```
1589    pub fn get_network_policy(&self) -> super::builder::vmware_engine::GetNetworkPolicy {
1590        super::builder::vmware_engine::GetNetworkPolicy::new(self.inner.clone())
1591    }
1592
1593    /// Lists `NetworkPolicy` resources in a specified project and location.
1594    ///
1595    /// # Example
1596    /// ```
1597    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1598    /// use google_cloud_gax::paginator::ItemPaginator as _;
1599    /// use google_cloud_vmwareengine_v1::Result;
1600    /// async fn sample(
1601    ///    client: &VmwareEngine, project_id: &str, location_id: &str
1602    /// ) -> Result<()> {
1603    ///     let mut list = client.list_network_policies()
1604    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
1605    ///         .by_item();
1606    ///     while let Some(item) = list.next().await.transpose()? {
1607    ///         println!("{:?}", item);
1608    ///     }
1609    ///     Ok(())
1610    /// }
1611    /// ```
1612    pub fn list_network_policies(&self) -> super::builder::vmware_engine::ListNetworkPolicies {
1613        super::builder::vmware_engine::ListNetworkPolicies::new(self.inner.clone())
1614    }
1615
1616    /// Creates a new network policy in a given VMware Engine network of a
1617    /// project and location (region). A new network policy cannot be created if
1618    /// another network policy already exists in the same scope.
1619    ///
1620    /// # Long running operations
1621    ///
1622    /// This method is used to start, and/or poll a [long-running Operation].
1623    /// The [Working with long-running operations] chapter in the [user guide]
1624    /// covers these operations in detail.
1625    ///
1626    /// [long-running operation]: https://google.aip.dev/151
1627    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1628    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1629    ///
1630    /// # Example
1631    /// ```
1632    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1633    /// use google_cloud_lro::Poller;
1634    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
1635    /// use google_cloud_vmwareengine_v1::Result;
1636    /// async fn sample(
1637    ///    client: &VmwareEngine, project_id: &str, location_id: &str
1638    /// ) -> Result<()> {
1639    ///     let response = client.create_network_policy()
1640    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
1641    ///         .set_network_policy(
1642    ///             NetworkPolicy::new()/* set fields */
1643    ///         )
1644    ///         .poller().until_done().await?;
1645    ///     println!("response {:?}", response);
1646    ///     Ok(())
1647    /// }
1648    /// ```
1649    pub fn create_network_policy(&self) -> super::builder::vmware_engine::CreateNetworkPolicy {
1650        super::builder::vmware_engine::CreateNetworkPolicy::new(self.inner.clone())
1651    }
1652
1653    /// Modifies a `NetworkPolicy` resource. Only the following fields can be
1654    /// updated: `internet_access`, `external_ip`, `edge_services_cidr`.
1655    /// Only fields specified in `updateMask` are applied. When updating a network
1656    /// policy, the external IP network service can only be disabled if there are
1657    /// no external IP addresses present in the scope of the policy. Also, a
1658    /// `NetworkService` cannot be updated when `NetworkService.state` is set
1659    /// to `RECONCILING`.
1660    ///
1661    /// During operation processing, the resource is temporarily in the `ACTIVE`
1662    /// state before the operation fully completes. For that period of time, you
1663    /// can't update the resource. Use the operation status to determine when the
1664    /// processing fully completes.
1665    ///
1666    /// # Long running operations
1667    ///
1668    /// This method is used to start, and/or poll a [long-running Operation].
1669    /// The [Working with long-running operations] chapter in the [user guide]
1670    /// covers these operations in detail.
1671    ///
1672    /// [long-running operation]: https://google.aip.dev/151
1673    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1674    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1675    ///
1676    /// # Example
1677    /// ```
1678    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1679    /// use google_cloud_lro::Poller;
1680    /// # extern crate wkt as google_cloud_wkt;
1681    /// use google_cloud_wkt::FieldMask;
1682    /// use google_cloud_vmwareengine_v1::model::NetworkPolicy;
1683    /// use google_cloud_vmwareengine_v1::Result;
1684    /// async fn sample(
1685    ///    client: &VmwareEngine, project_id: &str, location_id: &str, network_policy_id: &str
1686    /// ) -> Result<()> {
1687    ///     let response = client.update_network_policy()
1688    ///         .set_network_policy(
1689    ///             NetworkPolicy::new().set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}"))/* set fields */
1690    ///         )
1691    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1692    ///         .poller().until_done().await?;
1693    ///     println!("response {:?}", response);
1694    ///     Ok(())
1695    /// }
1696    /// ```
1697    pub fn update_network_policy(&self) -> super::builder::vmware_engine::UpdateNetworkPolicy {
1698        super::builder::vmware_engine::UpdateNetworkPolicy::new(self.inner.clone())
1699    }
1700
1701    /// Deletes a `NetworkPolicy` resource. A network policy cannot be deleted
1702    /// when `NetworkService.state` is set to `RECONCILING` for either its external
1703    /// IP or internet access service.
1704    ///
1705    /// # Long running operations
1706    ///
1707    /// This method is used to start, and/or poll a [long-running Operation].
1708    /// The [Working with long-running operations] chapter in the [user guide]
1709    /// covers these operations in detail.
1710    ///
1711    /// [long-running operation]: https://google.aip.dev/151
1712    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1713    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1714    ///
1715    /// # Example
1716    /// ```
1717    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1718    /// use google_cloud_lro::Poller;
1719    /// use google_cloud_vmwareengine_v1::Result;
1720    /// async fn sample(
1721    ///    client: &VmwareEngine, project_id: &str, location_id: &str, network_policy_id: &str
1722    /// ) -> Result<()> {
1723    ///     client.delete_network_policy()
1724    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/networkPolicies/{network_policy_id}"))
1725    ///         .poller().until_done().await?;
1726    ///     Ok(())
1727    /// }
1728    /// ```
1729    pub fn delete_network_policy(&self) -> super::builder::vmware_engine::DeleteNetworkPolicy {
1730        super::builder::vmware_engine::DeleteNetworkPolicy::new(self.inner.clone())
1731    }
1732
1733    /// Lists Consumer VPCs bound to Management DNS Zone of a given private cloud.
1734    ///
1735    /// # Example
1736    /// ```
1737    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1738    /// use google_cloud_gax::paginator::ItemPaginator as _;
1739    /// use google_cloud_vmwareengine_v1::Result;
1740    /// async fn sample(
1741    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
1742    /// ) -> Result<()> {
1743    ///     let mut list = client.list_management_dns_zone_bindings()
1744    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
1745    ///         .by_item();
1746    ///     while let Some(item) = list.next().await.transpose()? {
1747    ///         println!("{:?}", item);
1748    ///     }
1749    ///     Ok(())
1750    /// }
1751    /// ```
1752    pub fn list_management_dns_zone_bindings(
1753        &self,
1754    ) -> super::builder::vmware_engine::ListManagementDnsZoneBindings {
1755        super::builder::vmware_engine::ListManagementDnsZoneBindings::new(self.inner.clone())
1756    }
1757
1758    /// Retrieves a 'ManagementDnsZoneBinding' resource by its resource name.
1759    ///
1760    /// # Example
1761    /// ```
1762    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1763    /// use google_cloud_vmwareengine_v1::Result;
1764    /// async fn sample(
1765    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, management_dns_zone_binding_id: &str
1766    /// ) -> Result<()> {
1767    ///     let response = client.get_management_dns_zone_binding()
1768    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/managementDnsZoneBindings/{management_dns_zone_binding_id}"))
1769    ///         .send().await?;
1770    ///     println!("response {:?}", response);
1771    ///     Ok(())
1772    /// }
1773    /// ```
1774    pub fn get_management_dns_zone_binding(
1775        &self,
1776    ) -> super::builder::vmware_engine::GetManagementDnsZoneBinding {
1777        super::builder::vmware_engine::GetManagementDnsZoneBinding::new(self.inner.clone())
1778    }
1779
1780    /// Creates a new `ManagementDnsZoneBinding` resource in a private cloud.
1781    /// This RPC creates the DNS binding and the resource that represents the
1782    /// DNS binding of the consumer VPC network to the management DNS zone. A
1783    /// management DNS zone is the Cloud DNS cross-project binding zone that
1784    /// VMware Engine creates for each private cloud. It contains FQDNs and
1785    /// corresponding IP addresses for the private cloud's ESXi hosts and
1786    /// management VM appliances like vCenter and NSX Manager.
1787    ///
1788    /// # Long running operations
1789    ///
1790    /// This method is used to start, and/or poll a [long-running Operation].
1791    /// The [Working with long-running operations] chapter in the [user guide]
1792    /// covers these operations in detail.
1793    ///
1794    /// [long-running operation]: https://google.aip.dev/151
1795    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1796    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1797    ///
1798    /// # Example
1799    /// ```
1800    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1801    /// use google_cloud_lro::Poller;
1802    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
1803    /// use google_cloud_vmwareengine_v1::Result;
1804    /// async fn sample(
1805    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str
1806    /// ) -> Result<()> {
1807    ///     let response = client.create_management_dns_zone_binding()
1808    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}"))
1809    ///         .set_management_dns_zone_binding(
1810    ///             ManagementDnsZoneBinding::new()/* set fields */
1811    ///         )
1812    ///         .poller().until_done().await?;
1813    ///     println!("response {:?}", response);
1814    ///     Ok(())
1815    /// }
1816    /// ```
1817    pub fn create_management_dns_zone_binding(
1818        &self,
1819    ) -> super::builder::vmware_engine::CreateManagementDnsZoneBinding {
1820        super::builder::vmware_engine::CreateManagementDnsZoneBinding::new(self.inner.clone())
1821    }
1822
1823    /// Updates a `ManagementDnsZoneBinding` resource.
1824    /// Only fields specified in `update_mask` are applied.
1825    ///
1826    /// # Long running operations
1827    ///
1828    /// This method is used to start, and/or poll a [long-running Operation].
1829    /// The [Working with long-running operations] chapter in the [user guide]
1830    /// covers these operations in detail.
1831    ///
1832    /// [long-running operation]: https://google.aip.dev/151
1833    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1834    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1835    ///
1836    /// # Example
1837    /// ```
1838    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1839    /// use google_cloud_lro::Poller;
1840    /// # extern crate wkt as google_cloud_wkt;
1841    /// use google_cloud_wkt::FieldMask;
1842    /// use google_cloud_vmwareengine_v1::model::ManagementDnsZoneBinding;
1843    /// use google_cloud_vmwareengine_v1::Result;
1844    /// async fn sample(
1845    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, management_dns_zone_binding_id: &str
1846    /// ) -> Result<()> {
1847    ///     let response = client.update_management_dns_zone_binding()
1848    ///         .set_management_dns_zone_binding(
1849    ///             ManagementDnsZoneBinding::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/managementDnsZoneBindings/{management_dns_zone_binding_id}"))/* set fields */
1850    ///         )
1851    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1852    ///         .poller().until_done().await?;
1853    ///     println!("response {:?}", response);
1854    ///     Ok(())
1855    /// }
1856    /// ```
1857    pub fn update_management_dns_zone_binding(
1858        &self,
1859    ) -> super::builder::vmware_engine::UpdateManagementDnsZoneBinding {
1860        super::builder::vmware_engine::UpdateManagementDnsZoneBinding::new(self.inner.clone())
1861    }
1862
1863    /// Deletes a `ManagementDnsZoneBinding` resource. When a management DNS zone
1864    /// binding is deleted, the corresponding consumer VPC network is no longer
1865    /// bound to the management DNS zone.
1866    ///
1867    /// # Long running operations
1868    ///
1869    /// This method is used to start, and/or poll a [long-running Operation].
1870    /// The [Working with long-running operations] chapter in the [user guide]
1871    /// covers these operations in detail.
1872    ///
1873    /// [long-running operation]: https://google.aip.dev/151
1874    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1875    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1876    ///
1877    /// # Example
1878    /// ```
1879    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1880    /// use google_cloud_lro::Poller;
1881    /// use google_cloud_vmwareengine_v1::Result;
1882    /// async fn sample(
1883    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_cloud_id: &str, management_dns_zone_binding_id: &str
1884    /// ) -> Result<()> {
1885    ///     client.delete_management_dns_zone_binding()
1886    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateClouds/{private_cloud_id}/managementDnsZoneBindings/{management_dns_zone_binding_id}"))
1887    ///         .poller().until_done().await?;
1888    ///     Ok(())
1889    /// }
1890    /// ```
1891    pub fn delete_management_dns_zone_binding(
1892        &self,
1893    ) -> super::builder::vmware_engine::DeleteManagementDnsZoneBinding {
1894        super::builder::vmware_engine::DeleteManagementDnsZoneBinding::new(self.inner.clone())
1895    }
1896
1897    /// Retries to create a `ManagementDnsZoneBinding` resource that is
1898    /// in failed state.
1899    ///
1900    /// # Long running operations
1901    ///
1902    /// This method is used to start, and/or poll a [long-running Operation].
1903    /// The [Working with long-running operations] chapter in the [user guide]
1904    /// covers these operations in detail.
1905    ///
1906    /// [long-running operation]: https://google.aip.dev/151
1907    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1908    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1909    ///
1910    /// # Example
1911    /// ```
1912    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1913    /// use google_cloud_lro::Poller;
1914    /// use google_cloud_vmwareengine_v1::Result;
1915    /// async fn sample(
1916    ///    client: &VmwareEngine
1917    /// ) -> Result<()> {
1918    ///     let response = client.repair_management_dns_zone_binding()
1919    ///         /* set fields */
1920    ///         .poller().until_done().await?;
1921    ///     println!("response {:?}", response);
1922    ///     Ok(())
1923    /// }
1924    /// ```
1925    pub fn repair_management_dns_zone_binding(
1926        &self,
1927    ) -> super::builder::vmware_engine::RepairManagementDnsZoneBinding {
1928        super::builder::vmware_engine::RepairManagementDnsZoneBinding::new(self.inner.clone())
1929    }
1930
1931    /// Creates a new VMware Engine network that can be used by a private cloud.
1932    ///
1933    /// # Long running operations
1934    ///
1935    /// This method is used to start, and/or poll a [long-running Operation].
1936    /// The [Working with long-running operations] chapter in the [user guide]
1937    /// covers these operations in detail.
1938    ///
1939    /// [long-running operation]: https://google.aip.dev/151
1940    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1941    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1942    ///
1943    /// # Example
1944    /// ```
1945    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1946    /// use google_cloud_lro::Poller;
1947    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
1948    /// use google_cloud_vmwareengine_v1::Result;
1949    /// async fn sample(
1950    ///    client: &VmwareEngine, project_id: &str, location_id: &str
1951    /// ) -> Result<()> {
1952    ///     let response = client.create_vmware_engine_network()
1953    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
1954    ///         .set_vmware_engine_network(
1955    ///             VmwareEngineNetwork::new()/* set fields */
1956    ///         )
1957    ///         .poller().until_done().await?;
1958    ///     println!("response {:?}", response);
1959    ///     Ok(())
1960    /// }
1961    /// ```
1962    pub fn create_vmware_engine_network(
1963        &self,
1964    ) -> super::builder::vmware_engine::CreateVmwareEngineNetwork {
1965        super::builder::vmware_engine::CreateVmwareEngineNetwork::new(self.inner.clone())
1966    }
1967
1968    /// Modifies a VMware Engine network resource. Only the following fields can be
1969    /// updated: `description`. Only fields specified in `updateMask` are
1970    /// applied.
1971    ///
1972    /// # Long running operations
1973    ///
1974    /// This method is used to start, and/or poll a [long-running Operation].
1975    /// The [Working with long-running operations] chapter in the [user guide]
1976    /// covers these operations in detail.
1977    ///
1978    /// [long-running operation]: https://google.aip.dev/151
1979    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
1980    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
1981    ///
1982    /// # Example
1983    /// ```
1984    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
1985    /// use google_cloud_lro::Poller;
1986    /// # extern crate wkt as google_cloud_wkt;
1987    /// use google_cloud_wkt::FieldMask;
1988    /// use google_cloud_vmwareengine_v1::model::VmwareEngineNetwork;
1989    /// use google_cloud_vmwareengine_v1::Result;
1990    /// async fn sample(
1991    ///    client: &VmwareEngine, project_id: &str, location_id: &str, vmware_engine_network_id: &str
1992    /// ) -> Result<()> {
1993    ///     let response = client.update_vmware_engine_network()
1994    ///         .set_vmware_engine_network(
1995    ///             VmwareEngineNetwork::new().set_name(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"))/* set fields */
1996    ///         )
1997    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
1998    ///         .poller().until_done().await?;
1999    ///     println!("response {:?}", response);
2000    ///     Ok(())
2001    /// }
2002    /// ```
2003    pub fn update_vmware_engine_network(
2004        &self,
2005    ) -> super::builder::vmware_engine::UpdateVmwareEngineNetwork {
2006        super::builder::vmware_engine::UpdateVmwareEngineNetwork::new(self.inner.clone())
2007    }
2008
2009    /// Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware
2010    /// Engine network after all resources that refer to it are deleted. For
2011    /// example, a private cloud, a network peering, and a network policy can all
2012    /// refer to the same VMware Engine network.
2013    ///
2014    /// # Long running operations
2015    ///
2016    /// This method is used to start, and/or poll a [long-running Operation].
2017    /// The [Working with long-running operations] chapter in the [user guide]
2018    /// covers these operations in detail.
2019    ///
2020    /// [long-running operation]: https://google.aip.dev/151
2021    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2022    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2023    ///
2024    /// # Example
2025    /// ```
2026    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2027    /// use google_cloud_lro::Poller;
2028    /// use google_cloud_vmwareengine_v1::Result;
2029    /// async fn sample(
2030    ///    client: &VmwareEngine, project_id: &str, location_id: &str, vmware_engine_network_id: &str
2031    /// ) -> Result<()> {
2032    ///     client.delete_vmware_engine_network()
2033    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"))
2034    ///         .poller().until_done().await?;
2035    ///     Ok(())
2036    /// }
2037    /// ```
2038    pub fn delete_vmware_engine_network(
2039        &self,
2040    ) -> super::builder::vmware_engine::DeleteVmwareEngineNetwork {
2041        super::builder::vmware_engine::DeleteVmwareEngineNetwork::new(self.inner.clone())
2042    }
2043
2044    /// Retrieves a `VmwareEngineNetwork` resource by its resource name. The
2045    /// resource contains details of the VMware Engine network, such as its VMware
2046    /// Engine network type, peered networks in a service project, and state
2047    /// (for example, `CREATING`, `ACTIVE`, `DELETING`).
2048    ///
2049    /// # Example
2050    /// ```
2051    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2052    /// use google_cloud_vmwareengine_v1::Result;
2053    /// async fn sample(
2054    ///    client: &VmwareEngine, project_id: &str, location_id: &str, vmware_engine_network_id: &str
2055    /// ) -> Result<()> {
2056    ///     let response = client.get_vmware_engine_network()
2057    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/vmwareEngineNetworks/{vmware_engine_network_id}"))
2058    ///         .send().await?;
2059    ///     println!("response {:?}", response);
2060    ///     Ok(())
2061    /// }
2062    /// ```
2063    pub fn get_vmware_engine_network(
2064        &self,
2065    ) -> super::builder::vmware_engine::GetVmwareEngineNetwork {
2066        super::builder::vmware_engine::GetVmwareEngineNetwork::new(self.inner.clone())
2067    }
2068
2069    /// Lists `VmwareEngineNetwork` resources in a given project and location.
2070    ///
2071    /// # Example
2072    /// ```
2073    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2074    /// use google_cloud_gax::paginator::ItemPaginator as _;
2075    /// use google_cloud_vmwareengine_v1::Result;
2076    /// async fn sample(
2077    ///    client: &VmwareEngine, parent: &str
2078    /// ) -> Result<()> {
2079    ///     let mut list = client.list_vmware_engine_networks()
2080    ///         .set_parent(parent)
2081    ///         .by_item();
2082    ///     while let Some(item) = list.next().await.transpose()? {
2083    ///         println!("{:?}", item);
2084    ///     }
2085    ///     Ok(())
2086    /// }
2087    /// ```
2088    pub fn list_vmware_engine_networks(
2089        &self,
2090    ) -> super::builder::vmware_engine::ListVmwareEngineNetworks {
2091        super::builder::vmware_engine::ListVmwareEngineNetworks::new(self.inner.clone())
2092    }
2093
2094    /// Creates a new private connection that can be used for accessing private
2095    /// Clouds.
2096    ///
2097    /// # Long running operations
2098    ///
2099    /// This method is used to start, and/or poll a [long-running Operation].
2100    /// The [Working with long-running operations] chapter in the [user guide]
2101    /// covers these operations in detail.
2102    ///
2103    /// [long-running operation]: https://google.aip.dev/151
2104    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2105    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2106    ///
2107    /// # Example
2108    /// ```
2109    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2110    /// use google_cloud_lro::Poller;
2111    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
2112    /// use google_cloud_vmwareengine_v1::Result;
2113    /// async fn sample(
2114    ///    client: &VmwareEngine, project_id: &str, location_id: &str
2115    /// ) -> Result<()> {
2116    ///     let response = client.create_private_connection()
2117    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
2118    ///         .set_private_connection(
2119    ///             PrivateConnection::new()/* set fields */
2120    ///         )
2121    ///         .poller().until_done().await?;
2122    ///     println!("response {:?}", response);
2123    ///     Ok(())
2124    /// }
2125    /// ```
2126    pub fn create_private_connection(
2127        &self,
2128    ) -> super::builder::vmware_engine::CreatePrivateConnection {
2129        super::builder::vmware_engine::CreatePrivateConnection::new(self.inner.clone())
2130    }
2131
2132    /// Retrieves a `PrivateConnection` resource by its resource name. The resource
2133    /// contains details of the private connection, such as connected
2134    /// network, routing mode and state.
2135    ///
2136    /// # Example
2137    /// ```
2138    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2139    /// use google_cloud_vmwareengine_v1::Result;
2140    /// async fn sample(
2141    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_connection_id: &str
2142    /// ) -> Result<()> {
2143    ///     let response = client.get_private_connection()
2144    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateConnections/{private_connection_id}"))
2145    ///         .send().await?;
2146    ///     println!("response {:?}", response);
2147    ///     Ok(())
2148    /// }
2149    /// ```
2150    pub fn get_private_connection(&self) -> super::builder::vmware_engine::GetPrivateConnection {
2151        super::builder::vmware_engine::GetPrivateConnection::new(self.inner.clone())
2152    }
2153
2154    /// Lists `PrivateConnection` resources in a given project and location.
2155    ///
2156    /// # Example
2157    /// ```
2158    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2159    /// use google_cloud_gax::paginator::ItemPaginator as _;
2160    /// use google_cloud_vmwareengine_v1::Result;
2161    /// async fn sample(
2162    ///    client: &VmwareEngine, project_id: &str, location_id: &str
2163    /// ) -> Result<()> {
2164    ///     let mut list = client.list_private_connections()
2165    ///         .set_parent(format!("projects/{project_id}/locations/{location_id}"))
2166    ///         .by_item();
2167    ///     while let Some(item) = list.next().await.transpose()? {
2168    ///         println!("{:?}", item);
2169    ///     }
2170    ///     Ok(())
2171    /// }
2172    /// ```
2173    pub fn list_private_connections(
2174        &self,
2175    ) -> super::builder::vmware_engine::ListPrivateConnections {
2176        super::builder::vmware_engine::ListPrivateConnections::new(self.inner.clone())
2177    }
2178
2179    /// Modifies a `PrivateConnection` resource. Only `description` and
2180    /// `routing_mode` fields can be updated. Only fields specified in `updateMask`
2181    /// are applied.
2182    ///
2183    /// # Long running operations
2184    ///
2185    /// This method is used to start, and/or poll a [long-running Operation].
2186    /// The [Working with long-running operations] chapter in the [user guide]
2187    /// covers these operations in detail.
2188    ///
2189    /// [long-running operation]: https://google.aip.dev/151
2190    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2191    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2192    ///
2193    /// # Example
2194    /// ```
2195    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2196    /// use google_cloud_lro::Poller;
2197    /// # extern crate wkt as google_cloud_wkt;
2198    /// use google_cloud_wkt::FieldMask;
2199    /// use google_cloud_vmwareengine_v1::model::PrivateConnection;
2200    /// use google_cloud_vmwareengine_v1::Result;
2201    /// async fn sample(
2202    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_connection_id: &str
2203    /// ) -> Result<()> {
2204    ///     let response = client.update_private_connection()
2205    ///         .set_private_connection(
2206    ///             PrivateConnection::new().set_name(format!("projects/{project_id}/locations/{location_id}/privateConnections/{private_connection_id}"))/* set fields */
2207    ///         )
2208    ///         .set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
2209    ///         .poller().until_done().await?;
2210    ///     println!("response {:?}", response);
2211    ///     Ok(())
2212    /// }
2213    /// ```
2214    pub fn update_private_connection(
2215        &self,
2216    ) -> super::builder::vmware_engine::UpdatePrivateConnection {
2217        super::builder::vmware_engine::UpdatePrivateConnection::new(self.inner.clone())
2218    }
2219
2220    /// Deletes a `PrivateConnection` resource. When a private connection is
2221    /// deleted for a VMware Engine network, the connected network becomes
2222    /// inaccessible to that VMware Engine network.
2223    ///
2224    /// # Long running operations
2225    ///
2226    /// This method is used to start, and/or poll a [long-running Operation].
2227    /// The [Working with long-running operations] chapter in the [user guide]
2228    /// covers these operations in detail.
2229    ///
2230    /// [long-running operation]: https://google.aip.dev/151
2231    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2232    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2233    ///
2234    /// # Example
2235    /// ```
2236    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2237    /// use google_cloud_lro::Poller;
2238    /// use google_cloud_vmwareengine_v1::Result;
2239    /// async fn sample(
2240    ///    client: &VmwareEngine, project_id: &str, location_id: &str, private_connection_id: &str
2241    /// ) -> Result<()> {
2242    ///     client.delete_private_connection()
2243    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/privateConnections/{private_connection_id}"))
2244    ///         .poller().until_done().await?;
2245    ///     Ok(())
2246    /// }
2247    /// ```
2248    pub fn delete_private_connection(
2249        &self,
2250    ) -> super::builder::vmware_engine::DeletePrivateConnection {
2251        super::builder::vmware_engine::DeletePrivateConnection::new(self.inner.clone())
2252    }
2253
2254    /// Lists the private connection routes exchanged over a peering connection.
2255    ///
2256    /// # Example
2257    /// ```
2258    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2259    /// use google_cloud_gax::paginator::ItemPaginator as _;
2260    /// use google_cloud_vmwareengine_v1::Result;
2261    /// async fn sample(
2262    ///    client: &VmwareEngine
2263    /// ) -> Result<()> {
2264    ///     let mut list = client.list_private_connection_peering_routes()
2265    ///         /* set fields */
2266    ///         .by_item();
2267    ///     while let Some(item) = list.next().await.transpose()? {
2268    ///         println!("{:?}", item);
2269    ///     }
2270    ///     Ok(())
2271    /// }
2272    /// ```
2273    pub fn list_private_connection_peering_routes(
2274        &self,
2275    ) -> super::builder::vmware_engine::ListPrivateConnectionPeeringRoutes {
2276        super::builder::vmware_engine::ListPrivateConnectionPeeringRoutes::new(self.inner.clone())
2277    }
2278
2279    /// Grants the bind permission to the customer provided principal(user /
2280    /// service account) to bind their DNS zone with the intranet VPC associated
2281    /// with the project. DnsBindPermission is a global resource and location can
2282    /// only be global.
2283    ///
2284    /// # Long running operations
2285    ///
2286    /// This method is used to start, and/or poll a [long-running Operation].
2287    /// The [Working with long-running operations] chapter in the [user guide]
2288    /// covers these operations in detail.
2289    ///
2290    /// [long-running operation]: https://google.aip.dev/151
2291    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2292    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2293    ///
2294    /// # Example
2295    /// ```
2296    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2297    /// use google_cloud_lro::Poller;
2298    /// use google_cloud_vmwareengine_v1::Result;
2299    /// async fn sample(
2300    ///    client: &VmwareEngine
2301    /// ) -> Result<()> {
2302    ///     let response = client.grant_dns_bind_permission()
2303    ///         /* set fields */
2304    ///         .poller().until_done().await?;
2305    ///     println!("response {:?}", response);
2306    ///     Ok(())
2307    /// }
2308    /// ```
2309    pub fn grant_dns_bind_permission(
2310        &self,
2311    ) -> super::builder::vmware_engine::GrantDnsBindPermission {
2312        super::builder::vmware_engine::GrantDnsBindPermission::new(self.inner.clone())
2313    }
2314
2315    /// Gets all the principals having bind permission on the intranet VPC
2316    /// associated with the consumer project granted by the Grant API.
2317    /// DnsBindPermission is a global resource and location can only be global.
2318    ///
2319    /// # Example
2320    /// ```
2321    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2322    /// use google_cloud_vmwareengine_v1::Result;
2323    /// async fn sample(
2324    ///    client: &VmwareEngine, project_id: &str, location_id: &str
2325    /// ) -> Result<()> {
2326    ///     let response = client.get_dns_bind_permission()
2327    ///         .set_name(format!("projects/{project_id}/locations/{location_id}/dnsBindPermission"))
2328    ///         .send().await?;
2329    ///     println!("response {:?}", response);
2330    ///     Ok(())
2331    /// }
2332    /// ```
2333    pub fn get_dns_bind_permission(&self) -> super::builder::vmware_engine::GetDnsBindPermission {
2334        super::builder::vmware_engine::GetDnsBindPermission::new(self.inner.clone())
2335    }
2336
2337    /// Revokes the bind permission from the customer provided principal(user /
2338    /// service account) on the intranet VPC associated with the consumer project.
2339    /// DnsBindPermission is a global resource and location can only be global.
2340    ///
2341    /// # Long running operations
2342    ///
2343    /// This method is used to start, and/or poll a [long-running Operation].
2344    /// The [Working with long-running operations] chapter in the [user guide]
2345    /// covers these operations in detail.
2346    ///
2347    /// [long-running operation]: https://google.aip.dev/151
2348    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
2349    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
2350    ///
2351    /// # Example
2352    /// ```
2353    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2354    /// use google_cloud_lro::Poller;
2355    /// use google_cloud_vmwareengine_v1::Result;
2356    /// async fn sample(
2357    ///    client: &VmwareEngine
2358    /// ) -> Result<()> {
2359    ///     let response = client.revoke_dns_bind_permission()
2360    ///         /* set fields */
2361    ///         .poller().until_done().await?;
2362    ///     println!("response {:?}", response);
2363    ///     Ok(())
2364    /// }
2365    /// ```
2366    pub fn revoke_dns_bind_permission(
2367        &self,
2368    ) -> super::builder::vmware_engine::RevokeDnsBindPermission {
2369        super::builder::vmware_engine::RevokeDnsBindPermission::new(self.inner.clone())
2370    }
2371
2372    /// Lists information about the supported locations for this service.
2373    ///
2374    /// # Example
2375    /// ```
2376    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2377    /// use google_cloud_gax::paginator::ItemPaginator as _;
2378    /// use google_cloud_vmwareengine_v1::Result;
2379    /// async fn sample(
2380    ///    client: &VmwareEngine
2381    /// ) -> Result<()> {
2382    ///     let mut list = client.list_locations()
2383    ///         /* set fields */
2384    ///         .by_item();
2385    ///     while let Some(item) = list.next().await.transpose()? {
2386    ///         println!("{:?}", item);
2387    ///     }
2388    ///     Ok(())
2389    /// }
2390    /// ```
2391    pub fn list_locations(&self) -> super::builder::vmware_engine::ListLocations {
2392        super::builder::vmware_engine::ListLocations::new(self.inner.clone())
2393    }
2394
2395    /// Gets information about a location.
2396    ///
2397    /// # Example
2398    /// ```
2399    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2400    /// use google_cloud_vmwareengine_v1::Result;
2401    /// async fn sample(
2402    ///    client: &VmwareEngine
2403    /// ) -> Result<()> {
2404    ///     let response = client.get_location()
2405    ///         /* set fields */
2406    ///         .send().await?;
2407    ///     println!("response {:?}", response);
2408    ///     Ok(())
2409    /// }
2410    /// ```
2411    pub fn get_location(&self) -> super::builder::vmware_engine::GetLocation {
2412        super::builder::vmware_engine::GetLocation::new(self.inner.clone())
2413    }
2414
2415    /// Sets the access control policy on the specified resource. Replaces
2416    /// any existing policy.
2417    ///
2418    /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
2419    /// errors.
2420    ///
2421    /// # Example
2422    /// ```
2423    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2424    /// use google_cloud_vmwareengine_v1::Result;
2425    /// async fn sample(
2426    ///    client: &VmwareEngine
2427    /// ) -> Result<()> {
2428    ///     let response = client.set_iam_policy()
2429    ///         /* set fields */
2430    ///         .send().await?;
2431    ///     println!("response {:?}", response);
2432    ///     Ok(())
2433    /// }
2434    /// ```
2435    pub fn set_iam_policy(&self) -> super::builder::vmware_engine::SetIamPolicy {
2436        super::builder::vmware_engine::SetIamPolicy::new(self.inner.clone())
2437    }
2438
2439    /// Gets the access control policy for a resource. Returns an empty policy
2440    /// if the resource exists and does not have a policy set.
2441    ///
2442    /// # Example
2443    /// ```
2444    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2445    /// use google_cloud_vmwareengine_v1::Result;
2446    /// async fn sample(
2447    ///    client: &VmwareEngine
2448    /// ) -> Result<()> {
2449    ///     let response = client.get_iam_policy()
2450    ///         /* set fields */
2451    ///         .send().await?;
2452    ///     println!("response {:?}", response);
2453    ///     Ok(())
2454    /// }
2455    /// ```
2456    pub fn get_iam_policy(&self) -> super::builder::vmware_engine::GetIamPolicy {
2457        super::builder::vmware_engine::GetIamPolicy::new(self.inner.clone())
2458    }
2459
2460    /// Returns permissions that a caller has on the specified resource. If the
2461    /// resource does not exist, this will return an empty set of
2462    /// permissions, not a `NOT_FOUND` error.
2463    ///
2464    /// Note: This operation is designed to be used for building
2465    /// permission-aware UIs and command-line tools, not for authorization
2466    /// checking. This operation may "fail open" without warning.
2467    ///
2468    /// # Example
2469    /// ```
2470    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2471    /// use google_cloud_vmwareengine_v1::Result;
2472    /// async fn sample(
2473    ///    client: &VmwareEngine
2474    /// ) -> Result<()> {
2475    ///     let response = client.test_iam_permissions()
2476    ///         /* set fields */
2477    ///         .send().await?;
2478    ///     println!("response {:?}", response);
2479    ///     Ok(())
2480    /// }
2481    /// ```
2482    pub fn test_iam_permissions(&self) -> super::builder::vmware_engine::TestIamPermissions {
2483        super::builder::vmware_engine::TestIamPermissions::new(self.inner.clone())
2484    }
2485
2486    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2487    ///
2488    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2489    ///
2490    /// # Example
2491    /// ```
2492    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2493    /// use google_cloud_gax::paginator::ItemPaginator as _;
2494    /// use google_cloud_vmwareengine_v1::Result;
2495    /// async fn sample(
2496    ///    client: &VmwareEngine
2497    /// ) -> Result<()> {
2498    ///     let mut list = client.list_operations()
2499    ///         /* set fields */
2500    ///         .by_item();
2501    ///     while let Some(item) = list.next().await.transpose()? {
2502    ///         println!("{:?}", item);
2503    ///     }
2504    ///     Ok(())
2505    /// }
2506    /// ```
2507    pub fn list_operations(&self) -> super::builder::vmware_engine::ListOperations {
2508        super::builder::vmware_engine::ListOperations::new(self.inner.clone())
2509    }
2510
2511    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2512    ///
2513    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2514    ///
2515    /// # Example
2516    /// ```
2517    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2518    /// use google_cloud_vmwareengine_v1::Result;
2519    /// async fn sample(
2520    ///    client: &VmwareEngine
2521    /// ) -> Result<()> {
2522    ///     let response = client.get_operation()
2523    ///         /* set fields */
2524    ///         .send().await?;
2525    ///     println!("response {:?}", response);
2526    ///     Ok(())
2527    /// }
2528    /// ```
2529    pub fn get_operation(&self) -> super::builder::vmware_engine::GetOperation {
2530        super::builder::vmware_engine::GetOperation::new(self.inner.clone())
2531    }
2532
2533    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
2534    ///
2535    /// [google.longrunning.Operations]: google-cloud-longrunning::client::Operations
2536    ///
2537    /// # Example
2538    /// ```
2539    /// # use google_cloud_vmwareengine_v1::client::VmwareEngine;
2540    /// use google_cloud_vmwareengine_v1::Result;
2541    /// async fn sample(
2542    ///    client: &VmwareEngine
2543    /// ) -> Result<()> {
2544    ///     client.delete_operation()
2545    ///         /* set fields */
2546    ///         .send().await?;
2547    ///     Ok(())
2548    /// }
2549    /// ```
2550    pub fn delete_operation(&self) -> super::builder::vmware_engine::DeleteOperation {
2551        super::builder::vmware_engine::DeleteOperation::new(self.inner.clone())
2552    }
2553}