google_cloud_vmwareengine_v1/
builder.rs

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