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