Skip to main content

google_cloud_vmwareengine_v1/
builder.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
17pub mod vmware_engine {
18    use crate::Result;
19
20    /// A builder for [VmwareEngine][crate::client::VmwareEngine].
21    ///
22    /// ```
23    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
24    /// # use google_cloud_vmwareengine_v1::*;
25    /// # use builder::vmware_engine::ClientBuilder;
26    /// # use client::VmwareEngine;
27    /// let builder : ClientBuilder = VmwareEngine::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://vmwareengine.googleapis.com")
30    ///     .build().await?;
31    /// # Ok(()) }
32    /// ```
33    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
34
35    pub(crate) mod client {
36        use super::super::super::client::VmwareEngine;
37        pub struct Factory;
38        impl crate::ClientFactory for Factory {
39            type Client = VmwareEngine;
40            type Credentials = gaxi::options::Credentials;
41            async fn build(
42                self,
43                config: gaxi::options::ClientConfig,
44            ) -> crate::ClientBuilderResult<Self::Client> {
45                Self::Client::new(config).await
46            }
47        }
48    }
49
50    /// Common implementation for [crate::client::VmwareEngine] request builders.
51    #[derive(Clone, Debug)]
52    pub(crate) struct RequestBuilder<R: std::default::Default> {
53        stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
54        request: R,
55        options: crate::RequestOptions,
56    }
57
58    impl<R> RequestBuilder<R>
59    where
60        R: std::default::Default,
61    {
62        pub(crate) fn new(
63            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
64        ) -> Self {
65            Self {
66                stub,
67                request: R::default(),
68                options: crate::RequestOptions::default(),
69            }
70        }
71    }
72
73    /// The request builder for [VmwareEngine::list_private_clouds][crate::client::VmwareEngine::list_private_clouds] calls.
74    ///
75    /// # Example
76    /// ```
77    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListPrivateClouds;
78    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
79    /// use google_cloud_gax::paginator::ItemPaginator;
80    ///
81    /// let builder = prepare_request_builder();
82    /// let mut items = builder.by_item();
83    /// while let Some(result) = items.next().await {
84    ///   let item = result?;
85    /// }
86    /// # Ok(()) }
87    ///
88    /// fn prepare_request_builder() -> ListPrivateClouds {
89    ///   # panic!();
90    ///   // ... details omitted ...
91    /// }
92    /// ```
93    #[derive(Clone, Debug)]
94    pub struct ListPrivateClouds(RequestBuilder<crate::model::ListPrivateCloudsRequest>);
95
96    impl ListPrivateClouds {
97        pub(crate) fn new(
98            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
99        ) -> Self {
100            Self(RequestBuilder::new(stub))
101        }
102
103        /// Sets the full request, replacing any prior values.
104        pub fn with_request<V: Into<crate::model::ListPrivateCloudsRequest>>(
105            mut self,
106            v: V,
107        ) -> Self {
108            self.0.request = v.into();
109            self
110        }
111
112        /// Sets all the options, replacing any prior values.
113        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
114            self.0.options = v.into();
115            self
116        }
117
118        /// Sends the request.
119        pub async fn send(self) -> Result<crate::model::ListPrivateCloudsResponse> {
120            (*self.0.stub)
121                .list_private_clouds(self.0.request, self.0.options)
122                .await
123                .map(crate::Response::into_body)
124        }
125
126        /// Streams each page in the collection.
127        pub fn by_page(
128            self,
129        ) -> impl google_cloud_gax::paginator::Paginator<
130            crate::model::ListPrivateCloudsResponse,
131            crate::Error,
132        > {
133            use std::clone::Clone;
134            let token = self.0.request.page_token.clone();
135            let execute = move |token: String| {
136                let mut builder = self.clone();
137                builder.0.request = builder.0.request.set_page_token(token);
138                builder.send()
139            };
140            google_cloud_gax::paginator::internal::new_paginator(token, execute)
141        }
142
143        /// Streams each item in the collection.
144        pub fn by_item(
145            self,
146        ) -> impl google_cloud_gax::paginator::ItemPaginator<
147            crate::model::ListPrivateCloudsResponse,
148            crate::Error,
149        > {
150            use google_cloud_gax::paginator::Paginator;
151            self.by_page().items()
152        }
153
154        /// Sets the value of [parent][crate::model::ListPrivateCloudsRequest::parent].
155        ///
156        /// This is a **required** field for requests.
157        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
158            self.0.request.parent = v.into();
159            self
160        }
161
162        /// Sets the value of [page_size][crate::model::ListPrivateCloudsRequest::page_size].
163        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
164            self.0.request.page_size = v.into();
165            self
166        }
167
168        /// Sets the value of [page_token][crate::model::ListPrivateCloudsRequest::page_token].
169        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
170            self.0.request.page_token = v.into();
171            self
172        }
173
174        /// Sets the value of [filter][crate::model::ListPrivateCloudsRequest::filter].
175        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
176            self.0.request.filter = v.into();
177            self
178        }
179
180        /// Sets the value of [order_by][crate::model::ListPrivateCloudsRequest::order_by].
181        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
182            self.0.request.order_by = v.into();
183            self
184        }
185    }
186
187    #[doc(hidden)]
188    impl crate::RequestBuilder for ListPrivateClouds {
189        fn request_options(&mut self) -> &mut crate::RequestOptions {
190            &mut self.0.options
191        }
192    }
193
194    /// The request builder for [VmwareEngine::get_private_cloud][crate::client::VmwareEngine::get_private_cloud] calls.
195    ///
196    /// # Example
197    /// ```
198    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetPrivateCloud;
199    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
200    ///
201    /// let builder = prepare_request_builder();
202    /// let response = builder.send().await?;
203    /// # Ok(()) }
204    ///
205    /// fn prepare_request_builder() -> GetPrivateCloud {
206    ///   # panic!();
207    ///   // ... details omitted ...
208    /// }
209    /// ```
210    #[derive(Clone, Debug)]
211    pub struct GetPrivateCloud(RequestBuilder<crate::model::GetPrivateCloudRequest>);
212
213    impl GetPrivateCloud {
214        pub(crate) fn new(
215            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
216        ) -> Self {
217            Self(RequestBuilder::new(stub))
218        }
219
220        /// Sets the full request, replacing any prior values.
221        pub fn with_request<V: Into<crate::model::GetPrivateCloudRequest>>(mut self, v: V) -> Self {
222            self.0.request = v.into();
223            self
224        }
225
226        /// Sets all the options, replacing any prior values.
227        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
228            self.0.options = v.into();
229            self
230        }
231
232        /// Sends the request.
233        pub async fn send(self) -> Result<crate::model::PrivateCloud> {
234            (*self.0.stub)
235                .get_private_cloud(self.0.request, self.0.options)
236                .await
237                .map(crate::Response::into_body)
238        }
239
240        /// Sets the value of [name][crate::model::GetPrivateCloudRequest::name].
241        ///
242        /// This is a **required** field for requests.
243        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
244            self.0.request.name = v.into();
245            self
246        }
247    }
248
249    #[doc(hidden)]
250    impl crate::RequestBuilder for GetPrivateCloud {
251        fn request_options(&mut self) -> &mut crate::RequestOptions {
252            &mut self.0.options
253        }
254    }
255
256    /// The request builder for [VmwareEngine::create_private_cloud][crate::client::VmwareEngine::create_private_cloud] calls.
257    ///
258    /// # Example
259    /// ```
260    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::CreatePrivateCloud;
261    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
262    /// use google_cloud_lro::Poller;
263    ///
264    /// let builder = prepare_request_builder();
265    /// let response = builder.poller().until_done().await?;
266    /// # Ok(()) }
267    ///
268    /// fn prepare_request_builder() -> CreatePrivateCloud {
269    ///   # panic!();
270    ///   // ... details omitted ...
271    /// }
272    /// ```
273    #[derive(Clone, Debug)]
274    pub struct CreatePrivateCloud(RequestBuilder<crate::model::CreatePrivateCloudRequest>);
275
276    impl CreatePrivateCloud {
277        pub(crate) fn new(
278            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
279        ) -> Self {
280            Self(RequestBuilder::new(stub))
281        }
282
283        /// Sets the full request, replacing any prior values.
284        pub fn with_request<V: Into<crate::model::CreatePrivateCloudRequest>>(
285            mut self,
286            v: V,
287        ) -> Self {
288            self.0.request = v.into();
289            self
290        }
291
292        /// Sets all the options, replacing any prior values.
293        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
294            self.0.options = v.into();
295            self
296        }
297
298        /// Sends the request.
299        ///
300        /// # Long running operations
301        ///
302        /// This starts, but does not poll, a longrunning operation. More information
303        /// on [create_private_cloud][crate::client::VmwareEngine::create_private_cloud].
304        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
305            (*self.0.stub)
306                .create_private_cloud(self.0.request, self.0.options)
307                .await
308                .map(crate::Response::into_body)
309        }
310
311        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_private_cloud`.
312        pub fn poller(
313            self,
314        ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
315        {
316            type Operation = google_cloud_lro::internal::Operation<
317                crate::model::PrivateCloud,
318                crate::model::OperationMetadata,
319            >;
320            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
321            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
322
323            let stub = self.0.stub.clone();
324            let mut options = self.0.options.clone();
325            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
326            let query = move |name| {
327                let stub = stub.clone();
328                let options = options.clone();
329                async {
330                    let op = GetOperation::new(stub)
331                        .set_name(name)
332                        .with_options(options)
333                        .send()
334                        .await?;
335                    Ok(Operation::new(op))
336                }
337            };
338
339            let start = move || async {
340                let op = self.send().await?;
341                Ok(Operation::new(op))
342            };
343
344            google_cloud_lro::internal::new_poller(
345                polling_error_policy,
346                polling_backoff_policy,
347                start,
348                query,
349            )
350        }
351
352        /// Sets the value of [parent][crate::model::CreatePrivateCloudRequest::parent].
353        ///
354        /// This is a **required** field for requests.
355        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
356            self.0.request.parent = v.into();
357            self
358        }
359
360        /// Sets the value of [private_cloud_id][crate::model::CreatePrivateCloudRequest::private_cloud_id].
361        ///
362        /// This is a **required** field for requests.
363        pub fn set_private_cloud_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
364            self.0.request.private_cloud_id = v.into();
365            self
366        }
367
368        /// Sets the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
369        ///
370        /// This is a **required** field for requests.
371        pub fn set_private_cloud<T>(mut self, v: T) -> Self
372        where
373            T: std::convert::Into<crate::model::PrivateCloud>,
374        {
375            self.0.request.private_cloud = std::option::Option::Some(v.into());
376            self
377        }
378
379        /// Sets or clears the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
380        ///
381        /// This is a **required** field for requests.
382        pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
383        where
384            T: std::convert::Into<crate::model::PrivateCloud>,
385        {
386            self.0.request.private_cloud = v.map(|x| x.into());
387            self
388        }
389
390        /// Sets the value of [request_id][crate::model::CreatePrivateCloudRequest::request_id].
391        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
392            self.0.request.request_id = v.into();
393            self
394        }
395
396        /// Sets the value of [validate_only][crate::model::CreatePrivateCloudRequest::validate_only].
397        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
398            self.0.request.validate_only = v.into();
399            self
400        }
401    }
402
403    #[doc(hidden)]
404    impl crate::RequestBuilder for CreatePrivateCloud {
405        fn request_options(&mut self) -> &mut crate::RequestOptions {
406            &mut self.0.options
407        }
408    }
409
410    /// The request builder for [VmwareEngine::update_private_cloud][crate::client::VmwareEngine::update_private_cloud] calls.
411    ///
412    /// # Example
413    /// ```
414    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdatePrivateCloud;
415    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
416    /// use google_cloud_lro::Poller;
417    ///
418    /// let builder = prepare_request_builder();
419    /// let response = builder.poller().until_done().await?;
420    /// # Ok(()) }
421    ///
422    /// fn prepare_request_builder() -> UpdatePrivateCloud {
423    ///   # panic!();
424    ///   // ... details omitted ...
425    /// }
426    /// ```
427    #[derive(Clone, Debug)]
428    pub struct UpdatePrivateCloud(RequestBuilder<crate::model::UpdatePrivateCloudRequest>);
429
430    impl UpdatePrivateCloud {
431        pub(crate) fn new(
432            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
433        ) -> Self {
434            Self(RequestBuilder::new(stub))
435        }
436
437        /// Sets the full request, replacing any prior values.
438        pub fn with_request<V: Into<crate::model::UpdatePrivateCloudRequest>>(
439            mut self,
440            v: V,
441        ) -> Self {
442            self.0.request = v.into();
443            self
444        }
445
446        /// Sets all the options, replacing any prior values.
447        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
448            self.0.options = v.into();
449            self
450        }
451
452        /// Sends the request.
453        ///
454        /// # Long running operations
455        ///
456        /// This starts, but does not poll, a longrunning operation. More information
457        /// on [update_private_cloud][crate::client::VmwareEngine::update_private_cloud].
458        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
459            (*self.0.stub)
460                .update_private_cloud(self.0.request, self.0.options)
461                .await
462                .map(crate::Response::into_body)
463        }
464
465        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_private_cloud`.
466        pub fn poller(
467            self,
468        ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
469        {
470            type Operation = google_cloud_lro::internal::Operation<
471                crate::model::PrivateCloud,
472                crate::model::OperationMetadata,
473            >;
474            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
475            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
476
477            let stub = self.0.stub.clone();
478            let mut options = self.0.options.clone();
479            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
480            let query = move |name| {
481                let stub = stub.clone();
482                let options = options.clone();
483                async {
484                    let op = GetOperation::new(stub)
485                        .set_name(name)
486                        .with_options(options)
487                        .send()
488                        .await?;
489                    Ok(Operation::new(op))
490                }
491            };
492
493            let start = move || async {
494                let op = self.send().await?;
495                Ok(Operation::new(op))
496            };
497
498            google_cloud_lro::internal::new_poller(
499                polling_error_policy,
500                polling_backoff_policy,
501                start,
502                query,
503            )
504        }
505
506        /// Sets the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
507        ///
508        /// This is a **required** field for requests.
509        pub fn set_private_cloud<T>(mut self, v: T) -> Self
510        where
511            T: std::convert::Into<crate::model::PrivateCloud>,
512        {
513            self.0.request.private_cloud = std::option::Option::Some(v.into());
514            self
515        }
516
517        /// Sets or clears the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
518        ///
519        /// This is a **required** field for requests.
520        pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
521        where
522            T: std::convert::Into<crate::model::PrivateCloud>,
523        {
524            self.0.request.private_cloud = v.map(|x| x.into());
525            self
526        }
527
528        /// Sets the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
529        ///
530        /// This is a **required** field for requests.
531        pub fn set_update_mask<T>(mut self, v: T) -> Self
532        where
533            T: std::convert::Into<wkt::FieldMask>,
534        {
535            self.0.request.update_mask = std::option::Option::Some(v.into());
536            self
537        }
538
539        /// Sets or clears the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
540        ///
541        /// This is a **required** field for requests.
542        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
543        where
544            T: std::convert::Into<wkt::FieldMask>,
545        {
546            self.0.request.update_mask = v.map(|x| x.into());
547            self
548        }
549
550        /// Sets the value of [request_id][crate::model::UpdatePrivateCloudRequest::request_id].
551        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
552            self.0.request.request_id = v.into();
553            self
554        }
555    }
556
557    #[doc(hidden)]
558    impl crate::RequestBuilder for UpdatePrivateCloud {
559        fn request_options(&mut self) -> &mut crate::RequestOptions {
560            &mut self.0.options
561        }
562    }
563
564    /// The request builder for [VmwareEngine::delete_private_cloud][crate::client::VmwareEngine::delete_private_cloud] calls.
565    ///
566    /// # Example
567    /// ```
568    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::DeletePrivateCloud;
569    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
570    /// use google_cloud_lro::Poller;
571    ///
572    /// let builder = prepare_request_builder();
573    /// let response = builder.poller().until_done().await?;
574    /// # Ok(()) }
575    ///
576    /// fn prepare_request_builder() -> DeletePrivateCloud {
577    ///   # panic!();
578    ///   // ... details omitted ...
579    /// }
580    /// ```
581    #[derive(Clone, Debug)]
582    pub struct DeletePrivateCloud(RequestBuilder<crate::model::DeletePrivateCloudRequest>);
583
584    impl DeletePrivateCloud {
585        pub(crate) fn new(
586            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
587        ) -> Self {
588            Self(RequestBuilder::new(stub))
589        }
590
591        /// Sets the full request, replacing any prior values.
592        pub fn with_request<V: Into<crate::model::DeletePrivateCloudRequest>>(
593            mut self,
594            v: V,
595        ) -> Self {
596            self.0.request = v.into();
597            self
598        }
599
600        /// Sets all the options, replacing any prior values.
601        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
602            self.0.options = v.into();
603            self
604        }
605
606        /// Sends the request.
607        ///
608        /// # Long running operations
609        ///
610        /// This starts, but does not poll, a longrunning operation. More information
611        /// on [delete_private_cloud][crate::client::VmwareEngine::delete_private_cloud].
612        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
613            (*self.0.stub)
614                .delete_private_cloud(self.0.request, self.0.options)
615                .await
616                .map(crate::Response::into_body)
617        }
618
619        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_private_cloud`.
620        pub fn poller(
621            self,
622        ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
623        {
624            type Operation = google_cloud_lro::internal::Operation<
625                crate::model::PrivateCloud,
626                crate::model::OperationMetadata,
627            >;
628            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
629            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
630
631            let stub = self.0.stub.clone();
632            let mut options = self.0.options.clone();
633            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
634            let query = move |name| {
635                let stub = stub.clone();
636                let options = options.clone();
637                async {
638                    let op = GetOperation::new(stub)
639                        .set_name(name)
640                        .with_options(options)
641                        .send()
642                        .await?;
643                    Ok(Operation::new(op))
644                }
645            };
646
647            let start = move || async {
648                let op = self.send().await?;
649                Ok(Operation::new(op))
650            };
651
652            google_cloud_lro::internal::new_poller(
653                polling_error_policy,
654                polling_backoff_policy,
655                start,
656                query,
657            )
658        }
659
660        /// Sets the value of [name][crate::model::DeletePrivateCloudRequest::name].
661        ///
662        /// This is a **required** field for requests.
663        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
664            self.0.request.name = v.into();
665            self
666        }
667
668        /// Sets the value of [request_id][crate::model::DeletePrivateCloudRequest::request_id].
669        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
670            self.0.request.request_id = v.into();
671            self
672        }
673
674        /// Sets the value of [force][crate::model::DeletePrivateCloudRequest::force].
675        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
676            self.0.request.force = v.into();
677            self
678        }
679
680        /// Sets the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
681        pub fn set_delay_hours<T>(mut self, v: T) -> Self
682        where
683            T: std::convert::Into<i32>,
684        {
685            self.0.request.delay_hours = std::option::Option::Some(v.into());
686            self
687        }
688
689        /// Sets or clears the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
690        pub fn set_or_clear_delay_hours<T>(mut self, v: std::option::Option<T>) -> Self
691        where
692            T: std::convert::Into<i32>,
693        {
694            self.0.request.delay_hours = v.map(|x| x.into());
695            self
696        }
697    }
698
699    #[doc(hidden)]
700    impl crate::RequestBuilder for DeletePrivateCloud {
701        fn request_options(&mut self) -> &mut crate::RequestOptions {
702            &mut self.0.options
703        }
704    }
705
706    /// The request builder for [VmwareEngine::undelete_private_cloud][crate::client::VmwareEngine::undelete_private_cloud] calls.
707    ///
708    /// # Example
709    /// ```
710    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UndeletePrivateCloud;
711    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
712    /// use google_cloud_lro::Poller;
713    ///
714    /// let builder = prepare_request_builder();
715    /// let response = builder.poller().until_done().await?;
716    /// # Ok(()) }
717    ///
718    /// fn prepare_request_builder() -> UndeletePrivateCloud {
719    ///   # panic!();
720    ///   // ... details omitted ...
721    /// }
722    /// ```
723    #[derive(Clone, Debug)]
724    pub struct UndeletePrivateCloud(RequestBuilder<crate::model::UndeletePrivateCloudRequest>);
725
726    impl UndeletePrivateCloud {
727        pub(crate) fn new(
728            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
729        ) -> Self {
730            Self(RequestBuilder::new(stub))
731        }
732
733        /// Sets the full request, replacing any prior values.
734        pub fn with_request<V: Into<crate::model::UndeletePrivateCloudRequest>>(
735            mut self,
736            v: V,
737        ) -> Self {
738            self.0.request = v.into();
739            self
740        }
741
742        /// Sets all the options, replacing any prior values.
743        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
744            self.0.options = v.into();
745            self
746        }
747
748        /// Sends the request.
749        ///
750        /// # Long running operations
751        ///
752        /// This starts, but does not poll, a longrunning operation. More information
753        /// on [undelete_private_cloud][crate::client::VmwareEngine::undelete_private_cloud].
754        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
755            (*self.0.stub)
756                .undelete_private_cloud(self.0.request, self.0.options)
757                .await
758                .map(crate::Response::into_body)
759        }
760
761        /// Creates a [Poller][google_cloud_lro::Poller] to work with `undelete_private_cloud`.
762        pub fn poller(
763            self,
764        ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
765        {
766            type Operation = google_cloud_lro::internal::Operation<
767                crate::model::PrivateCloud,
768                crate::model::OperationMetadata,
769            >;
770            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
771            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
772
773            let stub = self.0.stub.clone();
774            let mut options = self.0.options.clone();
775            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
776            let query = move |name| {
777                let stub = stub.clone();
778                let options = options.clone();
779                async {
780                    let op = GetOperation::new(stub)
781                        .set_name(name)
782                        .with_options(options)
783                        .send()
784                        .await?;
785                    Ok(Operation::new(op))
786                }
787            };
788
789            let start = move || async {
790                let op = self.send().await?;
791                Ok(Operation::new(op))
792            };
793
794            google_cloud_lro::internal::new_poller(
795                polling_error_policy,
796                polling_backoff_policy,
797                start,
798                query,
799            )
800        }
801
802        /// Sets the value of [name][crate::model::UndeletePrivateCloudRequest::name].
803        ///
804        /// This is a **required** field for requests.
805        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
806            self.0.request.name = v.into();
807            self
808        }
809
810        /// Sets the value of [request_id][crate::model::UndeletePrivateCloudRequest::request_id].
811        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
812            self.0.request.request_id = v.into();
813            self
814        }
815    }
816
817    #[doc(hidden)]
818    impl crate::RequestBuilder for UndeletePrivateCloud {
819        fn request_options(&mut self) -> &mut crate::RequestOptions {
820            &mut self.0.options
821        }
822    }
823
824    /// The request builder for [VmwareEngine::list_clusters][crate::client::VmwareEngine::list_clusters] calls.
825    ///
826    /// # Example
827    /// ```
828    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListClusters;
829    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
830    /// use google_cloud_gax::paginator::ItemPaginator;
831    ///
832    /// let builder = prepare_request_builder();
833    /// let mut items = builder.by_item();
834    /// while let Some(result) = items.next().await {
835    ///   let item = result?;
836    /// }
837    /// # Ok(()) }
838    ///
839    /// fn prepare_request_builder() -> ListClusters {
840    ///   # panic!();
841    ///   // ... details omitted ...
842    /// }
843    /// ```
844    #[derive(Clone, Debug)]
845    pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
846
847    impl ListClusters {
848        pub(crate) fn new(
849            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
850        ) -> Self {
851            Self(RequestBuilder::new(stub))
852        }
853
854        /// Sets the full request, replacing any prior values.
855        pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
856            self.0.request = v.into();
857            self
858        }
859
860        /// Sets all the options, replacing any prior values.
861        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
862            self.0.options = v.into();
863            self
864        }
865
866        /// Sends the request.
867        pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
868            (*self.0.stub)
869                .list_clusters(self.0.request, self.0.options)
870                .await
871                .map(crate::Response::into_body)
872        }
873
874        /// Streams each page in the collection.
875        pub fn by_page(
876            self,
877        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListClustersResponse, crate::Error>
878        {
879            use std::clone::Clone;
880            let token = self.0.request.page_token.clone();
881            let execute = move |token: String| {
882                let mut builder = self.clone();
883                builder.0.request = builder.0.request.set_page_token(token);
884                builder.send()
885            };
886            google_cloud_gax::paginator::internal::new_paginator(token, execute)
887        }
888
889        /// Streams each item in the collection.
890        pub fn by_item(
891            self,
892        ) -> impl google_cloud_gax::paginator::ItemPaginator<
893            crate::model::ListClustersResponse,
894            crate::Error,
895        > {
896            use google_cloud_gax::paginator::Paginator;
897            self.by_page().items()
898        }
899
900        /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
901        ///
902        /// This is a **required** field for requests.
903        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
904            self.0.request.parent = v.into();
905            self
906        }
907
908        /// Sets the value of [page_size][crate::model::ListClustersRequest::page_size].
909        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
910            self.0.request.page_size = v.into();
911            self
912        }
913
914        /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
915        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
916            self.0.request.page_token = v.into();
917            self
918        }
919
920        /// Sets the value of [filter][crate::model::ListClustersRequest::filter].
921        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
922            self.0.request.filter = v.into();
923            self
924        }
925
926        /// Sets the value of [order_by][crate::model::ListClustersRequest::order_by].
927        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
928            self.0.request.order_by = v.into();
929            self
930        }
931    }
932
933    #[doc(hidden)]
934    impl crate::RequestBuilder for ListClusters {
935        fn request_options(&mut self) -> &mut crate::RequestOptions {
936            &mut self.0.options
937        }
938    }
939
940    /// The request builder for [VmwareEngine::get_cluster][crate::client::VmwareEngine::get_cluster] calls.
941    ///
942    /// # Example
943    /// ```
944    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetCluster;
945    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
946    ///
947    /// let builder = prepare_request_builder();
948    /// let response = builder.send().await?;
949    /// # Ok(()) }
950    ///
951    /// fn prepare_request_builder() -> GetCluster {
952    ///   # panic!();
953    ///   // ... details omitted ...
954    /// }
955    /// ```
956    #[derive(Clone, Debug)]
957    pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
958
959    impl GetCluster {
960        pub(crate) fn new(
961            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
962        ) -> Self {
963            Self(RequestBuilder::new(stub))
964        }
965
966        /// Sets the full request, replacing any prior values.
967        pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
968            self.0.request = v.into();
969            self
970        }
971
972        /// Sets all the options, replacing any prior values.
973        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
974            self.0.options = v.into();
975            self
976        }
977
978        /// Sends the request.
979        pub async fn send(self) -> Result<crate::model::Cluster> {
980            (*self.0.stub)
981                .get_cluster(self.0.request, self.0.options)
982                .await
983                .map(crate::Response::into_body)
984        }
985
986        /// Sets the value of [name][crate::model::GetClusterRequest::name].
987        ///
988        /// This is a **required** field for requests.
989        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
990            self.0.request.name = v.into();
991            self
992        }
993    }
994
995    #[doc(hidden)]
996    impl crate::RequestBuilder for GetCluster {
997        fn request_options(&mut self) -> &mut crate::RequestOptions {
998            &mut self.0.options
999        }
1000    }
1001
1002    /// The request builder for [VmwareEngine::create_cluster][crate::client::VmwareEngine::create_cluster] calls.
1003    ///
1004    /// # Example
1005    /// ```
1006    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::CreateCluster;
1007    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
1008    /// use google_cloud_lro::Poller;
1009    ///
1010    /// let builder = prepare_request_builder();
1011    /// let response = builder.poller().until_done().await?;
1012    /// # Ok(()) }
1013    ///
1014    /// fn prepare_request_builder() -> CreateCluster {
1015    ///   # panic!();
1016    ///   // ... details omitted ...
1017    /// }
1018    /// ```
1019    #[derive(Clone, Debug)]
1020    pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
1021
1022    impl CreateCluster {
1023        pub(crate) fn new(
1024            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1025        ) -> Self {
1026            Self(RequestBuilder::new(stub))
1027        }
1028
1029        /// Sets the full request, replacing any prior values.
1030        pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
1031            self.0.request = v.into();
1032            self
1033        }
1034
1035        /// Sets all the options, replacing any prior values.
1036        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1037            self.0.options = v.into();
1038            self
1039        }
1040
1041        /// Sends the request.
1042        ///
1043        /// # Long running operations
1044        ///
1045        /// This starts, but does not poll, a longrunning operation. More information
1046        /// on [create_cluster][crate::client::VmwareEngine::create_cluster].
1047        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1048            (*self.0.stub)
1049                .create_cluster(self.0.request, self.0.options)
1050                .await
1051                .map(crate::Response::into_body)
1052        }
1053
1054        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_cluster`.
1055        pub fn poller(
1056            self,
1057        ) -> impl google_cloud_lro::Poller<crate::model::Cluster, crate::model::OperationMetadata>
1058        {
1059            type Operation = google_cloud_lro::internal::Operation<
1060                crate::model::Cluster,
1061                crate::model::OperationMetadata,
1062            >;
1063            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1064            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1065
1066            let stub = self.0.stub.clone();
1067            let mut options = self.0.options.clone();
1068            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1069            let query = move |name| {
1070                let stub = stub.clone();
1071                let options = options.clone();
1072                async {
1073                    let op = GetOperation::new(stub)
1074                        .set_name(name)
1075                        .with_options(options)
1076                        .send()
1077                        .await?;
1078                    Ok(Operation::new(op))
1079                }
1080            };
1081
1082            let start = move || async {
1083                let op = self.send().await?;
1084                Ok(Operation::new(op))
1085            };
1086
1087            google_cloud_lro::internal::new_poller(
1088                polling_error_policy,
1089                polling_backoff_policy,
1090                start,
1091                query,
1092            )
1093        }
1094
1095        /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
1096        ///
1097        /// This is a **required** field for requests.
1098        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1099            self.0.request.parent = v.into();
1100            self
1101        }
1102
1103        /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
1104        ///
1105        /// This is a **required** field for requests.
1106        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1107            self.0.request.cluster_id = v.into();
1108            self
1109        }
1110
1111        /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
1112        ///
1113        /// This is a **required** field for requests.
1114        pub fn set_cluster<T>(mut self, v: T) -> Self
1115        where
1116            T: std::convert::Into<crate::model::Cluster>,
1117        {
1118            self.0.request.cluster = std::option::Option::Some(v.into());
1119            self
1120        }
1121
1122        /// Sets or clears the value of [cluster][crate::model::CreateClusterRequest::cluster].
1123        ///
1124        /// This is a **required** field for requests.
1125        pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1126        where
1127            T: std::convert::Into<crate::model::Cluster>,
1128        {
1129            self.0.request.cluster = v.map(|x| x.into());
1130            self
1131        }
1132
1133        /// Sets the value of [request_id][crate::model::CreateClusterRequest::request_id].
1134        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1135            self.0.request.request_id = v.into();
1136            self
1137        }
1138
1139        /// Sets the value of [validate_only][crate::model::CreateClusterRequest::validate_only].
1140        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1141            self.0.request.validate_only = v.into();
1142            self
1143        }
1144    }
1145
1146    #[doc(hidden)]
1147    impl crate::RequestBuilder for CreateCluster {
1148        fn request_options(&mut self) -> &mut crate::RequestOptions {
1149            &mut self.0.options
1150        }
1151    }
1152
1153    /// The request builder for [VmwareEngine::update_cluster][crate::client::VmwareEngine::update_cluster] calls.
1154    ///
1155    /// # Example
1156    /// ```
1157    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdateCluster;
1158    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
1159    /// use google_cloud_lro::Poller;
1160    ///
1161    /// let builder = prepare_request_builder();
1162    /// let response = builder.poller().until_done().await?;
1163    /// # Ok(()) }
1164    ///
1165    /// fn prepare_request_builder() -> UpdateCluster {
1166    ///   # panic!();
1167    ///   // ... details omitted ...
1168    /// }
1169    /// ```
1170    #[derive(Clone, Debug)]
1171    pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
1172
1173    impl UpdateCluster {
1174        pub(crate) fn new(
1175            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1176        ) -> Self {
1177            Self(RequestBuilder::new(stub))
1178        }
1179
1180        /// Sets the full request, replacing any prior values.
1181        pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
1182            self.0.request = v.into();
1183            self
1184        }
1185
1186        /// Sets all the options, replacing any prior values.
1187        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1188            self.0.options = v.into();
1189            self
1190        }
1191
1192        /// Sends the request.
1193        ///
1194        /// # Long running operations
1195        ///
1196        /// This starts, but does not poll, a longrunning operation. More information
1197        /// on [update_cluster][crate::client::VmwareEngine::update_cluster].
1198        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1199            (*self.0.stub)
1200                .update_cluster(self.0.request, self.0.options)
1201                .await
1202                .map(crate::Response::into_body)
1203        }
1204
1205        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_cluster`.
1206        pub fn poller(
1207            self,
1208        ) -> impl google_cloud_lro::Poller<crate::model::Cluster, crate::model::OperationMetadata>
1209        {
1210            type Operation = google_cloud_lro::internal::Operation<
1211                crate::model::Cluster,
1212                crate::model::OperationMetadata,
1213            >;
1214            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1215            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1216
1217            let stub = self.0.stub.clone();
1218            let mut options = self.0.options.clone();
1219            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1220            let query = move |name| {
1221                let stub = stub.clone();
1222                let options = options.clone();
1223                async {
1224                    let op = GetOperation::new(stub)
1225                        .set_name(name)
1226                        .with_options(options)
1227                        .send()
1228                        .await?;
1229                    Ok(Operation::new(op))
1230                }
1231            };
1232
1233            let start = move || async {
1234                let op = self.send().await?;
1235                Ok(Operation::new(op))
1236            };
1237
1238            google_cloud_lro::internal::new_poller(
1239                polling_error_policy,
1240                polling_backoff_policy,
1241                start,
1242                query,
1243            )
1244        }
1245
1246        /// Sets the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
1247        ///
1248        /// This is a **required** field for requests.
1249        pub fn set_update_mask<T>(mut self, v: T) -> Self
1250        where
1251            T: std::convert::Into<wkt::FieldMask>,
1252        {
1253            self.0.request.update_mask = std::option::Option::Some(v.into());
1254            self
1255        }
1256
1257        /// Sets or clears the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
1258        ///
1259        /// This is a **required** field for requests.
1260        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1261        where
1262            T: std::convert::Into<wkt::FieldMask>,
1263        {
1264            self.0.request.update_mask = v.map(|x| x.into());
1265            self
1266        }
1267
1268        /// Sets the value of [cluster][crate::model::UpdateClusterRequest::cluster].
1269        ///
1270        /// This is a **required** field for requests.
1271        pub fn set_cluster<T>(mut self, v: T) -> Self
1272        where
1273            T: std::convert::Into<crate::model::Cluster>,
1274        {
1275            self.0.request.cluster = std::option::Option::Some(v.into());
1276            self
1277        }
1278
1279        /// Sets or clears the value of [cluster][crate::model::UpdateClusterRequest::cluster].
1280        ///
1281        /// This is a **required** field for requests.
1282        pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1283        where
1284            T: std::convert::Into<crate::model::Cluster>,
1285        {
1286            self.0.request.cluster = v.map(|x| x.into());
1287            self
1288        }
1289
1290        /// Sets the value of [request_id][crate::model::UpdateClusterRequest::request_id].
1291        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1292            self.0.request.request_id = v.into();
1293            self
1294        }
1295
1296        /// Sets the value of [validate_only][crate::model::UpdateClusterRequest::validate_only].
1297        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1298            self.0.request.validate_only = v.into();
1299            self
1300        }
1301    }
1302
1303    #[doc(hidden)]
1304    impl crate::RequestBuilder for UpdateCluster {
1305        fn request_options(&mut self) -> &mut crate::RequestOptions {
1306            &mut self.0.options
1307        }
1308    }
1309
1310    /// The request builder for [VmwareEngine::delete_cluster][crate::client::VmwareEngine::delete_cluster] calls.
1311    ///
1312    /// # Example
1313    /// ```
1314    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::DeleteCluster;
1315    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
1316    /// use google_cloud_lro::Poller;
1317    ///
1318    /// let builder = prepare_request_builder();
1319    /// let response = builder.poller().until_done().await?;
1320    /// # Ok(()) }
1321    ///
1322    /// fn prepare_request_builder() -> DeleteCluster {
1323    ///   # panic!();
1324    ///   // ... details omitted ...
1325    /// }
1326    /// ```
1327    #[derive(Clone, Debug)]
1328    pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1329
1330    impl DeleteCluster {
1331        pub(crate) fn new(
1332            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1333        ) -> Self {
1334            Self(RequestBuilder::new(stub))
1335        }
1336
1337        /// Sets the full request, replacing any prior values.
1338        pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1339            self.0.request = v.into();
1340            self
1341        }
1342
1343        /// Sets all the options, replacing any prior values.
1344        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1345            self.0.options = v.into();
1346            self
1347        }
1348
1349        /// Sends the request.
1350        ///
1351        /// # Long running operations
1352        ///
1353        /// This starts, but does not poll, a longrunning operation. More information
1354        /// on [delete_cluster][crate::client::VmwareEngine::delete_cluster].
1355        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1356            (*self.0.stub)
1357                .delete_cluster(self.0.request, self.0.options)
1358                .await
1359                .map(crate::Response::into_body)
1360        }
1361
1362        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_cluster`.
1363        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1364            type Operation =
1365                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1366            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1367            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1368
1369            let stub = self.0.stub.clone();
1370            let mut options = self.0.options.clone();
1371            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1372            let query = move |name| {
1373                let stub = stub.clone();
1374                let options = options.clone();
1375                async {
1376                    let op = GetOperation::new(stub)
1377                        .set_name(name)
1378                        .with_options(options)
1379                        .send()
1380                        .await?;
1381                    Ok(Operation::new(op))
1382                }
1383            };
1384
1385            let start = move || async {
1386                let op = self.send().await?;
1387                Ok(Operation::new(op))
1388            };
1389
1390            google_cloud_lro::internal::new_unit_response_poller(
1391                polling_error_policy,
1392                polling_backoff_policy,
1393                start,
1394                query,
1395            )
1396        }
1397
1398        /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
1399        ///
1400        /// This is a **required** field for requests.
1401        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1402            self.0.request.name = v.into();
1403            self
1404        }
1405
1406        /// Sets the value of [request_id][crate::model::DeleteClusterRequest::request_id].
1407        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1408            self.0.request.request_id = v.into();
1409            self
1410        }
1411    }
1412
1413    #[doc(hidden)]
1414    impl crate::RequestBuilder for DeleteCluster {
1415        fn request_options(&mut self) -> &mut crate::RequestOptions {
1416            &mut self.0.options
1417        }
1418    }
1419
1420    /// The request builder for [VmwareEngine::list_nodes][crate::client::VmwareEngine::list_nodes] calls.
1421    ///
1422    /// # Example
1423    /// ```
1424    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListNodes;
1425    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
1426    /// use google_cloud_gax::paginator::ItemPaginator;
1427    ///
1428    /// let builder = prepare_request_builder();
1429    /// let mut items = builder.by_item();
1430    /// while let Some(result) = items.next().await {
1431    ///   let item = result?;
1432    /// }
1433    /// # Ok(()) }
1434    ///
1435    /// fn prepare_request_builder() -> ListNodes {
1436    ///   # panic!();
1437    ///   // ... details omitted ...
1438    /// }
1439    /// ```
1440    #[derive(Clone, Debug)]
1441    pub struct ListNodes(RequestBuilder<crate::model::ListNodesRequest>);
1442
1443    impl ListNodes {
1444        pub(crate) fn new(
1445            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1446        ) -> Self {
1447            Self(RequestBuilder::new(stub))
1448        }
1449
1450        /// Sets the full request, replacing any prior values.
1451        pub fn with_request<V: Into<crate::model::ListNodesRequest>>(mut self, v: V) -> Self {
1452            self.0.request = v.into();
1453            self
1454        }
1455
1456        /// Sets all the options, replacing any prior values.
1457        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1458            self.0.options = v.into();
1459            self
1460        }
1461
1462        /// Sends the request.
1463        pub async fn send(self) -> Result<crate::model::ListNodesResponse> {
1464            (*self.0.stub)
1465                .list_nodes(self.0.request, self.0.options)
1466                .await
1467                .map(crate::Response::into_body)
1468        }
1469
1470        /// Streams each page in the collection.
1471        pub fn by_page(
1472            self,
1473        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListNodesResponse, crate::Error>
1474        {
1475            use std::clone::Clone;
1476            let token = self.0.request.page_token.clone();
1477            let execute = move |token: String| {
1478                let mut builder = self.clone();
1479                builder.0.request = builder.0.request.set_page_token(token);
1480                builder.send()
1481            };
1482            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1483        }
1484
1485        /// Streams each item in the collection.
1486        pub fn by_item(
1487            self,
1488        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListNodesResponse, crate::Error>
1489        {
1490            use google_cloud_gax::paginator::Paginator;
1491            self.by_page().items()
1492        }
1493
1494        /// Sets the value of [parent][crate::model::ListNodesRequest::parent].
1495        ///
1496        /// This is a **required** field for requests.
1497        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1498            self.0.request.parent = v.into();
1499            self
1500        }
1501
1502        /// Sets the value of [page_size][crate::model::ListNodesRequest::page_size].
1503        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1504            self.0.request.page_size = v.into();
1505            self
1506        }
1507
1508        /// Sets the value of [page_token][crate::model::ListNodesRequest::page_token].
1509        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1510            self.0.request.page_token = v.into();
1511            self
1512        }
1513    }
1514
1515    #[doc(hidden)]
1516    impl crate::RequestBuilder for ListNodes {
1517        fn request_options(&mut self) -> &mut crate::RequestOptions {
1518            &mut self.0.options
1519        }
1520    }
1521
1522    /// The request builder for [VmwareEngine::get_node][crate::client::VmwareEngine::get_node] calls.
1523    ///
1524    /// # Example
1525    /// ```
1526    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetNode;
1527    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
1528    ///
1529    /// let builder = prepare_request_builder();
1530    /// let response = builder.send().await?;
1531    /// # Ok(()) }
1532    ///
1533    /// fn prepare_request_builder() -> GetNode {
1534    ///   # panic!();
1535    ///   // ... details omitted ...
1536    /// }
1537    /// ```
1538    #[derive(Clone, Debug)]
1539    pub struct GetNode(RequestBuilder<crate::model::GetNodeRequest>);
1540
1541    impl GetNode {
1542        pub(crate) fn new(
1543            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1544        ) -> Self {
1545            Self(RequestBuilder::new(stub))
1546        }
1547
1548        /// Sets the full request, replacing any prior values.
1549        pub fn with_request<V: Into<crate::model::GetNodeRequest>>(mut self, v: V) -> Self {
1550            self.0.request = v.into();
1551            self
1552        }
1553
1554        /// Sets all the options, replacing any prior values.
1555        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1556            self.0.options = v.into();
1557            self
1558        }
1559
1560        /// Sends the request.
1561        pub async fn send(self) -> Result<crate::model::Node> {
1562            (*self.0.stub)
1563                .get_node(self.0.request, self.0.options)
1564                .await
1565                .map(crate::Response::into_body)
1566        }
1567
1568        /// Sets the value of [name][crate::model::GetNodeRequest::name].
1569        ///
1570        /// This is a **required** field for requests.
1571        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1572            self.0.request.name = v.into();
1573            self
1574        }
1575    }
1576
1577    #[doc(hidden)]
1578    impl crate::RequestBuilder for GetNode {
1579        fn request_options(&mut self) -> &mut crate::RequestOptions {
1580            &mut self.0.options
1581        }
1582    }
1583
1584    /// The request builder for [VmwareEngine::list_external_addresses][crate::client::VmwareEngine::list_external_addresses] calls.
1585    ///
1586    /// # Example
1587    /// ```
1588    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListExternalAddresses;
1589    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
1590    /// use google_cloud_gax::paginator::ItemPaginator;
1591    ///
1592    /// let builder = prepare_request_builder();
1593    /// let mut items = builder.by_item();
1594    /// while let Some(result) = items.next().await {
1595    ///   let item = result?;
1596    /// }
1597    /// # Ok(()) }
1598    ///
1599    /// fn prepare_request_builder() -> ListExternalAddresses {
1600    ///   # panic!();
1601    ///   // ... details omitted ...
1602    /// }
1603    /// ```
1604    #[derive(Clone, Debug)]
1605    pub struct ListExternalAddresses(RequestBuilder<crate::model::ListExternalAddressesRequest>);
1606
1607    impl ListExternalAddresses {
1608        pub(crate) fn new(
1609            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1610        ) -> Self {
1611            Self(RequestBuilder::new(stub))
1612        }
1613
1614        /// Sets the full request, replacing any prior values.
1615        pub fn with_request<V: Into<crate::model::ListExternalAddressesRequest>>(
1616            mut self,
1617            v: V,
1618        ) -> Self {
1619            self.0.request = v.into();
1620            self
1621        }
1622
1623        /// Sets all the options, replacing any prior values.
1624        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1625            self.0.options = v.into();
1626            self
1627        }
1628
1629        /// Sends the request.
1630        pub async fn send(self) -> Result<crate::model::ListExternalAddressesResponse> {
1631            (*self.0.stub)
1632                .list_external_addresses(self.0.request, self.0.options)
1633                .await
1634                .map(crate::Response::into_body)
1635        }
1636
1637        /// Streams each page in the collection.
1638        pub fn by_page(
1639            self,
1640        ) -> impl google_cloud_gax::paginator::Paginator<
1641            crate::model::ListExternalAddressesResponse,
1642            crate::Error,
1643        > {
1644            use std::clone::Clone;
1645            let token = self.0.request.page_token.clone();
1646            let execute = move |token: String| {
1647                let mut builder = self.clone();
1648                builder.0.request = builder.0.request.set_page_token(token);
1649                builder.send()
1650            };
1651            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1652        }
1653
1654        /// Streams each item in the collection.
1655        pub fn by_item(
1656            self,
1657        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1658            crate::model::ListExternalAddressesResponse,
1659            crate::Error,
1660        > {
1661            use google_cloud_gax::paginator::Paginator;
1662            self.by_page().items()
1663        }
1664
1665        /// Sets the value of [parent][crate::model::ListExternalAddressesRequest::parent].
1666        ///
1667        /// This is a **required** field for requests.
1668        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1669            self.0.request.parent = v.into();
1670            self
1671        }
1672
1673        /// Sets the value of [page_size][crate::model::ListExternalAddressesRequest::page_size].
1674        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1675            self.0.request.page_size = v.into();
1676            self
1677        }
1678
1679        /// Sets the value of [page_token][crate::model::ListExternalAddressesRequest::page_token].
1680        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1681            self.0.request.page_token = v.into();
1682            self
1683        }
1684
1685        /// Sets the value of [filter][crate::model::ListExternalAddressesRequest::filter].
1686        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1687            self.0.request.filter = v.into();
1688            self
1689        }
1690
1691        /// Sets the value of [order_by][crate::model::ListExternalAddressesRequest::order_by].
1692        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1693            self.0.request.order_by = v.into();
1694            self
1695        }
1696    }
1697
1698    #[doc(hidden)]
1699    impl crate::RequestBuilder for ListExternalAddresses {
1700        fn request_options(&mut self) -> &mut crate::RequestOptions {
1701            &mut self.0.options
1702        }
1703    }
1704
1705    /// The request builder for [VmwareEngine::fetch_network_policy_external_addresses][crate::client::VmwareEngine::fetch_network_policy_external_addresses] calls.
1706    ///
1707    /// # Example
1708    /// ```
1709    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::FetchNetworkPolicyExternalAddresses;
1710    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
1711    /// use google_cloud_gax::paginator::ItemPaginator;
1712    ///
1713    /// let builder = prepare_request_builder();
1714    /// let mut items = builder.by_item();
1715    /// while let Some(result) = items.next().await {
1716    ///   let item = result?;
1717    /// }
1718    /// # Ok(()) }
1719    ///
1720    /// fn prepare_request_builder() -> FetchNetworkPolicyExternalAddresses {
1721    ///   # panic!();
1722    ///   // ... details omitted ...
1723    /// }
1724    /// ```
1725    #[derive(Clone, Debug)]
1726    pub struct FetchNetworkPolicyExternalAddresses(
1727        RequestBuilder<crate::model::FetchNetworkPolicyExternalAddressesRequest>,
1728    );
1729
1730    impl FetchNetworkPolicyExternalAddresses {
1731        pub(crate) fn new(
1732            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1733        ) -> Self {
1734            Self(RequestBuilder::new(stub))
1735        }
1736
1737        /// Sets the full request, replacing any prior values.
1738        pub fn with_request<V: Into<crate::model::FetchNetworkPolicyExternalAddressesRequest>>(
1739            mut self,
1740            v: V,
1741        ) -> Self {
1742            self.0.request = v.into();
1743            self
1744        }
1745
1746        /// Sets all the options, replacing any prior values.
1747        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1748            self.0.options = v.into();
1749            self
1750        }
1751
1752        /// Sends the request.
1753        pub async fn send(
1754            self,
1755        ) -> Result<crate::model::FetchNetworkPolicyExternalAddressesResponse> {
1756            (*self.0.stub)
1757                .fetch_network_policy_external_addresses(self.0.request, self.0.options)
1758                .await
1759                .map(crate::Response::into_body)
1760        }
1761
1762        /// Streams each page in the collection.
1763        pub fn by_page(
1764            self,
1765        ) -> impl google_cloud_gax::paginator::Paginator<
1766            crate::model::FetchNetworkPolicyExternalAddressesResponse,
1767            crate::Error,
1768        > {
1769            use std::clone::Clone;
1770            let token = self.0.request.page_token.clone();
1771            let execute = move |token: String| {
1772                let mut builder = self.clone();
1773                builder.0.request = builder.0.request.set_page_token(token);
1774                builder.send()
1775            };
1776            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1777        }
1778
1779        /// Streams each item in the collection.
1780        pub fn by_item(
1781            self,
1782        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1783            crate::model::FetchNetworkPolicyExternalAddressesResponse,
1784            crate::Error,
1785        > {
1786            use google_cloud_gax::paginator::Paginator;
1787            self.by_page().items()
1788        }
1789
1790        /// Sets the value of [network_policy][crate::model::FetchNetworkPolicyExternalAddressesRequest::network_policy].
1791        ///
1792        /// This is a **required** field for requests.
1793        pub fn set_network_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
1794            self.0.request.network_policy = v.into();
1795            self
1796        }
1797
1798        /// Sets the value of [page_size][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_size].
1799        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1800            self.0.request.page_size = v.into();
1801            self
1802        }
1803
1804        /// Sets the value of [page_token][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_token].
1805        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1806            self.0.request.page_token = v.into();
1807            self
1808        }
1809    }
1810
1811    #[doc(hidden)]
1812    impl crate::RequestBuilder for FetchNetworkPolicyExternalAddresses {
1813        fn request_options(&mut self) -> &mut crate::RequestOptions {
1814            &mut self.0.options
1815        }
1816    }
1817
1818    /// The request builder for [VmwareEngine::get_external_address][crate::client::VmwareEngine::get_external_address] calls.
1819    ///
1820    /// # Example
1821    /// ```
1822    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetExternalAddress;
1823    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
1824    ///
1825    /// let builder = prepare_request_builder();
1826    /// let response = builder.send().await?;
1827    /// # Ok(()) }
1828    ///
1829    /// fn prepare_request_builder() -> GetExternalAddress {
1830    ///   # panic!();
1831    ///   // ... details omitted ...
1832    /// }
1833    /// ```
1834    #[derive(Clone, Debug)]
1835    pub struct GetExternalAddress(RequestBuilder<crate::model::GetExternalAddressRequest>);
1836
1837    impl GetExternalAddress {
1838        pub(crate) fn new(
1839            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1840        ) -> Self {
1841            Self(RequestBuilder::new(stub))
1842        }
1843
1844        /// Sets the full request, replacing any prior values.
1845        pub fn with_request<V: Into<crate::model::GetExternalAddressRequest>>(
1846            mut self,
1847            v: V,
1848        ) -> Self {
1849            self.0.request = v.into();
1850            self
1851        }
1852
1853        /// Sets all the options, replacing any prior values.
1854        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1855            self.0.options = v.into();
1856            self
1857        }
1858
1859        /// Sends the request.
1860        pub async fn send(self) -> Result<crate::model::ExternalAddress> {
1861            (*self.0.stub)
1862                .get_external_address(self.0.request, self.0.options)
1863                .await
1864                .map(crate::Response::into_body)
1865        }
1866
1867        /// Sets the value of [name][crate::model::GetExternalAddressRequest::name].
1868        ///
1869        /// This is a **required** field for requests.
1870        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1871            self.0.request.name = v.into();
1872            self
1873        }
1874    }
1875
1876    #[doc(hidden)]
1877    impl crate::RequestBuilder for GetExternalAddress {
1878        fn request_options(&mut self) -> &mut crate::RequestOptions {
1879            &mut self.0.options
1880        }
1881    }
1882
1883    /// The request builder for [VmwareEngine::create_external_address][crate::client::VmwareEngine::create_external_address] calls.
1884    ///
1885    /// # Example
1886    /// ```
1887    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::CreateExternalAddress;
1888    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
1889    /// use google_cloud_lro::Poller;
1890    ///
1891    /// let builder = prepare_request_builder();
1892    /// let response = builder.poller().until_done().await?;
1893    /// # Ok(()) }
1894    ///
1895    /// fn prepare_request_builder() -> CreateExternalAddress {
1896    ///   # panic!();
1897    ///   // ... details omitted ...
1898    /// }
1899    /// ```
1900    #[derive(Clone, Debug)]
1901    pub struct CreateExternalAddress(RequestBuilder<crate::model::CreateExternalAddressRequest>);
1902
1903    impl CreateExternalAddress {
1904        pub(crate) fn new(
1905            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1906        ) -> Self {
1907            Self(RequestBuilder::new(stub))
1908        }
1909
1910        /// Sets the full request, replacing any prior values.
1911        pub fn with_request<V: Into<crate::model::CreateExternalAddressRequest>>(
1912            mut self,
1913            v: V,
1914        ) -> Self {
1915            self.0.request = v.into();
1916            self
1917        }
1918
1919        /// Sets all the options, replacing any prior values.
1920        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1921            self.0.options = v.into();
1922            self
1923        }
1924
1925        /// Sends the request.
1926        ///
1927        /// # Long running operations
1928        ///
1929        /// This starts, but does not poll, a longrunning operation. More information
1930        /// on [create_external_address][crate::client::VmwareEngine::create_external_address].
1931        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1932            (*self.0.stub)
1933                .create_external_address(self.0.request, self.0.options)
1934                .await
1935                .map(crate::Response::into_body)
1936        }
1937
1938        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_external_address`.
1939        pub fn poller(
1940            self,
1941        ) -> impl google_cloud_lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
1942        {
1943            type Operation = google_cloud_lro::internal::Operation<
1944                crate::model::ExternalAddress,
1945                crate::model::OperationMetadata,
1946            >;
1947            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1948            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1949
1950            let stub = self.0.stub.clone();
1951            let mut options = self.0.options.clone();
1952            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1953            let query = move |name| {
1954                let stub = stub.clone();
1955                let options = options.clone();
1956                async {
1957                    let op = GetOperation::new(stub)
1958                        .set_name(name)
1959                        .with_options(options)
1960                        .send()
1961                        .await?;
1962                    Ok(Operation::new(op))
1963                }
1964            };
1965
1966            let start = move || async {
1967                let op = self.send().await?;
1968                Ok(Operation::new(op))
1969            };
1970
1971            google_cloud_lro::internal::new_poller(
1972                polling_error_policy,
1973                polling_backoff_policy,
1974                start,
1975                query,
1976            )
1977        }
1978
1979        /// Sets the value of [parent][crate::model::CreateExternalAddressRequest::parent].
1980        ///
1981        /// This is a **required** field for requests.
1982        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1983            self.0.request.parent = v.into();
1984            self
1985        }
1986
1987        /// Sets the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
1988        ///
1989        /// This is a **required** field for requests.
1990        pub fn set_external_address<T>(mut self, v: T) -> Self
1991        where
1992            T: std::convert::Into<crate::model::ExternalAddress>,
1993        {
1994            self.0.request.external_address = std::option::Option::Some(v.into());
1995            self
1996        }
1997
1998        /// Sets or clears the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
1999        ///
2000        /// This is a **required** field for requests.
2001        pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2002        where
2003            T: std::convert::Into<crate::model::ExternalAddress>,
2004        {
2005            self.0.request.external_address = v.map(|x| x.into());
2006            self
2007        }
2008
2009        /// Sets the value of [external_address_id][crate::model::CreateExternalAddressRequest::external_address_id].
2010        ///
2011        /// This is a **required** field for requests.
2012        pub fn set_external_address_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2013            self.0.request.external_address_id = v.into();
2014            self
2015        }
2016
2017        /// Sets the value of [request_id][crate::model::CreateExternalAddressRequest::request_id].
2018        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2019            self.0.request.request_id = v.into();
2020            self
2021        }
2022    }
2023
2024    #[doc(hidden)]
2025    impl crate::RequestBuilder for CreateExternalAddress {
2026        fn request_options(&mut self) -> &mut crate::RequestOptions {
2027            &mut self.0.options
2028        }
2029    }
2030
2031    /// The request builder for [VmwareEngine::update_external_address][crate::client::VmwareEngine::update_external_address] calls.
2032    ///
2033    /// # Example
2034    /// ```
2035    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdateExternalAddress;
2036    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
2037    /// use google_cloud_lro::Poller;
2038    ///
2039    /// let builder = prepare_request_builder();
2040    /// let response = builder.poller().until_done().await?;
2041    /// # Ok(()) }
2042    ///
2043    /// fn prepare_request_builder() -> UpdateExternalAddress {
2044    ///   # panic!();
2045    ///   // ... details omitted ...
2046    /// }
2047    /// ```
2048    #[derive(Clone, Debug)]
2049    pub struct UpdateExternalAddress(RequestBuilder<crate::model::UpdateExternalAddressRequest>);
2050
2051    impl UpdateExternalAddress {
2052        pub(crate) fn new(
2053            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2054        ) -> Self {
2055            Self(RequestBuilder::new(stub))
2056        }
2057
2058        /// Sets the full request, replacing any prior values.
2059        pub fn with_request<V: Into<crate::model::UpdateExternalAddressRequest>>(
2060            mut self,
2061            v: V,
2062        ) -> Self {
2063            self.0.request = v.into();
2064            self
2065        }
2066
2067        /// Sets all the options, replacing any prior values.
2068        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2069            self.0.options = v.into();
2070            self
2071        }
2072
2073        /// Sends the request.
2074        ///
2075        /// # Long running operations
2076        ///
2077        /// This starts, but does not poll, a longrunning operation. More information
2078        /// on [update_external_address][crate::client::VmwareEngine::update_external_address].
2079        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2080            (*self.0.stub)
2081                .update_external_address(self.0.request, self.0.options)
2082                .await
2083                .map(crate::Response::into_body)
2084        }
2085
2086        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_external_address`.
2087        pub fn poller(
2088            self,
2089        ) -> impl google_cloud_lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
2090        {
2091            type Operation = google_cloud_lro::internal::Operation<
2092                crate::model::ExternalAddress,
2093                crate::model::OperationMetadata,
2094            >;
2095            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2096            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2097
2098            let stub = self.0.stub.clone();
2099            let mut options = self.0.options.clone();
2100            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2101            let query = move |name| {
2102                let stub = stub.clone();
2103                let options = options.clone();
2104                async {
2105                    let op = GetOperation::new(stub)
2106                        .set_name(name)
2107                        .with_options(options)
2108                        .send()
2109                        .await?;
2110                    Ok(Operation::new(op))
2111                }
2112            };
2113
2114            let start = move || async {
2115                let op = self.send().await?;
2116                Ok(Operation::new(op))
2117            };
2118
2119            google_cloud_lro::internal::new_poller(
2120                polling_error_policy,
2121                polling_backoff_policy,
2122                start,
2123                query,
2124            )
2125        }
2126
2127        /// Sets the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
2128        ///
2129        /// This is a **required** field for requests.
2130        pub fn set_update_mask<T>(mut self, v: T) -> Self
2131        where
2132            T: std::convert::Into<wkt::FieldMask>,
2133        {
2134            self.0.request.update_mask = std::option::Option::Some(v.into());
2135            self
2136        }
2137
2138        /// Sets or clears the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
2139        ///
2140        /// This is a **required** field for requests.
2141        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2142        where
2143            T: std::convert::Into<wkt::FieldMask>,
2144        {
2145            self.0.request.update_mask = v.map(|x| x.into());
2146            self
2147        }
2148
2149        /// Sets the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
2150        ///
2151        /// This is a **required** field for requests.
2152        pub fn set_external_address<T>(mut self, v: T) -> Self
2153        where
2154            T: std::convert::Into<crate::model::ExternalAddress>,
2155        {
2156            self.0.request.external_address = std::option::Option::Some(v.into());
2157            self
2158        }
2159
2160        /// Sets or clears the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
2161        ///
2162        /// This is a **required** field for requests.
2163        pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2164        where
2165            T: std::convert::Into<crate::model::ExternalAddress>,
2166        {
2167            self.0.request.external_address = v.map(|x| x.into());
2168            self
2169        }
2170
2171        /// Sets the value of [request_id][crate::model::UpdateExternalAddressRequest::request_id].
2172        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2173            self.0.request.request_id = v.into();
2174            self
2175        }
2176    }
2177
2178    #[doc(hidden)]
2179    impl crate::RequestBuilder for UpdateExternalAddress {
2180        fn request_options(&mut self) -> &mut crate::RequestOptions {
2181            &mut self.0.options
2182        }
2183    }
2184
2185    /// The request builder for [VmwareEngine::delete_external_address][crate::client::VmwareEngine::delete_external_address] calls.
2186    ///
2187    /// # Example
2188    /// ```
2189    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::DeleteExternalAddress;
2190    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
2191    /// use google_cloud_lro::Poller;
2192    ///
2193    /// let builder = prepare_request_builder();
2194    /// let response = builder.poller().until_done().await?;
2195    /// # Ok(()) }
2196    ///
2197    /// fn prepare_request_builder() -> DeleteExternalAddress {
2198    ///   # panic!();
2199    ///   // ... details omitted ...
2200    /// }
2201    /// ```
2202    #[derive(Clone, Debug)]
2203    pub struct DeleteExternalAddress(RequestBuilder<crate::model::DeleteExternalAddressRequest>);
2204
2205    impl DeleteExternalAddress {
2206        pub(crate) fn new(
2207            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2208        ) -> Self {
2209            Self(RequestBuilder::new(stub))
2210        }
2211
2212        /// Sets the full request, replacing any prior values.
2213        pub fn with_request<V: Into<crate::model::DeleteExternalAddressRequest>>(
2214            mut self,
2215            v: V,
2216        ) -> Self {
2217            self.0.request = v.into();
2218            self
2219        }
2220
2221        /// Sets all the options, replacing any prior values.
2222        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2223            self.0.options = v.into();
2224            self
2225        }
2226
2227        /// Sends the request.
2228        ///
2229        /// # Long running operations
2230        ///
2231        /// This starts, but does not poll, a longrunning operation. More information
2232        /// on [delete_external_address][crate::client::VmwareEngine::delete_external_address].
2233        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2234            (*self.0.stub)
2235                .delete_external_address(self.0.request, self.0.options)
2236                .await
2237                .map(crate::Response::into_body)
2238        }
2239
2240        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_external_address`.
2241        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2242            type Operation =
2243                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2244            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2245            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2246
2247            let stub = self.0.stub.clone();
2248            let mut options = self.0.options.clone();
2249            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2250            let query = move |name| {
2251                let stub = stub.clone();
2252                let options = options.clone();
2253                async {
2254                    let op = GetOperation::new(stub)
2255                        .set_name(name)
2256                        .with_options(options)
2257                        .send()
2258                        .await?;
2259                    Ok(Operation::new(op))
2260                }
2261            };
2262
2263            let start = move || async {
2264                let op = self.send().await?;
2265                Ok(Operation::new(op))
2266            };
2267
2268            google_cloud_lro::internal::new_unit_response_poller(
2269                polling_error_policy,
2270                polling_backoff_policy,
2271                start,
2272                query,
2273            )
2274        }
2275
2276        /// Sets the value of [name][crate::model::DeleteExternalAddressRequest::name].
2277        ///
2278        /// This is a **required** field for requests.
2279        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2280            self.0.request.name = v.into();
2281            self
2282        }
2283
2284        /// Sets the value of [request_id][crate::model::DeleteExternalAddressRequest::request_id].
2285        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2286            self.0.request.request_id = v.into();
2287            self
2288        }
2289    }
2290
2291    #[doc(hidden)]
2292    impl crate::RequestBuilder for DeleteExternalAddress {
2293        fn request_options(&mut self) -> &mut crate::RequestOptions {
2294            &mut self.0.options
2295        }
2296    }
2297
2298    /// The request builder for [VmwareEngine::list_subnets][crate::client::VmwareEngine::list_subnets] calls.
2299    ///
2300    /// # Example
2301    /// ```
2302    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListSubnets;
2303    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
2304    /// use google_cloud_gax::paginator::ItemPaginator;
2305    ///
2306    /// let builder = prepare_request_builder();
2307    /// let mut items = builder.by_item();
2308    /// while let Some(result) = items.next().await {
2309    ///   let item = result?;
2310    /// }
2311    /// # Ok(()) }
2312    ///
2313    /// fn prepare_request_builder() -> ListSubnets {
2314    ///   # panic!();
2315    ///   // ... details omitted ...
2316    /// }
2317    /// ```
2318    #[derive(Clone, Debug)]
2319    pub struct ListSubnets(RequestBuilder<crate::model::ListSubnetsRequest>);
2320
2321    impl ListSubnets {
2322        pub(crate) fn new(
2323            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2324        ) -> Self {
2325            Self(RequestBuilder::new(stub))
2326        }
2327
2328        /// Sets the full request, replacing any prior values.
2329        pub fn with_request<V: Into<crate::model::ListSubnetsRequest>>(mut self, v: V) -> Self {
2330            self.0.request = v.into();
2331            self
2332        }
2333
2334        /// Sets all the options, replacing any prior values.
2335        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2336            self.0.options = v.into();
2337            self
2338        }
2339
2340        /// Sends the request.
2341        pub async fn send(self) -> Result<crate::model::ListSubnetsResponse> {
2342            (*self.0.stub)
2343                .list_subnets(self.0.request, self.0.options)
2344                .await
2345                .map(crate::Response::into_body)
2346        }
2347
2348        /// Streams each page in the collection.
2349        pub fn by_page(
2350            self,
2351        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListSubnetsResponse, crate::Error>
2352        {
2353            use std::clone::Clone;
2354            let token = self.0.request.page_token.clone();
2355            let execute = move |token: String| {
2356                let mut builder = self.clone();
2357                builder.0.request = builder.0.request.set_page_token(token);
2358                builder.send()
2359            };
2360            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2361        }
2362
2363        /// Streams each item in the collection.
2364        pub fn by_item(
2365            self,
2366        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2367            crate::model::ListSubnetsResponse,
2368            crate::Error,
2369        > {
2370            use google_cloud_gax::paginator::Paginator;
2371            self.by_page().items()
2372        }
2373
2374        /// Sets the value of [parent][crate::model::ListSubnetsRequest::parent].
2375        ///
2376        /// This is a **required** field for requests.
2377        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2378            self.0.request.parent = v.into();
2379            self
2380        }
2381
2382        /// Sets the value of [page_size][crate::model::ListSubnetsRequest::page_size].
2383        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2384            self.0.request.page_size = v.into();
2385            self
2386        }
2387
2388        /// Sets the value of [page_token][crate::model::ListSubnetsRequest::page_token].
2389        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2390            self.0.request.page_token = v.into();
2391            self
2392        }
2393    }
2394
2395    #[doc(hidden)]
2396    impl crate::RequestBuilder for ListSubnets {
2397        fn request_options(&mut self) -> &mut crate::RequestOptions {
2398            &mut self.0.options
2399        }
2400    }
2401
2402    /// The request builder for [VmwareEngine::get_subnet][crate::client::VmwareEngine::get_subnet] calls.
2403    ///
2404    /// # Example
2405    /// ```
2406    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetSubnet;
2407    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
2408    ///
2409    /// let builder = prepare_request_builder();
2410    /// let response = builder.send().await?;
2411    /// # Ok(()) }
2412    ///
2413    /// fn prepare_request_builder() -> GetSubnet {
2414    ///   # panic!();
2415    ///   // ... details omitted ...
2416    /// }
2417    /// ```
2418    #[derive(Clone, Debug)]
2419    pub struct GetSubnet(RequestBuilder<crate::model::GetSubnetRequest>);
2420
2421    impl GetSubnet {
2422        pub(crate) fn new(
2423            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2424        ) -> Self {
2425            Self(RequestBuilder::new(stub))
2426        }
2427
2428        /// Sets the full request, replacing any prior values.
2429        pub fn with_request<V: Into<crate::model::GetSubnetRequest>>(mut self, v: V) -> Self {
2430            self.0.request = v.into();
2431            self
2432        }
2433
2434        /// Sets all the options, replacing any prior values.
2435        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2436            self.0.options = v.into();
2437            self
2438        }
2439
2440        /// Sends the request.
2441        pub async fn send(self) -> Result<crate::model::Subnet> {
2442            (*self.0.stub)
2443                .get_subnet(self.0.request, self.0.options)
2444                .await
2445                .map(crate::Response::into_body)
2446        }
2447
2448        /// Sets the value of [name][crate::model::GetSubnetRequest::name].
2449        ///
2450        /// This is a **required** field for requests.
2451        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2452            self.0.request.name = v.into();
2453            self
2454        }
2455    }
2456
2457    #[doc(hidden)]
2458    impl crate::RequestBuilder for GetSubnet {
2459        fn request_options(&mut self) -> &mut crate::RequestOptions {
2460            &mut self.0.options
2461        }
2462    }
2463
2464    /// The request builder for [VmwareEngine::update_subnet][crate::client::VmwareEngine::update_subnet] calls.
2465    ///
2466    /// # Example
2467    /// ```
2468    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdateSubnet;
2469    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
2470    /// use google_cloud_lro::Poller;
2471    ///
2472    /// let builder = prepare_request_builder();
2473    /// let response = builder.poller().until_done().await?;
2474    /// # Ok(()) }
2475    ///
2476    /// fn prepare_request_builder() -> UpdateSubnet {
2477    ///   # panic!();
2478    ///   // ... details omitted ...
2479    /// }
2480    /// ```
2481    #[derive(Clone, Debug)]
2482    pub struct UpdateSubnet(RequestBuilder<crate::model::UpdateSubnetRequest>);
2483
2484    impl UpdateSubnet {
2485        pub(crate) fn new(
2486            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2487        ) -> Self {
2488            Self(RequestBuilder::new(stub))
2489        }
2490
2491        /// Sets the full request, replacing any prior values.
2492        pub fn with_request<V: Into<crate::model::UpdateSubnetRequest>>(mut self, v: V) -> Self {
2493            self.0.request = v.into();
2494            self
2495        }
2496
2497        /// Sets all the options, replacing any prior values.
2498        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2499            self.0.options = v.into();
2500            self
2501        }
2502
2503        /// Sends the request.
2504        ///
2505        /// # Long running operations
2506        ///
2507        /// This starts, but does not poll, a longrunning operation. More information
2508        /// on [update_subnet][crate::client::VmwareEngine::update_subnet].
2509        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2510            (*self.0.stub)
2511                .update_subnet(self.0.request, self.0.options)
2512                .await
2513                .map(crate::Response::into_body)
2514        }
2515
2516        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_subnet`.
2517        pub fn poller(
2518            self,
2519        ) -> impl google_cloud_lro::Poller<crate::model::Subnet, crate::model::OperationMetadata>
2520        {
2521            type Operation = google_cloud_lro::internal::Operation<
2522                crate::model::Subnet,
2523                crate::model::OperationMetadata,
2524            >;
2525            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2526            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2527
2528            let stub = self.0.stub.clone();
2529            let mut options = self.0.options.clone();
2530            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2531            let query = move |name| {
2532                let stub = stub.clone();
2533                let options = options.clone();
2534                async {
2535                    let op = GetOperation::new(stub)
2536                        .set_name(name)
2537                        .with_options(options)
2538                        .send()
2539                        .await?;
2540                    Ok(Operation::new(op))
2541                }
2542            };
2543
2544            let start = move || async {
2545                let op = self.send().await?;
2546                Ok(Operation::new(op))
2547            };
2548
2549            google_cloud_lro::internal::new_poller(
2550                polling_error_policy,
2551                polling_backoff_policy,
2552                start,
2553                query,
2554            )
2555        }
2556
2557        /// Sets the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
2558        ///
2559        /// This is a **required** field for requests.
2560        pub fn set_update_mask<T>(mut self, v: T) -> Self
2561        where
2562            T: std::convert::Into<wkt::FieldMask>,
2563        {
2564            self.0.request.update_mask = std::option::Option::Some(v.into());
2565            self
2566        }
2567
2568        /// Sets or clears the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
2569        ///
2570        /// This is a **required** field for requests.
2571        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2572        where
2573            T: std::convert::Into<wkt::FieldMask>,
2574        {
2575            self.0.request.update_mask = v.map(|x| x.into());
2576            self
2577        }
2578
2579        /// Sets the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
2580        ///
2581        /// This is a **required** field for requests.
2582        pub fn set_subnet<T>(mut self, v: T) -> Self
2583        where
2584            T: std::convert::Into<crate::model::Subnet>,
2585        {
2586            self.0.request.subnet = std::option::Option::Some(v.into());
2587            self
2588        }
2589
2590        /// Sets or clears the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
2591        ///
2592        /// This is a **required** field for requests.
2593        pub fn set_or_clear_subnet<T>(mut self, v: std::option::Option<T>) -> Self
2594        where
2595            T: std::convert::Into<crate::model::Subnet>,
2596        {
2597            self.0.request.subnet = v.map(|x| x.into());
2598            self
2599        }
2600    }
2601
2602    #[doc(hidden)]
2603    impl crate::RequestBuilder for UpdateSubnet {
2604        fn request_options(&mut self) -> &mut crate::RequestOptions {
2605            &mut self.0.options
2606        }
2607    }
2608
2609    /// The request builder for [VmwareEngine::list_external_access_rules][crate::client::VmwareEngine::list_external_access_rules] calls.
2610    ///
2611    /// # Example
2612    /// ```
2613    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListExternalAccessRules;
2614    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
2615    /// use google_cloud_gax::paginator::ItemPaginator;
2616    ///
2617    /// let builder = prepare_request_builder();
2618    /// let mut items = builder.by_item();
2619    /// while let Some(result) = items.next().await {
2620    ///   let item = result?;
2621    /// }
2622    /// # Ok(()) }
2623    ///
2624    /// fn prepare_request_builder() -> ListExternalAccessRules {
2625    ///   # panic!();
2626    ///   // ... details omitted ...
2627    /// }
2628    /// ```
2629    #[derive(Clone, Debug)]
2630    pub struct ListExternalAccessRules(
2631        RequestBuilder<crate::model::ListExternalAccessRulesRequest>,
2632    );
2633
2634    impl ListExternalAccessRules {
2635        pub(crate) fn new(
2636            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2637        ) -> Self {
2638            Self(RequestBuilder::new(stub))
2639        }
2640
2641        /// Sets the full request, replacing any prior values.
2642        pub fn with_request<V: Into<crate::model::ListExternalAccessRulesRequest>>(
2643            mut self,
2644            v: V,
2645        ) -> Self {
2646            self.0.request = v.into();
2647            self
2648        }
2649
2650        /// Sets all the options, replacing any prior values.
2651        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2652            self.0.options = v.into();
2653            self
2654        }
2655
2656        /// Sends the request.
2657        pub async fn send(self) -> Result<crate::model::ListExternalAccessRulesResponse> {
2658            (*self.0.stub)
2659                .list_external_access_rules(self.0.request, self.0.options)
2660                .await
2661                .map(crate::Response::into_body)
2662        }
2663
2664        /// Streams each page in the collection.
2665        pub fn by_page(
2666            self,
2667        ) -> impl google_cloud_gax::paginator::Paginator<
2668            crate::model::ListExternalAccessRulesResponse,
2669            crate::Error,
2670        > {
2671            use std::clone::Clone;
2672            let token = self.0.request.page_token.clone();
2673            let execute = move |token: String| {
2674                let mut builder = self.clone();
2675                builder.0.request = builder.0.request.set_page_token(token);
2676                builder.send()
2677            };
2678            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2679        }
2680
2681        /// Streams each item in the collection.
2682        pub fn by_item(
2683            self,
2684        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2685            crate::model::ListExternalAccessRulesResponse,
2686            crate::Error,
2687        > {
2688            use google_cloud_gax::paginator::Paginator;
2689            self.by_page().items()
2690        }
2691
2692        /// Sets the value of [parent][crate::model::ListExternalAccessRulesRequest::parent].
2693        ///
2694        /// This is a **required** field for requests.
2695        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2696            self.0.request.parent = v.into();
2697            self
2698        }
2699
2700        /// Sets the value of [page_size][crate::model::ListExternalAccessRulesRequest::page_size].
2701        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2702            self.0.request.page_size = v.into();
2703            self
2704        }
2705
2706        /// Sets the value of [page_token][crate::model::ListExternalAccessRulesRequest::page_token].
2707        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2708            self.0.request.page_token = v.into();
2709            self
2710        }
2711
2712        /// Sets the value of [filter][crate::model::ListExternalAccessRulesRequest::filter].
2713        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2714            self.0.request.filter = v.into();
2715            self
2716        }
2717
2718        /// Sets the value of [order_by][crate::model::ListExternalAccessRulesRequest::order_by].
2719        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2720            self.0.request.order_by = v.into();
2721            self
2722        }
2723    }
2724
2725    #[doc(hidden)]
2726    impl crate::RequestBuilder for ListExternalAccessRules {
2727        fn request_options(&mut self) -> &mut crate::RequestOptions {
2728            &mut self.0.options
2729        }
2730    }
2731
2732    /// The request builder for [VmwareEngine::get_external_access_rule][crate::client::VmwareEngine::get_external_access_rule] calls.
2733    ///
2734    /// # Example
2735    /// ```
2736    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetExternalAccessRule;
2737    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
2738    ///
2739    /// let builder = prepare_request_builder();
2740    /// let response = builder.send().await?;
2741    /// # Ok(()) }
2742    ///
2743    /// fn prepare_request_builder() -> GetExternalAccessRule {
2744    ///   # panic!();
2745    ///   // ... details omitted ...
2746    /// }
2747    /// ```
2748    #[derive(Clone, Debug)]
2749    pub struct GetExternalAccessRule(RequestBuilder<crate::model::GetExternalAccessRuleRequest>);
2750
2751    impl GetExternalAccessRule {
2752        pub(crate) fn new(
2753            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2754        ) -> Self {
2755            Self(RequestBuilder::new(stub))
2756        }
2757
2758        /// Sets the full request, replacing any prior values.
2759        pub fn with_request<V: Into<crate::model::GetExternalAccessRuleRequest>>(
2760            mut self,
2761            v: V,
2762        ) -> Self {
2763            self.0.request = v.into();
2764            self
2765        }
2766
2767        /// Sets all the options, replacing any prior values.
2768        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2769            self.0.options = v.into();
2770            self
2771        }
2772
2773        /// Sends the request.
2774        pub async fn send(self) -> Result<crate::model::ExternalAccessRule> {
2775            (*self.0.stub)
2776                .get_external_access_rule(self.0.request, self.0.options)
2777                .await
2778                .map(crate::Response::into_body)
2779        }
2780
2781        /// Sets the value of [name][crate::model::GetExternalAccessRuleRequest::name].
2782        ///
2783        /// This is a **required** field for requests.
2784        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2785            self.0.request.name = v.into();
2786            self
2787        }
2788    }
2789
2790    #[doc(hidden)]
2791    impl crate::RequestBuilder for GetExternalAccessRule {
2792        fn request_options(&mut self) -> &mut crate::RequestOptions {
2793            &mut self.0.options
2794        }
2795    }
2796
2797    /// The request builder for [VmwareEngine::create_external_access_rule][crate::client::VmwareEngine::create_external_access_rule] calls.
2798    ///
2799    /// # Example
2800    /// ```
2801    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::CreateExternalAccessRule;
2802    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
2803    /// use google_cloud_lro::Poller;
2804    ///
2805    /// let builder = prepare_request_builder();
2806    /// let response = builder.poller().until_done().await?;
2807    /// # Ok(()) }
2808    ///
2809    /// fn prepare_request_builder() -> CreateExternalAccessRule {
2810    ///   # panic!();
2811    ///   // ... details omitted ...
2812    /// }
2813    /// ```
2814    #[derive(Clone, Debug)]
2815    pub struct CreateExternalAccessRule(
2816        RequestBuilder<crate::model::CreateExternalAccessRuleRequest>,
2817    );
2818
2819    impl CreateExternalAccessRule {
2820        pub(crate) fn new(
2821            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2822        ) -> Self {
2823            Self(RequestBuilder::new(stub))
2824        }
2825
2826        /// Sets the full request, replacing any prior values.
2827        pub fn with_request<V: Into<crate::model::CreateExternalAccessRuleRequest>>(
2828            mut self,
2829            v: V,
2830        ) -> Self {
2831            self.0.request = v.into();
2832            self
2833        }
2834
2835        /// Sets all the options, replacing any prior values.
2836        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2837            self.0.options = v.into();
2838            self
2839        }
2840
2841        /// Sends the request.
2842        ///
2843        /// # Long running operations
2844        ///
2845        /// This starts, but does not poll, a longrunning operation. More information
2846        /// on [create_external_access_rule][crate::client::VmwareEngine::create_external_access_rule].
2847        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2848            (*self.0.stub)
2849                .create_external_access_rule(self.0.request, self.0.options)
2850                .await
2851                .map(crate::Response::into_body)
2852        }
2853
2854        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_external_access_rule`.
2855        pub fn poller(
2856            self,
2857        ) -> impl google_cloud_lro::Poller<
2858            crate::model::ExternalAccessRule,
2859            crate::model::OperationMetadata,
2860        > {
2861            type Operation = google_cloud_lro::internal::Operation<
2862                crate::model::ExternalAccessRule,
2863                crate::model::OperationMetadata,
2864            >;
2865            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2866            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2867
2868            let stub = self.0.stub.clone();
2869            let mut options = self.0.options.clone();
2870            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2871            let query = move |name| {
2872                let stub = stub.clone();
2873                let options = options.clone();
2874                async {
2875                    let op = GetOperation::new(stub)
2876                        .set_name(name)
2877                        .with_options(options)
2878                        .send()
2879                        .await?;
2880                    Ok(Operation::new(op))
2881                }
2882            };
2883
2884            let start = move || async {
2885                let op = self.send().await?;
2886                Ok(Operation::new(op))
2887            };
2888
2889            google_cloud_lro::internal::new_poller(
2890                polling_error_policy,
2891                polling_backoff_policy,
2892                start,
2893                query,
2894            )
2895        }
2896
2897        /// Sets the value of [parent][crate::model::CreateExternalAccessRuleRequest::parent].
2898        ///
2899        /// This is a **required** field for requests.
2900        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2901            self.0.request.parent = v.into();
2902            self
2903        }
2904
2905        /// Sets the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
2906        ///
2907        /// This is a **required** field for requests.
2908        pub fn set_external_access_rule<T>(mut self, v: T) -> Self
2909        where
2910            T: std::convert::Into<crate::model::ExternalAccessRule>,
2911        {
2912            self.0.request.external_access_rule = std::option::Option::Some(v.into());
2913            self
2914        }
2915
2916        /// Sets or clears the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
2917        ///
2918        /// This is a **required** field for requests.
2919        pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
2920        where
2921            T: std::convert::Into<crate::model::ExternalAccessRule>,
2922        {
2923            self.0.request.external_access_rule = v.map(|x| x.into());
2924            self
2925        }
2926
2927        /// Sets the value of [external_access_rule_id][crate::model::CreateExternalAccessRuleRequest::external_access_rule_id].
2928        ///
2929        /// This is a **required** field for requests.
2930        pub fn set_external_access_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2931            self.0.request.external_access_rule_id = v.into();
2932            self
2933        }
2934
2935        /// Sets the value of [request_id][crate::model::CreateExternalAccessRuleRequest::request_id].
2936        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2937            self.0.request.request_id = v.into();
2938            self
2939        }
2940    }
2941
2942    #[doc(hidden)]
2943    impl crate::RequestBuilder for CreateExternalAccessRule {
2944        fn request_options(&mut self) -> &mut crate::RequestOptions {
2945            &mut self.0.options
2946        }
2947    }
2948
2949    /// The request builder for [VmwareEngine::update_external_access_rule][crate::client::VmwareEngine::update_external_access_rule] calls.
2950    ///
2951    /// # Example
2952    /// ```
2953    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdateExternalAccessRule;
2954    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
2955    /// use google_cloud_lro::Poller;
2956    ///
2957    /// let builder = prepare_request_builder();
2958    /// let response = builder.poller().until_done().await?;
2959    /// # Ok(()) }
2960    ///
2961    /// fn prepare_request_builder() -> UpdateExternalAccessRule {
2962    ///   # panic!();
2963    ///   // ... details omitted ...
2964    /// }
2965    /// ```
2966    #[derive(Clone, Debug)]
2967    pub struct UpdateExternalAccessRule(
2968        RequestBuilder<crate::model::UpdateExternalAccessRuleRequest>,
2969    );
2970
2971    impl UpdateExternalAccessRule {
2972        pub(crate) fn new(
2973            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2974        ) -> Self {
2975            Self(RequestBuilder::new(stub))
2976        }
2977
2978        /// Sets the full request, replacing any prior values.
2979        pub fn with_request<V: Into<crate::model::UpdateExternalAccessRuleRequest>>(
2980            mut self,
2981            v: V,
2982        ) -> Self {
2983            self.0.request = v.into();
2984            self
2985        }
2986
2987        /// Sets all the options, replacing any prior values.
2988        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2989            self.0.options = v.into();
2990            self
2991        }
2992
2993        /// Sends the request.
2994        ///
2995        /// # Long running operations
2996        ///
2997        /// This starts, but does not poll, a longrunning operation. More information
2998        /// on [update_external_access_rule][crate::client::VmwareEngine::update_external_access_rule].
2999        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3000            (*self.0.stub)
3001                .update_external_access_rule(self.0.request, self.0.options)
3002                .await
3003                .map(crate::Response::into_body)
3004        }
3005
3006        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_external_access_rule`.
3007        pub fn poller(
3008            self,
3009        ) -> impl google_cloud_lro::Poller<
3010            crate::model::ExternalAccessRule,
3011            crate::model::OperationMetadata,
3012        > {
3013            type Operation = google_cloud_lro::internal::Operation<
3014                crate::model::ExternalAccessRule,
3015                crate::model::OperationMetadata,
3016            >;
3017            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3018            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3019
3020            let stub = self.0.stub.clone();
3021            let mut options = self.0.options.clone();
3022            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3023            let query = move |name| {
3024                let stub = stub.clone();
3025                let options = options.clone();
3026                async {
3027                    let op = GetOperation::new(stub)
3028                        .set_name(name)
3029                        .with_options(options)
3030                        .send()
3031                        .await?;
3032                    Ok(Operation::new(op))
3033                }
3034            };
3035
3036            let start = move || async {
3037                let op = self.send().await?;
3038                Ok(Operation::new(op))
3039            };
3040
3041            google_cloud_lro::internal::new_poller(
3042                polling_error_policy,
3043                polling_backoff_policy,
3044                start,
3045                query,
3046            )
3047        }
3048
3049        /// Sets the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
3050        ///
3051        /// This is a **required** field for requests.
3052        pub fn set_update_mask<T>(mut self, v: T) -> Self
3053        where
3054            T: std::convert::Into<wkt::FieldMask>,
3055        {
3056            self.0.request.update_mask = std::option::Option::Some(v.into());
3057            self
3058        }
3059
3060        /// Sets or clears the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
3061        ///
3062        /// This is a **required** field for requests.
3063        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3064        where
3065            T: std::convert::Into<wkt::FieldMask>,
3066        {
3067            self.0.request.update_mask = v.map(|x| x.into());
3068            self
3069        }
3070
3071        /// Sets the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
3072        ///
3073        /// This is a **required** field for requests.
3074        pub fn set_external_access_rule<T>(mut self, v: T) -> Self
3075        where
3076            T: std::convert::Into<crate::model::ExternalAccessRule>,
3077        {
3078            self.0.request.external_access_rule = std::option::Option::Some(v.into());
3079            self
3080        }
3081
3082        /// Sets or clears the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
3083        ///
3084        /// This is a **required** field for requests.
3085        pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
3086        where
3087            T: std::convert::Into<crate::model::ExternalAccessRule>,
3088        {
3089            self.0.request.external_access_rule = v.map(|x| x.into());
3090            self
3091        }
3092
3093        /// Sets the value of [request_id][crate::model::UpdateExternalAccessRuleRequest::request_id].
3094        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3095            self.0.request.request_id = v.into();
3096            self
3097        }
3098    }
3099
3100    #[doc(hidden)]
3101    impl crate::RequestBuilder for UpdateExternalAccessRule {
3102        fn request_options(&mut self) -> &mut crate::RequestOptions {
3103            &mut self.0.options
3104        }
3105    }
3106
3107    /// The request builder for [VmwareEngine::delete_external_access_rule][crate::client::VmwareEngine::delete_external_access_rule] calls.
3108    ///
3109    /// # Example
3110    /// ```
3111    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::DeleteExternalAccessRule;
3112    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
3113    /// use google_cloud_lro::Poller;
3114    ///
3115    /// let builder = prepare_request_builder();
3116    /// let response = builder.poller().until_done().await?;
3117    /// # Ok(()) }
3118    ///
3119    /// fn prepare_request_builder() -> DeleteExternalAccessRule {
3120    ///   # panic!();
3121    ///   // ... details omitted ...
3122    /// }
3123    /// ```
3124    #[derive(Clone, Debug)]
3125    pub struct DeleteExternalAccessRule(
3126        RequestBuilder<crate::model::DeleteExternalAccessRuleRequest>,
3127    );
3128
3129    impl DeleteExternalAccessRule {
3130        pub(crate) fn new(
3131            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3132        ) -> Self {
3133            Self(RequestBuilder::new(stub))
3134        }
3135
3136        /// Sets the full request, replacing any prior values.
3137        pub fn with_request<V: Into<crate::model::DeleteExternalAccessRuleRequest>>(
3138            mut self,
3139            v: V,
3140        ) -> Self {
3141            self.0.request = v.into();
3142            self
3143        }
3144
3145        /// Sets all the options, replacing any prior values.
3146        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3147            self.0.options = v.into();
3148            self
3149        }
3150
3151        /// Sends the request.
3152        ///
3153        /// # Long running operations
3154        ///
3155        /// This starts, but does not poll, a longrunning operation. More information
3156        /// on [delete_external_access_rule][crate::client::VmwareEngine::delete_external_access_rule].
3157        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3158            (*self.0.stub)
3159                .delete_external_access_rule(self.0.request, self.0.options)
3160                .await
3161                .map(crate::Response::into_body)
3162        }
3163
3164        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_external_access_rule`.
3165        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3166            type Operation =
3167                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3168            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3169            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3170
3171            let stub = self.0.stub.clone();
3172            let mut options = self.0.options.clone();
3173            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3174            let query = move |name| {
3175                let stub = stub.clone();
3176                let options = options.clone();
3177                async {
3178                    let op = GetOperation::new(stub)
3179                        .set_name(name)
3180                        .with_options(options)
3181                        .send()
3182                        .await?;
3183                    Ok(Operation::new(op))
3184                }
3185            };
3186
3187            let start = move || async {
3188                let op = self.send().await?;
3189                Ok(Operation::new(op))
3190            };
3191
3192            google_cloud_lro::internal::new_unit_response_poller(
3193                polling_error_policy,
3194                polling_backoff_policy,
3195                start,
3196                query,
3197            )
3198        }
3199
3200        /// Sets the value of [name][crate::model::DeleteExternalAccessRuleRequest::name].
3201        ///
3202        /// This is a **required** field for requests.
3203        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3204            self.0.request.name = v.into();
3205            self
3206        }
3207
3208        /// Sets the value of [request_id][crate::model::DeleteExternalAccessRuleRequest::request_id].
3209        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3210            self.0.request.request_id = v.into();
3211            self
3212        }
3213    }
3214
3215    #[doc(hidden)]
3216    impl crate::RequestBuilder for DeleteExternalAccessRule {
3217        fn request_options(&mut self) -> &mut crate::RequestOptions {
3218            &mut self.0.options
3219        }
3220    }
3221
3222    /// The request builder for [VmwareEngine::list_logging_servers][crate::client::VmwareEngine::list_logging_servers] calls.
3223    ///
3224    /// # Example
3225    /// ```
3226    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListLoggingServers;
3227    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
3228    /// use google_cloud_gax::paginator::ItemPaginator;
3229    ///
3230    /// let builder = prepare_request_builder();
3231    /// let mut items = builder.by_item();
3232    /// while let Some(result) = items.next().await {
3233    ///   let item = result?;
3234    /// }
3235    /// # Ok(()) }
3236    ///
3237    /// fn prepare_request_builder() -> ListLoggingServers {
3238    ///   # panic!();
3239    ///   // ... details omitted ...
3240    /// }
3241    /// ```
3242    #[derive(Clone, Debug)]
3243    pub struct ListLoggingServers(RequestBuilder<crate::model::ListLoggingServersRequest>);
3244
3245    impl ListLoggingServers {
3246        pub(crate) fn new(
3247            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3248        ) -> Self {
3249            Self(RequestBuilder::new(stub))
3250        }
3251
3252        /// Sets the full request, replacing any prior values.
3253        pub fn with_request<V: Into<crate::model::ListLoggingServersRequest>>(
3254            mut self,
3255            v: V,
3256        ) -> Self {
3257            self.0.request = v.into();
3258            self
3259        }
3260
3261        /// Sets all the options, replacing any prior values.
3262        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3263            self.0.options = v.into();
3264            self
3265        }
3266
3267        /// Sends the request.
3268        pub async fn send(self) -> Result<crate::model::ListLoggingServersResponse> {
3269            (*self.0.stub)
3270                .list_logging_servers(self.0.request, self.0.options)
3271                .await
3272                .map(crate::Response::into_body)
3273        }
3274
3275        /// Streams each page in the collection.
3276        pub fn by_page(
3277            self,
3278        ) -> impl google_cloud_gax::paginator::Paginator<
3279            crate::model::ListLoggingServersResponse,
3280            crate::Error,
3281        > {
3282            use std::clone::Clone;
3283            let token = self.0.request.page_token.clone();
3284            let execute = move |token: String| {
3285                let mut builder = self.clone();
3286                builder.0.request = builder.0.request.set_page_token(token);
3287                builder.send()
3288            };
3289            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3290        }
3291
3292        /// Streams each item in the collection.
3293        pub fn by_item(
3294            self,
3295        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3296            crate::model::ListLoggingServersResponse,
3297            crate::Error,
3298        > {
3299            use google_cloud_gax::paginator::Paginator;
3300            self.by_page().items()
3301        }
3302
3303        /// Sets the value of [parent][crate::model::ListLoggingServersRequest::parent].
3304        ///
3305        /// This is a **required** field for requests.
3306        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3307            self.0.request.parent = v.into();
3308            self
3309        }
3310
3311        /// Sets the value of [page_size][crate::model::ListLoggingServersRequest::page_size].
3312        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3313            self.0.request.page_size = v.into();
3314            self
3315        }
3316
3317        /// Sets the value of [page_token][crate::model::ListLoggingServersRequest::page_token].
3318        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3319            self.0.request.page_token = v.into();
3320            self
3321        }
3322
3323        /// Sets the value of [filter][crate::model::ListLoggingServersRequest::filter].
3324        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3325            self.0.request.filter = v.into();
3326            self
3327        }
3328
3329        /// Sets the value of [order_by][crate::model::ListLoggingServersRequest::order_by].
3330        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3331            self.0.request.order_by = v.into();
3332            self
3333        }
3334    }
3335
3336    #[doc(hidden)]
3337    impl crate::RequestBuilder for ListLoggingServers {
3338        fn request_options(&mut self) -> &mut crate::RequestOptions {
3339            &mut self.0.options
3340        }
3341    }
3342
3343    /// The request builder for [VmwareEngine::get_logging_server][crate::client::VmwareEngine::get_logging_server] calls.
3344    ///
3345    /// # Example
3346    /// ```
3347    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetLoggingServer;
3348    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
3349    ///
3350    /// let builder = prepare_request_builder();
3351    /// let response = builder.send().await?;
3352    /// # Ok(()) }
3353    ///
3354    /// fn prepare_request_builder() -> GetLoggingServer {
3355    ///   # panic!();
3356    ///   // ... details omitted ...
3357    /// }
3358    /// ```
3359    #[derive(Clone, Debug)]
3360    pub struct GetLoggingServer(RequestBuilder<crate::model::GetLoggingServerRequest>);
3361
3362    impl GetLoggingServer {
3363        pub(crate) fn new(
3364            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3365        ) -> Self {
3366            Self(RequestBuilder::new(stub))
3367        }
3368
3369        /// Sets the full request, replacing any prior values.
3370        pub fn with_request<V: Into<crate::model::GetLoggingServerRequest>>(
3371            mut self,
3372            v: V,
3373        ) -> Self {
3374            self.0.request = v.into();
3375            self
3376        }
3377
3378        /// Sets all the options, replacing any prior values.
3379        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3380            self.0.options = v.into();
3381            self
3382        }
3383
3384        /// Sends the request.
3385        pub async fn send(self) -> Result<crate::model::LoggingServer> {
3386            (*self.0.stub)
3387                .get_logging_server(self.0.request, self.0.options)
3388                .await
3389                .map(crate::Response::into_body)
3390        }
3391
3392        /// Sets the value of [name][crate::model::GetLoggingServerRequest::name].
3393        ///
3394        /// This is a **required** field for requests.
3395        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3396            self.0.request.name = v.into();
3397            self
3398        }
3399    }
3400
3401    #[doc(hidden)]
3402    impl crate::RequestBuilder for GetLoggingServer {
3403        fn request_options(&mut self) -> &mut crate::RequestOptions {
3404            &mut self.0.options
3405        }
3406    }
3407
3408    /// The request builder for [VmwareEngine::create_logging_server][crate::client::VmwareEngine::create_logging_server] calls.
3409    ///
3410    /// # Example
3411    /// ```
3412    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::CreateLoggingServer;
3413    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
3414    /// use google_cloud_lro::Poller;
3415    ///
3416    /// let builder = prepare_request_builder();
3417    /// let response = builder.poller().until_done().await?;
3418    /// # Ok(()) }
3419    ///
3420    /// fn prepare_request_builder() -> CreateLoggingServer {
3421    ///   # panic!();
3422    ///   // ... details omitted ...
3423    /// }
3424    /// ```
3425    #[derive(Clone, Debug)]
3426    pub struct CreateLoggingServer(RequestBuilder<crate::model::CreateLoggingServerRequest>);
3427
3428    impl CreateLoggingServer {
3429        pub(crate) fn new(
3430            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3431        ) -> Self {
3432            Self(RequestBuilder::new(stub))
3433        }
3434
3435        /// Sets the full request, replacing any prior values.
3436        pub fn with_request<V: Into<crate::model::CreateLoggingServerRequest>>(
3437            mut self,
3438            v: V,
3439        ) -> Self {
3440            self.0.request = v.into();
3441            self
3442        }
3443
3444        /// Sets all the options, replacing any prior values.
3445        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3446            self.0.options = v.into();
3447            self
3448        }
3449
3450        /// Sends the request.
3451        ///
3452        /// # Long running operations
3453        ///
3454        /// This starts, but does not poll, a longrunning operation. More information
3455        /// on [create_logging_server][crate::client::VmwareEngine::create_logging_server].
3456        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3457            (*self.0.stub)
3458                .create_logging_server(self.0.request, self.0.options)
3459                .await
3460                .map(crate::Response::into_body)
3461        }
3462
3463        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_logging_server`.
3464        pub fn poller(
3465            self,
3466        ) -> impl google_cloud_lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3467        {
3468            type Operation = google_cloud_lro::internal::Operation<
3469                crate::model::LoggingServer,
3470                crate::model::OperationMetadata,
3471            >;
3472            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3473            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3474
3475            let stub = self.0.stub.clone();
3476            let mut options = self.0.options.clone();
3477            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3478            let query = move |name| {
3479                let stub = stub.clone();
3480                let options = options.clone();
3481                async {
3482                    let op = GetOperation::new(stub)
3483                        .set_name(name)
3484                        .with_options(options)
3485                        .send()
3486                        .await?;
3487                    Ok(Operation::new(op))
3488                }
3489            };
3490
3491            let start = move || async {
3492                let op = self.send().await?;
3493                Ok(Operation::new(op))
3494            };
3495
3496            google_cloud_lro::internal::new_poller(
3497                polling_error_policy,
3498                polling_backoff_policy,
3499                start,
3500                query,
3501            )
3502        }
3503
3504        /// Sets the value of [parent][crate::model::CreateLoggingServerRequest::parent].
3505        ///
3506        /// This is a **required** field for requests.
3507        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3508            self.0.request.parent = v.into();
3509            self
3510        }
3511
3512        /// Sets the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
3513        ///
3514        /// This is a **required** field for requests.
3515        pub fn set_logging_server<T>(mut self, v: T) -> Self
3516        where
3517            T: std::convert::Into<crate::model::LoggingServer>,
3518        {
3519            self.0.request.logging_server = std::option::Option::Some(v.into());
3520            self
3521        }
3522
3523        /// Sets or clears the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
3524        ///
3525        /// This is a **required** field for requests.
3526        pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3527        where
3528            T: std::convert::Into<crate::model::LoggingServer>,
3529        {
3530            self.0.request.logging_server = v.map(|x| x.into());
3531            self
3532        }
3533
3534        /// Sets the value of [logging_server_id][crate::model::CreateLoggingServerRequest::logging_server_id].
3535        ///
3536        /// This is a **required** field for requests.
3537        pub fn set_logging_server_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3538            self.0.request.logging_server_id = v.into();
3539            self
3540        }
3541
3542        /// Sets the value of [request_id][crate::model::CreateLoggingServerRequest::request_id].
3543        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3544            self.0.request.request_id = v.into();
3545            self
3546        }
3547    }
3548
3549    #[doc(hidden)]
3550    impl crate::RequestBuilder for CreateLoggingServer {
3551        fn request_options(&mut self) -> &mut crate::RequestOptions {
3552            &mut self.0.options
3553        }
3554    }
3555
3556    /// The request builder for [VmwareEngine::update_logging_server][crate::client::VmwareEngine::update_logging_server] calls.
3557    ///
3558    /// # Example
3559    /// ```
3560    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdateLoggingServer;
3561    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
3562    /// use google_cloud_lro::Poller;
3563    ///
3564    /// let builder = prepare_request_builder();
3565    /// let response = builder.poller().until_done().await?;
3566    /// # Ok(()) }
3567    ///
3568    /// fn prepare_request_builder() -> UpdateLoggingServer {
3569    ///   # panic!();
3570    ///   // ... details omitted ...
3571    /// }
3572    /// ```
3573    #[derive(Clone, Debug)]
3574    pub struct UpdateLoggingServer(RequestBuilder<crate::model::UpdateLoggingServerRequest>);
3575
3576    impl UpdateLoggingServer {
3577        pub(crate) fn new(
3578            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3579        ) -> Self {
3580            Self(RequestBuilder::new(stub))
3581        }
3582
3583        /// Sets the full request, replacing any prior values.
3584        pub fn with_request<V: Into<crate::model::UpdateLoggingServerRequest>>(
3585            mut self,
3586            v: V,
3587        ) -> Self {
3588            self.0.request = v.into();
3589            self
3590        }
3591
3592        /// Sets all the options, replacing any prior values.
3593        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3594            self.0.options = v.into();
3595            self
3596        }
3597
3598        /// Sends the request.
3599        ///
3600        /// # Long running operations
3601        ///
3602        /// This starts, but does not poll, a longrunning operation. More information
3603        /// on [update_logging_server][crate::client::VmwareEngine::update_logging_server].
3604        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3605            (*self.0.stub)
3606                .update_logging_server(self.0.request, self.0.options)
3607                .await
3608                .map(crate::Response::into_body)
3609        }
3610
3611        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_logging_server`.
3612        pub fn poller(
3613            self,
3614        ) -> impl google_cloud_lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3615        {
3616            type Operation = google_cloud_lro::internal::Operation<
3617                crate::model::LoggingServer,
3618                crate::model::OperationMetadata,
3619            >;
3620            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3621            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3622
3623            let stub = self.0.stub.clone();
3624            let mut options = self.0.options.clone();
3625            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3626            let query = move |name| {
3627                let stub = stub.clone();
3628                let options = options.clone();
3629                async {
3630                    let op = GetOperation::new(stub)
3631                        .set_name(name)
3632                        .with_options(options)
3633                        .send()
3634                        .await?;
3635                    Ok(Operation::new(op))
3636                }
3637            };
3638
3639            let start = move || async {
3640                let op = self.send().await?;
3641                Ok(Operation::new(op))
3642            };
3643
3644            google_cloud_lro::internal::new_poller(
3645                polling_error_policy,
3646                polling_backoff_policy,
3647                start,
3648                query,
3649            )
3650        }
3651
3652        /// Sets the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
3653        ///
3654        /// This is a **required** field for requests.
3655        pub fn set_update_mask<T>(mut self, v: T) -> Self
3656        where
3657            T: std::convert::Into<wkt::FieldMask>,
3658        {
3659            self.0.request.update_mask = std::option::Option::Some(v.into());
3660            self
3661        }
3662
3663        /// Sets or clears the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
3664        ///
3665        /// This is a **required** field for requests.
3666        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3667        where
3668            T: std::convert::Into<wkt::FieldMask>,
3669        {
3670            self.0.request.update_mask = v.map(|x| x.into());
3671            self
3672        }
3673
3674        /// Sets the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
3675        ///
3676        /// This is a **required** field for requests.
3677        pub fn set_logging_server<T>(mut self, v: T) -> Self
3678        where
3679            T: std::convert::Into<crate::model::LoggingServer>,
3680        {
3681            self.0.request.logging_server = std::option::Option::Some(v.into());
3682            self
3683        }
3684
3685        /// Sets or clears the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
3686        ///
3687        /// This is a **required** field for requests.
3688        pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3689        where
3690            T: std::convert::Into<crate::model::LoggingServer>,
3691        {
3692            self.0.request.logging_server = v.map(|x| x.into());
3693            self
3694        }
3695
3696        /// Sets the value of [request_id][crate::model::UpdateLoggingServerRequest::request_id].
3697        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3698            self.0.request.request_id = v.into();
3699            self
3700        }
3701    }
3702
3703    #[doc(hidden)]
3704    impl crate::RequestBuilder for UpdateLoggingServer {
3705        fn request_options(&mut self) -> &mut crate::RequestOptions {
3706            &mut self.0.options
3707        }
3708    }
3709
3710    /// The request builder for [VmwareEngine::delete_logging_server][crate::client::VmwareEngine::delete_logging_server] calls.
3711    ///
3712    /// # Example
3713    /// ```
3714    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::DeleteLoggingServer;
3715    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
3716    /// use google_cloud_lro::Poller;
3717    ///
3718    /// let builder = prepare_request_builder();
3719    /// let response = builder.poller().until_done().await?;
3720    /// # Ok(()) }
3721    ///
3722    /// fn prepare_request_builder() -> DeleteLoggingServer {
3723    ///   # panic!();
3724    ///   // ... details omitted ...
3725    /// }
3726    /// ```
3727    #[derive(Clone, Debug)]
3728    pub struct DeleteLoggingServer(RequestBuilder<crate::model::DeleteLoggingServerRequest>);
3729
3730    impl DeleteLoggingServer {
3731        pub(crate) fn new(
3732            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3733        ) -> Self {
3734            Self(RequestBuilder::new(stub))
3735        }
3736
3737        /// Sets the full request, replacing any prior values.
3738        pub fn with_request<V: Into<crate::model::DeleteLoggingServerRequest>>(
3739            mut self,
3740            v: V,
3741        ) -> Self {
3742            self.0.request = v.into();
3743            self
3744        }
3745
3746        /// Sets all the options, replacing any prior values.
3747        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3748            self.0.options = v.into();
3749            self
3750        }
3751
3752        /// Sends the request.
3753        ///
3754        /// # Long running operations
3755        ///
3756        /// This starts, but does not poll, a longrunning operation. More information
3757        /// on [delete_logging_server][crate::client::VmwareEngine::delete_logging_server].
3758        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3759            (*self.0.stub)
3760                .delete_logging_server(self.0.request, self.0.options)
3761                .await
3762                .map(crate::Response::into_body)
3763        }
3764
3765        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_logging_server`.
3766        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3767            type Operation =
3768                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3769            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3770            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3771
3772            let stub = self.0.stub.clone();
3773            let mut options = self.0.options.clone();
3774            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3775            let query = move |name| {
3776                let stub = stub.clone();
3777                let options = options.clone();
3778                async {
3779                    let op = GetOperation::new(stub)
3780                        .set_name(name)
3781                        .with_options(options)
3782                        .send()
3783                        .await?;
3784                    Ok(Operation::new(op))
3785                }
3786            };
3787
3788            let start = move || async {
3789                let op = self.send().await?;
3790                Ok(Operation::new(op))
3791            };
3792
3793            google_cloud_lro::internal::new_unit_response_poller(
3794                polling_error_policy,
3795                polling_backoff_policy,
3796                start,
3797                query,
3798            )
3799        }
3800
3801        /// Sets the value of [name][crate::model::DeleteLoggingServerRequest::name].
3802        ///
3803        /// This is a **required** field for requests.
3804        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3805            self.0.request.name = v.into();
3806            self
3807        }
3808
3809        /// Sets the value of [request_id][crate::model::DeleteLoggingServerRequest::request_id].
3810        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3811            self.0.request.request_id = v.into();
3812            self
3813        }
3814    }
3815
3816    #[doc(hidden)]
3817    impl crate::RequestBuilder for DeleteLoggingServer {
3818        fn request_options(&mut self) -> &mut crate::RequestOptions {
3819            &mut self.0.options
3820        }
3821    }
3822
3823    /// The request builder for [VmwareEngine::list_node_types][crate::client::VmwareEngine::list_node_types] calls.
3824    ///
3825    /// # Example
3826    /// ```
3827    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListNodeTypes;
3828    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
3829    /// use google_cloud_gax::paginator::ItemPaginator;
3830    ///
3831    /// let builder = prepare_request_builder();
3832    /// let mut items = builder.by_item();
3833    /// while let Some(result) = items.next().await {
3834    ///   let item = result?;
3835    /// }
3836    /// # Ok(()) }
3837    ///
3838    /// fn prepare_request_builder() -> ListNodeTypes {
3839    ///   # panic!();
3840    ///   // ... details omitted ...
3841    /// }
3842    /// ```
3843    #[derive(Clone, Debug)]
3844    pub struct ListNodeTypes(RequestBuilder<crate::model::ListNodeTypesRequest>);
3845
3846    impl ListNodeTypes {
3847        pub(crate) fn new(
3848            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3849        ) -> Self {
3850            Self(RequestBuilder::new(stub))
3851        }
3852
3853        /// Sets the full request, replacing any prior values.
3854        pub fn with_request<V: Into<crate::model::ListNodeTypesRequest>>(mut self, v: V) -> Self {
3855            self.0.request = v.into();
3856            self
3857        }
3858
3859        /// Sets all the options, replacing any prior values.
3860        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3861            self.0.options = v.into();
3862            self
3863        }
3864
3865        /// Sends the request.
3866        pub async fn send(self) -> Result<crate::model::ListNodeTypesResponse> {
3867            (*self.0.stub)
3868                .list_node_types(self.0.request, self.0.options)
3869                .await
3870                .map(crate::Response::into_body)
3871        }
3872
3873        /// Streams each page in the collection.
3874        pub fn by_page(
3875            self,
3876        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListNodeTypesResponse, crate::Error>
3877        {
3878            use std::clone::Clone;
3879            let token = self.0.request.page_token.clone();
3880            let execute = move |token: String| {
3881                let mut builder = self.clone();
3882                builder.0.request = builder.0.request.set_page_token(token);
3883                builder.send()
3884            };
3885            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3886        }
3887
3888        /// Streams each item in the collection.
3889        pub fn by_item(
3890            self,
3891        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3892            crate::model::ListNodeTypesResponse,
3893            crate::Error,
3894        > {
3895            use google_cloud_gax::paginator::Paginator;
3896            self.by_page().items()
3897        }
3898
3899        /// Sets the value of [parent][crate::model::ListNodeTypesRequest::parent].
3900        ///
3901        /// This is a **required** field for requests.
3902        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3903            self.0.request.parent = v.into();
3904            self
3905        }
3906
3907        /// Sets the value of [page_size][crate::model::ListNodeTypesRequest::page_size].
3908        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3909            self.0.request.page_size = v.into();
3910            self
3911        }
3912
3913        /// Sets the value of [page_token][crate::model::ListNodeTypesRequest::page_token].
3914        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3915            self.0.request.page_token = v.into();
3916            self
3917        }
3918
3919        /// Sets the value of [filter][crate::model::ListNodeTypesRequest::filter].
3920        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3921            self.0.request.filter = v.into();
3922            self
3923        }
3924    }
3925
3926    #[doc(hidden)]
3927    impl crate::RequestBuilder for ListNodeTypes {
3928        fn request_options(&mut self) -> &mut crate::RequestOptions {
3929            &mut self.0.options
3930        }
3931    }
3932
3933    /// The request builder for [VmwareEngine::get_node_type][crate::client::VmwareEngine::get_node_type] calls.
3934    ///
3935    /// # Example
3936    /// ```
3937    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetNodeType;
3938    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
3939    ///
3940    /// let builder = prepare_request_builder();
3941    /// let response = builder.send().await?;
3942    /// # Ok(()) }
3943    ///
3944    /// fn prepare_request_builder() -> GetNodeType {
3945    ///   # panic!();
3946    ///   // ... details omitted ...
3947    /// }
3948    /// ```
3949    #[derive(Clone, Debug)]
3950    pub struct GetNodeType(RequestBuilder<crate::model::GetNodeTypeRequest>);
3951
3952    impl GetNodeType {
3953        pub(crate) fn new(
3954            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3955        ) -> Self {
3956            Self(RequestBuilder::new(stub))
3957        }
3958
3959        /// Sets the full request, replacing any prior values.
3960        pub fn with_request<V: Into<crate::model::GetNodeTypeRequest>>(mut self, v: V) -> Self {
3961            self.0.request = v.into();
3962            self
3963        }
3964
3965        /// Sets all the options, replacing any prior values.
3966        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3967            self.0.options = v.into();
3968            self
3969        }
3970
3971        /// Sends the request.
3972        pub async fn send(self) -> Result<crate::model::NodeType> {
3973            (*self.0.stub)
3974                .get_node_type(self.0.request, self.0.options)
3975                .await
3976                .map(crate::Response::into_body)
3977        }
3978
3979        /// Sets the value of [name][crate::model::GetNodeTypeRequest::name].
3980        ///
3981        /// This is a **required** field for requests.
3982        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3983            self.0.request.name = v.into();
3984            self
3985        }
3986    }
3987
3988    #[doc(hidden)]
3989    impl crate::RequestBuilder for GetNodeType {
3990        fn request_options(&mut self) -> &mut crate::RequestOptions {
3991            &mut self.0.options
3992        }
3993    }
3994
3995    /// The request builder for [VmwareEngine::show_nsx_credentials][crate::client::VmwareEngine::show_nsx_credentials] calls.
3996    ///
3997    /// # Example
3998    /// ```
3999    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ShowNsxCredentials;
4000    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
4001    ///
4002    /// let builder = prepare_request_builder();
4003    /// let response = builder.send().await?;
4004    /// # Ok(()) }
4005    ///
4006    /// fn prepare_request_builder() -> ShowNsxCredentials {
4007    ///   # panic!();
4008    ///   // ... details omitted ...
4009    /// }
4010    /// ```
4011    #[derive(Clone, Debug)]
4012    pub struct ShowNsxCredentials(RequestBuilder<crate::model::ShowNsxCredentialsRequest>);
4013
4014    impl ShowNsxCredentials {
4015        pub(crate) fn new(
4016            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4017        ) -> Self {
4018            Self(RequestBuilder::new(stub))
4019        }
4020
4021        /// Sets the full request, replacing any prior values.
4022        pub fn with_request<V: Into<crate::model::ShowNsxCredentialsRequest>>(
4023            mut self,
4024            v: V,
4025        ) -> Self {
4026            self.0.request = v.into();
4027            self
4028        }
4029
4030        /// Sets all the options, replacing any prior values.
4031        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4032            self.0.options = v.into();
4033            self
4034        }
4035
4036        /// Sends the request.
4037        pub async fn send(self) -> Result<crate::model::Credentials> {
4038            (*self.0.stub)
4039                .show_nsx_credentials(self.0.request, self.0.options)
4040                .await
4041                .map(crate::Response::into_body)
4042        }
4043
4044        /// Sets the value of [private_cloud][crate::model::ShowNsxCredentialsRequest::private_cloud].
4045        ///
4046        /// This is a **required** field for requests.
4047        pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4048            self.0.request.private_cloud = v.into();
4049            self
4050        }
4051    }
4052
4053    #[doc(hidden)]
4054    impl crate::RequestBuilder for ShowNsxCredentials {
4055        fn request_options(&mut self) -> &mut crate::RequestOptions {
4056            &mut self.0.options
4057        }
4058    }
4059
4060    /// The request builder for [VmwareEngine::show_vcenter_credentials][crate::client::VmwareEngine::show_vcenter_credentials] calls.
4061    ///
4062    /// # Example
4063    /// ```
4064    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ShowVcenterCredentials;
4065    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
4066    ///
4067    /// let builder = prepare_request_builder();
4068    /// let response = builder.send().await?;
4069    /// # Ok(()) }
4070    ///
4071    /// fn prepare_request_builder() -> ShowVcenterCredentials {
4072    ///   # panic!();
4073    ///   // ... details omitted ...
4074    /// }
4075    /// ```
4076    #[derive(Clone, Debug)]
4077    pub struct ShowVcenterCredentials(RequestBuilder<crate::model::ShowVcenterCredentialsRequest>);
4078
4079    impl ShowVcenterCredentials {
4080        pub(crate) fn new(
4081            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4082        ) -> Self {
4083            Self(RequestBuilder::new(stub))
4084        }
4085
4086        /// Sets the full request, replacing any prior values.
4087        pub fn with_request<V: Into<crate::model::ShowVcenterCredentialsRequest>>(
4088            mut self,
4089            v: V,
4090        ) -> Self {
4091            self.0.request = v.into();
4092            self
4093        }
4094
4095        /// Sets all the options, replacing any prior values.
4096        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4097            self.0.options = v.into();
4098            self
4099        }
4100
4101        /// Sends the request.
4102        pub async fn send(self) -> Result<crate::model::Credentials> {
4103            (*self.0.stub)
4104                .show_vcenter_credentials(self.0.request, self.0.options)
4105                .await
4106                .map(crate::Response::into_body)
4107        }
4108
4109        /// Sets the value of [private_cloud][crate::model::ShowVcenterCredentialsRequest::private_cloud].
4110        ///
4111        /// This is a **required** field for requests.
4112        pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4113            self.0.request.private_cloud = v.into();
4114            self
4115        }
4116
4117        /// Sets the value of [username][crate::model::ShowVcenterCredentialsRequest::username].
4118        pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
4119            self.0.request.username = v.into();
4120            self
4121        }
4122    }
4123
4124    #[doc(hidden)]
4125    impl crate::RequestBuilder for ShowVcenterCredentials {
4126        fn request_options(&mut self) -> &mut crate::RequestOptions {
4127            &mut self.0.options
4128        }
4129    }
4130
4131    /// The request builder for [VmwareEngine::reset_nsx_credentials][crate::client::VmwareEngine::reset_nsx_credentials] calls.
4132    ///
4133    /// # Example
4134    /// ```
4135    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ResetNsxCredentials;
4136    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
4137    /// use google_cloud_lro::Poller;
4138    ///
4139    /// let builder = prepare_request_builder();
4140    /// let response = builder.poller().until_done().await?;
4141    /// # Ok(()) }
4142    ///
4143    /// fn prepare_request_builder() -> ResetNsxCredentials {
4144    ///   # panic!();
4145    ///   // ... details omitted ...
4146    /// }
4147    /// ```
4148    #[derive(Clone, Debug)]
4149    pub struct ResetNsxCredentials(RequestBuilder<crate::model::ResetNsxCredentialsRequest>);
4150
4151    impl ResetNsxCredentials {
4152        pub(crate) fn new(
4153            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4154        ) -> Self {
4155            Self(RequestBuilder::new(stub))
4156        }
4157
4158        /// Sets the full request, replacing any prior values.
4159        pub fn with_request<V: Into<crate::model::ResetNsxCredentialsRequest>>(
4160            mut self,
4161            v: V,
4162        ) -> Self {
4163            self.0.request = v.into();
4164            self
4165        }
4166
4167        /// Sets all the options, replacing any prior values.
4168        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4169            self.0.options = v.into();
4170            self
4171        }
4172
4173        /// Sends the request.
4174        ///
4175        /// # Long running operations
4176        ///
4177        /// This starts, but does not poll, a longrunning operation. More information
4178        /// on [reset_nsx_credentials][crate::client::VmwareEngine::reset_nsx_credentials].
4179        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4180            (*self.0.stub)
4181                .reset_nsx_credentials(self.0.request, self.0.options)
4182                .await
4183                .map(crate::Response::into_body)
4184        }
4185
4186        /// Creates a [Poller][google_cloud_lro::Poller] to work with `reset_nsx_credentials`.
4187        pub fn poller(
4188            self,
4189        ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
4190        {
4191            type Operation = google_cloud_lro::internal::Operation<
4192                crate::model::PrivateCloud,
4193                crate::model::OperationMetadata,
4194            >;
4195            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4196            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4197
4198            let stub = self.0.stub.clone();
4199            let mut options = self.0.options.clone();
4200            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4201            let query = move |name| {
4202                let stub = stub.clone();
4203                let options = options.clone();
4204                async {
4205                    let op = GetOperation::new(stub)
4206                        .set_name(name)
4207                        .with_options(options)
4208                        .send()
4209                        .await?;
4210                    Ok(Operation::new(op))
4211                }
4212            };
4213
4214            let start = move || async {
4215                let op = self.send().await?;
4216                Ok(Operation::new(op))
4217            };
4218
4219            google_cloud_lro::internal::new_poller(
4220                polling_error_policy,
4221                polling_backoff_policy,
4222                start,
4223                query,
4224            )
4225        }
4226
4227        /// Sets the value of [private_cloud][crate::model::ResetNsxCredentialsRequest::private_cloud].
4228        ///
4229        /// This is a **required** field for requests.
4230        pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4231            self.0.request.private_cloud = v.into();
4232            self
4233        }
4234
4235        /// Sets the value of [request_id][crate::model::ResetNsxCredentialsRequest::request_id].
4236        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4237            self.0.request.request_id = v.into();
4238            self
4239        }
4240    }
4241
4242    #[doc(hidden)]
4243    impl crate::RequestBuilder for ResetNsxCredentials {
4244        fn request_options(&mut self) -> &mut crate::RequestOptions {
4245            &mut self.0.options
4246        }
4247    }
4248
4249    /// The request builder for [VmwareEngine::reset_vcenter_credentials][crate::client::VmwareEngine::reset_vcenter_credentials] calls.
4250    ///
4251    /// # Example
4252    /// ```
4253    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ResetVcenterCredentials;
4254    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
4255    /// use google_cloud_lro::Poller;
4256    ///
4257    /// let builder = prepare_request_builder();
4258    /// let response = builder.poller().until_done().await?;
4259    /// # Ok(()) }
4260    ///
4261    /// fn prepare_request_builder() -> ResetVcenterCredentials {
4262    ///   # panic!();
4263    ///   // ... details omitted ...
4264    /// }
4265    /// ```
4266    #[derive(Clone, Debug)]
4267    pub struct ResetVcenterCredentials(
4268        RequestBuilder<crate::model::ResetVcenterCredentialsRequest>,
4269    );
4270
4271    impl ResetVcenterCredentials {
4272        pub(crate) fn new(
4273            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4274        ) -> Self {
4275            Self(RequestBuilder::new(stub))
4276        }
4277
4278        /// Sets the full request, replacing any prior values.
4279        pub fn with_request<V: Into<crate::model::ResetVcenterCredentialsRequest>>(
4280            mut self,
4281            v: V,
4282        ) -> Self {
4283            self.0.request = v.into();
4284            self
4285        }
4286
4287        /// Sets all the options, replacing any prior values.
4288        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4289            self.0.options = v.into();
4290            self
4291        }
4292
4293        /// Sends the request.
4294        ///
4295        /// # Long running operations
4296        ///
4297        /// This starts, but does not poll, a longrunning operation. More information
4298        /// on [reset_vcenter_credentials][crate::client::VmwareEngine::reset_vcenter_credentials].
4299        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4300            (*self.0.stub)
4301                .reset_vcenter_credentials(self.0.request, self.0.options)
4302                .await
4303                .map(crate::Response::into_body)
4304        }
4305
4306        /// Creates a [Poller][google_cloud_lro::Poller] to work with `reset_vcenter_credentials`.
4307        pub fn poller(
4308            self,
4309        ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
4310        {
4311            type Operation = google_cloud_lro::internal::Operation<
4312                crate::model::PrivateCloud,
4313                crate::model::OperationMetadata,
4314            >;
4315            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4316            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4317
4318            let stub = self.0.stub.clone();
4319            let mut options = self.0.options.clone();
4320            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4321            let query = move |name| {
4322                let stub = stub.clone();
4323                let options = options.clone();
4324                async {
4325                    let op = GetOperation::new(stub)
4326                        .set_name(name)
4327                        .with_options(options)
4328                        .send()
4329                        .await?;
4330                    Ok(Operation::new(op))
4331                }
4332            };
4333
4334            let start = move || async {
4335                let op = self.send().await?;
4336                Ok(Operation::new(op))
4337            };
4338
4339            google_cloud_lro::internal::new_poller(
4340                polling_error_policy,
4341                polling_backoff_policy,
4342                start,
4343                query,
4344            )
4345        }
4346
4347        /// Sets the value of [private_cloud][crate::model::ResetVcenterCredentialsRequest::private_cloud].
4348        ///
4349        /// This is a **required** field for requests.
4350        pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4351            self.0.request.private_cloud = v.into();
4352            self
4353        }
4354
4355        /// Sets the value of [request_id][crate::model::ResetVcenterCredentialsRequest::request_id].
4356        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4357            self.0.request.request_id = v.into();
4358            self
4359        }
4360
4361        /// Sets the value of [username][crate::model::ResetVcenterCredentialsRequest::username].
4362        pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
4363            self.0.request.username = v.into();
4364            self
4365        }
4366    }
4367
4368    #[doc(hidden)]
4369    impl crate::RequestBuilder for ResetVcenterCredentials {
4370        fn request_options(&mut self) -> &mut crate::RequestOptions {
4371            &mut self.0.options
4372        }
4373    }
4374
4375    /// The request builder for [VmwareEngine::get_dns_forwarding][crate::client::VmwareEngine::get_dns_forwarding] calls.
4376    ///
4377    /// # Example
4378    /// ```
4379    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetDnsForwarding;
4380    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
4381    ///
4382    /// let builder = prepare_request_builder();
4383    /// let response = builder.send().await?;
4384    /// # Ok(()) }
4385    ///
4386    /// fn prepare_request_builder() -> GetDnsForwarding {
4387    ///   # panic!();
4388    ///   // ... details omitted ...
4389    /// }
4390    /// ```
4391    #[derive(Clone, Debug)]
4392    pub struct GetDnsForwarding(RequestBuilder<crate::model::GetDnsForwardingRequest>);
4393
4394    impl GetDnsForwarding {
4395        pub(crate) fn new(
4396            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4397        ) -> Self {
4398            Self(RequestBuilder::new(stub))
4399        }
4400
4401        /// Sets the full request, replacing any prior values.
4402        pub fn with_request<V: Into<crate::model::GetDnsForwardingRequest>>(
4403            mut self,
4404            v: V,
4405        ) -> Self {
4406            self.0.request = v.into();
4407            self
4408        }
4409
4410        /// Sets all the options, replacing any prior values.
4411        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4412            self.0.options = v.into();
4413            self
4414        }
4415
4416        /// Sends the request.
4417        pub async fn send(self) -> Result<crate::model::DnsForwarding> {
4418            (*self.0.stub)
4419                .get_dns_forwarding(self.0.request, self.0.options)
4420                .await
4421                .map(crate::Response::into_body)
4422        }
4423
4424        /// Sets the value of [name][crate::model::GetDnsForwardingRequest::name].
4425        ///
4426        /// This is a **required** field for requests.
4427        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4428            self.0.request.name = v.into();
4429            self
4430        }
4431    }
4432
4433    #[doc(hidden)]
4434    impl crate::RequestBuilder for GetDnsForwarding {
4435        fn request_options(&mut self) -> &mut crate::RequestOptions {
4436            &mut self.0.options
4437        }
4438    }
4439
4440    /// The request builder for [VmwareEngine::update_dns_forwarding][crate::client::VmwareEngine::update_dns_forwarding] calls.
4441    ///
4442    /// # Example
4443    /// ```
4444    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdateDnsForwarding;
4445    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
4446    /// use google_cloud_lro::Poller;
4447    ///
4448    /// let builder = prepare_request_builder();
4449    /// let response = builder.poller().until_done().await?;
4450    /// # Ok(()) }
4451    ///
4452    /// fn prepare_request_builder() -> UpdateDnsForwarding {
4453    ///   # panic!();
4454    ///   // ... details omitted ...
4455    /// }
4456    /// ```
4457    #[derive(Clone, Debug)]
4458    pub struct UpdateDnsForwarding(RequestBuilder<crate::model::UpdateDnsForwardingRequest>);
4459
4460    impl UpdateDnsForwarding {
4461        pub(crate) fn new(
4462            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4463        ) -> Self {
4464            Self(RequestBuilder::new(stub))
4465        }
4466
4467        /// Sets the full request, replacing any prior values.
4468        pub fn with_request<V: Into<crate::model::UpdateDnsForwardingRequest>>(
4469            mut self,
4470            v: V,
4471        ) -> Self {
4472            self.0.request = v.into();
4473            self
4474        }
4475
4476        /// Sets all the options, replacing any prior values.
4477        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4478            self.0.options = v.into();
4479            self
4480        }
4481
4482        /// Sends the request.
4483        ///
4484        /// # Long running operations
4485        ///
4486        /// This starts, but does not poll, a longrunning operation. More information
4487        /// on [update_dns_forwarding][crate::client::VmwareEngine::update_dns_forwarding].
4488        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4489            (*self.0.stub)
4490                .update_dns_forwarding(self.0.request, self.0.options)
4491                .await
4492                .map(crate::Response::into_body)
4493        }
4494
4495        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_dns_forwarding`.
4496        pub fn poller(
4497            self,
4498        ) -> impl google_cloud_lro::Poller<crate::model::DnsForwarding, crate::model::OperationMetadata>
4499        {
4500            type Operation = google_cloud_lro::internal::Operation<
4501                crate::model::DnsForwarding,
4502                crate::model::OperationMetadata,
4503            >;
4504            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4505            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4506
4507            let stub = self.0.stub.clone();
4508            let mut options = self.0.options.clone();
4509            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4510            let query = move |name| {
4511                let stub = stub.clone();
4512                let options = options.clone();
4513                async {
4514                    let op = GetOperation::new(stub)
4515                        .set_name(name)
4516                        .with_options(options)
4517                        .send()
4518                        .await?;
4519                    Ok(Operation::new(op))
4520                }
4521            };
4522
4523            let start = move || async {
4524                let op = self.send().await?;
4525                Ok(Operation::new(op))
4526            };
4527
4528            google_cloud_lro::internal::new_poller(
4529                polling_error_policy,
4530                polling_backoff_policy,
4531                start,
4532                query,
4533            )
4534        }
4535
4536        /// Sets the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
4537        ///
4538        /// This is a **required** field for requests.
4539        pub fn set_dns_forwarding<T>(mut self, v: T) -> Self
4540        where
4541            T: std::convert::Into<crate::model::DnsForwarding>,
4542        {
4543            self.0.request.dns_forwarding = std::option::Option::Some(v.into());
4544            self
4545        }
4546
4547        /// Sets or clears the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
4548        ///
4549        /// This is a **required** field for requests.
4550        pub fn set_or_clear_dns_forwarding<T>(mut self, v: std::option::Option<T>) -> Self
4551        where
4552            T: std::convert::Into<crate::model::DnsForwarding>,
4553        {
4554            self.0.request.dns_forwarding = v.map(|x| x.into());
4555            self
4556        }
4557
4558        /// Sets the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
4559        ///
4560        /// This is a **required** field for requests.
4561        pub fn set_update_mask<T>(mut self, v: T) -> Self
4562        where
4563            T: std::convert::Into<wkt::FieldMask>,
4564        {
4565            self.0.request.update_mask = std::option::Option::Some(v.into());
4566            self
4567        }
4568
4569        /// Sets or clears the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
4570        ///
4571        /// This is a **required** field for requests.
4572        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4573        where
4574            T: std::convert::Into<wkt::FieldMask>,
4575        {
4576            self.0.request.update_mask = v.map(|x| x.into());
4577            self
4578        }
4579
4580        /// Sets the value of [request_id][crate::model::UpdateDnsForwardingRequest::request_id].
4581        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4582            self.0.request.request_id = v.into();
4583            self
4584        }
4585    }
4586
4587    #[doc(hidden)]
4588    impl crate::RequestBuilder for UpdateDnsForwarding {
4589        fn request_options(&mut self) -> &mut crate::RequestOptions {
4590            &mut self.0.options
4591        }
4592    }
4593
4594    /// The request builder for [VmwareEngine::get_network_peering][crate::client::VmwareEngine::get_network_peering] calls.
4595    ///
4596    /// # Example
4597    /// ```
4598    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetNetworkPeering;
4599    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
4600    ///
4601    /// let builder = prepare_request_builder();
4602    /// let response = builder.send().await?;
4603    /// # Ok(()) }
4604    ///
4605    /// fn prepare_request_builder() -> GetNetworkPeering {
4606    ///   # panic!();
4607    ///   // ... details omitted ...
4608    /// }
4609    /// ```
4610    #[derive(Clone, Debug)]
4611    pub struct GetNetworkPeering(RequestBuilder<crate::model::GetNetworkPeeringRequest>);
4612
4613    impl GetNetworkPeering {
4614        pub(crate) fn new(
4615            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4616        ) -> Self {
4617            Self(RequestBuilder::new(stub))
4618        }
4619
4620        /// Sets the full request, replacing any prior values.
4621        pub fn with_request<V: Into<crate::model::GetNetworkPeeringRequest>>(
4622            mut self,
4623            v: V,
4624        ) -> Self {
4625            self.0.request = v.into();
4626            self
4627        }
4628
4629        /// Sets all the options, replacing any prior values.
4630        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4631            self.0.options = v.into();
4632            self
4633        }
4634
4635        /// Sends the request.
4636        pub async fn send(self) -> Result<crate::model::NetworkPeering> {
4637            (*self.0.stub)
4638                .get_network_peering(self.0.request, self.0.options)
4639                .await
4640                .map(crate::Response::into_body)
4641        }
4642
4643        /// Sets the value of [name][crate::model::GetNetworkPeeringRequest::name].
4644        ///
4645        /// This is a **required** field for requests.
4646        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4647            self.0.request.name = v.into();
4648            self
4649        }
4650    }
4651
4652    #[doc(hidden)]
4653    impl crate::RequestBuilder for GetNetworkPeering {
4654        fn request_options(&mut self) -> &mut crate::RequestOptions {
4655            &mut self.0.options
4656        }
4657    }
4658
4659    /// The request builder for [VmwareEngine::list_network_peerings][crate::client::VmwareEngine::list_network_peerings] calls.
4660    ///
4661    /// # Example
4662    /// ```
4663    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListNetworkPeerings;
4664    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
4665    /// use google_cloud_gax::paginator::ItemPaginator;
4666    ///
4667    /// let builder = prepare_request_builder();
4668    /// let mut items = builder.by_item();
4669    /// while let Some(result) = items.next().await {
4670    ///   let item = result?;
4671    /// }
4672    /// # Ok(()) }
4673    ///
4674    /// fn prepare_request_builder() -> ListNetworkPeerings {
4675    ///   # panic!();
4676    ///   // ... details omitted ...
4677    /// }
4678    /// ```
4679    #[derive(Clone, Debug)]
4680    pub struct ListNetworkPeerings(RequestBuilder<crate::model::ListNetworkPeeringsRequest>);
4681
4682    impl ListNetworkPeerings {
4683        pub(crate) fn new(
4684            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4685        ) -> Self {
4686            Self(RequestBuilder::new(stub))
4687        }
4688
4689        /// Sets the full request, replacing any prior values.
4690        pub fn with_request<V: Into<crate::model::ListNetworkPeeringsRequest>>(
4691            mut self,
4692            v: V,
4693        ) -> Self {
4694            self.0.request = v.into();
4695            self
4696        }
4697
4698        /// Sets all the options, replacing any prior values.
4699        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4700            self.0.options = v.into();
4701            self
4702        }
4703
4704        /// Sends the request.
4705        pub async fn send(self) -> Result<crate::model::ListNetworkPeeringsResponse> {
4706            (*self.0.stub)
4707                .list_network_peerings(self.0.request, self.0.options)
4708                .await
4709                .map(crate::Response::into_body)
4710        }
4711
4712        /// Streams each page in the collection.
4713        pub fn by_page(
4714            self,
4715        ) -> impl google_cloud_gax::paginator::Paginator<
4716            crate::model::ListNetworkPeeringsResponse,
4717            crate::Error,
4718        > {
4719            use std::clone::Clone;
4720            let token = self.0.request.page_token.clone();
4721            let execute = move |token: String| {
4722                let mut builder = self.clone();
4723                builder.0.request = builder.0.request.set_page_token(token);
4724                builder.send()
4725            };
4726            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4727        }
4728
4729        /// Streams each item in the collection.
4730        pub fn by_item(
4731            self,
4732        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4733            crate::model::ListNetworkPeeringsResponse,
4734            crate::Error,
4735        > {
4736            use google_cloud_gax::paginator::Paginator;
4737            self.by_page().items()
4738        }
4739
4740        /// Sets the value of [parent][crate::model::ListNetworkPeeringsRequest::parent].
4741        ///
4742        /// This is a **required** field for requests.
4743        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4744            self.0.request.parent = v.into();
4745            self
4746        }
4747
4748        /// Sets the value of [page_size][crate::model::ListNetworkPeeringsRequest::page_size].
4749        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4750            self.0.request.page_size = v.into();
4751            self
4752        }
4753
4754        /// Sets the value of [page_token][crate::model::ListNetworkPeeringsRequest::page_token].
4755        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4756            self.0.request.page_token = v.into();
4757            self
4758        }
4759
4760        /// Sets the value of [filter][crate::model::ListNetworkPeeringsRequest::filter].
4761        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4762            self.0.request.filter = v.into();
4763            self
4764        }
4765
4766        /// Sets the value of [order_by][crate::model::ListNetworkPeeringsRequest::order_by].
4767        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4768            self.0.request.order_by = v.into();
4769            self
4770        }
4771    }
4772
4773    #[doc(hidden)]
4774    impl crate::RequestBuilder for ListNetworkPeerings {
4775        fn request_options(&mut self) -> &mut crate::RequestOptions {
4776            &mut self.0.options
4777        }
4778    }
4779
4780    /// The request builder for [VmwareEngine::create_network_peering][crate::client::VmwareEngine::create_network_peering] calls.
4781    ///
4782    /// # Example
4783    /// ```
4784    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::CreateNetworkPeering;
4785    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
4786    /// use google_cloud_lro::Poller;
4787    ///
4788    /// let builder = prepare_request_builder();
4789    /// let response = builder.poller().until_done().await?;
4790    /// # Ok(()) }
4791    ///
4792    /// fn prepare_request_builder() -> CreateNetworkPeering {
4793    ///   # panic!();
4794    ///   // ... details omitted ...
4795    /// }
4796    /// ```
4797    #[derive(Clone, Debug)]
4798    pub struct CreateNetworkPeering(RequestBuilder<crate::model::CreateNetworkPeeringRequest>);
4799
4800    impl CreateNetworkPeering {
4801        pub(crate) fn new(
4802            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4803        ) -> Self {
4804            Self(RequestBuilder::new(stub))
4805        }
4806
4807        /// Sets the full request, replacing any prior values.
4808        pub fn with_request<V: Into<crate::model::CreateNetworkPeeringRequest>>(
4809            mut self,
4810            v: V,
4811        ) -> Self {
4812            self.0.request = v.into();
4813            self
4814        }
4815
4816        /// Sets all the options, replacing any prior values.
4817        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4818            self.0.options = v.into();
4819            self
4820        }
4821
4822        /// Sends the request.
4823        ///
4824        /// # Long running operations
4825        ///
4826        /// This starts, but does not poll, a longrunning operation. More information
4827        /// on [create_network_peering][crate::client::VmwareEngine::create_network_peering].
4828        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4829            (*self.0.stub)
4830                .create_network_peering(self.0.request, self.0.options)
4831                .await
4832                .map(crate::Response::into_body)
4833        }
4834
4835        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_network_peering`.
4836        pub fn poller(
4837            self,
4838        ) -> impl google_cloud_lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
4839        {
4840            type Operation = google_cloud_lro::internal::Operation<
4841                crate::model::NetworkPeering,
4842                crate::model::OperationMetadata,
4843            >;
4844            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4845            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4846
4847            let stub = self.0.stub.clone();
4848            let mut options = self.0.options.clone();
4849            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4850            let query = move |name| {
4851                let stub = stub.clone();
4852                let options = options.clone();
4853                async {
4854                    let op = GetOperation::new(stub)
4855                        .set_name(name)
4856                        .with_options(options)
4857                        .send()
4858                        .await?;
4859                    Ok(Operation::new(op))
4860                }
4861            };
4862
4863            let start = move || async {
4864                let op = self.send().await?;
4865                Ok(Operation::new(op))
4866            };
4867
4868            google_cloud_lro::internal::new_poller(
4869                polling_error_policy,
4870                polling_backoff_policy,
4871                start,
4872                query,
4873            )
4874        }
4875
4876        /// Sets the value of [parent][crate::model::CreateNetworkPeeringRequest::parent].
4877        ///
4878        /// This is a **required** field for requests.
4879        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4880            self.0.request.parent = v.into();
4881            self
4882        }
4883
4884        /// Sets the value of [network_peering_id][crate::model::CreateNetworkPeeringRequest::network_peering_id].
4885        ///
4886        /// This is a **required** field for requests.
4887        pub fn set_network_peering_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4888            self.0.request.network_peering_id = v.into();
4889            self
4890        }
4891
4892        /// Sets the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
4893        ///
4894        /// This is a **required** field for requests.
4895        pub fn set_network_peering<T>(mut self, v: T) -> Self
4896        where
4897            T: std::convert::Into<crate::model::NetworkPeering>,
4898        {
4899            self.0.request.network_peering = std::option::Option::Some(v.into());
4900            self
4901        }
4902
4903        /// Sets or clears the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
4904        ///
4905        /// This is a **required** field for requests.
4906        pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
4907        where
4908            T: std::convert::Into<crate::model::NetworkPeering>,
4909        {
4910            self.0.request.network_peering = v.map(|x| x.into());
4911            self
4912        }
4913
4914        /// Sets the value of [request_id][crate::model::CreateNetworkPeeringRequest::request_id].
4915        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4916            self.0.request.request_id = v.into();
4917            self
4918        }
4919    }
4920
4921    #[doc(hidden)]
4922    impl crate::RequestBuilder for CreateNetworkPeering {
4923        fn request_options(&mut self) -> &mut crate::RequestOptions {
4924            &mut self.0.options
4925        }
4926    }
4927
4928    /// The request builder for [VmwareEngine::delete_network_peering][crate::client::VmwareEngine::delete_network_peering] calls.
4929    ///
4930    /// # Example
4931    /// ```
4932    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::DeleteNetworkPeering;
4933    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
4934    /// use google_cloud_lro::Poller;
4935    ///
4936    /// let builder = prepare_request_builder();
4937    /// let response = builder.poller().until_done().await?;
4938    /// # Ok(()) }
4939    ///
4940    /// fn prepare_request_builder() -> DeleteNetworkPeering {
4941    ///   # panic!();
4942    ///   // ... details omitted ...
4943    /// }
4944    /// ```
4945    #[derive(Clone, Debug)]
4946    pub struct DeleteNetworkPeering(RequestBuilder<crate::model::DeleteNetworkPeeringRequest>);
4947
4948    impl DeleteNetworkPeering {
4949        pub(crate) fn new(
4950            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4951        ) -> Self {
4952            Self(RequestBuilder::new(stub))
4953        }
4954
4955        /// Sets the full request, replacing any prior values.
4956        pub fn with_request<V: Into<crate::model::DeleteNetworkPeeringRequest>>(
4957            mut self,
4958            v: V,
4959        ) -> Self {
4960            self.0.request = v.into();
4961            self
4962        }
4963
4964        /// Sets all the options, replacing any prior values.
4965        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4966            self.0.options = v.into();
4967            self
4968        }
4969
4970        /// Sends the request.
4971        ///
4972        /// # Long running operations
4973        ///
4974        /// This starts, but does not poll, a longrunning operation. More information
4975        /// on [delete_network_peering][crate::client::VmwareEngine::delete_network_peering].
4976        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4977            (*self.0.stub)
4978                .delete_network_peering(self.0.request, self.0.options)
4979                .await
4980                .map(crate::Response::into_body)
4981        }
4982
4983        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_network_peering`.
4984        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
4985            type Operation =
4986                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4987            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4988            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4989
4990            let stub = self.0.stub.clone();
4991            let mut options = self.0.options.clone();
4992            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4993            let query = move |name| {
4994                let stub = stub.clone();
4995                let options = options.clone();
4996                async {
4997                    let op = GetOperation::new(stub)
4998                        .set_name(name)
4999                        .with_options(options)
5000                        .send()
5001                        .await?;
5002                    Ok(Operation::new(op))
5003                }
5004            };
5005
5006            let start = move || async {
5007                let op = self.send().await?;
5008                Ok(Operation::new(op))
5009            };
5010
5011            google_cloud_lro::internal::new_unit_response_poller(
5012                polling_error_policy,
5013                polling_backoff_policy,
5014                start,
5015                query,
5016            )
5017        }
5018
5019        /// Sets the value of [name][crate::model::DeleteNetworkPeeringRequest::name].
5020        ///
5021        /// This is a **required** field for requests.
5022        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5023            self.0.request.name = v.into();
5024            self
5025        }
5026
5027        /// Sets the value of [request_id][crate::model::DeleteNetworkPeeringRequest::request_id].
5028        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5029            self.0.request.request_id = v.into();
5030            self
5031        }
5032    }
5033
5034    #[doc(hidden)]
5035    impl crate::RequestBuilder for DeleteNetworkPeering {
5036        fn request_options(&mut self) -> &mut crate::RequestOptions {
5037            &mut self.0.options
5038        }
5039    }
5040
5041    /// The request builder for [VmwareEngine::update_network_peering][crate::client::VmwareEngine::update_network_peering] calls.
5042    ///
5043    /// # Example
5044    /// ```
5045    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdateNetworkPeering;
5046    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
5047    /// use google_cloud_lro::Poller;
5048    ///
5049    /// let builder = prepare_request_builder();
5050    /// let response = builder.poller().until_done().await?;
5051    /// # Ok(()) }
5052    ///
5053    /// fn prepare_request_builder() -> UpdateNetworkPeering {
5054    ///   # panic!();
5055    ///   // ... details omitted ...
5056    /// }
5057    /// ```
5058    #[derive(Clone, Debug)]
5059    pub struct UpdateNetworkPeering(RequestBuilder<crate::model::UpdateNetworkPeeringRequest>);
5060
5061    impl UpdateNetworkPeering {
5062        pub(crate) fn new(
5063            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5064        ) -> Self {
5065            Self(RequestBuilder::new(stub))
5066        }
5067
5068        /// Sets the full request, replacing any prior values.
5069        pub fn with_request<V: Into<crate::model::UpdateNetworkPeeringRequest>>(
5070            mut self,
5071            v: V,
5072        ) -> Self {
5073            self.0.request = v.into();
5074            self
5075        }
5076
5077        /// Sets all the options, replacing any prior values.
5078        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5079            self.0.options = v.into();
5080            self
5081        }
5082
5083        /// Sends the request.
5084        ///
5085        /// # Long running operations
5086        ///
5087        /// This starts, but does not poll, a longrunning operation. More information
5088        /// on [update_network_peering][crate::client::VmwareEngine::update_network_peering].
5089        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5090            (*self.0.stub)
5091                .update_network_peering(self.0.request, self.0.options)
5092                .await
5093                .map(crate::Response::into_body)
5094        }
5095
5096        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_network_peering`.
5097        pub fn poller(
5098            self,
5099        ) -> impl google_cloud_lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
5100        {
5101            type Operation = google_cloud_lro::internal::Operation<
5102                crate::model::NetworkPeering,
5103                crate::model::OperationMetadata,
5104            >;
5105            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5106            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5107
5108            let stub = self.0.stub.clone();
5109            let mut options = self.0.options.clone();
5110            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5111            let query = move |name| {
5112                let stub = stub.clone();
5113                let options = options.clone();
5114                async {
5115                    let op = GetOperation::new(stub)
5116                        .set_name(name)
5117                        .with_options(options)
5118                        .send()
5119                        .await?;
5120                    Ok(Operation::new(op))
5121                }
5122            };
5123
5124            let start = move || async {
5125                let op = self.send().await?;
5126                Ok(Operation::new(op))
5127            };
5128
5129            google_cloud_lro::internal::new_poller(
5130                polling_error_policy,
5131                polling_backoff_policy,
5132                start,
5133                query,
5134            )
5135        }
5136
5137        /// Sets the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
5138        ///
5139        /// This is a **required** field for requests.
5140        pub fn set_network_peering<T>(mut self, v: T) -> Self
5141        where
5142            T: std::convert::Into<crate::model::NetworkPeering>,
5143        {
5144            self.0.request.network_peering = std::option::Option::Some(v.into());
5145            self
5146        }
5147
5148        /// Sets or clears the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
5149        ///
5150        /// This is a **required** field for requests.
5151        pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
5152        where
5153            T: std::convert::Into<crate::model::NetworkPeering>,
5154        {
5155            self.0.request.network_peering = v.map(|x| x.into());
5156            self
5157        }
5158
5159        /// Sets the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
5160        ///
5161        /// This is a **required** field for requests.
5162        pub fn set_update_mask<T>(mut self, v: T) -> Self
5163        where
5164            T: std::convert::Into<wkt::FieldMask>,
5165        {
5166            self.0.request.update_mask = std::option::Option::Some(v.into());
5167            self
5168        }
5169
5170        /// Sets or clears the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
5171        ///
5172        /// This is a **required** field for requests.
5173        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5174        where
5175            T: std::convert::Into<wkt::FieldMask>,
5176        {
5177            self.0.request.update_mask = v.map(|x| x.into());
5178            self
5179        }
5180
5181        /// Sets the value of [request_id][crate::model::UpdateNetworkPeeringRequest::request_id].
5182        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5183            self.0.request.request_id = v.into();
5184            self
5185        }
5186    }
5187
5188    #[doc(hidden)]
5189    impl crate::RequestBuilder for UpdateNetworkPeering {
5190        fn request_options(&mut self) -> &mut crate::RequestOptions {
5191            &mut self.0.options
5192        }
5193    }
5194
5195    /// The request builder for [VmwareEngine::list_peering_routes][crate::client::VmwareEngine::list_peering_routes] calls.
5196    ///
5197    /// # Example
5198    /// ```
5199    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListPeeringRoutes;
5200    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
5201    /// use google_cloud_gax::paginator::ItemPaginator;
5202    ///
5203    /// let builder = prepare_request_builder();
5204    /// let mut items = builder.by_item();
5205    /// while let Some(result) = items.next().await {
5206    ///   let item = result?;
5207    /// }
5208    /// # Ok(()) }
5209    ///
5210    /// fn prepare_request_builder() -> ListPeeringRoutes {
5211    ///   # panic!();
5212    ///   // ... details omitted ...
5213    /// }
5214    /// ```
5215    #[derive(Clone, Debug)]
5216    pub struct ListPeeringRoutes(RequestBuilder<crate::model::ListPeeringRoutesRequest>);
5217
5218    impl ListPeeringRoutes {
5219        pub(crate) fn new(
5220            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5221        ) -> Self {
5222            Self(RequestBuilder::new(stub))
5223        }
5224
5225        /// Sets the full request, replacing any prior values.
5226        pub fn with_request<V: Into<crate::model::ListPeeringRoutesRequest>>(
5227            mut self,
5228            v: V,
5229        ) -> Self {
5230            self.0.request = v.into();
5231            self
5232        }
5233
5234        /// Sets all the options, replacing any prior values.
5235        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5236            self.0.options = v.into();
5237            self
5238        }
5239
5240        /// Sends the request.
5241        pub async fn send(self) -> Result<crate::model::ListPeeringRoutesResponse> {
5242            (*self.0.stub)
5243                .list_peering_routes(self.0.request, self.0.options)
5244                .await
5245                .map(crate::Response::into_body)
5246        }
5247
5248        /// Streams each page in the collection.
5249        pub fn by_page(
5250            self,
5251        ) -> impl google_cloud_gax::paginator::Paginator<
5252            crate::model::ListPeeringRoutesResponse,
5253            crate::Error,
5254        > {
5255            use std::clone::Clone;
5256            let token = self.0.request.page_token.clone();
5257            let execute = move |token: String| {
5258                let mut builder = self.clone();
5259                builder.0.request = builder.0.request.set_page_token(token);
5260                builder.send()
5261            };
5262            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5263        }
5264
5265        /// Streams each item in the collection.
5266        pub fn by_item(
5267            self,
5268        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5269            crate::model::ListPeeringRoutesResponse,
5270            crate::Error,
5271        > {
5272            use google_cloud_gax::paginator::Paginator;
5273            self.by_page().items()
5274        }
5275
5276        /// Sets the value of [parent][crate::model::ListPeeringRoutesRequest::parent].
5277        ///
5278        /// This is a **required** field for requests.
5279        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5280            self.0.request.parent = v.into();
5281            self
5282        }
5283
5284        /// Sets the value of [page_size][crate::model::ListPeeringRoutesRequest::page_size].
5285        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5286            self.0.request.page_size = v.into();
5287            self
5288        }
5289
5290        /// Sets the value of [page_token][crate::model::ListPeeringRoutesRequest::page_token].
5291        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5292            self.0.request.page_token = v.into();
5293            self
5294        }
5295
5296        /// Sets the value of [filter][crate::model::ListPeeringRoutesRequest::filter].
5297        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5298            self.0.request.filter = v.into();
5299            self
5300        }
5301    }
5302
5303    #[doc(hidden)]
5304    impl crate::RequestBuilder for ListPeeringRoutes {
5305        fn request_options(&mut self) -> &mut crate::RequestOptions {
5306            &mut self.0.options
5307        }
5308    }
5309
5310    /// The request builder for [VmwareEngine::create_hcx_activation_key][crate::client::VmwareEngine::create_hcx_activation_key] calls.
5311    ///
5312    /// # Example
5313    /// ```
5314    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::CreateHcxActivationKey;
5315    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
5316    /// use google_cloud_lro::Poller;
5317    ///
5318    /// let builder = prepare_request_builder();
5319    /// let response = builder.poller().until_done().await?;
5320    /// # Ok(()) }
5321    ///
5322    /// fn prepare_request_builder() -> CreateHcxActivationKey {
5323    ///   # panic!();
5324    ///   // ... details omitted ...
5325    /// }
5326    /// ```
5327    #[derive(Clone, Debug)]
5328    pub struct CreateHcxActivationKey(RequestBuilder<crate::model::CreateHcxActivationKeyRequest>);
5329
5330    impl CreateHcxActivationKey {
5331        pub(crate) fn new(
5332            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5333        ) -> Self {
5334            Self(RequestBuilder::new(stub))
5335        }
5336
5337        /// Sets the full request, replacing any prior values.
5338        pub fn with_request<V: Into<crate::model::CreateHcxActivationKeyRequest>>(
5339            mut self,
5340            v: V,
5341        ) -> Self {
5342            self.0.request = v.into();
5343            self
5344        }
5345
5346        /// Sets all the options, replacing any prior values.
5347        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5348            self.0.options = v.into();
5349            self
5350        }
5351
5352        /// Sends the request.
5353        ///
5354        /// # Long running operations
5355        ///
5356        /// This starts, but does not poll, a longrunning operation. More information
5357        /// on [create_hcx_activation_key][crate::client::VmwareEngine::create_hcx_activation_key].
5358        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5359            (*self.0.stub)
5360                .create_hcx_activation_key(self.0.request, self.0.options)
5361                .await
5362                .map(crate::Response::into_body)
5363        }
5364
5365        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_hcx_activation_key`.
5366        pub fn poller(
5367            self,
5368        ) -> impl google_cloud_lro::Poller<crate::model::HcxActivationKey, crate::model::OperationMetadata>
5369        {
5370            type Operation = google_cloud_lro::internal::Operation<
5371                crate::model::HcxActivationKey,
5372                crate::model::OperationMetadata,
5373            >;
5374            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5375            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5376
5377            let stub = self.0.stub.clone();
5378            let mut options = self.0.options.clone();
5379            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5380            let query = move |name| {
5381                let stub = stub.clone();
5382                let options = options.clone();
5383                async {
5384                    let op = GetOperation::new(stub)
5385                        .set_name(name)
5386                        .with_options(options)
5387                        .send()
5388                        .await?;
5389                    Ok(Operation::new(op))
5390                }
5391            };
5392
5393            let start = move || async {
5394                let op = self.send().await?;
5395                Ok(Operation::new(op))
5396            };
5397
5398            google_cloud_lro::internal::new_poller(
5399                polling_error_policy,
5400                polling_backoff_policy,
5401                start,
5402                query,
5403            )
5404        }
5405
5406        /// Sets the value of [parent][crate::model::CreateHcxActivationKeyRequest::parent].
5407        ///
5408        /// This is a **required** field for requests.
5409        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5410            self.0.request.parent = v.into();
5411            self
5412        }
5413
5414        /// Sets the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
5415        ///
5416        /// This is a **required** field for requests.
5417        pub fn set_hcx_activation_key<T>(mut self, v: T) -> Self
5418        where
5419            T: std::convert::Into<crate::model::HcxActivationKey>,
5420        {
5421            self.0.request.hcx_activation_key = std::option::Option::Some(v.into());
5422            self
5423        }
5424
5425        /// Sets or clears the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
5426        ///
5427        /// This is a **required** field for requests.
5428        pub fn set_or_clear_hcx_activation_key<T>(mut self, v: std::option::Option<T>) -> Self
5429        where
5430            T: std::convert::Into<crate::model::HcxActivationKey>,
5431        {
5432            self.0.request.hcx_activation_key = v.map(|x| x.into());
5433            self
5434        }
5435
5436        /// Sets the value of [hcx_activation_key_id][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key_id].
5437        ///
5438        /// This is a **required** field for requests.
5439        pub fn set_hcx_activation_key_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5440            self.0.request.hcx_activation_key_id = v.into();
5441            self
5442        }
5443
5444        /// Sets the value of [request_id][crate::model::CreateHcxActivationKeyRequest::request_id].
5445        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5446            self.0.request.request_id = v.into();
5447            self
5448        }
5449    }
5450
5451    #[doc(hidden)]
5452    impl crate::RequestBuilder for CreateHcxActivationKey {
5453        fn request_options(&mut self) -> &mut crate::RequestOptions {
5454            &mut self.0.options
5455        }
5456    }
5457
5458    /// The request builder for [VmwareEngine::list_hcx_activation_keys][crate::client::VmwareEngine::list_hcx_activation_keys] calls.
5459    ///
5460    /// # Example
5461    /// ```
5462    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListHcxActivationKeys;
5463    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
5464    /// use google_cloud_gax::paginator::ItemPaginator;
5465    ///
5466    /// let builder = prepare_request_builder();
5467    /// let mut items = builder.by_item();
5468    /// while let Some(result) = items.next().await {
5469    ///   let item = result?;
5470    /// }
5471    /// # Ok(()) }
5472    ///
5473    /// fn prepare_request_builder() -> ListHcxActivationKeys {
5474    ///   # panic!();
5475    ///   // ... details omitted ...
5476    /// }
5477    /// ```
5478    #[derive(Clone, Debug)]
5479    pub struct ListHcxActivationKeys(RequestBuilder<crate::model::ListHcxActivationKeysRequest>);
5480
5481    impl ListHcxActivationKeys {
5482        pub(crate) fn new(
5483            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5484        ) -> Self {
5485            Self(RequestBuilder::new(stub))
5486        }
5487
5488        /// Sets the full request, replacing any prior values.
5489        pub fn with_request<V: Into<crate::model::ListHcxActivationKeysRequest>>(
5490            mut self,
5491            v: V,
5492        ) -> Self {
5493            self.0.request = v.into();
5494            self
5495        }
5496
5497        /// Sets all the options, replacing any prior values.
5498        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5499            self.0.options = v.into();
5500            self
5501        }
5502
5503        /// Sends the request.
5504        pub async fn send(self) -> Result<crate::model::ListHcxActivationKeysResponse> {
5505            (*self.0.stub)
5506                .list_hcx_activation_keys(self.0.request, self.0.options)
5507                .await
5508                .map(crate::Response::into_body)
5509        }
5510
5511        /// Streams each page in the collection.
5512        pub fn by_page(
5513            self,
5514        ) -> impl google_cloud_gax::paginator::Paginator<
5515            crate::model::ListHcxActivationKeysResponse,
5516            crate::Error,
5517        > {
5518            use std::clone::Clone;
5519            let token = self.0.request.page_token.clone();
5520            let execute = move |token: String| {
5521                let mut builder = self.clone();
5522                builder.0.request = builder.0.request.set_page_token(token);
5523                builder.send()
5524            };
5525            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5526        }
5527
5528        /// Streams each item in the collection.
5529        pub fn by_item(
5530            self,
5531        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5532            crate::model::ListHcxActivationKeysResponse,
5533            crate::Error,
5534        > {
5535            use google_cloud_gax::paginator::Paginator;
5536            self.by_page().items()
5537        }
5538
5539        /// Sets the value of [parent][crate::model::ListHcxActivationKeysRequest::parent].
5540        ///
5541        /// This is a **required** field for requests.
5542        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5543            self.0.request.parent = v.into();
5544            self
5545        }
5546
5547        /// Sets the value of [page_size][crate::model::ListHcxActivationKeysRequest::page_size].
5548        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5549            self.0.request.page_size = v.into();
5550            self
5551        }
5552
5553        /// Sets the value of [page_token][crate::model::ListHcxActivationKeysRequest::page_token].
5554        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5555            self.0.request.page_token = v.into();
5556            self
5557        }
5558    }
5559
5560    #[doc(hidden)]
5561    impl crate::RequestBuilder for ListHcxActivationKeys {
5562        fn request_options(&mut self) -> &mut crate::RequestOptions {
5563            &mut self.0.options
5564        }
5565    }
5566
5567    /// The request builder for [VmwareEngine::get_hcx_activation_key][crate::client::VmwareEngine::get_hcx_activation_key] calls.
5568    ///
5569    /// # Example
5570    /// ```
5571    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetHcxActivationKey;
5572    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
5573    ///
5574    /// let builder = prepare_request_builder();
5575    /// let response = builder.send().await?;
5576    /// # Ok(()) }
5577    ///
5578    /// fn prepare_request_builder() -> GetHcxActivationKey {
5579    ///   # panic!();
5580    ///   // ... details omitted ...
5581    /// }
5582    /// ```
5583    #[derive(Clone, Debug)]
5584    pub struct GetHcxActivationKey(RequestBuilder<crate::model::GetHcxActivationKeyRequest>);
5585
5586    impl GetHcxActivationKey {
5587        pub(crate) fn new(
5588            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5589        ) -> Self {
5590            Self(RequestBuilder::new(stub))
5591        }
5592
5593        /// Sets the full request, replacing any prior values.
5594        pub fn with_request<V: Into<crate::model::GetHcxActivationKeyRequest>>(
5595            mut self,
5596            v: V,
5597        ) -> Self {
5598            self.0.request = v.into();
5599            self
5600        }
5601
5602        /// Sets all the options, replacing any prior values.
5603        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5604            self.0.options = v.into();
5605            self
5606        }
5607
5608        /// Sends the request.
5609        pub async fn send(self) -> Result<crate::model::HcxActivationKey> {
5610            (*self.0.stub)
5611                .get_hcx_activation_key(self.0.request, self.0.options)
5612                .await
5613                .map(crate::Response::into_body)
5614        }
5615
5616        /// Sets the value of [name][crate::model::GetHcxActivationKeyRequest::name].
5617        ///
5618        /// This is a **required** field for requests.
5619        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5620            self.0.request.name = v.into();
5621            self
5622        }
5623    }
5624
5625    #[doc(hidden)]
5626    impl crate::RequestBuilder for GetHcxActivationKey {
5627        fn request_options(&mut self) -> &mut crate::RequestOptions {
5628            &mut self.0.options
5629        }
5630    }
5631
5632    /// The request builder for [VmwareEngine::get_network_policy][crate::client::VmwareEngine::get_network_policy] calls.
5633    ///
5634    /// # Example
5635    /// ```
5636    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetNetworkPolicy;
5637    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
5638    ///
5639    /// let builder = prepare_request_builder();
5640    /// let response = builder.send().await?;
5641    /// # Ok(()) }
5642    ///
5643    /// fn prepare_request_builder() -> GetNetworkPolicy {
5644    ///   # panic!();
5645    ///   // ... details omitted ...
5646    /// }
5647    /// ```
5648    #[derive(Clone, Debug)]
5649    pub struct GetNetworkPolicy(RequestBuilder<crate::model::GetNetworkPolicyRequest>);
5650
5651    impl GetNetworkPolicy {
5652        pub(crate) fn new(
5653            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5654        ) -> Self {
5655            Self(RequestBuilder::new(stub))
5656        }
5657
5658        /// Sets the full request, replacing any prior values.
5659        pub fn with_request<V: Into<crate::model::GetNetworkPolicyRequest>>(
5660            mut self,
5661            v: V,
5662        ) -> Self {
5663            self.0.request = v.into();
5664            self
5665        }
5666
5667        /// Sets all the options, replacing any prior values.
5668        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5669            self.0.options = v.into();
5670            self
5671        }
5672
5673        /// Sends the request.
5674        pub async fn send(self) -> Result<crate::model::NetworkPolicy> {
5675            (*self.0.stub)
5676                .get_network_policy(self.0.request, self.0.options)
5677                .await
5678                .map(crate::Response::into_body)
5679        }
5680
5681        /// Sets the value of [name][crate::model::GetNetworkPolicyRequest::name].
5682        ///
5683        /// This is a **required** field for requests.
5684        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5685            self.0.request.name = v.into();
5686            self
5687        }
5688    }
5689
5690    #[doc(hidden)]
5691    impl crate::RequestBuilder for GetNetworkPolicy {
5692        fn request_options(&mut self) -> &mut crate::RequestOptions {
5693            &mut self.0.options
5694        }
5695    }
5696
5697    /// The request builder for [VmwareEngine::list_network_policies][crate::client::VmwareEngine::list_network_policies] calls.
5698    ///
5699    /// # Example
5700    /// ```
5701    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListNetworkPolicies;
5702    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
5703    /// use google_cloud_gax::paginator::ItemPaginator;
5704    ///
5705    /// let builder = prepare_request_builder();
5706    /// let mut items = builder.by_item();
5707    /// while let Some(result) = items.next().await {
5708    ///   let item = result?;
5709    /// }
5710    /// # Ok(()) }
5711    ///
5712    /// fn prepare_request_builder() -> ListNetworkPolicies {
5713    ///   # panic!();
5714    ///   // ... details omitted ...
5715    /// }
5716    /// ```
5717    #[derive(Clone, Debug)]
5718    pub struct ListNetworkPolicies(RequestBuilder<crate::model::ListNetworkPoliciesRequest>);
5719
5720    impl ListNetworkPolicies {
5721        pub(crate) fn new(
5722            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5723        ) -> Self {
5724            Self(RequestBuilder::new(stub))
5725        }
5726
5727        /// Sets the full request, replacing any prior values.
5728        pub fn with_request<V: Into<crate::model::ListNetworkPoliciesRequest>>(
5729            mut self,
5730            v: V,
5731        ) -> Self {
5732            self.0.request = v.into();
5733            self
5734        }
5735
5736        /// Sets all the options, replacing any prior values.
5737        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5738            self.0.options = v.into();
5739            self
5740        }
5741
5742        /// Sends the request.
5743        pub async fn send(self) -> Result<crate::model::ListNetworkPoliciesResponse> {
5744            (*self.0.stub)
5745                .list_network_policies(self.0.request, self.0.options)
5746                .await
5747                .map(crate::Response::into_body)
5748        }
5749
5750        /// Streams each page in the collection.
5751        pub fn by_page(
5752            self,
5753        ) -> impl google_cloud_gax::paginator::Paginator<
5754            crate::model::ListNetworkPoliciesResponse,
5755            crate::Error,
5756        > {
5757            use std::clone::Clone;
5758            let token = self.0.request.page_token.clone();
5759            let execute = move |token: String| {
5760                let mut builder = self.clone();
5761                builder.0.request = builder.0.request.set_page_token(token);
5762                builder.send()
5763            };
5764            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5765        }
5766
5767        /// Streams each item in the collection.
5768        pub fn by_item(
5769            self,
5770        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5771            crate::model::ListNetworkPoliciesResponse,
5772            crate::Error,
5773        > {
5774            use google_cloud_gax::paginator::Paginator;
5775            self.by_page().items()
5776        }
5777
5778        /// Sets the value of [parent][crate::model::ListNetworkPoliciesRequest::parent].
5779        ///
5780        /// This is a **required** field for requests.
5781        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5782            self.0.request.parent = v.into();
5783            self
5784        }
5785
5786        /// Sets the value of [page_size][crate::model::ListNetworkPoliciesRequest::page_size].
5787        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5788            self.0.request.page_size = v.into();
5789            self
5790        }
5791
5792        /// Sets the value of [page_token][crate::model::ListNetworkPoliciesRequest::page_token].
5793        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5794            self.0.request.page_token = v.into();
5795            self
5796        }
5797
5798        /// Sets the value of [filter][crate::model::ListNetworkPoliciesRequest::filter].
5799        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5800            self.0.request.filter = v.into();
5801            self
5802        }
5803
5804        /// Sets the value of [order_by][crate::model::ListNetworkPoliciesRequest::order_by].
5805        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5806            self.0.request.order_by = v.into();
5807            self
5808        }
5809    }
5810
5811    #[doc(hidden)]
5812    impl crate::RequestBuilder for ListNetworkPolicies {
5813        fn request_options(&mut self) -> &mut crate::RequestOptions {
5814            &mut self.0.options
5815        }
5816    }
5817
5818    /// The request builder for [VmwareEngine::create_network_policy][crate::client::VmwareEngine::create_network_policy] calls.
5819    ///
5820    /// # Example
5821    /// ```
5822    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::CreateNetworkPolicy;
5823    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
5824    /// use google_cloud_lro::Poller;
5825    ///
5826    /// let builder = prepare_request_builder();
5827    /// let response = builder.poller().until_done().await?;
5828    /// # Ok(()) }
5829    ///
5830    /// fn prepare_request_builder() -> CreateNetworkPolicy {
5831    ///   # panic!();
5832    ///   // ... details omitted ...
5833    /// }
5834    /// ```
5835    #[derive(Clone, Debug)]
5836    pub struct CreateNetworkPolicy(RequestBuilder<crate::model::CreateNetworkPolicyRequest>);
5837
5838    impl CreateNetworkPolicy {
5839        pub(crate) fn new(
5840            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5841        ) -> Self {
5842            Self(RequestBuilder::new(stub))
5843        }
5844
5845        /// Sets the full request, replacing any prior values.
5846        pub fn with_request<V: Into<crate::model::CreateNetworkPolicyRequest>>(
5847            mut self,
5848            v: V,
5849        ) -> Self {
5850            self.0.request = v.into();
5851            self
5852        }
5853
5854        /// Sets all the options, replacing any prior values.
5855        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5856            self.0.options = v.into();
5857            self
5858        }
5859
5860        /// Sends the request.
5861        ///
5862        /// # Long running operations
5863        ///
5864        /// This starts, but does not poll, a longrunning operation. More information
5865        /// on [create_network_policy][crate::client::VmwareEngine::create_network_policy].
5866        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5867            (*self.0.stub)
5868                .create_network_policy(self.0.request, self.0.options)
5869                .await
5870                .map(crate::Response::into_body)
5871        }
5872
5873        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_network_policy`.
5874        pub fn poller(
5875            self,
5876        ) -> impl google_cloud_lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
5877        {
5878            type Operation = google_cloud_lro::internal::Operation<
5879                crate::model::NetworkPolicy,
5880                crate::model::OperationMetadata,
5881            >;
5882            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5883            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5884
5885            let stub = self.0.stub.clone();
5886            let mut options = self.0.options.clone();
5887            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5888            let query = move |name| {
5889                let stub = stub.clone();
5890                let options = options.clone();
5891                async {
5892                    let op = GetOperation::new(stub)
5893                        .set_name(name)
5894                        .with_options(options)
5895                        .send()
5896                        .await?;
5897                    Ok(Operation::new(op))
5898                }
5899            };
5900
5901            let start = move || async {
5902                let op = self.send().await?;
5903                Ok(Operation::new(op))
5904            };
5905
5906            google_cloud_lro::internal::new_poller(
5907                polling_error_policy,
5908                polling_backoff_policy,
5909                start,
5910                query,
5911            )
5912        }
5913
5914        /// Sets the value of [parent][crate::model::CreateNetworkPolicyRequest::parent].
5915        ///
5916        /// This is a **required** field for requests.
5917        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5918            self.0.request.parent = v.into();
5919            self
5920        }
5921
5922        /// Sets the value of [network_policy_id][crate::model::CreateNetworkPolicyRequest::network_policy_id].
5923        ///
5924        /// This is a **required** field for requests.
5925        pub fn set_network_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5926            self.0.request.network_policy_id = v.into();
5927            self
5928        }
5929
5930        /// Sets the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
5931        ///
5932        /// This is a **required** field for requests.
5933        pub fn set_network_policy<T>(mut self, v: T) -> Self
5934        where
5935            T: std::convert::Into<crate::model::NetworkPolicy>,
5936        {
5937            self.0.request.network_policy = std::option::Option::Some(v.into());
5938            self
5939        }
5940
5941        /// Sets or clears the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
5942        ///
5943        /// This is a **required** field for requests.
5944        pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
5945        where
5946            T: std::convert::Into<crate::model::NetworkPolicy>,
5947        {
5948            self.0.request.network_policy = v.map(|x| x.into());
5949            self
5950        }
5951
5952        /// Sets the value of [request_id][crate::model::CreateNetworkPolicyRequest::request_id].
5953        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5954            self.0.request.request_id = v.into();
5955            self
5956        }
5957    }
5958
5959    #[doc(hidden)]
5960    impl crate::RequestBuilder for CreateNetworkPolicy {
5961        fn request_options(&mut self) -> &mut crate::RequestOptions {
5962            &mut self.0.options
5963        }
5964    }
5965
5966    /// The request builder for [VmwareEngine::update_network_policy][crate::client::VmwareEngine::update_network_policy] calls.
5967    ///
5968    /// # Example
5969    /// ```
5970    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdateNetworkPolicy;
5971    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
5972    /// use google_cloud_lro::Poller;
5973    ///
5974    /// let builder = prepare_request_builder();
5975    /// let response = builder.poller().until_done().await?;
5976    /// # Ok(()) }
5977    ///
5978    /// fn prepare_request_builder() -> UpdateNetworkPolicy {
5979    ///   # panic!();
5980    ///   // ... details omitted ...
5981    /// }
5982    /// ```
5983    #[derive(Clone, Debug)]
5984    pub struct UpdateNetworkPolicy(RequestBuilder<crate::model::UpdateNetworkPolicyRequest>);
5985
5986    impl UpdateNetworkPolicy {
5987        pub(crate) fn new(
5988            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5989        ) -> Self {
5990            Self(RequestBuilder::new(stub))
5991        }
5992
5993        /// Sets the full request, replacing any prior values.
5994        pub fn with_request<V: Into<crate::model::UpdateNetworkPolicyRequest>>(
5995            mut self,
5996            v: V,
5997        ) -> Self {
5998            self.0.request = v.into();
5999            self
6000        }
6001
6002        /// Sets all the options, replacing any prior values.
6003        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6004            self.0.options = v.into();
6005            self
6006        }
6007
6008        /// Sends the request.
6009        ///
6010        /// # Long running operations
6011        ///
6012        /// This starts, but does not poll, a longrunning operation. More information
6013        /// on [update_network_policy][crate::client::VmwareEngine::update_network_policy].
6014        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6015            (*self.0.stub)
6016                .update_network_policy(self.0.request, self.0.options)
6017                .await
6018                .map(crate::Response::into_body)
6019        }
6020
6021        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_network_policy`.
6022        pub fn poller(
6023            self,
6024        ) -> impl google_cloud_lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
6025        {
6026            type Operation = google_cloud_lro::internal::Operation<
6027                crate::model::NetworkPolicy,
6028                crate::model::OperationMetadata,
6029            >;
6030            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6031            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6032
6033            let stub = self.0.stub.clone();
6034            let mut options = self.0.options.clone();
6035            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6036            let query = move |name| {
6037                let stub = stub.clone();
6038                let options = options.clone();
6039                async {
6040                    let op = GetOperation::new(stub)
6041                        .set_name(name)
6042                        .with_options(options)
6043                        .send()
6044                        .await?;
6045                    Ok(Operation::new(op))
6046                }
6047            };
6048
6049            let start = move || async {
6050                let op = self.send().await?;
6051                Ok(Operation::new(op))
6052            };
6053
6054            google_cloud_lro::internal::new_poller(
6055                polling_error_policy,
6056                polling_backoff_policy,
6057                start,
6058                query,
6059            )
6060        }
6061
6062        /// Sets the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
6063        ///
6064        /// This is a **required** field for requests.
6065        pub fn set_network_policy<T>(mut self, v: T) -> Self
6066        where
6067            T: std::convert::Into<crate::model::NetworkPolicy>,
6068        {
6069            self.0.request.network_policy = std::option::Option::Some(v.into());
6070            self
6071        }
6072
6073        /// Sets or clears the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
6074        ///
6075        /// This is a **required** field for requests.
6076        pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
6077        where
6078            T: std::convert::Into<crate::model::NetworkPolicy>,
6079        {
6080            self.0.request.network_policy = v.map(|x| x.into());
6081            self
6082        }
6083
6084        /// Sets the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
6085        ///
6086        /// This is a **required** field for requests.
6087        pub fn set_update_mask<T>(mut self, v: T) -> Self
6088        where
6089            T: std::convert::Into<wkt::FieldMask>,
6090        {
6091            self.0.request.update_mask = std::option::Option::Some(v.into());
6092            self
6093        }
6094
6095        /// Sets or clears the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
6096        ///
6097        /// This is a **required** field for requests.
6098        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6099        where
6100            T: std::convert::Into<wkt::FieldMask>,
6101        {
6102            self.0.request.update_mask = v.map(|x| x.into());
6103            self
6104        }
6105
6106        /// Sets the value of [request_id][crate::model::UpdateNetworkPolicyRequest::request_id].
6107        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6108            self.0.request.request_id = v.into();
6109            self
6110        }
6111    }
6112
6113    #[doc(hidden)]
6114    impl crate::RequestBuilder for UpdateNetworkPolicy {
6115        fn request_options(&mut self) -> &mut crate::RequestOptions {
6116            &mut self.0.options
6117        }
6118    }
6119
6120    /// The request builder for [VmwareEngine::delete_network_policy][crate::client::VmwareEngine::delete_network_policy] calls.
6121    ///
6122    /// # Example
6123    /// ```
6124    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::DeleteNetworkPolicy;
6125    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
6126    /// use google_cloud_lro::Poller;
6127    ///
6128    /// let builder = prepare_request_builder();
6129    /// let response = builder.poller().until_done().await?;
6130    /// # Ok(()) }
6131    ///
6132    /// fn prepare_request_builder() -> DeleteNetworkPolicy {
6133    ///   # panic!();
6134    ///   // ... details omitted ...
6135    /// }
6136    /// ```
6137    #[derive(Clone, Debug)]
6138    pub struct DeleteNetworkPolicy(RequestBuilder<crate::model::DeleteNetworkPolicyRequest>);
6139
6140    impl DeleteNetworkPolicy {
6141        pub(crate) fn new(
6142            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6143        ) -> Self {
6144            Self(RequestBuilder::new(stub))
6145        }
6146
6147        /// Sets the full request, replacing any prior values.
6148        pub fn with_request<V: Into<crate::model::DeleteNetworkPolicyRequest>>(
6149            mut self,
6150            v: V,
6151        ) -> Self {
6152            self.0.request = v.into();
6153            self
6154        }
6155
6156        /// Sets all the options, replacing any prior values.
6157        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6158            self.0.options = v.into();
6159            self
6160        }
6161
6162        /// Sends the request.
6163        ///
6164        /// # Long running operations
6165        ///
6166        /// This starts, but does not poll, a longrunning operation. More information
6167        /// on [delete_network_policy][crate::client::VmwareEngine::delete_network_policy].
6168        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6169            (*self.0.stub)
6170                .delete_network_policy(self.0.request, self.0.options)
6171                .await
6172                .map(crate::Response::into_body)
6173        }
6174
6175        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_network_policy`.
6176        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6177            type Operation =
6178                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6179            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6180            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6181
6182            let stub = self.0.stub.clone();
6183            let mut options = self.0.options.clone();
6184            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6185            let query = move |name| {
6186                let stub = stub.clone();
6187                let options = options.clone();
6188                async {
6189                    let op = GetOperation::new(stub)
6190                        .set_name(name)
6191                        .with_options(options)
6192                        .send()
6193                        .await?;
6194                    Ok(Operation::new(op))
6195                }
6196            };
6197
6198            let start = move || async {
6199                let op = self.send().await?;
6200                Ok(Operation::new(op))
6201            };
6202
6203            google_cloud_lro::internal::new_unit_response_poller(
6204                polling_error_policy,
6205                polling_backoff_policy,
6206                start,
6207                query,
6208            )
6209        }
6210
6211        /// Sets the value of [name][crate::model::DeleteNetworkPolicyRequest::name].
6212        ///
6213        /// This is a **required** field for requests.
6214        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6215            self.0.request.name = v.into();
6216            self
6217        }
6218
6219        /// Sets the value of [request_id][crate::model::DeleteNetworkPolicyRequest::request_id].
6220        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6221            self.0.request.request_id = v.into();
6222            self
6223        }
6224    }
6225
6226    #[doc(hidden)]
6227    impl crate::RequestBuilder for DeleteNetworkPolicy {
6228        fn request_options(&mut self) -> &mut crate::RequestOptions {
6229            &mut self.0.options
6230        }
6231    }
6232
6233    /// The request builder for [VmwareEngine::list_management_dns_zone_bindings][crate::client::VmwareEngine::list_management_dns_zone_bindings] calls.
6234    ///
6235    /// # Example
6236    /// ```
6237    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListManagementDnsZoneBindings;
6238    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
6239    /// use google_cloud_gax::paginator::ItemPaginator;
6240    ///
6241    /// let builder = prepare_request_builder();
6242    /// let mut items = builder.by_item();
6243    /// while let Some(result) = items.next().await {
6244    ///   let item = result?;
6245    /// }
6246    /// # Ok(()) }
6247    ///
6248    /// fn prepare_request_builder() -> ListManagementDnsZoneBindings {
6249    ///   # panic!();
6250    ///   // ... details omitted ...
6251    /// }
6252    /// ```
6253    #[derive(Clone, Debug)]
6254    pub struct ListManagementDnsZoneBindings(
6255        RequestBuilder<crate::model::ListManagementDnsZoneBindingsRequest>,
6256    );
6257
6258    impl ListManagementDnsZoneBindings {
6259        pub(crate) fn new(
6260            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6261        ) -> Self {
6262            Self(RequestBuilder::new(stub))
6263        }
6264
6265        /// Sets the full request, replacing any prior values.
6266        pub fn with_request<V: Into<crate::model::ListManagementDnsZoneBindingsRequest>>(
6267            mut self,
6268            v: V,
6269        ) -> Self {
6270            self.0.request = v.into();
6271            self
6272        }
6273
6274        /// Sets all the options, replacing any prior values.
6275        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6276            self.0.options = v.into();
6277            self
6278        }
6279
6280        /// Sends the request.
6281        pub async fn send(self) -> Result<crate::model::ListManagementDnsZoneBindingsResponse> {
6282            (*self.0.stub)
6283                .list_management_dns_zone_bindings(self.0.request, self.0.options)
6284                .await
6285                .map(crate::Response::into_body)
6286        }
6287
6288        /// Streams each page in the collection.
6289        pub fn by_page(
6290            self,
6291        ) -> impl google_cloud_gax::paginator::Paginator<
6292            crate::model::ListManagementDnsZoneBindingsResponse,
6293            crate::Error,
6294        > {
6295            use std::clone::Clone;
6296            let token = self.0.request.page_token.clone();
6297            let execute = move |token: String| {
6298                let mut builder = self.clone();
6299                builder.0.request = builder.0.request.set_page_token(token);
6300                builder.send()
6301            };
6302            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6303        }
6304
6305        /// Streams each item in the collection.
6306        pub fn by_item(
6307            self,
6308        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6309            crate::model::ListManagementDnsZoneBindingsResponse,
6310            crate::Error,
6311        > {
6312            use google_cloud_gax::paginator::Paginator;
6313            self.by_page().items()
6314        }
6315
6316        /// Sets the value of [parent][crate::model::ListManagementDnsZoneBindingsRequest::parent].
6317        ///
6318        /// This is a **required** field for requests.
6319        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6320            self.0.request.parent = v.into();
6321            self
6322        }
6323
6324        /// Sets the value of [page_size][crate::model::ListManagementDnsZoneBindingsRequest::page_size].
6325        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6326            self.0.request.page_size = v.into();
6327            self
6328        }
6329
6330        /// Sets the value of [page_token][crate::model::ListManagementDnsZoneBindingsRequest::page_token].
6331        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6332            self.0.request.page_token = v.into();
6333            self
6334        }
6335
6336        /// Sets the value of [filter][crate::model::ListManagementDnsZoneBindingsRequest::filter].
6337        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6338            self.0.request.filter = v.into();
6339            self
6340        }
6341
6342        /// Sets the value of [order_by][crate::model::ListManagementDnsZoneBindingsRequest::order_by].
6343        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6344            self.0.request.order_by = v.into();
6345            self
6346        }
6347    }
6348
6349    #[doc(hidden)]
6350    impl crate::RequestBuilder for ListManagementDnsZoneBindings {
6351        fn request_options(&mut self) -> &mut crate::RequestOptions {
6352            &mut self.0.options
6353        }
6354    }
6355
6356    /// The request builder for [VmwareEngine::get_management_dns_zone_binding][crate::client::VmwareEngine::get_management_dns_zone_binding] calls.
6357    ///
6358    /// # Example
6359    /// ```
6360    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetManagementDnsZoneBinding;
6361    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
6362    ///
6363    /// let builder = prepare_request_builder();
6364    /// let response = builder.send().await?;
6365    /// # Ok(()) }
6366    ///
6367    /// fn prepare_request_builder() -> GetManagementDnsZoneBinding {
6368    ///   # panic!();
6369    ///   // ... details omitted ...
6370    /// }
6371    /// ```
6372    #[derive(Clone, Debug)]
6373    pub struct GetManagementDnsZoneBinding(
6374        RequestBuilder<crate::model::GetManagementDnsZoneBindingRequest>,
6375    );
6376
6377    impl GetManagementDnsZoneBinding {
6378        pub(crate) fn new(
6379            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6380        ) -> Self {
6381            Self(RequestBuilder::new(stub))
6382        }
6383
6384        /// Sets the full request, replacing any prior values.
6385        pub fn with_request<V: Into<crate::model::GetManagementDnsZoneBindingRequest>>(
6386            mut self,
6387            v: V,
6388        ) -> Self {
6389            self.0.request = v.into();
6390            self
6391        }
6392
6393        /// Sets all the options, replacing any prior values.
6394        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6395            self.0.options = v.into();
6396            self
6397        }
6398
6399        /// Sends the request.
6400        pub async fn send(self) -> Result<crate::model::ManagementDnsZoneBinding> {
6401            (*self.0.stub)
6402                .get_management_dns_zone_binding(self.0.request, self.0.options)
6403                .await
6404                .map(crate::Response::into_body)
6405        }
6406
6407        /// Sets the value of [name][crate::model::GetManagementDnsZoneBindingRequest::name].
6408        ///
6409        /// This is a **required** field for requests.
6410        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6411            self.0.request.name = v.into();
6412            self
6413        }
6414    }
6415
6416    #[doc(hidden)]
6417    impl crate::RequestBuilder for GetManagementDnsZoneBinding {
6418        fn request_options(&mut self) -> &mut crate::RequestOptions {
6419            &mut self.0.options
6420        }
6421    }
6422
6423    /// The request builder for [VmwareEngine::create_management_dns_zone_binding][crate::client::VmwareEngine::create_management_dns_zone_binding] calls.
6424    ///
6425    /// # Example
6426    /// ```
6427    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::CreateManagementDnsZoneBinding;
6428    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
6429    /// use google_cloud_lro::Poller;
6430    ///
6431    /// let builder = prepare_request_builder();
6432    /// let response = builder.poller().until_done().await?;
6433    /// # Ok(()) }
6434    ///
6435    /// fn prepare_request_builder() -> CreateManagementDnsZoneBinding {
6436    ///   # panic!();
6437    ///   // ... details omitted ...
6438    /// }
6439    /// ```
6440    #[derive(Clone, Debug)]
6441    pub struct CreateManagementDnsZoneBinding(
6442        RequestBuilder<crate::model::CreateManagementDnsZoneBindingRequest>,
6443    );
6444
6445    impl CreateManagementDnsZoneBinding {
6446        pub(crate) fn new(
6447            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6448        ) -> Self {
6449            Self(RequestBuilder::new(stub))
6450        }
6451
6452        /// Sets the full request, replacing any prior values.
6453        pub fn with_request<V: Into<crate::model::CreateManagementDnsZoneBindingRequest>>(
6454            mut self,
6455            v: V,
6456        ) -> Self {
6457            self.0.request = v.into();
6458            self
6459        }
6460
6461        /// Sets all the options, replacing any prior values.
6462        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6463            self.0.options = v.into();
6464            self
6465        }
6466
6467        /// Sends the request.
6468        ///
6469        /// # Long running operations
6470        ///
6471        /// This starts, but does not poll, a longrunning operation. More information
6472        /// on [create_management_dns_zone_binding][crate::client::VmwareEngine::create_management_dns_zone_binding].
6473        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6474            (*self.0.stub)
6475                .create_management_dns_zone_binding(self.0.request, self.0.options)
6476                .await
6477                .map(crate::Response::into_body)
6478        }
6479
6480        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_management_dns_zone_binding`.
6481        pub fn poller(
6482            self,
6483        ) -> impl google_cloud_lro::Poller<
6484            crate::model::ManagementDnsZoneBinding,
6485            crate::model::OperationMetadata,
6486        > {
6487            type Operation = google_cloud_lro::internal::Operation<
6488                crate::model::ManagementDnsZoneBinding,
6489                crate::model::OperationMetadata,
6490            >;
6491            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6492            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6493
6494            let stub = self.0.stub.clone();
6495            let mut options = self.0.options.clone();
6496            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6497            let query = move |name| {
6498                let stub = stub.clone();
6499                let options = options.clone();
6500                async {
6501                    let op = GetOperation::new(stub)
6502                        .set_name(name)
6503                        .with_options(options)
6504                        .send()
6505                        .await?;
6506                    Ok(Operation::new(op))
6507                }
6508            };
6509
6510            let start = move || async {
6511                let op = self.send().await?;
6512                Ok(Operation::new(op))
6513            };
6514
6515            google_cloud_lro::internal::new_poller(
6516                polling_error_policy,
6517                polling_backoff_policy,
6518                start,
6519                query,
6520            )
6521        }
6522
6523        /// Sets the value of [parent][crate::model::CreateManagementDnsZoneBindingRequest::parent].
6524        ///
6525        /// This is a **required** field for requests.
6526        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6527            self.0.request.parent = v.into();
6528            self
6529        }
6530
6531        /// Sets the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
6532        ///
6533        /// This is a **required** field for requests.
6534        pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6535        where
6536            T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6537        {
6538            self.0.request.management_dns_zone_binding = std::option::Option::Some(v.into());
6539            self
6540        }
6541
6542        /// Sets or clears the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
6543        ///
6544        /// This is a **required** field for requests.
6545        pub fn set_or_clear_management_dns_zone_binding<T>(
6546            mut self,
6547            v: std::option::Option<T>,
6548        ) -> Self
6549        where
6550            T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6551        {
6552            self.0.request.management_dns_zone_binding = v.map(|x| x.into());
6553            self
6554        }
6555
6556        /// Sets the value of [management_dns_zone_binding_id][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding_id].
6557        ///
6558        /// This is a **required** field for requests.
6559        pub fn set_management_dns_zone_binding_id<T: Into<std::string::String>>(
6560            mut self,
6561            v: T,
6562        ) -> Self {
6563            self.0.request.management_dns_zone_binding_id = v.into();
6564            self
6565        }
6566
6567        /// Sets the value of [request_id][crate::model::CreateManagementDnsZoneBindingRequest::request_id].
6568        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6569            self.0.request.request_id = v.into();
6570            self
6571        }
6572    }
6573
6574    #[doc(hidden)]
6575    impl crate::RequestBuilder for CreateManagementDnsZoneBinding {
6576        fn request_options(&mut self) -> &mut crate::RequestOptions {
6577            &mut self.0.options
6578        }
6579    }
6580
6581    /// The request builder for [VmwareEngine::update_management_dns_zone_binding][crate::client::VmwareEngine::update_management_dns_zone_binding] calls.
6582    ///
6583    /// # Example
6584    /// ```
6585    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdateManagementDnsZoneBinding;
6586    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
6587    /// use google_cloud_lro::Poller;
6588    ///
6589    /// let builder = prepare_request_builder();
6590    /// let response = builder.poller().until_done().await?;
6591    /// # Ok(()) }
6592    ///
6593    /// fn prepare_request_builder() -> UpdateManagementDnsZoneBinding {
6594    ///   # panic!();
6595    ///   // ... details omitted ...
6596    /// }
6597    /// ```
6598    #[derive(Clone, Debug)]
6599    pub struct UpdateManagementDnsZoneBinding(
6600        RequestBuilder<crate::model::UpdateManagementDnsZoneBindingRequest>,
6601    );
6602
6603    impl UpdateManagementDnsZoneBinding {
6604        pub(crate) fn new(
6605            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6606        ) -> Self {
6607            Self(RequestBuilder::new(stub))
6608        }
6609
6610        /// Sets the full request, replacing any prior values.
6611        pub fn with_request<V: Into<crate::model::UpdateManagementDnsZoneBindingRequest>>(
6612            mut self,
6613            v: V,
6614        ) -> Self {
6615            self.0.request = v.into();
6616            self
6617        }
6618
6619        /// Sets all the options, replacing any prior values.
6620        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6621            self.0.options = v.into();
6622            self
6623        }
6624
6625        /// Sends the request.
6626        ///
6627        /// # Long running operations
6628        ///
6629        /// This starts, but does not poll, a longrunning operation. More information
6630        /// on [update_management_dns_zone_binding][crate::client::VmwareEngine::update_management_dns_zone_binding].
6631        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6632            (*self.0.stub)
6633                .update_management_dns_zone_binding(self.0.request, self.0.options)
6634                .await
6635                .map(crate::Response::into_body)
6636        }
6637
6638        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_management_dns_zone_binding`.
6639        pub fn poller(
6640            self,
6641        ) -> impl google_cloud_lro::Poller<
6642            crate::model::ManagementDnsZoneBinding,
6643            crate::model::OperationMetadata,
6644        > {
6645            type Operation = google_cloud_lro::internal::Operation<
6646                crate::model::ManagementDnsZoneBinding,
6647                crate::model::OperationMetadata,
6648            >;
6649            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6650            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6651
6652            let stub = self.0.stub.clone();
6653            let mut options = self.0.options.clone();
6654            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6655            let query = move |name| {
6656                let stub = stub.clone();
6657                let options = options.clone();
6658                async {
6659                    let op = GetOperation::new(stub)
6660                        .set_name(name)
6661                        .with_options(options)
6662                        .send()
6663                        .await?;
6664                    Ok(Operation::new(op))
6665                }
6666            };
6667
6668            let start = move || async {
6669                let op = self.send().await?;
6670                Ok(Operation::new(op))
6671            };
6672
6673            google_cloud_lro::internal::new_poller(
6674                polling_error_policy,
6675                polling_backoff_policy,
6676                start,
6677                query,
6678            )
6679        }
6680
6681        /// Sets the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
6682        ///
6683        /// This is a **required** field for requests.
6684        pub fn set_update_mask<T>(mut self, v: T) -> Self
6685        where
6686            T: std::convert::Into<wkt::FieldMask>,
6687        {
6688            self.0.request.update_mask = std::option::Option::Some(v.into());
6689            self
6690        }
6691
6692        /// Sets or clears the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
6693        ///
6694        /// This is a **required** field for requests.
6695        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6696        where
6697            T: std::convert::Into<wkt::FieldMask>,
6698        {
6699            self.0.request.update_mask = v.map(|x| x.into());
6700            self
6701        }
6702
6703        /// Sets the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
6704        ///
6705        /// This is a **required** field for requests.
6706        pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6707        where
6708            T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6709        {
6710            self.0.request.management_dns_zone_binding = std::option::Option::Some(v.into());
6711            self
6712        }
6713
6714        /// Sets or clears the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
6715        ///
6716        /// This is a **required** field for requests.
6717        pub fn set_or_clear_management_dns_zone_binding<T>(
6718            mut self,
6719            v: std::option::Option<T>,
6720        ) -> Self
6721        where
6722            T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6723        {
6724            self.0.request.management_dns_zone_binding = v.map(|x| x.into());
6725            self
6726        }
6727
6728        /// Sets the value of [request_id][crate::model::UpdateManagementDnsZoneBindingRequest::request_id].
6729        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6730            self.0.request.request_id = v.into();
6731            self
6732        }
6733    }
6734
6735    #[doc(hidden)]
6736    impl crate::RequestBuilder for UpdateManagementDnsZoneBinding {
6737        fn request_options(&mut self) -> &mut crate::RequestOptions {
6738            &mut self.0.options
6739        }
6740    }
6741
6742    /// The request builder for [VmwareEngine::delete_management_dns_zone_binding][crate::client::VmwareEngine::delete_management_dns_zone_binding] calls.
6743    ///
6744    /// # Example
6745    /// ```
6746    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::DeleteManagementDnsZoneBinding;
6747    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
6748    /// use google_cloud_lro::Poller;
6749    ///
6750    /// let builder = prepare_request_builder();
6751    /// let response = builder.poller().until_done().await?;
6752    /// # Ok(()) }
6753    ///
6754    /// fn prepare_request_builder() -> DeleteManagementDnsZoneBinding {
6755    ///   # panic!();
6756    ///   // ... details omitted ...
6757    /// }
6758    /// ```
6759    #[derive(Clone, Debug)]
6760    pub struct DeleteManagementDnsZoneBinding(
6761        RequestBuilder<crate::model::DeleteManagementDnsZoneBindingRequest>,
6762    );
6763
6764    impl DeleteManagementDnsZoneBinding {
6765        pub(crate) fn new(
6766            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6767        ) -> Self {
6768            Self(RequestBuilder::new(stub))
6769        }
6770
6771        /// Sets the full request, replacing any prior values.
6772        pub fn with_request<V: Into<crate::model::DeleteManagementDnsZoneBindingRequest>>(
6773            mut self,
6774            v: V,
6775        ) -> Self {
6776            self.0.request = v.into();
6777            self
6778        }
6779
6780        /// Sets all the options, replacing any prior values.
6781        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6782            self.0.options = v.into();
6783            self
6784        }
6785
6786        /// Sends the request.
6787        ///
6788        /// # Long running operations
6789        ///
6790        /// This starts, but does not poll, a longrunning operation. More information
6791        /// on [delete_management_dns_zone_binding][crate::client::VmwareEngine::delete_management_dns_zone_binding].
6792        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6793            (*self.0.stub)
6794                .delete_management_dns_zone_binding(self.0.request, self.0.options)
6795                .await
6796                .map(crate::Response::into_body)
6797        }
6798
6799        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_management_dns_zone_binding`.
6800        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6801            type Operation =
6802                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6803            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6804            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6805
6806            let stub = self.0.stub.clone();
6807            let mut options = self.0.options.clone();
6808            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6809            let query = move |name| {
6810                let stub = stub.clone();
6811                let options = options.clone();
6812                async {
6813                    let op = GetOperation::new(stub)
6814                        .set_name(name)
6815                        .with_options(options)
6816                        .send()
6817                        .await?;
6818                    Ok(Operation::new(op))
6819                }
6820            };
6821
6822            let start = move || async {
6823                let op = self.send().await?;
6824                Ok(Operation::new(op))
6825            };
6826
6827            google_cloud_lro::internal::new_unit_response_poller(
6828                polling_error_policy,
6829                polling_backoff_policy,
6830                start,
6831                query,
6832            )
6833        }
6834
6835        /// Sets the value of [name][crate::model::DeleteManagementDnsZoneBindingRequest::name].
6836        ///
6837        /// This is a **required** field for requests.
6838        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6839            self.0.request.name = v.into();
6840            self
6841        }
6842
6843        /// Sets the value of [request_id][crate::model::DeleteManagementDnsZoneBindingRequest::request_id].
6844        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6845            self.0.request.request_id = v.into();
6846            self
6847        }
6848    }
6849
6850    #[doc(hidden)]
6851    impl crate::RequestBuilder for DeleteManagementDnsZoneBinding {
6852        fn request_options(&mut self) -> &mut crate::RequestOptions {
6853            &mut self.0.options
6854        }
6855    }
6856
6857    /// The request builder for [VmwareEngine::repair_management_dns_zone_binding][crate::client::VmwareEngine::repair_management_dns_zone_binding] calls.
6858    ///
6859    /// # Example
6860    /// ```
6861    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::RepairManagementDnsZoneBinding;
6862    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
6863    /// use google_cloud_lro::Poller;
6864    ///
6865    /// let builder = prepare_request_builder();
6866    /// let response = builder.poller().until_done().await?;
6867    /// # Ok(()) }
6868    ///
6869    /// fn prepare_request_builder() -> RepairManagementDnsZoneBinding {
6870    ///   # panic!();
6871    ///   // ... details omitted ...
6872    /// }
6873    /// ```
6874    #[derive(Clone, Debug)]
6875    pub struct RepairManagementDnsZoneBinding(
6876        RequestBuilder<crate::model::RepairManagementDnsZoneBindingRequest>,
6877    );
6878
6879    impl RepairManagementDnsZoneBinding {
6880        pub(crate) fn new(
6881            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6882        ) -> Self {
6883            Self(RequestBuilder::new(stub))
6884        }
6885
6886        /// Sets the full request, replacing any prior values.
6887        pub fn with_request<V: Into<crate::model::RepairManagementDnsZoneBindingRequest>>(
6888            mut self,
6889            v: V,
6890        ) -> Self {
6891            self.0.request = v.into();
6892            self
6893        }
6894
6895        /// Sets all the options, replacing any prior values.
6896        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6897            self.0.options = v.into();
6898            self
6899        }
6900
6901        /// Sends the request.
6902        ///
6903        /// # Long running operations
6904        ///
6905        /// This starts, but does not poll, a longrunning operation. More information
6906        /// on [repair_management_dns_zone_binding][crate::client::VmwareEngine::repair_management_dns_zone_binding].
6907        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6908            (*self.0.stub)
6909                .repair_management_dns_zone_binding(self.0.request, self.0.options)
6910                .await
6911                .map(crate::Response::into_body)
6912        }
6913
6914        /// Creates a [Poller][google_cloud_lro::Poller] to work with `repair_management_dns_zone_binding`.
6915        pub fn poller(
6916            self,
6917        ) -> impl google_cloud_lro::Poller<
6918            crate::model::ManagementDnsZoneBinding,
6919            crate::model::OperationMetadata,
6920        > {
6921            type Operation = google_cloud_lro::internal::Operation<
6922                crate::model::ManagementDnsZoneBinding,
6923                crate::model::OperationMetadata,
6924            >;
6925            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6926            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6927
6928            let stub = self.0.stub.clone();
6929            let mut options = self.0.options.clone();
6930            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6931            let query = move |name| {
6932                let stub = stub.clone();
6933                let options = options.clone();
6934                async {
6935                    let op = GetOperation::new(stub)
6936                        .set_name(name)
6937                        .with_options(options)
6938                        .send()
6939                        .await?;
6940                    Ok(Operation::new(op))
6941                }
6942            };
6943
6944            let start = move || async {
6945                let op = self.send().await?;
6946                Ok(Operation::new(op))
6947            };
6948
6949            google_cloud_lro::internal::new_poller(
6950                polling_error_policy,
6951                polling_backoff_policy,
6952                start,
6953                query,
6954            )
6955        }
6956
6957        /// Sets the value of [name][crate::model::RepairManagementDnsZoneBindingRequest::name].
6958        ///
6959        /// This is a **required** field for requests.
6960        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6961            self.0.request.name = v.into();
6962            self
6963        }
6964
6965        /// Sets the value of [request_id][crate::model::RepairManagementDnsZoneBindingRequest::request_id].
6966        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6967            self.0.request.request_id = v.into();
6968            self
6969        }
6970    }
6971
6972    #[doc(hidden)]
6973    impl crate::RequestBuilder for RepairManagementDnsZoneBinding {
6974        fn request_options(&mut self) -> &mut crate::RequestOptions {
6975            &mut self.0.options
6976        }
6977    }
6978
6979    /// The request builder for [VmwareEngine::create_vmware_engine_network][crate::client::VmwareEngine::create_vmware_engine_network] calls.
6980    ///
6981    /// # Example
6982    /// ```
6983    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::CreateVmwareEngineNetwork;
6984    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
6985    /// use google_cloud_lro::Poller;
6986    ///
6987    /// let builder = prepare_request_builder();
6988    /// let response = builder.poller().until_done().await?;
6989    /// # Ok(()) }
6990    ///
6991    /// fn prepare_request_builder() -> CreateVmwareEngineNetwork {
6992    ///   # panic!();
6993    ///   // ... details omitted ...
6994    /// }
6995    /// ```
6996    #[derive(Clone, Debug)]
6997    pub struct CreateVmwareEngineNetwork(
6998        RequestBuilder<crate::model::CreateVmwareEngineNetworkRequest>,
6999    );
7000
7001    impl CreateVmwareEngineNetwork {
7002        pub(crate) fn new(
7003            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7004        ) -> Self {
7005            Self(RequestBuilder::new(stub))
7006        }
7007
7008        /// Sets the full request, replacing any prior values.
7009        pub fn with_request<V: Into<crate::model::CreateVmwareEngineNetworkRequest>>(
7010            mut self,
7011            v: V,
7012        ) -> Self {
7013            self.0.request = v.into();
7014            self
7015        }
7016
7017        /// Sets all the options, replacing any prior values.
7018        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7019            self.0.options = v.into();
7020            self
7021        }
7022
7023        /// Sends the request.
7024        ///
7025        /// # Long running operations
7026        ///
7027        /// This starts, but does not poll, a longrunning operation. More information
7028        /// on [create_vmware_engine_network][crate::client::VmwareEngine::create_vmware_engine_network].
7029        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7030            (*self.0.stub)
7031                .create_vmware_engine_network(self.0.request, self.0.options)
7032                .await
7033                .map(crate::Response::into_body)
7034        }
7035
7036        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_vmware_engine_network`.
7037        pub fn poller(
7038            self,
7039        ) -> impl google_cloud_lro::Poller<
7040            crate::model::VmwareEngineNetwork,
7041            crate::model::OperationMetadata,
7042        > {
7043            type Operation = google_cloud_lro::internal::Operation<
7044                crate::model::VmwareEngineNetwork,
7045                crate::model::OperationMetadata,
7046            >;
7047            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7048            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7049
7050            let stub = self.0.stub.clone();
7051            let mut options = self.0.options.clone();
7052            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7053            let query = move |name| {
7054                let stub = stub.clone();
7055                let options = options.clone();
7056                async {
7057                    let op = GetOperation::new(stub)
7058                        .set_name(name)
7059                        .with_options(options)
7060                        .send()
7061                        .await?;
7062                    Ok(Operation::new(op))
7063                }
7064            };
7065
7066            let start = move || async {
7067                let op = self.send().await?;
7068                Ok(Operation::new(op))
7069            };
7070
7071            google_cloud_lro::internal::new_poller(
7072                polling_error_policy,
7073                polling_backoff_policy,
7074                start,
7075                query,
7076            )
7077        }
7078
7079        /// Sets the value of [parent][crate::model::CreateVmwareEngineNetworkRequest::parent].
7080        ///
7081        /// This is a **required** field for requests.
7082        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7083            self.0.request.parent = v.into();
7084            self
7085        }
7086
7087        /// Sets the value of [vmware_engine_network_id][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network_id].
7088        ///
7089        /// This is a **required** field for requests.
7090        pub fn set_vmware_engine_network_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7091            self.0.request.vmware_engine_network_id = v.into();
7092            self
7093        }
7094
7095        /// Sets the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
7096        ///
7097        /// This is a **required** field for requests.
7098        pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7099        where
7100            T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7101        {
7102            self.0.request.vmware_engine_network = std::option::Option::Some(v.into());
7103            self
7104        }
7105
7106        /// Sets or clears the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
7107        ///
7108        /// This is a **required** field for requests.
7109        pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7110        where
7111            T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7112        {
7113            self.0.request.vmware_engine_network = v.map(|x| x.into());
7114            self
7115        }
7116
7117        /// Sets the value of [request_id][crate::model::CreateVmwareEngineNetworkRequest::request_id].
7118        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7119            self.0.request.request_id = v.into();
7120            self
7121        }
7122    }
7123
7124    #[doc(hidden)]
7125    impl crate::RequestBuilder for CreateVmwareEngineNetwork {
7126        fn request_options(&mut self) -> &mut crate::RequestOptions {
7127            &mut self.0.options
7128        }
7129    }
7130
7131    /// The request builder for [VmwareEngine::update_vmware_engine_network][crate::client::VmwareEngine::update_vmware_engine_network] calls.
7132    ///
7133    /// # Example
7134    /// ```
7135    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdateVmwareEngineNetwork;
7136    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
7137    /// use google_cloud_lro::Poller;
7138    ///
7139    /// let builder = prepare_request_builder();
7140    /// let response = builder.poller().until_done().await?;
7141    /// # Ok(()) }
7142    ///
7143    /// fn prepare_request_builder() -> UpdateVmwareEngineNetwork {
7144    ///   # panic!();
7145    ///   // ... details omitted ...
7146    /// }
7147    /// ```
7148    #[derive(Clone, Debug)]
7149    pub struct UpdateVmwareEngineNetwork(
7150        RequestBuilder<crate::model::UpdateVmwareEngineNetworkRequest>,
7151    );
7152
7153    impl UpdateVmwareEngineNetwork {
7154        pub(crate) fn new(
7155            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7156        ) -> Self {
7157            Self(RequestBuilder::new(stub))
7158        }
7159
7160        /// Sets the full request, replacing any prior values.
7161        pub fn with_request<V: Into<crate::model::UpdateVmwareEngineNetworkRequest>>(
7162            mut self,
7163            v: V,
7164        ) -> Self {
7165            self.0.request = v.into();
7166            self
7167        }
7168
7169        /// Sets all the options, replacing any prior values.
7170        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7171            self.0.options = v.into();
7172            self
7173        }
7174
7175        /// Sends the request.
7176        ///
7177        /// # Long running operations
7178        ///
7179        /// This starts, but does not poll, a longrunning operation. More information
7180        /// on [update_vmware_engine_network][crate::client::VmwareEngine::update_vmware_engine_network].
7181        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7182            (*self.0.stub)
7183                .update_vmware_engine_network(self.0.request, self.0.options)
7184                .await
7185                .map(crate::Response::into_body)
7186        }
7187
7188        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_vmware_engine_network`.
7189        pub fn poller(
7190            self,
7191        ) -> impl google_cloud_lro::Poller<
7192            crate::model::VmwareEngineNetwork,
7193            crate::model::OperationMetadata,
7194        > {
7195            type Operation = google_cloud_lro::internal::Operation<
7196                crate::model::VmwareEngineNetwork,
7197                crate::model::OperationMetadata,
7198            >;
7199            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7200            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7201
7202            let stub = self.0.stub.clone();
7203            let mut options = self.0.options.clone();
7204            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7205            let query = move |name| {
7206                let stub = stub.clone();
7207                let options = options.clone();
7208                async {
7209                    let op = GetOperation::new(stub)
7210                        .set_name(name)
7211                        .with_options(options)
7212                        .send()
7213                        .await?;
7214                    Ok(Operation::new(op))
7215                }
7216            };
7217
7218            let start = move || async {
7219                let op = self.send().await?;
7220                Ok(Operation::new(op))
7221            };
7222
7223            google_cloud_lro::internal::new_poller(
7224                polling_error_policy,
7225                polling_backoff_policy,
7226                start,
7227                query,
7228            )
7229        }
7230
7231        /// Sets the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
7232        ///
7233        /// This is a **required** field for requests.
7234        pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7235        where
7236            T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7237        {
7238            self.0.request.vmware_engine_network = std::option::Option::Some(v.into());
7239            self
7240        }
7241
7242        /// Sets or clears the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
7243        ///
7244        /// This is a **required** field for requests.
7245        pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7246        where
7247            T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7248        {
7249            self.0.request.vmware_engine_network = v.map(|x| x.into());
7250            self
7251        }
7252
7253        /// Sets the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
7254        ///
7255        /// This is a **required** field for requests.
7256        pub fn set_update_mask<T>(mut self, v: T) -> Self
7257        where
7258            T: std::convert::Into<wkt::FieldMask>,
7259        {
7260            self.0.request.update_mask = std::option::Option::Some(v.into());
7261            self
7262        }
7263
7264        /// Sets or clears the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
7265        ///
7266        /// This is a **required** field for requests.
7267        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7268        where
7269            T: std::convert::Into<wkt::FieldMask>,
7270        {
7271            self.0.request.update_mask = v.map(|x| x.into());
7272            self
7273        }
7274
7275        /// Sets the value of [request_id][crate::model::UpdateVmwareEngineNetworkRequest::request_id].
7276        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7277            self.0.request.request_id = v.into();
7278            self
7279        }
7280    }
7281
7282    #[doc(hidden)]
7283    impl crate::RequestBuilder for UpdateVmwareEngineNetwork {
7284        fn request_options(&mut self) -> &mut crate::RequestOptions {
7285            &mut self.0.options
7286        }
7287    }
7288
7289    /// The request builder for [VmwareEngine::delete_vmware_engine_network][crate::client::VmwareEngine::delete_vmware_engine_network] calls.
7290    ///
7291    /// # Example
7292    /// ```
7293    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::DeleteVmwareEngineNetwork;
7294    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
7295    /// use google_cloud_lro::Poller;
7296    ///
7297    /// let builder = prepare_request_builder();
7298    /// let response = builder.poller().until_done().await?;
7299    /// # Ok(()) }
7300    ///
7301    /// fn prepare_request_builder() -> DeleteVmwareEngineNetwork {
7302    ///   # panic!();
7303    ///   // ... details omitted ...
7304    /// }
7305    /// ```
7306    #[derive(Clone, Debug)]
7307    pub struct DeleteVmwareEngineNetwork(
7308        RequestBuilder<crate::model::DeleteVmwareEngineNetworkRequest>,
7309    );
7310
7311    impl DeleteVmwareEngineNetwork {
7312        pub(crate) fn new(
7313            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7314        ) -> Self {
7315            Self(RequestBuilder::new(stub))
7316        }
7317
7318        /// Sets the full request, replacing any prior values.
7319        pub fn with_request<V: Into<crate::model::DeleteVmwareEngineNetworkRequest>>(
7320            mut self,
7321            v: V,
7322        ) -> Self {
7323            self.0.request = v.into();
7324            self
7325        }
7326
7327        /// Sets all the options, replacing any prior values.
7328        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7329            self.0.options = v.into();
7330            self
7331        }
7332
7333        /// Sends the request.
7334        ///
7335        /// # Long running operations
7336        ///
7337        /// This starts, but does not poll, a longrunning operation. More information
7338        /// on [delete_vmware_engine_network][crate::client::VmwareEngine::delete_vmware_engine_network].
7339        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7340            (*self.0.stub)
7341                .delete_vmware_engine_network(self.0.request, self.0.options)
7342                .await
7343                .map(crate::Response::into_body)
7344        }
7345
7346        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_vmware_engine_network`.
7347        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7348            type Operation =
7349                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7350            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7351            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7352
7353            let stub = self.0.stub.clone();
7354            let mut options = self.0.options.clone();
7355            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7356            let query = move |name| {
7357                let stub = stub.clone();
7358                let options = options.clone();
7359                async {
7360                    let op = GetOperation::new(stub)
7361                        .set_name(name)
7362                        .with_options(options)
7363                        .send()
7364                        .await?;
7365                    Ok(Operation::new(op))
7366                }
7367            };
7368
7369            let start = move || async {
7370                let op = self.send().await?;
7371                Ok(Operation::new(op))
7372            };
7373
7374            google_cloud_lro::internal::new_unit_response_poller(
7375                polling_error_policy,
7376                polling_backoff_policy,
7377                start,
7378                query,
7379            )
7380        }
7381
7382        /// Sets the value of [name][crate::model::DeleteVmwareEngineNetworkRequest::name].
7383        ///
7384        /// This is a **required** field for requests.
7385        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7386            self.0.request.name = v.into();
7387            self
7388        }
7389
7390        /// Sets the value of [request_id][crate::model::DeleteVmwareEngineNetworkRequest::request_id].
7391        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7392            self.0.request.request_id = v.into();
7393            self
7394        }
7395
7396        /// Sets the value of [etag][crate::model::DeleteVmwareEngineNetworkRequest::etag].
7397        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7398            self.0.request.etag = v.into();
7399            self
7400        }
7401    }
7402
7403    #[doc(hidden)]
7404    impl crate::RequestBuilder for DeleteVmwareEngineNetwork {
7405        fn request_options(&mut self) -> &mut crate::RequestOptions {
7406            &mut self.0.options
7407        }
7408    }
7409
7410    /// The request builder for [VmwareEngine::get_vmware_engine_network][crate::client::VmwareEngine::get_vmware_engine_network] calls.
7411    ///
7412    /// # Example
7413    /// ```
7414    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetVmwareEngineNetwork;
7415    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
7416    ///
7417    /// let builder = prepare_request_builder();
7418    /// let response = builder.send().await?;
7419    /// # Ok(()) }
7420    ///
7421    /// fn prepare_request_builder() -> GetVmwareEngineNetwork {
7422    ///   # panic!();
7423    ///   // ... details omitted ...
7424    /// }
7425    /// ```
7426    #[derive(Clone, Debug)]
7427    pub struct GetVmwareEngineNetwork(RequestBuilder<crate::model::GetVmwareEngineNetworkRequest>);
7428
7429    impl GetVmwareEngineNetwork {
7430        pub(crate) fn new(
7431            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7432        ) -> Self {
7433            Self(RequestBuilder::new(stub))
7434        }
7435
7436        /// Sets the full request, replacing any prior values.
7437        pub fn with_request<V: Into<crate::model::GetVmwareEngineNetworkRequest>>(
7438            mut self,
7439            v: V,
7440        ) -> Self {
7441            self.0.request = v.into();
7442            self
7443        }
7444
7445        /// Sets all the options, replacing any prior values.
7446        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7447            self.0.options = v.into();
7448            self
7449        }
7450
7451        /// Sends the request.
7452        pub async fn send(self) -> Result<crate::model::VmwareEngineNetwork> {
7453            (*self.0.stub)
7454                .get_vmware_engine_network(self.0.request, self.0.options)
7455                .await
7456                .map(crate::Response::into_body)
7457        }
7458
7459        /// Sets the value of [name][crate::model::GetVmwareEngineNetworkRequest::name].
7460        ///
7461        /// This is a **required** field for requests.
7462        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7463            self.0.request.name = v.into();
7464            self
7465        }
7466    }
7467
7468    #[doc(hidden)]
7469    impl crate::RequestBuilder for GetVmwareEngineNetwork {
7470        fn request_options(&mut self) -> &mut crate::RequestOptions {
7471            &mut self.0.options
7472        }
7473    }
7474
7475    /// The request builder for [VmwareEngine::list_vmware_engine_networks][crate::client::VmwareEngine::list_vmware_engine_networks] calls.
7476    ///
7477    /// # Example
7478    /// ```
7479    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListVmwareEngineNetworks;
7480    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
7481    /// use google_cloud_gax::paginator::ItemPaginator;
7482    ///
7483    /// let builder = prepare_request_builder();
7484    /// let mut items = builder.by_item();
7485    /// while let Some(result) = items.next().await {
7486    ///   let item = result?;
7487    /// }
7488    /// # Ok(()) }
7489    ///
7490    /// fn prepare_request_builder() -> ListVmwareEngineNetworks {
7491    ///   # panic!();
7492    ///   // ... details omitted ...
7493    /// }
7494    /// ```
7495    #[derive(Clone, Debug)]
7496    pub struct ListVmwareEngineNetworks(
7497        RequestBuilder<crate::model::ListVmwareEngineNetworksRequest>,
7498    );
7499
7500    impl ListVmwareEngineNetworks {
7501        pub(crate) fn new(
7502            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7503        ) -> Self {
7504            Self(RequestBuilder::new(stub))
7505        }
7506
7507        /// Sets the full request, replacing any prior values.
7508        pub fn with_request<V: Into<crate::model::ListVmwareEngineNetworksRequest>>(
7509            mut self,
7510            v: V,
7511        ) -> Self {
7512            self.0.request = v.into();
7513            self
7514        }
7515
7516        /// Sets all the options, replacing any prior values.
7517        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7518            self.0.options = v.into();
7519            self
7520        }
7521
7522        /// Sends the request.
7523        pub async fn send(self) -> Result<crate::model::ListVmwareEngineNetworksResponse> {
7524            (*self.0.stub)
7525                .list_vmware_engine_networks(self.0.request, self.0.options)
7526                .await
7527                .map(crate::Response::into_body)
7528        }
7529
7530        /// Streams each page in the collection.
7531        pub fn by_page(
7532            self,
7533        ) -> impl google_cloud_gax::paginator::Paginator<
7534            crate::model::ListVmwareEngineNetworksResponse,
7535            crate::Error,
7536        > {
7537            use std::clone::Clone;
7538            let token = self.0.request.page_token.clone();
7539            let execute = move |token: String| {
7540                let mut builder = self.clone();
7541                builder.0.request = builder.0.request.set_page_token(token);
7542                builder.send()
7543            };
7544            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7545        }
7546
7547        /// Streams each item in the collection.
7548        pub fn by_item(
7549            self,
7550        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7551            crate::model::ListVmwareEngineNetworksResponse,
7552            crate::Error,
7553        > {
7554            use google_cloud_gax::paginator::Paginator;
7555            self.by_page().items()
7556        }
7557
7558        /// Sets the value of [parent][crate::model::ListVmwareEngineNetworksRequest::parent].
7559        ///
7560        /// This is a **required** field for requests.
7561        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7562            self.0.request.parent = v.into();
7563            self
7564        }
7565
7566        /// Sets the value of [page_size][crate::model::ListVmwareEngineNetworksRequest::page_size].
7567        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7568            self.0.request.page_size = v.into();
7569            self
7570        }
7571
7572        /// Sets the value of [page_token][crate::model::ListVmwareEngineNetworksRequest::page_token].
7573        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7574            self.0.request.page_token = v.into();
7575            self
7576        }
7577
7578        /// Sets the value of [filter][crate::model::ListVmwareEngineNetworksRequest::filter].
7579        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7580            self.0.request.filter = v.into();
7581            self
7582        }
7583
7584        /// Sets the value of [order_by][crate::model::ListVmwareEngineNetworksRequest::order_by].
7585        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7586            self.0.request.order_by = v.into();
7587            self
7588        }
7589    }
7590
7591    #[doc(hidden)]
7592    impl crate::RequestBuilder for ListVmwareEngineNetworks {
7593        fn request_options(&mut self) -> &mut crate::RequestOptions {
7594            &mut self.0.options
7595        }
7596    }
7597
7598    /// The request builder for [VmwareEngine::create_private_connection][crate::client::VmwareEngine::create_private_connection] calls.
7599    ///
7600    /// # Example
7601    /// ```
7602    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::CreatePrivateConnection;
7603    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
7604    /// use google_cloud_lro::Poller;
7605    ///
7606    /// let builder = prepare_request_builder();
7607    /// let response = builder.poller().until_done().await?;
7608    /// # Ok(()) }
7609    ///
7610    /// fn prepare_request_builder() -> CreatePrivateConnection {
7611    ///   # panic!();
7612    ///   // ... details omitted ...
7613    /// }
7614    /// ```
7615    #[derive(Clone, Debug)]
7616    pub struct CreatePrivateConnection(
7617        RequestBuilder<crate::model::CreatePrivateConnectionRequest>,
7618    );
7619
7620    impl CreatePrivateConnection {
7621        pub(crate) fn new(
7622            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7623        ) -> Self {
7624            Self(RequestBuilder::new(stub))
7625        }
7626
7627        /// Sets the full request, replacing any prior values.
7628        pub fn with_request<V: Into<crate::model::CreatePrivateConnectionRequest>>(
7629            mut self,
7630            v: V,
7631        ) -> Self {
7632            self.0.request = v.into();
7633            self
7634        }
7635
7636        /// Sets all the options, replacing any prior values.
7637        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7638            self.0.options = v.into();
7639            self
7640        }
7641
7642        /// Sends the request.
7643        ///
7644        /// # Long running operations
7645        ///
7646        /// This starts, but does not poll, a longrunning operation. More information
7647        /// on [create_private_connection][crate::client::VmwareEngine::create_private_connection].
7648        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7649            (*self.0.stub)
7650                .create_private_connection(self.0.request, self.0.options)
7651                .await
7652                .map(crate::Response::into_body)
7653        }
7654
7655        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_private_connection`.
7656        pub fn poller(
7657            self,
7658        ) -> impl google_cloud_lro::Poller<
7659            crate::model::PrivateConnection,
7660            crate::model::OperationMetadata,
7661        > {
7662            type Operation = google_cloud_lro::internal::Operation<
7663                crate::model::PrivateConnection,
7664                crate::model::OperationMetadata,
7665            >;
7666            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7667            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7668
7669            let stub = self.0.stub.clone();
7670            let mut options = self.0.options.clone();
7671            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7672            let query = move |name| {
7673                let stub = stub.clone();
7674                let options = options.clone();
7675                async {
7676                    let op = GetOperation::new(stub)
7677                        .set_name(name)
7678                        .with_options(options)
7679                        .send()
7680                        .await?;
7681                    Ok(Operation::new(op))
7682                }
7683            };
7684
7685            let start = move || async {
7686                let op = self.send().await?;
7687                Ok(Operation::new(op))
7688            };
7689
7690            google_cloud_lro::internal::new_poller(
7691                polling_error_policy,
7692                polling_backoff_policy,
7693                start,
7694                query,
7695            )
7696        }
7697
7698        /// Sets the value of [parent][crate::model::CreatePrivateConnectionRequest::parent].
7699        ///
7700        /// This is a **required** field for requests.
7701        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7702            self.0.request.parent = v.into();
7703            self
7704        }
7705
7706        /// Sets the value of [private_connection_id][crate::model::CreatePrivateConnectionRequest::private_connection_id].
7707        ///
7708        /// This is a **required** field for requests.
7709        pub fn set_private_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7710            self.0.request.private_connection_id = v.into();
7711            self
7712        }
7713
7714        /// Sets the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
7715        ///
7716        /// This is a **required** field for requests.
7717        pub fn set_private_connection<T>(mut self, v: T) -> Self
7718        where
7719            T: std::convert::Into<crate::model::PrivateConnection>,
7720        {
7721            self.0.request.private_connection = std::option::Option::Some(v.into());
7722            self
7723        }
7724
7725        /// Sets or clears the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
7726        ///
7727        /// This is a **required** field for requests.
7728        pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
7729        where
7730            T: std::convert::Into<crate::model::PrivateConnection>,
7731        {
7732            self.0.request.private_connection = v.map(|x| x.into());
7733            self
7734        }
7735
7736        /// Sets the value of [request_id][crate::model::CreatePrivateConnectionRequest::request_id].
7737        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7738            self.0.request.request_id = v.into();
7739            self
7740        }
7741    }
7742
7743    #[doc(hidden)]
7744    impl crate::RequestBuilder for CreatePrivateConnection {
7745        fn request_options(&mut self) -> &mut crate::RequestOptions {
7746            &mut self.0.options
7747        }
7748    }
7749
7750    /// The request builder for [VmwareEngine::get_private_connection][crate::client::VmwareEngine::get_private_connection] calls.
7751    ///
7752    /// # Example
7753    /// ```
7754    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetPrivateConnection;
7755    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
7756    ///
7757    /// let builder = prepare_request_builder();
7758    /// let response = builder.send().await?;
7759    /// # Ok(()) }
7760    ///
7761    /// fn prepare_request_builder() -> GetPrivateConnection {
7762    ///   # panic!();
7763    ///   // ... details omitted ...
7764    /// }
7765    /// ```
7766    #[derive(Clone, Debug)]
7767    pub struct GetPrivateConnection(RequestBuilder<crate::model::GetPrivateConnectionRequest>);
7768
7769    impl GetPrivateConnection {
7770        pub(crate) fn new(
7771            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7772        ) -> Self {
7773            Self(RequestBuilder::new(stub))
7774        }
7775
7776        /// Sets the full request, replacing any prior values.
7777        pub fn with_request<V: Into<crate::model::GetPrivateConnectionRequest>>(
7778            mut self,
7779            v: V,
7780        ) -> Self {
7781            self.0.request = v.into();
7782            self
7783        }
7784
7785        /// Sets all the options, replacing any prior values.
7786        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7787            self.0.options = v.into();
7788            self
7789        }
7790
7791        /// Sends the request.
7792        pub async fn send(self) -> Result<crate::model::PrivateConnection> {
7793            (*self.0.stub)
7794                .get_private_connection(self.0.request, self.0.options)
7795                .await
7796                .map(crate::Response::into_body)
7797        }
7798
7799        /// Sets the value of [name][crate::model::GetPrivateConnectionRequest::name].
7800        ///
7801        /// This is a **required** field for requests.
7802        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7803            self.0.request.name = v.into();
7804            self
7805        }
7806    }
7807
7808    #[doc(hidden)]
7809    impl crate::RequestBuilder for GetPrivateConnection {
7810        fn request_options(&mut self) -> &mut crate::RequestOptions {
7811            &mut self.0.options
7812        }
7813    }
7814
7815    /// The request builder for [VmwareEngine::list_private_connections][crate::client::VmwareEngine::list_private_connections] calls.
7816    ///
7817    /// # Example
7818    /// ```
7819    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListPrivateConnections;
7820    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
7821    /// use google_cloud_gax::paginator::ItemPaginator;
7822    ///
7823    /// let builder = prepare_request_builder();
7824    /// let mut items = builder.by_item();
7825    /// while let Some(result) = items.next().await {
7826    ///   let item = result?;
7827    /// }
7828    /// # Ok(()) }
7829    ///
7830    /// fn prepare_request_builder() -> ListPrivateConnections {
7831    ///   # panic!();
7832    ///   // ... details omitted ...
7833    /// }
7834    /// ```
7835    #[derive(Clone, Debug)]
7836    pub struct ListPrivateConnections(RequestBuilder<crate::model::ListPrivateConnectionsRequest>);
7837
7838    impl ListPrivateConnections {
7839        pub(crate) fn new(
7840            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7841        ) -> Self {
7842            Self(RequestBuilder::new(stub))
7843        }
7844
7845        /// Sets the full request, replacing any prior values.
7846        pub fn with_request<V: Into<crate::model::ListPrivateConnectionsRequest>>(
7847            mut self,
7848            v: V,
7849        ) -> Self {
7850            self.0.request = v.into();
7851            self
7852        }
7853
7854        /// Sets all the options, replacing any prior values.
7855        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7856            self.0.options = v.into();
7857            self
7858        }
7859
7860        /// Sends the request.
7861        pub async fn send(self) -> Result<crate::model::ListPrivateConnectionsResponse> {
7862            (*self.0.stub)
7863                .list_private_connections(self.0.request, self.0.options)
7864                .await
7865                .map(crate::Response::into_body)
7866        }
7867
7868        /// Streams each page in the collection.
7869        pub fn by_page(
7870            self,
7871        ) -> impl google_cloud_gax::paginator::Paginator<
7872            crate::model::ListPrivateConnectionsResponse,
7873            crate::Error,
7874        > {
7875            use std::clone::Clone;
7876            let token = self.0.request.page_token.clone();
7877            let execute = move |token: String| {
7878                let mut builder = self.clone();
7879                builder.0.request = builder.0.request.set_page_token(token);
7880                builder.send()
7881            };
7882            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7883        }
7884
7885        /// Streams each item in the collection.
7886        pub fn by_item(
7887            self,
7888        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7889            crate::model::ListPrivateConnectionsResponse,
7890            crate::Error,
7891        > {
7892            use google_cloud_gax::paginator::Paginator;
7893            self.by_page().items()
7894        }
7895
7896        /// Sets the value of [parent][crate::model::ListPrivateConnectionsRequest::parent].
7897        ///
7898        /// This is a **required** field for requests.
7899        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7900            self.0.request.parent = v.into();
7901            self
7902        }
7903
7904        /// Sets the value of [page_size][crate::model::ListPrivateConnectionsRequest::page_size].
7905        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7906            self.0.request.page_size = v.into();
7907            self
7908        }
7909
7910        /// Sets the value of [page_token][crate::model::ListPrivateConnectionsRequest::page_token].
7911        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7912            self.0.request.page_token = v.into();
7913            self
7914        }
7915
7916        /// Sets the value of [filter][crate::model::ListPrivateConnectionsRequest::filter].
7917        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7918            self.0.request.filter = v.into();
7919            self
7920        }
7921
7922        /// Sets the value of [order_by][crate::model::ListPrivateConnectionsRequest::order_by].
7923        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7924            self.0.request.order_by = v.into();
7925            self
7926        }
7927    }
7928
7929    #[doc(hidden)]
7930    impl crate::RequestBuilder for ListPrivateConnections {
7931        fn request_options(&mut self) -> &mut crate::RequestOptions {
7932            &mut self.0.options
7933        }
7934    }
7935
7936    /// The request builder for [VmwareEngine::update_private_connection][crate::client::VmwareEngine::update_private_connection] calls.
7937    ///
7938    /// # Example
7939    /// ```
7940    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::UpdatePrivateConnection;
7941    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
7942    /// use google_cloud_lro::Poller;
7943    ///
7944    /// let builder = prepare_request_builder();
7945    /// let response = builder.poller().until_done().await?;
7946    /// # Ok(()) }
7947    ///
7948    /// fn prepare_request_builder() -> UpdatePrivateConnection {
7949    ///   # panic!();
7950    ///   // ... details omitted ...
7951    /// }
7952    /// ```
7953    #[derive(Clone, Debug)]
7954    pub struct UpdatePrivateConnection(
7955        RequestBuilder<crate::model::UpdatePrivateConnectionRequest>,
7956    );
7957
7958    impl UpdatePrivateConnection {
7959        pub(crate) fn new(
7960            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7961        ) -> Self {
7962            Self(RequestBuilder::new(stub))
7963        }
7964
7965        /// Sets the full request, replacing any prior values.
7966        pub fn with_request<V: Into<crate::model::UpdatePrivateConnectionRequest>>(
7967            mut self,
7968            v: V,
7969        ) -> Self {
7970            self.0.request = v.into();
7971            self
7972        }
7973
7974        /// Sets all the options, replacing any prior values.
7975        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7976            self.0.options = v.into();
7977            self
7978        }
7979
7980        /// Sends the request.
7981        ///
7982        /// # Long running operations
7983        ///
7984        /// This starts, but does not poll, a longrunning operation. More information
7985        /// on [update_private_connection][crate::client::VmwareEngine::update_private_connection].
7986        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7987            (*self.0.stub)
7988                .update_private_connection(self.0.request, self.0.options)
7989                .await
7990                .map(crate::Response::into_body)
7991        }
7992
7993        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_private_connection`.
7994        pub fn poller(
7995            self,
7996        ) -> impl google_cloud_lro::Poller<
7997            crate::model::PrivateConnection,
7998            crate::model::OperationMetadata,
7999        > {
8000            type Operation = google_cloud_lro::internal::Operation<
8001                crate::model::PrivateConnection,
8002                crate::model::OperationMetadata,
8003            >;
8004            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8005            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8006
8007            let stub = self.0.stub.clone();
8008            let mut options = self.0.options.clone();
8009            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8010            let query = move |name| {
8011                let stub = stub.clone();
8012                let options = options.clone();
8013                async {
8014                    let op = GetOperation::new(stub)
8015                        .set_name(name)
8016                        .with_options(options)
8017                        .send()
8018                        .await?;
8019                    Ok(Operation::new(op))
8020                }
8021            };
8022
8023            let start = move || async {
8024                let op = self.send().await?;
8025                Ok(Operation::new(op))
8026            };
8027
8028            google_cloud_lro::internal::new_poller(
8029                polling_error_policy,
8030                polling_backoff_policy,
8031                start,
8032                query,
8033            )
8034        }
8035
8036        /// Sets the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
8037        ///
8038        /// This is a **required** field for requests.
8039        pub fn set_private_connection<T>(mut self, v: T) -> Self
8040        where
8041            T: std::convert::Into<crate::model::PrivateConnection>,
8042        {
8043            self.0.request.private_connection = std::option::Option::Some(v.into());
8044            self
8045        }
8046
8047        /// Sets or clears the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
8048        ///
8049        /// This is a **required** field for requests.
8050        pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
8051        where
8052            T: std::convert::Into<crate::model::PrivateConnection>,
8053        {
8054            self.0.request.private_connection = v.map(|x| x.into());
8055            self
8056        }
8057
8058        /// Sets the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
8059        ///
8060        /// This is a **required** field for requests.
8061        pub fn set_update_mask<T>(mut self, v: T) -> Self
8062        where
8063            T: std::convert::Into<wkt::FieldMask>,
8064        {
8065            self.0.request.update_mask = std::option::Option::Some(v.into());
8066            self
8067        }
8068
8069        /// Sets or clears the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
8070        ///
8071        /// This is a **required** field for requests.
8072        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8073        where
8074            T: std::convert::Into<wkt::FieldMask>,
8075        {
8076            self.0.request.update_mask = v.map(|x| x.into());
8077            self
8078        }
8079
8080        /// Sets the value of [request_id][crate::model::UpdatePrivateConnectionRequest::request_id].
8081        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8082            self.0.request.request_id = v.into();
8083            self
8084        }
8085    }
8086
8087    #[doc(hidden)]
8088    impl crate::RequestBuilder for UpdatePrivateConnection {
8089        fn request_options(&mut self) -> &mut crate::RequestOptions {
8090            &mut self.0.options
8091        }
8092    }
8093
8094    /// The request builder for [VmwareEngine::delete_private_connection][crate::client::VmwareEngine::delete_private_connection] calls.
8095    ///
8096    /// # Example
8097    /// ```
8098    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::DeletePrivateConnection;
8099    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
8100    /// use google_cloud_lro::Poller;
8101    ///
8102    /// let builder = prepare_request_builder();
8103    /// let response = builder.poller().until_done().await?;
8104    /// # Ok(()) }
8105    ///
8106    /// fn prepare_request_builder() -> DeletePrivateConnection {
8107    ///   # panic!();
8108    ///   // ... details omitted ...
8109    /// }
8110    /// ```
8111    #[derive(Clone, Debug)]
8112    pub struct DeletePrivateConnection(
8113        RequestBuilder<crate::model::DeletePrivateConnectionRequest>,
8114    );
8115
8116    impl DeletePrivateConnection {
8117        pub(crate) fn new(
8118            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8119        ) -> Self {
8120            Self(RequestBuilder::new(stub))
8121        }
8122
8123        /// Sets the full request, replacing any prior values.
8124        pub fn with_request<V: Into<crate::model::DeletePrivateConnectionRequest>>(
8125            mut self,
8126            v: V,
8127        ) -> Self {
8128            self.0.request = v.into();
8129            self
8130        }
8131
8132        /// Sets all the options, replacing any prior values.
8133        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8134            self.0.options = v.into();
8135            self
8136        }
8137
8138        /// Sends the request.
8139        ///
8140        /// # Long running operations
8141        ///
8142        /// This starts, but does not poll, a longrunning operation. More information
8143        /// on [delete_private_connection][crate::client::VmwareEngine::delete_private_connection].
8144        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8145            (*self.0.stub)
8146                .delete_private_connection(self.0.request, self.0.options)
8147                .await
8148                .map(crate::Response::into_body)
8149        }
8150
8151        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_private_connection`.
8152        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
8153            type Operation =
8154                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
8155            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8156            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8157
8158            let stub = self.0.stub.clone();
8159            let mut options = self.0.options.clone();
8160            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8161            let query = move |name| {
8162                let stub = stub.clone();
8163                let options = options.clone();
8164                async {
8165                    let op = GetOperation::new(stub)
8166                        .set_name(name)
8167                        .with_options(options)
8168                        .send()
8169                        .await?;
8170                    Ok(Operation::new(op))
8171                }
8172            };
8173
8174            let start = move || async {
8175                let op = self.send().await?;
8176                Ok(Operation::new(op))
8177            };
8178
8179            google_cloud_lro::internal::new_unit_response_poller(
8180                polling_error_policy,
8181                polling_backoff_policy,
8182                start,
8183                query,
8184            )
8185        }
8186
8187        /// Sets the value of [name][crate::model::DeletePrivateConnectionRequest::name].
8188        ///
8189        /// This is a **required** field for requests.
8190        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8191            self.0.request.name = v.into();
8192            self
8193        }
8194
8195        /// Sets the value of [request_id][crate::model::DeletePrivateConnectionRequest::request_id].
8196        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8197            self.0.request.request_id = v.into();
8198            self
8199        }
8200    }
8201
8202    #[doc(hidden)]
8203    impl crate::RequestBuilder for DeletePrivateConnection {
8204        fn request_options(&mut self) -> &mut crate::RequestOptions {
8205            &mut self.0.options
8206        }
8207    }
8208
8209    /// The request builder for [VmwareEngine::list_private_connection_peering_routes][crate::client::VmwareEngine::list_private_connection_peering_routes] calls.
8210    ///
8211    /// # Example
8212    /// ```
8213    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListPrivateConnectionPeeringRoutes;
8214    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
8215    /// use google_cloud_gax::paginator::ItemPaginator;
8216    ///
8217    /// let builder = prepare_request_builder();
8218    /// let mut items = builder.by_item();
8219    /// while let Some(result) = items.next().await {
8220    ///   let item = result?;
8221    /// }
8222    /// # Ok(()) }
8223    ///
8224    /// fn prepare_request_builder() -> ListPrivateConnectionPeeringRoutes {
8225    ///   # panic!();
8226    ///   // ... details omitted ...
8227    /// }
8228    /// ```
8229    #[derive(Clone, Debug)]
8230    pub struct ListPrivateConnectionPeeringRoutes(
8231        RequestBuilder<crate::model::ListPrivateConnectionPeeringRoutesRequest>,
8232    );
8233
8234    impl ListPrivateConnectionPeeringRoutes {
8235        pub(crate) fn new(
8236            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8237        ) -> Self {
8238            Self(RequestBuilder::new(stub))
8239        }
8240
8241        /// Sets the full request, replacing any prior values.
8242        pub fn with_request<V: Into<crate::model::ListPrivateConnectionPeeringRoutesRequest>>(
8243            mut self,
8244            v: V,
8245        ) -> Self {
8246            self.0.request = v.into();
8247            self
8248        }
8249
8250        /// Sets all the options, replacing any prior values.
8251        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8252            self.0.options = v.into();
8253            self
8254        }
8255
8256        /// Sends the request.
8257        pub async fn send(
8258            self,
8259        ) -> Result<crate::model::ListPrivateConnectionPeeringRoutesResponse> {
8260            (*self.0.stub)
8261                .list_private_connection_peering_routes(self.0.request, self.0.options)
8262                .await
8263                .map(crate::Response::into_body)
8264        }
8265
8266        /// Streams each page in the collection.
8267        pub fn by_page(
8268            self,
8269        ) -> impl google_cloud_gax::paginator::Paginator<
8270            crate::model::ListPrivateConnectionPeeringRoutesResponse,
8271            crate::Error,
8272        > {
8273            use std::clone::Clone;
8274            let token = self.0.request.page_token.clone();
8275            let execute = move |token: String| {
8276                let mut builder = self.clone();
8277                builder.0.request = builder.0.request.set_page_token(token);
8278                builder.send()
8279            };
8280            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8281        }
8282
8283        /// Streams each item in the collection.
8284        pub fn by_item(
8285            self,
8286        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8287            crate::model::ListPrivateConnectionPeeringRoutesResponse,
8288            crate::Error,
8289        > {
8290            use google_cloud_gax::paginator::Paginator;
8291            self.by_page().items()
8292        }
8293
8294        /// Sets the value of [parent][crate::model::ListPrivateConnectionPeeringRoutesRequest::parent].
8295        ///
8296        /// This is a **required** field for requests.
8297        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8298            self.0.request.parent = v.into();
8299            self
8300        }
8301
8302        /// Sets the value of [page_size][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_size].
8303        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8304            self.0.request.page_size = v.into();
8305            self
8306        }
8307
8308        /// Sets the value of [page_token][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_token].
8309        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8310            self.0.request.page_token = v.into();
8311            self
8312        }
8313    }
8314
8315    #[doc(hidden)]
8316    impl crate::RequestBuilder for ListPrivateConnectionPeeringRoutes {
8317        fn request_options(&mut self) -> &mut crate::RequestOptions {
8318            &mut self.0.options
8319        }
8320    }
8321
8322    /// The request builder for [VmwareEngine::grant_dns_bind_permission][crate::client::VmwareEngine::grant_dns_bind_permission] calls.
8323    ///
8324    /// # Example
8325    /// ```
8326    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GrantDnsBindPermission;
8327    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
8328    /// use google_cloud_lro::Poller;
8329    ///
8330    /// let builder = prepare_request_builder();
8331    /// let response = builder.poller().until_done().await?;
8332    /// # Ok(()) }
8333    ///
8334    /// fn prepare_request_builder() -> GrantDnsBindPermission {
8335    ///   # panic!();
8336    ///   // ... details omitted ...
8337    /// }
8338    /// ```
8339    #[derive(Clone, Debug)]
8340    pub struct GrantDnsBindPermission(RequestBuilder<crate::model::GrantDnsBindPermissionRequest>);
8341
8342    impl GrantDnsBindPermission {
8343        pub(crate) fn new(
8344            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8345        ) -> Self {
8346            Self(RequestBuilder::new(stub))
8347        }
8348
8349        /// Sets the full request, replacing any prior values.
8350        pub fn with_request<V: Into<crate::model::GrantDnsBindPermissionRequest>>(
8351            mut self,
8352            v: V,
8353        ) -> Self {
8354            self.0.request = v.into();
8355            self
8356        }
8357
8358        /// Sets all the options, replacing any prior values.
8359        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8360            self.0.options = v.into();
8361            self
8362        }
8363
8364        /// Sends the request.
8365        ///
8366        /// # Long running operations
8367        ///
8368        /// This starts, but does not poll, a longrunning operation. More information
8369        /// on [grant_dns_bind_permission][crate::client::VmwareEngine::grant_dns_bind_permission].
8370        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8371            (*self.0.stub)
8372                .grant_dns_bind_permission(self.0.request, self.0.options)
8373                .await
8374                .map(crate::Response::into_body)
8375        }
8376
8377        /// Creates a [Poller][google_cloud_lro::Poller] to work with `grant_dns_bind_permission`.
8378        pub fn poller(
8379            self,
8380        ) -> impl google_cloud_lro::Poller<
8381            crate::model::DnsBindPermission,
8382            crate::model::OperationMetadata,
8383        > {
8384            type Operation = google_cloud_lro::internal::Operation<
8385                crate::model::DnsBindPermission,
8386                crate::model::OperationMetadata,
8387            >;
8388            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8389            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8390
8391            let stub = self.0.stub.clone();
8392            let mut options = self.0.options.clone();
8393            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8394            let query = move |name| {
8395                let stub = stub.clone();
8396                let options = options.clone();
8397                async {
8398                    let op = GetOperation::new(stub)
8399                        .set_name(name)
8400                        .with_options(options)
8401                        .send()
8402                        .await?;
8403                    Ok(Operation::new(op))
8404                }
8405            };
8406
8407            let start = move || async {
8408                let op = self.send().await?;
8409                Ok(Operation::new(op))
8410            };
8411
8412            google_cloud_lro::internal::new_poller(
8413                polling_error_policy,
8414                polling_backoff_policy,
8415                start,
8416                query,
8417            )
8418        }
8419
8420        /// Sets the value of [name][crate::model::GrantDnsBindPermissionRequest::name].
8421        ///
8422        /// This is a **required** field for requests.
8423        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8424            self.0.request.name = v.into();
8425            self
8426        }
8427
8428        /// Sets the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
8429        ///
8430        /// This is a **required** field for requests.
8431        pub fn set_principal<T>(mut self, v: T) -> Self
8432        where
8433            T: std::convert::Into<crate::model::Principal>,
8434        {
8435            self.0.request.principal = std::option::Option::Some(v.into());
8436            self
8437        }
8438
8439        /// Sets or clears the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
8440        ///
8441        /// This is a **required** field for requests.
8442        pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8443        where
8444            T: std::convert::Into<crate::model::Principal>,
8445        {
8446            self.0.request.principal = v.map(|x| x.into());
8447            self
8448        }
8449
8450        /// Sets the value of [request_id][crate::model::GrantDnsBindPermissionRequest::request_id].
8451        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8452            self.0.request.request_id = v.into();
8453            self
8454        }
8455    }
8456
8457    #[doc(hidden)]
8458    impl crate::RequestBuilder for GrantDnsBindPermission {
8459        fn request_options(&mut self) -> &mut crate::RequestOptions {
8460            &mut self.0.options
8461        }
8462    }
8463
8464    /// The request builder for [VmwareEngine::get_dns_bind_permission][crate::client::VmwareEngine::get_dns_bind_permission] calls.
8465    ///
8466    /// # Example
8467    /// ```
8468    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetDnsBindPermission;
8469    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
8470    ///
8471    /// let builder = prepare_request_builder();
8472    /// let response = builder.send().await?;
8473    /// # Ok(()) }
8474    ///
8475    /// fn prepare_request_builder() -> GetDnsBindPermission {
8476    ///   # panic!();
8477    ///   // ... details omitted ...
8478    /// }
8479    /// ```
8480    #[derive(Clone, Debug)]
8481    pub struct GetDnsBindPermission(RequestBuilder<crate::model::GetDnsBindPermissionRequest>);
8482
8483    impl GetDnsBindPermission {
8484        pub(crate) fn new(
8485            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8486        ) -> Self {
8487            Self(RequestBuilder::new(stub))
8488        }
8489
8490        /// Sets the full request, replacing any prior values.
8491        pub fn with_request<V: Into<crate::model::GetDnsBindPermissionRequest>>(
8492            mut self,
8493            v: V,
8494        ) -> Self {
8495            self.0.request = v.into();
8496            self
8497        }
8498
8499        /// Sets all the options, replacing any prior values.
8500        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8501            self.0.options = v.into();
8502            self
8503        }
8504
8505        /// Sends the request.
8506        pub async fn send(self) -> Result<crate::model::DnsBindPermission> {
8507            (*self.0.stub)
8508                .get_dns_bind_permission(self.0.request, self.0.options)
8509                .await
8510                .map(crate::Response::into_body)
8511        }
8512
8513        /// Sets the value of [name][crate::model::GetDnsBindPermissionRequest::name].
8514        ///
8515        /// This is a **required** field for requests.
8516        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8517            self.0.request.name = v.into();
8518            self
8519        }
8520    }
8521
8522    #[doc(hidden)]
8523    impl crate::RequestBuilder for GetDnsBindPermission {
8524        fn request_options(&mut self) -> &mut crate::RequestOptions {
8525            &mut self.0.options
8526        }
8527    }
8528
8529    /// The request builder for [VmwareEngine::revoke_dns_bind_permission][crate::client::VmwareEngine::revoke_dns_bind_permission] calls.
8530    ///
8531    /// # Example
8532    /// ```
8533    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::RevokeDnsBindPermission;
8534    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
8535    /// use google_cloud_lro::Poller;
8536    ///
8537    /// let builder = prepare_request_builder();
8538    /// let response = builder.poller().until_done().await?;
8539    /// # Ok(()) }
8540    ///
8541    /// fn prepare_request_builder() -> RevokeDnsBindPermission {
8542    ///   # panic!();
8543    ///   // ... details omitted ...
8544    /// }
8545    /// ```
8546    #[derive(Clone, Debug)]
8547    pub struct RevokeDnsBindPermission(
8548        RequestBuilder<crate::model::RevokeDnsBindPermissionRequest>,
8549    );
8550
8551    impl RevokeDnsBindPermission {
8552        pub(crate) fn new(
8553            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8554        ) -> Self {
8555            Self(RequestBuilder::new(stub))
8556        }
8557
8558        /// Sets the full request, replacing any prior values.
8559        pub fn with_request<V: Into<crate::model::RevokeDnsBindPermissionRequest>>(
8560            mut self,
8561            v: V,
8562        ) -> Self {
8563            self.0.request = v.into();
8564            self
8565        }
8566
8567        /// Sets all the options, replacing any prior values.
8568        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8569            self.0.options = v.into();
8570            self
8571        }
8572
8573        /// Sends the request.
8574        ///
8575        /// # Long running operations
8576        ///
8577        /// This starts, but does not poll, a longrunning operation. More information
8578        /// on [revoke_dns_bind_permission][crate::client::VmwareEngine::revoke_dns_bind_permission].
8579        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8580            (*self.0.stub)
8581                .revoke_dns_bind_permission(self.0.request, self.0.options)
8582                .await
8583                .map(crate::Response::into_body)
8584        }
8585
8586        /// Creates a [Poller][google_cloud_lro::Poller] to work with `revoke_dns_bind_permission`.
8587        pub fn poller(
8588            self,
8589        ) -> impl google_cloud_lro::Poller<
8590            crate::model::DnsBindPermission,
8591            crate::model::OperationMetadata,
8592        > {
8593            type Operation = google_cloud_lro::internal::Operation<
8594                crate::model::DnsBindPermission,
8595                crate::model::OperationMetadata,
8596            >;
8597            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8598            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8599
8600            let stub = self.0.stub.clone();
8601            let mut options = self.0.options.clone();
8602            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8603            let query = move |name| {
8604                let stub = stub.clone();
8605                let options = options.clone();
8606                async {
8607                    let op = GetOperation::new(stub)
8608                        .set_name(name)
8609                        .with_options(options)
8610                        .send()
8611                        .await?;
8612                    Ok(Operation::new(op))
8613                }
8614            };
8615
8616            let start = move || async {
8617                let op = self.send().await?;
8618                Ok(Operation::new(op))
8619            };
8620
8621            google_cloud_lro::internal::new_poller(
8622                polling_error_policy,
8623                polling_backoff_policy,
8624                start,
8625                query,
8626            )
8627        }
8628
8629        /// Sets the value of [name][crate::model::RevokeDnsBindPermissionRequest::name].
8630        ///
8631        /// This is a **required** field for requests.
8632        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8633            self.0.request.name = v.into();
8634            self
8635        }
8636
8637        /// Sets the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
8638        ///
8639        /// This is a **required** field for requests.
8640        pub fn set_principal<T>(mut self, v: T) -> Self
8641        where
8642            T: std::convert::Into<crate::model::Principal>,
8643        {
8644            self.0.request.principal = std::option::Option::Some(v.into());
8645            self
8646        }
8647
8648        /// Sets or clears the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
8649        ///
8650        /// This is a **required** field for requests.
8651        pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8652        where
8653            T: std::convert::Into<crate::model::Principal>,
8654        {
8655            self.0.request.principal = v.map(|x| x.into());
8656            self
8657        }
8658
8659        /// Sets the value of [request_id][crate::model::RevokeDnsBindPermissionRequest::request_id].
8660        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8661            self.0.request.request_id = v.into();
8662            self
8663        }
8664    }
8665
8666    #[doc(hidden)]
8667    impl crate::RequestBuilder for RevokeDnsBindPermission {
8668        fn request_options(&mut self) -> &mut crate::RequestOptions {
8669            &mut self.0.options
8670        }
8671    }
8672
8673    /// The request builder for [VmwareEngine::list_locations][crate::client::VmwareEngine::list_locations] calls.
8674    ///
8675    /// # Example
8676    /// ```
8677    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListLocations;
8678    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
8679    /// use google_cloud_gax::paginator::ItemPaginator;
8680    ///
8681    /// let builder = prepare_request_builder();
8682    /// let mut items = builder.by_item();
8683    /// while let Some(result) = items.next().await {
8684    ///   let item = result?;
8685    /// }
8686    /// # Ok(()) }
8687    ///
8688    /// fn prepare_request_builder() -> ListLocations {
8689    ///   # panic!();
8690    ///   // ... details omitted ...
8691    /// }
8692    /// ```
8693    #[derive(Clone, Debug)]
8694    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
8695
8696    impl ListLocations {
8697        pub(crate) fn new(
8698            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8699        ) -> Self {
8700            Self(RequestBuilder::new(stub))
8701        }
8702
8703        /// Sets the full request, replacing any prior values.
8704        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
8705            mut self,
8706            v: V,
8707        ) -> Self {
8708            self.0.request = v.into();
8709            self
8710        }
8711
8712        /// Sets all the options, replacing any prior values.
8713        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8714            self.0.options = v.into();
8715            self
8716        }
8717
8718        /// Sends the request.
8719        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
8720            (*self.0.stub)
8721                .list_locations(self.0.request, self.0.options)
8722                .await
8723                .map(crate::Response::into_body)
8724        }
8725
8726        /// Streams each page in the collection.
8727        pub fn by_page(
8728            self,
8729        ) -> impl google_cloud_gax::paginator::Paginator<
8730            google_cloud_location::model::ListLocationsResponse,
8731            crate::Error,
8732        > {
8733            use std::clone::Clone;
8734            let token = self.0.request.page_token.clone();
8735            let execute = move |token: String| {
8736                let mut builder = self.clone();
8737                builder.0.request = builder.0.request.set_page_token(token);
8738                builder.send()
8739            };
8740            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8741        }
8742
8743        /// Streams each item in the collection.
8744        pub fn by_item(
8745            self,
8746        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8747            google_cloud_location::model::ListLocationsResponse,
8748            crate::Error,
8749        > {
8750            use google_cloud_gax::paginator::Paginator;
8751            self.by_page().items()
8752        }
8753
8754        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
8755        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8756            self.0.request.name = v.into();
8757            self
8758        }
8759
8760        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
8761        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8762            self.0.request.filter = v.into();
8763            self
8764        }
8765
8766        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
8767        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8768            self.0.request.page_size = v.into();
8769            self
8770        }
8771
8772        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
8773        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8774            self.0.request.page_token = v.into();
8775            self
8776        }
8777    }
8778
8779    #[doc(hidden)]
8780    impl crate::RequestBuilder for ListLocations {
8781        fn request_options(&mut self) -> &mut crate::RequestOptions {
8782            &mut self.0.options
8783        }
8784    }
8785
8786    /// The request builder for [VmwareEngine::get_location][crate::client::VmwareEngine::get_location] calls.
8787    ///
8788    /// # Example
8789    /// ```
8790    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetLocation;
8791    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
8792    ///
8793    /// let builder = prepare_request_builder();
8794    /// let response = builder.send().await?;
8795    /// # Ok(()) }
8796    ///
8797    /// fn prepare_request_builder() -> GetLocation {
8798    ///   # panic!();
8799    ///   // ... details omitted ...
8800    /// }
8801    /// ```
8802    #[derive(Clone, Debug)]
8803    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8804
8805    impl GetLocation {
8806        pub(crate) fn new(
8807            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8808        ) -> Self {
8809            Self(RequestBuilder::new(stub))
8810        }
8811
8812        /// Sets the full request, replacing any prior values.
8813        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8814            mut self,
8815            v: V,
8816        ) -> Self {
8817            self.0.request = v.into();
8818            self
8819        }
8820
8821        /// Sets all the options, replacing any prior values.
8822        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8823            self.0.options = v.into();
8824            self
8825        }
8826
8827        /// Sends the request.
8828        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
8829            (*self.0.stub)
8830                .get_location(self.0.request, self.0.options)
8831                .await
8832                .map(crate::Response::into_body)
8833        }
8834
8835        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
8836        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8837            self.0.request.name = v.into();
8838            self
8839        }
8840    }
8841
8842    #[doc(hidden)]
8843    impl crate::RequestBuilder for GetLocation {
8844        fn request_options(&mut self) -> &mut crate::RequestOptions {
8845            &mut self.0.options
8846        }
8847    }
8848
8849    /// The request builder for [VmwareEngine::set_iam_policy][crate::client::VmwareEngine::set_iam_policy] calls.
8850    ///
8851    /// # Example
8852    /// ```
8853    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::SetIamPolicy;
8854    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
8855    ///
8856    /// let builder = prepare_request_builder();
8857    /// let response = builder.send().await?;
8858    /// # Ok(()) }
8859    ///
8860    /// fn prepare_request_builder() -> SetIamPolicy {
8861    ///   # panic!();
8862    ///   // ... details omitted ...
8863    /// }
8864    /// ```
8865    #[derive(Clone, Debug)]
8866    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
8867
8868    impl SetIamPolicy {
8869        pub(crate) fn new(
8870            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8871        ) -> Self {
8872            Self(RequestBuilder::new(stub))
8873        }
8874
8875        /// Sets the full request, replacing any prior values.
8876        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
8877            mut self,
8878            v: V,
8879        ) -> Self {
8880            self.0.request = v.into();
8881            self
8882        }
8883
8884        /// Sets all the options, replacing any prior values.
8885        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8886            self.0.options = v.into();
8887            self
8888        }
8889
8890        /// Sends the request.
8891        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8892            (*self.0.stub)
8893                .set_iam_policy(self.0.request, self.0.options)
8894                .await
8895                .map(crate::Response::into_body)
8896        }
8897
8898        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
8899        ///
8900        /// This is a **required** field for requests.
8901        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8902            self.0.request.resource = v.into();
8903            self
8904        }
8905
8906        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8907        ///
8908        /// This is a **required** field for requests.
8909        pub fn set_policy<T>(mut self, v: T) -> Self
8910        where
8911            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8912        {
8913            self.0.request.policy = std::option::Option::Some(v.into());
8914            self
8915        }
8916
8917        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
8918        ///
8919        /// This is a **required** field for requests.
8920        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8921        where
8922            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8923        {
8924            self.0.request.policy = v.map(|x| x.into());
8925            self
8926        }
8927
8928        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8929        pub fn set_update_mask<T>(mut self, v: T) -> Self
8930        where
8931            T: std::convert::Into<wkt::FieldMask>,
8932        {
8933            self.0.request.update_mask = std::option::Option::Some(v.into());
8934            self
8935        }
8936
8937        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
8938        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8939        where
8940            T: std::convert::Into<wkt::FieldMask>,
8941        {
8942            self.0.request.update_mask = v.map(|x| x.into());
8943            self
8944        }
8945    }
8946
8947    #[doc(hidden)]
8948    impl crate::RequestBuilder for SetIamPolicy {
8949        fn request_options(&mut self) -> &mut crate::RequestOptions {
8950            &mut self.0.options
8951        }
8952    }
8953
8954    /// The request builder for [VmwareEngine::get_iam_policy][crate::client::VmwareEngine::get_iam_policy] calls.
8955    ///
8956    /// # Example
8957    /// ```
8958    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetIamPolicy;
8959    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
8960    ///
8961    /// let builder = prepare_request_builder();
8962    /// let response = builder.send().await?;
8963    /// # Ok(()) }
8964    ///
8965    /// fn prepare_request_builder() -> GetIamPolicy {
8966    ///   # panic!();
8967    ///   // ... details omitted ...
8968    /// }
8969    /// ```
8970    #[derive(Clone, Debug)]
8971    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
8972
8973    impl GetIamPolicy {
8974        pub(crate) fn new(
8975            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8976        ) -> Self {
8977            Self(RequestBuilder::new(stub))
8978        }
8979
8980        /// Sets the full request, replacing any prior values.
8981        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
8982            mut self,
8983            v: V,
8984        ) -> Self {
8985            self.0.request = v.into();
8986            self
8987        }
8988
8989        /// Sets all the options, replacing any prior values.
8990        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8991            self.0.options = v.into();
8992            self
8993        }
8994
8995        /// Sends the request.
8996        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8997            (*self.0.stub)
8998                .get_iam_policy(self.0.request, self.0.options)
8999                .await
9000                .map(crate::Response::into_body)
9001        }
9002
9003        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
9004        ///
9005        /// This is a **required** field for requests.
9006        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9007            self.0.request.resource = v.into();
9008            self
9009        }
9010
9011        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
9012        pub fn set_options<T>(mut self, v: T) -> Self
9013        where
9014            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9015        {
9016            self.0.request.options = std::option::Option::Some(v.into());
9017            self
9018        }
9019
9020        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
9021        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
9022        where
9023            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9024        {
9025            self.0.request.options = v.map(|x| x.into());
9026            self
9027        }
9028    }
9029
9030    #[doc(hidden)]
9031    impl crate::RequestBuilder for GetIamPolicy {
9032        fn request_options(&mut self) -> &mut crate::RequestOptions {
9033            &mut self.0.options
9034        }
9035    }
9036
9037    /// The request builder for [VmwareEngine::test_iam_permissions][crate::client::VmwareEngine::test_iam_permissions] calls.
9038    ///
9039    /// # Example
9040    /// ```
9041    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::TestIamPermissions;
9042    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
9043    ///
9044    /// let builder = prepare_request_builder();
9045    /// let response = builder.send().await?;
9046    /// # Ok(()) }
9047    ///
9048    /// fn prepare_request_builder() -> TestIamPermissions {
9049    ///   # panic!();
9050    ///   // ... details omitted ...
9051    /// }
9052    /// ```
9053    #[derive(Clone, Debug)]
9054    pub struct TestIamPermissions(
9055        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
9056    );
9057
9058    impl TestIamPermissions {
9059        pub(crate) fn new(
9060            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9061        ) -> Self {
9062            Self(RequestBuilder::new(stub))
9063        }
9064
9065        /// Sets the full request, replacing any prior values.
9066        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
9067            mut self,
9068            v: V,
9069        ) -> Self {
9070            self.0.request = v.into();
9071            self
9072        }
9073
9074        /// Sets all the options, replacing any prior values.
9075        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9076            self.0.options = v.into();
9077            self
9078        }
9079
9080        /// Sends the request.
9081        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
9082            (*self.0.stub)
9083                .test_iam_permissions(self.0.request, self.0.options)
9084                .await
9085                .map(crate::Response::into_body)
9086        }
9087
9088        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
9089        ///
9090        /// This is a **required** field for requests.
9091        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9092            self.0.request.resource = v.into();
9093            self
9094        }
9095
9096        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
9097        ///
9098        /// This is a **required** field for requests.
9099        pub fn set_permissions<T, V>(mut self, v: T) -> Self
9100        where
9101            T: std::iter::IntoIterator<Item = V>,
9102            V: std::convert::Into<std::string::String>,
9103        {
9104            use std::iter::Iterator;
9105            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
9106            self
9107        }
9108    }
9109
9110    #[doc(hidden)]
9111    impl crate::RequestBuilder for TestIamPermissions {
9112        fn request_options(&mut self) -> &mut crate::RequestOptions {
9113            &mut self.0.options
9114        }
9115    }
9116
9117    /// The request builder for [VmwareEngine::list_operations][crate::client::VmwareEngine::list_operations] calls.
9118    ///
9119    /// # Example
9120    /// ```
9121    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::ListOperations;
9122    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
9123    /// use google_cloud_gax::paginator::ItemPaginator;
9124    ///
9125    /// let builder = prepare_request_builder();
9126    /// let mut items = builder.by_item();
9127    /// while let Some(result) = items.next().await {
9128    ///   let item = result?;
9129    /// }
9130    /// # Ok(()) }
9131    ///
9132    /// fn prepare_request_builder() -> ListOperations {
9133    ///   # panic!();
9134    ///   // ... details omitted ...
9135    /// }
9136    /// ```
9137    #[derive(Clone, Debug)]
9138    pub struct ListOperations(
9139        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
9140    );
9141
9142    impl ListOperations {
9143        pub(crate) fn new(
9144            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9145        ) -> Self {
9146            Self(RequestBuilder::new(stub))
9147        }
9148
9149        /// Sets the full request, replacing any prior values.
9150        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
9151            mut self,
9152            v: V,
9153        ) -> Self {
9154            self.0.request = v.into();
9155            self
9156        }
9157
9158        /// Sets all the options, replacing any prior values.
9159        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9160            self.0.options = v.into();
9161            self
9162        }
9163
9164        /// Sends the request.
9165        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
9166            (*self.0.stub)
9167                .list_operations(self.0.request, self.0.options)
9168                .await
9169                .map(crate::Response::into_body)
9170        }
9171
9172        /// Streams each page in the collection.
9173        pub fn by_page(
9174            self,
9175        ) -> impl google_cloud_gax::paginator::Paginator<
9176            google_cloud_longrunning::model::ListOperationsResponse,
9177            crate::Error,
9178        > {
9179            use std::clone::Clone;
9180            let token = self.0.request.page_token.clone();
9181            let execute = move |token: String| {
9182                let mut builder = self.clone();
9183                builder.0.request = builder.0.request.set_page_token(token);
9184                builder.send()
9185            };
9186            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9187        }
9188
9189        /// Streams each item in the collection.
9190        pub fn by_item(
9191            self,
9192        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9193            google_cloud_longrunning::model::ListOperationsResponse,
9194            crate::Error,
9195        > {
9196            use google_cloud_gax::paginator::Paginator;
9197            self.by_page().items()
9198        }
9199
9200        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
9201        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9202            self.0.request.name = v.into();
9203            self
9204        }
9205
9206        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
9207        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9208            self.0.request.filter = v.into();
9209            self
9210        }
9211
9212        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
9213        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9214            self.0.request.page_size = v.into();
9215            self
9216        }
9217
9218        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
9219        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9220            self.0.request.page_token = v.into();
9221            self
9222        }
9223
9224        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
9225        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
9226            self.0.request.return_partial_success = v.into();
9227            self
9228        }
9229    }
9230
9231    #[doc(hidden)]
9232    impl crate::RequestBuilder for ListOperations {
9233        fn request_options(&mut self) -> &mut crate::RequestOptions {
9234            &mut self.0.options
9235        }
9236    }
9237
9238    /// The request builder for [VmwareEngine::get_operation][crate::client::VmwareEngine::get_operation] calls.
9239    ///
9240    /// # Example
9241    /// ```
9242    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::GetOperation;
9243    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
9244    ///
9245    /// let builder = prepare_request_builder();
9246    /// let response = builder.send().await?;
9247    /// # Ok(()) }
9248    ///
9249    /// fn prepare_request_builder() -> GetOperation {
9250    ///   # panic!();
9251    ///   // ... details omitted ...
9252    /// }
9253    /// ```
9254    #[derive(Clone, Debug)]
9255    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
9256
9257    impl GetOperation {
9258        pub(crate) fn new(
9259            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9260        ) -> Self {
9261            Self(RequestBuilder::new(stub))
9262        }
9263
9264        /// Sets the full request, replacing any prior values.
9265        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
9266            mut self,
9267            v: V,
9268        ) -> Self {
9269            self.0.request = v.into();
9270            self
9271        }
9272
9273        /// Sets all the options, replacing any prior values.
9274        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9275            self.0.options = v.into();
9276            self
9277        }
9278
9279        /// Sends the request.
9280        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9281            (*self.0.stub)
9282                .get_operation(self.0.request, self.0.options)
9283                .await
9284                .map(crate::Response::into_body)
9285        }
9286
9287        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
9288        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9289            self.0.request.name = v.into();
9290            self
9291        }
9292    }
9293
9294    #[doc(hidden)]
9295    impl crate::RequestBuilder for GetOperation {
9296        fn request_options(&mut self) -> &mut crate::RequestOptions {
9297            &mut self.0.options
9298        }
9299    }
9300
9301    /// The request builder for [VmwareEngine::delete_operation][crate::client::VmwareEngine::delete_operation] calls.
9302    ///
9303    /// # Example
9304    /// ```
9305    /// # use google_cloud_vmwareengine_v1::builder::vmware_engine::DeleteOperation;
9306    /// # async fn sample() -> google_cloud_vmwareengine_v1::Result<()> {
9307    ///
9308    /// let builder = prepare_request_builder();
9309    /// let response = builder.send().await?;
9310    /// # Ok(()) }
9311    ///
9312    /// fn prepare_request_builder() -> DeleteOperation {
9313    ///   # panic!();
9314    ///   // ... details omitted ...
9315    /// }
9316    /// ```
9317    #[derive(Clone, Debug)]
9318    pub struct DeleteOperation(
9319        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
9320    );
9321
9322    impl DeleteOperation {
9323        pub(crate) fn new(
9324            stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9325        ) -> Self {
9326            Self(RequestBuilder::new(stub))
9327        }
9328
9329        /// Sets the full request, replacing any prior values.
9330        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
9331            mut self,
9332            v: V,
9333        ) -> Self {
9334            self.0.request = v.into();
9335            self
9336        }
9337
9338        /// Sets all the options, replacing any prior values.
9339        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9340            self.0.options = v.into();
9341            self
9342        }
9343
9344        /// Sends the request.
9345        pub async fn send(self) -> Result<()> {
9346            (*self.0.stub)
9347                .delete_operation(self.0.request, self.0.options)
9348                .await
9349                .map(crate::Response::into_body)
9350        }
9351
9352        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
9353        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9354            self.0.request.name = v.into();
9355            self
9356        }
9357    }
9358
9359    #[doc(hidden)]
9360    impl crate::RequestBuilder for DeleteOperation {
9361        fn request_options(&mut self) -> &mut crate::RequestOptions {
9362            &mut self.0.options
9363        }
9364    }
9365}