1pub mod vmware_engine {
18 use crate::Result;
19
20 pub type ClientBuilder =
34 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::VmwareEngine;
38 pub struct Factory;
39 impl gax::client_builder::internal::ClientFactory for Factory {
40 type Client = VmwareEngine;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> gax::client_builder::Result<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
55 request: R,
56 options: gax::options::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(
64 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
65 ) -> Self {
66 Self {
67 stub,
68 request: R::default(),
69 options: gax::options::RequestOptions::default(),
70 }
71 }
72 }
73
74 #[derive(Clone, Debug)]
95 pub struct ListPrivateClouds(RequestBuilder<crate::model::ListPrivateCloudsRequest>);
96
97 impl ListPrivateClouds {
98 pub(crate) fn new(
99 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
100 ) -> Self {
101 Self(RequestBuilder::new(stub))
102 }
103
104 pub fn with_request<V: Into<crate::model::ListPrivateCloudsRequest>>(
106 mut self,
107 v: V,
108 ) -> Self {
109 self.0.request = v.into();
110 self
111 }
112
113 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
115 self.0.options = v.into();
116 self
117 }
118
119 pub async fn send(self) -> Result<crate::model::ListPrivateCloudsResponse> {
121 (*self.0.stub)
122 .list_private_clouds(self.0.request, self.0.options)
123 .await
124 .map(gax::response::Response::into_body)
125 }
126
127 pub fn by_page(
129 self,
130 ) -> impl gax::paginator::Paginator<crate::model::ListPrivateCloudsResponse, gax::error::Error>
131 {
132 use std::clone::Clone;
133 let token = self.0.request.page_token.clone();
134 let execute = move |token: String| {
135 let mut builder = self.clone();
136 builder.0.request = builder.0.request.set_page_token(token);
137 builder.send()
138 };
139 gax::paginator::internal::new_paginator(token, execute)
140 }
141
142 pub fn by_item(
144 self,
145 ) -> impl gax::paginator::ItemPaginator<crate::model::ListPrivateCloudsResponse, gax::error::Error>
146 {
147 use gax::paginator::Paginator;
148 self.by_page().items()
149 }
150
151 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
155 self.0.request.parent = v.into();
156 self
157 }
158
159 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
161 self.0.request.page_size = v.into();
162 self
163 }
164
165 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
167 self.0.request.page_token = v.into();
168 self
169 }
170
171 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
173 self.0.request.filter = v.into();
174 self
175 }
176
177 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
179 self.0.request.order_by = v.into();
180 self
181 }
182 }
183
184 #[doc(hidden)]
185 impl gax::options::internal::RequestBuilder for ListPrivateClouds {
186 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
187 &mut self.0.options
188 }
189 }
190
191 #[derive(Clone, Debug)]
208 pub struct GetPrivateCloud(RequestBuilder<crate::model::GetPrivateCloudRequest>);
209
210 impl GetPrivateCloud {
211 pub(crate) fn new(
212 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
213 ) -> Self {
214 Self(RequestBuilder::new(stub))
215 }
216
217 pub fn with_request<V: Into<crate::model::GetPrivateCloudRequest>>(mut self, v: V) -> Self {
219 self.0.request = v.into();
220 self
221 }
222
223 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
225 self.0.options = v.into();
226 self
227 }
228
229 pub async fn send(self) -> Result<crate::model::PrivateCloud> {
231 (*self.0.stub)
232 .get_private_cloud(self.0.request, self.0.options)
233 .await
234 .map(gax::response::Response::into_body)
235 }
236
237 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
241 self.0.request.name = v.into();
242 self
243 }
244 }
245
246 #[doc(hidden)]
247 impl gax::options::internal::RequestBuilder for GetPrivateCloud {
248 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
249 &mut self.0.options
250 }
251 }
252
253 #[derive(Clone, Debug)]
271 pub struct CreatePrivateCloud(RequestBuilder<crate::model::CreatePrivateCloudRequest>);
272
273 impl CreatePrivateCloud {
274 pub(crate) fn new(
275 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
276 ) -> Self {
277 Self(RequestBuilder::new(stub))
278 }
279
280 pub fn with_request<V: Into<crate::model::CreatePrivateCloudRequest>>(
282 mut self,
283 v: V,
284 ) -> Self {
285 self.0.request = v.into();
286 self
287 }
288
289 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
291 self.0.options = v.into();
292 self
293 }
294
295 pub async fn send(self) -> Result<longrunning::model::Operation> {
302 (*self.0.stub)
303 .create_private_cloud(self.0.request, self.0.options)
304 .await
305 .map(gax::response::Response::into_body)
306 }
307
308 pub fn poller(
310 self,
311 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
312 type Operation = lro::internal::Operation<
313 crate::model::PrivateCloud,
314 crate::model::OperationMetadata,
315 >;
316 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
317 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
318
319 let stub = self.0.stub.clone();
320 let mut options = self.0.options.clone();
321 options.set_retry_policy(gax::retry_policy::NeverRetry);
322 let query = move |name| {
323 let stub = stub.clone();
324 let options = options.clone();
325 async {
326 let op = GetOperation::new(stub)
327 .set_name(name)
328 .with_options(options)
329 .send()
330 .await?;
331 Ok(Operation::new(op))
332 }
333 };
334
335 let start = move || async {
336 let op = self.send().await?;
337 Ok(Operation::new(op))
338 };
339
340 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
341 }
342
343 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
347 self.0.request.parent = v.into();
348 self
349 }
350
351 pub fn set_private_cloud_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
355 self.0.request.private_cloud_id = v.into();
356 self
357 }
358
359 pub fn set_private_cloud<T>(mut self, v: T) -> Self
363 where
364 T: std::convert::Into<crate::model::PrivateCloud>,
365 {
366 self.0.request.private_cloud = std::option::Option::Some(v.into());
367 self
368 }
369
370 pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
374 where
375 T: std::convert::Into<crate::model::PrivateCloud>,
376 {
377 self.0.request.private_cloud = v.map(|x| x.into());
378 self
379 }
380
381 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
383 self.0.request.request_id = v.into();
384 self
385 }
386
387 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
389 self.0.request.validate_only = v.into();
390 self
391 }
392 }
393
394 #[doc(hidden)]
395 impl gax::options::internal::RequestBuilder for CreatePrivateCloud {
396 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
397 &mut self.0.options
398 }
399 }
400
401 #[derive(Clone, Debug)]
419 pub struct UpdatePrivateCloud(RequestBuilder<crate::model::UpdatePrivateCloudRequest>);
420
421 impl UpdatePrivateCloud {
422 pub(crate) fn new(
423 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
424 ) -> Self {
425 Self(RequestBuilder::new(stub))
426 }
427
428 pub fn with_request<V: Into<crate::model::UpdatePrivateCloudRequest>>(
430 mut self,
431 v: V,
432 ) -> Self {
433 self.0.request = v.into();
434 self
435 }
436
437 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
439 self.0.options = v.into();
440 self
441 }
442
443 pub async fn send(self) -> Result<longrunning::model::Operation> {
450 (*self.0.stub)
451 .update_private_cloud(self.0.request, self.0.options)
452 .await
453 .map(gax::response::Response::into_body)
454 }
455
456 pub fn poller(
458 self,
459 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
460 type Operation = lro::internal::Operation<
461 crate::model::PrivateCloud,
462 crate::model::OperationMetadata,
463 >;
464 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
465 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
466
467 let stub = self.0.stub.clone();
468 let mut options = self.0.options.clone();
469 options.set_retry_policy(gax::retry_policy::NeverRetry);
470 let query = move |name| {
471 let stub = stub.clone();
472 let options = options.clone();
473 async {
474 let op = GetOperation::new(stub)
475 .set_name(name)
476 .with_options(options)
477 .send()
478 .await?;
479 Ok(Operation::new(op))
480 }
481 };
482
483 let start = move || async {
484 let op = self.send().await?;
485 Ok(Operation::new(op))
486 };
487
488 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
489 }
490
491 pub fn set_private_cloud<T>(mut self, v: T) -> Self
495 where
496 T: std::convert::Into<crate::model::PrivateCloud>,
497 {
498 self.0.request.private_cloud = std::option::Option::Some(v.into());
499 self
500 }
501
502 pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
506 where
507 T: std::convert::Into<crate::model::PrivateCloud>,
508 {
509 self.0.request.private_cloud = v.map(|x| x.into());
510 self
511 }
512
513 pub fn set_update_mask<T>(mut self, v: T) -> Self
517 where
518 T: std::convert::Into<wkt::FieldMask>,
519 {
520 self.0.request.update_mask = std::option::Option::Some(v.into());
521 self
522 }
523
524 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
528 where
529 T: std::convert::Into<wkt::FieldMask>,
530 {
531 self.0.request.update_mask = v.map(|x| x.into());
532 self
533 }
534
535 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
537 self.0.request.request_id = v.into();
538 self
539 }
540 }
541
542 #[doc(hidden)]
543 impl gax::options::internal::RequestBuilder for UpdatePrivateCloud {
544 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
545 &mut self.0.options
546 }
547 }
548
549 #[derive(Clone, Debug)]
567 pub struct DeletePrivateCloud(RequestBuilder<crate::model::DeletePrivateCloudRequest>);
568
569 impl DeletePrivateCloud {
570 pub(crate) fn new(
571 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
572 ) -> Self {
573 Self(RequestBuilder::new(stub))
574 }
575
576 pub fn with_request<V: Into<crate::model::DeletePrivateCloudRequest>>(
578 mut self,
579 v: V,
580 ) -> Self {
581 self.0.request = v.into();
582 self
583 }
584
585 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
587 self.0.options = v.into();
588 self
589 }
590
591 pub async fn send(self) -> Result<longrunning::model::Operation> {
598 (*self.0.stub)
599 .delete_private_cloud(self.0.request, self.0.options)
600 .await
601 .map(gax::response::Response::into_body)
602 }
603
604 pub fn poller(
606 self,
607 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
608 type Operation = lro::internal::Operation<
609 crate::model::PrivateCloud,
610 crate::model::OperationMetadata,
611 >;
612 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
613 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
614
615 let stub = self.0.stub.clone();
616 let mut options = self.0.options.clone();
617 options.set_retry_policy(gax::retry_policy::NeverRetry);
618 let query = move |name| {
619 let stub = stub.clone();
620 let options = options.clone();
621 async {
622 let op = GetOperation::new(stub)
623 .set_name(name)
624 .with_options(options)
625 .send()
626 .await?;
627 Ok(Operation::new(op))
628 }
629 };
630
631 let start = move || async {
632 let op = self.send().await?;
633 Ok(Operation::new(op))
634 };
635
636 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
637 }
638
639 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
643 self.0.request.name = v.into();
644 self
645 }
646
647 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
649 self.0.request.request_id = v.into();
650 self
651 }
652
653 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
655 self.0.request.force = v.into();
656 self
657 }
658
659 pub fn set_delay_hours<T>(mut self, v: T) -> Self
661 where
662 T: std::convert::Into<i32>,
663 {
664 self.0.request.delay_hours = std::option::Option::Some(v.into());
665 self
666 }
667
668 pub fn set_or_clear_delay_hours<T>(mut self, v: std::option::Option<T>) -> Self
670 where
671 T: std::convert::Into<i32>,
672 {
673 self.0.request.delay_hours = v.map(|x| x.into());
674 self
675 }
676 }
677
678 #[doc(hidden)]
679 impl gax::options::internal::RequestBuilder for DeletePrivateCloud {
680 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
681 &mut self.0.options
682 }
683 }
684
685 #[derive(Clone, Debug)]
703 pub struct UndeletePrivateCloud(RequestBuilder<crate::model::UndeletePrivateCloudRequest>);
704
705 impl UndeletePrivateCloud {
706 pub(crate) fn new(
707 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
708 ) -> Self {
709 Self(RequestBuilder::new(stub))
710 }
711
712 pub fn with_request<V: Into<crate::model::UndeletePrivateCloudRequest>>(
714 mut self,
715 v: V,
716 ) -> Self {
717 self.0.request = v.into();
718 self
719 }
720
721 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
723 self.0.options = v.into();
724 self
725 }
726
727 pub async fn send(self) -> Result<longrunning::model::Operation> {
734 (*self.0.stub)
735 .undelete_private_cloud(self.0.request, self.0.options)
736 .await
737 .map(gax::response::Response::into_body)
738 }
739
740 pub fn poller(
742 self,
743 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
744 type Operation = lro::internal::Operation<
745 crate::model::PrivateCloud,
746 crate::model::OperationMetadata,
747 >;
748 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
749 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
750
751 let stub = self.0.stub.clone();
752 let mut options = self.0.options.clone();
753 options.set_retry_policy(gax::retry_policy::NeverRetry);
754 let query = move |name| {
755 let stub = stub.clone();
756 let options = options.clone();
757 async {
758 let op = GetOperation::new(stub)
759 .set_name(name)
760 .with_options(options)
761 .send()
762 .await?;
763 Ok(Operation::new(op))
764 }
765 };
766
767 let start = move || async {
768 let op = self.send().await?;
769 Ok(Operation::new(op))
770 };
771
772 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
773 }
774
775 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
779 self.0.request.name = v.into();
780 self
781 }
782
783 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
785 self.0.request.request_id = v.into();
786 self
787 }
788 }
789
790 #[doc(hidden)]
791 impl gax::options::internal::RequestBuilder for UndeletePrivateCloud {
792 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
793 &mut self.0.options
794 }
795 }
796
797 #[derive(Clone, Debug)]
818 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
819
820 impl ListClusters {
821 pub(crate) fn new(
822 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
823 ) -> Self {
824 Self(RequestBuilder::new(stub))
825 }
826
827 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
829 self.0.request = v.into();
830 self
831 }
832
833 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
835 self.0.options = v.into();
836 self
837 }
838
839 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
841 (*self.0.stub)
842 .list_clusters(self.0.request, self.0.options)
843 .await
844 .map(gax::response::Response::into_body)
845 }
846
847 pub fn by_page(
849 self,
850 ) -> impl gax::paginator::Paginator<crate::model::ListClustersResponse, gax::error::Error>
851 {
852 use std::clone::Clone;
853 let token = self.0.request.page_token.clone();
854 let execute = move |token: String| {
855 let mut builder = self.clone();
856 builder.0.request = builder.0.request.set_page_token(token);
857 builder.send()
858 };
859 gax::paginator::internal::new_paginator(token, execute)
860 }
861
862 pub fn by_item(
864 self,
865 ) -> impl gax::paginator::ItemPaginator<crate::model::ListClustersResponse, gax::error::Error>
866 {
867 use gax::paginator::Paginator;
868 self.by_page().items()
869 }
870
871 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
875 self.0.request.parent = v.into();
876 self
877 }
878
879 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
881 self.0.request.page_size = v.into();
882 self
883 }
884
885 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
887 self.0.request.page_token = v.into();
888 self
889 }
890
891 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
893 self.0.request.filter = v.into();
894 self
895 }
896
897 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
899 self.0.request.order_by = v.into();
900 self
901 }
902 }
903
904 #[doc(hidden)]
905 impl gax::options::internal::RequestBuilder for ListClusters {
906 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
907 &mut self.0.options
908 }
909 }
910
911 #[derive(Clone, Debug)]
928 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
929
930 impl GetCluster {
931 pub(crate) fn new(
932 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
933 ) -> Self {
934 Self(RequestBuilder::new(stub))
935 }
936
937 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
939 self.0.request = v.into();
940 self
941 }
942
943 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
945 self.0.options = v.into();
946 self
947 }
948
949 pub async fn send(self) -> Result<crate::model::Cluster> {
951 (*self.0.stub)
952 .get_cluster(self.0.request, self.0.options)
953 .await
954 .map(gax::response::Response::into_body)
955 }
956
957 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
961 self.0.request.name = v.into();
962 self
963 }
964 }
965
966 #[doc(hidden)]
967 impl gax::options::internal::RequestBuilder for GetCluster {
968 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
969 &mut self.0.options
970 }
971 }
972
973 #[derive(Clone, Debug)]
991 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
992
993 impl CreateCluster {
994 pub(crate) fn new(
995 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
996 ) -> Self {
997 Self(RequestBuilder::new(stub))
998 }
999
1000 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
1002 self.0.request = v.into();
1003 self
1004 }
1005
1006 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1008 self.0.options = v.into();
1009 self
1010 }
1011
1012 pub async fn send(self) -> Result<longrunning::model::Operation> {
1019 (*self.0.stub)
1020 .create_cluster(self.0.request, self.0.options)
1021 .await
1022 .map(gax::response::Response::into_body)
1023 }
1024
1025 pub fn poller(
1027 self,
1028 ) -> impl lro::Poller<crate::model::Cluster, crate::model::OperationMetadata> {
1029 type Operation =
1030 lro::internal::Operation<crate::model::Cluster, crate::model::OperationMetadata>;
1031 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1032 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1033
1034 let stub = self.0.stub.clone();
1035 let mut options = self.0.options.clone();
1036 options.set_retry_policy(gax::retry_policy::NeverRetry);
1037 let query = move |name| {
1038 let stub = stub.clone();
1039 let options = options.clone();
1040 async {
1041 let op = GetOperation::new(stub)
1042 .set_name(name)
1043 .with_options(options)
1044 .send()
1045 .await?;
1046 Ok(Operation::new(op))
1047 }
1048 };
1049
1050 let start = move || async {
1051 let op = self.send().await?;
1052 Ok(Operation::new(op))
1053 };
1054
1055 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1056 }
1057
1058 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1062 self.0.request.parent = v.into();
1063 self
1064 }
1065
1066 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1070 self.0.request.cluster_id = v.into();
1071 self
1072 }
1073
1074 pub fn set_cluster<T>(mut self, v: T) -> Self
1078 where
1079 T: std::convert::Into<crate::model::Cluster>,
1080 {
1081 self.0.request.cluster = std::option::Option::Some(v.into());
1082 self
1083 }
1084
1085 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1089 where
1090 T: std::convert::Into<crate::model::Cluster>,
1091 {
1092 self.0.request.cluster = v.map(|x| x.into());
1093 self
1094 }
1095
1096 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1098 self.0.request.request_id = v.into();
1099 self
1100 }
1101
1102 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1104 self.0.request.validate_only = v.into();
1105 self
1106 }
1107 }
1108
1109 #[doc(hidden)]
1110 impl gax::options::internal::RequestBuilder for CreateCluster {
1111 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1112 &mut self.0.options
1113 }
1114 }
1115
1116 #[derive(Clone, Debug)]
1134 pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
1135
1136 impl UpdateCluster {
1137 pub(crate) fn new(
1138 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1139 ) -> Self {
1140 Self(RequestBuilder::new(stub))
1141 }
1142
1143 pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
1145 self.0.request = v.into();
1146 self
1147 }
1148
1149 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1151 self.0.options = v.into();
1152 self
1153 }
1154
1155 pub async fn send(self) -> Result<longrunning::model::Operation> {
1162 (*self.0.stub)
1163 .update_cluster(self.0.request, self.0.options)
1164 .await
1165 .map(gax::response::Response::into_body)
1166 }
1167
1168 pub fn poller(
1170 self,
1171 ) -> impl lro::Poller<crate::model::Cluster, crate::model::OperationMetadata> {
1172 type Operation =
1173 lro::internal::Operation<crate::model::Cluster, crate::model::OperationMetadata>;
1174 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1175 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1176
1177 let stub = self.0.stub.clone();
1178 let mut options = self.0.options.clone();
1179 options.set_retry_policy(gax::retry_policy::NeverRetry);
1180 let query = move |name| {
1181 let stub = stub.clone();
1182 let options = options.clone();
1183 async {
1184 let op = GetOperation::new(stub)
1185 .set_name(name)
1186 .with_options(options)
1187 .send()
1188 .await?;
1189 Ok(Operation::new(op))
1190 }
1191 };
1192
1193 let start = move || async {
1194 let op = self.send().await?;
1195 Ok(Operation::new(op))
1196 };
1197
1198 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1199 }
1200
1201 pub fn set_update_mask<T>(mut self, v: T) -> Self
1205 where
1206 T: std::convert::Into<wkt::FieldMask>,
1207 {
1208 self.0.request.update_mask = std::option::Option::Some(v.into());
1209 self
1210 }
1211
1212 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1216 where
1217 T: std::convert::Into<wkt::FieldMask>,
1218 {
1219 self.0.request.update_mask = v.map(|x| x.into());
1220 self
1221 }
1222
1223 pub fn set_cluster<T>(mut self, v: T) -> Self
1227 where
1228 T: std::convert::Into<crate::model::Cluster>,
1229 {
1230 self.0.request.cluster = std::option::Option::Some(v.into());
1231 self
1232 }
1233
1234 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1238 where
1239 T: std::convert::Into<crate::model::Cluster>,
1240 {
1241 self.0.request.cluster = v.map(|x| x.into());
1242 self
1243 }
1244
1245 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1247 self.0.request.request_id = v.into();
1248 self
1249 }
1250
1251 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1253 self.0.request.validate_only = v.into();
1254 self
1255 }
1256 }
1257
1258 #[doc(hidden)]
1259 impl gax::options::internal::RequestBuilder for UpdateCluster {
1260 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1261 &mut self.0.options
1262 }
1263 }
1264
1265 #[derive(Clone, Debug)]
1283 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1284
1285 impl DeleteCluster {
1286 pub(crate) fn new(
1287 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1288 ) -> Self {
1289 Self(RequestBuilder::new(stub))
1290 }
1291
1292 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1294 self.0.request = v.into();
1295 self
1296 }
1297
1298 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1300 self.0.options = v.into();
1301 self
1302 }
1303
1304 pub async fn send(self) -> Result<longrunning::model::Operation> {
1311 (*self.0.stub)
1312 .delete_cluster(self.0.request, self.0.options)
1313 .await
1314 .map(gax::response::Response::into_body)
1315 }
1316
1317 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
1319 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1320 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1321 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1322
1323 let stub = self.0.stub.clone();
1324 let mut options = self.0.options.clone();
1325 options.set_retry_policy(gax::retry_policy::NeverRetry);
1326 let query = move |name| {
1327 let stub = stub.clone();
1328 let options = options.clone();
1329 async {
1330 let op = GetOperation::new(stub)
1331 .set_name(name)
1332 .with_options(options)
1333 .send()
1334 .await?;
1335 Ok(Operation::new(op))
1336 }
1337 };
1338
1339 let start = move || async {
1340 let op = self.send().await?;
1341 Ok(Operation::new(op))
1342 };
1343
1344 lro::internal::new_unit_response_poller(
1345 polling_error_policy,
1346 polling_backoff_policy,
1347 start,
1348 query,
1349 )
1350 }
1351
1352 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1356 self.0.request.name = v.into();
1357 self
1358 }
1359
1360 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1362 self.0.request.request_id = v.into();
1363 self
1364 }
1365 }
1366
1367 #[doc(hidden)]
1368 impl gax::options::internal::RequestBuilder for DeleteCluster {
1369 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1370 &mut self.0.options
1371 }
1372 }
1373
1374 #[derive(Clone, Debug)]
1395 pub struct ListNodes(RequestBuilder<crate::model::ListNodesRequest>);
1396
1397 impl ListNodes {
1398 pub(crate) fn new(
1399 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1400 ) -> Self {
1401 Self(RequestBuilder::new(stub))
1402 }
1403
1404 pub fn with_request<V: Into<crate::model::ListNodesRequest>>(mut self, v: V) -> Self {
1406 self.0.request = v.into();
1407 self
1408 }
1409
1410 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1412 self.0.options = v.into();
1413 self
1414 }
1415
1416 pub async fn send(self) -> Result<crate::model::ListNodesResponse> {
1418 (*self.0.stub)
1419 .list_nodes(self.0.request, self.0.options)
1420 .await
1421 .map(gax::response::Response::into_body)
1422 }
1423
1424 pub fn by_page(
1426 self,
1427 ) -> impl gax::paginator::Paginator<crate::model::ListNodesResponse, gax::error::Error>
1428 {
1429 use std::clone::Clone;
1430 let token = self.0.request.page_token.clone();
1431 let execute = move |token: String| {
1432 let mut builder = self.clone();
1433 builder.0.request = builder.0.request.set_page_token(token);
1434 builder.send()
1435 };
1436 gax::paginator::internal::new_paginator(token, execute)
1437 }
1438
1439 pub fn by_item(
1441 self,
1442 ) -> impl gax::paginator::ItemPaginator<crate::model::ListNodesResponse, gax::error::Error>
1443 {
1444 use gax::paginator::Paginator;
1445 self.by_page().items()
1446 }
1447
1448 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1452 self.0.request.parent = v.into();
1453 self
1454 }
1455
1456 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1458 self.0.request.page_size = v.into();
1459 self
1460 }
1461
1462 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1464 self.0.request.page_token = v.into();
1465 self
1466 }
1467 }
1468
1469 #[doc(hidden)]
1470 impl gax::options::internal::RequestBuilder for ListNodes {
1471 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1472 &mut self.0.options
1473 }
1474 }
1475
1476 #[derive(Clone, Debug)]
1493 pub struct GetNode(RequestBuilder<crate::model::GetNodeRequest>);
1494
1495 impl GetNode {
1496 pub(crate) fn new(
1497 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1498 ) -> Self {
1499 Self(RequestBuilder::new(stub))
1500 }
1501
1502 pub fn with_request<V: Into<crate::model::GetNodeRequest>>(mut self, v: V) -> 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<crate::model::Node> {
1516 (*self.0.stub)
1517 .get_node(self.0.request, self.0.options)
1518 .await
1519 .map(gax::response::Response::into_body)
1520 }
1521
1522 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1526 self.0.request.name = v.into();
1527 self
1528 }
1529 }
1530
1531 #[doc(hidden)]
1532 impl gax::options::internal::RequestBuilder for GetNode {
1533 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1534 &mut self.0.options
1535 }
1536 }
1537
1538 #[derive(Clone, Debug)]
1559 pub struct ListExternalAddresses(RequestBuilder<crate::model::ListExternalAddressesRequest>);
1560
1561 impl ListExternalAddresses {
1562 pub(crate) fn new(
1563 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1564 ) -> Self {
1565 Self(RequestBuilder::new(stub))
1566 }
1567
1568 pub fn with_request<V: Into<crate::model::ListExternalAddressesRequest>>(
1570 mut self,
1571 v: V,
1572 ) -> Self {
1573 self.0.request = v.into();
1574 self
1575 }
1576
1577 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1579 self.0.options = v.into();
1580 self
1581 }
1582
1583 pub async fn send(self) -> Result<crate::model::ListExternalAddressesResponse> {
1585 (*self.0.stub)
1586 .list_external_addresses(self.0.request, self.0.options)
1587 .await
1588 .map(gax::response::Response::into_body)
1589 }
1590
1591 pub fn by_page(
1593 self,
1594 ) -> impl gax::paginator::Paginator<crate::model::ListExternalAddressesResponse, gax::error::Error>
1595 {
1596 use std::clone::Clone;
1597 let token = self.0.request.page_token.clone();
1598 let execute = move |token: String| {
1599 let mut builder = self.clone();
1600 builder.0.request = builder.0.request.set_page_token(token);
1601 builder.send()
1602 };
1603 gax::paginator::internal::new_paginator(token, execute)
1604 }
1605
1606 pub fn by_item(
1608 self,
1609 ) -> impl gax::paginator::ItemPaginator<
1610 crate::model::ListExternalAddressesResponse,
1611 gax::error::Error,
1612 > {
1613 use gax::paginator::Paginator;
1614 self.by_page().items()
1615 }
1616
1617 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1621 self.0.request.parent = v.into();
1622 self
1623 }
1624
1625 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1627 self.0.request.page_size = v.into();
1628 self
1629 }
1630
1631 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1633 self.0.request.page_token = v.into();
1634 self
1635 }
1636
1637 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1639 self.0.request.filter = v.into();
1640 self
1641 }
1642
1643 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1645 self.0.request.order_by = v.into();
1646 self
1647 }
1648 }
1649
1650 #[doc(hidden)]
1651 impl gax::options::internal::RequestBuilder for ListExternalAddresses {
1652 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1653 &mut self.0.options
1654 }
1655 }
1656
1657 #[derive(Clone, Debug)]
1678 pub struct FetchNetworkPolicyExternalAddresses(
1679 RequestBuilder<crate::model::FetchNetworkPolicyExternalAddressesRequest>,
1680 );
1681
1682 impl FetchNetworkPolicyExternalAddresses {
1683 pub(crate) fn new(
1684 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1685 ) -> Self {
1686 Self(RequestBuilder::new(stub))
1687 }
1688
1689 pub fn with_request<V: Into<crate::model::FetchNetworkPolicyExternalAddressesRequest>>(
1691 mut self,
1692 v: V,
1693 ) -> Self {
1694 self.0.request = v.into();
1695 self
1696 }
1697
1698 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1700 self.0.options = v.into();
1701 self
1702 }
1703
1704 pub async fn send(
1706 self,
1707 ) -> Result<crate::model::FetchNetworkPolicyExternalAddressesResponse> {
1708 (*self.0.stub)
1709 .fetch_network_policy_external_addresses(self.0.request, self.0.options)
1710 .await
1711 .map(gax::response::Response::into_body)
1712 }
1713
1714 pub fn by_page(
1716 self,
1717 ) -> impl gax::paginator::Paginator<
1718 crate::model::FetchNetworkPolicyExternalAddressesResponse,
1719 gax::error::Error,
1720 > {
1721 use std::clone::Clone;
1722 let token = self.0.request.page_token.clone();
1723 let execute = move |token: String| {
1724 let mut builder = self.clone();
1725 builder.0.request = builder.0.request.set_page_token(token);
1726 builder.send()
1727 };
1728 gax::paginator::internal::new_paginator(token, execute)
1729 }
1730
1731 pub fn by_item(
1733 self,
1734 ) -> impl gax::paginator::ItemPaginator<
1735 crate::model::FetchNetworkPolicyExternalAddressesResponse,
1736 gax::error::Error,
1737 > {
1738 use gax::paginator::Paginator;
1739 self.by_page().items()
1740 }
1741
1742 pub fn set_network_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
1746 self.0.request.network_policy = v.into();
1747 self
1748 }
1749
1750 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1752 self.0.request.page_size = v.into();
1753 self
1754 }
1755
1756 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1758 self.0.request.page_token = v.into();
1759 self
1760 }
1761 }
1762
1763 #[doc(hidden)]
1764 impl gax::options::internal::RequestBuilder for FetchNetworkPolicyExternalAddresses {
1765 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1766 &mut self.0.options
1767 }
1768 }
1769
1770 #[derive(Clone, Debug)]
1787 pub struct GetExternalAddress(RequestBuilder<crate::model::GetExternalAddressRequest>);
1788
1789 impl GetExternalAddress {
1790 pub(crate) fn new(
1791 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1792 ) -> Self {
1793 Self(RequestBuilder::new(stub))
1794 }
1795
1796 pub fn with_request<V: Into<crate::model::GetExternalAddressRequest>>(
1798 mut self,
1799 v: V,
1800 ) -> Self {
1801 self.0.request = v.into();
1802 self
1803 }
1804
1805 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1807 self.0.options = v.into();
1808 self
1809 }
1810
1811 pub async fn send(self) -> Result<crate::model::ExternalAddress> {
1813 (*self.0.stub)
1814 .get_external_address(self.0.request, self.0.options)
1815 .await
1816 .map(gax::response::Response::into_body)
1817 }
1818
1819 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1823 self.0.request.name = v.into();
1824 self
1825 }
1826 }
1827
1828 #[doc(hidden)]
1829 impl gax::options::internal::RequestBuilder for GetExternalAddress {
1830 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1831 &mut self.0.options
1832 }
1833 }
1834
1835 #[derive(Clone, Debug)]
1853 pub struct CreateExternalAddress(RequestBuilder<crate::model::CreateExternalAddressRequest>);
1854
1855 impl CreateExternalAddress {
1856 pub(crate) fn new(
1857 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1858 ) -> Self {
1859 Self(RequestBuilder::new(stub))
1860 }
1861
1862 pub fn with_request<V: Into<crate::model::CreateExternalAddressRequest>>(
1864 mut self,
1865 v: V,
1866 ) -> Self {
1867 self.0.request = v.into();
1868 self
1869 }
1870
1871 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1873 self.0.options = v.into();
1874 self
1875 }
1876
1877 pub async fn send(self) -> Result<longrunning::model::Operation> {
1884 (*self.0.stub)
1885 .create_external_address(self.0.request, self.0.options)
1886 .await
1887 .map(gax::response::Response::into_body)
1888 }
1889
1890 pub fn poller(
1892 self,
1893 ) -> impl lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
1894 {
1895 type Operation = lro::internal::Operation<
1896 crate::model::ExternalAddress,
1897 crate::model::OperationMetadata,
1898 >;
1899 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1900 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1901
1902 let stub = self.0.stub.clone();
1903 let mut options = self.0.options.clone();
1904 options.set_retry_policy(gax::retry_policy::NeverRetry);
1905 let query = move |name| {
1906 let stub = stub.clone();
1907 let options = options.clone();
1908 async {
1909 let op = GetOperation::new(stub)
1910 .set_name(name)
1911 .with_options(options)
1912 .send()
1913 .await?;
1914 Ok(Operation::new(op))
1915 }
1916 };
1917
1918 let start = move || async {
1919 let op = self.send().await?;
1920 Ok(Operation::new(op))
1921 };
1922
1923 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1924 }
1925
1926 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1930 self.0.request.parent = v.into();
1931 self
1932 }
1933
1934 pub fn set_external_address<T>(mut self, v: T) -> Self
1938 where
1939 T: std::convert::Into<crate::model::ExternalAddress>,
1940 {
1941 self.0.request.external_address = std::option::Option::Some(v.into());
1942 self
1943 }
1944
1945 pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
1949 where
1950 T: std::convert::Into<crate::model::ExternalAddress>,
1951 {
1952 self.0.request.external_address = v.map(|x| x.into());
1953 self
1954 }
1955
1956 pub fn set_external_address_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1960 self.0.request.external_address_id = v.into();
1961 self
1962 }
1963
1964 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1966 self.0.request.request_id = v.into();
1967 self
1968 }
1969 }
1970
1971 #[doc(hidden)]
1972 impl gax::options::internal::RequestBuilder for CreateExternalAddress {
1973 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1974 &mut self.0.options
1975 }
1976 }
1977
1978 #[derive(Clone, Debug)]
1996 pub struct UpdateExternalAddress(RequestBuilder<crate::model::UpdateExternalAddressRequest>);
1997
1998 impl UpdateExternalAddress {
1999 pub(crate) fn new(
2000 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2001 ) -> Self {
2002 Self(RequestBuilder::new(stub))
2003 }
2004
2005 pub fn with_request<V: Into<crate::model::UpdateExternalAddressRequest>>(
2007 mut self,
2008 v: V,
2009 ) -> Self {
2010 self.0.request = v.into();
2011 self
2012 }
2013
2014 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2016 self.0.options = v.into();
2017 self
2018 }
2019
2020 pub async fn send(self) -> Result<longrunning::model::Operation> {
2027 (*self.0.stub)
2028 .update_external_address(self.0.request, self.0.options)
2029 .await
2030 .map(gax::response::Response::into_body)
2031 }
2032
2033 pub fn poller(
2035 self,
2036 ) -> impl lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
2037 {
2038 type Operation = lro::internal::Operation<
2039 crate::model::ExternalAddress,
2040 crate::model::OperationMetadata,
2041 >;
2042 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2043 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2044
2045 let stub = self.0.stub.clone();
2046 let mut options = self.0.options.clone();
2047 options.set_retry_policy(gax::retry_policy::NeverRetry);
2048 let query = move |name| {
2049 let stub = stub.clone();
2050 let options = options.clone();
2051 async {
2052 let op = GetOperation::new(stub)
2053 .set_name(name)
2054 .with_options(options)
2055 .send()
2056 .await?;
2057 Ok(Operation::new(op))
2058 }
2059 };
2060
2061 let start = move || async {
2062 let op = self.send().await?;
2063 Ok(Operation::new(op))
2064 };
2065
2066 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2067 }
2068
2069 pub fn set_update_mask<T>(mut self, v: T) -> Self
2073 where
2074 T: std::convert::Into<wkt::FieldMask>,
2075 {
2076 self.0.request.update_mask = std::option::Option::Some(v.into());
2077 self
2078 }
2079
2080 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2084 where
2085 T: std::convert::Into<wkt::FieldMask>,
2086 {
2087 self.0.request.update_mask = v.map(|x| x.into());
2088 self
2089 }
2090
2091 pub fn set_external_address<T>(mut self, v: T) -> Self
2095 where
2096 T: std::convert::Into<crate::model::ExternalAddress>,
2097 {
2098 self.0.request.external_address = std::option::Option::Some(v.into());
2099 self
2100 }
2101
2102 pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2106 where
2107 T: std::convert::Into<crate::model::ExternalAddress>,
2108 {
2109 self.0.request.external_address = v.map(|x| x.into());
2110 self
2111 }
2112
2113 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2115 self.0.request.request_id = v.into();
2116 self
2117 }
2118 }
2119
2120 #[doc(hidden)]
2121 impl gax::options::internal::RequestBuilder for UpdateExternalAddress {
2122 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2123 &mut self.0.options
2124 }
2125 }
2126
2127 #[derive(Clone, Debug)]
2145 pub struct DeleteExternalAddress(RequestBuilder<crate::model::DeleteExternalAddressRequest>);
2146
2147 impl DeleteExternalAddress {
2148 pub(crate) fn new(
2149 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2150 ) -> Self {
2151 Self(RequestBuilder::new(stub))
2152 }
2153
2154 pub fn with_request<V: Into<crate::model::DeleteExternalAddressRequest>>(
2156 mut self,
2157 v: V,
2158 ) -> Self {
2159 self.0.request = v.into();
2160 self
2161 }
2162
2163 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2165 self.0.options = v.into();
2166 self
2167 }
2168
2169 pub async fn send(self) -> Result<longrunning::model::Operation> {
2176 (*self.0.stub)
2177 .delete_external_address(self.0.request, self.0.options)
2178 .await
2179 .map(gax::response::Response::into_body)
2180 }
2181
2182 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
2184 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2185 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2186 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2187
2188 let stub = self.0.stub.clone();
2189 let mut options = self.0.options.clone();
2190 options.set_retry_policy(gax::retry_policy::NeverRetry);
2191 let query = move |name| {
2192 let stub = stub.clone();
2193 let options = options.clone();
2194 async {
2195 let op = GetOperation::new(stub)
2196 .set_name(name)
2197 .with_options(options)
2198 .send()
2199 .await?;
2200 Ok(Operation::new(op))
2201 }
2202 };
2203
2204 let start = move || async {
2205 let op = self.send().await?;
2206 Ok(Operation::new(op))
2207 };
2208
2209 lro::internal::new_unit_response_poller(
2210 polling_error_policy,
2211 polling_backoff_policy,
2212 start,
2213 query,
2214 )
2215 }
2216
2217 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2221 self.0.request.name = v.into();
2222 self
2223 }
2224
2225 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2227 self.0.request.request_id = v.into();
2228 self
2229 }
2230 }
2231
2232 #[doc(hidden)]
2233 impl gax::options::internal::RequestBuilder for DeleteExternalAddress {
2234 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2235 &mut self.0.options
2236 }
2237 }
2238
2239 #[derive(Clone, Debug)]
2260 pub struct ListSubnets(RequestBuilder<crate::model::ListSubnetsRequest>);
2261
2262 impl ListSubnets {
2263 pub(crate) fn new(
2264 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2265 ) -> Self {
2266 Self(RequestBuilder::new(stub))
2267 }
2268
2269 pub fn with_request<V: Into<crate::model::ListSubnetsRequest>>(mut self, v: V) -> Self {
2271 self.0.request = v.into();
2272 self
2273 }
2274
2275 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2277 self.0.options = v.into();
2278 self
2279 }
2280
2281 pub async fn send(self) -> Result<crate::model::ListSubnetsResponse> {
2283 (*self.0.stub)
2284 .list_subnets(self.0.request, self.0.options)
2285 .await
2286 .map(gax::response::Response::into_body)
2287 }
2288
2289 pub fn by_page(
2291 self,
2292 ) -> impl gax::paginator::Paginator<crate::model::ListSubnetsResponse, gax::error::Error>
2293 {
2294 use std::clone::Clone;
2295 let token = self.0.request.page_token.clone();
2296 let execute = move |token: String| {
2297 let mut builder = self.clone();
2298 builder.0.request = builder.0.request.set_page_token(token);
2299 builder.send()
2300 };
2301 gax::paginator::internal::new_paginator(token, execute)
2302 }
2303
2304 pub fn by_item(
2306 self,
2307 ) -> impl gax::paginator::ItemPaginator<crate::model::ListSubnetsResponse, gax::error::Error>
2308 {
2309 use gax::paginator::Paginator;
2310 self.by_page().items()
2311 }
2312
2313 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2317 self.0.request.parent = v.into();
2318 self
2319 }
2320
2321 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2323 self.0.request.page_size = v.into();
2324 self
2325 }
2326
2327 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2329 self.0.request.page_token = v.into();
2330 self
2331 }
2332 }
2333
2334 #[doc(hidden)]
2335 impl gax::options::internal::RequestBuilder for ListSubnets {
2336 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2337 &mut self.0.options
2338 }
2339 }
2340
2341 #[derive(Clone, Debug)]
2358 pub struct GetSubnet(RequestBuilder<crate::model::GetSubnetRequest>);
2359
2360 impl GetSubnet {
2361 pub(crate) fn new(
2362 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2363 ) -> Self {
2364 Self(RequestBuilder::new(stub))
2365 }
2366
2367 pub fn with_request<V: Into<crate::model::GetSubnetRequest>>(mut self, v: V) -> Self {
2369 self.0.request = v.into();
2370 self
2371 }
2372
2373 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2375 self.0.options = v.into();
2376 self
2377 }
2378
2379 pub async fn send(self) -> Result<crate::model::Subnet> {
2381 (*self.0.stub)
2382 .get_subnet(self.0.request, self.0.options)
2383 .await
2384 .map(gax::response::Response::into_body)
2385 }
2386
2387 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2391 self.0.request.name = v.into();
2392 self
2393 }
2394 }
2395
2396 #[doc(hidden)]
2397 impl gax::options::internal::RequestBuilder for GetSubnet {
2398 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2399 &mut self.0.options
2400 }
2401 }
2402
2403 #[derive(Clone, Debug)]
2421 pub struct UpdateSubnet(RequestBuilder<crate::model::UpdateSubnetRequest>);
2422
2423 impl UpdateSubnet {
2424 pub(crate) fn new(
2425 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2426 ) -> Self {
2427 Self(RequestBuilder::new(stub))
2428 }
2429
2430 pub fn with_request<V: Into<crate::model::UpdateSubnetRequest>>(mut self, v: V) -> Self {
2432 self.0.request = v.into();
2433 self
2434 }
2435
2436 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2438 self.0.options = v.into();
2439 self
2440 }
2441
2442 pub async fn send(self) -> Result<longrunning::model::Operation> {
2449 (*self.0.stub)
2450 .update_subnet(self.0.request, self.0.options)
2451 .await
2452 .map(gax::response::Response::into_body)
2453 }
2454
2455 pub fn poller(
2457 self,
2458 ) -> impl lro::Poller<crate::model::Subnet, crate::model::OperationMetadata> {
2459 type Operation =
2460 lro::internal::Operation<crate::model::Subnet, crate::model::OperationMetadata>;
2461 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2462 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2463
2464 let stub = self.0.stub.clone();
2465 let mut options = self.0.options.clone();
2466 options.set_retry_policy(gax::retry_policy::NeverRetry);
2467 let query = move |name| {
2468 let stub = stub.clone();
2469 let options = options.clone();
2470 async {
2471 let op = GetOperation::new(stub)
2472 .set_name(name)
2473 .with_options(options)
2474 .send()
2475 .await?;
2476 Ok(Operation::new(op))
2477 }
2478 };
2479
2480 let start = move || async {
2481 let op = self.send().await?;
2482 Ok(Operation::new(op))
2483 };
2484
2485 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2486 }
2487
2488 pub fn set_update_mask<T>(mut self, v: T) -> Self
2492 where
2493 T: std::convert::Into<wkt::FieldMask>,
2494 {
2495 self.0.request.update_mask = std::option::Option::Some(v.into());
2496 self
2497 }
2498
2499 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2503 where
2504 T: std::convert::Into<wkt::FieldMask>,
2505 {
2506 self.0.request.update_mask = v.map(|x| x.into());
2507 self
2508 }
2509
2510 pub fn set_subnet<T>(mut self, v: T) -> Self
2514 where
2515 T: std::convert::Into<crate::model::Subnet>,
2516 {
2517 self.0.request.subnet = std::option::Option::Some(v.into());
2518 self
2519 }
2520
2521 pub fn set_or_clear_subnet<T>(mut self, v: std::option::Option<T>) -> Self
2525 where
2526 T: std::convert::Into<crate::model::Subnet>,
2527 {
2528 self.0.request.subnet = v.map(|x| x.into());
2529 self
2530 }
2531 }
2532
2533 #[doc(hidden)]
2534 impl gax::options::internal::RequestBuilder for UpdateSubnet {
2535 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2536 &mut self.0.options
2537 }
2538 }
2539
2540 #[derive(Clone, Debug)]
2561 pub struct ListExternalAccessRules(
2562 RequestBuilder<crate::model::ListExternalAccessRulesRequest>,
2563 );
2564
2565 impl ListExternalAccessRules {
2566 pub(crate) fn new(
2567 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2568 ) -> Self {
2569 Self(RequestBuilder::new(stub))
2570 }
2571
2572 pub fn with_request<V: Into<crate::model::ListExternalAccessRulesRequest>>(
2574 mut self,
2575 v: V,
2576 ) -> Self {
2577 self.0.request = v.into();
2578 self
2579 }
2580
2581 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2583 self.0.options = v.into();
2584 self
2585 }
2586
2587 pub async fn send(self) -> Result<crate::model::ListExternalAccessRulesResponse> {
2589 (*self.0.stub)
2590 .list_external_access_rules(self.0.request, self.0.options)
2591 .await
2592 .map(gax::response::Response::into_body)
2593 }
2594
2595 pub fn by_page(
2597 self,
2598 ) -> impl gax::paginator::Paginator<
2599 crate::model::ListExternalAccessRulesResponse,
2600 gax::error::Error,
2601 > {
2602 use std::clone::Clone;
2603 let token = self.0.request.page_token.clone();
2604 let execute = move |token: String| {
2605 let mut builder = self.clone();
2606 builder.0.request = builder.0.request.set_page_token(token);
2607 builder.send()
2608 };
2609 gax::paginator::internal::new_paginator(token, execute)
2610 }
2611
2612 pub fn by_item(
2614 self,
2615 ) -> impl gax::paginator::ItemPaginator<
2616 crate::model::ListExternalAccessRulesResponse,
2617 gax::error::Error,
2618 > {
2619 use gax::paginator::Paginator;
2620 self.by_page().items()
2621 }
2622
2623 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2627 self.0.request.parent = v.into();
2628 self
2629 }
2630
2631 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2633 self.0.request.page_size = v.into();
2634 self
2635 }
2636
2637 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2639 self.0.request.page_token = v.into();
2640 self
2641 }
2642
2643 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2645 self.0.request.filter = v.into();
2646 self
2647 }
2648
2649 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2651 self.0.request.order_by = v.into();
2652 self
2653 }
2654 }
2655
2656 #[doc(hidden)]
2657 impl gax::options::internal::RequestBuilder for ListExternalAccessRules {
2658 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2659 &mut self.0.options
2660 }
2661 }
2662
2663 #[derive(Clone, Debug)]
2680 pub struct GetExternalAccessRule(RequestBuilder<crate::model::GetExternalAccessRuleRequest>);
2681
2682 impl GetExternalAccessRule {
2683 pub(crate) fn new(
2684 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2685 ) -> Self {
2686 Self(RequestBuilder::new(stub))
2687 }
2688
2689 pub fn with_request<V: Into<crate::model::GetExternalAccessRuleRequest>>(
2691 mut self,
2692 v: V,
2693 ) -> Self {
2694 self.0.request = v.into();
2695 self
2696 }
2697
2698 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2700 self.0.options = v.into();
2701 self
2702 }
2703
2704 pub async fn send(self) -> Result<crate::model::ExternalAccessRule> {
2706 (*self.0.stub)
2707 .get_external_access_rule(self.0.request, self.0.options)
2708 .await
2709 .map(gax::response::Response::into_body)
2710 }
2711
2712 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2716 self.0.request.name = v.into();
2717 self
2718 }
2719 }
2720
2721 #[doc(hidden)]
2722 impl gax::options::internal::RequestBuilder for GetExternalAccessRule {
2723 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2724 &mut self.0.options
2725 }
2726 }
2727
2728 #[derive(Clone, Debug)]
2746 pub struct CreateExternalAccessRule(
2747 RequestBuilder<crate::model::CreateExternalAccessRuleRequest>,
2748 );
2749
2750 impl CreateExternalAccessRule {
2751 pub(crate) fn new(
2752 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2753 ) -> Self {
2754 Self(RequestBuilder::new(stub))
2755 }
2756
2757 pub fn with_request<V: Into<crate::model::CreateExternalAccessRuleRequest>>(
2759 mut self,
2760 v: V,
2761 ) -> Self {
2762 self.0.request = v.into();
2763 self
2764 }
2765
2766 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2768 self.0.options = v.into();
2769 self
2770 }
2771
2772 pub async fn send(self) -> Result<longrunning::model::Operation> {
2779 (*self.0.stub)
2780 .create_external_access_rule(self.0.request, self.0.options)
2781 .await
2782 .map(gax::response::Response::into_body)
2783 }
2784
2785 pub fn poller(
2787 self,
2788 ) -> impl lro::Poller<crate::model::ExternalAccessRule, crate::model::OperationMetadata>
2789 {
2790 type Operation = lro::internal::Operation<
2791 crate::model::ExternalAccessRule,
2792 crate::model::OperationMetadata,
2793 >;
2794 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2795 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2796
2797 let stub = self.0.stub.clone();
2798 let mut options = self.0.options.clone();
2799 options.set_retry_policy(gax::retry_policy::NeverRetry);
2800 let query = move |name| {
2801 let stub = stub.clone();
2802 let options = options.clone();
2803 async {
2804 let op = GetOperation::new(stub)
2805 .set_name(name)
2806 .with_options(options)
2807 .send()
2808 .await?;
2809 Ok(Operation::new(op))
2810 }
2811 };
2812
2813 let start = move || async {
2814 let op = self.send().await?;
2815 Ok(Operation::new(op))
2816 };
2817
2818 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2819 }
2820
2821 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2825 self.0.request.parent = v.into();
2826 self
2827 }
2828
2829 pub fn set_external_access_rule<T>(mut self, v: T) -> Self
2833 where
2834 T: std::convert::Into<crate::model::ExternalAccessRule>,
2835 {
2836 self.0.request.external_access_rule = std::option::Option::Some(v.into());
2837 self
2838 }
2839
2840 pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
2844 where
2845 T: std::convert::Into<crate::model::ExternalAccessRule>,
2846 {
2847 self.0.request.external_access_rule = v.map(|x| x.into());
2848 self
2849 }
2850
2851 pub fn set_external_access_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2855 self.0.request.external_access_rule_id = v.into();
2856 self
2857 }
2858
2859 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2861 self.0.request.request_id = v.into();
2862 self
2863 }
2864 }
2865
2866 #[doc(hidden)]
2867 impl gax::options::internal::RequestBuilder for CreateExternalAccessRule {
2868 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2869 &mut self.0.options
2870 }
2871 }
2872
2873 #[derive(Clone, Debug)]
2891 pub struct UpdateExternalAccessRule(
2892 RequestBuilder<crate::model::UpdateExternalAccessRuleRequest>,
2893 );
2894
2895 impl UpdateExternalAccessRule {
2896 pub(crate) fn new(
2897 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2898 ) -> Self {
2899 Self(RequestBuilder::new(stub))
2900 }
2901
2902 pub fn with_request<V: Into<crate::model::UpdateExternalAccessRuleRequest>>(
2904 mut self,
2905 v: V,
2906 ) -> Self {
2907 self.0.request = v.into();
2908 self
2909 }
2910
2911 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2913 self.0.options = v.into();
2914 self
2915 }
2916
2917 pub async fn send(self) -> Result<longrunning::model::Operation> {
2924 (*self.0.stub)
2925 .update_external_access_rule(self.0.request, self.0.options)
2926 .await
2927 .map(gax::response::Response::into_body)
2928 }
2929
2930 pub fn poller(
2932 self,
2933 ) -> impl lro::Poller<crate::model::ExternalAccessRule, crate::model::OperationMetadata>
2934 {
2935 type Operation = lro::internal::Operation<
2936 crate::model::ExternalAccessRule,
2937 crate::model::OperationMetadata,
2938 >;
2939 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2940 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2941
2942 let stub = self.0.stub.clone();
2943 let mut options = self.0.options.clone();
2944 options.set_retry_policy(gax::retry_policy::NeverRetry);
2945 let query = move |name| {
2946 let stub = stub.clone();
2947 let options = options.clone();
2948 async {
2949 let op = GetOperation::new(stub)
2950 .set_name(name)
2951 .with_options(options)
2952 .send()
2953 .await?;
2954 Ok(Operation::new(op))
2955 }
2956 };
2957
2958 let start = move || async {
2959 let op = self.send().await?;
2960 Ok(Operation::new(op))
2961 };
2962
2963 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2964 }
2965
2966 pub fn set_update_mask<T>(mut self, v: T) -> Self
2970 where
2971 T: std::convert::Into<wkt::FieldMask>,
2972 {
2973 self.0.request.update_mask = std::option::Option::Some(v.into());
2974 self
2975 }
2976
2977 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2981 where
2982 T: std::convert::Into<wkt::FieldMask>,
2983 {
2984 self.0.request.update_mask = v.map(|x| x.into());
2985 self
2986 }
2987
2988 pub fn set_external_access_rule<T>(mut self, v: T) -> Self
2992 where
2993 T: std::convert::Into<crate::model::ExternalAccessRule>,
2994 {
2995 self.0.request.external_access_rule = std::option::Option::Some(v.into());
2996 self
2997 }
2998
2999 pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
3003 where
3004 T: std::convert::Into<crate::model::ExternalAccessRule>,
3005 {
3006 self.0.request.external_access_rule = v.map(|x| x.into());
3007 self
3008 }
3009
3010 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3012 self.0.request.request_id = v.into();
3013 self
3014 }
3015 }
3016
3017 #[doc(hidden)]
3018 impl gax::options::internal::RequestBuilder for UpdateExternalAccessRule {
3019 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3020 &mut self.0.options
3021 }
3022 }
3023
3024 #[derive(Clone, Debug)]
3042 pub struct DeleteExternalAccessRule(
3043 RequestBuilder<crate::model::DeleteExternalAccessRuleRequest>,
3044 );
3045
3046 impl DeleteExternalAccessRule {
3047 pub(crate) fn new(
3048 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3049 ) -> Self {
3050 Self(RequestBuilder::new(stub))
3051 }
3052
3053 pub fn with_request<V: Into<crate::model::DeleteExternalAccessRuleRequest>>(
3055 mut self,
3056 v: V,
3057 ) -> Self {
3058 self.0.request = v.into();
3059 self
3060 }
3061
3062 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3064 self.0.options = v.into();
3065 self
3066 }
3067
3068 pub async fn send(self) -> Result<longrunning::model::Operation> {
3075 (*self.0.stub)
3076 .delete_external_access_rule(self.0.request, self.0.options)
3077 .await
3078 .map(gax::response::Response::into_body)
3079 }
3080
3081 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3083 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3084 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3085 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3086
3087 let stub = self.0.stub.clone();
3088 let mut options = self.0.options.clone();
3089 options.set_retry_policy(gax::retry_policy::NeverRetry);
3090 let query = move |name| {
3091 let stub = stub.clone();
3092 let options = options.clone();
3093 async {
3094 let op = GetOperation::new(stub)
3095 .set_name(name)
3096 .with_options(options)
3097 .send()
3098 .await?;
3099 Ok(Operation::new(op))
3100 }
3101 };
3102
3103 let start = move || async {
3104 let op = self.send().await?;
3105 Ok(Operation::new(op))
3106 };
3107
3108 lro::internal::new_unit_response_poller(
3109 polling_error_policy,
3110 polling_backoff_policy,
3111 start,
3112 query,
3113 )
3114 }
3115
3116 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3120 self.0.request.name = v.into();
3121 self
3122 }
3123
3124 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3126 self.0.request.request_id = v.into();
3127 self
3128 }
3129 }
3130
3131 #[doc(hidden)]
3132 impl gax::options::internal::RequestBuilder for DeleteExternalAccessRule {
3133 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3134 &mut self.0.options
3135 }
3136 }
3137
3138 #[derive(Clone, Debug)]
3159 pub struct ListLoggingServers(RequestBuilder<crate::model::ListLoggingServersRequest>);
3160
3161 impl ListLoggingServers {
3162 pub(crate) fn new(
3163 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3164 ) -> Self {
3165 Self(RequestBuilder::new(stub))
3166 }
3167
3168 pub fn with_request<V: Into<crate::model::ListLoggingServersRequest>>(
3170 mut self,
3171 v: V,
3172 ) -> Self {
3173 self.0.request = v.into();
3174 self
3175 }
3176
3177 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3179 self.0.options = v.into();
3180 self
3181 }
3182
3183 pub async fn send(self) -> Result<crate::model::ListLoggingServersResponse> {
3185 (*self.0.stub)
3186 .list_logging_servers(self.0.request, self.0.options)
3187 .await
3188 .map(gax::response::Response::into_body)
3189 }
3190
3191 pub fn by_page(
3193 self,
3194 ) -> impl gax::paginator::Paginator<crate::model::ListLoggingServersResponse, gax::error::Error>
3195 {
3196 use std::clone::Clone;
3197 let token = self.0.request.page_token.clone();
3198 let execute = move |token: String| {
3199 let mut builder = self.clone();
3200 builder.0.request = builder.0.request.set_page_token(token);
3201 builder.send()
3202 };
3203 gax::paginator::internal::new_paginator(token, execute)
3204 }
3205
3206 pub fn by_item(
3208 self,
3209 ) -> impl gax::paginator::ItemPaginator<
3210 crate::model::ListLoggingServersResponse,
3211 gax::error::Error,
3212 > {
3213 use gax::paginator::Paginator;
3214 self.by_page().items()
3215 }
3216
3217 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3221 self.0.request.parent = v.into();
3222 self
3223 }
3224
3225 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3227 self.0.request.page_size = v.into();
3228 self
3229 }
3230
3231 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3233 self.0.request.page_token = v.into();
3234 self
3235 }
3236
3237 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3239 self.0.request.filter = v.into();
3240 self
3241 }
3242
3243 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3245 self.0.request.order_by = v.into();
3246 self
3247 }
3248 }
3249
3250 #[doc(hidden)]
3251 impl gax::options::internal::RequestBuilder for ListLoggingServers {
3252 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3253 &mut self.0.options
3254 }
3255 }
3256
3257 #[derive(Clone, Debug)]
3274 pub struct GetLoggingServer(RequestBuilder<crate::model::GetLoggingServerRequest>);
3275
3276 impl GetLoggingServer {
3277 pub(crate) fn new(
3278 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3279 ) -> Self {
3280 Self(RequestBuilder::new(stub))
3281 }
3282
3283 pub fn with_request<V: Into<crate::model::GetLoggingServerRequest>>(
3285 mut self,
3286 v: V,
3287 ) -> Self {
3288 self.0.request = v.into();
3289 self
3290 }
3291
3292 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3294 self.0.options = v.into();
3295 self
3296 }
3297
3298 pub async fn send(self) -> Result<crate::model::LoggingServer> {
3300 (*self.0.stub)
3301 .get_logging_server(self.0.request, self.0.options)
3302 .await
3303 .map(gax::response::Response::into_body)
3304 }
3305
3306 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3310 self.0.request.name = v.into();
3311 self
3312 }
3313 }
3314
3315 #[doc(hidden)]
3316 impl gax::options::internal::RequestBuilder for GetLoggingServer {
3317 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3318 &mut self.0.options
3319 }
3320 }
3321
3322 #[derive(Clone, Debug)]
3340 pub struct CreateLoggingServer(RequestBuilder<crate::model::CreateLoggingServerRequest>);
3341
3342 impl CreateLoggingServer {
3343 pub(crate) fn new(
3344 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3345 ) -> Self {
3346 Self(RequestBuilder::new(stub))
3347 }
3348
3349 pub fn with_request<V: Into<crate::model::CreateLoggingServerRequest>>(
3351 mut self,
3352 v: V,
3353 ) -> Self {
3354 self.0.request = v.into();
3355 self
3356 }
3357
3358 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3360 self.0.options = v.into();
3361 self
3362 }
3363
3364 pub async fn send(self) -> Result<longrunning::model::Operation> {
3371 (*self.0.stub)
3372 .create_logging_server(self.0.request, self.0.options)
3373 .await
3374 .map(gax::response::Response::into_body)
3375 }
3376
3377 pub fn poller(
3379 self,
3380 ) -> impl lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3381 {
3382 type Operation = lro::internal::Operation<
3383 crate::model::LoggingServer,
3384 crate::model::OperationMetadata,
3385 >;
3386 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3387 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3388
3389 let stub = self.0.stub.clone();
3390 let mut options = self.0.options.clone();
3391 options.set_retry_policy(gax::retry_policy::NeverRetry);
3392 let query = move |name| {
3393 let stub = stub.clone();
3394 let options = options.clone();
3395 async {
3396 let op = GetOperation::new(stub)
3397 .set_name(name)
3398 .with_options(options)
3399 .send()
3400 .await?;
3401 Ok(Operation::new(op))
3402 }
3403 };
3404
3405 let start = move || async {
3406 let op = self.send().await?;
3407 Ok(Operation::new(op))
3408 };
3409
3410 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3411 }
3412
3413 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3417 self.0.request.parent = v.into();
3418 self
3419 }
3420
3421 pub fn set_logging_server<T>(mut self, v: T) -> Self
3425 where
3426 T: std::convert::Into<crate::model::LoggingServer>,
3427 {
3428 self.0.request.logging_server = std::option::Option::Some(v.into());
3429 self
3430 }
3431
3432 pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3436 where
3437 T: std::convert::Into<crate::model::LoggingServer>,
3438 {
3439 self.0.request.logging_server = v.map(|x| x.into());
3440 self
3441 }
3442
3443 pub fn set_logging_server_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3447 self.0.request.logging_server_id = v.into();
3448 self
3449 }
3450
3451 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3453 self.0.request.request_id = v.into();
3454 self
3455 }
3456 }
3457
3458 #[doc(hidden)]
3459 impl gax::options::internal::RequestBuilder for CreateLoggingServer {
3460 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3461 &mut self.0.options
3462 }
3463 }
3464
3465 #[derive(Clone, Debug)]
3483 pub struct UpdateLoggingServer(RequestBuilder<crate::model::UpdateLoggingServerRequest>);
3484
3485 impl UpdateLoggingServer {
3486 pub(crate) fn new(
3487 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3488 ) -> Self {
3489 Self(RequestBuilder::new(stub))
3490 }
3491
3492 pub fn with_request<V: Into<crate::model::UpdateLoggingServerRequest>>(
3494 mut self,
3495 v: V,
3496 ) -> Self {
3497 self.0.request = v.into();
3498 self
3499 }
3500
3501 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3503 self.0.options = v.into();
3504 self
3505 }
3506
3507 pub async fn send(self) -> Result<longrunning::model::Operation> {
3514 (*self.0.stub)
3515 .update_logging_server(self.0.request, self.0.options)
3516 .await
3517 .map(gax::response::Response::into_body)
3518 }
3519
3520 pub fn poller(
3522 self,
3523 ) -> impl lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3524 {
3525 type Operation = lro::internal::Operation<
3526 crate::model::LoggingServer,
3527 crate::model::OperationMetadata,
3528 >;
3529 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3530 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3531
3532 let stub = self.0.stub.clone();
3533 let mut options = self.0.options.clone();
3534 options.set_retry_policy(gax::retry_policy::NeverRetry);
3535 let query = move |name| {
3536 let stub = stub.clone();
3537 let options = options.clone();
3538 async {
3539 let op = GetOperation::new(stub)
3540 .set_name(name)
3541 .with_options(options)
3542 .send()
3543 .await?;
3544 Ok(Operation::new(op))
3545 }
3546 };
3547
3548 let start = move || async {
3549 let op = self.send().await?;
3550 Ok(Operation::new(op))
3551 };
3552
3553 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3554 }
3555
3556 pub fn set_update_mask<T>(mut self, v: T) -> Self
3560 where
3561 T: std::convert::Into<wkt::FieldMask>,
3562 {
3563 self.0.request.update_mask = std::option::Option::Some(v.into());
3564 self
3565 }
3566
3567 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3571 where
3572 T: std::convert::Into<wkt::FieldMask>,
3573 {
3574 self.0.request.update_mask = v.map(|x| x.into());
3575 self
3576 }
3577
3578 pub fn set_logging_server<T>(mut self, v: T) -> Self
3582 where
3583 T: std::convert::Into<crate::model::LoggingServer>,
3584 {
3585 self.0.request.logging_server = std::option::Option::Some(v.into());
3586 self
3587 }
3588
3589 pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3593 where
3594 T: std::convert::Into<crate::model::LoggingServer>,
3595 {
3596 self.0.request.logging_server = v.map(|x| x.into());
3597 self
3598 }
3599
3600 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3602 self.0.request.request_id = v.into();
3603 self
3604 }
3605 }
3606
3607 #[doc(hidden)]
3608 impl gax::options::internal::RequestBuilder for UpdateLoggingServer {
3609 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3610 &mut self.0.options
3611 }
3612 }
3613
3614 #[derive(Clone, Debug)]
3632 pub struct DeleteLoggingServer(RequestBuilder<crate::model::DeleteLoggingServerRequest>);
3633
3634 impl DeleteLoggingServer {
3635 pub(crate) fn new(
3636 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3637 ) -> Self {
3638 Self(RequestBuilder::new(stub))
3639 }
3640
3641 pub fn with_request<V: Into<crate::model::DeleteLoggingServerRequest>>(
3643 mut self,
3644 v: V,
3645 ) -> Self {
3646 self.0.request = v.into();
3647 self
3648 }
3649
3650 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3652 self.0.options = v.into();
3653 self
3654 }
3655
3656 pub async fn send(self) -> Result<longrunning::model::Operation> {
3663 (*self.0.stub)
3664 .delete_logging_server(self.0.request, self.0.options)
3665 .await
3666 .map(gax::response::Response::into_body)
3667 }
3668
3669 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3671 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3672 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3673 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3674
3675 let stub = self.0.stub.clone();
3676 let mut options = self.0.options.clone();
3677 options.set_retry_policy(gax::retry_policy::NeverRetry);
3678 let query = move |name| {
3679 let stub = stub.clone();
3680 let options = options.clone();
3681 async {
3682 let op = GetOperation::new(stub)
3683 .set_name(name)
3684 .with_options(options)
3685 .send()
3686 .await?;
3687 Ok(Operation::new(op))
3688 }
3689 };
3690
3691 let start = move || async {
3692 let op = self.send().await?;
3693 Ok(Operation::new(op))
3694 };
3695
3696 lro::internal::new_unit_response_poller(
3697 polling_error_policy,
3698 polling_backoff_policy,
3699 start,
3700 query,
3701 )
3702 }
3703
3704 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3708 self.0.request.name = v.into();
3709 self
3710 }
3711
3712 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3714 self.0.request.request_id = v.into();
3715 self
3716 }
3717 }
3718
3719 #[doc(hidden)]
3720 impl gax::options::internal::RequestBuilder for DeleteLoggingServer {
3721 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3722 &mut self.0.options
3723 }
3724 }
3725
3726 #[derive(Clone, Debug)]
3747 pub struct ListNodeTypes(RequestBuilder<crate::model::ListNodeTypesRequest>);
3748
3749 impl ListNodeTypes {
3750 pub(crate) fn new(
3751 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3752 ) -> Self {
3753 Self(RequestBuilder::new(stub))
3754 }
3755
3756 pub fn with_request<V: Into<crate::model::ListNodeTypesRequest>>(mut self, v: V) -> Self {
3758 self.0.request = v.into();
3759 self
3760 }
3761
3762 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3764 self.0.options = v.into();
3765 self
3766 }
3767
3768 pub async fn send(self) -> Result<crate::model::ListNodeTypesResponse> {
3770 (*self.0.stub)
3771 .list_node_types(self.0.request, self.0.options)
3772 .await
3773 .map(gax::response::Response::into_body)
3774 }
3775
3776 pub fn by_page(
3778 self,
3779 ) -> impl gax::paginator::Paginator<crate::model::ListNodeTypesResponse, gax::error::Error>
3780 {
3781 use std::clone::Clone;
3782 let token = self.0.request.page_token.clone();
3783 let execute = move |token: String| {
3784 let mut builder = self.clone();
3785 builder.0.request = builder.0.request.set_page_token(token);
3786 builder.send()
3787 };
3788 gax::paginator::internal::new_paginator(token, execute)
3789 }
3790
3791 pub fn by_item(
3793 self,
3794 ) -> impl gax::paginator::ItemPaginator<crate::model::ListNodeTypesResponse, gax::error::Error>
3795 {
3796 use gax::paginator::Paginator;
3797 self.by_page().items()
3798 }
3799
3800 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3804 self.0.request.parent = v.into();
3805 self
3806 }
3807
3808 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3810 self.0.request.page_size = v.into();
3811 self
3812 }
3813
3814 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3816 self.0.request.page_token = v.into();
3817 self
3818 }
3819
3820 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3822 self.0.request.filter = v.into();
3823 self
3824 }
3825 }
3826
3827 #[doc(hidden)]
3828 impl gax::options::internal::RequestBuilder for ListNodeTypes {
3829 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3830 &mut self.0.options
3831 }
3832 }
3833
3834 #[derive(Clone, Debug)]
3851 pub struct GetNodeType(RequestBuilder<crate::model::GetNodeTypeRequest>);
3852
3853 impl GetNodeType {
3854 pub(crate) fn new(
3855 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3856 ) -> Self {
3857 Self(RequestBuilder::new(stub))
3858 }
3859
3860 pub fn with_request<V: Into<crate::model::GetNodeTypeRequest>>(mut self, v: V) -> Self {
3862 self.0.request = v.into();
3863 self
3864 }
3865
3866 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3868 self.0.options = v.into();
3869 self
3870 }
3871
3872 pub async fn send(self) -> Result<crate::model::NodeType> {
3874 (*self.0.stub)
3875 .get_node_type(self.0.request, self.0.options)
3876 .await
3877 .map(gax::response::Response::into_body)
3878 }
3879
3880 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3884 self.0.request.name = v.into();
3885 self
3886 }
3887 }
3888
3889 #[doc(hidden)]
3890 impl gax::options::internal::RequestBuilder for GetNodeType {
3891 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3892 &mut self.0.options
3893 }
3894 }
3895
3896 #[derive(Clone, Debug)]
3913 pub struct ShowNsxCredentials(RequestBuilder<crate::model::ShowNsxCredentialsRequest>);
3914
3915 impl ShowNsxCredentials {
3916 pub(crate) fn new(
3917 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3918 ) -> Self {
3919 Self(RequestBuilder::new(stub))
3920 }
3921
3922 pub fn with_request<V: Into<crate::model::ShowNsxCredentialsRequest>>(
3924 mut self,
3925 v: V,
3926 ) -> Self {
3927 self.0.request = v.into();
3928 self
3929 }
3930
3931 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3933 self.0.options = v.into();
3934 self
3935 }
3936
3937 pub async fn send(self) -> Result<crate::model::Credentials> {
3939 (*self.0.stub)
3940 .show_nsx_credentials(self.0.request, self.0.options)
3941 .await
3942 .map(gax::response::Response::into_body)
3943 }
3944
3945 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
3949 self.0.request.private_cloud = v.into();
3950 self
3951 }
3952 }
3953
3954 #[doc(hidden)]
3955 impl gax::options::internal::RequestBuilder for ShowNsxCredentials {
3956 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3957 &mut self.0.options
3958 }
3959 }
3960
3961 #[derive(Clone, Debug)]
3978 pub struct ShowVcenterCredentials(RequestBuilder<crate::model::ShowVcenterCredentialsRequest>);
3979
3980 impl ShowVcenterCredentials {
3981 pub(crate) fn new(
3982 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3983 ) -> Self {
3984 Self(RequestBuilder::new(stub))
3985 }
3986
3987 pub fn with_request<V: Into<crate::model::ShowVcenterCredentialsRequest>>(
3989 mut self,
3990 v: V,
3991 ) -> Self {
3992 self.0.request = v.into();
3993 self
3994 }
3995
3996 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3998 self.0.options = v.into();
3999 self
4000 }
4001
4002 pub async fn send(self) -> Result<crate::model::Credentials> {
4004 (*self.0.stub)
4005 .show_vcenter_credentials(self.0.request, self.0.options)
4006 .await
4007 .map(gax::response::Response::into_body)
4008 }
4009
4010 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4014 self.0.request.private_cloud = v.into();
4015 self
4016 }
4017
4018 pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
4020 self.0.request.username = v.into();
4021 self
4022 }
4023 }
4024
4025 #[doc(hidden)]
4026 impl gax::options::internal::RequestBuilder for ShowVcenterCredentials {
4027 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4028 &mut self.0.options
4029 }
4030 }
4031
4032 #[derive(Clone, Debug)]
4050 pub struct ResetNsxCredentials(RequestBuilder<crate::model::ResetNsxCredentialsRequest>);
4051
4052 impl ResetNsxCredentials {
4053 pub(crate) fn new(
4054 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4055 ) -> Self {
4056 Self(RequestBuilder::new(stub))
4057 }
4058
4059 pub fn with_request<V: Into<crate::model::ResetNsxCredentialsRequest>>(
4061 mut self,
4062 v: V,
4063 ) -> Self {
4064 self.0.request = v.into();
4065 self
4066 }
4067
4068 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4070 self.0.options = v.into();
4071 self
4072 }
4073
4074 pub async fn send(self) -> Result<longrunning::model::Operation> {
4081 (*self.0.stub)
4082 .reset_nsx_credentials(self.0.request, self.0.options)
4083 .await
4084 .map(gax::response::Response::into_body)
4085 }
4086
4087 pub fn poller(
4089 self,
4090 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
4091 type Operation = lro::internal::Operation<
4092 crate::model::PrivateCloud,
4093 crate::model::OperationMetadata,
4094 >;
4095 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4096 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4097
4098 let stub = self.0.stub.clone();
4099 let mut options = self.0.options.clone();
4100 options.set_retry_policy(gax::retry_policy::NeverRetry);
4101 let query = move |name| {
4102 let stub = stub.clone();
4103 let options = options.clone();
4104 async {
4105 let op = GetOperation::new(stub)
4106 .set_name(name)
4107 .with_options(options)
4108 .send()
4109 .await?;
4110 Ok(Operation::new(op))
4111 }
4112 };
4113
4114 let start = move || async {
4115 let op = self.send().await?;
4116 Ok(Operation::new(op))
4117 };
4118
4119 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4120 }
4121
4122 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4126 self.0.request.private_cloud = v.into();
4127 self
4128 }
4129
4130 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4132 self.0.request.request_id = v.into();
4133 self
4134 }
4135 }
4136
4137 #[doc(hidden)]
4138 impl gax::options::internal::RequestBuilder for ResetNsxCredentials {
4139 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4140 &mut self.0.options
4141 }
4142 }
4143
4144 #[derive(Clone, Debug)]
4162 pub struct ResetVcenterCredentials(
4163 RequestBuilder<crate::model::ResetVcenterCredentialsRequest>,
4164 );
4165
4166 impl ResetVcenterCredentials {
4167 pub(crate) fn new(
4168 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4169 ) -> Self {
4170 Self(RequestBuilder::new(stub))
4171 }
4172
4173 pub fn with_request<V: Into<crate::model::ResetVcenterCredentialsRequest>>(
4175 mut self,
4176 v: V,
4177 ) -> Self {
4178 self.0.request = v.into();
4179 self
4180 }
4181
4182 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4184 self.0.options = v.into();
4185 self
4186 }
4187
4188 pub async fn send(self) -> Result<longrunning::model::Operation> {
4195 (*self.0.stub)
4196 .reset_vcenter_credentials(self.0.request, self.0.options)
4197 .await
4198 .map(gax::response::Response::into_body)
4199 }
4200
4201 pub fn poller(
4203 self,
4204 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
4205 type Operation = lro::internal::Operation<
4206 crate::model::PrivateCloud,
4207 crate::model::OperationMetadata,
4208 >;
4209 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4210 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4211
4212 let stub = self.0.stub.clone();
4213 let mut options = self.0.options.clone();
4214 options.set_retry_policy(gax::retry_policy::NeverRetry);
4215 let query = move |name| {
4216 let stub = stub.clone();
4217 let options = options.clone();
4218 async {
4219 let op = GetOperation::new(stub)
4220 .set_name(name)
4221 .with_options(options)
4222 .send()
4223 .await?;
4224 Ok(Operation::new(op))
4225 }
4226 };
4227
4228 let start = move || async {
4229 let op = self.send().await?;
4230 Ok(Operation::new(op))
4231 };
4232
4233 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4234 }
4235
4236 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4240 self.0.request.private_cloud = v.into();
4241 self
4242 }
4243
4244 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4246 self.0.request.request_id = v.into();
4247 self
4248 }
4249
4250 pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
4252 self.0.request.username = v.into();
4253 self
4254 }
4255 }
4256
4257 #[doc(hidden)]
4258 impl gax::options::internal::RequestBuilder for ResetVcenterCredentials {
4259 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4260 &mut self.0.options
4261 }
4262 }
4263
4264 #[derive(Clone, Debug)]
4281 pub struct GetDnsForwarding(RequestBuilder<crate::model::GetDnsForwardingRequest>);
4282
4283 impl GetDnsForwarding {
4284 pub(crate) fn new(
4285 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4286 ) -> Self {
4287 Self(RequestBuilder::new(stub))
4288 }
4289
4290 pub fn with_request<V: Into<crate::model::GetDnsForwardingRequest>>(
4292 mut self,
4293 v: V,
4294 ) -> Self {
4295 self.0.request = v.into();
4296 self
4297 }
4298
4299 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4301 self.0.options = v.into();
4302 self
4303 }
4304
4305 pub async fn send(self) -> Result<crate::model::DnsForwarding> {
4307 (*self.0.stub)
4308 .get_dns_forwarding(self.0.request, self.0.options)
4309 .await
4310 .map(gax::response::Response::into_body)
4311 }
4312
4313 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4317 self.0.request.name = v.into();
4318 self
4319 }
4320 }
4321
4322 #[doc(hidden)]
4323 impl gax::options::internal::RequestBuilder for GetDnsForwarding {
4324 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4325 &mut self.0.options
4326 }
4327 }
4328
4329 #[derive(Clone, Debug)]
4347 pub struct UpdateDnsForwarding(RequestBuilder<crate::model::UpdateDnsForwardingRequest>);
4348
4349 impl UpdateDnsForwarding {
4350 pub(crate) fn new(
4351 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4352 ) -> Self {
4353 Self(RequestBuilder::new(stub))
4354 }
4355
4356 pub fn with_request<V: Into<crate::model::UpdateDnsForwardingRequest>>(
4358 mut self,
4359 v: V,
4360 ) -> Self {
4361 self.0.request = v.into();
4362 self
4363 }
4364
4365 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4367 self.0.options = v.into();
4368 self
4369 }
4370
4371 pub async fn send(self) -> Result<longrunning::model::Operation> {
4378 (*self.0.stub)
4379 .update_dns_forwarding(self.0.request, self.0.options)
4380 .await
4381 .map(gax::response::Response::into_body)
4382 }
4383
4384 pub fn poller(
4386 self,
4387 ) -> impl lro::Poller<crate::model::DnsForwarding, crate::model::OperationMetadata>
4388 {
4389 type Operation = lro::internal::Operation<
4390 crate::model::DnsForwarding,
4391 crate::model::OperationMetadata,
4392 >;
4393 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4394 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4395
4396 let stub = self.0.stub.clone();
4397 let mut options = self.0.options.clone();
4398 options.set_retry_policy(gax::retry_policy::NeverRetry);
4399 let query = move |name| {
4400 let stub = stub.clone();
4401 let options = options.clone();
4402 async {
4403 let op = GetOperation::new(stub)
4404 .set_name(name)
4405 .with_options(options)
4406 .send()
4407 .await?;
4408 Ok(Operation::new(op))
4409 }
4410 };
4411
4412 let start = move || async {
4413 let op = self.send().await?;
4414 Ok(Operation::new(op))
4415 };
4416
4417 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4418 }
4419
4420 pub fn set_dns_forwarding<T>(mut self, v: T) -> Self
4424 where
4425 T: std::convert::Into<crate::model::DnsForwarding>,
4426 {
4427 self.0.request.dns_forwarding = std::option::Option::Some(v.into());
4428 self
4429 }
4430
4431 pub fn set_or_clear_dns_forwarding<T>(mut self, v: std::option::Option<T>) -> Self
4435 where
4436 T: std::convert::Into<crate::model::DnsForwarding>,
4437 {
4438 self.0.request.dns_forwarding = v.map(|x| x.into());
4439 self
4440 }
4441
4442 pub fn set_update_mask<T>(mut self, v: T) -> Self
4446 where
4447 T: std::convert::Into<wkt::FieldMask>,
4448 {
4449 self.0.request.update_mask = std::option::Option::Some(v.into());
4450 self
4451 }
4452
4453 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4457 where
4458 T: std::convert::Into<wkt::FieldMask>,
4459 {
4460 self.0.request.update_mask = v.map(|x| x.into());
4461 self
4462 }
4463
4464 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4466 self.0.request.request_id = v.into();
4467 self
4468 }
4469 }
4470
4471 #[doc(hidden)]
4472 impl gax::options::internal::RequestBuilder for UpdateDnsForwarding {
4473 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4474 &mut self.0.options
4475 }
4476 }
4477
4478 #[derive(Clone, Debug)]
4495 pub struct GetNetworkPeering(RequestBuilder<crate::model::GetNetworkPeeringRequest>);
4496
4497 impl GetNetworkPeering {
4498 pub(crate) fn new(
4499 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4500 ) -> Self {
4501 Self(RequestBuilder::new(stub))
4502 }
4503
4504 pub fn with_request<V: Into<crate::model::GetNetworkPeeringRequest>>(
4506 mut self,
4507 v: V,
4508 ) -> Self {
4509 self.0.request = v.into();
4510 self
4511 }
4512
4513 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4515 self.0.options = v.into();
4516 self
4517 }
4518
4519 pub async fn send(self) -> Result<crate::model::NetworkPeering> {
4521 (*self.0.stub)
4522 .get_network_peering(self.0.request, self.0.options)
4523 .await
4524 .map(gax::response::Response::into_body)
4525 }
4526
4527 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4531 self.0.request.name = v.into();
4532 self
4533 }
4534 }
4535
4536 #[doc(hidden)]
4537 impl gax::options::internal::RequestBuilder for GetNetworkPeering {
4538 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4539 &mut self.0.options
4540 }
4541 }
4542
4543 #[derive(Clone, Debug)]
4564 pub struct ListNetworkPeerings(RequestBuilder<crate::model::ListNetworkPeeringsRequest>);
4565
4566 impl ListNetworkPeerings {
4567 pub(crate) fn new(
4568 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4569 ) -> Self {
4570 Self(RequestBuilder::new(stub))
4571 }
4572
4573 pub fn with_request<V: Into<crate::model::ListNetworkPeeringsRequest>>(
4575 mut self,
4576 v: V,
4577 ) -> Self {
4578 self.0.request = v.into();
4579 self
4580 }
4581
4582 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4584 self.0.options = v.into();
4585 self
4586 }
4587
4588 pub async fn send(self) -> Result<crate::model::ListNetworkPeeringsResponse> {
4590 (*self.0.stub)
4591 .list_network_peerings(self.0.request, self.0.options)
4592 .await
4593 .map(gax::response::Response::into_body)
4594 }
4595
4596 pub fn by_page(
4598 self,
4599 ) -> impl gax::paginator::Paginator<crate::model::ListNetworkPeeringsResponse, gax::error::Error>
4600 {
4601 use std::clone::Clone;
4602 let token = self.0.request.page_token.clone();
4603 let execute = move |token: String| {
4604 let mut builder = self.clone();
4605 builder.0.request = builder.0.request.set_page_token(token);
4606 builder.send()
4607 };
4608 gax::paginator::internal::new_paginator(token, execute)
4609 }
4610
4611 pub fn by_item(
4613 self,
4614 ) -> impl gax::paginator::ItemPaginator<
4615 crate::model::ListNetworkPeeringsResponse,
4616 gax::error::Error,
4617 > {
4618 use gax::paginator::Paginator;
4619 self.by_page().items()
4620 }
4621
4622 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4626 self.0.request.parent = v.into();
4627 self
4628 }
4629
4630 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4632 self.0.request.page_size = v.into();
4633 self
4634 }
4635
4636 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4638 self.0.request.page_token = v.into();
4639 self
4640 }
4641
4642 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4644 self.0.request.filter = v.into();
4645 self
4646 }
4647
4648 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4650 self.0.request.order_by = v.into();
4651 self
4652 }
4653 }
4654
4655 #[doc(hidden)]
4656 impl gax::options::internal::RequestBuilder for ListNetworkPeerings {
4657 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4658 &mut self.0.options
4659 }
4660 }
4661
4662 #[derive(Clone, Debug)]
4680 pub struct CreateNetworkPeering(RequestBuilder<crate::model::CreateNetworkPeeringRequest>);
4681
4682 impl CreateNetworkPeering {
4683 pub(crate) fn new(
4684 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4685 ) -> Self {
4686 Self(RequestBuilder::new(stub))
4687 }
4688
4689 pub fn with_request<V: Into<crate::model::CreateNetworkPeeringRequest>>(
4691 mut self,
4692 v: V,
4693 ) -> Self {
4694 self.0.request = v.into();
4695 self
4696 }
4697
4698 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4700 self.0.options = v.into();
4701 self
4702 }
4703
4704 pub async fn send(self) -> Result<longrunning::model::Operation> {
4711 (*self.0.stub)
4712 .create_network_peering(self.0.request, self.0.options)
4713 .await
4714 .map(gax::response::Response::into_body)
4715 }
4716
4717 pub fn poller(
4719 self,
4720 ) -> impl lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
4721 {
4722 type Operation = lro::internal::Operation<
4723 crate::model::NetworkPeering,
4724 crate::model::OperationMetadata,
4725 >;
4726 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4727 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4728
4729 let stub = self.0.stub.clone();
4730 let mut options = self.0.options.clone();
4731 options.set_retry_policy(gax::retry_policy::NeverRetry);
4732 let query = move |name| {
4733 let stub = stub.clone();
4734 let options = options.clone();
4735 async {
4736 let op = GetOperation::new(stub)
4737 .set_name(name)
4738 .with_options(options)
4739 .send()
4740 .await?;
4741 Ok(Operation::new(op))
4742 }
4743 };
4744
4745 let start = move || async {
4746 let op = self.send().await?;
4747 Ok(Operation::new(op))
4748 };
4749
4750 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4751 }
4752
4753 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4757 self.0.request.parent = v.into();
4758 self
4759 }
4760
4761 pub fn set_network_peering_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4765 self.0.request.network_peering_id = v.into();
4766 self
4767 }
4768
4769 pub fn set_network_peering<T>(mut self, v: T) -> Self
4773 where
4774 T: std::convert::Into<crate::model::NetworkPeering>,
4775 {
4776 self.0.request.network_peering = std::option::Option::Some(v.into());
4777 self
4778 }
4779
4780 pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
4784 where
4785 T: std::convert::Into<crate::model::NetworkPeering>,
4786 {
4787 self.0.request.network_peering = v.map(|x| x.into());
4788 self
4789 }
4790
4791 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4793 self.0.request.request_id = v.into();
4794 self
4795 }
4796 }
4797
4798 #[doc(hidden)]
4799 impl gax::options::internal::RequestBuilder for CreateNetworkPeering {
4800 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4801 &mut self.0.options
4802 }
4803 }
4804
4805 #[derive(Clone, Debug)]
4823 pub struct DeleteNetworkPeering(RequestBuilder<crate::model::DeleteNetworkPeeringRequest>);
4824
4825 impl DeleteNetworkPeering {
4826 pub(crate) fn new(
4827 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4828 ) -> Self {
4829 Self(RequestBuilder::new(stub))
4830 }
4831
4832 pub fn with_request<V: Into<crate::model::DeleteNetworkPeeringRequest>>(
4834 mut self,
4835 v: V,
4836 ) -> Self {
4837 self.0.request = v.into();
4838 self
4839 }
4840
4841 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4843 self.0.options = v.into();
4844 self
4845 }
4846
4847 pub async fn send(self) -> Result<longrunning::model::Operation> {
4854 (*self.0.stub)
4855 .delete_network_peering(self.0.request, self.0.options)
4856 .await
4857 .map(gax::response::Response::into_body)
4858 }
4859
4860 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
4862 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4863 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4864 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4865
4866 let stub = self.0.stub.clone();
4867 let mut options = self.0.options.clone();
4868 options.set_retry_policy(gax::retry_policy::NeverRetry);
4869 let query = move |name| {
4870 let stub = stub.clone();
4871 let options = options.clone();
4872 async {
4873 let op = GetOperation::new(stub)
4874 .set_name(name)
4875 .with_options(options)
4876 .send()
4877 .await?;
4878 Ok(Operation::new(op))
4879 }
4880 };
4881
4882 let start = move || async {
4883 let op = self.send().await?;
4884 Ok(Operation::new(op))
4885 };
4886
4887 lro::internal::new_unit_response_poller(
4888 polling_error_policy,
4889 polling_backoff_policy,
4890 start,
4891 query,
4892 )
4893 }
4894
4895 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4899 self.0.request.name = v.into();
4900 self
4901 }
4902
4903 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4905 self.0.request.request_id = v.into();
4906 self
4907 }
4908 }
4909
4910 #[doc(hidden)]
4911 impl gax::options::internal::RequestBuilder for DeleteNetworkPeering {
4912 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4913 &mut self.0.options
4914 }
4915 }
4916
4917 #[derive(Clone, Debug)]
4935 pub struct UpdateNetworkPeering(RequestBuilder<crate::model::UpdateNetworkPeeringRequest>);
4936
4937 impl UpdateNetworkPeering {
4938 pub(crate) fn new(
4939 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4940 ) -> Self {
4941 Self(RequestBuilder::new(stub))
4942 }
4943
4944 pub fn with_request<V: Into<crate::model::UpdateNetworkPeeringRequest>>(
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_network_peering(self.0.request, self.0.options)
4968 .await
4969 .map(gax::response::Response::into_body)
4970 }
4971
4972 pub fn poller(
4974 self,
4975 ) -> impl lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
4976 {
4977 type Operation = lro::internal::Operation<
4978 crate::model::NetworkPeering,
4979 crate::model::OperationMetadata,
4980 >;
4981 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4982 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4983
4984 let stub = self.0.stub.clone();
4985 let mut options = self.0.options.clone();
4986 options.set_retry_policy(gax::retry_policy::NeverRetry);
4987 let query = move |name| {
4988 let stub = stub.clone();
4989 let options = options.clone();
4990 async {
4991 let op = GetOperation::new(stub)
4992 .set_name(name)
4993 .with_options(options)
4994 .send()
4995 .await?;
4996 Ok(Operation::new(op))
4997 }
4998 };
4999
5000 let start = move || async {
5001 let op = self.send().await?;
5002 Ok(Operation::new(op))
5003 };
5004
5005 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5006 }
5007
5008 pub fn set_network_peering<T>(mut self, v: T) -> Self
5012 where
5013 T: std::convert::Into<crate::model::NetworkPeering>,
5014 {
5015 self.0.request.network_peering = std::option::Option::Some(v.into());
5016 self
5017 }
5018
5019 pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
5023 where
5024 T: std::convert::Into<crate::model::NetworkPeering>,
5025 {
5026 self.0.request.network_peering = v.map(|x| x.into());
5027 self
5028 }
5029
5030 pub fn set_update_mask<T>(mut self, v: T) -> Self
5034 where
5035 T: std::convert::Into<wkt::FieldMask>,
5036 {
5037 self.0.request.update_mask = std::option::Option::Some(v.into());
5038 self
5039 }
5040
5041 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5045 where
5046 T: std::convert::Into<wkt::FieldMask>,
5047 {
5048 self.0.request.update_mask = v.map(|x| x.into());
5049 self
5050 }
5051
5052 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5054 self.0.request.request_id = v.into();
5055 self
5056 }
5057 }
5058
5059 #[doc(hidden)]
5060 impl gax::options::internal::RequestBuilder for UpdateNetworkPeering {
5061 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5062 &mut self.0.options
5063 }
5064 }
5065
5066 #[derive(Clone, Debug)]
5087 pub struct ListPeeringRoutes(RequestBuilder<crate::model::ListPeeringRoutesRequest>);
5088
5089 impl ListPeeringRoutes {
5090 pub(crate) fn new(
5091 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5092 ) -> Self {
5093 Self(RequestBuilder::new(stub))
5094 }
5095
5096 pub fn with_request<V: Into<crate::model::ListPeeringRoutesRequest>>(
5098 mut self,
5099 v: V,
5100 ) -> Self {
5101 self.0.request = v.into();
5102 self
5103 }
5104
5105 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5107 self.0.options = v.into();
5108 self
5109 }
5110
5111 pub async fn send(self) -> Result<crate::model::ListPeeringRoutesResponse> {
5113 (*self.0.stub)
5114 .list_peering_routes(self.0.request, self.0.options)
5115 .await
5116 .map(gax::response::Response::into_body)
5117 }
5118
5119 pub fn by_page(
5121 self,
5122 ) -> impl gax::paginator::Paginator<crate::model::ListPeeringRoutesResponse, gax::error::Error>
5123 {
5124 use std::clone::Clone;
5125 let token = self.0.request.page_token.clone();
5126 let execute = move |token: String| {
5127 let mut builder = self.clone();
5128 builder.0.request = builder.0.request.set_page_token(token);
5129 builder.send()
5130 };
5131 gax::paginator::internal::new_paginator(token, execute)
5132 }
5133
5134 pub fn by_item(
5136 self,
5137 ) -> impl gax::paginator::ItemPaginator<crate::model::ListPeeringRoutesResponse, gax::error::Error>
5138 {
5139 use gax::paginator::Paginator;
5140 self.by_page().items()
5141 }
5142
5143 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5147 self.0.request.parent = v.into();
5148 self
5149 }
5150
5151 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5153 self.0.request.page_size = v.into();
5154 self
5155 }
5156
5157 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5159 self.0.request.page_token = v.into();
5160 self
5161 }
5162
5163 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5165 self.0.request.filter = v.into();
5166 self
5167 }
5168 }
5169
5170 #[doc(hidden)]
5171 impl gax::options::internal::RequestBuilder for ListPeeringRoutes {
5172 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5173 &mut self.0.options
5174 }
5175 }
5176
5177 #[derive(Clone, Debug)]
5195 pub struct CreateHcxActivationKey(RequestBuilder<crate::model::CreateHcxActivationKeyRequest>);
5196
5197 impl CreateHcxActivationKey {
5198 pub(crate) fn new(
5199 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5200 ) -> Self {
5201 Self(RequestBuilder::new(stub))
5202 }
5203
5204 pub fn with_request<V: Into<crate::model::CreateHcxActivationKeyRequest>>(
5206 mut self,
5207 v: V,
5208 ) -> Self {
5209 self.0.request = v.into();
5210 self
5211 }
5212
5213 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5215 self.0.options = v.into();
5216 self
5217 }
5218
5219 pub async fn send(self) -> Result<longrunning::model::Operation> {
5226 (*self.0.stub)
5227 .create_hcx_activation_key(self.0.request, self.0.options)
5228 .await
5229 .map(gax::response::Response::into_body)
5230 }
5231
5232 pub fn poller(
5234 self,
5235 ) -> impl lro::Poller<crate::model::HcxActivationKey, crate::model::OperationMetadata>
5236 {
5237 type Operation = lro::internal::Operation<
5238 crate::model::HcxActivationKey,
5239 crate::model::OperationMetadata,
5240 >;
5241 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5242 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5243
5244 let stub = self.0.stub.clone();
5245 let mut options = self.0.options.clone();
5246 options.set_retry_policy(gax::retry_policy::NeverRetry);
5247 let query = move |name| {
5248 let stub = stub.clone();
5249 let options = options.clone();
5250 async {
5251 let op = GetOperation::new(stub)
5252 .set_name(name)
5253 .with_options(options)
5254 .send()
5255 .await?;
5256 Ok(Operation::new(op))
5257 }
5258 };
5259
5260 let start = move || async {
5261 let op = self.send().await?;
5262 Ok(Operation::new(op))
5263 };
5264
5265 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5266 }
5267
5268 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5272 self.0.request.parent = v.into();
5273 self
5274 }
5275
5276 pub fn set_hcx_activation_key<T>(mut self, v: T) -> Self
5280 where
5281 T: std::convert::Into<crate::model::HcxActivationKey>,
5282 {
5283 self.0.request.hcx_activation_key = std::option::Option::Some(v.into());
5284 self
5285 }
5286
5287 pub fn set_or_clear_hcx_activation_key<T>(mut self, v: std::option::Option<T>) -> Self
5291 where
5292 T: std::convert::Into<crate::model::HcxActivationKey>,
5293 {
5294 self.0.request.hcx_activation_key = v.map(|x| x.into());
5295 self
5296 }
5297
5298 pub fn set_hcx_activation_key_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5302 self.0.request.hcx_activation_key_id = v.into();
5303 self
5304 }
5305
5306 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5308 self.0.request.request_id = v.into();
5309 self
5310 }
5311 }
5312
5313 #[doc(hidden)]
5314 impl gax::options::internal::RequestBuilder for CreateHcxActivationKey {
5315 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5316 &mut self.0.options
5317 }
5318 }
5319
5320 #[derive(Clone, Debug)]
5341 pub struct ListHcxActivationKeys(RequestBuilder<crate::model::ListHcxActivationKeysRequest>);
5342
5343 impl ListHcxActivationKeys {
5344 pub(crate) fn new(
5345 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5346 ) -> Self {
5347 Self(RequestBuilder::new(stub))
5348 }
5349
5350 pub fn with_request<V: Into<crate::model::ListHcxActivationKeysRequest>>(
5352 mut self,
5353 v: V,
5354 ) -> Self {
5355 self.0.request = v.into();
5356 self
5357 }
5358
5359 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5361 self.0.options = v.into();
5362 self
5363 }
5364
5365 pub async fn send(self) -> Result<crate::model::ListHcxActivationKeysResponse> {
5367 (*self.0.stub)
5368 .list_hcx_activation_keys(self.0.request, self.0.options)
5369 .await
5370 .map(gax::response::Response::into_body)
5371 }
5372
5373 pub fn by_page(
5375 self,
5376 ) -> impl gax::paginator::Paginator<crate::model::ListHcxActivationKeysResponse, gax::error::Error>
5377 {
5378 use std::clone::Clone;
5379 let token = self.0.request.page_token.clone();
5380 let execute = move |token: String| {
5381 let mut builder = self.clone();
5382 builder.0.request = builder.0.request.set_page_token(token);
5383 builder.send()
5384 };
5385 gax::paginator::internal::new_paginator(token, execute)
5386 }
5387
5388 pub fn by_item(
5390 self,
5391 ) -> impl gax::paginator::ItemPaginator<
5392 crate::model::ListHcxActivationKeysResponse,
5393 gax::error::Error,
5394 > {
5395 use gax::paginator::Paginator;
5396 self.by_page().items()
5397 }
5398
5399 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5403 self.0.request.parent = v.into();
5404 self
5405 }
5406
5407 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5409 self.0.request.page_size = v.into();
5410 self
5411 }
5412
5413 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5415 self.0.request.page_token = v.into();
5416 self
5417 }
5418 }
5419
5420 #[doc(hidden)]
5421 impl gax::options::internal::RequestBuilder for ListHcxActivationKeys {
5422 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5423 &mut self.0.options
5424 }
5425 }
5426
5427 #[derive(Clone, Debug)]
5444 pub struct GetHcxActivationKey(RequestBuilder<crate::model::GetHcxActivationKeyRequest>);
5445
5446 impl GetHcxActivationKey {
5447 pub(crate) fn new(
5448 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5449 ) -> Self {
5450 Self(RequestBuilder::new(stub))
5451 }
5452
5453 pub fn with_request<V: Into<crate::model::GetHcxActivationKeyRequest>>(
5455 mut self,
5456 v: V,
5457 ) -> Self {
5458 self.0.request = v.into();
5459 self
5460 }
5461
5462 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5464 self.0.options = v.into();
5465 self
5466 }
5467
5468 pub async fn send(self) -> Result<crate::model::HcxActivationKey> {
5470 (*self.0.stub)
5471 .get_hcx_activation_key(self.0.request, self.0.options)
5472 .await
5473 .map(gax::response::Response::into_body)
5474 }
5475
5476 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5480 self.0.request.name = v.into();
5481 self
5482 }
5483 }
5484
5485 #[doc(hidden)]
5486 impl gax::options::internal::RequestBuilder for GetHcxActivationKey {
5487 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5488 &mut self.0.options
5489 }
5490 }
5491
5492 #[derive(Clone, Debug)]
5509 pub struct GetNetworkPolicy(RequestBuilder<crate::model::GetNetworkPolicyRequest>);
5510
5511 impl GetNetworkPolicy {
5512 pub(crate) fn new(
5513 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5514 ) -> Self {
5515 Self(RequestBuilder::new(stub))
5516 }
5517
5518 pub fn with_request<V: Into<crate::model::GetNetworkPolicyRequest>>(
5520 mut self,
5521 v: V,
5522 ) -> Self {
5523 self.0.request = v.into();
5524 self
5525 }
5526
5527 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5529 self.0.options = v.into();
5530 self
5531 }
5532
5533 pub async fn send(self) -> Result<crate::model::NetworkPolicy> {
5535 (*self.0.stub)
5536 .get_network_policy(self.0.request, self.0.options)
5537 .await
5538 .map(gax::response::Response::into_body)
5539 }
5540
5541 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5545 self.0.request.name = v.into();
5546 self
5547 }
5548 }
5549
5550 #[doc(hidden)]
5551 impl gax::options::internal::RequestBuilder for GetNetworkPolicy {
5552 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5553 &mut self.0.options
5554 }
5555 }
5556
5557 #[derive(Clone, Debug)]
5578 pub struct ListNetworkPolicies(RequestBuilder<crate::model::ListNetworkPoliciesRequest>);
5579
5580 impl ListNetworkPolicies {
5581 pub(crate) fn new(
5582 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5583 ) -> Self {
5584 Self(RequestBuilder::new(stub))
5585 }
5586
5587 pub fn with_request<V: Into<crate::model::ListNetworkPoliciesRequest>>(
5589 mut self,
5590 v: V,
5591 ) -> Self {
5592 self.0.request = v.into();
5593 self
5594 }
5595
5596 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5598 self.0.options = v.into();
5599 self
5600 }
5601
5602 pub async fn send(self) -> Result<crate::model::ListNetworkPoliciesResponse> {
5604 (*self.0.stub)
5605 .list_network_policies(self.0.request, self.0.options)
5606 .await
5607 .map(gax::response::Response::into_body)
5608 }
5609
5610 pub fn by_page(
5612 self,
5613 ) -> impl gax::paginator::Paginator<crate::model::ListNetworkPoliciesResponse, gax::error::Error>
5614 {
5615 use std::clone::Clone;
5616 let token = self.0.request.page_token.clone();
5617 let execute = move |token: String| {
5618 let mut builder = self.clone();
5619 builder.0.request = builder.0.request.set_page_token(token);
5620 builder.send()
5621 };
5622 gax::paginator::internal::new_paginator(token, execute)
5623 }
5624
5625 pub fn by_item(
5627 self,
5628 ) -> impl gax::paginator::ItemPaginator<
5629 crate::model::ListNetworkPoliciesResponse,
5630 gax::error::Error,
5631 > {
5632 use gax::paginator::Paginator;
5633 self.by_page().items()
5634 }
5635
5636 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5640 self.0.request.parent = v.into();
5641 self
5642 }
5643
5644 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5646 self.0.request.page_size = v.into();
5647 self
5648 }
5649
5650 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5652 self.0.request.page_token = v.into();
5653 self
5654 }
5655
5656 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5658 self.0.request.filter = v.into();
5659 self
5660 }
5661
5662 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5664 self.0.request.order_by = v.into();
5665 self
5666 }
5667 }
5668
5669 #[doc(hidden)]
5670 impl gax::options::internal::RequestBuilder for ListNetworkPolicies {
5671 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5672 &mut self.0.options
5673 }
5674 }
5675
5676 #[derive(Clone, Debug)]
5694 pub struct CreateNetworkPolicy(RequestBuilder<crate::model::CreateNetworkPolicyRequest>);
5695
5696 impl CreateNetworkPolicy {
5697 pub(crate) fn new(
5698 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5699 ) -> Self {
5700 Self(RequestBuilder::new(stub))
5701 }
5702
5703 pub fn with_request<V: Into<crate::model::CreateNetworkPolicyRequest>>(
5705 mut self,
5706 v: V,
5707 ) -> Self {
5708 self.0.request = v.into();
5709 self
5710 }
5711
5712 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5714 self.0.options = v.into();
5715 self
5716 }
5717
5718 pub async fn send(self) -> Result<longrunning::model::Operation> {
5725 (*self.0.stub)
5726 .create_network_policy(self.0.request, self.0.options)
5727 .await
5728 .map(gax::response::Response::into_body)
5729 }
5730
5731 pub fn poller(
5733 self,
5734 ) -> impl lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
5735 {
5736 type Operation = lro::internal::Operation<
5737 crate::model::NetworkPolicy,
5738 crate::model::OperationMetadata,
5739 >;
5740 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5741 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5742
5743 let stub = self.0.stub.clone();
5744 let mut options = self.0.options.clone();
5745 options.set_retry_policy(gax::retry_policy::NeverRetry);
5746 let query = move |name| {
5747 let stub = stub.clone();
5748 let options = options.clone();
5749 async {
5750 let op = GetOperation::new(stub)
5751 .set_name(name)
5752 .with_options(options)
5753 .send()
5754 .await?;
5755 Ok(Operation::new(op))
5756 }
5757 };
5758
5759 let start = move || async {
5760 let op = self.send().await?;
5761 Ok(Operation::new(op))
5762 };
5763
5764 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5765 }
5766
5767 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5771 self.0.request.parent = v.into();
5772 self
5773 }
5774
5775 pub fn set_network_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5779 self.0.request.network_policy_id = v.into();
5780 self
5781 }
5782
5783 pub fn set_network_policy<T>(mut self, v: T) -> Self
5787 where
5788 T: std::convert::Into<crate::model::NetworkPolicy>,
5789 {
5790 self.0.request.network_policy = std::option::Option::Some(v.into());
5791 self
5792 }
5793
5794 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
5798 where
5799 T: std::convert::Into<crate::model::NetworkPolicy>,
5800 {
5801 self.0.request.network_policy = v.map(|x| x.into());
5802 self
5803 }
5804
5805 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5807 self.0.request.request_id = v.into();
5808 self
5809 }
5810 }
5811
5812 #[doc(hidden)]
5813 impl gax::options::internal::RequestBuilder for CreateNetworkPolicy {
5814 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5815 &mut self.0.options
5816 }
5817 }
5818
5819 #[derive(Clone, Debug)]
5837 pub struct UpdateNetworkPolicy(RequestBuilder<crate::model::UpdateNetworkPolicyRequest>);
5838
5839 impl UpdateNetworkPolicy {
5840 pub(crate) fn new(
5841 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5842 ) -> Self {
5843 Self(RequestBuilder::new(stub))
5844 }
5845
5846 pub fn with_request<V: Into<crate::model::UpdateNetworkPolicyRequest>>(
5848 mut self,
5849 v: V,
5850 ) -> Self {
5851 self.0.request = v.into();
5852 self
5853 }
5854
5855 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5857 self.0.options = v.into();
5858 self
5859 }
5860
5861 pub async fn send(self) -> Result<longrunning::model::Operation> {
5868 (*self.0.stub)
5869 .update_network_policy(self.0.request, self.0.options)
5870 .await
5871 .map(gax::response::Response::into_body)
5872 }
5873
5874 pub fn poller(
5876 self,
5877 ) -> impl lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
5878 {
5879 type Operation = lro::internal::Operation<
5880 crate::model::NetworkPolicy,
5881 crate::model::OperationMetadata,
5882 >;
5883 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5884 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5885
5886 let stub = self.0.stub.clone();
5887 let mut options = self.0.options.clone();
5888 options.set_retry_policy(gax::retry_policy::NeverRetry);
5889 let query = move |name| {
5890 let stub = stub.clone();
5891 let options = options.clone();
5892 async {
5893 let op = GetOperation::new(stub)
5894 .set_name(name)
5895 .with_options(options)
5896 .send()
5897 .await?;
5898 Ok(Operation::new(op))
5899 }
5900 };
5901
5902 let start = move || async {
5903 let op = self.send().await?;
5904 Ok(Operation::new(op))
5905 };
5906
5907 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5908 }
5909
5910 pub fn set_network_policy<T>(mut self, v: T) -> Self
5914 where
5915 T: std::convert::Into<crate::model::NetworkPolicy>,
5916 {
5917 self.0.request.network_policy = std::option::Option::Some(v.into());
5918 self
5919 }
5920
5921 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
5925 where
5926 T: std::convert::Into<crate::model::NetworkPolicy>,
5927 {
5928 self.0.request.network_policy = v.map(|x| x.into());
5929 self
5930 }
5931
5932 pub fn set_update_mask<T>(mut self, v: T) -> Self
5936 where
5937 T: std::convert::Into<wkt::FieldMask>,
5938 {
5939 self.0.request.update_mask = std::option::Option::Some(v.into());
5940 self
5941 }
5942
5943 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5947 where
5948 T: std::convert::Into<wkt::FieldMask>,
5949 {
5950 self.0.request.update_mask = v.map(|x| x.into());
5951 self
5952 }
5953
5954 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5956 self.0.request.request_id = v.into();
5957 self
5958 }
5959 }
5960
5961 #[doc(hidden)]
5962 impl gax::options::internal::RequestBuilder for UpdateNetworkPolicy {
5963 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5964 &mut self.0.options
5965 }
5966 }
5967
5968 #[derive(Clone, Debug)]
5986 pub struct DeleteNetworkPolicy(RequestBuilder<crate::model::DeleteNetworkPolicyRequest>);
5987
5988 impl DeleteNetworkPolicy {
5989 pub(crate) fn new(
5990 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5991 ) -> Self {
5992 Self(RequestBuilder::new(stub))
5993 }
5994
5995 pub fn with_request<V: Into<crate::model::DeleteNetworkPolicyRequest>>(
5997 mut self,
5998 v: V,
5999 ) -> Self {
6000 self.0.request = v.into();
6001 self
6002 }
6003
6004 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6006 self.0.options = v.into();
6007 self
6008 }
6009
6010 pub async fn send(self) -> Result<longrunning::model::Operation> {
6017 (*self.0.stub)
6018 .delete_network_policy(self.0.request, self.0.options)
6019 .await
6020 .map(gax::response::Response::into_body)
6021 }
6022
6023 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
6025 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6026 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6027 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6028
6029 let stub = self.0.stub.clone();
6030 let mut options = self.0.options.clone();
6031 options.set_retry_policy(gax::retry_policy::NeverRetry);
6032 let query = move |name| {
6033 let stub = stub.clone();
6034 let options = options.clone();
6035 async {
6036 let op = GetOperation::new(stub)
6037 .set_name(name)
6038 .with_options(options)
6039 .send()
6040 .await?;
6041 Ok(Operation::new(op))
6042 }
6043 };
6044
6045 let start = move || async {
6046 let op = self.send().await?;
6047 Ok(Operation::new(op))
6048 };
6049
6050 lro::internal::new_unit_response_poller(
6051 polling_error_policy,
6052 polling_backoff_policy,
6053 start,
6054 query,
6055 )
6056 }
6057
6058 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6062 self.0.request.name = v.into();
6063 self
6064 }
6065
6066 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6068 self.0.request.request_id = v.into();
6069 self
6070 }
6071 }
6072
6073 #[doc(hidden)]
6074 impl gax::options::internal::RequestBuilder for DeleteNetworkPolicy {
6075 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6076 &mut self.0.options
6077 }
6078 }
6079
6080 #[derive(Clone, Debug)]
6101 pub struct ListManagementDnsZoneBindings(
6102 RequestBuilder<crate::model::ListManagementDnsZoneBindingsRequest>,
6103 );
6104
6105 impl ListManagementDnsZoneBindings {
6106 pub(crate) fn new(
6107 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6108 ) -> Self {
6109 Self(RequestBuilder::new(stub))
6110 }
6111
6112 pub fn with_request<V: Into<crate::model::ListManagementDnsZoneBindingsRequest>>(
6114 mut self,
6115 v: V,
6116 ) -> Self {
6117 self.0.request = v.into();
6118 self
6119 }
6120
6121 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6123 self.0.options = v.into();
6124 self
6125 }
6126
6127 pub async fn send(self) -> Result<crate::model::ListManagementDnsZoneBindingsResponse> {
6129 (*self.0.stub)
6130 .list_management_dns_zone_bindings(self.0.request, self.0.options)
6131 .await
6132 .map(gax::response::Response::into_body)
6133 }
6134
6135 pub fn by_page(
6137 self,
6138 ) -> impl gax::paginator::Paginator<
6139 crate::model::ListManagementDnsZoneBindingsResponse,
6140 gax::error::Error,
6141 > {
6142 use std::clone::Clone;
6143 let token = self.0.request.page_token.clone();
6144 let execute = move |token: String| {
6145 let mut builder = self.clone();
6146 builder.0.request = builder.0.request.set_page_token(token);
6147 builder.send()
6148 };
6149 gax::paginator::internal::new_paginator(token, execute)
6150 }
6151
6152 pub fn by_item(
6154 self,
6155 ) -> impl gax::paginator::ItemPaginator<
6156 crate::model::ListManagementDnsZoneBindingsResponse,
6157 gax::error::Error,
6158 > {
6159 use gax::paginator::Paginator;
6160 self.by_page().items()
6161 }
6162
6163 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6167 self.0.request.parent = v.into();
6168 self
6169 }
6170
6171 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6173 self.0.request.page_size = v.into();
6174 self
6175 }
6176
6177 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6179 self.0.request.page_token = v.into();
6180 self
6181 }
6182
6183 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6185 self.0.request.filter = v.into();
6186 self
6187 }
6188
6189 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6191 self.0.request.order_by = v.into();
6192 self
6193 }
6194 }
6195
6196 #[doc(hidden)]
6197 impl gax::options::internal::RequestBuilder for ListManagementDnsZoneBindings {
6198 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6199 &mut self.0.options
6200 }
6201 }
6202
6203 #[derive(Clone, Debug)]
6220 pub struct GetManagementDnsZoneBinding(
6221 RequestBuilder<crate::model::GetManagementDnsZoneBindingRequest>,
6222 );
6223
6224 impl GetManagementDnsZoneBinding {
6225 pub(crate) fn new(
6226 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6227 ) -> Self {
6228 Self(RequestBuilder::new(stub))
6229 }
6230
6231 pub fn with_request<V: Into<crate::model::GetManagementDnsZoneBindingRequest>>(
6233 mut self,
6234 v: V,
6235 ) -> Self {
6236 self.0.request = v.into();
6237 self
6238 }
6239
6240 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6242 self.0.options = v.into();
6243 self
6244 }
6245
6246 pub async fn send(self) -> Result<crate::model::ManagementDnsZoneBinding> {
6248 (*self.0.stub)
6249 .get_management_dns_zone_binding(self.0.request, self.0.options)
6250 .await
6251 .map(gax::response::Response::into_body)
6252 }
6253
6254 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6258 self.0.request.name = v.into();
6259 self
6260 }
6261 }
6262
6263 #[doc(hidden)]
6264 impl gax::options::internal::RequestBuilder for GetManagementDnsZoneBinding {
6265 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6266 &mut self.0.options
6267 }
6268 }
6269
6270 #[derive(Clone, Debug)]
6288 pub struct CreateManagementDnsZoneBinding(
6289 RequestBuilder<crate::model::CreateManagementDnsZoneBindingRequest>,
6290 );
6291
6292 impl CreateManagementDnsZoneBinding {
6293 pub(crate) fn new(
6294 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6295 ) -> Self {
6296 Self(RequestBuilder::new(stub))
6297 }
6298
6299 pub fn with_request<V: Into<crate::model::CreateManagementDnsZoneBindingRequest>>(
6301 mut self,
6302 v: V,
6303 ) -> Self {
6304 self.0.request = v.into();
6305 self
6306 }
6307
6308 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6310 self.0.options = v.into();
6311 self
6312 }
6313
6314 pub async fn send(self) -> Result<longrunning::model::Operation> {
6321 (*self.0.stub)
6322 .create_management_dns_zone_binding(self.0.request, self.0.options)
6323 .await
6324 .map(gax::response::Response::into_body)
6325 }
6326
6327 pub fn poller(
6329 self,
6330 ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
6331 {
6332 type Operation = lro::internal::Operation<
6333 crate::model::ManagementDnsZoneBinding,
6334 crate::model::OperationMetadata,
6335 >;
6336 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6337 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6338
6339 let stub = self.0.stub.clone();
6340 let mut options = self.0.options.clone();
6341 options.set_retry_policy(gax::retry_policy::NeverRetry);
6342 let query = move |name| {
6343 let stub = stub.clone();
6344 let options = options.clone();
6345 async {
6346 let op = GetOperation::new(stub)
6347 .set_name(name)
6348 .with_options(options)
6349 .send()
6350 .await?;
6351 Ok(Operation::new(op))
6352 }
6353 };
6354
6355 let start = move || async {
6356 let op = self.send().await?;
6357 Ok(Operation::new(op))
6358 };
6359
6360 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6361 }
6362
6363 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6367 self.0.request.parent = v.into();
6368 self
6369 }
6370
6371 pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6375 where
6376 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6377 {
6378 self.0.request.management_dns_zone_binding = std::option::Option::Some(v.into());
6379 self
6380 }
6381
6382 pub fn set_or_clear_management_dns_zone_binding<T>(
6386 mut self,
6387 v: std::option::Option<T>,
6388 ) -> Self
6389 where
6390 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6391 {
6392 self.0.request.management_dns_zone_binding = v.map(|x| x.into());
6393 self
6394 }
6395
6396 pub fn set_management_dns_zone_binding_id<T: Into<std::string::String>>(
6400 mut self,
6401 v: T,
6402 ) -> Self {
6403 self.0.request.management_dns_zone_binding_id = v.into();
6404 self
6405 }
6406
6407 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6409 self.0.request.request_id = v.into();
6410 self
6411 }
6412 }
6413
6414 #[doc(hidden)]
6415 impl gax::options::internal::RequestBuilder for CreateManagementDnsZoneBinding {
6416 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6417 &mut self.0.options
6418 }
6419 }
6420
6421 #[derive(Clone, Debug)]
6439 pub struct UpdateManagementDnsZoneBinding(
6440 RequestBuilder<crate::model::UpdateManagementDnsZoneBindingRequest>,
6441 );
6442
6443 impl UpdateManagementDnsZoneBinding {
6444 pub(crate) fn new(
6445 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6446 ) -> Self {
6447 Self(RequestBuilder::new(stub))
6448 }
6449
6450 pub fn with_request<V: Into<crate::model::UpdateManagementDnsZoneBindingRequest>>(
6452 mut self,
6453 v: V,
6454 ) -> Self {
6455 self.0.request = v.into();
6456 self
6457 }
6458
6459 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6461 self.0.options = v.into();
6462 self
6463 }
6464
6465 pub async fn send(self) -> Result<longrunning::model::Operation> {
6472 (*self.0.stub)
6473 .update_management_dns_zone_binding(self.0.request, self.0.options)
6474 .await
6475 .map(gax::response::Response::into_body)
6476 }
6477
6478 pub fn poller(
6480 self,
6481 ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
6482 {
6483 type Operation = lro::internal::Operation<
6484 crate::model::ManagementDnsZoneBinding,
6485 crate::model::OperationMetadata,
6486 >;
6487 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6488 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6489
6490 let stub = self.0.stub.clone();
6491 let mut options = self.0.options.clone();
6492 options.set_retry_policy(gax::retry_policy::NeverRetry);
6493 let query = move |name| {
6494 let stub = stub.clone();
6495 let options = options.clone();
6496 async {
6497 let op = GetOperation::new(stub)
6498 .set_name(name)
6499 .with_options(options)
6500 .send()
6501 .await?;
6502 Ok(Operation::new(op))
6503 }
6504 };
6505
6506 let start = move || async {
6507 let op = self.send().await?;
6508 Ok(Operation::new(op))
6509 };
6510
6511 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6512 }
6513
6514 pub fn set_update_mask<T>(mut self, v: T) -> Self
6518 where
6519 T: std::convert::Into<wkt::FieldMask>,
6520 {
6521 self.0.request.update_mask = std::option::Option::Some(v.into());
6522 self
6523 }
6524
6525 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6529 where
6530 T: std::convert::Into<wkt::FieldMask>,
6531 {
6532 self.0.request.update_mask = v.map(|x| x.into());
6533 self
6534 }
6535
6536 pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6540 where
6541 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6542 {
6543 self.0.request.management_dns_zone_binding = std::option::Option::Some(v.into());
6544 self
6545 }
6546
6547 pub fn set_or_clear_management_dns_zone_binding<T>(
6551 mut self,
6552 v: std::option::Option<T>,
6553 ) -> Self
6554 where
6555 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6556 {
6557 self.0.request.management_dns_zone_binding = v.map(|x| x.into());
6558 self
6559 }
6560
6561 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6563 self.0.request.request_id = v.into();
6564 self
6565 }
6566 }
6567
6568 #[doc(hidden)]
6569 impl gax::options::internal::RequestBuilder for UpdateManagementDnsZoneBinding {
6570 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6571 &mut self.0.options
6572 }
6573 }
6574
6575 #[derive(Clone, Debug)]
6593 pub struct DeleteManagementDnsZoneBinding(
6594 RequestBuilder<crate::model::DeleteManagementDnsZoneBindingRequest>,
6595 );
6596
6597 impl DeleteManagementDnsZoneBinding {
6598 pub(crate) fn new(
6599 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6600 ) -> Self {
6601 Self(RequestBuilder::new(stub))
6602 }
6603
6604 pub fn with_request<V: Into<crate::model::DeleteManagementDnsZoneBindingRequest>>(
6606 mut self,
6607 v: V,
6608 ) -> Self {
6609 self.0.request = v.into();
6610 self
6611 }
6612
6613 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6615 self.0.options = v.into();
6616 self
6617 }
6618
6619 pub async fn send(self) -> Result<longrunning::model::Operation> {
6626 (*self.0.stub)
6627 .delete_management_dns_zone_binding(self.0.request, self.0.options)
6628 .await
6629 .map(gax::response::Response::into_body)
6630 }
6631
6632 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
6634 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6635 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6636 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6637
6638 let stub = self.0.stub.clone();
6639 let mut options = self.0.options.clone();
6640 options.set_retry_policy(gax::retry_policy::NeverRetry);
6641 let query = move |name| {
6642 let stub = stub.clone();
6643 let options = options.clone();
6644 async {
6645 let op = GetOperation::new(stub)
6646 .set_name(name)
6647 .with_options(options)
6648 .send()
6649 .await?;
6650 Ok(Operation::new(op))
6651 }
6652 };
6653
6654 let start = move || async {
6655 let op = self.send().await?;
6656 Ok(Operation::new(op))
6657 };
6658
6659 lro::internal::new_unit_response_poller(
6660 polling_error_policy,
6661 polling_backoff_policy,
6662 start,
6663 query,
6664 )
6665 }
6666
6667 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6671 self.0.request.name = v.into();
6672 self
6673 }
6674
6675 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6677 self.0.request.request_id = v.into();
6678 self
6679 }
6680 }
6681
6682 #[doc(hidden)]
6683 impl gax::options::internal::RequestBuilder for DeleteManagementDnsZoneBinding {
6684 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6685 &mut self.0.options
6686 }
6687 }
6688
6689 #[derive(Clone, Debug)]
6707 pub struct RepairManagementDnsZoneBinding(
6708 RequestBuilder<crate::model::RepairManagementDnsZoneBindingRequest>,
6709 );
6710
6711 impl RepairManagementDnsZoneBinding {
6712 pub(crate) fn new(
6713 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6714 ) -> Self {
6715 Self(RequestBuilder::new(stub))
6716 }
6717
6718 pub fn with_request<V: Into<crate::model::RepairManagementDnsZoneBindingRequest>>(
6720 mut self,
6721 v: V,
6722 ) -> Self {
6723 self.0.request = v.into();
6724 self
6725 }
6726
6727 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6729 self.0.options = v.into();
6730 self
6731 }
6732
6733 pub async fn send(self) -> Result<longrunning::model::Operation> {
6740 (*self.0.stub)
6741 .repair_management_dns_zone_binding(self.0.request, self.0.options)
6742 .await
6743 .map(gax::response::Response::into_body)
6744 }
6745
6746 pub fn poller(
6748 self,
6749 ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
6750 {
6751 type Operation = lro::internal::Operation<
6752 crate::model::ManagementDnsZoneBinding,
6753 crate::model::OperationMetadata,
6754 >;
6755 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6756 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6757
6758 let stub = self.0.stub.clone();
6759 let mut options = self.0.options.clone();
6760 options.set_retry_policy(gax::retry_policy::NeverRetry);
6761 let query = move |name| {
6762 let stub = stub.clone();
6763 let options = options.clone();
6764 async {
6765 let op = GetOperation::new(stub)
6766 .set_name(name)
6767 .with_options(options)
6768 .send()
6769 .await?;
6770 Ok(Operation::new(op))
6771 }
6772 };
6773
6774 let start = move || async {
6775 let op = self.send().await?;
6776 Ok(Operation::new(op))
6777 };
6778
6779 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6780 }
6781
6782 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6786 self.0.request.name = v.into();
6787 self
6788 }
6789
6790 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6792 self.0.request.request_id = v.into();
6793 self
6794 }
6795 }
6796
6797 #[doc(hidden)]
6798 impl gax::options::internal::RequestBuilder for RepairManagementDnsZoneBinding {
6799 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6800 &mut self.0.options
6801 }
6802 }
6803
6804 #[derive(Clone, Debug)]
6822 pub struct CreateVmwareEngineNetwork(
6823 RequestBuilder<crate::model::CreateVmwareEngineNetworkRequest>,
6824 );
6825
6826 impl CreateVmwareEngineNetwork {
6827 pub(crate) fn new(
6828 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6829 ) -> Self {
6830 Self(RequestBuilder::new(stub))
6831 }
6832
6833 pub fn with_request<V: Into<crate::model::CreateVmwareEngineNetworkRequest>>(
6835 mut self,
6836 v: V,
6837 ) -> Self {
6838 self.0.request = v.into();
6839 self
6840 }
6841
6842 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6844 self.0.options = v.into();
6845 self
6846 }
6847
6848 pub async fn send(self) -> Result<longrunning::model::Operation> {
6855 (*self.0.stub)
6856 .create_vmware_engine_network(self.0.request, self.0.options)
6857 .await
6858 .map(gax::response::Response::into_body)
6859 }
6860
6861 pub fn poller(
6863 self,
6864 ) -> impl lro::Poller<crate::model::VmwareEngineNetwork, crate::model::OperationMetadata>
6865 {
6866 type Operation = lro::internal::Operation<
6867 crate::model::VmwareEngineNetwork,
6868 crate::model::OperationMetadata,
6869 >;
6870 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6871 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6872
6873 let stub = self.0.stub.clone();
6874 let mut options = self.0.options.clone();
6875 options.set_retry_policy(gax::retry_policy::NeverRetry);
6876 let query = move |name| {
6877 let stub = stub.clone();
6878 let options = options.clone();
6879 async {
6880 let op = GetOperation::new(stub)
6881 .set_name(name)
6882 .with_options(options)
6883 .send()
6884 .await?;
6885 Ok(Operation::new(op))
6886 }
6887 };
6888
6889 let start = move || async {
6890 let op = self.send().await?;
6891 Ok(Operation::new(op))
6892 };
6893
6894 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6895 }
6896
6897 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6901 self.0.request.parent = v.into();
6902 self
6903 }
6904
6905 pub fn set_vmware_engine_network_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6909 self.0.request.vmware_engine_network_id = v.into();
6910 self
6911 }
6912
6913 pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
6917 where
6918 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
6919 {
6920 self.0.request.vmware_engine_network = std::option::Option::Some(v.into());
6921 self
6922 }
6923
6924 pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
6928 where
6929 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
6930 {
6931 self.0.request.vmware_engine_network = v.map(|x| x.into());
6932 self
6933 }
6934
6935 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6937 self.0.request.request_id = v.into();
6938 self
6939 }
6940 }
6941
6942 #[doc(hidden)]
6943 impl gax::options::internal::RequestBuilder for CreateVmwareEngineNetwork {
6944 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6945 &mut self.0.options
6946 }
6947 }
6948
6949 #[derive(Clone, Debug)]
6967 pub struct UpdateVmwareEngineNetwork(
6968 RequestBuilder<crate::model::UpdateVmwareEngineNetworkRequest>,
6969 );
6970
6971 impl UpdateVmwareEngineNetwork {
6972 pub(crate) fn new(
6973 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6974 ) -> Self {
6975 Self(RequestBuilder::new(stub))
6976 }
6977
6978 pub fn with_request<V: Into<crate::model::UpdateVmwareEngineNetworkRequest>>(
6980 mut self,
6981 v: V,
6982 ) -> Self {
6983 self.0.request = v.into();
6984 self
6985 }
6986
6987 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6989 self.0.options = v.into();
6990 self
6991 }
6992
6993 pub async fn send(self) -> Result<longrunning::model::Operation> {
7000 (*self.0.stub)
7001 .update_vmware_engine_network(self.0.request, self.0.options)
7002 .await
7003 .map(gax::response::Response::into_body)
7004 }
7005
7006 pub fn poller(
7008 self,
7009 ) -> impl lro::Poller<crate::model::VmwareEngineNetwork, crate::model::OperationMetadata>
7010 {
7011 type Operation = lro::internal::Operation<
7012 crate::model::VmwareEngineNetwork,
7013 crate::model::OperationMetadata,
7014 >;
7015 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7016 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7017
7018 let stub = self.0.stub.clone();
7019 let mut options = self.0.options.clone();
7020 options.set_retry_policy(gax::retry_policy::NeverRetry);
7021 let query = move |name| {
7022 let stub = stub.clone();
7023 let options = options.clone();
7024 async {
7025 let op = GetOperation::new(stub)
7026 .set_name(name)
7027 .with_options(options)
7028 .send()
7029 .await?;
7030 Ok(Operation::new(op))
7031 }
7032 };
7033
7034 let start = move || async {
7035 let op = self.send().await?;
7036 Ok(Operation::new(op))
7037 };
7038
7039 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7040 }
7041
7042 pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7046 where
7047 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7048 {
7049 self.0.request.vmware_engine_network = std::option::Option::Some(v.into());
7050 self
7051 }
7052
7053 pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7057 where
7058 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7059 {
7060 self.0.request.vmware_engine_network = v.map(|x| x.into());
7061 self
7062 }
7063
7064 pub fn set_update_mask<T>(mut self, v: T) -> Self
7068 where
7069 T: std::convert::Into<wkt::FieldMask>,
7070 {
7071 self.0.request.update_mask = std::option::Option::Some(v.into());
7072 self
7073 }
7074
7075 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7079 where
7080 T: std::convert::Into<wkt::FieldMask>,
7081 {
7082 self.0.request.update_mask = v.map(|x| x.into());
7083 self
7084 }
7085
7086 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7088 self.0.request.request_id = v.into();
7089 self
7090 }
7091 }
7092
7093 #[doc(hidden)]
7094 impl gax::options::internal::RequestBuilder for UpdateVmwareEngineNetwork {
7095 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7096 &mut self.0.options
7097 }
7098 }
7099
7100 #[derive(Clone, Debug)]
7118 pub struct DeleteVmwareEngineNetwork(
7119 RequestBuilder<crate::model::DeleteVmwareEngineNetworkRequest>,
7120 );
7121
7122 impl DeleteVmwareEngineNetwork {
7123 pub(crate) fn new(
7124 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7125 ) -> Self {
7126 Self(RequestBuilder::new(stub))
7127 }
7128
7129 pub fn with_request<V: Into<crate::model::DeleteVmwareEngineNetworkRequest>>(
7131 mut self,
7132 v: V,
7133 ) -> Self {
7134 self.0.request = v.into();
7135 self
7136 }
7137
7138 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7140 self.0.options = v.into();
7141 self
7142 }
7143
7144 pub async fn send(self) -> Result<longrunning::model::Operation> {
7151 (*self.0.stub)
7152 .delete_vmware_engine_network(self.0.request, self.0.options)
7153 .await
7154 .map(gax::response::Response::into_body)
7155 }
7156
7157 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
7159 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7160 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7161 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7162
7163 let stub = self.0.stub.clone();
7164 let mut options = self.0.options.clone();
7165 options.set_retry_policy(gax::retry_policy::NeverRetry);
7166 let query = move |name| {
7167 let stub = stub.clone();
7168 let options = options.clone();
7169 async {
7170 let op = GetOperation::new(stub)
7171 .set_name(name)
7172 .with_options(options)
7173 .send()
7174 .await?;
7175 Ok(Operation::new(op))
7176 }
7177 };
7178
7179 let start = move || async {
7180 let op = self.send().await?;
7181 Ok(Operation::new(op))
7182 };
7183
7184 lro::internal::new_unit_response_poller(
7185 polling_error_policy,
7186 polling_backoff_policy,
7187 start,
7188 query,
7189 )
7190 }
7191
7192 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7196 self.0.request.name = v.into();
7197 self
7198 }
7199
7200 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7202 self.0.request.request_id = v.into();
7203 self
7204 }
7205
7206 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7208 self.0.request.etag = v.into();
7209 self
7210 }
7211 }
7212
7213 #[doc(hidden)]
7214 impl gax::options::internal::RequestBuilder for DeleteVmwareEngineNetwork {
7215 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7216 &mut self.0.options
7217 }
7218 }
7219
7220 #[derive(Clone, Debug)]
7237 pub struct GetVmwareEngineNetwork(RequestBuilder<crate::model::GetVmwareEngineNetworkRequest>);
7238
7239 impl GetVmwareEngineNetwork {
7240 pub(crate) fn new(
7241 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7242 ) -> Self {
7243 Self(RequestBuilder::new(stub))
7244 }
7245
7246 pub fn with_request<V: Into<crate::model::GetVmwareEngineNetworkRequest>>(
7248 mut self,
7249 v: V,
7250 ) -> Self {
7251 self.0.request = v.into();
7252 self
7253 }
7254
7255 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7257 self.0.options = v.into();
7258 self
7259 }
7260
7261 pub async fn send(self) -> Result<crate::model::VmwareEngineNetwork> {
7263 (*self.0.stub)
7264 .get_vmware_engine_network(self.0.request, self.0.options)
7265 .await
7266 .map(gax::response::Response::into_body)
7267 }
7268
7269 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7273 self.0.request.name = v.into();
7274 self
7275 }
7276 }
7277
7278 #[doc(hidden)]
7279 impl gax::options::internal::RequestBuilder for GetVmwareEngineNetwork {
7280 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7281 &mut self.0.options
7282 }
7283 }
7284
7285 #[derive(Clone, Debug)]
7306 pub struct ListVmwareEngineNetworks(
7307 RequestBuilder<crate::model::ListVmwareEngineNetworksRequest>,
7308 );
7309
7310 impl ListVmwareEngineNetworks {
7311 pub(crate) fn new(
7312 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7313 ) -> Self {
7314 Self(RequestBuilder::new(stub))
7315 }
7316
7317 pub fn with_request<V: Into<crate::model::ListVmwareEngineNetworksRequest>>(
7319 mut self,
7320 v: V,
7321 ) -> Self {
7322 self.0.request = v.into();
7323 self
7324 }
7325
7326 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7328 self.0.options = v.into();
7329 self
7330 }
7331
7332 pub async fn send(self) -> Result<crate::model::ListVmwareEngineNetworksResponse> {
7334 (*self.0.stub)
7335 .list_vmware_engine_networks(self.0.request, self.0.options)
7336 .await
7337 .map(gax::response::Response::into_body)
7338 }
7339
7340 pub fn by_page(
7342 self,
7343 ) -> impl gax::paginator::Paginator<
7344 crate::model::ListVmwareEngineNetworksResponse,
7345 gax::error::Error,
7346 > {
7347 use std::clone::Clone;
7348 let token = self.0.request.page_token.clone();
7349 let execute = move |token: String| {
7350 let mut builder = self.clone();
7351 builder.0.request = builder.0.request.set_page_token(token);
7352 builder.send()
7353 };
7354 gax::paginator::internal::new_paginator(token, execute)
7355 }
7356
7357 pub fn by_item(
7359 self,
7360 ) -> impl gax::paginator::ItemPaginator<
7361 crate::model::ListVmwareEngineNetworksResponse,
7362 gax::error::Error,
7363 > {
7364 use gax::paginator::Paginator;
7365 self.by_page().items()
7366 }
7367
7368 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7372 self.0.request.parent = v.into();
7373 self
7374 }
7375
7376 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7378 self.0.request.page_size = v.into();
7379 self
7380 }
7381
7382 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7384 self.0.request.page_token = v.into();
7385 self
7386 }
7387
7388 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7390 self.0.request.filter = v.into();
7391 self
7392 }
7393
7394 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7396 self.0.request.order_by = v.into();
7397 self
7398 }
7399 }
7400
7401 #[doc(hidden)]
7402 impl gax::options::internal::RequestBuilder for ListVmwareEngineNetworks {
7403 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7404 &mut self.0.options
7405 }
7406 }
7407
7408 #[derive(Clone, Debug)]
7426 pub struct CreatePrivateConnection(
7427 RequestBuilder<crate::model::CreatePrivateConnectionRequest>,
7428 );
7429
7430 impl CreatePrivateConnection {
7431 pub(crate) fn new(
7432 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7433 ) -> Self {
7434 Self(RequestBuilder::new(stub))
7435 }
7436
7437 pub fn with_request<V: Into<crate::model::CreatePrivateConnectionRequest>>(
7439 mut self,
7440 v: V,
7441 ) -> Self {
7442 self.0.request = v.into();
7443 self
7444 }
7445
7446 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7448 self.0.options = v.into();
7449 self
7450 }
7451
7452 pub async fn send(self) -> Result<longrunning::model::Operation> {
7459 (*self.0.stub)
7460 .create_private_connection(self.0.request, self.0.options)
7461 .await
7462 .map(gax::response::Response::into_body)
7463 }
7464
7465 pub fn poller(
7467 self,
7468 ) -> impl lro::Poller<crate::model::PrivateConnection, crate::model::OperationMetadata>
7469 {
7470 type Operation = lro::internal::Operation<
7471 crate::model::PrivateConnection,
7472 crate::model::OperationMetadata,
7473 >;
7474 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7475 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7476
7477 let stub = self.0.stub.clone();
7478 let mut options = self.0.options.clone();
7479 options.set_retry_policy(gax::retry_policy::NeverRetry);
7480 let query = move |name| {
7481 let stub = stub.clone();
7482 let options = options.clone();
7483 async {
7484 let op = GetOperation::new(stub)
7485 .set_name(name)
7486 .with_options(options)
7487 .send()
7488 .await?;
7489 Ok(Operation::new(op))
7490 }
7491 };
7492
7493 let start = move || async {
7494 let op = self.send().await?;
7495 Ok(Operation::new(op))
7496 };
7497
7498 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7499 }
7500
7501 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7505 self.0.request.parent = v.into();
7506 self
7507 }
7508
7509 pub fn set_private_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7513 self.0.request.private_connection_id = v.into();
7514 self
7515 }
7516
7517 pub fn set_private_connection<T>(mut self, v: T) -> Self
7521 where
7522 T: std::convert::Into<crate::model::PrivateConnection>,
7523 {
7524 self.0.request.private_connection = std::option::Option::Some(v.into());
7525 self
7526 }
7527
7528 pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
7532 where
7533 T: std::convert::Into<crate::model::PrivateConnection>,
7534 {
7535 self.0.request.private_connection = v.map(|x| x.into());
7536 self
7537 }
7538
7539 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7541 self.0.request.request_id = v.into();
7542 self
7543 }
7544 }
7545
7546 #[doc(hidden)]
7547 impl gax::options::internal::RequestBuilder for CreatePrivateConnection {
7548 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7549 &mut self.0.options
7550 }
7551 }
7552
7553 #[derive(Clone, Debug)]
7570 pub struct GetPrivateConnection(RequestBuilder<crate::model::GetPrivateConnectionRequest>);
7571
7572 impl GetPrivateConnection {
7573 pub(crate) fn new(
7574 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7575 ) -> Self {
7576 Self(RequestBuilder::new(stub))
7577 }
7578
7579 pub fn with_request<V: Into<crate::model::GetPrivateConnectionRequest>>(
7581 mut self,
7582 v: V,
7583 ) -> Self {
7584 self.0.request = v.into();
7585 self
7586 }
7587
7588 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7590 self.0.options = v.into();
7591 self
7592 }
7593
7594 pub async fn send(self) -> Result<crate::model::PrivateConnection> {
7596 (*self.0.stub)
7597 .get_private_connection(self.0.request, self.0.options)
7598 .await
7599 .map(gax::response::Response::into_body)
7600 }
7601
7602 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7606 self.0.request.name = v.into();
7607 self
7608 }
7609 }
7610
7611 #[doc(hidden)]
7612 impl gax::options::internal::RequestBuilder for GetPrivateConnection {
7613 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7614 &mut self.0.options
7615 }
7616 }
7617
7618 #[derive(Clone, Debug)]
7639 pub struct ListPrivateConnections(RequestBuilder<crate::model::ListPrivateConnectionsRequest>);
7640
7641 impl ListPrivateConnections {
7642 pub(crate) fn new(
7643 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7644 ) -> Self {
7645 Self(RequestBuilder::new(stub))
7646 }
7647
7648 pub fn with_request<V: Into<crate::model::ListPrivateConnectionsRequest>>(
7650 mut self,
7651 v: V,
7652 ) -> Self {
7653 self.0.request = v.into();
7654 self
7655 }
7656
7657 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7659 self.0.options = v.into();
7660 self
7661 }
7662
7663 pub async fn send(self) -> Result<crate::model::ListPrivateConnectionsResponse> {
7665 (*self.0.stub)
7666 .list_private_connections(self.0.request, self.0.options)
7667 .await
7668 .map(gax::response::Response::into_body)
7669 }
7670
7671 pub fn by_page(
7673 self,
7674 ) -> impl gax::paginator::Paginator<
7675 crate::model::ListPrivateConnectionsResponse,
7676 gax::error::Error,
7677 > {
7678 use std::clone::Clone;
7679 let token = self.0.request.page_token.clone();
7680 let execute = move |token: String| {
7681 let mut builder = self.clone();
7682 builder.0.request = builder.0.request.set_page_token(token);
7683 builder.send()
7684 };
7685 gax::paginator::internal::new_paginator(token, execute)
7686 }
7687
7688 pub fn by_item(
7690 self,
7691 ) -> impl gax::paginator::ItemPaginator<
7692 crate::model::ListPrivateConnectionsResponse,
7693 gax::error::Error,
7694 > {
7695 use gax::paginator::Paginator;
7696 self.by_page().items()
7697 }
7698
7699 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7703 self.0.request.parent = v.into();
7704 self
7705 }
7706
7707 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7709 self.0.request.page_size = v.into();
7710 self
7711 }
7712
7713 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7715 self.0.request.page_token = v.into();
7716 self
7717 }
7718
7719 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7721 self.0.request.filter = v.into();
7722 self
7723 }
7724
7725 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7727 self.0.request.order_by = v.into();
7728 self
7729 }
7730 }
7731
7732 #[doc(hidden)]
7733 impl gax::options::internal::RequestBuilder for ListPrivateConnections {
7734 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7735 &mut self.0.options
7736 }
7737 }
7738
7739 #[derive(Clone, Debug)]
7757 pub struct UpdatePrivateConnection(
7758 RequestBuilder<crate::model::UpdatePrivateConnectionRequest>,
7759 );
7760
7761 impl UpdatePrivateConnection {
7762 pub(crate) fn new(
7763 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7764 ) -> Self {
7765 Self(RequestBuilder::new(stub))
7766 }
7767
7768 pub fn with_request<V: Into<crate::model::UpdatePrivateConnectionRequest>>(
7770 mut self,
7771 v: V,
7772 ) -> Self {
7773 self.0.request = v.into();
7774 self
7775 }
7776
7777 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7779 self.0.options = v.into();
7780 self
7781 }
7782
7783 pub async fn send(self) -> Result<longrunning::model::Operation> {
7790 (*self.0.stub)
7791 .update_private_connection(self.0.request, self.0.options)
7792 .await
7793 .map(gax::response::Response::into_body)
7794 }
7795
7796 pub fn poller(
7798 self,
7799 ) -> impl lro::Poller<crate::model::PrivateConnection, crate::model::OperationMetadata>
7800 {
7801 type Operation = lro::internal::Operation<
7802 crate::model::PrivateConnection,
7803 crate::model::OperationMetadata,
7804 >;
7805 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7806 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7807
7808 let stub = self.0.stub.clone();
7809 let mut options = self.0.options.clone();
7810 options.set_retry_policy(gax::retry_policy::NeverRetry);
7811 let query = move |name| {
7812 let stub = stub.clone();
7813 let options = options.clone();
7814 async {
7815 let op = GetOperation::new(stub)
7816 .set_name(name)
7817 .with_options(options)
7818 .send()
7819 .await?;
7820 Ok(Operation::new(op))
7821 }
7822 };
7823
7824 let start = move || async {
7825 let op = self.send().await?;
7826 Ok(Operation::new(op))
7827 };
7828
7829 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7830 }
7831
7832 pub fn set_private_connection<T>(mut self, v: T) -> Self
7836 where
7837 T: std::convert::Into<crate::model::PrivateConnection>,
7838 {
7839 self.0.request.private_connection = std::option::Option::Some(v.into());
7840 self
7841 }
7842
7843 pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
7847 where
7848 T: std::convert::Into<crate::model::PrivateConnection>,
7849 {
7850 self.0.request.private_connection = v.map(|x| x.into());
7851 self
7852 }
7853
7854 pub fn set_update_mask<T>(mut self, v: T) -> Self
7858 where
7859 T: std::convert::Into<wkt::FieldMask>,
7860 {
7861 self.0.request.update_mask = std::option::Option::Some(v.into());
7862 self
7863 }
7864
7865 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7869 where
7870 T: std::convert::Into<wkt::FieldMask>,
7871 {
7872 self.0.request.update_mask = v.map(|x| x.into());
7873 self
7874 }
7875
7876 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7878 self.0.request.request_id = v.into();
7879 self
7880 }
7881 }
7882
7883 #[doc(hidden)]
7884 impl gax::options::internal::RequestBuilder for UpdatePrivateConnection {
7885 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7886 &mut self.0.options
7887 }
7888 }
7889
7890 #[derive(Clone, Debug)]
7908 pub struct DeletePrivateConnection(
7909 RequestBuilder<crate::model::DeletePrivateConnectionRequest>,
7910 );
7911
7912 impl DeletePrivateConnection {
7913 pub(crate) fn new(
7914 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7915 ) -> Self {
7916 Self(RequestBuilder::new(stub))
7917 }
7918
7919 pub fn with_request<V: Into<crate::model::DeletePrivateConnectionRequest>>(
7921 mut self,
7922 v: V,
7923 ) -> Self {
7924 self.0.request = v.into();
7925 self
7926 }
7927
7928 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7930 self.0.options = v.into();
7931 self
7932 }
7933
7934 pub async fn send(self) -> Result<longrunning::model::Operation> {
7941 (*self.0.stub)
7942 .delete_private_connection(self.0.request, self.0.options)
7943 .await
7944 .map(gax::response::Response::into_body)
7945 }
7946
7947 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
7949 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7950 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7951 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7952
7953 let stub = self.0.stub.clone();
7954 let mut options = self.0.options.clone();
7955 options.set_retry_policy(gax::retry_policy::NeverRetry);
7956 let query = move |name| {
7957 let stub = stub.clone();
7958 let options = options.clone();
7959 async {
7960 let op = GetOperation::new(stub)
7961 .set_name(name)
7962 .with_options(options)
7963 .send()
7964 .await?;
7965 Ok(Operation::new(op))
7966 }
7967 };
7968
7969 let start = move || async {
7970 let op = self.send().await?;
7971 Ok(Operation::new(op))
7972 };
7973
7974 lro::internal::new_unit_response_poller(
7975 polling_error_policy,
7976 polling_backoff_policy,
7977 start,
7978 query,
7979 )
7980 }
7981
7982 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7986 self.0.request.name = v.into();
7987 self
7988 }
7989
7990 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7992 self.0.request.request_id = v.into();
7993 self
7994 }
7995 }
7996
7997 #[doc(hidden)]
7998 impl gax::options::internal::RequestBuilder for DeletePrivateConnection {
7999 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8000 &mut self.0.options
8001 }
8002 }
8003
8004 #[derive(Clone, Debug)]
8025 pub struct ListPrivateConnectionPeeringRoutes(
8026 RequestBuilder<crate::model::ListPrivateConnectionPeeringRoutesRequest>,
8027 );
8028
8029 impl ListPrivateConnectionPeeringRoutes {
8030 pub(crate) fn new(
8031 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8032 ) -> Self {
8033 Self(RequestBuilder::new(stub))
8034 }
8035
8036 pub fn with_request<V: Into<crate::model::ListPrivateConnectionPeeringRoutesRequest>>(
8038 mut self,
8039 v: V,
8040 ) -> Self {
8041 self.0.request = v.into();
8042 self
8043 }
8044
8045 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8047 self.0.options = v.into();
8048 self
8049 }
8050
8051 pub async fn send(
8053 self,
8054 ) -> Result<crate::model::ListPrivateConnectionPeeringRoutesResponse> {
8055 (*self.0.stub)
8056 .list_private_connection_peering_routes(self.0.request, self.0.options)
8057 .await
8058 .map(gax::response::Response::into_body)
8059 }
8060
8061 pub fn by_page(
8063 self,
8064 ) -> impl gax::paginator::Paginator<
8065 crate::model::ListPrivateConnectionPeeringRoutesResponse,
8066 gax::error::Error,
8067 > {
8068 use std::clone::Clone;
8069 let token = self.0.request.page_token.clone();
8070 let execute = move |token: String| {
8071 let mut builder = self.clone();
8072 builder.0.request = builder.0.request.set_page_token(token);
8073 builder.send()
8074 };
8075 gax::paginator::internal::new_paginator(token, execute)
8076 }
8077
8078 pub fn by_item(
8080 self,
8081 ) -> impl gax::paginator::ItemPaginator<
8082 crate::model::ListPrivateConnectionPeeringRoutesResponse,
8083 gax::error::Error,
8084 > {
8085 use gax::paginator::Paginator;
8086 self.by_page().items()
8087 }
8088
8089 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8093 self.0.request.parent = v.into();
8094 self
8095 }
8096
8097 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8099 self.0.request.page_size = v.into();
8100 self
8101 }
8102
8103 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8105 self.0.request.page_token = v.into();
8106 self
8107 }
8108 }
8109
8110 #[doc(hidden)]
8111 impl gax::options::internal::RequestBuilder for ListPrivateConnectionPeeringRoutes {
8112 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8113 &mut self.0.options
8114 }
8115 }
8116
8117 #[derive(Clone, Debug)]
8135 pub struct GrantDnsBindPermission(RequestBuilder<crate::model::GrantDnsBindPermissionRequest>);
8136
8137 impl GrantDnsBindPermission {
8138 pub(crate) fn new(
8139 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8140 ) -> Self {
8141 Self(RequestBuilder::new(stub))
8142 }
8143
8144 pub fn with_request<V: Into<crate::model::GrantDnsBindPermissionRequest>>(
8146 mut self,
8147 v: V,
8148 ) -> Self {
8149 self.0.request = v.into();
8150 self
8151 }
8152
8153 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8155 self.0.options = v.into();
8156 self
8157 }
8158
8159 pub async fn send(self) -> Result<longrunning::model::Operation> {
8166 (*self.0.stub)
8167 .grant_dns_bind_permission(self.0.request, self.0.options)
8168 .await
8169 .map(gax::response::Response::into_body)
8170 }
8171
8172 pub fn poller(
8174 self,
8175 ) -> impl lro::Poller<crate::model::DnsBindPermission, crate::model::OperationMetadata>
8176 {
8177 type Operation = lro::internal::Operation<
8178 crate::model::DnsBindPermission,
8179 crate::model::OperationMetadata,
8180 >;
8181 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8182 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8183
8184 let stub = self.0.stub.clone();
8185 let mut options = self.0.options.clone();
8186 options.set_retry_policy(gax::retry_policy::NeverRetry);
8187 let query = move |name| {
8188 let stub = stub.clone();
8189 let options = options.clone();
8190 async {
8191 let op = GetOperation::new(stub)
8192 .set_name(name)
8193 .with_options(options)
8194 .send()
8195 .await?;
8196 Ok(Operation::new(op))
8197 }
8198 };
8199
8200 let start = move || async {
8201 let op = self.send().await?;
8202 Ok(Operation::new(op))
8203 };
8204
8205 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
8206 }
8207
8208 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8212 self.0.request.name = v.into();
8213 self
8214 }
8215
8216 pub fn set_principal<T>(mut self, v: T) -> Self
8220 where
8221 T: std::convert::Into<crate::model::Principal>,
8222 {
8223 self.0.request.principal = std::option::Option::Some(v.into());
8224 self
8225 }
8226
8227 pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8231 where
8232 T: std::convert::Into<crate::model::Principal>,
8233 {
8234 self.0.request.principal = v.map(|x| x.into());
8235 self
8236 }
8237
8238 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8240 self.0.request.request_id = v.into();
8241 self
8242 }
8243 }
8244
8245 #[doc(hidden)]
8246 impl gax::options::internal::RequestBuilder for GrantDnsBindPermission {
8247 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8248 &mut self.0.options
8249 }
8250 }
8251
8252 #[derive(Clone, Debug)]
8269 pub struct GetDnsBindPermission(RequestBuilder<crate::model::GetDnsBindPermissionRequest>);
8270
8271 impl GetDnsBindPermission {
8272 pub(crate) fn new(
8273 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8274 ) -> Self {
8275 Self(RequestBuilder::new(stub))
8276 }
8277
8278 pub fn with_request<V: Into<crate::model::GetDnsBindPermissionRequest>>(
8280 mut self,
8281 v: V,
8282 ) -> Self {
8283 self.0.request = v.into();
8284 self
8285 }
8286
8287 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8289 self.0.options = v.into();
8290 self
8291 }
8292
8293 pub async fn send(self) -> Result<crate::model::DnsBindPermission> {
8295 (*self.0.stub)
8296 .get_dns_bind_permission(self.0.request, self.0.options)
8297 .await
8298 .map(gax::response::Response::into_body)
8299 }
8300
8301 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8305 self.0.request.name = v.into();
8306 self
8307 }
8308 }
8309
8310 #[doc(hidden)]
8311 impl gax::options::internal::RequestBuilder for GetDnsBindPermission {
8312 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8313 &mut self.0.options
8314 }
8315 }
8316
8317 #[derive(Clone, Debug)]
8335 pub struct RevokeDnsBindPermission(
8336 RequestBuilder<crate::model::RevokeDnsBindPermissionRequest>,
8337 );
8338
8339 impl RevokeDnsBindPermission {
8340 pub(crate) fn new(
8341 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8342 ) -> Self {
8343 Self(RequestBuilder::new(stub))
8344 }
8345
8346 pub fn with_request<V: Into<crate::model::RevokeDnsBindPermissionRequest>>(
8348 mut self,
8349 v: V,
8350 ) -> Self {
8351 self.0.request = v.into();
8352 self
8353 }
8354
8355 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8357 self.0.options = v.into();
8358 self
8359 }
8360
8361 pub async fn send(self) -> Result<longrunning::model::Operation> {
8368 (*self.0.stub)
8369 .revoke_dns_bind_permission(self.0.request, self.0.options)
8370 .await
8371 .map(gax::response::Response::into_body)
8372 }
8373
8374 pub fn poller(
8376 self,
8377 ) -> impl lro::Poller<crate::model::DnsBindPermission, crate::model::OperationMetadata>
8378 {
8379 type Operation = lro::internal::Operation<
8380 crate::model::DnsBindPermission,
8381 crate::model::OperationMetadata,
8382 >;
8383 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8384 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8385
8386 let stub = self.0.stub.clone();
8387 let mut options = self.0.options.clone();
8388 options.set_retry_policy(gax::retry_policy::NeverRetry);
8389 let query = move |name| {
8390 let stub = stub.clone();
8391 let options = options.clone();
8392 async {
8393 let op = GetOperation::new(stub)
8394 .set_name(name)
8395 .with_options(options)
8396 .send()
8397 .await?;
8398 Ok(Operation::new(op))
8399 }
8400 };
8401
8402 let start = move || async {
8403 let op = self.send().await?;
8404 Ok(Operation::new(op))
8405 };
8406
8407 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
8408 }
8409
8410 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8414 self.0.request.name = v.into();
8415 self
8416 }
8417
8418 pub fn set_principal<T>(mut self, v: T) -> Self
8422 where
8423 T: std::convert::Into<crate::model::Principal>,
8424 {
8425 self.0.request.principal = std::option::Option::Some(v.into());
8426 self
8427 }
8428
8429 pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8433 where
8434 T: std::convert::Into<crate::model::Principal>,
8435 {
8436 self.0.request.principal = v.map(|x| x.into());
8437 self
8438 }
8439
8440 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8442 self.0.request.request_id = v.into();
8443 self
8444 }
8445 }
8446
8447 #[doc(hidden)]
8448 impl gax::options::internal::RequestBuilder for RevokeDnsBindPermission {
8449 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8450 &mut self.0.options
8451 }
8452 }
8453
8454 #[derive(Clone, Debug)]
8475 pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
8476
8477 impl ListLocations {
8478 pub(crate) fn new(
8479 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8480 ) -> Self {
8481 Self(RequestBuilder::new(stub))
8482 }
8483
8484 pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
8486 mut self,
8487 v: V,
8488 ) -> Self {
8489 self.0.request = v.into();
8490 self
8491 }
8492
8493 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8495 self.0.options = v.into();
8496 self
8497 }
8498
8499 pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
8501 (*self.0.stub)
8502 .list_locations(self.0.request, self.0.options)
8503 .await
8504 .map(gax::response::Response::into_body)
8505 }
8506
8507 pub fn by_page(
8509 self,
8510 ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
8511 {
8512 use std::clone::Clone;
8513 let token = self.0.request.page_token.clone();
8514 let execute = move |token: String| {
8515 let mut builder = self.clone();
8516 builder.0.request = builder.0.request.set_page_token(token);
8517 builder.send()
8518 };
8519 gax::paginator::internal::new_paginator(token, execute)
8520 }
8521
8522 pub fn by_item(
8524 self,
8525 ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
8526 {
8527 use gax::paginator::Paginator;
8528 self.by_page().items()
8529 }
8530
8531 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8533 self.0.request.name = v.into();
8534 self
8535 }
8536
8537 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8539 self.0.request.filter = v.into();
8540 self
8541 }
8542
8543 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8545 self.0.request.page_size = v.into();
8546 self
8547 }
8548
8549 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8551 self.0.request.page_token = v.into();
8552 self
8553 }
8554 }
8555
8556 #[doc(hidden)]
8557 impl gax::options::internal::RequestBuilder for ListLocations {
8558 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8559 &mut self.0.options
8560 }
8561 }
8562
8563 #[derive(Clone, Debug)]
8580 pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
8581
8582 impl GetLocation {
8583 pub(crate) fn new(
8584 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8585 ) -> Self {
8586 Self(RequestBuilder::new(stub))
8587 }
8588
8589 pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
8591 self.0.request = v.into();
8592 self
8593 }
8594
8595 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8597 self.0.options = v.into();
8598 self
8599 }
8600
8601 pub async fn send(self) -> Result<location::model::Location> {
8603 (*self.0.stub)
8604 .get_location(self.0.request, self.0.options)
8605 .await
8606 .map(gax::response::Response::into_body)
8607 }
8608
8609 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8611 self.0.request.name = v.into();
8612 self
8613 }
8614 }
8615
8616 #[doc(hidden)]
8617 impl gax::options::internal::RequestBuilder for GetLocation {
8618 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8619 &mut self.0.options
8620 }
8621 }
8622
8623 #[derive(Clone, Debug)]
8640 pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
8641
8642 impl SetIamPolicy {
8643 pub(crate) fn new(
8644 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8645 ) -> Self {
8646 Self(RequestBuilder::new(stub))
8647 }
8648
8649 pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
8651 self.0.request = v.into();
8652 self
8653 }
8654
8655 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8657 self.0.options = v.into();
8658 self
8659 }
8660
8661 pub async fn send(self) -> Result<iam_v1::model::Policy> {
8663 (*self.0.stub)
8664 .set_iam_policy(self.0.request, self.0.options)
8665 .await
8666 .map(gax::response::Response::into_body)
8667 }
8668
8669 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8673 self.0.request.resource = v.into();
8674 self
8675 }
8676
8677 pub fn set_policy<T>(mut self, v: T) -> Self
8681 where
8682 T: std::convert::Into<iam_v1::model::Policy>,
8683 {
8684 self.0.request.policy = std::option::Option::Some(v.into());
8685 self
8686 }
8687
8688 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8692 where
8693 T: std::convert::Into<iam_v1::model::Policy>,
8694 {
8695 self.0.request.policy = v.map(|x| x.into());
8696 self
8697 }
8698
8699 pub fn set_update_mask<T>(mut self, v: T) -> Self
8701 where
8702 T: std::convert::Into<wkt::FieldMask>,
8703 {
8704 self.0.request.update_mask = std::option::Option::Some(v.into());
8705 self
8706 }
8707
8708 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8710 where
8711 T: std::convert::Into<wkt::FieldMask>,
8712 {
8713 self.0.request.update_mask = v.map(|x| x.into());
8714 self
8715 }
8716 }
8717
8718 #[doc(hidden)]
8719 impl gax::options::internal::RequestBuilder for SetIamPolicy {
8720 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8721 &mut self.0.options
8722 }
8723 }
8724
8725 #[derive(Clone, Debug)]
8742 pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
8743
8744 impl GetIamPolicy {
8745 pub(crate) fn new(
8746 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8747 ) -> Self {
8748 Self(RequestBuilder::new(stub))
8749 }
8750
8751 pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
8753 self.0.request = v.into();
8754 self
8755 }
8756
8757 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8759 self.0.options = v.into();
8760 self
8761 }
8762
8763 pub async fn send(self) -> Result<iam_v1::model::Policy> {
8765 (*self.0.stub)
8766 .get_iam_policy(self.0.request, self.0.options)
8767 .await
8768 .map(gax::response::Response::into_body)
8769 }
8770
8771 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8775 self.0.request.resource = v.into();
8776 self
8777 }
8778
8779 pub fn set_options<T>(mut self, v: T) -> Self
8781 where
8782 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
8783 {
8784 self.0.request.options = std::option::Option::Some(v.into());
8785 self
8786 }
8787
8788 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
8790 where
8791 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
8792 {
8793 self.0.request.options = v.map(|x| x.into());
8794 self
8795 }
8796 }
8797
8798 #[doc(hidden)]
8799 impl gax::options::internal::RequestBuilder for GetIamPolicy {
8800 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8801 &mut self.0.options
8802 }
8803 }
8804
8805 #[derive(Clone, Debug)]
8822 pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
8823
8824 impl TestIamPermissions {
8825 pub(crate) fn new(
8826 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8827 ) -> Self {
8828 Self(RequestBuilder::new(stub))
8829 }
8830
8831 pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
8833 mut self,
8834 v: V,
8835 ) -> Self {
8836 self.0.request = v.into();
8837 self
8838 }
8839
8840 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8842 self.0.options = v.into();
8843 self
8844 }
8845
8846 pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
8848 (*self.0.stub)
8849 .test_iam_permissions(self.0.request, self.0.options)
8850 .await
8851 .map(gax::response::Response::into_body)
8852 }
8853
8854 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8858 self.0.request.resource = v.into();
8859 self
8860 }
8861
8862 pub fn set_permissions<T, V>(mut self, v: T) -> Self
8866 where
8867 T: std::iter::IntoIterator<Item = V>,
8868 V: std::convert::Into<std::string::String>,
8869 {
8870 use std::iter::Iterator;
8871 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8872 self
8873 }
8874 }
8875
8876 #[doc(hidden)]
8877 impl gax::options::internal::RequestBuilder for TestIamPermissions {
8878 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8879 &mut self.0.options
8880 }
8881 }
8882
8883 #[derive(Clone, Debug)]
8904 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
8905
8906 impl ListOperations {
8907 pub(crate) fn new(
8908 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8909 ) -> Self {
8910 Self(RequestBuilder::new(stub))
8911 }
8912
8913 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
8915 mut self,
8916 v: V,
8917 ) -> Self {
8918 self.0.request = v.into();
8919 self
8920 }
8921
8922 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8924 self.0.options = v.into();
8925 self
8926 }
8927
8928 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
8930 (*self.0.stub)
8931 .list_operations(self.0.request, self.0.options)
8932 .await
8933 .map(gax::response::Response::into_body)
8934 }
8935
8936 pub fn by_page(
8938 self,
8939 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
8940 {
8941 use std::clone::Clone;
8942 let token = self.0.request.page_token.clone();
8943 let execute = move |token: String| {
8944 let mut builder = self.clone();
8945 builder.0.request = builder.0.request.set_page_token(token);
8946 builder.send()
8947 };
8948 gax::paginator::internal::new_paginator(token, execute)
8949 }
8950
8951 pub fn by_item(
8953 self,
8954 ) -> impl gax::paginator::ItemPaginator<
8955 longrunning::model::ListOperationsResponse,
8956 gax::error::Error,
8957 > {
8958 use gax::paginator::Paginator;
8959 self.by_page().items()
8960 }
8961
8962 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8964 self.0.request.name = v.into();
8965 self
8966 }
8967
8968 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8970 self.0.request.filter = v.into();
8971 self
8972 }
8973
8974 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8976 self.0.request.page_size = v.into();
8977 self
8978 }
8979
8980 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8982 self.0.request.page_token = v.into();
8983 self
8984 }
8985
8986 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8988 self.0.request.return_partial_success = v.into();
8989 self
8990 }
8991 }
8992
8993 #[doc(hidden)]
8994 impl gax::options::internal::RequestBuilder for ListOperations {
8995 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8996 &mut self.0.options
8997 }
8998 }
8999
9000 #[derive(Clone, Debug)]
9017 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
9018
9019 impl GetOperation {
9020 pub(crate) fn new(
9021 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9022 ) -> Self {
9023 Self(RequestBuilder::new(stub))
9024 }
9025
9026 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
9028 mut self,
9029 v: V,
9030 ) -> Self {
9031 self.0.request = v.into();
9032 self
9033 }
9034
9035 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9037 self.0.options = v.into();
9038 self
9039 }
9040
9041 pub async fn send(self) -> Result<longrunning::model::Operation> {
9043 (*self.0.stub)
9044 .get_operation(self.0.request, self.0.options)
9045 .await
9046 .map(gax::response::Response::into_body)
9047 }
9048
9049 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9051 self.0.request.name = v.into();
9052 self
9053 }
9054 }
9055
9056 #[doc(hidden)]
9057 impl gax::options::internal::RequestBuilder for GetOperation {
9058 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9059 &mut self.0.options
9060 }
9061 }
9062
9063 #[derive(Clone, Debug)]
9080 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
9081
9082 impl DeleteOperation {
9083 pub(crate) fn new(
9084 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9085 ) -> Self {
9086 Self(RequestBuilder::new(stub))
9087 }
9088
9089 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
9091 mut self,
9092 v: V,
9093 ) -> Self {
9094 self.0.request = v.into();
9095 self
9096 }
9097
9098 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9100 self.0.options = v.into();
9101 self
9102 }
9103
9104 pub async fn send(self) -> Result<()> {
9106 (*self.0.stub)
9107 .delete_operation(self.0.request, self.0.options)
9108 .await
9109 .map(gax::response::Response::into_body)
9110 }
9111
9112 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9114 self.0.request.name = v.into();
9115 self
9116 }
9117 }
9118
9119 #[doc(hidden)]
9120 impl gax::options::internal::RequestBuilder for DeleteOperation {
9121 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9122 &mut self.0.options
9123 }
9124 }
9125}