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    use std::sync::Arc;
20
21    /// A builder for [VmwareEngine][super::super::client::VmwareEngine].
22    ///
23    /// ```
24    /// # tokio_test::block_on(async {
25    /// # use google_cloud_vmwareengine_v1::*;
26    /// # use builder::vmware_engine::ClientBuilder;
27    /// # use client::VmwareEngine;
28    /// let builder : ClientBuilder = VmwareEngine::builder();
29    /// let client = builder
30    ///     .with_endpoint("https://vmwareengine.googleapis.com")
31    ///     .build().await?;
32    /// # gax::Result::<()>::Ok(()) });
33    /// ```
34    pub type ClientBuilder =
35        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
36
37    pub(crate) mod client {
38        use super::super::super::client::VmwareEngine;
39        pub struct Factory;
40        impl gax::client_builder::internal::ClientFactory for Factory {
41            type Client = VmwareEngine;
42            type Credentials = gaxi::options::Credentials;
43            async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
44                Self::Client::new(config).await
45            }
46        }
47    }
48
49    /// Common implementation for [super::super::client::VmwareEngine] request builders.
50    #[derive(Clone, Debug)]
51    pub(crate) struct RequestBuilder<R: std::default::Default> {
52        stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>,
53        request: R,
54        options: gax::options::RequestOptions,
55    }
56
57    impl<R> RequestBuilder<R>
58    where
59        R: std::default::Default,
60    {
61        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
62            Self {
63                stub,
64                request: R::default(),
65                options: gax::options::RequestOptions::default(),
66            }
67        }
68    }
69
70    /// The request builder for [VmwareEngine::list_private_clouds][super::super::client::VmwareEngine::list_private_clouds] calls.
71    #[derive(Clone, Debug)]
72    pub struct ListPrivateClouds(RequestBuilder<crate::model::ListPrivateCloudsRequest>);
73
74    impl ListPrivateClouds {
75        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
76            Self(RequestBuilder::new(stub))
77        }
78
79        /// Sets the full request, replacing any prior values.
80        pub fn with_request<V: Into<crate::model::ListPrivateCloudsRequest>>(
81            mut self,
82            v: V,
83        ) -> Self {
84            self.0.request = v.into();
85            self
86        }
87
88        /// Sets all the options, replacing any prior values.
89        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
90            self.0.options = v.into();
91            self
92        }
93
94        /// Sends the request.
95        pub async fn send(self) -> Result<crate::model::ListPrivateCloudsResponse> {
96            (*self.0.stub)
97                .list_private_clouds(self.0.request, self.0.options)
98                .await
99                .map(gax::response::Response::into_body)
100        }
101
102        /// Streams the responses back.
103        pub async fn paginator(
104            self,
105        ) -> impl gax::paginator::Paginator<crate::model::ListPrivateCloudsResponse, gax::error::Error>
106        {
107            use std::clone::Clone;
108            let token = self.0.request.page_token.clone();
109            let execute = move |token: String| {
110                let mut builder = self.clone();
111                builder.0.request = builder.0.request.set_page_token(token);
112                builder.send()
113            };
114            gax::paginator::internal::new_paginator(token, execute)
115        }
116
117        /// Sets the value of [parent][crate::model::ListPrivateCloudsRequest::parent].
118        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
119            self.0.request.parent = v.into();
120            self
121        }
122
123        /// Sets the value of [page_size][crate::model::ListPrivateCloudsRequest::page_size].
124        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
125            self.0.request.page_size = v.into();
126            self
127        }
128
129        /// Sets the value of [page_token][crate::model::ListPrivateCloudsRequest::page_token].
130        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
131            self.0.request.page_token = v.into();
132            self
133        }
134
135        /// Sets the value of [filter][crate::model::ListPrivateCloudsRequest::filter].
136        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
137            self.0.request.filter = v.into();
138            self
139        }
140
141        /// Sets the value of [order_by][crate::model::ListPrivateCloudsRequest::order_by].
142        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
143            self.0.request.order_by = v.into();
144            self
145        }
146    }
147
148    #[doc(hidden)]
149    impl gax::options::internal::RequestBuilder for ListPrivateClouds {
150        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
151            &mut self.0.options
152        }
153    }
154
155    /// The request builder for [VmwareEngine::get_private_cloud][super::super::client::VmwareEngine::get_private_cloud] calls.
156    #[derive(Clone, Debug)]
157    pub struct GetPrivateCloud(RequestBuilder<crate::model::GetPrivateCloudRequest>);
158
159    impl GetPrivateCloud {
160        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
161            Self(RequestBuilder::new(stub))
162        }
163
164        /// Sets the full request, replacing any prior values.
165        pub fn with_request<V: Into<crate::model::GetPrivateCloudRequest>>(mut self, v: V) -> Self {
166            self.0.request = v.into();
167            self
168        }
169
170        /// Sets all the options, replacing any prior values.
171        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
172            self.0.options = v.into();
173            self
174        }
175
176        /// Sends the request.
177        pub async fn send(self) -> Result<crate::model::PrivateCloud> {
178            (*self.0.stub)
179                .get_private_cloud(self.0.request, self.0.options)
180                .await
181                .map(gax::response::Response::into_body)
182        }
183
184        /// Sets the value of [name][crate::model::GetPrivateCloudRequest::name].
185        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
186            self.0.request.name = v.into();
187            self
188        }
189    }
190
191    #[doc(hidden)]
192    impl gax::options::internal::RequestBuilder for GetPrivateCloud {
193        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
194            &mut self.0.options
195        }
196    }
197
198    /// The request builder for [VmwareEngine::create_private_cloud][super::super::client::VmwareEngine::create_private_cloud] calls.
199    #[derive(Clone, Debug)]
200    pub struct CreatePrivateCloud(RequestBuilder<crate::model::CreatePrivateCloudRequest>);
201
202    impl CreatePrivateCloud {
203        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
204            Self(RequestBuilder::new(stub))
205        }
206
207        /// Sets the full request, replacing any prior values.
208        pub fn with_request<V: Into<crate::model::CreatePrivateCloudRequest>>(
209            mut self,
210            v: V,
211        ) -> Self {
212            self.0.request = v.into();
213            self
214        }
215
216        /// Sets all the options, replacing any prior values.
217        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
218            self.0.options = v.into();
219            self
220        }
221
222        /// Sends the request.
223        ///
224        /// # Long running operations
225        ///
226        /// This starts, but does not poll, a longrunning operation. More information
227        /// on [create_private_cloud][super::super::client::VmwareEngine::create_private_cloud].
228        pub async fn send(self) -> Result<longrunning::model::Operation> {
229            (*self.0.stub)
230                .create_private_cloud(self.0.request, self.0.options)
231                .await
232                .map(gax::response::Response::into_body)
233        }
234
235        /// Creates a [Poller][lro::Poller] to work with `create_private_cloud`.
236        pub fn poller(
237            self,
238        ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
239            type Operation =
240                lro::Operation<crate::model::PrivateCloud, crate::model::OperationMetadata>;
241            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
242            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
243
244            let stub = self.0.stub.clone();
245            let mut options = self.0.options.clone();
246            options.set_retry_policy(gax::retry_policy::NeverRetry);
247            let query = move |name| {
248                let stub = stub.clone();
249                let options = options.clone();
250                async {
251                    let op = GetOperation::new(stub)
252                        .set_name(name)
253                        .with_options(options)
254                        .send()
255                        .await?;
256                    Ok(Operation::new(op))
257                }
258            };
259
260            let start = move || async {
261                let op = self.send().await?;
262                Ok(Operation::new(op))
263            };
264
265            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
266        }
267
268        /// Sets the value of [parent][crate::model::CreatePrivateCloudRequest::parent].
269        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
270            self.0.request.parent = v.into();
271            self
272        }
273
274        /// Sets the value of [private_cloud_id][crate::model::CreatePrivateCloudRequest::private_cloud_id].
275        pub fn set_private_cloud_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
276            self.0.request.private_cloud_id = v.into();
277            self
278        }
279
280        /// Sets the value of [private_cloud][crate::model::CreatePrivateCloudRequest::private_cloud].
281        pub fn set_private_cloud<T: Into<std::option::Option<crate::model::PrivateCloud>>>(
282            mut self,
283            v: T,
284        ) -> Self {
285            self.0.request.private_cloud = v.into();
286            self
287        }
288
289        /// Sets the value of [request_id][crate::model::CreatePrivateCloudRequest::request_id].
290        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
291            self.0.request.request_id = v.into();
292            self
293        }
294
295        /// Sets the value of [validate_only][crate::model::CreatePrivateCloudRequest::validate_only].
296        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
297            self.0.request.validate_only = v.into();
298            self
299        }
300    }
301
302    #[doc(hidden)]
303    impl gax::options::internal::RequestBuilder for CreatePrivateCloud {
304        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
305            &mut self.0.options
306        }
307    }
308
309    /// The request builder for [VmwareEngine::update_private_cloud][super::super::client::VmwareEngine::update_private_cloud] calls.
310    #[derive(Clone, Debug)]
311    pub struct UpdatePrivateCloud(RequestBuilder<crate::model::UpdatePrivateCloudRequest>);
312
313    impl UpdatePrivateCloud {
314        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
315            Self(RequestBuilder::new(stub))
316        }
317
318        /// Sets the full request, replacing any prior values.
319        pub fn with_request<V: Into<crate::model::UpdatePrivateCloudRequest>>(
320            mut self,
321            v: V,
322        ) -> Self {
323            self.0.request = v.into();
324            self
325        }
326
327        /// Sets all the options, replacing any prior values.
328        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
329            self.0.options = v.into();
330            self
331        }
332
333        /// Sends the request.
334        ///
335        /// # Long running operations
336        ///
337        /// This starts, but does not poll, a longrunning operation. More information
338        /// on [update_private_cloud][super::super::client::VmwareEngine::update_private_cloud].
339        pub async fn send(self) -> Result<longrunning::model::Operation> {
340            (*self.0.stub)
341                .update_private_cloud(self.0.request, self.0.options)
342                .await
343                .map(gax::response::Response::into_body)
344        }
345
346        /// Creates a [Poller][lro::Poller] to work with `update_private_cloud`.
347        pub fn poller(
348            self,
349        ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
350            type Operation =
351                lro::Operation<crate::model::PrivateCloud, crate::model::OperationMetadata>;
352            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
353            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
354
355            let stub = self.0.stub.clone();
356            let mut options = self.0.options.clone();
357            options.set_retry_policy(gax::retry_policy::NeverRetry);
358            let query = move |name| {
359                let stub = stub.clone();
360                let options = options.clone();
361                async {
362                    let op = GetOperation::new(stub)
363                        .set_name(name)
364                        .with_options(options)
365                        .send()
366                        .await?;
367                    Ok(Operation::new(op))
368                }
369            };
370
371            let start = move || async {
372                let op = self.send().await?;
373                Ok(Operation::new(op))
374            };
375
376            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
377        }
378
379        /// Sets the value of [private_cloud][crate::model::UpdatePrivateCloudRequest::private_cloud].
380        pub fn set_private_cloud<T: Into<std::option::Option<crate::model::PrivateCloud>>>(
381            mut self,
382            v: T,
383        ) -> Self {
384            self.0.request.private_cloud = v.into();
385            self
386        }
387
388        /// Sets the value of [update_mask][crate::model::UpdatePrivateCloudRequest::update_mask].
389        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
390            mut self,
391            v: T,
392        ) -> Self {
393            self.0.request.update_mask = v.into();
394            self
395        }
396
397        /// Sets the value of [request_id][crate::model::UpdatePrivateCloudRequest::request_id].
398        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
399            self.0.request.request_id = v.into();
400            self
401        }
402    }
403
404    #[doc(hidden)]
405    impl gax::options::internal::RequestBuilder for UpdatePrivateCloud {
406        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
407            &mut self.0.options
408        }
409    }
410
411    /// The request builder for [VmwareEngine::delete_private_cloud][super::super::client::VmwareEngine::delete_private_cloud] calls.
412    #[derive(Clone, Debug)]
413    pub struct DeletePrivateCloud(RequestBuilder<crate::model::DeletePrivateCloudRequest>);
414
415    impl DeletePrivateCloud {
416        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
417            Self(RequestBuilder::new(stub))
418        }
419
420        /// Sets the full request, replacing any prior values.
421        pub fn with_request<V: Into<crate::model::DeletePrivateCloudRequest>>(
422            mut self,
423            v: V,
424        ) -> Self {
425            self.0.request = v.into();
426            self
427        }
428
429        /// Sets all the options, replacing any prior values.
430        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
431            self.0.options = v.into();
432            self
433        }
434
435        /// Sends the request.
436        ///
437        /// # Long running operations
438        ///
439        /// This starts, but does not poll, a longrunning operation. More information
440        /// on [delete_private_cloud][super::super::client::VmwareEngine::delete_private_cloud].
441        pub async fn send(self) -> Result<longrunning::model::Operation> {
442            (*self.0.stub)
443                .delete_private_cloud(self.0.request, self.0.options)
444                .await
445                .map(gax::response::Response::into_body)
446        }
447
448        /// Creates a [Poller][lro::Poller] to work with `delete_private_cloud`.
449        pub fn poller(
450            self,
451        ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
452            type Operation =
453                lro::Operation<crate::model::PrivateCloud, crate::model::OperationMetadata>;
454            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
455            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
456
457            let stub = self.0.stub.clone();
458            let mut options = self.0.options.clone();
459            options.set_retry_policy(gax::retry_policy::NeverRetry);
460            let query = move |name| {
461                let stub = stub.clone();
462                let options = options.clone();
463                async {
464                    let op = GetOperation::new(stub)
465                        .set_name(name)
466                        .with_options(options)
467                        .send()
468                        .await?;
469                    Ok(Operation::new(op))
470                }
471            };
472
473            let start = move || async {
474                let op = self.send().await?;
475                Ok(Operation::new(op))
476            };
477
478            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
479        }
480
481        /// Sets the value of [name][crate::model::DeletePrivateCloudRequest::name].
482        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
483            self.0.request.name = v.into();
484            self
485        }
486
487        /// Sets the value of [request_id][crate::model::DeletePrivateCloudRequest::request_id].
488        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
489            self.0.request.request_id = v.into();
490            self
491        }
492
493        /// Sets the value of [force][crate::model::DeletePrivateCloudRequest::force].
494        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
495            self.0.request.force = v.into();
496            self
497        }
498
499        /// Sets the value of [delay_hours][crate::model::DeletePrivateCloudRequest::delay_hours].
500        pub fn set_delay_hours<T: Into<std::option::Option<i32>>>(mut self, v: T) -> Self {
501            self.0.request.delay_hours = v.into();
502            self
503        }
504    }
505
506    #[doc(hidden)]
507    impl gax::options::internal::RequestBuilder for DeletePrivateCloud {
508        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
509            &mut self.0.options
510        }
511    }
512
513    /// The request builder for [VmwareEngine::undelete_private_cloud][super::super::client::VmwareEngine::undelete_private_cloud] calls.
514    #[derive(Clone, Debug)]
515    pub struct UndeletePrivateCloud(RequestBuilder<crate::model::UndeletePrivateCloudRequest>);
516
517    impl UndeletePrivateCloud {
518        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
519            Self(RequestBuilder::new(stub))
520        }
521
522        /// Sets the full request, replacing any prior values.
523        pub fn with_request<V: Into<crate::model::UndeletePrivateCloudRequest>>(
524            mut self,
525            v: V,
526        ) -> Self {
527            self.0.request = v.into();
528            self
529        }
530
531        /// Sets all the options, replacing any prior values.
532        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
533            self.0.options = v.into();
534            self
535        }
536
537        /// Sends the request.
538        ///
539        /// # Long running operations
540        ///
541        /// This starts, but does not poll, a longrunning operation. More information
542        /// on [undelete_private_cloud][super::super::client::VmwareEngine::undelete_private_cloud].
543        pub async fn send(self) -> Result<longrunning::model::Operation> {
544            (*self.0.stub)
545                .undelete_private_cloud(self.0.request, self.0.options)
546                .await
547                .map(gax::response::Response::into_body)
548        }
549
550        /// Creates a [Poller][lro::Poller] to work with `undelete_private_cloud`.
551        pub fn poller(
552            self,
553        ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
554            type Operation =
555                lro::Operation<crate::model::PrivateCloud, crate::model::OperationMetadata>;
556            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
557            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
558
559            let stub = self.0.stub.clone();
560            let mut options = self.0.options.clone();
561            options.set_retry_policy(gax::retry_policy::NeverRetry);
562            let query = move |name| {
563                let stub = stub.clone();
564                let options = options.clone();
565                async {
566                    let op = GetOperation::new(stub)
567                        .set_name(name)
568                        .with_options(options)
569                        .send()
570                        .await?;
571                    Ok(Operation::new(op))
572                }
573            };
574
575            let start = move || async {
576                let op = self.send().await?;
577                Ok(Operation::new(op))
578            };
579
580            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
581        }
582
583        /// Sets the value of [name][crate::model::UndeletePrivateCloudRequest::name].
584        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
585            self.0.request.name = v.into();
586            self
587        }
588
589        /// Sets the value of [request_id][crate::model::UndeletePrivateCloudRequest::request_id].
590        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
591            self.0.request.request_id = v.into();
592            self
593        }
594    }
595
596    #[doc(hidden)]
597    impl gax::options::internal::RequestBuilder for UndeletePrivateCloud {
598        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
599            &mut self.0.options
600        }
601    }
602
603    /// The request builder for [VmwareEngine::list_clusters][super::super::client::VmwareEngine::list_clusters] calls.
604    #[derive(Clone, Debug)]
605    pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
606
607    impl ListClusters {
608        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
609            Self(RequestBuilder::new(stub))
610        }
611
612        /// Sets the full request, replacing any prior values.
613        pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
614            self.0.request = v.into();
615            self
616        }
617
618        /// Sets all the options, replacing any prior values.
619        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
620            self.0.options = v.into();
621            self
622        }
623
624        /// Sends the request.
625        pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
626            (*self.0.stub)
627                .list_clusters(self.0.request, self.0.options)
628                .await
629                .map(gax::response::Response::into_body)
630        }
631
632        /// Streams the responses back.
633        pub async fn paginator(
634            self,
635        ) -> impl gax::paginator::Paginator<crate::model::ListClustersResponse, gax::error::Error>
636        {
637            use std::clone::Clone;
638            let token = self.0.request.page_token.clone();
639            let execute = move |token: String| {
640                let mut builder = self.clone();
641                builder.0.request = builder.0.request.set_page_token(token);
642                builder.send()
643            };
644            gax::paginator::internal::new_paginator(token, execute)
645        }
646
647        /// Sets the value of [parent][crate::model::ListClustersRequest::parent].
648        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
649            self.0.request.parent = v.into();
650            self
651        }
652
653        /// Sets the value of [page_size][crate::model::ListClustersRequest::page_size].
654        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
655            self.0.request.page_size = v.into();
656            self
657        }
658
659        /// Sets the value of [page_token][crate::model::ListClustersRequest::page_token].
660        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
661            self.0.request.page_token = v.into();
662            self
663        }
664
665        /// Sets the value of [filter][crate::model::ListClustersRequest::filter].
666        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
667            self.0.request.filter = v.into();
668            self
669        }
670
671        /// Sets the value of [order_by][crate::model::ListClustersRequest::order_by].
672        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
673            self.0.request.order_by = v.into();
674            self
675        }
676    }
677
678    #[doc(hidden)]
679    impl gax::options::internal::RequestBuilder for ListClusters {
680        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
681            &mut self.0.options
682        }
683    }
684
685    /// The request builder for [VmwareEngine::get_cluster][super::super::client::VmwareEngine::get_cluster] calls.
686    #[derive(Clone, Debug)]
687    pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
688
689    impl GetCluster {
690        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
691            Self(RequestBuilder::new(stub))
692        }
693
694        /// Sets the full request, replacing any prior values.
695        pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
696            self.0.request = v.into();
697            self
698        }
699
700        /// Sets all the options, replacing any prior values.
701        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
702            self.0.options = v.into();
703            self
704        }
705
706        /// Sends the request.
707        pub async fn send(self) -> Result<crate::model::Cluster> {
708            (*self.0.stub)
709                .get_cluster(self.0.request, self.0.options)
710                .await
711                .map(gax::response::Response::into_body)
712        }
713
714        /// Sets the value of [name][crate::model::GetClusterRequest::name].
715        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
716            self.0.request.name = v.into();
717            self
718        }
719    }
720
721    #[doc(hidden)]
722    impl gax::options::internal::RequestBuilder for GetCluster {
723        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
724            &mut self.0.options
725        }
726    }
727
728    /// The request builder for [VmwareEngine::create_cluster][super::super::client::VmwareEngine::create_cluster] calls.
729    #[derive(Clone, Debug)]
730    pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
731
732    impl CreateCluster {
733        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
734            Self(RequestBuilder::new(stub))
735        }
736
737        /// Sets the full request, replacing any prior values.
738        pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
739            self.0.request = v.into();
740            self
741        }
742
743        /// Sets all the options, replacing any prior values.
744        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
745            self.0.options = v.into();
746            self
747        }
748
749        /// Sends the request.
750        ///
751        /// # Long running operations
752        ///
753        /// This starts, but does not poll, a longrunning operation. More information
754        /// on [create_cluster][super::super::client::VmwareEngine::create_cluster].
755        pub async fn send(self) -> Result<longrunning::model::Operation> {
756            (*self.0.stub)
757                .create_cluster(self.0.request, self.0.options)
758                .await
759                .map(gax::response::Response::into_body)
760        }
761
762        /// Creates a [Poller][lro::Poller] to work with `create_cluster`.
763        pub fn poller(
764            self,
765        ) -> impl lro::Poller<crate::model::Cluster, crate::model::OperationMetadata> {
766            type Operation = lro::Operation<crate::model::Cluster, crate::model::OperationMetadata>;
767            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
768            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
769
770            let stub = self.0.stub.clone();
771            let mut options = self.0.options.clone();
772            options.set_retry_policy(gax::retry_policy::NeverRetry);
773            let query = move |name| {
774                let stub = stub.clone();
775                let options = options.clone();
776                async {
777                    let op = GetOperation::new(stub)
778                        .set_name(name)
779                        .with_options(options)
780                        .send()
781                        .await?;
782                    Ok(Operation::new(op))
783                }
784            };
785
786            let start = move || async {
787                let op = self.send().await?;
788                Ok(Operation::new(op))
789            };
790
791            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
792        }
793
794        /// Sets the value of [parent][crate::model::CreateClusterRequest::parent].
795        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
796            self.0.request.parent = v.into();
797            self
798        }
799
800        /// Sets the value of [cluster_id][crate::model::CreateClusterRequest::cluster_id].
801        pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
802            self.0.request.cluster_id = v.into();
803            self
804        }
805
806        /// Sets the value of [cluster][crate::model::CreateClusterRequest::cluster].
807        pub fn set_cluster<T: Into<std::option::Option<crate::model::Cluster>>>(
808            mut self,
809            v: T,
810        ) -> Self {
811            self.0.request.cluster = v.into();
812            self
813        }
814
815        /// Sets the value of [request_id][crate::model::CreateClusterRequest::request_id].
816        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
817            self.0.request.request_id = v.into();
818            self
819        }
820
821        /// Sets the value of [validate_only][crate::model::CreateClusterRequest::validate_only].
822        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
823            self.0.request.validate_only = v.into();
824            self
825        }
826    }
827
828    #[doc(hidden)]
829    impl gax::options::internal::RequestBuilder for CreateCluster {
830        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
831            &mut self.0.options
832        }
833    }
834
835    /// The request builder for [VmwareEngine::update_cluster][super::super::client::VmwareEngine::update_cluster] calls.
836    #[derive(Clone, Debug)]
837    pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
838
839    impl UpdateCluster {
840        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
841            Self(RequestBuilder::new(stub))
842        }
843
844        /// Sets the full request, replacing any prior values.
845        pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
846            self.0.request = v.into();
847            self
848        }
849
850        /// Sets all the options, replacing any prior values.
851        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
852            self.0.options = v.into();
853            self
854        }
855
856        /// Sends the request.
857        ///
858        /// # Long running operations
859        ///
860        /// This starts, but does not poll, a longrunning operation. More information
861        /// on [update_cluster][super::super::client::VmwareEngine::update_cluster].
862        pub async fn send(self) -> Result<longrunning::model::Operation> {
863            (*self.0.stub)
864                .update_cluster(self.0.request, self.0.options)
865                .await
866                .map(gax::response::Response::into_body)
867        }
868
869        /// Creates a [Poller][lro::Poller] to work with `update_cluster`.
870        pub fn poller(
871            self,
872        ) -> impl lro::Poller<crate::model::Cluster, crate::model::OperationMetadata> {
873            type Operation = lro::Operation<crate::model::Cluster, crate::model::OperationMetadata>;
874            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
875            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
876
877            let stub = self.0.stub.clone();
878            let mut options = self.0.options.clone();
879            options.set_retry_policy(gax::retry_policy::NeverRetry);
880            let query = move |name| {
881                let stub = stub.clone();
882                let options = options.clone();
883                async {
884                    let op = GetOperation::new(stub)
885                        .set_name(name)
886                        .with_options(options)
887                        .send()
888                        .await?;
889                    Ok(Operation::new(op))
890                }
891            };
892
893            let start = move || async {
894                let op = self.send().await?;
895                Ok(Operation::new(op))
896            };
897
898            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
899        }
900
901        /// Sets the value of [update_mask][crate::model::UpdateClusterRequest::update_mask].
902        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
903            mut self,
904            v: T,
905        ) -> Self {
906            self.0.request.update_mask = v.into();
907            self
908        }
909
910        /// Sets the value of [cluster][crate::model::UpdateClusterRequest::cluster].
911        pub fn set_cluster<T: Into<std::option::Option<crate::model::Cluster>>>(
912            mut self,
913            v: T,
914        ) -> Self {
915            self.0.request.cluster = v.into();
916            self
917        }
918
919        /// Sets the value of [request_id][crate::model::UpdateClusterRequest::request_id].
920        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
921            self.0.request.request_id = v.into();
922            self
923        }
924
925        /// Sets the value of [validate_only][crate::model::UpdateClusterRequest::validate_only].
926        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
927            self.0.request.validate_only = v.into();
928            self
929        }
930    }
931
932    #[doc(hidden)]
933    impl gax::options::internal::RequestBuilder for UpdateCluster {
934        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
935            &mut self.0.options
936        }
937    }
938
939    /// The request builder for [VmwareEngine::delete_cluster][super::super::client::VmwareEngine::delete_cluster] calls.
940    #[derive(Clone, Debug)]
941    pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
942
943    impl DeleteCluster {
944        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
945            Self(RequestBuilder::new(stub))
946        }
947
948        /// Sets the full request, replacing any prior values.
949        pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
950            self.0.request = v.into();
951            self
952        }
953
954        /// Sets all the options, replacing any prior values.
955        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
956            self.0.options = v.into();
957            self
958        }
959
960        /// Sends the request.
961        ///
962        /// # Long running operations
963        ///
964        /// This starts, but does not poll, a longrunning operation. More information
965        /// on [delete_cluster][super::super::client::VmwareEngine::delete_cluster].
966        pub async fn send(self) -> Result<longrunning::model::Operation> {
967            (*self.0.stub)
968                .delete_cluster(self.0.request, self.0.options)
969                .await
970                .map(gax::response::Response::into_body)
971        }
972
973        /// Creates a [Poller][lro::Poller] to work with `delete_cluster`.
974        pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
975            type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
976            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
977            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
978
979            let stub = self.0.stub.clone();
980            let mut options = self.0.options.clone();
981            options.set_retry_policy(gax::retry_policy::NeverRetry);
982            let query = move |name| {
983                let stub = stub.clone();
984                let options = options.clone();
985                async {
986                    let op = GetOperation::new(stub)
987                        .set_name(name)
988                        .with_options(options)
989                        .send()
990                        .await?;
991                    Ok(Operation::new(op))
992                }
993            };
994
995            let start = move || async {
996                let op = self.send().await?;
997                Ok(Operation::new(op))
998            };
999
1000            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1001        }
1002
1003        /// Sets the value of [name][crate::model::DeleteClusterRequest::name].
1004        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1005            self.0.request.name = v.into();
1006            self
1007        }
1008
1009        /// Sets the value of [request_id][crate::model::DeleteClusterRequest::request_id].
1010        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1011            self.0.request.request_id = v.into();
1012            self
1013        }
1014    }
1015
1016    #[doc(hidden)]
1017    impl gax::options::internal::RequestBuilder for DeleteCluster {
1018        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1019            &mut self.0.options
1020        }
1021    }
1022
1023    /// The request builder for [VmwareEngine::list_nodes][super::super::client::VmwareEngine::list_nodes] calls.
1024    #[derive(Clone, Debug)]
1025    pub struct ListNodes(RequestBuilder<crate::model::ListNodesRequest>);
1026
1027    impl ListNodes {
1028        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1029            Self(RequestBuilder::new(stub))
1030        }
1031
1032        /// Sets the full request, replacing any prior values.
1033        pub fn with_request<V: Into<crate::model::ListNodesRequest>>(mut self, v: V) -> Self {
1034            self.0.request = v.into();
1035            self
1036        }
1037
1038        /// Sets all the options, replacing any prior values.
1039        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1040            self.0.options = v.into();
1041            self
1042        }
1043
1044        /// Sends the request.
1045        pub async fn send(self) -> Result<crate::model::ListNodesResponse> {
1046            (*self.0.stub)
1047                .list_nodes(self.0.request, self.0.options)
1048                .await
1049                .map(gax::response::Response::into_body)
1050        }
1051
1052        /// Streams the responses back.
1053        pub async fn paginator(
1054            self,
1055        ) -> impl gax::paginator::Paginator<crate::model::ListNodesResponse, gax::error::Error>
1056        {
1057            use std::clone::Clone;
1058            let token = self.0.request.page_token.clone();
1059            let execute = move |token: String| {
1060                let mut builder = self.clone();
1061                builder.0.request = builder.0.request.set_page_token(token);
1062                builder.send()
1063            };
1064            gax::paginator::internal::new_paginator(token, execute)
1065        }
1066
1067        /// Sets the value of [parent][crate::model::ListNodesRequest::parent].
1068        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1069            self.0.request.parent = v.into();
1070            self
1071        }
1072
1073        /// Sets the value of [page_size][crate::model::ListNodesRequest::page_size].
1074        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1075            self.0.request.page_size = v.into();
1076            self
1077        }
1078
1079        /// Sets the value of [page_token][crate::model::ListNodesRequest::page_token].
1080        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1081            self.0.request.page_token = v.into();
1082            self
1083        }
1084    }
1085
1086    #[doc(hidden)]
1087    impl gax::options::internal::RequestBuilder for ListNodes {
1088        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1089            &mut self.0.options
1090        }
1091    }
1092
1093    /// The request builder for [VmwareEngine::get_node][super::super::client::VmwareEngine::get_node] calls.
1094    #[derive(Clone, Debug)]
1095    pub struct GetNode(RequestBuilder<crate::model::GetNodeRequest>);
1096
1097    impl GetNode {
1098        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1099            Self(RequestBuilder::new(stub))
1100        }
1101
1102        /// Sets the full request, replacing any prior values.
1103        pub fn with_request<V: Into<crate::model::GetNodeRequest>>(mut self, v: V) -> Self {
1104            self.0.request = v.into();
1105            self
1106        }
1107
1108        /// Sets all the options, replacing any prior values.
1109        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1110            self.0.options = v.into();
1111            self
1112        }
1113
1114        /// Sends the request.
1115        pub async fn send(self) -> Result<crate::model::Node> {
1116            (*self.0.stub)
1117                .get_node(self.0.request, self.0.options)
1118                .await
1119                .map(gax::response::Response::into_body)
1120        }
1121
1122        /// Sets the value of [name][crate::model::GetNodeRequest::name].
1123        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1124            self.0.request.name = v.into();
1125            self
1126        }
1127    }
1128
1129    #[doc(hidden)]
1130    impl gax::options::internal::RequestBuilder for GetNode {
1131        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1132            &mut self.0.options
1133        }
1134    }
1135
1136    /// The request builder for [VmwareEngine::list_external_addresses][super::super::client::VmwareEngine::list_external_addresses] calls.
1137    #[derive(Clone, Debug)]
1138    pub struct ListExternalAddresses(RequestBuilder<crate::model::ListExternalAddressesRequest>);
1139
1140    impl ListExternalAddresses {
1141        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1142            Self(RequestBuilder::new(stub))
1143        }
1144
1145        /// Sets the full request, replacing any prior values.
1146        pub fn with_request<V: Into<crate::model::ListExternalAddressesRequest>>(
1147            mut self,
1148            v: V,
1149        ) -> Self {
1150            self.0.request = v.into();
1151            self
1152        }
1153
1154        /// Sets all the options, replacing any prior values.
1155        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1156            self.0.options = v.into();
1157            self
1158        }
1159
1160        /// Sends the request.
1161        pub async fn send(self) -> Result<crate::model::ListExternalAddressesResponse> {
1162            (*self.0.stub)
1163                .list_external_addresses(self.0.request, self.0.options)
1164                .await
1165                .map(gax::response::Response::into_body)
1166        }
1167
1168        /// Streams the responses back.
1169        pub async fn paginator(
1170            self,
1171        ) -> impl gax::paginator::Paginator<crate::model::ListExternalAddressesResponse, gax::error::Error>
1172        {
1173            use std::clone::Clone;
1174            let token = self.0.request.page_token.clone();
1175            let execute = move |token: String| {
1176                let mut builder = self.clone();
1177                builder.0.request = builder.0.request.set_page_token(token);
1178                builder.send()
1179            };
1180            gax::paginator::internal::new_paginator(token, execute)
1181        }
1182
1183        /// Sets the value of [parent][crate::model::ListExternalAddressesRequest::parent].
1184        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1185            self.0.request.parent = v.into();
1186            self
1187        }
1188
1189        /// Sets the value of [page_size][crate::model::ListExternalAddressesRequest::page_size].
1190        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1191            self.0.request.page_size = v.into();
1192            self
1193        }
1194
1195        /// Sets the value of [page_token][crate::model::ListExternalAddressesRequest::page_token].
1196        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1197            self.0.request.page_token = v.into();
1198            self
1199        }
1200
1201        /// Sets the value of [filter][crate::model::ListExternalAddressesRequest::filter].
1202        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1203            self.0.request.filter = v.into();
1204            self
1205        }
1206
1207        /// Sets the value of [order_by][crate::model::ListExternalAddressesRequest::order_by].
1208        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1209            self.0.request.order_by = v.into();
1210            self
1211        }
1212    }
1213
1214    #[doc(hidden)]
1215    impl gax::options::internal::RequestBuilder for ListExternalAddresses {
1216        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1217            &mut self.0.options
1218        }
1219    }
1220
1221    /// The request builder for [VmwareEngine::fetch_network_policy_external_addresses][super::super::client::VmwareEngine::fetch_network_policy_external_addresses] calls.
1222    #[derive(Clone, Debug)]
1223    pub struct FetchNetworkPolicyExternalAddresses(
1224        RequestBuilder<crate::model::FetchNetworkPolicyExternalAddressesRequest>,
1225    );
1226
1227    impl FetchNetworkPolicyExternalAddresses {
1228        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1229            Self(RequestBuilder::new(stub))
1230        }
1231
1232        /// Sets the full request, replacing any prior values.
1233        pub fn with_request<V: Into<crate::model::FetchNetworkPolicyExternalAddressesRequest>>(
1234            mut self,
1235            v: V,
1236        ) -> Self {
1237            self.0.request = v.into();
1238            self
1239        }
1240
1241        /// Sets all the options, replacing any prior values.
1242        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1243            self.0.options = v.into();
1244            self
1245        }
1246
1247        /// Sends the request.
1248        pub async fn send(
1249            self,
1250        ) -> Result<crate::model::FetchNetworkPolicyExternalAddressesResponse> {
1251            (*self.0.stub)
1252                .fetch_network_policy_external_addresses(self.0.request, self.0.options)
1253                .await
1254                .map(gax::response::Response::into_body)
1255        }
1256
1257        /// Streams the responses back.
1258        pub async fn paginator(
1259            self,
1260        ) -> impl gax::paginator::Paginator<
1261            crate::model::FetchNetworkPolicyExternalAddressesResponse,
1262            gax::error::Error,
1263        > {
1264            use std::clone::Clone;
1265            let token = self.0.request.page_token.clone();
1266            let execute = move |token: String| {
1267                let mut builder = self.clone();
1268                builder.0.request = builder.0.request.set_page_token(token);
1269                builder.send()
1270            };
1271            gax::paginator::internal::new_paginator(token, execute)
1272        }
1273
1274        /// Sets the value of [network_policy][crate::model::FetchNetworkPolicyExternalAddressesRequest::network_policy].
1275        pub fn set_network_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
1276            self.0.request.network_policy = v.into();
1277            self
1278        }
1279
1280        /// Sets the value of [page_size][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_size].
1281        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1282            self.0.request.page_size = v.into();
1283            self
1284        }
1285
1286        /// Sets the value of [page_token][crate::model::FetchNetworkPolicyExternalAddressesRequest::page_token].
1287        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1288            self.0.request.page_token = v.into();
1289            self
1290        }
1291    }
1292
1293    #[doc(hidden)]
1294    impl gax::options::internal::RequestBuilder for FetchNetworkPolicyExternalAddresses {
1295        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1296            &mut self.0.options
1297        }
1298    }
1299
1300    /// The request builder for [VmwareEngine::get_external_address][super::super::client::VmwareEngine::get_external_address] calls.
1301    #[derive(Clone, Debug)]
1302    pub struct GetExternalAddress(RequestBuilder<crate::model::GetExternalAddressRequest>);
1303
1304    impl GetExternalAddress {
1305        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1306            Self(RequestBuilder::new(stub))
1307        }
1308
1309        /// Sets the full request, replacing any prior values.
1310        pub fn with_request<V: Into<crate::model::GetExternalAddressRequest>>(
1311            mut self,
1312            v: V,
1313        ) -> Self {
1314            self.0.request = v.into();
1315            self
1316        }
1317
1318        /// Sets all the options, replacing any prior values.
1319        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1320            self.0.options = v.into();
1321            self
1322        }
1323
1324        /// Sends the request.
1325        pub async fn send(self) -> Result<crate::model::ExternalAddress> {
1326            (*self.0.stub)
1327                .get_external_address(self.0.request, self.0.options)
1328                .await
1329                .map(gax::response::Response::into_body)
1330        }
1331
1332        /// Sets the value of [name][crate::model::GetExternalAddressRequest::name].
1333        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1334            self.0.request.name = v.into();
1335            self
1336        }
1337    }
1338
1339    #[doc(hidden)]
1340    impl gax::options::internal::RequestBuilder for GetExternalAddress {
1341        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1342            &mut self.0.options
1343        }
1344    }
1345
1346    /// The request builder for [VmwareEngine::create_external_address][super::super::client::VmwareEngine::create_external_address] calls.
1347    #[derive(Clone, Debug)]
1348    pub struct CreateExternalAddress(RequestBuilder<crate::model::CreateExternalAddressRequest>);
1349
1350    impl CreateExternalAddress {
1351        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1352            Self(RequestBuilder::new(stub))
1353        }
1354
1355        /// Sets the full request, replacing any prior values.
1356        pub fn with_request<V: Into<crate::model::CreateExternalAddressRequest>>(
1357            mut self,
1358            v: V,
1359        ) -> Self {
1360            self.0.request = v.into();
1361            self
1362        }
1363
1364        /// Sets all the options, replacing any prior values.
1365        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1366            self.0.options = v.into();
1367            self
1368        }
1369
1370        /// Sends the request.
1371        ///
1372        /// # Long running operations
1373        ///
1374        /// This starts, but does not poll, a longrunning operation. More information
1375        /// on [create_external_address][super::super::client::VmwareEngine::create_external_address].
1376        pub async fn send(self) -> Result<longrunning::model::Operation> {
1377            (*self.0.stub)
1378                .create_external_address(self.0.request, self.0.options)
1379                .await
1380                .map(gax::response::Response::into_body)
1381        }
1382
1383        /// Creates a [Poller][lro::Poller] to work with `create_external_address`.
1384        pub fn poller(
1385            self,
1386        ) -> impl lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
1387        {
1388            type Operation =
1389                lro::Operation<crate::model::ExternalAddress, crate::model::OperationMetadata>;
1390            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1391            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1392
1393            let stub = self.0.stub.clone();
1394            let mut options = self.0.options.clone();
1395            options.set_retry_policy(gax::retry_policy::NeverRetry);
1396            let query = move |name| {
1397                let stub = stub.clone();
1398                let options = options.clone();
1399                async {
1400                    let op = GetOperation::new(stub)
1401                        .set_name(name)
1402                        .with_options(options)
1403                        .send()
1404                        .await?;
1405                    Ok(Operation::new(op))
1406                }
1407            };
1408
1409            let start = move || async {
1410                let op = self.send().await?;
1411                Ok(Operation::new(op))
1412            };
1413
1414            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1415        }
1416
1417        /// Sets the value of [parent][crate::model::CreateExternalAddressRequest::parent].
1418        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1419            self.0.request.parent = v.into();
1420            self
1421        }
1422
1423        /// Sets the value of [external_address][crate::model::CreateExternalAddressRequest::external_address].
1424        pub fn set_external_address<T: Into<std::option::Option<crate::model::ExternalAddress>>>(
1425            mut self,
1426            v: T,
1427        ) -> Self {
1428            self.0.request.external_address = v.into();
1429            self
1430        }
1431
1432        /// Sets the value of [external_address_id][crate::model::CreateExternalAddressRequest::external_address_id].
1433        pub fn set_external_address_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1434            self.0.request.external_address_id = v.into();
1435            self
1436        }
1437
1438        /// Sets the value of [request_id][crate::model::CreateExternalAddressRequest::request_id].
1439        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1440            self.0.request.request_id = v.into();
1441            self
1442        }
1443    }
1444
1445    #[doc(hidden)]
1446    impl gax::options::internal::RequestBuilder for CreateExternalAddress {
1447        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1448            &mut self.0.options
1449        }
1450    }
1451
1452    /// The request builder for [VmwareEngine::update_external_address][super::super::client::VmwareEngine::update_external_address] calls.
1453    #[derive(Clone, Debug)]
1454    pub struct UpdateExternalAddress(RequestBuilder<crate::model::UpdateExternalAddressRequest>);
1455
1456    impl UpdateExternalAddress {
1457        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1458            Self(RequestBuilder::new(stub))
1459        }
1460
1461        /// Sets the full request, replacing any prior values.
1462        pub fn with_request<V: Into<crate::model::UpdateExternalAddressRequest>>(
1463            mut self,
1464            v: V,
1465        ) -> Self {
1466            self.0.request = v.into();
1467            self
1468        }
1469
1470        /// Sets all the options, replacing any prior values.
1471        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1472            self.0.options = v.into();
1473            self
1474        }
1475
1476        /// Sends the request.
1477        ///
1478        /// # Long running operations
1479        ///
1480        /// This starts, but does not poll, a longrunning operation. More information
1481        /// on [update_external_address][super::super::client::VmwareEngine::update_external_address].
1482        pub async fn send(self) -> Result<longrunning::model::Operation> {
1483            (*self.0.stub)
1484                .update_external_address(self.0.request, self.0.options)
1485                .await
1486                .map(gax::response::Response::into_body)
1487        }
1488
1489        /// Creates a [Poller][lro::Poller] to work with `update_external_address`.
1490        pub fn poller(
1491            self,
1492        ) -> impl lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
1493        {
1494            type Operation =
1495                lro::Operation<crate::model::ExternalAddress, crate::model::OperationMetadata>;
1496            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1497            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1498
1499            let stub = self.0.stub.clone();
1500            let mut options = self.0.options.clone();
1501            options.set_retry_policy(gax::retry_policy::NeverRetry);
1502            let query = move |name| {
1503                let stub = stub.clone();
1504                let options = options.clone();
1505                async {
1506                    let op = GetOperation::new(stub)
1507                        .set_name(name)
1508                        .with_options(options)
1509                        .send()
1510                        .await?;
1511                    Ok(Operation::new(op))
1512                }
1513            };
1514
1515            let start = move || async {
1516                let op = self.send().await?;
1517                Ok(Operation::new(op))
1518            };
1519
1520            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1521        }
1522
1523        /// Sets the value of [update_mask][crate::model::UpdateExternalAddressRequest::update_mask].
1524        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
1525            mut self,
1526            v: T,
1527        ) -> Self {
1528            self.0.request.update_mask = v.into();
1529            self
1530        }
1531
1532        /// Sets the value of [external_address][crate::model::UpdateExternalAddressRequest::external_address].
1533        pub fn set_external_address<T: Into<std::option::Option<crate::model::ExternalAddress>>>(
1534            mut self,
1535            v: T,
1536        ) -> Self {
1537            self.0.request.external_address = v.into();
1538            self
1539        }
1540
1541        /// Sets the value of [request_id][crate::model::UpdateExternalAddressRequest::request_id].
1542        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1543            self.0.request.request_id = v.into();
1544            self
1545        }
1546    }
1547
1548    #[doc(hidden)]
1549    impl gax::options::internal::RequestBuilder for UpdateExternalAddress {
1550        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1551            &mut self.0.options
1552        }
1553    }
1554
1555    /// The request builder for [VmwareEngine::delete_external_address][super::super::client::VmwareEngine::delete_external_address] calls.
1556    #[derive(Clone, Debug)]
1557    pub struct DeleteExternalAddress(RequestBuilder<crate::model::DeleteExternalAddressRequest>);
1558
1559    impl DeleteExternalAddress {
1560        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1561            Self(RequestBuilder::new(stub))
1562        }
1563
1564        /// Sets the full request, replacing any prior values.
1565        pub fn with_request<V: Into<crate::model::DeleteExternalAddressRequest>>(
1566            mut self,
1567            v: V,
1568        ) -> Self {
1569            self.0.request = v.into();
1570            self
1571        }
1572
1573        /// Sets all the options, replacing any prior values.
1574        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1575            self.0.options = v.into();
1576            self
1577        }
1578
1579        /// Sends the request.
1580        ///
1581        /// # Long running operations
1582        ///
1583        /// This starts, but does not poll, a longrunning operation. More information
1584        /// on [delete_external_address][super::super::client::VmwareEngine::delete_external_address].
1585        pub async fn send(self) -> Result<longrunning::model::Operation> {
1586            (*self.0.stub)
1587                .delete_external_address(self.0.request, self.0.options)
1588                .await
1589                .map(gax::response::Response::into_body)
1590        }
1591
1592        /// Creates a [Poller][lro::Poller] to work with `delete_external_address`.
1593        pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
1594            type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
1595            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1596            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1597
1598            let stub = self.0.stub.clone();
1599            let mut options = self.0.options.clone();
1600            options.set_retry_policy(gax::retry_policy::NeverRetry);
1601            let query = move |name| {
1602                let stub = stub.clone();
1603                let options = options.clone();
1604                async {
1605                    let op = GetOperation::new(stub)
1606                        .set_name(name)
1607                        .with_options(options)
1608                        .send()
1609                        .await?;
1610                    Ok(Operation::new(op))
1611                }
1612            };
1613
1614            let start = move || async {
1615                let op = self.send().await?;
1616                Ok(Operation::new(op))
1617            };
1618
1619            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1620        }
1621
1622        /// Sets the value of [name][crate::model::DeleteExternalAddressRequest::name].
1623        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1624            self.0.request.name = v.into();
1625            self
1626        }
1627
1628        /// Sets the value of [request_id][crate::model::DeleteExternalAddressRequest::request_id].
1629        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1630            self.0.request.request_id = v.into();
1631            self
1632        }
1633    }
1634
1635    #[doc(hidden)]
1636    impl gax::options::internal::RequestBuilder for DeleteExternalAddress {
1637        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1638            &mut self.0.options
1639        }
1640    }
1641
1642    /// The request builder for [VmwareEngine::list_subnets][super::super::client::VmwareEngine::list_subnets] calls.
1643    #[derive(Clone, Debug)]
1644    pub struct ListSubnets(RequestBuilder<crate::model::ListSubnetsRequest>);
1645
1646    impl ListSubnets {
1647        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1648            Self(RequestBuilder::new(stub))
1649        }
1650
1651        /// Sets the full request, replacing any prior values.
1652        pub fn with_request<V: Into<crate::model::ListSubnetsRequest>>(mut self, v: V) -> Self {
1653            self.0.request = v.into();
1654            self
1655        }
1656
1657        /// Sets all the options, replacing any prior values.
1658        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1659            self.0.options = v.into();
1660            self
1661        }
1662
1663        /// Sends the request.
1664        pub async fn send(self) -> Result<crate::model::ListSubnetsResponse> {
1665            (*self.0.stub)
1666                .list_subnets(self.0.request, self.0.options)
1667                .await
1668                .map(gax::response::Response::into_body)
1669        }
1670
1671        /// Streams the responses back.
1672        pub async fn paginator(
1673            self,
1674        ) -> impl gax::paginator::Paginator<crate::model::ListSubnetsResponse, gax::error::Error>
1675        {
1676            use std::clone::Clone;
1677            let token = self.0.request.page_token.clone();
1678            let execute = move |token: String| {
1679                let mut builder = self.clone();
1680                builder.0.request = builder.0.request.set_page_token(token);
1681                builder.send()
1682            };
1683            gax::paginator::internal::new_paginator(token, execute)
1684        }
1685
1686        /// Sets the value of [parent][crate::model::ListSubnetsRequest::parent].
1687        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1688            self.0.request.parent = v.into();
1689            self
1690        }
1691
1692        /// Sets the value of [page_size][crate::model::ListSubnetsRequest::page_size].
1693        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1694            self.0.request.page_size = v.into();
1695            self
1696        }
1697
1698        /// Sets the value of [page_token][crate::model::ListSubnetsRequest::page_token].
1699        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1700            self.0.request.page_token = v.into();
1701            self
1702        }
1703    }
1704
1705    #[doc(hidden)]
1706    impl gax::options::internal::RequestBuilder for ListSubnets {
1707        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1708            &mut self.0.options
1709        }
1710    }
1711
1712    /// The request builder for [VmwareEngine::get_subnet][super::super::client::VmwareEngine::get_subnet] calls.
1713    #[derive(Clone, Debug)]
1714    pub struct GetSubnet(RequestBuilder<crate::model::GetSubnetRequest>);
1715
1716    impl GetSubnet {
1717        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1718            Self(RequestBuilder::new(stub))
1719        }
1720
1721        /// Sets the full request, replacing any prior values.
1722        pub fn with_request<V: Into<crate::model::GetSubnetRequest>>(mut self, v: V) -> Self {
1723            self.0.request = v.into();
1724            self
1725        }
1726
1727        /// Sets all the options, replacing any prior values.
1728        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1729            self.0.options = v.into();
1730            self
1731        }
1732
1733        /// Sends the request.
1734        pub async fn send(self) -> Result<crate::model::Subnet> {
1735            (*self.0.stub)
1736                .get_subnet(self.0.request, self.0.options)
1737                .await
1738                .map(gax::response::Response::into_body)
1739        }
1740
1741        /// Sets the value of [name][crate::model::GetSubnetRequest::name].
1742        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1743            self.0.request.name = v.into();
1744            self
1745        }
1746    }
1747
1748    #[doc(hidden)]
1749    impl gax::options::internal::RequestBuilder for GetSubnet {
1750        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1751            &mut self.0.options
1752        }
1753    }
1754
1755    /// The request builder for [VmwareEngine::update_subnet][super::super::client::VmwareEngine::update_subnet] calls.
1756    #[derive(Clone, Debug)]
1757    pub struct UpdateSubnet(RequestBuilder<crate::model::UpdateSubnetRequest>);
1758
1759    impl UpdateSubnet {
1760        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1761            Self(RequestBuilder::new(stub))
1762        }
1763
1764        /// Sets the full request, replacing any prior values.
1765        pub fn with_request<V: Into<crate::model::UpdateSubnetRequest>>(mut self, v: V) -> Self {
1766            self.0.request = v.into();
1767            self
1768        }
1769
1770        /// Sets all the options, replacing any prior values.
1771        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1772            self.0.options = v.into();
1773            self
1774        }
1775
1776        /// Sends the request.
1777        ///
1778        /// # Long running operations
1779        ///
1780        /// This starts, but does not poll, a longrunning operation. More information
1781        /// on [update_subnet][super::super::client::VmwareEngine::update_subnet].
1782        pub async fn send(self) -> Result<longrunning::model::Operation> {
1783            (*self.0.stub)
1784                .update_subnet(self.0.request, self.0.options)
1785                .await
1786                .map(gax::response::Response::into_body)
1787        }
1788
1789        /// Creates a [Poller][lro::Poller] to work with `update_subnet`.
1790        pub fn poller(
1791            self,
1792        ) -> impl lro::Poller<crate::model::Subnet, crate::model::OperationMetadata> {
1793            type Operation = lro::Operation<crate::model::Subnet, crate::model::OperationMetadata>;
1794            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1795            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1796
1797            let stub = self.0.stub.clone();
1798            let mut options = self.0.options.clone();
1799            options.set_retry_policy(gax::retry_policy::NeverRetry);
1800            let query = move |name| {
1801                let stub = stub.clone();
1802                let options = options.clone();
1803                async {
1804                    let op = GetOperation::new(stub)
1805                        .set_name(name)
1806                        .with_options(options)
1807                        .send()
1808                        .await?;
1809                    Ok(Operation::new(op))
1810                }
1811            };
1812
1813            let start = move || async {
1814                let op = self.send().await?;
1815                Ok(Operation::new(op))
1816            };
1817
1818            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1819        }
1820
1821        /// Sets the value of [update_mask][crate::model::UpdateSubnetRequest::update_mask].
1822        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
1823            mut self,
1824            v: T,
1825        ) -> Self {
1826            self.0.request.update_mask = v.into();
1827            self
1828        }
1829
1830        /// Sets the value of [subnet][crate::model::UpdateSubnetRequest::subnet].
1831        pub fn set_subnet<T: Into<std::option::Option<crate::model::Subnet>>>(
1832            mut self,
1833            v: T,
1834        ) -> Self {
1835            self.0.request.subnet = v.into();
1836            self
1837        }
1838    }
1839
1840    #[doc(hidden)]
1841    impl gax::options::internal::RequestBuilder for UpdateSubnet {
1842        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1843            &mut self.0.options
1844        }
1845    }
1846
1847    /// The request builder for [VmwareEngine::list_external_access_rules][super::super::client::VmwareEngine::list_external_access_rules] calls.
1848    #[derive(Clone, Debug)]
1849    pub struct ListExternalAccessRules(
1850        RequestBuilder<crate::model::ListExternalAccessRulesRequest>,
1851    );
1852
1853    impl ListExternalAccessRules {
1854        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1855            Self(RequestBuilder::new(stub))
1856        }
1857
1858        /// Sets the full request, replacing any prior values.
1859        pub fn with_request<V: Into<crate::model::ListExternalAccessRulesRequest>>(
1860            mut self,
1861            v: V,
1862        ) -> Self {
1863            self.0.request = v.into();
1864            self
1865        }
1866
1867        /// Sets all the options, replacing any prior values.
1868        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1869            self.0.options = v.into();
1870            self
1871        }
1872
1873        /// Sends the request.
1874        pub async fn send(self) -> Result<crate::model::ListExternalAccessRulesResponse> {
1875            (*self.0.stub)
1876                .list_external_access_rules(self.0.request, self.0.options)
1877                .await
1878                .map(gax::response::Response::into_body)
1879        }
1880
1881        /// Streams the responses back.
1882        pub async fn paginator(
1883            self,
1884        ) -> impl gax::paginator::Paginator<
1885            crate::model::ListExternalAccessRulesResponse,
1886            gax::error::Error,
1887        > {
1888            use std::clone::Clone;
1889            let token = self.0.request.page_token.clone();
1890            let execute = move |token: String| {
1891                let mut builder = self.clone();
1892                builder.0.request = builder.0.request.set_page_token(token);
1893                builder.send()
1894            };
1895            gax::paginator::internal::new_paginator(token, execute)
1896        }
1897
1898        /// Sets the value of [parent][crate::model::ListExternalAccessRulesRequest::parent].
1899        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1900            self.0.request.parent = v.into();
1901            self
1902        }
1903
1904        /// Sets the value of [page_size][crate::model::ListExternalAccessRulesRequest::page_size].
1905        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1906            self.0.request.page_size = v.into();
1907            self
1908        }
1909
1910        /// Sets the value of [page_token][crate::model::ListExternalAccessRulesRequest::page_token].
1911        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1912            self.0.request.page_token = v.into();
1913            self
1914        }
1915
1916        /// Sets the value of [filter][crate::model::ListExternalAccessRulesRequest::filter].
1917        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1918            self.0.request.filter = v.into();
1919            self
1920        }
1921
1922        /// Sets the value of [order_by][crate::model::ListExternalAccessRulesRequest::order_by].
1923        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1924            self.0.request.order_by = v.into();
1925            self
1926        }
1927    }
1928
1929    #[doc(hidden)]
1930    impl gax::options::internal::RequestBuilder for ListExternalAccessRules {
1931        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1932            &mut self.0.options
1933        }
1934    }
1935
1936    /// The request builder for [VmwareEngine::get_external_access_rule][super::super::client::VmwareEngine::get_external_access_rule] calls.
1937    #[derive(Clone, Debug)]
1938    pub struct GetExternalAccessRule(RequestBuilder<crate::model::GetExternalAccessRuleRequest>);
1939
1940    impl GetExternalAccessRule {
1941        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1942            Self(RequestBuilder::new(stub))
1943        }
1944
1945        /// Sets the full request, replacing any prior values.
1946        pub fn with_request<V: Into<crate::model::GetExternalAccessRuleRequest>>(
1947            mut self,
1948            v: V,
1949        ) -> Self {
1950            self.0.request = v.into();
1951            self
1952        }
1953
1954        /// Sets all the options, replacing any prior values.
1955        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1956            self.0.options = v.into();
1957            self
1958        }
1959
1960        /// Sends the request.
1961        pub async fn send(self) -> Result<crate::model::ExternalAccessRule> {
1962            (*self.0.stub)
1963                .get_external_access_rule(self.0.request, self.0.options)
1964                .await
1965                .map(gax::response::Response::into_body)
1966        }
1967
1968        /// Sets the value of [name][crate::model::GetExternalAccessRuleRequest::name].
1969        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1970            self.0.request.name = v.into();
1971            self
1972        }
1973    }
1974
1975    #[doc(hidden)]
1976    impl gax::options::internal::RequestBuilder for GetExternalAccessRule {
1977        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1978            &mut self.0.options
1979        }
1980    }
1981
1982    /// The request builder for [VmwareEngine::create_external_access_rule][super::super::client::VmwareEngine::create_external_access_rule] calls.
1983    #[derive(Clone, Debug)]
1984    pub struct CreateExternalAccessRule(
1985        RequestBuilder<crate::model::CreateExternalAccessRuleRequest>,
1986    );
1987
1988    impl CreateExternalAccessRule {
1989        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
1990            Self(RequestBuilder::new(stub))
1991        }
1992
1993        /// Sets the full request, replacing any prior values.
1994        pub fn with_request<V: Into<crate::model::CreateExternalAccessRuleRequest>>(
1995            mut self,
1996            v: V,
1997        ) -> Self {
1998            self.0.request = v.into();
1999            self
2000        }
2001
2002        /// Sets all the options, replacing any prior values.
2003        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2004            self.0.options = v.into();
2005            self
2006        }
2007
2008        /// Sends the request.
2009        ///
2010        /// # Long running operations
2011        ///
2012        /// This starts, but does not poll, a longrunning operation. More information
2013        /// on [create_external_access_rule][super::super::client::VmwareEngine::create_external_access_rule].
2014        pub async fn send(self) -> Result<longrunning::model::Operation> {
2015            (*self.0.stub)
2016                .create_external_access_rule(self.0.request, self.0.options)
2017                .await
2018                .map(gax::response::Response::into_body)
2019        }
2020
2021        /// Creates a [Poller][lro::Poller] to work with `create_external_access_rule`.
2022        pub fn poller(
2023            self,
2024        ) -> impl lro::Poller<crate::model::ExternalAccessRule, crate::model::OperationMetadata>
2025        {
2026            type Operation =
2027                lro::Operation<crate::model::ExternalAccessRule, crate::model::OperationMetadata>;
2028            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2029            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2030
2031            let stub = self.0.stub.clone();
2032            let mut options = self.0.options.clone();
2033            options.set_retry_policy(gax::retry_policy::NeverRetry);
2034            let query = move |name| {
2035                let stub = stub.clone();
2036                let options = options.clone();
2037                async {
2038                    let op = GetOperation::new(stub)
2039                        .set_name(name)
2040                        .with_options(options)
2041                        .send()
2042                        .await?;
2043                    Ok(Operation::new(op))
2044                }
2045            };
2046
2047            let start = move || async {
2048                let op = self.send().await?;
2049                Ok(Operation::new(op))
2050            };
2051
2052            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2053        }
2054
2055        /// Sets the value of [parent][crate::model::CreateExternalAccessRuleRequest::parent].
2056        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2057            self.0.request.parent = v.into();
2058            self
2059        }
2060
2061        /// Sets the value of [external_access_rule][crate::model::CreateExternalAccessRuleRequest::external_access_rule].
2062        pub fn set_external_access_rule<
2063            T: Into<std::option::Option<crate::model::ExternalAccessRule>>,
2064        >(
2065            mut self,
2066            v: T,
2067        ) -> Self {
2068            self.0.request.external_access_rule = v.into();
2069            self
2070        }
2071
2072        /// Sets the value of [external_access_rule_id][crate::model::CreateExternalAccessRuleRequest::external_access_rule_id].
2073        pub fn set_external_access_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2074            self.0.request.external_access_rule_id = v.into();
2075            self
2076        }
2077
2078        /// Sets the value of [request_id][crate::model::CreateExternalAccessRuleRequest::request_id].
2079        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2080            self.0.request.request_id = v.into();
2081            self
2082        }
2083    }
2084
2085    #[doc(hidden)]
2086    impl gax::options::internal::RequestBuilder for CreateExternalAccessRule {
2087        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2088            &mut self.0.options
2089        }
2090    }
2091
2092    /// The request builder for [VmwareEngine::update_external_access_rule][super::super::client::VmwareEngine::update_external_access_rule] calls.
2093    #[derive(Clone, Debug)]
2094    pub struct UpdateExternalAccessRule(
2095        RequestBuilder<crate::model::UpdateExternalAccessRuleRequest>,
2096    );
2097
2098    impl UpdateExternalAccessRule {
2099        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2100            Self(RequestBuilder::new(stub))
2101        }
2102
2103        /// Sets the full request, replacing any prior values.
2104        pub fn with_request<V: Into<crate::model::UpdateExternalAccessRuleRequest>>(
2105            mut self,
2106            v: V,
2107        ) -> Self {
2108            self.0.request = v.into();
2109            self
2110        }
2111
2112        /// Sets all the options, replacing any prior values.
2113        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2114            self.0.options = v.into();
2115            self
2116        }
2117
2118        /// Sends the request.
2119        ///
2120        /// # Long running operations
2121        ///
2122        /// This starts, but does not poll, a longrunning operation. More information
2123        /// on [update_external_access_rule][super::super::client::VmwareEngine::update_external_access_rule].
2124        pub async fn send(self) -> Result<longrunning::model::Operation> {
2125            (*self.0.stub)
2126                .update_external_access_rule(self.0.request, self.0.options)
2127                .await
2128                .map(gax::response::Response::into_body)
2129        }
2130
2131        /// Creates a [Poller][lro::Poller] to work with `update_external_access_rule`.
2132        pub fn poller(
2133            self,
2134        ) -> impl lro::Poller<crate::model::ExternalAccessRule, crate::model::OperationMetadata>
2135        {
2136            type Operation =
2137                lro::Operation<crate::model::ExternalAccessRule, crate::model::OperationMetadata>;
2138            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2139            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2140
2141            let stub = self.0.stub.clone();
2142            let mut options = self.0.options.clone();
2143            options.set_retry_policy(gax::retry_policy::NeverRetry);
2144            let query = move |name| {
2145                let stub = stub.clone();
2146                let options = options.clone();
2147                async {
2148                    let op = GetOperation::new(stub)
2149                        .set_name(name)
2150                        .with_options(options)
2151                        .send()
2152                        .await?;
2153                    Ok(Operation::new(op))
2154                }
2155            };
2156
2157            let start = move || async {
2158                let op = self.send().await?;
2159                Ok(Operation::new(op))
2160            };
2161
2162            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2163        }
2164
2165        /// Sets the value of [update_mask][crate::model::UpdateExternalAccessRuleRequest::update_mask].
2166        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
2167            mut self,
2168            v: T,
2169        ) -> Self {
2170            self.0.request.update_mask = v.into();
2171            self
2172        }
2173
2174        /// Sets the value of [external_access_rule][crate::model::UpdateExternalAccessRuleRequest::external_access_rule].
2175        pub fn set_external_access_rule<
2176            T: Into<std::option::Option<crate::model::ExternalAccessRule>>,
2177        >(
2178            mut self,
2179            v: T,
2180        ) -> Self {
2181            self.0.request.external_access_rule = v.into();
2182            self
2183        }
2184
2185        /// Sets the value of [request_id][crate::model::UpdateExternalAccessRuleRequest::request_id].
2186        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2187            self.0.request.request_id = v.into();
2188            self
2189        }
2190    }
2191
2192    #[doc(hidden)]
2193    impl gax::options::internal::RequestBuilder for UpdateExternalAccessRule {
2194        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2195            &mut self.0.options
2196        }
2197    }
2198
2199    /// The request builder for [VmwareEngine::delete_external_access_rule][super::super::client::VmwareEngine::delete_external_access_rule] calls.
2200    #[derive(Clone, Debug)]
2201    pub struct DeleteExternalAccessRule(
2202        RequestBuilder<crate::model::DeleteExternalAccessRuleRequest>,
2203    );
2204
2205    impl DeleteExternalAccessRule {
2206        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2207            Self(RequestBuilder::new(stub))
2208        }
2209
2210        /// Sets the full request, replacing any prior values.
2211        pub fn with_request<V: Into<crate::model::DeleteExternalAccessRuleRequest>>(
2212            mut self,
2213            v: V,
2214        ) -> Self {
2215            self.0.request = v.into();
2216            self
2217        }
2218
2219        /// Sets all the options, replacing any prior values.
2220        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2221            self.0.options = v.into();
2222            self
2223        }
2224
2225        /// Sends the request.
2226        ///
2227        /// # Long running operations
2228        ///
2229        /// This starts, but does not poll, a longrunning operation. More information
2230        /// on [delete_external_access_rule][super::super::client::VmwareEngine::delete_external_access_rule].
2231        pub async fn send(self) -> Result<longrunning::model::Operation> {
2232            (*self.0.stub)
2233                .delete_external_access_rule(self.0.request, self.0.options)
2234                .await
2235                .map(gax::response::Response::into_body)
2236        }
2237
2238        /// Creates a [Poller][lro::Poller] to work with `delete_external_access_rule`.
2239        pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
2240            type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
2241            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2242            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2243
2244            let stub = self.0.stub.clone();
2245            let mut options = self.0.options.clone();
2246            options.set_retry_policy(gax::retry_policy::NeverRetry);
2247            let query = move |name| {
2248                let stub = stub.clone();
2249                let options = options.clone();
2250                async {
2251                    let op = GetOperation::new(stub)
2252                        .set_name(name)
2253                        .with_options(options)
2254                        .send()
2255                        .await?;
2256                    Ok(Operation::new(op))
2257                }
2258            };
2259
2260            let start = move || async {
2261                let op = self.send().await?;
2262                Ok(Operation::new(op))
2263            };
2264
2265            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2266        }
2267
2268        /// Sets the value of [name][crate::model::DeleteExternalAccessRuleRequest::name].
2269        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2270            self.0.request.name = v.into();
2271            self
2272        }
2273
2274        /// Sets the value of [request_id][crate::model::DeleteExternalAccessRuleRequest::request_id].
2275        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2276            self.0.request.request_id = v.into();
2277            self
2278        }
2279    }
2280
2281    #[doc(hidden)]
2282    impl gax::options::internal::RequestBuilder for DeleteExternalAccessRule {
2283        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2284            &mut self.0.options
2285        }
2286    }
2287
2288    /// The request builder for [VmwareEngine::list_logging_servers][super::super::client::VmwareEngine::list_logging_servers] calls.
2289    #[derive(Clone, Debug)]
2290    pub struct ListLoggingServers(RequestBuilder<crate::model::ListLoggingServersRequest>);
2291
2292    impl ListLoggingServers {
2293        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2294            Self(RequestBuilder::new(stub))
2295        }
2296
2297        /// Sets the full request, replacing any prior values.
2298        pub fn with_request<V: Into<crate::model::ListLoggingServersRequest>>(
2299            mut self,
2300            v: V,
2301        ) -> Self {
2302            self.0.request = v.into();
2303            self
2304        }
2305
2306        /// Sets all the options, replacing any prior values.
2307        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2308            self.0.options = v.into();
2309            self
2310        }
2311
2312        /// Sends the request.
2313        pub async fn send(self) -> Result<crate::model::ListLoggingServersResponse> {
2314            (*self.0.stub)
2315                .list_logging_servers(self.0.request, self.0.options)
2316                .await
2317                .map(gax::response::Response::into_body)
2318        }
2319
2320        /// Streams the responses back.
2321        pub async fn paginator(
2322            self,
2323        ) -> impl gax::paginator::Paginator<crate::model::ListLoggingServersResponse, gax::error::Error>
2324        {
2325            use std::clone::Clone;
2326            let token = self.0.request.page_token.clone();
2327            let execute = move |token: String| {
2328                let mut builder = self.clone();
2329                builder.0.request = builder.0.request.set_page_token(token);
2330                builder.send()
2331            };
2332            gax::paginator::internal::new_paginator(token, execute)
2333        }
2334
2335        /// Sets the value of [parent][crate::model::ListLoggingServersRequest::parent].
2336        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2337            self.0.request.parent = v.into();
2338            self
2339        }
2340
2341        /// Sets the value of [page_size][crate::model::ListLoggingServersRequest::page_size].
2342        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2343            self.0.request.page_size = v.into();
2344            self
2345        }
2346
2347        /// Sets the value of [page_token][crate::model::ListLoggingServersRequest::page_token].
2348        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2349            self.0.request.page_token = v.into();
2350            self
2351        }
2352
2353        /// Sets the value of [filter][crate::model::ListLoggingServersRequest::filter].
2354        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2355            self.0.request.filter = v.into();
2356            self
2357        }
2358
2359        /// Sets the value of [order_by][crate::model::ListLoggingServersRequest::order_by].
2360        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2361            self.0.request.order_by = v.into();
2362            self
2363        }
2364    }
2365
2366    #[doc(hidden)]
2367    impl gax::options::internal::RequestBuilder for ListLoggingServers {
2368        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2369            &mut self.0.options
2370        }
2371    }
2372
2373    /// The request builder for [VmwareEngine::get_logging_server][super::super::client::VmwareEngine::get_logging_server] calls.
2374    #[derive(Clone, Debug)]
2375    pub struct GetLoggingServer(RequestBuilder<crate::model::GetLoggingServerRequest>);
2376
2377    impl GetLoggingServer {
2378        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2379            Self(RequestBuilder::new(stub))
2380        }
2381
2382        /// Sets the full request, replacing any prior values.
2383        pub fn with_request<V: Into<crate::model::GetLoggingServerRequest>>(
2384            mut self,
2385            v: V,
2386        ) -> Self {
2387            self.0.request = v.into();
2388            self
2389        }
2390
2391        /// Sets all the options, replacing any prior values.
2392        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2393            self.0.options = v.into();
2394            self
2395        }
2396
2397        /// Sends the request.
2398        pub async fn send(self) -> Result<crate::model::LoggingServer> {
2399            (*self.0.stub)
2400                .get_logging_server(self.0.request, self.0.options)
2401                .await
2402                .map(gax::response::Response::into_body)
2403        }
2404
2405        /// Sets the value of [name][crate::model::GetLoggingServerRequest::name].
2406        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2407            self.0.request.name = v.into();
2408            self
2409        }
2410    }
2411
2412    #[doc(hidden)]
2413    impl gax::options::internal::RequestBuilder for GetLoggingServer {
2414        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2415            &mut self.0.options
2416        }
2417    }
2418
2419    /// The request builder for [VmwareEngine::create_logging_server][super::super::client::VmwareEngine::create_logging_server] calls.
2420    #[derive(Clone, Debug)]
2421    pub struct CreateLoggingServer(RequestBuilder<crate::model::CreateLoggingServerRequest>);
2422
2423    impl CreateLoggingServer {
2424        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2425            Self(RequestBuilder::new(stub))
2426        }
2427
2428        /// Sets the full request, replacing any prior values.
2429        pub fn with_request<V: Into<crate::model::CreateLoggingServerRequest>>(
2430            mut self,
2431            v: V,
2432        ) -> Self {
2433            self.0.request = v.into();
2434            self
2435        }
2436
2437        /// Sets all the options, replacing any prior values.
2438        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2439            self.0.options = v.into();
2440            self
2441        }
2442
2443        /// Sends the request.
2444        ///
2445        /// # Long running operations
2446        ///
2447        /// This starts, but does not poll, a longrunning operation. More information
2448        /// on [create_logging_server][super::super::client::VmwareEngine::create_logging_server].
2449        pub async fn send(self) -> Result<longrunning::model::Operation> {
2450            (*self.0.stub)
2451                .create_logging_server(self.0.request, self.0.options)
2452                .await
2453                .map(gax::response::Response::into_body)
2454        }
2455
2456        /// Creates a [Poller][lro::Poller] to work with `create_logging_server`.
2457        pub fn poller(
2458            self,
2459        ) -> impl lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
2460        {
2461            type Operation =
2462                lro::Operation<crate::model::LoggingServer, crate::model::OperationMetadata>;
2463            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2464            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2465
2466            let stub = self.0.stub.clone();
2467            let mut options = self.0.options.clone();
2468            options.set_retry_policy(gax::retry_policy::NeverRetry);
2469            let query = move |name| {
2470                let stub = stub.clone();
2471                let options = options.clone();
2472                async {
2473                    let op = GetOperation::new(stub)
2474                        .set_name(name)
2475                        .with_options(options)
2476                        .send()
2477                        .await?;
2478                    Ok(Operation::new(op))
2479                }
2480            };
2481
2482            let start = move || async {
2483                let op = self.send().await?;
2484                Ok(Operation::new(op))
2485            };
2486
2487            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2488        }
2489
2490        /// Sets the value of [parent][crate::model::CreateLoggingServerRequest::parent].
2491        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2492            self.0.request.parent = v.into();
2493            self
2494        }
2495
2496        /// Sets the value of [logging_server][crate::model::CreateLoggingServerRequest::logging_server].
2497        pub fn set_logging_server<T: Into<std::option::Option<crate::model::LoggingServer>>>(
2498            mut self,
2499            v: T,
2500        ) -> Self {
2501            self.0.request.logging_server = v.into();
2502            self
2503        }
2504
2505        /// Sets the value of [logging_server_id][crate::model::CreateLoggingServerRequest::logging_server_id].
2506        pub fn set_logging_server_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2507            self.0.request.logging_server_id = v.into();
2508            self
2509        }
2510
2511        /// Sets the value of [request_id][crate::model::CreateLoggingServerRequest::request_id].
2512        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2513            self.0.request.request_id = v.into();
2514            self
2515        }
2516    }
2517
2518    #[doc(hidden)]
2519    impl gax::options::internal::RequestBuilder for CreateLoggingServer {
2520        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2521            &mut self.0.options
2522        }
2523    }
2524
2525    /// The request builder for [VmwareEngine::update_logging_server][super::super::client::VmwareEngine::update_logging_server] calls.
2526    #[derive(Clone, Debug)]
2527    pub struct UpdateLoggingServer(RequestBuilder<crate::model::UpdateLoggingServerRequest>);
2528
2529    impl UpdateLoggingServer {
2530        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2531            Self(RequestBuilder::new(stub))
2532        }
2533
2534        /// Sets the full request, replacing any prior values.
2535        pub fn with_request<V: Into<crate::model::UpdateLoggingServerRequest>>(
2536            mut self,
2537            v: V,
2538        ) -> Self {
2539            self.0.request = v.into();
2540            self
2541        }
2542
2543        /// Sets all the options, replacing any prior values.
2544        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2545            self.0.options = v.into();
2546            self
2547        }
2548
2549        /// Sends the request.
2550        ///
2551        /// # Long running operations
2552        ///
2553        /// This starts, but does not poll, a longrunning operation. More information
2554        /// on [update_logging_server][super::super::client::VmwareEngine::update_logging_server].
2555        pub async fn send(self) -> Result<longrunning::model::Operation> {
2556            (*self.0.stub)
2557                .update_logging_server(self.0.request, self.0.options)
2558                .await
2559                .map(gax::response::Response::into_body)
2560        }
2561
2562        /// Creates a [Poller][lro::Poller] to work with `update_logging_server`.
2563        pub fn poller(
2564            self,
2565        ) -> impl lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
2566        {
2567            type Operation =
2568                lro::Operation<crate::model::LoggingServer, crate::model::OperationMetadata>;
2569            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2570            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2571
2572            let stub = self.0.stub.clone();
2573            let mut options = self.0.options.clone();
2574            options.set_retry_policy(gax::retry_policy::NeverRetry);
2575            let query = move |name| {
2576                let stub = stub.clone();
2577                let options = options.clone();
2578                async {
2579                    let op = GetOperation::new(stub)
2580                        .set_name(name)
2581                        .with_options(options)
2582                        .send()
2583                        .await?;
2584                    Ok(Operation::new(op))
2585                }
2586            };
2587
2588            let start = move || async {
2589                let op = self.send().await?;
2590                Ok(Operation::new(op))
2591            };
2592
2593            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2594        }
2595
2596        /// Sets the value of [update_mask][crate::model::UpdateLoggingServerRequest::update_mask].
2597        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
2598            mut self,
2599            v: T,
2600        ) -> Self {
2601            self.0.request.update_mask = v.into();
2602            self
2603        }
2604
2605        /// Sets the value of [logging_server][crate::model::UpdateLoggingServerRequest::logging_server].
2606        pub fn set_logging_server<T: Into<std::option::Option<crate::model::LoggingServer>>>(
2607            mut self,
2608            v: T,
2609        ) -> Self {
2610            self.0.request.logging_server = v.into();
2611            self
2612        }
2613
2614        /// Sets the value of [request_id][crate::model::UpdateLoggingServerRequest::request_id].
2615        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2616            self.0.request.request_id = v.into();
2617            self
2618        }
2619    }
2620
2621    #[doc(hidden)]
2622    impl gax::options::internal::RequestBuilder for UpdateLoggingServer {
2623        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2624            &mut self.0.options
2625        }
2626    }
2627
2628    /// The request builder for [VmwareEngine::delete_logging_server][super::super::client::VmwareEngine::delete_logging_server] calls.
2629    #[derive(Clone, Debug)]
2630    pub struct DeleteLoggingServer(RequestBuilder<crate::model::DeleteLoggingServerRequest>);
2631
2632    impl DeleteLoggingServer {
2633        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2634            Self(RequestBuilder::new(stub))
2635        }
2636
2637        /// Sets the full request, replacing any prior values.
2638        pub fn with_request<V: Into<crate::model::DeleteLoggingServerRequest>>(
2639            mut self,
2640            v: V,
2641        ) -> Self {
2642            self.0.request = v.into();
2643            self
2644        }
2645
2646        /// Sets all the options, replacing any prior values.
2647        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2648            self.0.options = v.into();
2649            self
2650        }
2651
2652        /// Sends the request.
2653        ///
2654        /// # Long running operations
2655        ///
2656        /// This starts, but does not poll, a longrunning operation. More information
2657        /// on [delete_logging_server][super::super::client::VmwareEngine::delete_logging_server].
2658        pub async fn send(self) -> Result<longrunning::model::Operation> {
2659            (*self.0.stub)
2660                .delete_logging_server(self.0.request, self.0.options)
2661                .await
2662                .map(gax::response::Response::into_body)
2663        }
2664
2665        /// Creates a [Poller][lro::Poller] to work with `delete_logging_server`.
2666        pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
2667            type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
2668            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2669            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2670
2671            let stub = self.0.stub.clone();
2672            let mut options = self.0.options.clone();
2673            options.set_retry_policy(gax::retry_policy::NeverRetry);
2674            let query = move |name| {
2675                let stub = stub.clone();
2676                let options = options.clone();
2677                async {
2678                    let op = GetOperation::new(stub)
2679                        .set_name(name)
2680                        .with_options(options)
2681                        .send()
2682                        .await?;
2683                    Ok(Operation::new(op))
2684                }
2685            };
2686
2687            let start = move || async {
2688                let op = self.send().await?;
2689                Ok(Operation::new(op))
2690            };
2691
2692            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2693        }
2694
2695        /// Sets the value of [name][crate::model::DeleteLoggingServerRequest::name].
2696        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2697            self.0.request.name = v.into();
2698            self
2699        }
2700
2701        /// Sets the value of [request_id][crate::model::DeleteLoggingServerRequest::request_id].
2702        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2703            self.0.request.request_id = v.into();
2704            self
2705        }
2706    }
2707
2708    #[doc(hidden)]
2709    impl gax::options::internal::RequestBuilder for DeleteLoggingServer {
2710        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2711            &mut self.0.options
2712        }
2713    }
2714
2715    /// The request builder for [VmwareEngine::list_node_types][super::super::client::VmwareEngine::list_node_types] calls.
2716    #[derive(Clone, Debug)]
2717    pub struct ListNodeTypes(RequestBuilder<crate::model::ListNodeTypesRequest>);
2718
2719    impl ListNodeTypes {
2720        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2721            Self(RequestBuilder::new(stub))
2722        }
2723
2724        /// Sets the full request, replacing any prior values.
2725        pub fn with_request<V: Into<crate::model::ListNodeTypesRequest>>(mut self, v: V) -> Self {
2726            self.0.request = v.into();
2727            self
2728        }
2729
2730        /// Sets all the options, replacing any prior values.
2731        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2732            self.0.options = v.into();
2733            self
2734        }
2735
2736        /// Sends the request.
2737        pub async fn send(self) -> Result<crate::model::ListNodeTypesResponse> {
2738            (*self.0.stub)
2739                .list_node_types(self.0.request, self.0.options)
2740                .await
2741                .map(gax::response::Response::into_body)
2742        }
2743
2744        /// Streams the responses back.
2745        pub async fn paginator(
2746            self,
2747        ) -> impl gax::paginator::Paginator<crate::model::ListNodeTypesResponse, gax::error::Error>
2748        {
2749            use std::clone::Clone;
2750            let token = self.0.request.page_token.clone();
2751            let execute = move |token: String| {
2752                let mut builder = self.clone();
2753                builder.0.request = builder.0.request.set_page_token(token);
2754                builder.send()
2755            };
2756            gax::paginator::internal::new_paginator(token, execute)
2757        }
2758
2759        /// Sets the value of [parent][crate::model::ListNodeTypesRequest::parent].
2760        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2761            self.0.request.parent = v.into();
2762            self
2763        }
2764
2765        /// Sets the value of [page_size][crate::model::ListNodeTypesRequest::page_size].
2766        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2767            self.0.request.page_size = v.into();
2768            self
2769        }
2770
2771        /// Sets the value of [page_token][crate::model::ListNodeTypesRequest::page_token].
2772        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2773            self.0.request.page_token = v.into();
2774            self
2775        }
2776
2777        /// Sets the value of [filter][crate::model::ListNodeTypesRequest::filter].
2778        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2779            self.0.request.filter = v.into();
2780            self
2781        }
2782    }
2783
2784    #[doc(hidden)]
2785    impl gax::options::internal::RequestBuilder for ListNodeTypes {
2786        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2787            &mut self.0.options
2788        }
2789    }
2790
2791    /// The request builder for [VmwareEngine::get_node_type][super::super::client::VmwareEngine::get_node_type] calls.
2792    #[derive(Clone, Debug)]
2793    pub struct GetNodeType(RequestBuilder<crate::model::GetNodeTypeRequest>);
2794
2795    impl GetNodeType {
2796        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2797            Self(RequestBuilder::new(stub))
2798        }
2799
2800        /// Sets the full request, replacing any prior values.
2801        pub fn with_request<V: Into<crate::model::GetNodeTypeRequest>>(mut self, v: V) -> Self {
2802            self.0.request = v.into();
2803            self
2804        }
2805
2806        /// Sets all the options, replacing any prior values.
2807        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2808            self.0.options = v.into();
2809            self
2810        }
2811
2812        /// Sends the request.
2813        pub async fn send(self) -> Result<crate::model::NodeType> {
2814            (*self.0.stub)
2815                .get_node_type(self.0.request, self.0.options)
2816                .await
2817                .map(gax::response::Response::into_body)
2818        }
2819
2820        /// Sets the value of [name][crate::model::GetNodeTypeRequest::name].
2821        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2822            self.0.request.name = v.into();
2823            self
2824        }
2825    }
2826
2827    #[doc(hidden)]
2828    impl gax::options::internal::RequestBuilder for GetNodeType {
2829        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2830            &mut self.0.options
2831        }
2832    }
2833
2834    /// The request builder for [VmwareEngine::show_nsx_credentials][super::super::client::VmwareEngine::show_nsx_credentials] calls.
2835    #[derive(Clone, Debug)]
2836    pub struct ShowNsxCredentials(RequestBuilder<crate::model::ShowNsxCredentialsRequest>);
2837
2838    impl ShowNsxCredentials {
2839        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2840            Self(RequestBuilder::new(stub))
2841        }
2842
2843        /// Sets the full request, replacing any prior values.
2844        pub fn with_request<V: Into<crate::model::ShowNsxCredentialsRequest>>(
2845            mut self,
2846            v: V,
2847        ) -> Self {
2848            self.0.request = v.into();
2849            self
2850        }
2851
2852        /// Sets all the options, replacing any prior values.
2853        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2854            self.0.options = v.into();
2855            self
2856        }
2857
2858        /// Sends the request.
2859        pub async fn send(self) -> Result<crate::model::Credentials> {
2860            (*self.0.stub)
2861                .show_nsx_credentials(self.0.request, self.0.options)
2862                .await
2863                .map(gax::response::Response::into_body)
2864        }
2865
2866        /// Sets the value of [private_cloud][crate::model::ShowNsxCredentialsRequest::private_cloud].
2867        pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
2868            self.0.request.private_cloud = v.into();
2869            self
2870        }
2871    }
2872
2873    #[doc(hidden)]
2874    impl gax::options::internal::RequestBuilder for ShowNsxCredentials {
2875        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2876            &mut self.0.options
2877        }
2878    }
2879
2880    /// The request builder for [VmwareEngine::show_vcenter_credentials][super::super::client::VmwareEngine::show_vcenter_credentials] calls.
2881    #[derive(Clone, Debug)]
2882    pub struct ShowVcenterCredentials(RequestBuilder<crate::model::ShowVcenterCredentialsRequest>);
2883
2884    impl ShowVcenterCredentials {
2885        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2886            Self(RequestBuilder::new(stub))
2887        }
2888
2889        /// Sets the full request, replacing any prior values.
2890        pub fn with_request<V: Into<crate::model::ShowVcenterCredentialsRequest>>(
2891            mut self,
2892            v: V,
2893        ) -> Self {
2894            self.0.request = v.into();
2895            self
2896        }
2897
2898        /// Sets all the options, replacing any prior values.
2899        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2900            self.0.options = v.into();
2901            self
2902        }
2903
2904        /// Sends the request.
2905        pub async fn send(self) -> Result<crate::model::Credentials> {
2906            (*self.0.stub)
2907                .show_vcenter_credentials(self.0.request, self.0.options)
2908                .await
2909                .map(gax::response::Response::into_body)
2910        }
2911
2912        /// Sets the value of [private_cloud][crate::model::ShowVcenterCredentialsRequest::private_cloud].
2913        pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
2914            self.0.request.private_cloud = v.into();
2915            self
2916        }
2917
2918        /// Sets the value of [username][crate::model::ShowVcenterCredentialsRequest::username].
2919        pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
2920            self.0.request.username = v.into();
2921            self
2922        }
2923    }
2924
2925    #[doc(hidden)]
2926    impl gax::options::internal::RequestBuilder for ShowVcenterCredentials {
2927        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2928            &mut self.0.options
2929        }
2930    }
2931
2932    /// The request builder for [VmwareEngine::reset_nsx_credentials][super::super::client::VmwareEngine::reset_nsx_credentials] calls.
2933    #[derive(Clone, Debug)]
2934    pub struct ResetNsxCredentials(RequestBuilder<crate::model::ResetNsxCredentialsRequest>);
2935
2936    impl ResetNsxCredentials {
2937        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
2938            Self(RequestBuilder::new(stub))
2939        }
2940
2941        /// Sets the full request, replacing any prior values.
2942        pub fn with_request<V: Into<crate::model::ResetNsxCredentialsRequest>>(
2943            mut self,
2944            v: V,
2945        ) -> Self {
2946            self.0.request = v.into();
2947            self
2948        }
2949
2950        /// Sets all the options, replacing any prior values.
2951        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2952            self.0.options = v.into();
2953            self
2954        }
2955
2956        /// Sends the request.
2957        ///
2958        /// # Long running operations
2959        ///
2960        /// This starts, but does not poll, a longrunning operation. More information
2961        /// on [reset_nsx_credentials][super::super::client::VmwareEngine::reset_nsx_credentials].
2962        pub async fn send(self) -> Result<longrunning::model::Operation> {
2963            (*self.0.stub)
2964                .reset_nsx_credentials(self.0.request, self.0.options)
2965                .await
2966                .map(gax::response::Response::into_body)
2967        }
2968
2969        /// Creates a [Poller][lro::Poller] to work with `reset_nsx_credentials`.
2970        pub fn poller(
2971            self,
2972        ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
2973            type Operation =
2974                lro::Operation<crate::model::PrivateCloud, crate::model::OperationMetadata>;
2975            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2976            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2977
2978            let stub = self.0.stub.clone();
2979            let mut options = self.0.options.clone();
2980            options.set_retry_policy(gax::retry_policy::NeverRetry);
2981            let query = move |name| {
2982                let stub = stub.clone();
2983                let options = options.clone();
2984                async {
2985                    let op = GetOperation::new(stub)
2986                        .set_name(name)
2987                        .with_options(options)
2988                        .send()
2989                        .await?;
2990                    Ok(Operation::new(op))
2991                }
2992            };
2993
2994            let start = move || async {
2995                let op = self.send().await?;
2996                Ok(Operation::new(op))
2997            };
2998
2999            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3000        }
3001
3002        /// Sets the value of [private_cloud][crate::model::ResetNsxCredentialsRequest::private_cloud].
3003        pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
3004            self.0.request.private_cloud = v.into();
3005            self
3006        }
3007
3008        /// Sets the value of [request_id][crate::model::ResetNsxCredentialsRequest::request_id].
3009        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3010            self.0.request.request_id = v.into();
3011            self
3012        }
3013    }
3014
3015    #[doc(hidden)]
3016    impl gax::options::internal::RequestBuilder for ResetNsxCredentials {
3017        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3018            &mut self.0.options
3019        }
3020    }
3021
3022    /// The request builder for [VmwareEngine::reset_vcenter_credentials][super::super::client::VmwareEngine::reset_vcenter_credentials] calls.
3023    #[derive(Clone, Debug)]
3024    pub struct ResetVcenterCredentials(
3025        RequestBuilder<crate::model::ResetVcenterCredentialsRequest>,
3026    );
3027
3028    impl ResetVcenterCredentials {
3029        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3030            Self(RequestBuilder::new(stub))
3031        }
3032
3033        /// Sets the full request, replacing any prior values.
3034        pub fn with_request<V: Into<crate::model::ResetVcenterCredentialsRequest>>(
3035            mut self,
3036            v: V,
3037        ) -> Self {
3038            self.0.request = v.into();
3039            self
3040        }
3041
3042        /// Sets all the options, replacing any prior values.
3043        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3044            self.0.options = v.into();
3045            self
3046        }
3047
3048        /// Sends the request.
3049        ///
3050        /// # Long running operations
3051        ///
3052        /// This starts, but does not poll, a longrunning operation. More information
3053        /// on [reset_vcenter_credentials][super::super::client::VmwareEngine::reset_vcenter_credentials].
3054        pub async fn send(self) -> Result<longrunning::model::Operation> {
3055            (*self.0.stub)
3056                .reset_vcenter_credentials(self.0.request, self.0.options)
3057                .await
3058                .map(gax::response::Response::into_body)
3059        }
3060
3061        /// Creates a [Poller][lro::Poller] to work with `reset_vcenter_credentials`.
3062        pub fn poller(
3063            self,
3064        ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
3065            type Operation =
3066                lro::Operation<crate::model::PrivateCloud, crate::model::OperationMetadata>;
3067            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3068            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3069
3070            let stub = self.0.stub.clone();
3071            let mut options = self.0.options.clone();
3072            options.set_retry_policy(gax::retry_policy::NeverRetry);
3073            let query = move |name| {
3074                let stub = stub.clone();
3075                let options = options.clone();
3076                async {
3077                    let op = GetOperation::new(stub)
3078                        .set_name(name)
3079                        .with_options(options)
3080                        .send()
3081                        .await?;
3082                    Ok(Operation::new(op))
3083                }
3084            };
3085
3086            let start = move || async {
3087                let op = self.send().await?;
3088                Ok(Operation::new(op))
3089            };
3090
3091            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3092        }
3093
3094        /// Sets the value of [private_cloud][crate::model::ResetVcenterCredentialsRequest::private_cloud].
3095        pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
3096            self.0.request.private_cloud = v.into();
3097            self
3098        }
3099
3100        /// Sets the value of [request_id][crate::model::ResetVcenterCredentialsRequest::request_id].
3101        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3102            self.0.request.request_id = v.into();
3103            self
3104        }
3105
3106        /// Sets the value of [username][crate::model::ResetVcenterCredentialsRequest::username].
3107        pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
3108            self.0.request.username = v.into();
3109            self
3110        }
3111    }
3112
3113    #[doc(hidden)]
3114    impl gax::options::internal::RequestBuilder for ResetVcenterCredentials {
3115        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3116            &mut self.0.options
3117        }
3118    }
3119
3120    /// The request builder for [VmwareEngine::get_dns_forwarding][super::super::client::VmwareEngine::get_dns_forwarding] calls.
3121    #[derive(Clone, Debug)]
3122    pub struct GetDnsForwarding(RequestBuilder<crate::model::GetDnsForwardingRequest>);
3123
3124    impl GetDnsForwarding {
3125        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3126            Self(RequestBuilder::new(stub))
3127        }
3128
3129        /// Sets the full request, replacing any prior values.
3130        pub fn with_request<V: Into<crate::model::GetDnsForwardingRequest>>(
3131            mut self,
3132            v: V,
3133        ) -> Self {
3134            self.0.request = v.into();
3135            self
3136        }
3137
3138        /// Sets all the options, replacing any prior values.
3139        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3140            self.0.options = v.into();
3141            self
3142        }
3143
3144        /// Sends the request.
3145        pub async fn send(self) -> Result<crate::model::DnsForwarding> {
3146            (*self.0.stub)
3147                .get_dns_forwarding(self.0.request, self.0.options)
3148                .await
3149                .map(gax::response::Response::into_body)
3150        }
3151
3152        /// Sets the value of [name][crate::model::GetDnsForwardingRequest::name].
3153        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3154            self.0.request.name = v.into();
3155            self
3156        }
3157    }
3158
3159    #[doc(hidden)]
3160    impl gax::options::internal::RequestBuilder for GetDnsForwarding {
3161        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3162            &mut self.0.options
3163        }
3164    }
3165
3166    /// The request builder for [VmwareEngine::update_dns_forwarding][super::super::client::VmwareEngine::update_dns_forwarding] calls.
3167    #[derive(Clone, Debug)]
3168    pub struct UpdateDnsForwarding(RequestBuilder<crate::model::UpdateDnsForwardingRequest>);
3169
3170    impl UpdateDnsForwarding {
3171        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3172            Self(RequestBuilder::new(stub))
3173        }
3174
3175        /// Sets the full request, replacing any prior values.
3176        pub fn with_request<V: Into<crate::model::UpdateDnsForwardingRequest>>(
3177            mut self,
3178            v: V,
3179        ) -> Self {
3180            self.0.request = v.into();
3181            self
3182        }
3183
3184        /// Sets all the options, replacing any prior values.
3185        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3186            self.0.options = v.into();
3187            self
3188        }
3189
3190        /// Sends the request.
3191        ///
3192        /// # Long running operations
3193        ///
3194        /// This starts, but does not poll, a longrunning operation. More information
3195        /// on [update_dns_forwarding][super::super::client::VmwareEngine::update_dns_forwarding].
3196        pub async fn send(self) -> Result<longrunning::model::Operation> {
3197            (*self.0.stub)
3198                .update_dns_forwarding(self.0.request, self.0.options)
3199                .await
3200                .map(gax::response::Response::into_body)
3201        }
3202
3203        /// Creates a [Poller][lro::Poller] to work with `update_dns_forwarding`.
3204        pub fn poller(
3205            self,
3206        ) -> impl lro::Poller<crate::model::DnsForwarding, crate::model::OperationMetadata>
3207        {
3208            type Operation =
3209                lro::Operation<crate::model::DnsForwarding, crate::model::OperationMetadata>;
3210            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3211            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3212
3213            let stub = self.0.stub.clone();
3214            let mut options = self.0.options.clone();
3215            options.set_retry_policy(gax::retry_policy::NeverRetry);
3216            let query = move |name| {
3217                let stub = stub.clone();
3218                let options = options.clone();
3219                async {
3220                    let op = GetOperation::new(stub)
3221                        .set_name(name)
3222                        .with_options(options)
3223                        .send()
3224                        .await?;
3225                    Ok(Operation::new(op))
3226                }
3227            };
3228
3229            let start = move || async {
3230                let op = self.send().await?;
3231                Ok(Operation::new(op))
3232            };
3233
3234            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3235        }
3236
3237        /// Sets the value of [dns_forwarding][crate::model::UpdateDnsForwardingRequest::dns_forwarding].
3238        pub fn set_dns_forwarding<T: Into<std::option::Option<crate::model::DnsForwarding>>>(
3239            mut self,
3240            v: T,
3241        ) -> Self {
3242            self.0.request.dns_forwarding = v.into();
3243            self
3244        }
3245
3246        /// Sets the value of [update_mask][crate::model::UpdateDnsForwardingRequest::update_mask].
3247        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
3248            mut self,
3249            v: T,
3250        ) -> Self {
3251            self.0.request.update_mask = v.into();
3252            self
3253        }
3254
3255        /// Sets the value of [request_id][crate::model::UpdateDnsForwardingRequest::request_id].
3256        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3257            self.0.request.request_id = v.into();
3258            self
3259        }
3260    }
3261
3262    #[doc(hidden)]
3263    impl gax::options::internal::RequestBuilder for UpdateDnsForwarding {
3264        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3265            &mut self.0.options
3266        }
3267    }
3268
3269    /// The request builder for [VmwareEngine::get_network_peering][super::super::client::VmwareEngine::get_network_peering] calls.
3270    #[derive(Clone, Debug)]
3271    pub struct GetNetworkPeering(RequestBuilder<crate::model::GetNetworkPeeringRequest>);
3272
3273    impl GetNetworkPeering {
3274        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3275            Self(RequestBuilder::new(stub))
3276        }
3277
3278        /// Sets the full request, replacing any prior values.
3279        pub fn with_request<V: Into<crate::model::GetNetworkPeeringRequest>>(
3280            mut self,
3281            v: V,
3282        ) -> Self {
3283            self.0.request = v.into();
3284            self
3285        }
3286
3287        /// Sets all the options, replacing any prior values.
3288        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3289            self.0.options = v.into();
3290            self
3291        }
3292
3293        /// Sends the request.
3294        pub async fn send(self) -> Result<crate::model::NetworkPeering> {
3295            (*self.0.stub)
3296                .get_network_peering(self.0.request, self.0.options)
3297                .await
3298                .map(gax::response::Response::into_body)
3299        }
3300
3301        /// Sets the value of [name][crate::model::GetNetworkPeeringRequest::name].
3302        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3303            self.0.request.name = v.into();
3304            self
3305        }
3306    }
3307
3308    #[doc(hidden)]
3309    impl gax::options::internal::RequestBuilder for GetNetworkPeering {
3310        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3311            &mut self.0.options
3312        }
3313    }
3314
3315    /// The request builder for [VmwareEngine::list_network_peerings][super::super::client::VmwareEngine::list_network_peerings] calls.
3316    #[derive(Clone, Debug)]
3317    pub struct ListNetworkPeerings(RequestBuilder<crate::model::ListNetworkPeeringsRequest>);
3318
3319    impl ListNetworkPeerings {
3320        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3321            Self(RequestBuilder::new(stub))
3322        }
3323
3324        /// Sets the full request, replacing any prior values.
3325        pub fn with_request<V: Into<crate::model::ListNetworkPeeringsRequest>>(
3326            mut self,
3327            v: V,
3328        ) -> Self {
3329            self.0.request = v.into();
3330            self
3331        }
3332
3333        /// Sets all the options, replacing any prior values.
3334        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3335            self.0.options = v.into();
3336            self
3337        }
3338
3339        /// Sends the request.
3340        pub async fn send(self) -> Result<crate::model::ListNetworkPeeringsResponse> {
3341            (*self.0.stub)
3342                .list_network_peerings(self.0.request, self.0.options)
3343                .await
3344                .map(gax::response::Response::into_body)
3345        }
3346
3347        /// Streams the responses back.
3348        pub async fn paginator(
3349            self,
3350        ) -> impl gax::paginator::Paginator<crate::model::ListNetworkPeeringsResponse, gax::error::Error>
3351        {
3352            use std::clone::Clone;
3353            let token = self.0.request.page_token.clone();
3354            let execute = move |token: String| {
3355                let mut builder = self.clone();
3356                builder.0.request = builder.0.request.set_page_token(token);
3357                builder.send()
3358            };
3359            gax::paginator::internal::new_paginator(token, execute)
3360        }
3361
3362        /// Sets the value of [parent][crate::model::ListNetworkPeeringsRequest::parent].
3363        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3364            self.0.request.parent = v.into();
3365            self
3366        }
3367
3368        /// Sets the value of [page_size][crate::model::ListNetworkPeeringsRequest::page_size].
3369        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3370            self.0.request.page_size = v.into();
3371            self
3372        }
3373
3374        /// Sets the value of [page_token][crate::model::ListNetworkPeeringsRequest::page_token].
3375        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3376            self.0.request.page_token = v.into();
3377            self
3378        }
3379
3380        /// Sets the value of [filter][crate::model::ListNetworkPeeringsRequest::filter].
3381        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3382            self.0.request.filter = v.into();
3383            self
3384        }
3385
3386        /// Sets the value of [order_by][crate::model::ListNetworkPeeringsRequest::order_by].
3387        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3388            self.0.request.order_by = v.into();
3389            self
3390        }
3391    }
3392
3393    #[doc(hidden)]
3394    impl gax::options::internal::RequestBuilder for ListNetworkPeerings {
3395        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3396            &mut self.0.options
3397        }
3398    }
3399
3400    /// The request builder for [VmwareEngine::create_network_peering][super::super::client::VmwareEngine::create_network_peering] calls.
3401    #[derive(Clone, Debug)]
3402    pub struct CreateNetworkPeering(RequestBuilder<crate::model::CreateNetworkPeeringRequest>);
3403
3404    impl CreateNetworkPeering {
3405        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3406            Self(RequestBuilder::new(stub))
3407        }
3408
3409        /// Sets the full request, replacing any prior values.
3410        pub fn with_request<V: Into<crate::model::CreateNetworkPeeringRequest>>(
3411            mut self,
3412            v: V,
3413        ) -> Self {
3414            self.0.request = v.into();
3415            self
3416        }
3417
3418        /// Sets all the options, replacing any prior values.
3419        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3420            self.0.options = v.into();
3421            self
3422        }
3423
3424        /// Sends the request.
3425        ///
3426        /// # Long running operations
3427        ///
3428        /// This starts, but does not poll, a longrunning operation. More information
3429        /// on [create_network_peering][super::super::client::VmwareEngine::create_network_peering].
3430        pub async fn send(self) -> Result<longrunning::model::Operation> {
3431            (*self.0.stub)
3432                .create_network_peering(self.0.request, self.0.options)
3433                .await
3434                .map(gax::response::Response::into_body)
3435        }
3436
3437        /// Creates a [Poller][lro::Poller] to work with `create_network_peering`.
3438        pub fn poller(
3439            self,
3440        ) -> impl lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
3441        {
3442            type Operation =
3443                lro::Operation<crate::model::NetworkPeering, crate::model::OperationMetadata>;
3444            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3445            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3446
3447            let stub = self.0.stub.clone();
3448            let mut options = self.0.options.clone();
3449            options.set_retry_policy(gax::retry_policy::NeverRetry);
3450            let query = move |name| {
3451                let stub = stub.clone();
3452                let options = options.clone();
3453                async {
3454                    let op = GetOperation::new(stub)
3455                        .set_name(name)
3456                        .with_options(options)
3457                        .send()
3458                        .await?;
3459                    Ok(Operation::new(op))
3460                }
3461            };
3462
3463            let start = move || async {
3464                let op = self.send().await?;
3465                Ok(Operation::new(op))
3466            };
3467
3468            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3469        }
3470
3471        /// Sets the value of [parent][crate::model::CreateNetworkPeeringRequest::parent].
3472        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3473            self.0.request.parent = v.into();
3474            self
3475        }
3476
3477        /// Sets the value of [network_peering_id][crate::model::CreateNetworkPeeringRequest::network_peering_id].
3478        pub fn set_network_peering_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3479            self.0.request.network_peering_id = v.into();
3480            self
3481        }
3482
3483        /// Sets the value of [network_peering][crate::model::CreateNetworkPeeringRequest::network_peering].
3484        pub fn set_network_peering<T: Into<std::option::Option<crate::model::NetworkPeering>>>(
3485            mut self,
3486            v: T,
3487        ) -> Self {
3488            self.0.request.network_peering = v.into();
3489            self
3490        }
3491
3492        /// Sets the value of [request_id][crate::model::CreateNetworkPeeringRequest::request_id].
3493        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3494            self.0.request.request_id = v.into();
3495            self
3496        }
3497    }
3498
3499    #[doc(hidden)]
3500    impl gax::options::internal::RequestBuilder for CreateNetworkPeering {
3501        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3502            &mut self.0.options
3503        }
3504    }
3505
3506    /// The request builder for [VmwareEngine::delete_network_peering][super::super::client::VmwareEngine::delete_network_peering] calls.
3507    #[derive(Clone, Debug)]
3508    pub struct DeleteNetworkPeering(RequestBuilder<crate::model::DeleteNetworkPeeringRequest>);
3509
3510    impl DeleteNetworkPeering {
3511        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3512            Self(RequestBuilder::new(stub))
3513        }
3514
3515        /// Sets the full request, replacing any prior values.
3516        pub fn with_request<V: Into<crate::model::DeleteNetworkPeeringRequest>>(
3517            mut self,
3518            v: V,
3519        ) -> Self {
3520            self.0.request = v.into();
3521            self
3522        }
3523
3524        /// Sets all the options, replacing any prior values.
3525        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3526            self.0.options = v.into();
3527            self
3528        }
3529
3530        /// Sends the request.
3531        ///
3532        /// # Long running operations
3533        ///
3534        /// This starts, but does not poll, a longrunning operation. More information
3535        /// on [delete_network_peering][super::super::client::VmwareEngine::delete_network_peering].
3536        pub async fn send(self) -> Result<longrunning::model::Operation> {
3537            (*self.0.stub)
3538                .delete_network_peering(self.0.request, self.0.options)
3539                .await
3540                .map(gax::response::Response::into_body)
3541        }
3542
3543        /// Creates a [Poller][lro::Poller] to work with `delete_network_peering`.
3544        pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
3545            type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
3546            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3547            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3548
3549            let stub = self.0.stub.clone();
3550            let mut options = self.0.options.clone();
3551            options.set_retry_policy(gax::retry_policy::NeverRetry);
3552            let query = move |name| {
3553                let stub = stub.clone();
3554                let options = options.clone();
3555                async {
3556                    let op = GetOperation::new(stub)
3557                        .set_name(name)
3558                        .with_options(options)
3559                        .send()
3560                        .await?;
3561                    Ok(Operation::new(op))
3562                }
3563            };
3564
3565            let start = move || async {
3566                let op = self.send().await?;
3567                Ok(Operation::new(op))
3568            };
3569
3570            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3571        }
3572
3573        /// Sets the value of [name][crate::model::DeleteNetworkPeeringRequest::name].
3574        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3575            self.0.request.name = v.into();
3576            self
3577        }
3578
3579        /// Sets the value of [request_id][crate::model::DeleteNetworkPeeringRequest::request_id].
3580        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3581            self.0.request.request_id = v.into();
3582            self
3583        }
3584    }
3585
3586    #[doc(hidden)]
3587    impl gax::options::internal::RequestBuilder for DeleteNetworkPeering {
3588        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3589            &mut self.0.options
3590        }
3591    }
3592
3593    /// The request builder for [VmwareEngine::update_network_peering][super::super::client::VmwareEngine::update_network_peering] calls.
3594    #[derive(Clone, Debug)]
3595    pub struct UpdateNetworkPeering(RequestBuilder<crate::model::UpdateNetworkPeeringRequest>);
3596
3597    impl UpdateNetworkPeering {
3598        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3599            Self(RequestBuilder::new(stub))
3600        }
3601
3602        /// Sets the full request, replacing any prior values.
3603        pub fn with_request<V: Into<crate::model::UpdateNetworkPeeringRequest>>(
3604            mut self,
3605            v: V,
3606        ) -> Self {
3607            self.0.request = v.into();
3608            self
3609        }
3610
3611        /// Sets all the options, replacing any prior values.
3612        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3613            self.0.options = v.into();
3614            self
3615        }
3616
3617        /// Sends the request.
3618        ///
3619        /// # Long running operations
3620        ///
3621        /// This starts, but does not poll, a longrunning operation. More information
3622        /// on [update_network_peering][super::super::client::VmwareEngine::update_network_peering].
3623        pub async fn send(self) -> Result<longrunning::model::Operation> {
3624            (*self.0.stub)
3625                .update_network_peering(self.0.request, self.0.options)
3626                .await
3627                .map(gax::response::Response::into_body)
3628        }
3629
3630        /// Creates a [Poller][lro::Poller] to work with `update_network_peering`.
3631        pub fn poller(
3632            self,
3633        ) -> impl lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
3634        {
3635            type Operation =
3636                lro::Operation<crate::model::NetworkPeering, crate::model::OperationMetadata>;
3637            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3638            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3639
3640            let stub = self.0.stub.clone();
3641            let mut options = self.0.options.clone();
3642            options.set_retry_policy(gax::retry_policy::NeverRetry);
3643            let query = move |name| {
3644                let stub = stub.clone();
3645                let options = options.clone();
3646                async {
3647                    let op = GetOperation::new(stub)
3648                        .set_name(name)
3649                        .with_options(options)
3650                        .send()
3651                        .await?;
3652                    Ok(Operation::new(op))
3653                }
3654            };
3655
3656            let start = move || async {
3657                let op = self.send().await?;
3658                Ok(Operation::new(op))
3659            };
3660
3661            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3662        }
3663
3664        /// Sets the value of [network_peering][crate::model::UpdateNetworkPeeringRequest::network_peering].
3665        pub fn set_network_peering<T: Into<std::option::Option<crate::model::NetworkPeering>>>(
3666            mut self,
3667            v: T,
3668        ) -> Self {
3669            self.0.request.network_peering = v.into();
3670            self
3671        }
3672
3673        /// Sets the value of [update_mask][crate::model::UpdateNetworkPeeringRequest::update_mask].
3674        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
3675            mut self,
3676            v: T,
3677        ) -> Self {
3678            self.0.request.update_mask = v.into();
3679            self
3680        }
3681
3682        /// Sets the value of [request_id][crate::model::UpdateNetworkPeeringRequest::request_id].
3683        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3684            self.0.request.request_id = v.into();
3685            self
3686        }
3687    }
3688
3689    #[doc(hidden)]
3690    impl gax::options::internal::RequestBuilder for UpdateNetworkPeering {
3691        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3692            &mut self.0.options
3693        }
3694    }
3695
3696    /// The request builder for [VmwareEngine::list_peering_routes][super::super::client::VmwareEngine::list_peering_routes] calls.
3697    #[derive(Clone, Debug)]
3698    pub struct ListPeeringRoutes(RequestBuilder<crate::model::ListPeeringRoutesRequest>);
3699
3700    impl ListPeeringRoutes {
3701        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3702            Self(RequestBuilder::new(stub))
3703        }
3704
3705        /// Sets the full request, replacing any prior values.
3706        pub fn with_request<V: Into<crate::model::ListPeeringRoutesRequest>>(
3707            mut self,
3708            v: V,
3709        ) -> Self {
3710            self.0.request = v.into();
3711            self
3712        }
3713
3714        /// Sets all the options, replacing any prior values.
3715        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3716            self.0.options = v.into();
3717            self
3718        }
3719
3720        /// Sends the request.
3721        pub async fn send(self) -> Result<crate::model::ListPeeringRoutesResponse> {
3722            (*self.0.stub)
3723                .list_peering_routes(self.0.request, self.0.options)
3724                .await
3725                .map(gax::response::Response::into_body)
3726        }
3727
3728        /// Streams the responses back.
3729        pub async fn paginator(
3730            self,
3731        ) -> impl gax::paginator::Paginator<crate::model::ListPeeringRoutesResponse, gax::error::Error>
3732        {
3733            use std::clone::Clone;
3734            let token = self.0.request.page_token.clone();
3735            let execute = move |token: String| {
3736                let mut builder = self.clone();
3737                builder.0.request = builder.0.request.set_page_token(token);
3738                builder.send()
3739            };
3740            gax::paginator::internal::new_paginator(token, execute)
3741        }
3742
3743        /// Sets the value of [parent][crate::model::ListPeeringRoutesRequest::parent].
3744        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3745            self.0.request.parent = v.into();
3746            self
3747        }
3748
3749        /// Sets the value of [page_size][crate::model::ListPeeringRoutesRequest::page_size].
3750        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3751            self.0.request.page_size = v.into();
3752            self
3753        }
3754
3755        /// Sets the value of [page_token][crate::model::ListPeeringRoutesRequest::page_token].
3756        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3757            self.0.request.page_token = v.into();
3758            self
3759        }
3760
3761        /// Sets the value of [filter][crate::model::ListPeeringRoutesRequest::filter].
3762        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3763            self.0.request.filter = v.into();
3764            self
3765        }
3766    }
3767
3768    #[doc(hidden)]
3769    impl gax::options::internal::RequestBuilder for ListPeeringRoutes {
3770        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3771            &mut self.0.options
3772        }
3773    }
3774
3775    /// The request builder for [VmwareEngine::create_hcx_activation_key][super::super::client::VmwareEngine::create_hcx_activation_key] calls.
3776    #[derive(Clone, Debug)]
3777    pub struct CreateHcxActivationKey(RequestBuilder<crate::model::CreateHcxActivationKeyRequest>);
3778
3779    impl CreateHcxActivationKey {
3780        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3781            Self(RequestBuilder::new(stub))
3782        }
3783
3784        /// Sets the full request, replacing any prior values.
3785        pub fn with_request<V: Into<crate::model::CreateHcxActivationKeyRequest>>(
3786            mut self,
3787            v: V,
3788        ) -> Self {
3789            self.0.request = v.into();
3790            self
3791        }
3792
3793        /// Sets all the options, replacing any prior values.
3794        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3795            self.0.options = v.into();
3796            self
3797        }
3798
3799        /// Sends the request.
3800        ///
3801        /// # Long running operations
3802        ///
3803        /// This starts, but does not poll, a longrunning operation. More information
3804        /// on [create_hcx_activation_key][super::super::client::VmwareEngine::create_hcx_activation_key].
3805        pub async fn send(self) -> Result<longrunning::model::Operation> {
3806            (*self.0.stub)
3807                .create_hcx_activation_key(self.0.request, self.0.options)
3808                .await
3809                .map(gax::response::Response::into_body)
3810        }
3811
3812        /// Creates a [Poller][lro::Poller] to work with `create_hcx_activation_key`.
3813        pub fn poller(
3814            self,
3815        ) -> impl lro::Poller<crate::model::HcxActivationKey, crate::model::OperationMetadata>
3816        {
3817            type Operation =
3818                lro::Operation<crate::model::HcxActivationKey, crate::model::OperationMetadata>;
3819            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3820            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3821
3822            let stub = self.0.stub.clone();
3823            let mut options = self.0.options.clone();
3824            options.set_retry_policy(gax::retry_policy::NeverRetry);
3825            let query = move |name| {
3826                let stub = stub.clone();
3827                let options = options.clone();
3828                async {
3829                    let op = GetOperation::new(stub)
3830                        .set_name(name)
3831                        .with_options(options)
3832                        .send()
3833                        .await?;
3834                    Ok(Operation::new(op))
3835                }
3836            };
3837
3838            let start = move || async {
3839                let op = self.send().await?;
3840                Ok(Operation::new(op))
3841            };
3842
3843            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3844        }
3845
3846        /// Sets the value of [parent][crate::model::CreateHcxActivationKeyRequest::parent].
3847        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3848            self.0.request.parent = v.into();
3849            self
3850        }
3851
3852        /// Sets the value of [hcx_activation_key][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key].
3853        pub fn set_hcx_activation_key<
3854            T: Into<std::option::Option<crate::model::HcxActivationKey>>,
3855        >(
3856            mut self,
3857            v: T,
3858        ) -> Self {
3859            self.0.request.hcx_activation_key = v.into();
3860            self
3861        }
3862
3863        /// Sets the value of [hcx_activation_key_id][crate::model::CreateHcxActivationKeyRequest::hcx_activation_key_id].
3864        pub fn set_hcx_activation_key_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3865            self.0.request.hcx_activation_key_id = v.into();
3866            self
3867        }
3868
3869        /// Sets the value of [request_id][crate::model::CreateHcxActivationKeyRequest::request_id].
3870        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3871            self.0.request.request_id = v.into();
3872            self
3873        }
3874    }
3875
3876    #[doc(hidden)]
3877    impl gax::options::internal::RequestBuilder for CreateHcxActivationKey {
3878        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3879            &mut self.0.options
3880        }
3881    }
3882
3883    /// The request builder for [VmwareEngine::list_hcx_activation_keys][super::super::client::VmwareEngine::list_hcx_activation_keys] calls.
3884    #[derive(Clone, Debug)]
3885    pub struct ListHcxActivationKeys(RequestBuilder<crate::model::ListHcxActivationKeysRequest>);
3886
3887    impl ListHcxActivationKeys {
3888        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3889            Self(RequestBuilder::new(stub))
3890        }
3891
3892        /// Sets the full request, replacing any prior values.
3893        pub fn with_request<V: Into<crate::model::ListHcxActivationKeysRequest>>(
3894            mut self,
3895            v: V,
3896        ) -> Self {
3897            self.0.request = v.into();
3898            self
3899        }
3900
3901        /// Sets all the options, replacing any prior values.
3902        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3903            self.0.options = v.into();
3904            self
3905        }
3906
3907        /// Sends the request.
3908        pub async fn send(self) -> Result<crate::model::ListHcxActivationKeysResponse> {
3909            (*self.0.stub)
3910                .list_hcx_activation_keys(self.0.request, self.0.options)
3911                .await
3912                .map(gax::response::Response::into_body)
3913        }
3914
3915        /// Streams the responses back.
3916        pub async fn paginator(
3917            self,
3918        ) -> impl gax::paginator::Paginator<crate::model::ListHcxActivationKeysResponse, gax::error::Error>
3919        {
3920            use std::clone::Clone;
3921            let token = self.0.request.page_token.clone();
3922            let execute = move |token: String| {
3923                let mut builder = self.clone();
3924                builder.0.request = builder.0.request.set_page_token(token);
3925                builder.send()
3926            };
3927            gax::paginator::internal::new_paginator(token, execute)
3928        }
3929
3930        /// Sets the value of [parent][crate::model::ListHcxActivationKeysRequest::parent].
3931        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3932            self.0.request.parent = v.into();
3933            self
3934        }
3935
3936        /// Sets the value of [page_size][crate::model::ListHcxActivationKeysRequest::page_size].
3937        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3938            self.0.request.page_size = v.into();
3939            self
3940        }
3941
3942        /// Sets the value of [page_token][crate::model::ListHcxActivationKeysRequest::page_token].
3943        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3944            self.0.request.page_token = v.into();
3945            self
3946        }
3947    }
3948
3949    #[doc(hidden)]
3950    impl gax::options::internal::RequestBuilder for ListHcxActivationKeys {
3951        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3952            &mut self.0.options
3953        }
3954    }
3955
3956    /// The request builder for [VmwareEngine::get_hcx_activation_key][super::super::client::VmwareEngine::get_hcx_activation_key] calls.
3957    #[derive(Clone, Debug)]
3958    pub struct GetHcxActivationKey(RequestBuilder<crate::model::GetHcxActivationKeyRequest>);
3959
3960    impl GetHcxActivationKey {
3961        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
3962            Self(RequestBuilder::new(stub))
3963        }
3964
3965        /// Sets the full request, replacing any prior values.
3966        pub fn with_request<V: Into<crate::model::GetHcxActivationKeyRequest>>(
3967            mut self,
3968            v: V,
3969        ) -> Self {
3970            self.0.request = v.into();
3971            self
3972        }
3973
3974        /// Sets all the options, replacing any prior values.
3975        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3976            self.0.options = v.into();
3977            self
3978        }
3979
3980        /// Sends the request.
3981        pub async fn send(self) -> Result<crate::model::HcxActivationKey> {
3982            (*self.0.stub)
3983                .get_hcx_activation_key(self.0.request, self.0.options)
3984                .await
3985                .map(gax::response::Response::into_body)
3986        }
3987
3988        /// Sets the value of [name][crate::model::GetHcxActivationKeyRequest::name].
3989        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3990            self.0.request.name = v.into();
3991            self
3992        }
3993    }
3994
3995    #[doc(hidden)]
3996    impl gax::options::internal::RequestBuilder for GetHcxActivationKey {
3997        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3998            &mut self.0.options
3999        }
4000    }
4001
4002    /// The request builder for [VmwareEngine::get_network_policy][super::super::client::VmwareEngine::get_network_policy] calls.
4003    #[derive(Clone, Debug)]
4004    pub struct GetNetworkPolicy(RequestBuilder<crate::model::GetNetworkPolicyRequest>);
4005
4006    impl GetNetworkPolicy {
4007        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4008            Self(RequestBuilder::new(stub))
4009        }
4010
4011        /// Sets the full request, replacing any prior values.
4012        pub fn with_request<V: Into<crate::model::GetNetworkPolicyRequest>>(
4013            mut self,
4014            v: V,
4015        ) -> Self {
4016            self.0.request = v.into();
4017            self
4018        }
4019
4020        /// Sets all the options, replacing any prior values.
4021        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4022            self.0.options = v.into();
4023            self
4024        }
4025
4026        /// Sends the request.
4027        pub async fn send(self) -> Result<crate::model::NetworkPolicy> {
4028            (*self.0.stub)
4029                .get_network_policy(self.0.request, self.0.options)
4030                .await
4031                .map(gax::response::Response::into_body)
4032        }
4033
4034        /// Sets the value of [name][crate::model::GetNetworkPolicyRequest::name].
4035        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4036            self.0.request.name = v.into();
4037            self
4038        }
4039    }
4040
4041    #[doc(hidden)]
4042    impl gax::options::internal::RequestBuilder for GetNetworkPolicy {
4043        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4044            &mut self.0.options
4045        }
4046    }
4047
4048    /// The request builder for [VmwareEngine::list_network_policies][super::super::client::VmwareEngine::list_network_policies] calls.
4049    #[derive(Clone, Debug)]
4050    pub struct ListNetworkPolicies(RequestBuilder<crate::model::ListNetworkPoliciesRequest>);
4051
4052    impl ListNetworkPolicies {
4053        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4054            Self(RequestBuilder::new(stub))
4055        }
4056
4057        /// Sets the full request, replacing any prior values.
4058        pub fn with_request<V: Into<crate::model::ListNetworkPoliciesRequest>>(
4059            mut self,
4060            v: V,
4061        ) -> Self {
4062            self.0.request = v.into();
4063            self
4064        }
4065
4066        /// Sets all the options, replacing any prior values.
4067        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4068            self.0.options = v.into();
4069            self
4070        }
4071
4072        /// Sends the request.
4073        pub async fn send(self) -> Result<crate::model::ListNetworkPoliciesResponse> {
4074            (*self.0.stub)
4075                .list_network_policies(self.0.request, self.0.options)
4076                .await
4077                .map(gax::response::Response::into_body)
4078        }
4079
4080        /// Streams the responses back.
4081        pub async fn paginator(
4082            self,
4083        ) -> impl gax::paginator::Paginator<crate::model::ListNetworkPoliciesResponse, gax::error::Error>
4084        {
4085            use std::clone::Clone;
4086            let token = self.0.request.page_token.clone();
4087            let execute = move |token: String| {
4088                let mut builder = self.clone();
4089                builder.0.request = builder.0.request.set_page_token(token);
4090                builder.send()
4091            };
4092            gax::paginator::internal::new_paginator(token, execute)
4093        }
4094
4095        /// Sets the value of [parent][crate::model::ListNetworkPoliciesRequest::parent].
4096        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4097            self.0.request.parent = v.into();
4098            self
4099        }
4100
4101        /// Sets the value of [page_size][crate::model::ListNetworkPoliciesRequest::page_size].
4102        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4103            self.0.request.page_size = v.into();
4104            self
4105        }
4106
4107        /// Sets the value of [page_token][crate::model::ListNetworkPoliciesRequest::page_token].
4108        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4109            self.0.request.page_token = v.into();
4110            self
4111        }
4112
4113        /// Sets the value of [filter][crate::model::ListNetworkPoliciesRequest::filter].
4114        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4115            self.0.request.filter = v.into();
4116            self
4117        }
4118
4119        /// Sets the value of [order_by][crate::model::ListNetworkPoliciesRequest::order_by].
4120        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4121            self.0.request.order_by = v.into();
4122            self
4123        }
4124    }
4125
4126    #[doc(hidden)]
4127    impl gax::options::internal::RequestBuilder for ListNetworkPolicies {
4128        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4129            &mut self.0.options
4130        }
4131    }
4132
4133    /// The request builder for [VmwareEngine::create_network_policy][super::super::client::VmwareEngine::create_network_policy] calls.
4134    #[derive(Clone, Debug)]
4135    pub struct CreateNetworkPolicy(RequestBuilder<crate::model::CreateNetworkPolicyRequest>);
4136
4137    impl CreateNetworkPolicy {
4138        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4139            Self(RequestBuilder::new(stub))
4140        }
4141
4142        /// Sets the full request, replacing any prior values.
4143        pub fn with_request<V: Into<crate::model::CreateNetworkPolicyRequest>>(
4144            mut self,
4145            v: V,
4146        ) -> Self {
4147            self.0.request = v.into();
4148            self
4149        }
4150
4151        /// Sets all the options, replacing any prior values.
4152        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4153            self.0.options = v.into();
4154            self
4155        }
4156
4157        /// Sends the request.
4158        ///
4159        /// # Long running operations
4160        ///
4161        /// This starts, but does not poll, a longrunning operation. More information
4162        /// on [create_network_policy][super::super::client::VmwareEngine::create_network_policy].
4163        pub async fn send(self) -> Result<longrunning::model::Operation> {
4164            (*self.0.stub)
4165                .create_network_policy(self.0.request, self.0.options)
4166                .await
4167                .map(gax::response::Response::into_body)
4168        }
4169
4170        /// Creates a [Poller][lro::Poller] to work with `create_network_policy`.
4171        pub fn poller(
4172            self,
4173        ) -> impl lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
4174        {
4175            type Operation =
4176                lro::Operation<crate::model::NetworkPolicy, crate::model::OperationMetadata>;
4177            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4178            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4179
4180            let stub = self.0.stub.clone();
4181            let mut options = self.0.options.clone();
4182            options.set_retry_policy(gax::retry_policy::NeverRetry);
4183            let query = move |name| {
4184                let stub = stub.clone();
4185                let options = options.clone();
4186                async {
4187                    let op = GetOperation::new(stub)
4188                        .set_name(name)
4189                        .with_options(options)
4190                        .send()
4191                        .await?;
4192                    Ok(Operation::new(op))
4193                }
4194            };
4195
4196            let start = move || async {
4197                let op = self.send().await?;
4198                Ok(Operation::new(op))
4199            };
4200
4201            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4202        }
4203
4204        /// Sets the value of [parent][crate::model::CreateNetworkPolicyRequest::parent].
4205        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4206            self.0.request.parent = v.into();
4207            self
4208        }
4209
4210        /// Sets the value of [network_policy_id][crate::model::CreateNetworkPolicyRequest::network_policy_id].
4211        pub fn set_network_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4212            self.0.request.network_policy_id = v.into();
4213            self
4214        }
4215
4216        /// Sets the value of [network_policy][crate::model::CreateNetworkPolicyRequest::network_policy].
4217        pub fn set_network_policy<T: Into<std::option::Option<crate::model::NetworkPolicy>>>(
4218            mut self,
4219            v: T,
4220        ) -> Self {
4221            self.0.request.network_policy = v.into();
4222            self
4223        }
4224
4225        /// Sets the value of [request_id][crate::model::CreateNetworkPolicyRequest::request_id].
4226        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4227            self.0.request.request_id = v.into();
4228            self
4229        }
4230    }
4231
4232    #[doc(hidden)]
4233    impl gax::options::internal::RequestBuilder for CreateNetworkPolicy {
4234        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4235            &mut self.0.options
4236        }
4237    }
4238
4239    /// The request builder for [VmwareEngine::update_network_policy][super::super::client::VmwareEngine::update_network_policy] calls.
4240    #[derive(Clone, Debug)]
4241    pub struct UpdateNetworkPolicy(RequestBuilder<crate::model::UpdateNetworkPolicyRequest>);
4242
4243    impl UpdateNetworkPolicy {
4244        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4245            Self(RequestBuilder::new(stub))
4246        }
4247
4248        /// Sets the full request, replacing any prior values.
4249        pub fn with_request<V: Into<crate::model::UpdateNetworkPolicyRequest>>(
4250            mut self,
4251            v: V,
4252        ) -> Self {
4253            self.0.request = v.into();
4254            self
4255        }
4256
4257        /// Sets all the options, replacing any prior values.
4258        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4259            self.0.options = v.into();
4260            self
4261        }
4262
4263        /// Sends the request.
4264        ///
4265        /// # Long running operations
4266        ///
4267        /// This starts, but does not poll, a longrunning operation. More information
4268        /// on [update_network_policy][super::super::client::VmwareEngine::update_network_policy].
4269        pub async fn send(self) -> Result<longrunning::model::Operation> {
4270            (*self.0.stub)
4271                .update_network_policy(self.0.request, self.0.options)
4272                .await
4273                .map(gax::response::Response::into_body)
4274        }
4275
4276        /// Creates a [Poller][lro::Poller] to work with `update_network_policy`.
4277        pub fn poller(
4278            self,
4279        ) -> impl lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
4280        {
4281            type Operation =
4282                lro::Operation<crate::model::NetworkPolicy, crate::model::OperationMetadata>;
4283            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4284            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4285
4286            let stub = self.0.stub.clone();
4287            let mut options = self.0.options.clone();
4288            options.set_retry_policy(gax::retry_policy::NeverRetry);
4289            let query = move |name| {
4290                let stub = stub.clone();
4291                let options = options.clone();
4292                async {
4293                    let op = GetOperation::new(stub)
4294                        .set_name(name)
4295                        .with_options(options)
4296                        .send()
4297                        .await?;
4298                    Ok(Operation::new(op))
4299                }
4300            };
4301
4302            let start = move || async {
4303                let op = self.send().await?;
4304                Ok(Operation::new(op))
4305            };
4306
4307            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4308        }
4309
4310        /// Sets the value of [network_policy][crate::model::UpdateNetworkPolicyRequest::network_policy].
4311        pub fn set_network_policy<T: Into<std::option::Option<crate::model::NetworkPolicy>>>(
4312            mut self,
4313            v: T,
4314        ) -> Self {
4315            self.0.request.network_policy = v.into();
4316            self
4317        }
4318
4319        /// Sets the value of [update_mask][crate::model::UpdateNetworkPolicyRequest::update_mask].
4320        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
4321            mut self,
4322            v: T,
4323        ) -> Self {
4324            self.0.request.update_mask = v.into();
4325            self
4326        }
4327
4328        /// Sets the value of [request_id][crate::model::UpdateNetworkPolicyRequest::request_id].
4329        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4330            self.0.request.request_id = v.into();
4331            self
4332        }
4333    }
4334
4335    #[doc(hidden)]
4336    impl gax::options::internal::RequestBuilder for UpdateNetworkPolicy {
4337        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4338            &mut self.0.options
4339        }
4340    }
4341
4342    /// The request builder for [VmwareEngine::delete_network_policy][super::super::client::VmwareEngine::delete_network_policy] calls.
4343    #[derive(Clone, Debug)]
4344    pub struct DeleteNetworkPolicy(RequestBuilder<crate::model::DeleteNetworkPolicyRequest>);
4345
4346    impl DeleteNetworkPolicy {
4347        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4348            Self(RequestBuilder::new(stub))
4349        }
4350
4351        /// Sets the full request, replacing any prior values.
4352        pub fn with_request<V: Into<crate::model::DeleteNetworkPolicyRequest>>(
4353            mut self,
4354            v: V,
4355        ) -> Self {
4356            self.0.request = v.into();
4357            self
4358        }
4359
4360        /// Sets all the options, replacing any prior values.
4361        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4362            self.0.options = v.into();
4363            self
4364        }
4365
4366        /// Sends the request.
4367        ///
4368        /// # Long running operations
4369        ///
4370        /// This starts, but does not poll, a longrunning operation. More information
4371        /// on [delete_network_policy][super::super::client::VmwareEngine::delete_network_policy].
4372        pub async fn send(self) -> Result<longrunning::model::Operation> {
4373            (*self.0.stub)
4374                .delete_network_policy(self.0.request, self.0.options)
4375                .await
4376                .map(gax::response::Response::into_body)
4377        }
4378
4379        /// Creates a [Poller][lro::Poller] to work with `delete_network_policy`.
4380        pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
4381            type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
4382            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4383            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4384
4385            let stub = self.0.stub.clone();
4386            let mut options = self.0.options.clone();
4387            options.set_retry_policy(gax::retry_policy::NeverRetry);
4388            let query = move |name| {
4389                let stub = stub.clone();
4390                let options = options.clone();
4391                async {
4392                    let op = GetOperation::new(stub)
4393                        .set_name(name)
4394                        .with_options(options)
4395                        .send()
4396                        .await?;
4397                    Ok(Operation::new(op))
4398                }
4399            };
4400
4401            let start = move || async {
4402                let op = self.send().await?;
4403                Ok(Operation::new(op))
4404            };
4405
4406            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4407        }
4408
4409        /// Sets the value of [name][crate::model::DeleteNetworkPolicyRequest::name].
4410        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4411            self.0.request.name = v.into();
4412            self
4413        }
4414
4415        /// Sets the value of [request_id][crate::model::DeleteNetworkPolicyRequest::request_id].
4416        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4417            self.0.request.request_id = v.into();
4418            self
4419        }
4420    }
4421
4422    #[doc(hidden)]
4423    impl gax::options::internal::RequestBuilder for DeleteNetworkPolicy {
4424        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4425            &mut self.0.options
4426        }
4427    }
4428
4429    /// The request builder for [VmwareEngine::list_management_dns_zone_bindings][super::super::client::VmwareEngine::list_management_dns_zone_bindings] calls.
4430    #[derive(Clone, Debug)]
4431    pub struct ListManagementDnsZoneBindings(
4432        RequestBuilder<crate::model::ListManagementDnsZoneBindingsRequest>,
4433    );
4434
4435    impl ListManagementDnsZoneBindings {
4436        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4437            Self(RequestBuilder::new(stub))
4438        }
4439
4440        /// Sets the full request, replacing any prior values.
4441        pub fn with_request<V: Into<crate::model::ListManagementDnsZoneBindingsRequest>>(
4442            mut self,
4443            v: V,
4444        ) -> Self {
4445            self.0.request = v.into();
4446            self
4447        }
4448
4449        /// Sets all the options, replacing any prior values.
4450        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4451            self.0.options = v.into();
4452            self
4453        }
4454
4455        /// Sends the request.
4456        pub async fn send(self) -> Result<crate::model::ListManagementDnsZoneBindingsResponse> {
4457            (*self.0.stub)
4458                .list_management_dns_zone_bindings(self.0.request, self.0.options)
4459                .await
4460                .map(gax::response::Response::into_body)
4461        }
4462
4463        /// Streams the responses back.
4464        pub async fn paginator(
4465            self,
4466        ) -> impl gax::paginator::Paginator<
4467            crate::model::ListManagementDnsZoneBindingsResponse,
4468            gax::error::Error,
4469        > {
4470            use std::clone::Clone;
4471            let token = self.0.request.page_token.clone();
4472            let execute = move |token: String| {
4473                let mut builder = self.clone();
4474                builder.0.request = builder.0.request.set_page_token(token);
4475                builder.send()
4476            };
4477            gax::paginator::internal::new_paginator(token, execute)
4478        }
4479
4480        /// Sets the value of [parent][crate::model::ListManagementDnsZoneBindingsRequest::parent].
4481        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4482            self.0.request.parent = v.into();
4483            self
4484        }
4485
4486        /// Sets the value of [page_size][crate::model::ListManagementDnsZoneBindingsRequest::page_size].
4487        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4488            self.0.request.page_size = v.into();
4489            self
4490        }
4491
4492        /// Sets the value of [page_token][crate::model::ListManagementDnsZoneBindingsRequest::page_token].
4493        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4494            self.0.request.page_token = v.into();
4495            self
4496        }
4497
4498        /// Sets the value of [filter][crate::model::ListManagementDnsZoneBindingsRequest::filter].
4499        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4500            self.0.request.filter = v.into();
4501            self
4502        }
4503
4504        /// Sets the value of [order_by][crate::model::ListManagementDnsZoneBindingsRequest::order_by].
4505        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4506            self.0.request.order_by = v.into();
4507            self
4508        }
4509    }
4510
4511    #[doc(hidden)]
4512    impl gax::options::internal::RequestBuilder for ListManagementDnsZoneBindings {
4513        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4514            &mut self.0.options
4515        }
4516    }
4517
4518    /// The request builder for [VmwareEngine::get_management_dns_zone_binding][super::super::client::VmwareEngine::get_management_dns_zone_binding] calls.
4519    #[derive(Clone, Debug)]
4520    pub struct GetManagementDnsZoneBinding(
4521        RequestBuilder<crate::model::GetManagementDnsZoneBindingRequest>,
4522    );
4523
4524    impl GetManagementDnsZoneBinding {
4525        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4526            Self(RequestBuilder::new(stub))
4527        }
4528
4529        /// Sets the full request, replacing any prior values.
4530        pub fn with_request<V: Into<crate::model::GetManagementDnsZoneBindingRequest>>(
4531            mut self,
4532            v: V,
4533        ) -> Self {
4534            self.0.request = v.into();
4535            self
4536        }
4537
4538        /// Sets all the options, replacing any prior values.
4539        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4540            self.0.options = v.into();
4541            self
4542        }
4543
4544        /// Sends the request.
4545        pub async fn send(self) -> Result<crate::model::ManagementDnsZoneBinding> {
4546            (*self.0.stub)
4547                .get_management_dns_zone_binding(self.0.request, self.0.options)
4548                .await
4549                .map(gax::response::Response::into_body)
4550        }
4551
4552        /// Sets the value of [name][crate::model::GetManagementDnsZoneBindingRequest::name].
4553        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4554            self.0.request.name = v.into();
4555            self
4556        }
4557    }
4558
4559    #[doc(hidden)]
4560    impl gax::options::internal::RequestBuilder for GetManagementDnsZoneBinding {
4561        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4562            &mut self.0.options
4563        }
4564    }
4565
4566    /// The request builder for [VmwareEngine::create_management_dns_zone_binding][super::super::client::VmwareEngine::create_management_dns_zone_binding] calls.
4567    #[derive(Clone, Debug)]
4568    pub struct CreateManagementDnsZoneBinding(
4569        RequestBuilder<crate::model::CreateManagementDnsZoneBindingRequest>,
4570    );
4571
4572    impl CreateManagementDnsZoneBinding {
4573        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4574            Self(RequestBuilder::new(stub))
4575        }
4576
4577        /// Sets the full request, replacing any prior values.
4578        pub fn with_request<V: Into<crate::model::CreateManagementDnsZoneBindingRequest>>(
4579            mut self,
4580            v: V,
4581        ) -> Self {
4582            self.0.request = v.into();
4583            self
4584        }
4585
4586        /// Sets all the options, replacing any prior values.
4587        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4588            self.0.options = v.into();
4589            self
4590        }
4591
4592        /// Sends the request.
4593        ///
4594        /// # Long running operations
4595        ///
4596        /// This starts, but does not poll, a longrunning operation. More information
4597        /// on [create_management_dns_zone_binding][super::super::client::VmwareEngine::create_management_dns_zone_binding].
4598        pub async fn send(self) -> Result<longrunning::model::Operation> {
4599            (*self.0.stub)
4600                .create_management_dns_zone_binding(self.0.request, self.0.options)
4601                .await
4602                .map(gax::response::Response::into_body)
4603        }
4604
4605        /// Creates a [Poller][lro::Poller] to work with `create_management_dns_zone_binding`.
4606        pub fn poller(
4607            self,
4608        ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
4609        {
4610            type Operation = lro::Operation<
4611                crate::model::ManagementDnsZoneBinding,
4612                crate::model::OperationMetadata,
4613            >;
4614            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4615            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4616
4617            let stub = self.0.stub.clone();
4618            let mut options = self.0.options.clone();
4619            options.set_retry_policy(gax::retry_policy::NeverRetry);
4620            let query = move |name| {
4621                let stub = stub.clone();
4622                let options = options.clone();
4623                async {
4624                    let op = GetOperation::new(stub)
4625                        .set_name(name)
4626                        .with_options(options)
4627                        .send()
4628                        .await?;
4629                    Ok(Operation::new(op))
4630                }
4631            };
4632
4633            let start = move || async {
4634                let op = self.send().await?;
4635                Ok(Operation::new(op))
4636            };
4637
4638            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4639        }
4640
4641        /// Sets the value of [parent][crate::model::CreateManagementDnsZoneBindingRequest::parent].
4642        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4643            self.0.request.parent = v.into();
4644            self
4645        }
4646
4647        /// Sets the value of [management_dns_zone_binding][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding].
4648        pub fn set_management_dns_zone_binding<
4649            T: Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
4650        >(
4651            mut self,
4652            v: T,
4653        ) -> Self {
4654            self.0.request.management_dns_zone_binding = v.into();
4655            self
4656        }
4657
4658        /// Sets the value of [management_dns_zone_binding_id][crate::model::CreateManagementDnsZoneBindingRequest::management_dns_zone_binding_id].
4659        pub fn set_management_dns_zone_binding_id<T: Into<std::string::String>>(
4660            mut self,
4661            v: T,
4662        ) -> Self {
4663            self.0.request.management_dns_zone_binding_id = v.into();
4664            self
4665        }
4666
4667        /// Sets the value of [request_id][crate::model::CreateManagementDnsZoneBindingRequest::request_id].
4668        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4669            self.0.request.request_id = v.into();
4670            self
4671        }
4672    }
4673
4674    #[doc(hidden)]
4675    impl gax::options::internal::RequestBuilder for CreateManagementDnsZoneBinding {
4676        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4677            &mut self.0.options
4678        }
4679    }
4680
4681    /// The request builder for [VmwareEngine::update_management_dns_zone_binding][super::super::client::VmwareEngine::update_management_dns_zone_binding] calls.
4682    #[derive(Clone, Debug)]
4683    pub struct UpdateManagementDnsZoneBinding(
4684        RequestBuilder<crate::model::UpdateManagementDnsZoneBindingRequest>,
4685    );
4686
4687    impl UpdateManagementDnsZoneBinding {
4688        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4689            Self(RequestBuilder::new(stub))
4690        }
4691
4692        /// Sets the full request, replacing any prior values.
4693        pub fn with_request<V: Into<crate::model::UpdateManagementDnsZoneBindingRequest>>(
4694            mut self,
4695            v: V,
4696        ) -> Self {
4697            self.0.request = v.into();
4698            self
4699        }
4700
4701        /// Sets all the options, replacing any prior values.
4702        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4703            self.0.options = v.into();
4704            self
4705        }
4706
4707        /// Sends the request.
4708        ///
4709        /// # Long running operations
4710        ///
4711        /// This starts, but does not poll, a longrunning operation. More information
4712        /// on [update_management_dns_zone_binding][super::super::client::VmwareEngine::update_management_dns_zone_binding].
4713        pub async fn send(self) -> Result<longrunning::model::Operation> {
4714            (*self.0.stub)
4715                .update_management_dns_zone_binding(self.0.request, self.0.options)
4716                .await
4717                .map(gax::response::Response::into_body)
4718        }
4719
4720        /// Creates a [Poller][lro::Poller] to work with `update_management_dns_zone_binding`.
4721        pub fn poller(
4722            self,
4723        ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
4724        {
4725            type Operation = lro::Operation<
4726                crate::model::ManagementDnsZoneBinding,
4727                crate::model::OperationMetadata,
4728            >;
4729            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4730            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4731
4732            let stub = self.0.stub.clone();
4733            let mut options = self.0.options.clone();
4734            options.set_retry_policy(gax::retry_policy::NeverRetry);
4735            let query = move |name| {
4736                let stub = stub.clone();
4737                let options = options.clone();
4738                async {
4739                    let op = GetOperation::new(stub)
4740                        .set_name(name)
4741                        .with_options(options)
4742                        .send()
4743                        .await?;
4744                    Ok(Operation::new(op))
4745                }
4746            };
4747
4748            let start = move || async {
4749                let op = self.send().await?;
4750                Ok(Operation::new(op))
4751            };
4752
4753            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4754        }
4755
4756        /// Sets the value of [update_mask][crate::model::UpdateManagementDnsZoneBindingRequest::update_mask].
4757        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
4758            mut self,
4759            v: T,
4760        ) -> Self {
4761            self.0.request.update_mask = v.into();
4762            self
4763        }
4764
4765        /// Sets the value of [management_dns_zone_binding][crate::model::UpdateManagementDnsZoneBindingRequest::management_dns_zone_binding].
4766        pub fn set_management_dns_zone_binding<
4767            T: Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
4768        >(
4769            mut self,
4770            v: T,
4771        ) -> Self {
4772            self.0.request.management_dns_zone_binding = v.into();
4773            self
4774        }
4775
4776        /// Sets the value of [request_id][crate::model::UpdateManagementDnsZoneBindingRequest::request_id].
4777        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4778            self.0.request.request_id = v.into();
4779            self
4780        }
4781    }
4782
4783    #[doc(hidden)]
4784    impl gax::options::internal::RequestBuilder for UpdateManagementDnsZoneBinding {
4785        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4786            &mut self.0.options
4787        }
4788    }
4789
4790    /// The request builder for [VmwareEngine::delete_management_dns_zone_binding][super::super::client::VmwareEngine::delete_management_dns_zone_binding] calls.
4791    #[derive(Clone, Debug)]
4792    pub struct DeleteManagementDnsZoneBinding(
4793        RequestBuilder<crate::model::DeleteManagementDnsZoneBindingRequest>,
4794    );
4795
4796    impl DeleteManagementDnsZoneBinding {
4797        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4798            Self(RequestBuilder::new(stub))
4799        }
4800
4801        /// Sets the full request, replacing any prior values.
4802        pub fn with_request<V: Into<crate::model::DeleteManagementDnsZoneBindingRequest>>(
4803            mut self,
4804            v: V,
4805        ) -> Self {
4806            self.0.request = v.into();
4807            self
4808        }
4809
4810        /// Sets all the options, replacing any prior values.
4811        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4812            self.0.options = v.into();
4813            self
4814        }
4815
4816        /// Sends the request.
4817        ///
4818        /// # Long running operations
4819        ///
4820        /// This starts, but does not poll, a longrunning operation. More information
4821        /// on [delete_management_dns_zone_binding][super::super::client::VmwareEngine::delete_management_dns_zone_binding].
4822        pub async fn send(self) -> Result<longrunning::model::Operation> {
4823            (*self.0.stub)
4824                .delete_management_dns_zone_binding(self.0.request, self.0.options)
4825                .await
4826                .map(gax::response::Response::into_body)
4827        }
4828
4829        /// Creates a [Poller][lro::Poller] to work with `delete_management_dns_zone_binding`.
4830        pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
4831            type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
4832            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4833            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4834
4835            let stub = self.0.stub.clone();
4836            let mut options = self.0.options.clone();
4837            options.set_retry_policy(gax::retry_policy::NeverRetry);
4838            let query = move |name| {
4839                let stub = stub.clone();
4840                let options = options.clone();
4841                async {
4842                    let op = GetOperation::new(stub)
4843                        .set_name(name)
4844                        .with_options(options)
4845                        .send()
4846                        .await?;
4847                    Ok(Operation::new(op))
4848                }
4849            };
4850
4851            let start = move || async {
4852                let op = self.send().await?;
4853                Ok(Operation::new(op))
4854            };
4855
4856            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4857        }
4858
4859        /// Sets the value of [name][crate::model::DeleteManagementDnsZoneBindingRequest::name].
4860        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4861            self.0.request.name = v.into();
4862            self
4863        }
4864
4865        /// Sets the value of [request_id][crate::model::DeleteManagementDnsZoneBindingRequest::request_id].
4866        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4867            self.0.request.request_id = v.into();
4868            self
4869        }
4870    }
4871
4872    #[doc(hidden)]
4873    impl gax::options::internal::RequestBuilder for DeleteManagementDnsZoneBinding {
4874        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4875            &mut self.0.options
4876        }
4877    }
4878
4879    /// The request builder for [VmwareEngine::repair_management_dns_zone_binding][super::super::client::VmwareEngine::repair_management_dns_zone_binding] calls.
4880    #[derive(Clone, Debug)]
4881    pub struct RepairManagementDnsZoneBinding(
4882        RequestBuilder<crate::model::RepairManagementDnsZoneBindingRequest>,
4883    );
4884
4885    impl RepairManagementDnsZoneBinding {
4886        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4887            Self(RequestBuilder::new(stub))
4888        }
4889
4890        /// Sets the full request, replacing any prior values.
4891        pub fn with_request<V: Into<crate::model::RepairManagementDnsZoneBindingRequest>>(
4892            mut self,
4893            v: V,
4894        ) -> Self {
4895            self.0.request = v.into();
4896            self
4897        }
4898
4899        /// Sets all the options, replacing any prior values.
4900        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4901            self.0.options = v.into();
4902            self
4903        }
4904
4905        /// Sends the request.
4906        ///
4907        /// # Long running operations
4908        ///
4909        /// This starts, but does not poll, a longrunning operation. More information
4910        /// on [repair_management_dns_zone_binding][super::super::client::VmwareEngine::repair_management_dns_zone_binding].
4911        pub async fn send(self) -> Result<longrunning::model::Operation> {
4912            (*self.0.stub)
4913                .repair_management_dns_zone_binding(self.0.request, self.0.options)
4914                .await
4915                .map(gax::response::Response::into_body)
4916        }
4917
4918        /// Creates a [Poller][lro::Poller] to work with `repair_management_dns_zone_binding`.
4919        pub fn poller(
4920            self,
4921        ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
4922        {
4923            type Operation = lro::Operation<
4924                crate::model::ManagementDnsZoneBinding,
4925                crate::model::OperationMetadata,
4926            >;
4927            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4928            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4929
4930            let stub = self.0.stub.clone();
4931            let mut options = self.0.options.clone();
4932            options.set_retry_policy(gax::retry_policy::NeverRetry);
4933            let query = move |name| {
4934                let stub = stub.clone();
4935                let options = options.clone();
4936                async {
4937                    let op = GetOperation::new(stub)
4938                        .set_name(name)
4939                        .with_options(options)
4940                        .send()
4941                        .await?;
4942                    Ok(Operation::new(op))
4943                }
4944            };
4945
4946            let start = move || async {
4947                let op = self.send().await?;
4948                Ok(Operation::new(op))
4949            };
4950
4951            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4952        }
4953
4954        /// Sets the value of [name][crate::model::RepairManagementDnsZoneBindingRequest::name].
4955        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4956            self.0.request.name = v.into();
4957            self
4958        }
4959
4960        /// Sets the value of [request_id][crate::model::RepairManagementDnsZoneBindingRequest::request_id].
4961        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4962            self.0.request.request_id = v.into();
4963            self
4964        }
4965    }
4966
4967    #[doc(hidden)]
4968    impl gax::options::internal::RequestBuilder for RepairManagementDnsZoneBinding {
4969        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4970            &mut self.0.options
4971        }
4972    }
4973
4974    /// The request builder for [VmwareEngine::create_vmware_engine_network][super::super::client::VmwareEngine::create_vmware_engine_network] calls.
4975    #[derive(Clone, Debug)]
4976    pub struct CreateVmwareEngineNetwork(
4977        RequestBuilder<crate::model::CreateVmwareEngineNetworkRequest>,
4978    );
4979
4980    impl CreateVmwareEngineNetwork {
4981        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
4982            Self(RequestBuilder::new(stub))
4983        }
4984
4985        /// Sets the full request, replacing any prior values.
4986        pub fn with_request<V: Into<crate::model::CreateVmwareEngineNetworkRequest>>(
4987            mut self,
4988            v: V,
4989        ) -> Self {
4990            self.0.request = v.into();
4991            self
4992        }
4993
4994        /// Sets all the options, replacing any prior values.
4995        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4996            self.0.options = v.into();
4997            self
4998        }
4999
5000        /// Sends the request.
5001        ///
5002        /// # Long running operations
5003        ///
5004        /// This starts, but does not poll, a longrunning operation. More information
5005        /// on [create_vmware_engine_network][super::super::client::VmwareEngine::create_vmware_engine_network].
5006        pub async fn send(self) -> Result<longrunning::model::Operation> {
5007            (*self.0.stub)
5008                .create_vmware_engine_network(self.0.request, self.0.options)
5009                .await
5010                .map(gax::response::Response::into_body)
5011        }
5012
5013        /// Creates a [Poller][lro::Poller] to work with `create_vmware_engine_network`.
5014        pub fn poller(
5015            self,
5016        ) -> impl lro::Poller<crate::model::VmwareEngineNetwork, crate::model::OperationMetadata>
5017        {
5018            type Operation =
5019                lro::Operation<crate::model::VmwareEngineNetwork, crate::model::OperationMetadata>;
5020            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5021            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5022
5023            let stub = self.0.stub.clone();
5024            let mut options = self.0.options.clone();
5025            options.set_retry_policy(gax::retry_policy::NeverRetry);
5026            let query = move |name| {
5027                let stub = stub.clone();
5028                let options = options.clone();
5029                async {
5030                    let op = GetOperation::new(stub)
5031                        .set_name(name)
5032                        .with_options(options)
5033                        .send()
5034                        .await?;
5035                    Ok(Operation::new(op))
5036                }
5037            };
5038
5039            let start = move || async {
5040                let op = self.send().await?;
5041                Ok(Operation::new(op))
5042            };
5043
5044            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5045        }
5046
5047        /// Sets the value of [parent][crate::model::CreateVmwareEngineNetworkRequest::parent].
5048        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5049            self.0.request.parent = v.into();
5050            self
5051        }
5052
5053        /// Sets the value of [vmware_engine_network_id][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network_id].
5054        pub fn set_vmware_engine_network_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5055            self.0.request.vmware_engine_network_id = v.into();
5056            self
5057        }
5058
5059        /// Sets the value of [vmware_engine_network][crate::model::CreateVmwareEngineNetworkRequest::vmware_engine_network].
5060        pub fn set_vmware_engine_network<
5061            T: Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
5062        >(
5063            mut self,
5064            v: T,
5065        ) -> Self {
5066            self.0.request.vmware_engine_network = v.into();
5067            self
5068        }
5069
5070        /// Sets the value of [request_id][crate::model::CreateVmwareEngineNetworkRequest::request_id].
5071        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5072            self.0.request.request_id = v.into();
5073            self
5074        }
5075    }
5076
5077    #[doc(hidden)]
5078    impl gax::options::internal::RequestBuilder for CreateVmwareEngineNetwork {
5079        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5080            &mut self.0.options
5081        }
5082    }
5083
5084    /// The request builder for [VmwareEngine::update_vmware_engine_network][super::super::client::VmwareEngine::update_vmware_engine_network] calls.
5085    #[derive(Clone, Debug)]
5086    pub struct UpdateVmwareEngineNetwork(
5087        RequestBuilder<crate::model::UpdateVmwareEngineNetworkRequest>,
5088    );
5089
5090    impl UpdateVmwareEngineNetwork {
5091        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
5092            Self(RequestBuilder::new(stub))
5093        }
5094
5095        /// Sets the full request, replacing any prior values.
5096        pub fn with_request<V: Into<crate::model::UpdateVmwareEngineNetworkRequest>>(
5097            mut self,
5098            v: V,
5099        ) -> Self {
5100            self.0.request = v.into();
5101            self
5102        }
5103
5104        /// Sets all the options, replacing any prior values.
5105        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5106            self.0.options = v.into();
5107            self
5108        }
5109
5110        /// Sends the request.
5111        ///
5112        /// # Long running operations
5113        ///
5114        /// This starts, but does not poll, a longrunning operation. More information
5115        /// on [update_vmware_engine_network][super::super::client::VmwareEngine::update_vmware_engine_network].
5116        pub async fn send(self) -> Result<longrunning::model::Operation> {
5117            (*self.0.stub)
5118                .update_vmware_engine_network(self.0.request, self.0.options)
5119                .await
5120                .map(gax::response::Response::into_body)
5121        }
5122
5123        /// Creates a [Poller][lro::Poller] to work with `update_vmware_engine_network`.
5124        pub fn poller(
5125            self,
5126        ) -> impl lro::Poller<crate::model::VmwareEngineNetwork, crate::model::OperationMetadata>
5127        {
5128            type Operation =
5129                lro::Operation<crate::model::VmwareEngineNetwork, crate::model::OperationMetadata>;
5130            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5131            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5132
5133            let stub = self.0.stub.clone();
5134            let mut options = self.0.options.clone();
5135            options.set_retry_policy(gax::retry_policy::NeverRetry);
5136            let query = move |name| {
5137                let stub = stub.clone();
5138                let options = options.clone();
5139                async {
5140                    let op = GetOperation::new(stub)
5141                        .set_name(name)
5142                        .with_options(options)
5143                        .send()
5144                        .await?;
5145                    Ok(Operation::new(op))
5146                }
5147            };
5148
5149            let start = move || async {
5150                let op = self.send().await?;
5151                Ok(Operation::new(op))
5152            };
5153
5154            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5155        }
5156
5157        /// Sets the value of [vmware_engine_network][crate::model::UpdateVmwareEngineNetworkRequest::vmware_engine_network].
5158        pub fn set_vmware_engine_network<
5159            T: Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
5160        >(
5161            mut self,
5162            v: T,
5163        ) -> Self {
5164            self.0.request.vmware_engine_network = v.into();
5165            self
5166        }
5167
5168        /// Sets the value of [update_mask][crate::model::UpdateVmwareEngineNetworkRequest::update_mask].
5169        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
5170            mut self,
5171            v: T,
5172        ) -> Self {
5173            self.0.request.update_mask = v.into();
5174            self
5175        }
5176
5177        /// Sets the value of [request_id][crate::model::UpdateVmwareEngineNetworkRequest::request_id].
5178        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5179            self.0.request.request_id = v.into();
5180            self
5181        }
5182    }
5183
5184    #[doc(hidden)]
5185    impl gax::options::internal::RequestBuilder for UpdateVmwareEngineNetwork {
5186        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5187            &mut self.0.options
5188        }
5189    }
5190
5191    /// The request builder for [VmwareEngine::delete_vmware_engine_network][super::super::client::VmwareEngine::delete_vmware_engine_network] calls.
5192    #[derive(Clone, Debug)]
5193    pub struct DeleteVmwareEngineNetwork(
5194        RequestBuilder<crate::model::DeleteVmwareEngineNetworkRequest>,
5195    );
5196
5197    impl DeleteVmwareEngineNetwork {
5198        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
5199            Self(RequestBuilder::new(stub))
5200        }
5201
5202        /// Sets the full request, replacing any prior values.
5203        pub fn with_request<V: Into<crate::model::DeleteVmwareEngineNetworkRequest>>(
5204            mut self,
5205            v: V,
5206        ) -> Self {
5207            self.0.request = v.into();
5208            self
5209        }
5210
5211        /// Sets all the options, replacing any prior values.
5212        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5213            self.0.options = v.into();
5214            self
5215        }
5216
5217        /// Sends the request.
5218        ///
5219        /// # Long running operations
5220        ///
5221        /// This starts, but does not poll, a longrunning operation. More information
5222        /// on [delete_vmware_engine_network][super::super::client::VmwareEngine::delete_vmware_engine_network].
5223        pub async fn send(self) -> Result<longrunning::model::Operation> {
5224            (*self.0.stub)
5225                .delete_vmware_engine_network(self.0.request, self.0.options)
5226                .await
5227                .map(gax::response::Response::into_body)
5228        }
5229
5230        /// Creates a [Poller][lro::Poller] to work with `delete_vmware_engine_network`.
5231        pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
5232            type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
5233            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5234            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5235
5236            let stub = self.0.stub.clone();
5237            let mut options = self.0.options.clone();
5238            options.set_retry_policy(gax::retry_policy::NeverRetry);
5239            let query = move |name| {
5240                let stub = stub.clone();
5241                let options = options.clone();
5242                async {
5243                    let op = GetOperation::new(stub)
5244                        .set_name(name)
5245                        .with_options(options)
5246                        .send()
5247                        .await?;
5248                    Ok(Operation::new(op))
5249                }
5250            };
5251
5252            let start = move || async {
5253                let op = self.send().await?;
5254                Ok(Operation::new(op))
5255            };
5256
5257            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5258        }
5259
5260        /// Sets the value of [name][crate::model::DeleteVmwareEngineNetworkRequest::name].
5261        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5262            self.0.request.name = v.into();
5263            self
5264        }
5265
5266        /// Sets the value of [request_id][crate::model::DeleteVmwareEngineNetworkRequest::request_id].
5267        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5268            self.0.request.request_id = v.into();
5269            self
5270        }
5271
5272        /// Sets the value of [etag][crate::model::DeleteVmwareEngineNetworkRequest::etag].
5273        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
5274            self.0.request.etag = v.into();
5275            self
5276        }
5277    }
5278
5279    #[doc(hidden)]
5280    impl gax::options::internal::RequestBuilder for DeleteVmwareEngineNetwork {
5281        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5282            &mut self.0.options
5283        }
5284    }
5285
5286    /// The request builder for [VmwareEngine::get_vmware_engine_network][super::super::client::VmwareEngine::get_vmware_engine_network] calls.
5287    #[derive(Clone, Debug)]
5288    pub struct GetVmwareEngineNetwork(RequestBuilder<crate::model::GetVmwareEngineNetworkRequest>);
5289
5290    impl GetVmwareEngineNetwork {
5291        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
5292            Self(RequestBuilder::new(stub))
5293        }
5294
5295        /// Sets the full request, replacing any prior values.
5296        pub fn with_request<V: Into<crate::model::GetVmwareEngineNetworkRequest>>(
5297            mut self,
5298            v: V,
5299        ) -> Self {
5300            self.0.request = v.into();
5301            self
5302        }
5303
5304        /// Sets all the options, replacing any prior values.
5305        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5306            self.0.options = v.into();
5307            self
5308        }
5309
5310        /// Sends the request.
5311        pub async fn send(self) -> Result<crate::model::VmwareEngineNetwork> {
5312            (*self.0.stub)
5313                .get_vmware_engine_network(self.0.request, self.0.options)
5314                .await
5315                .map(gax::response::Response::into_body)
5316        }
5317
5318        /// Sets the value of [name][crate::model::GetVmwareEngineNetworkRequest::name].
5319        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5320            self.0.request.name = v.into();
5321            self
5322        }
5323    }
5324
5325    #[doc(hidden)]
5326    impl gax::options::internal::RequestBuilder for GetVmwareEngineNetwork {
5327        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5328            &mut self.0.options
5329        }
5330    }
5331
5332    /// The request builder for [VmwareEngine::list_vmware_engine_networks][super::super::client::VmwareEngine::list_vmware_engine_networks] calls.
5333    #[derive(Clone, Debug)]
5334    pub struct ListVmwareEngineNetworks(
5335        RequestBuilder<crate::model::ListVmwareEngineNetworksRequest>,
5336    );
5337
5338    impl ListVmwareEngineNetworks {
5339        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
5340            Self(RequestBuilder::new(stub))
5341        }
5342
5343        /// Sets the full request, replacing any prior values.
5344        pub fn with_request<V: Into<crate::model::ListVmwareEngineNetworksRequest>>(
5345            mut self,
5346            v: V,
5347        ) -> Self {
5348            self.0.request = v.into();
5349            self
5350        }
5351
5352        /// Sets all the options, replacing any prior values.
5353        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5354            self.0.options = v.into();
5355            self
5356        }
5357
5358        /// Sends the request.
5359        pub async fn send(self) -> Result<crate::model::ListVmwareEngineNetworksResponse> {
5360            (*self.0.stub)
5361                .list_vmware_engine_networks(self.0.request, self.0.options)
5362                .await
5363                .map(gax::response::Response::into_body)
5364        }
5365
5366        /// Streams the responses back.
5367        pub async fn paginator(
5368            self,
5369        ) -> impl gax::paginator::Paginator<
5370            crate::model::ListVmwareEngineNetworksResponse,
5371            gax::error::Error,
5372        > {
5373            use std::clone::Clone;
5374            let token = self.0.request.page_token.clone();
5375            let execute = move |token: String| {
5376                let mut builder = self.clone();
5377                builder.0.request = builder.0.request.set_page_token(token);
5378                builder.send()
5379            };
5380            gax::paginator::internal::new_paginator(token, execute)
5381        }
5382
5383        /// Sets the value of [parent][crate::model::ListVmwareEngineNetworksRequest::parent].
5384        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5385            self.0.request.parent = v.into();
5386            self
5387        }
5388
5389        /// Sets the value of [page_size][crate::model::ListVmwareEngineNetworksRequest::page_size].
5390        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5391            self.0.request.page_size = v.into();
5392            self
5393        }
5394
5395        /// Sets the value of [page_token][crate::model::ListVmwareEngineNetworksRequest::page_token].
5396        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5397            self.0.request.page_token = v.into();
5398            self
5399        }
5400
5401        /// Sets the value of [filter][crate::model::ListVmwareEngineNetworksRequest::filter].
5402        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5403            self.0.request.filter = v.into();
5404            self
5405        }
5406
5407        /// Sets the value of [order_by][crate::model::ListVmwareEngineNetworksRequest::order_by].
5408        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5409            self.0.request.order_by = v.into();
5410            self
5411        }
5412    }
5413
5414    #[doc(hidden)]
5415    impl gax::options::internal::RequestBuilder for ListVmwareEngineNetworks {
5416        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5417            &mut self.0.options
5418        }
5419    }
5420
5421    /// The request builder for [VmwareEngine::create_private_connection][super::super::client::VmwareEngine::create_private_connection] calls.
5422    #[derive(Clone, Debug)]
5423    pub struct CreatePrivateConnection(
5424        RequestBuilder<crate::model::CreatePrivateConnectionRequest>,
5425    );
5426
5427    impl CreatePrivateConnection {
5428        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
5429            Self(RequestBuilder::new(stub))
5430        }
5431
5432        /// Sets the full request, replacing any prior values.
5433        pub fn with_request<V: Into<crate::model::CreatePrivateConnectionRequest>>(
5434            mut self,
5435            v: V,
5436        ) -> Self {
5437            self.0.request = v.into();
5438            self
5439        }
5440
5441        /// Sets all the options, replacing any prior values.
5442        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5443            self.0.options = v.into();
5444            self
5445        }
5446
5447        /// Sends the request.
5448        ///
5449        /// # Long running operations
5450        ///
5451        /// This starts, but does not poll, a longrunning operation. More information
5452        /// on [create_private_connection][super::super::client::VmwareEngine::create_private_connection].
5453        pub async fn send(self) -> Result<longrunning::model::Operation> {
5454            (*self.0.stub)
5455                .create_private_connection(self.0.request, self.0.options)
5456                .await
5457                .map(gax::response::Response::into_body)
5458        }
5459
5460        /// Creates a [Poller][lro::Poller] to work with `create_private_connection`.
5461        pub fn poller(
5462            self,
5463        ) -> impl lro::Poller<crate::model::PrivateConnection, crate::model::OperationMetadata>
5464        {
5465            type Operation =
5466                lro::Operation<crate::model::PrivateConnection, crate::model::OperationMetadata>;
5467            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5468            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5469
5470            let stub = self.0.stub.clone();
5471            let mut options = self.0.options.clone();
5472            options.set_retry_policy(gax::retry_policy::NeverRetry);
5473            let query = move |name| {
5474                let stub = stub.clone();
5475                let options = options.clone();
5476                async {
5477                    let op = GetOperation::new(stub)
5478                        .set_name(name)
5479                        .with_options(options)
5480                        .send()
5481                        .await?;
5482                    Ok(Operation::new(op))
5483                }
5484            };
5485
5486            let start = move || async {
5487                let op = self.send().await?;
5488                Ok(Operation::new(op))
5489            };
5490
5491            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5492        }
5493
5494        /// Sets the value of [parent][crate::model::CreatePrivateConnectionRequest::parent].
5495        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5496            self.0.request.parent = v.into();
5497            self
5498        }
5499
5500        /// Sets the value of [private_connection_id][crate::model::CreatePrivateConnectionRequest::private_connection_id].
5501        pub fn set_private_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5502            self.0.request.private_connection_id = v.into();
5503            self
5504        }
5505
5506        /// Sets the value of [private_connection][crate::model::CreatePrivateConnectionRequest::private_connection].
5507        pub fn set_private_connection<
5508            T: Into<std::option::Option<crate::model::PrivateConnection>>,
5509        >(
5510            mut self,
5511            v: T,
5512        ) -> Self {
5513            self.0.request.private_connection = v.into();
5514            self
5515        }
5516
5517        /// Sets the value of [request_id][crate::model::CreatePrivateConnectionRequest::request_id].
5518        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5519            self.0.request.request_id = v.into();
5520            self
5521        }
5522    }
5523
5524    #[doc(hidden)]
5525    impl gax::options::internal::RequestBuilder for CreatePrivateConnection {
5526        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5527            &mut self.0.options
5528        }
5529    }
5530
5531    /// The request builder for [VmwareEngine::get_private_connection][super::super::client::VmwareEngine::get_private_connection] calls.
5532    #[derive(Clone, Debug)]
5533    pub struct GetPrivateConnection(RequestBuilder<crate::model::GetPrivateConnectionRequest>);
5534
5535    impl GetPrivateConnection {
5536        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
5537            Self(RequestBuilder::new(stub))
5538        }
5539
5540        /// Sets the full request, replacing any prior values.
5541        pub fn with_request<V: Into<crate::model::GetPrivateConnectionRequest>>(
5542            mut self,
5543            v: V,
5544        ) -> Self {
5545            self.0.request = v.into();
5546            self
5547        }
5548
5549        /// Sets all the options, replacing any prior values.
5550        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5551            self.0.options = v.into();
5552            self
5553        }
5554
5555        /// Sends the request.
5556        pub async fn send(self) -> Result<crate::model::PrivateConnection> {
5557            (*self.0.stub)
5558                .get_private_connection(self.0.request, self.0.options)
5559                .await
5560                .map(gax::response::Response::into_body)
5561        }
5562
5563        /// Sets the value of [name][crate::model::GetPrivateConnectionRequest::name].
5564        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5565            self.0.request.name = v.into();
5566            self
5567        }
5568    }
5569
5570    #[doc(hidden)]
5571    impl gax::options::internal::RequestBuilder for GetPrivateConnection {
5572        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5573            &mut self.0.options
5574        }
5575    }
5576
5577    /// The request builder for [VmwareEngine::list_private_connections][super::super::client::VmwareEngine::list_private_connections] calls.
5578    #[derive(Clone, Debug)]
5579    pub struct ListPrivateConnections(RequestBuilder<crate::model::ListPrivateConnectionsRequest>);
5580
5581    impl ListPrivateConnections {
5582        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
5583            Self(RequestBuilder::new(stub))
5584        }
5585
5586        /// Sets the full request, replacing any prior values.
5587        pub fn with_request<V: Into<crate::model::ListPrivateConnectionsRequest>>(
5588            mut self,
5589            v: V,
5590        ) -> Self {
5591            self.0.request = v.into();
5592            self
5593        }
5594
5595        /// Sets all the options, replacing any prior values.
5596        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5597            self.0.options = v.into();
5598            self
5599        }
5600
5601        /// Sends the request.
5602        pub async fn send(self) -> Result<crate::model::ListPrivateConnectionsResponse> {
5603            (*self.0.stub)
5604                .list_private_connections(self.0.request, self.0.options)
5605                .await
5606                .map(gax::response::Response::into_body)
5607        }
5608
5609        /// Streams the responses back.
5610        pub async fn paginator(
5611            self,
5612        ) -> impl gax::paginator::Paginator<
5613            crate::model::ListPrivateConnectionsResponse,
5614            gax::error::Error,
5615        > {
5616            use std::clone::Clone;
5617            let token = self.0.request.page_token.clone();
5618            let execute = move |token: String| {
5619                let mut builder = self.clone();
5620                builder.0.request = builder.0.request.set_page_token(token);
5621                builder.send()
5622            };
5623            gax::paginator::internal::new_paginator(token, execute)
5624        }
5625
5626        /// Sets the value of [parent][crate::model::ListPrivateConnectionsRequest::parent].
5627        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5628            self.0.request.parent = v.into();
5629            self
5630        }
5631
5632        /// Sets the value of [page_size][crate::model::ListPrivateConnectionsRequest::page_size].
5633        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5634            self.0.request.page_size = v.into();
5635            self
5636        }
5637
5638        /// Sets the value of [page_token][crate::model::ListPrivateConnectionsRequest::page_token].
5639        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5640            self.0.request.page_token = v.into();
5641            self
5642        }
5643
5644        /// Sets the value of [filter][crate::model::ListPrivateConnectionsRequest::filter].
5645        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5646            self.0.request.filter = v.into();
5647            self
5648        }
5649
5650        /// Sets the value of [order_by][crate::model::ListPrivateConnectionsRequest::order_by].
5651        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5652            self.0.request.order_by = v.into();
5653            self
5654        }
5655    }
5656
5657    #[doc(hidden)]
5658    impl gax::options::internal::RequestBuilder for ListPrivateConnections {
5659        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5660            &mut self.0.options
5661        }
5662    }
5663
5664    /// The request builder for [VmwareEngine::update_private_connection][super::super::client::VmwareEngine::update_private_connection] calls.
5665    #[derive(Clone, Debug)]
5666    pub struct UpdatePrivateConnection(
5667        RequestBuilder<crate::model::UpdatePrivateConnectionRequest>,
5668    );
5669
5670    impl UpdatePrivateConnection {
5671        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
5672            Self(RequestBuilder::new(stub))
5673        }
5674
5675        /// Sets the full request, replacing any prior values.
5676        pub fn with_request<V: Into<crate::model::UpdatePrivateConnectionRequest>>(
5677            mut self,
5678            v: V,
5679        ) -> Self {
5680            self.0.request = v.into();
5681            self
5682        }
5683
5684        /// Sets all the options, replacing any prior values.
5685        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5686            self.0.options = v.into();
5687            self
5688        }
5689
5690        /// Sends the request.
5691        ///
5692        /// # Long running operations
5693        ///
5694        /// This starts, but does not poll, a longrunning operation. More information
5695        /// on [update_private_connection][super::super::client::VmwareEngine::update_private_connection].
5696        pub async fn send(self) -> Result<longrunning::model::Operation> {
5697            (*self.0.stub)
5698                .update_private_connection(self.0.request, self.0.options)
5699                .await
5700                .map(gax::response::Response::into_body)
5701        }
5702
5703        /// Creates a [Poller][lro::Poller] to work with `update_private_connection`.
5704        pub fn poller(
5705            self,
5706        ) -> impl lro::Poller<crate::model::PrivateConnection, crate::model::OperationMetadata>
5707        {
5708            type Operation =
5709                lro::Operation<crate::model::PrivateConnection, crate::model::OperationMetadata>;
5710            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5711            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5712
5713            let stub = self.0.stub.clone();
5714            let mut options = self.0.options.clone();
5715            options.set_retry_policy(gax::retry_policy::NeverRetry);
5716            let query = move |name| {
5717                let stub = stub.clone();
5718                let options = options.clone();
5719                async {
5720                    let op = GetOperation::new(stub)
5721                        .set_name(name)
5722                        .with_options(options)
5723                        .send()
5724                        .await?;
5725                    Ok(Operation::new(op))
5726                }
5727            };
5728
5729            let start = move || async {
5730                let op = self.send().await?;
5731                Ok(Operation::new(op))
5732            };
5733
5734            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5735        }
5736
5737        /// Sets the value of [private_connection][crate::model::UpdatePrivateConnectionRequest::private_connection].
5738        pub fn set_private_connection<
5739            T: Into<std::option::Option<crate::model::PrivateConnection>>,
5740        >(
5741            mut self,
5742            v: T,
5743        ) -> Self {
5744            self.0.request.private_connection = v.into();
5745            self
5746        }
5747
5748        /// Sets the value of [update_mask][crate::model::UpdatePrivateConnectionRequest::update_mask].
5749        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
5750            mut self,
5751            v: T,
5752        ) -> Self {
5753            self.0.request.update_mask = v.into();
5754            self
5755        }
5756
5757        /// Sets the value of [request_id][crate::model::UpdatePrivateConnectionRequest::request_id].
5758        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5759            self.0.request.request_id = v.into();
5760            self
5761        }
5762    }
5763
5764    #[doc(hidden)]
5765    impl gax::options::internal::RequestBuilder for UpdatePrivateConnection {
5766        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5767            &mut self.0.options
5768        }
5769    }
5770
5771    /// The request builder for [VmwareEngine::delete_private_connection][super::super::client::VmwareEngine::delete_private_connection] calls.
5772    #[derive(Clone, Debug)]
5773    pub struct DeletePrivateConnection(
5774        RequestBuilder<crate::model::DeletePrivateConnectionRequest>,
5775    );
5776
5777    impl DeletePrivateConnection {
5778        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
5779            Self(RequestBuilder::new(stub))
5780        }
5781
5782        /// Sets the full request, replacing any prior values.
5783        pub fn with_request<V: Into<crate::model::DeletePrivateConnectionRequest>>(
5784            mut self,
5785            v: V,
5786        ) -> Self {
5787            self.0.request = v.into();
5788            self
5789        }
5790
5791        /// Sets all the options, replacing any prior values.
5792        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5793            self.0.options = v.into();
5794            self
5795        }
5796
5797        /// Sends the request.
5798        ///
5799        /// # Long running operations
5800        ///
5801        /// This starts, but does not poll, a longrunning operation. More information
5802        /// on [delete_private_connection][super::super::client::VmwareEngine::delete_private_connection].
5803        pub async fn send(self) -> Result<longrunning::model::Operation> {
5804            (*self.0.stub)
5805                .delete_private_connection(self.0.request, self.0.options)
5806                .await
5807                .map(gax::response::Response::into_body)
5808        }
5809
5810        /// Creates a [Poller][lro::Poller] to work with `delete_private_connection`.
5811        pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
5812            type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
5813            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5814            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5815
5816            let stub = self.0.stub.clone();
5817            let mut options = self.0.options.clone();
5818            options.set_retry_policy(gax::retry_policy::NeverRetry);
5819            let query = move |name| {
5820                let stub = stub.clone();
5821                let options = options.clone();
5822                async {
5823                    let op = GetOperation::new(stub)
5824                        .set_name(name)
5825                        .with_options(options)
5826                        .send()
5827                        .await?;
5828                    Ok(Operation::new(op))
5829                }
5830            };
5831
5832            let start = move || async {
5833                let op = self.send().await?;
5834                Ok(Operation::new(op))
5835            };
5836
5837            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5838        }
5839
5840        /// Sets the value of [name][crate::model::DeletePrivateConnectionRequest::name].
5841        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5842            self.0.request.name = v.into();
5843            self
5844        }
5845
5846        /// Sets the value of [request_id][crate::model::DeletePrivateConnectionRequest::request_id].
5847        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5848            self.0.request.request_id = v.into();
5849            self
5850        }
5851    }
5852
5853    #[doc(hidden)]
5854    impl gax::options::internal::RequestBuilder for DeletePrivateConnection {
5855        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5856            &mut self.0.options
5857        }
5858    }
5859
5860    /// The request builder for [VmwareEngine::list_private_connection_peering_routes][super::super::client::VmwareEngine::list_private_connection_peering_routes] calls.
5861    #[derive(Clone, Debug)]
5862    pub struct ListPrivateConnectionPeeringRoutes(
5863        RequestBuilder<crate::model::ListPrivateConnectionPeeringRoutesRequest>,
5864    );
5865
5866    impl ListPrivateConnectionPeeringRoutes {
5867        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
5868            Self(RequestBuilder::new(stub))
5869        }
5870
5871        /// Sets the full request, replacing any prior values.
5872        pub fn with_request<V: Into<crate::model::ListPrivateConnectionPeeringRoutesRequest>>(
5873            mut self,
5874            v: V,
5875        ) -> Self {
5876            self.0.request = v.into();
5877            self
5878        }
5879
5880        /// Sets all the options, replacing any prior values.
5881        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5882            self.0.options = v.into();
5883            self
5884        }
5885
5886        /// Sends the request.
5887        pub async fn send(
5888            self,
5889        ) -> Result<crate::model::ListPrivateConnectionPeeringRoutesResponse> {
5890            (*self.0.stub)
5891                .list_private_connection_peering_routes(self.0.request, self.0.options)
5892                .await
5893                .map(gax::response::Response::into_body)
5894        }
5895
5896        /// Streams the responses back.
5897        pub async fn paginator(
5898            self,
5899        ) -> impl gax::paginator::Paginator<
5900            crate::model::ListPrivateConnectionPeeringRoutesResponse,
5901            gax::error::Error,
5902        > {
5903            use std::clone::Clone;
5904            let token = self.0.request.page_token.clone();
5905            let execute = move |token: String| {
5906                let mut builder = self.clone();
5907                builder.0.request = builder.0.request.set_page_token(token);
5908                builder.send()
5909            };
5910            gax::paginator::internal::new_paginator(token, execute)
5911        }
5912
5913        /// Sets the value of [parent][crate::model::ListPrivateConnectionPeeringRoutesRequest::parent].
5914        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5915            self.0.request.parent = v.into();
5916            self
5917        }
5918
5919        /// Sets the value of [page_size][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_size].
5920        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5921            self.0.request.page_size = v.into();
5922            self
5923        }
5924
5925        /// Sets the value of [page_token][crate::model::ListPrivateConnectionPeeringRoutesRequest::page_token].
5926        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5927            self.0.request.page_token = v.into();
5928            self
5929        }
5930    }
5931
5932    #[doc(hidden)]
5933    impl gax::options::internal::RequestBuilder for ListPrivateConnectionPeeringRoutes {
5934        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5935            &mut self.0.options
5936        }
5937    }
5938
5939    /// The request builder for [VmwareEngine::grant_dns_bind_permission][super::super::client::VmwareEngine::grant_dns_bind_permission] calls.
5940    #[derive(Clone, Debug)]
5941    pub struct GrantDnsBindPermission(RequestBuilder<crate::model::GrantDnsBindPermissionRequest>);
5942
5943    impl GrantDnsBindPermission {
5944        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
5945            Self(RequestBuilder::new(stub))
5946        }
5947
5948        /// Sets the full request, replacing any prior values.
5949        pub fn with_request<V: Into<crate::model::GrantDnsBindPermissionRequest>>(
5950            mut self,
5951            v: V,
5952        ) -> Self {
5953            self.0.request = v.into();
5954            self
5955        }
5956
5957        /// Sets all the options, replacing any prior values.
5958        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5959            self.0.options = v.into();
5960            self
5961        }
5962
5963        /// Sends the request.
5964        ///
5965        /// # Long running operations
5966        ///
5967        /// This starts, but does not poll, a longrunning operation. More information
5968        /// on [grant_dns_bind_permission][super::super::client::VmwareEngine::grant_dns_bind_permission].
5969        pub async fn send(self) -> Result<longrunning::model::Operation> {
5970            (*self.0.stub)
5971                .grant_dns_bind_permission(self.0.request, self.0.options)
5972                .await
5973                .map(gax::response::Response::into_body)
5974        }
5975
5976        /// Creates a [Poller][lro::Poller] to work with `grant_dns_bind_permission`.
5977        pub fn poller(
5978            self,
5979        ) -> impl lro::Poller<crate::model::DnsBindPermission, crate::model::OperationMetadata>
5980        {
5981            type Operation =
5982                lro::Operation<crate::model::DnsBindPermission, crate::model::OperationMetadata>;
5983            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5984            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5985
5986            let stub = self.0.stub.clone();
5987            let mut options = self.0.options.clone();
5988            options.set_retry_policy(gax::retry_policy::NeverRetry);
5989            let query = move |name| {
5990                let stub = stub.clone();
5991                let options = options.clone();
5992                async {
5993                    let op = GetOperation::new(stub)
5994                        .set_name(name)
5995                        .with_options(options)
5996                        .send()
5997                        .await?;
5998                    Ok(Operation::new(op))
5999                }
6000            };
6001
6002            let start = move || async {
6003                let op = self.send().await?;
6004                Ok(Operation::new(op))
6005            };
6006
6007            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6008        }
6009
6010        /// Sets the value of [name][crate::model::GrantDnsBindPermissionRequest::name].
6011        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6012            self.0.request.name = v.into();
6013            self
6014        }
6015
6016        /// Sets the value of [principal][crate::model::GrantDnsBindPermissionRequest::principal].
6017        pub fn set_principal<T: Into<std::option::Option<crate::model::Principal>>>(
6018            mut self,
6019            v: T,
6020        ) -> Self {
6021            self.0.request.principal = v.into();
6022            self
6023        }
6024
6025        /// Sets the value of [request_id][crate::model::GrantDnsBindPermissionRequest::request_id].
6026        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6027            self.0.request.request_id = v.into();
6028            self
6029        }
6030    }
6031
6032    #[doc(hidden)]
6033    impl gax::options::internal::RequestBuilder for GrantDnsBindPermission {
6034        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6035            &mut self.0.options
6036        }
6037    }
6038
6039    /// The request builder for [VmwareEngine::get_dns_bind_permission][super::super::client::VmwareEngine::get_dns_bind_permission] calls.
6040    #[derive(Clone, Debug)]
6041    pub struct GetDnsBindPermission(RequestBuilder<crate::model::GetDnsBindPermissionRequest>);
6042
6043    impl GetDnsBindPermission {
6044        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
6045            Self(RequestBuilder::new(stub))
6046        }
6047
6048        /// Sets the full request, replacing any prior values.
6049        pub fn with_request<V: Into<crate::model::GetDnsBindPermissionRequest>>(
6050            mut self,
6051            v: V,
6052        ) -> Self {
6053            self.0.request = v.into();
6054            self
6055        }
6056
6057        /// Sets all the options, replacing any prior values.
6058        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6059            self.0.options = v.into();
6060            self
6061        }
6062
6063        /// Sends the request.
6064        pub async fn send(self) -> Result<crate::model::DnsBindPermission> {
6065            (*self.0.stub)
6066                .get_dns_bind_permission(self.0.request, self.0.options)
6067                .await
6068                .map(gax::response::Response::into_body)
6069        }
6070
6071        /// Sets the value of [name][crate::model::GetDnsBindPermissionRequest::name].
6072        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6073            self.0.request.name = v.into();
6074            self
6075        }
6076    }
6077
6078    #[doc(hidden)]
6079    impl gax::options::internal::RequestBuilder for GetDnsBindPermission {
6080        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6081            &mut self.0.options
6082        }
6083    }
6084
6085    /// The request builder for [VmwareEngine::revoke_dns_bind_permission][super::super::client::VmwareEngine::revoke_dns_bind_permission] calls.
6086    #[derive(Clone, Debug)]
6087    pub struct RevokeDnsBindPermission(
6088        RequestBuilder<crate::model::RevokeDnsBindPermissionRequest>,
6089    );
6090
6091    impl RevokeDnsBindPermission {
6092        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
6093            Self(RequestBuilder::new(stub))
6094        }
6095
6096        /// Sets the full request, replacing any prior values.
6097        pub fn with_request<V: Into<crate::model::RevokeDnsBindPermissionRequest>>(
6098            mut self,
6099            v: V,
6100        ) -> Self {
6101            self.0.request = v.into();
6102            self
6103        }
6104
6105        /// Sets all the options, replacing any prior values.
6106        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6107            self.0.options = v.into();
6108            self
6109        }
6110
6111        /// Sends the request.
6112        ///
6113        /// # Long running operations
6114        ///
6115        /// This starts, but does not poll, a longrunning operation. More information
6116        /// on [revoke_dns_bind_permission][super::super::client::VmwareEngine::revoke_dns_bind_permission].
6117        pub async fn send(self) -> Result<longrunning::model::Operation> {
6118            (*self.0.stub)
6119                .revoke_dns_bind_permission(self.0.request, self.0.options)
6120                .await
6121                .map(gax::response::Response::into_body)
6122        }
6123
6124        /// Creates a [Poller][lro::Poller] to work with `revoke_dns_bind_permission`.
6125        pub fn poller(
6126            self,
6127        ) -> impl lro::Poller<crate::model::DnsBindPermission, crate::model::OperationMetadata>
6128        {
6129            type Operation =
6130                lro::Operation<crate::model::DnsBindPermission, crate::model::OperationMetadata>;
6131            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6132            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6133
6134            let stub = self.0.stub.clone();
6135            let mut options = self.0.options.clone();
6136            options.set_retry_policy(gax::retry_policy::NeverRetry);
6137            let query = move |name| {
6138                let stub = stub.clone();
6139                let options = options.clone();
6140                async {
6141                    let op = GetOperation::new(stub)
6142                        .set_name(name)
6143                        .with_options(options)
6144                        .send()
6145                        .await?;
6146                    Ok(Operation::new(op))
6147                }
6148            };
6149
6150            let start = move || async {
6151                let op = self.send().await?;
6152                Ok(Operation::new(op))
6153            };
6154
6155            lro::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6156        }
6157
6158        /// Sets the value of [name][crate::model::RevokeDnsBindPermissionRequest::name].
6159        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6160            self.0.request.name = v.into();
6161            self
6162        }
6163
6164        /// Sets the value of [principal][crate::model::RevokeDnsBindPermissionRequest::principal].
6165        pub fn set_principal<T: Into<std::option::Option<crate::model::Principal>>>(
6166            mut self,
6167            v: T,
6168        ) -> Self {
6169            self.0.request.principal = v.into();
6170            self
6171        }
6172
6173        /// Sets the value of [request_id][crate::model::RevokeDnsBindPermissionRequest::request_id].
6174        pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6175            self.0.request.request_id = v.into();
6176            self
6177        }
6178    }
6179
6180    #[doc(hidden)]
6181    impl gax::options::internal::RequestBuilder for RevokeDnsBindPermission {
6182        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6183            &mut self.0.options
6184        }
6185    }
6186
6187    /// The request builder for [VmwareEngine::list_locations][super::super::client::VmwareEngine::list_locations] calls.
6188    #[derive(Clone, Debug)]
6189    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
6190
6191    impl ListLocations {
6192        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
6193            Self(RequestBuilder::new(stub))
6194        }
6195
6196        /// Sets the full request, replacing any prior values.
6197        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
6198            mut self,
6199            v: V,
6200        ) -> Self {
6201            self.0.request = v.into();
6202            self
6203        }
6204
6205        /// Sets all the options, replacing any prior values.
6206        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6207            self.0.options = v.into();
6208            self
6209        }
6210
6211        /// Sends the request.
6212        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
6213            (*self.0.stub)
6214                .list_locations(self.0.request, self.0.options)
6215                .await
6216                .map(gax::response::Response::into_body)
6217        }
6218
6219        /// Streams the responses back.
6220        pub async fn paginator(
6221            self,
6222        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
6223        {
6224            use std::clone::Clone;
6225            let token = self.0.request.page_token.clone();
6226            let execute = move |token: String| {
6227                let mut builder = self.clone();
6228                builder.0.request = builder.0.request.set_page_token(token);
6229                builder.send()
6230            };
6231            gax::paginator::internal::new_paginator(token, execute)
6232        }
6233
6234        /// Sets the value of [name][location::model::ListLocationsRequest::name].
6235        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6236            self.0.request.name = v.into();
6237            self
6238        }
6239
6240        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
6241        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6242            self.0.request.filter = v.into();
6243            self
6244        }
6245
6246        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
6247        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6248            self.0.request.page_size = v.into();
6249            self
6250        }
6251
6252        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
6253        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6254            self.0.request.page_token = v.into();
6255            self
6256        }
6257    }
6258
6259    #[doc(hidden)]
6260    impl gax::options::internal::RequestBuilder for ListLocations {
6261        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6262            &mut self.0.options
6263        }
6264    }
6265
6266    /// The request builder for [VmwareEngine::get_location][super::super::client::VmwareEngine::get_location] calls.
6267    #[derive(Clone, Debug)]
6268    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
6269
6270    impl GetLocation {
6271        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
6272            Self(RequestBuilder::new(stub))
6273        }
6274
6275        /// Sets the full request, replacing any prior values.
6276        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
6277            self.0.request = v.into();
6278            self
6279        }
6280
6281        /// Sets all the options, replacing any prior values.
6282        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6283            self.0.options = v.into();
6284            self
6285        }
6286
6287        /// Sends the request.
6288        pub async fn send(self) -> Result<location::model::Location> {
6289            (*self.0.stub)
6290                .get_location(self.0.request, self.0.options)
6291                .await
6292                .map(gax::response::Response::into_body)
6293        }
6294
6295        /// Sets the value of [name][location::model::GetLocationRequest::name].
6296        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6297            self.0.request.name = v.into();
6298            self
6299        }
6300    }
6301
6302    #[doc(hidden)]
6303    impl gax::options::internal::RequestBuilder for GetLocation {
6304        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6305            &mut self.0.options
6306        }
6307    }
6308
6309    /// The request builder for [VmwareEngine::set_iam_policy][super::super::client::VmwareEngine::set_iam_policy] calls.
6310    #[derive(Clone, Debug)]
6311    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
6312
6313    impl SetIamPolicy {
6314        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
6315            Self(RequestBuilder::new(stub))
6316        }
6317
6318        /// Sets the full request, replacing any prior values.
6319        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
6320            self.0.request = v.into();
6321            self
6322        }
6323
6324        /// Sets all the options, replacing any prior values.
6325        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6326            self.0.options = v.into();
6327            self
6328        }
6329
6330        /// Sends the request.
6331        pub async fn send(self) -> Result<iam_v1::model::Policy> {
6332            (*self.0.stub)
6333                .set_iam_policy(self.0.request, self.0.options)
6334                .await
6335                .map(gax::response::Response::into_body)
6336        }
6337
6338        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
6339        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6340            self.0.request.resource = v.into();
6341            self
6342        }
6343
6344        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
6345        pub fn set_policy<T: Into<std::option::Option<iam_v1::model::Policy>>>(
6346            mut self,
6347            v: T,
6348        ) -> Self {
6349            self.0.request.policy = v.into();
6350            self
6351        }
6352
6353        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
6354        pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
6355            mut self,
6356            v: T,
6357        ) -> Self {
6358            self.0.request.update_mask = v.into();
6359            self
6360        }
6361    }
6362
6363    #[doc(hidden)]
6364    impl gax::options::internal::RequestBuilder for SetIamPolicy {
6365        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6366            &mut self.0.options
6367        }
6368    }
6369
6370    /// The request builder for [VmwareEngine::get_iam_policy][super::super::client::VmwareEngine::get_iam_policy] calls.
6371    #[derive(Clone, Debug)]
6372    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
6373
6374    impl GetIamPolicy {
6375        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
6376            Self(RequestBuilder::new(stub))
6377        }
6378
6379        /// Sets the full request, replacing any prior values.
6380        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
6381            self.0.request = v.into();
6382            self
6383        }
6384
6385        /// Sets all the options, replacing any prior values.
6386        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6387            self.0.options = v.into();
6388            self
6389        }
6390
6391        /// Sends the request.
6392        pub async fn send(self) -> Result<iam_v1::model::Policy> {
6393            (*self.0.stub)
6394                .get_iam_policy(self.0.request, self.0.options)
6395                .await
6396                .map(gax::response::Response::into_body)
6397        }
6398
6399        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
6400        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6401            self.0.request.resource = v.into();
6402            self
6403        }
6404
6405        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
6406        pub fn set_options<T: Into<std::option::Option<iam_v1::model::GetPolicyOptions>>>(
6407            mut self,
6408            v: T,
6409        ) -> Self {
6410            self.0.request.options = v.into();
6411            self
6412        }
6413    }
6414
6415    #[doc(hidden)]
6416    impl gax::options::internal::RequestBuilder for GetIamPolicy {
6417        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6418            &mut self.0.options
6419        }
6420    }
6421
6422    /// The request builder for [VmwareEngine::test_iam_permissions][super::super::client::VmwareEngine::test_iam_permissions] calls.
6423    #[derive(Clone, Debug)]
6424    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
6425
6426    impl TestIamPermissions {
6427        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
6428            Self(RequestBuilder::new(stub))
6429        }
6430
6431        /// Sets the full request, replacing any prior values.
6432        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
6433            mut self,
6434            v: V,
6435        ) -> Self {
6436            self.0.request = v.into();
6437            self
6438        }
6439
6440        /// Sets all the options, replacing any prior values.
6441        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6442            self.0.options = v.into();
6443            self
6444        }
6445
6446        /// Sends the request.
6447        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
6448            (*self.0.stub)
6449                .test_iam_permissions(self.0.request, self.0.options)
6450                .await
6451                .map(gax::response::Response::into_body)
6452        }
6453
6454        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
6455        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6456            self.0.request.resource = v.into();
6457            self
6458        }
6459
6460        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
6461        pub fn set_permissions<T, V>(mut self, v: T) -> Self
6462        where
6463            T: std::iter::IntoIterator<Item = V>,
6464            V: std::convert::Into<std::string::String>,
6465        {
6466            use std::iter::Iterator;
6467            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
6468            self
6469        }
6470    }
6471
6472    #[doc(hidden)]
6473    impl gax::options::internal::RequestBuilder for TestIamPermissions {
6474        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6475            &mut self.0.options
6476        }
6477    }
6478
6479    /// The request builder for [VmwareEngine::list_operations][super::super::client::VmwareEngine::list_operations] calls.
6480    #[derive(Clone, Debug)]
6481    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
6482
6483    impl ListOperations {
6484        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
6485            Self(RequestBuilder::new(stub))
6486        }
6487
6488        /// Sets the full request, replacing any prior values.
6489        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
6490            mut self,
6491            v: V,
6492        ) -> Self {
6493            self.0.request = v.into();
6494            self
6495        }
6496
6497        /// Sets all the options, replacing any prior values.
6498        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6499            self.0.options = v.into();
6500            self
6501        }
6502
6503        /// Sends the request.
6504        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
6505            (*self.0.stub)
6506                .list_operations(self.0.request, self.0.options)
6507                .await
6508                .map(gax::response::Response::into_body)
6509        }
6510
6511        /// Streams the responses back.
6512        pub async fn paginator(
6513            self,
6514        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
6515        {
6516            use std::clone::Clone;
6517            let token = self.0.request.page_token.clone();
6518            let execute = move |token: String| {
6519                let mut builder = self.clone();
6520                builder.0.request = builder.0.request.set_page_token(token);
6521                builder.send()
6522            };
6523            gax::paginator::internal::new_paginator(token, execute)
6524        }
6525
6526        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
6527        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6528            self.0.request.name = v.into();
6529            self
6530        }
6531
6532        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
6533        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6534            self.0.request.filter = v.into();
6535            self
6536        }
6537
6538        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
6539        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6540            self.0.request.page_size = v.into();
6541            self
6542        }
6543
6544        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
6545        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6546            self.0.request.page_token = v.into();
6547            self
6548        }
6549    }
6550
6551    #[doc(hidden)]
6552    impl gax::options::internal::RequestBuilder for ListOperations {
6553        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6554            &mut self.0.options
6555        }
6556    }
6557
6558    /// The request builder for [VmwareEngine::get_operation][super::super::client::VmwareEngine::get_operation] calls.
6559    #[derive(Clone, Debug)]
6560    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
6561
6562    impl GetOperation {
6563        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
6564            Self(RequestBuilder::new(stub))
6565        }
6566
6567        /// Sets the full request, replacing any prior values.
6568        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
6569            mut self,
6570            v: V,
6571        ) -> Self {
6572            self.0.request = v.into();
6573            self
6574        }
6575
6576        /// Sets all the options, replacing any prior values.
6577        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6578            self.0.options = v.into();
6579            self
6580        }
6581
6582        /// Sends the request.
6583        pub async fn send(self) -> Result<longrunning::model::Operation> {
6584            (*self.0.stub)
6585                .get_operation(self.0.request, self.0.options)
6586                .await
6587                .map(gax::response::Response::into_body)
6588        }
6589
6590        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
6591        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6592            self.0.request.name = v.into();
6593            self
6594        }
6595    }
6596
6597    #[doc(hidden)]
6598    impl gax::options::internal::RequestBuilder for GetOperation {
6599        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6600            &mut self.0.options
6601        }
6602    }
6603
6604    /// The request builder for [VmwareEngine::delete_operation][super::super::client::VmwareEngine::delete_operation] calls.
6605    #[derive(Clone, Debug)]
6606    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
6607
6608    impl DeleteOperation {
6609        pub(crate) fn new(stub: Arc<dyn super::super::stub::dynamic::VmwareEngine>) -> Self {
6610            Self(RequestBuilder::new(stub))
6611        }
6612
6613        /// Sets the full request, replacing any prior values.
6614        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
6615            mut self,
6616            v: V,
6617        ) -> Self {
6618            self.0.request = v.into();
6619            self
6620        }
6621
6622        /// Sets all the options, replacing any prior values.
6623        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6624            self.0.options = v.into();
6625            self
6626        }
6627
6628        /// Sends the request.
6629        pub async fn send(self) -> Result<()> {
6630            (*self.0.stub)
6631                .delete_operation(self.0.request, self.0.options)
6632                .await
6633                .map(gax::response::Response::into_body)
6634        }
6635
6636        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
6637        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6638            self.0.request.name = v.into();
6639            self
6640        }
6641    }
6642
6643    #[doc(hidden)]
6644    impl gax::options::internal::RequestBuilder for DeleteOperation {
6645        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6646            &mut self.0.options
6647        }
6648    }
6649}