1pub mod vmware_engine {
18 use crate::Result;
19 use std::sync::Arc;
20
21 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 #[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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
495 self.0.request.force = v.into();
496 self
497 }
498
499 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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 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 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 #[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 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 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 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 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 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 #[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 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 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 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 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 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 #[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 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 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 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 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 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 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 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 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 #[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 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 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 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 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 #[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 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 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 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 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}