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