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)]
96 pub struct ListPrivateClouds(RequestBuilder<crate::model::ListPrivateCloudsRequest>);
97
98 impl ListPrivateClouds {
99 pub(crate) fn new(
100 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
101 ) -> Self {
102 Self(RequestBuilder::new(stub))
103 }
104
105 pub fn with_request<V: Into<crate::model::ListPrivateCloudsRequest>>(
107 mut self,
108 v: V,
109 ) -> Self {
110 self.0.request = v.into();
111 self
112 }
113
114 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
116 self.0.options = v.into();
117 self
118 }
119
120 pub async fn send(self) -> Result<crate::model::ListPrivateCloudsResponse> {
122 (*self.0.stub)
123 .list_private_clouds(self.0.request, self.0.options)
124 .await
125 .map(gax::response::Response::into_body)
126 }
127
128 pub fn by_page(
130 self,
131 ) -> impl gax::paginator::Paginator<crate::model::ListPrivateCloudsResponse, gax::error::Error>
132 {
133 use std::clone::Clone;
134 let token = self.0.request.page_token.clone();
135 let execute = move |token: String| {
136 let mut builder = self.clone();
137 builder.0.request = builder.0.request.set_page_token(token);
138 builder.send()
139 };
140 gax::paginator::internal::new_paginator(token, execute)
141 }
142
143 pub fn by_item(
145 self,
146 ) -> impl gax::paginator::ItemPaginator<crate::model::ListPrivateCloudsResponse, gax::error::Error>
147 {
148 use gax::paginator::Paginator;
149 self.by_page().items()
150 }
151
152 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
156 self.0.request.parent = v.into();
157 self
158 }
159
160 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
162 self.0.request.page_size = v.into();
163 self
164 }
165
166 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
168 self.0.request.page_token = v.into();
169 self
170 }
171
172 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
174 self.0.request.filter = v.into();
175 self
176 }
177
178 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
180 self.0.request.order_by = v.into();
181 self
182 }
183 }
184
185 #[doc(hidden)]
186 impl gax::options::internal::RequestBuilder for ListPrivateClouds {
187 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
188 &mut self.0.options
189 }
190 }
191
192 #[derive(Clone, Debug)]
210 pub struct GetPrivateCloud(RequestBuilder<crate::model::GetPrivateCloudRequest>);
211
212 impl GetPrivateCloud {
213 pub(crate) fn new(
214 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
215 ) -> Self {
216 Self(RequestBuilder::new(stub))
217 }
218
219 pub fn with_request<V: Into<crate::model::GetPrivateCloudRequest>>(mut self, v: V) -> Self {
221 self.0.request = v.into();
222 self
223 }
224
225 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
227 self.0.options = v.into();
228 self
229 }
230
231 pub async fn send(self) -> Result<crate::model::PrivateCloud> {
233 (*self.0.stub)
234 .get_private_cloud(self.0.request, self.0.options)
235 .await
236 .map(gax::response::Response::into_body)
237 }
238
239 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
243 self.0.request.name = v.into();
244 self
245 }
246 }
247
248 #[doc(hidden)]
249 impl gax::options::internal::RequestBuilder for GetPrivateCloud {
250 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
251 &mut self.0.options
252 }
253 }
254
255 #[derive(Clone, Debug)]
274 pub struct CreatePrivateCloud(RequestBuilder<crate::model::CreatePrivateCloudRequest>);
275
276 impl CreatePrivateCloud {
277 pub(crate) fn new(
278 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
279 ) -> Self {
280 Self(RequestBuilder::new(stub))
281 }
282
283 pub fn with_request<V: Into<crate::model::CreatePrivateCloudRequest>>(
285 mut self,
286 v: V,
287 ) -> Self {
288 self.0.request = v.into();
289 self
290 }
291
292 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
294 self.0.options = v.into();
295 self
296 }
297
298 pub async fn send(self) -> Result<longrunning::model::Operation> {
305 (*self.0.stub)
306 .create_private_cloud(self.0.request, self.0.options)
307 .await
308 .map(gax::response::Response::into_body)
309 }
310
311 pub fn poller(
313 self,
314 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
315 type Operation = lro::internal::Operation<
316 crate::model::PrivateCloud,
317 crate::model::OperationMetadata,
318 >;
319 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
320 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
321
322 let stub = self.0.stub.clone();
323 let mut options = self.0.options.clone();
324 options.set_retry_policy(gax::retry_policy::NeverRetry);
325 let query = move |name| {
326 let stub = stub.clone();
327 let options = options.clone();
328 async {
329 let op = GetOperation::new(stub)
330 .set_name(name)
331 .with_options(options)
332 .send()
333 .await?;
334 Ok(Operation::new(op))
335 }
336 };
337
338 let start = move || async {
339 let op = self.send().await?;
340 Ok(Operation::new(op))
341 };
342
343 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
344 }
345
346 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
350 self.0.request.parent = v.into();
351 self
352 }
353
354 pub fn set_private_cloud_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
358 self.0.request.private_cloud_id = v.into();
359 self
360 }
361
362 pub fn set_private_cloud<T>(mut self, v: T) -> Self
366 where
367 T: std::convert::Into<crate::model::PrivateCloud>,
368 {
369 self.0.request.private_cloud = std::option::Option::Some(v.into());
370 self
371 }
372
373 pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
377 where
378 T: std::convert::Into<crate::model::PrivateCloud>,
379 {
380 self.0.request.private_cloud = v.map(|x| x.into());
381 self
382 }
383
384 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
386 self.0.request.request_id = v.into();
387 self
388 }
389
390 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
392 self.0.request.validate_only = v.into();
393 self
394 }
395 }
396
397 #[doc(hidden)]
398 impl gax::options::internal::RequestBuilder for CreatePrivateCloud {
399 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
400 &mut self.0.options
401 }
402 }
403
404 #[derive(Clone, Debug)]
423 pub struct UpdatePrivateCloud(RequestBuilder<crate::model::UpdatePrivateCloudRequest>);
424
425 impl UpdatePrivateCloud {
426 pub(crate) fn new(
427 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
428 ) -> Self {
429 Self(RequestBuilder::new(stub))
430 }
431
432 pub fn with_request<V: Into<crate::model::UpdatePrivateCloudRequest>>(
434 mut self,
435 v: V,
436 ) -> Self {
437 self.0.request = v.into();
438 self
439 }
440
441 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
443 self.0.options = v.into();
444 self
445 }
446
447 pub async fn send(self) -> Result<longrunning::model::Operation> {
454 (*self.0.stub)
455 .update_private_cloud(self.0.request, self.0.options)
456 .await
457 .map(gax::response::Response::into_body)
458 }
459
460 pub fn poller(
462 self,
463 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
464 type Operation = lro::internal::Operation<
465 crate::model::PrivateCloud,
466 crate::model::OperationMetadata,
467 >;
468 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
469 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
470
471 let stub = self.0.stub.clone();
472 let mut options = self.0.options.clone();
473 options.set_retry_policy(gax::retry_policy::NeverRetry);
474 let query = move |name| {
475 let stub = stub.clone();
476 let options = options.clone();
477 async {
478 let op = GetOperation::new(stub)
479 .set_name(name)
480 .with_options(options)
481 .send()
482 .await?;
483 Ok(Operation::new(op))
484 }
485 };
486
487 let start = move || async {
488 let op = self.send().await?;
489 Ok(Operation::new(op))
490 };
491
492 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
493 }
494
495 pub fn set_private_cloud<T>(mut self, v: T) -> Self
499 where
500 T: std::convert::Into<crate::model::PrivateCloud>,
501 {
502 self.0.request.private_cloud = std::option::Option::Some(v.into());
503 self
504 }
505
506 pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
510 where
511 T: std::convert::Into<crate::model::PrivateCloud>,
512 {
513 self.0.request.private_cloud = v.map(|x| x.into());
514 self
515 }
516
517 pub fn set_update_mask<T>(mut self, v: T) -> Self
521 where
522 T: std::convert::Into<wkt::FieldMask>,
523 {
524 self.0.request.update_mask = std::option::Option::Some(v.into());
525 self
526 }
527
528 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
532 where
533 T: std::convert::Into<wkt::FieldMask>,
534 {
535 self.0.request.update_mask = v.map(|x| x.into());
536 self
537 }
538
539 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
541 self.0.request.request_id = v.into();
542 self
543 }
544 }
545
546 #[doc(hidden)]
547 impl gax::options::internal::RequestBuilder for UpdatePrivateCloud {
548 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
549 &mut self.0.options
550 }
551 }
552
553 #[derive(Clone, Debug)]
572 pub struct DeletePrivateCloud(RequestBuilder<crate::model::DeletePrivateCloudRequest>);
573
574 impl DeletePrivateCloud {
575 pub(crate) fn new(
576 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
577 ) -> Self {
578 Self(RequestBuilder::new(stub))
579 }
580
581 pub fn with_request<V: Into<crate::model::DeletePrivateCloudRequest>>(
583 mut self,
584 v: V,
585 ) -> Self {
586 self.0.request = v.into();
587 self
588 }
589
590 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
592 self.0.options = v.into();
593 self
594 }
595
596 pub async fn send(self) -> Result<longrunning::model::Operation> {
603 (*self.0.stub)
604 .delete_private_cloud(self.0.request, self.0.options)
605 .await
606 .map(gax::response::Response::into_body)
607 }
608
609 pub fn poller(
611 self,
612 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
613 type Operation = lro::internal::Operation<
614 crate::model::PrivateCloud,
615 crate::model::OperationMetadata,
616 >;
617 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
618 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
619
620 let stub = self.0.stub.clone();
621 let mut options = self.0.options.clone();
622 options.set_retry_policy(gax::retry_policy::NeverRetry);
623 let query = move |name| {
624 let stub = stub.clone();
625 let options = options.clone();
626 async {
627 let op = GetOperation::new(stub)
628 .set_name(name)
629 .with_options(options)
630 .send()
631 .await?;
632 Ok(Operation::new(op))
633 }
634 };
635
636 let start = move || async {
637 let op = self.send().await?;
638 Ok(Operation::new(op))
639 };
640
641 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
642 }
643
644 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
648 self.0.request.name = v.into();
649 self
650 }
651
652 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
654 self.0.request.request_id = v.into();
655 self
656 }
657
658 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
660 self.0.request.force = v.into();
661 self
662 }
663
664 pub fn set_delay_hours<T>(mut self, v: T) -> Self
666 where
667 T: std::convert::Into<i32>,
668 {
669 self.0.request.delay_hours = std::option::Option::Some(v.into());
670 self
671 }
672
673 pub fn set_or_clear_delay_hours<T>(mut self, v: std::option::Option<T>) -> Self
675 where
676 T: std::convert::Into<i32>,
677 {
678 self.0.request.delay_hours = v.map(|x| x.into());
679 self
680 }
681 }
682
683 #[doc(hidden)]
684 impl gax::options::internal::RequestBuilder for DeletePrivateCloud {
685 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
686 &mut self.0.options
687 }
688 }
689
690 #[derive(Clone, Debug)]
709 pub struct UndeletePrivateCloud(RequestBuilder<crate::model::UndeletePrivateCloudRequest>);
710
711 impl UndeletePrivateCloud {
712 pub(crate) fn new(
713 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
714 ) -> Self {
715 Self(RequestBuilder::new(stub))
716 }
717
718 pub fn with_request<V: Into<crate::model::UndeletePrivateCloudRequest>>(
720 mut self,
721 v: V,
722 ) -> Self {
723 self.0.request = v.into();
724 self
725 }
726
727 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
729 self.0.options = v.into();
730 self
731 }
732
733 pub async fn send(self) -> Result<longrunning::model::Operation> {
740 (*self.0.stub)
741 .undelete_private_cloud(self.0.request, self.0.options)
742 .await
743 .map(gax::response::Response::into_body)
744 }
745
746 pub fn poller(
748 self,
749 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
750 type Operation = lro::internal::Operation<
751 crate::model::PrivateCloud,
752 crate::model::OperationMetadata,
753 >;
754 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
755 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
756
757 let stub = self.0.stub.clone();
758 let mut options = self.0.options.clone();
759 options.set_retry_policy(gax::retry_policy::NeverRetry);
760 let query = move |name| {
761 let stub = stub.clone();
762 let options = options.clone();
763 async {
764 let op = GetOperation::new(stub)
765 .set_name(name)
766 .with_options(options)
767 .send()
768 .await?;
769 Ok(Operation::new(op))
770 }
771 };
772
773 let start = move || async {
774 let op = self.send().await?;
775 Ok(Operation::new(op))
776 };
777
778 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
779 }
780
781 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
785 self.0.request.name = v.into();
786 self
787 }
788
789 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
791 self.0.request.request_id = v.into();
792 self
793 }
794 }
795
796 #[doc(hidden)]
797 impl gax::options::internal::RequestBuilder for UndeletePrivateCloud {
798 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
799 &mut self.0.options
800 }
801 }
802
803 #[derive(Clone, Debug)]
825 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
826
827 impl ListClusters {
828 pub(crate) fn new(
829 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
830 ) -> Self {
831 Self(RequestBuilder::new(stub))
832 }
833
834 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
836 self.0.request = v.into();
837 self
838 }
839
840 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
842 self.0.options = v.into();
843 self
844 }
845
846 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
848 (*self.0.stub)
849 .list_clusters(self.0.request, self.0.options)
850 .await
851 .map(gax::response::Response::into_body)
852 }
853
854 pub fn by_page(
856 self,
857 ) -> impl gax::paginator::Paginator<crate::model::ListClustersResponse, gax::error::Error>
858 {
859 use std::clone::Clone;
860 let token = self.0.request.page_token.clone();
861 let execute = move |token: String| {
862 let mut builder = self.clone();
863 builder.0.request = builder.0.request.set_page_token(token);
864 builder.send()
865 };
866 gax::paginator::internal::new_paginator(token, execute)
867 }
868
869 pub fn by_item(
871 self,
872 ) -> impl gax::paginator::ItemPaginator<crate::model::ListClustersResponse, gax::error::Error>
873 {
874 use gax::paginator::Paginator;
875 self.by_page().items()
876 }
877
878 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
882 self.0.request.parent = v.into();
883 self
884 }
885
886 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
888 self.0.request.page_size = v.into();
889 self
890 }
891
892 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
894 self.0.request.page_token = v.into();
895 self
896 }
897
898 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
900 self.0.request.filter = v.into();
901 self
902 }
903
904 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
906 self.0.request.order_by = v.into();
907 self
908 }
909 }
910
911 #[doc(hidden)]
912 impl gax::options::internal::RequestBuilder for ListClusters {
913 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
914 &mut self.0.options
915 }
916 }
917
918 #[derive(Clone, Debug)]
936 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
937
938 impl GetCluster {
939 pub(crate) fn new(
940 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
941 ) -> Self {
942 Self(RequestBuilder::new(stub))
943 }
944
945 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
947 self.0.request = v.into();
948 self
949 }
950
951 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
953 self.0.options = v.into();
954 self
955 }
956
957 pub async fn send(self) -> Result<crate::model::Cluster> {
959 (*self.0.stub)
960 .get_cluster(self.0.request, self.0.options)
961 .await
962 .map(gax::response::Response::into_body)
963 }
964
965 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
969 self.0.request.name = v.into();
970 self
971 }
972 }
973
974 #[doc(hidden)]
975 impl gax::options::internal::RequestBuilder for GetCluster {
976 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
977 &mut self.0.options
978 }
979 }
980
981 #[derive(Clone, Debug)]
1000 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
1001
1002 impl CreateCluster {
1003 pub(crate) fn new(
1004 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1005 ) -> Self {
1006 Self(RequestBuilder::new(stub))
1007 }
1008
1009 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
1011 self.0.request = v.into();
1012 self
1013 }
1014
1015 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1017 self.0.options = v.into();
1018 self
1019 }
1020
1021 pub async fn send(self) -> Result<longrunning::model::Operation> {
1028 (*self.0.stub)
1029 .create_cluster(self.0.request, self.0.options)
1030 .await
1031 .map(gax::response::Response::into_body)
1032 }
1033
1034 pub fn poller(
1036 self,
1037 ) -> impl lro::Poller<crate::model::Cluster, crate::model::OperationMetadata> {
1038 type Operation =
1039 lro::internal::Operation<crate::model::Cluster, crate::model::OperationMetadata>;
1040 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1041 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1042
1043 let stub = self.0.stub.clone();
1044 let mut options = self.0.options.clone();
1045 options.set_retry_policy(gax::retry_policy::NeverRetry);
1046 let query = move |name| {
1047 let stub = stub.clone();
1048 let options = options.clone();
1049 async {
1050 let op = GetOperation::new(stub)
1051 .set_name(name)
1052 .with_options(options)
1053 .send()
1054 .await?;
1055 Ok(Operation::new(op))
1056 }
1057 };
1058
1059 let start = move || async {
1060 let op = self.send().await?;
1061 Ok(Operation::new(op))
1062 };
1063
1064 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1065 }
1066
1067 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1071 self.0.request.parent = v.into();
1072 self
1073 }
1074
1075 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1079 self.0.request.cluster_id = v.into();
1080 self
1081 }
1082
1083 pub fn set_cluster<T>(mut self, v: T) -> Self
1087 where
1088 T: std::convert::Into<crate::model::Cluster>,
1089 {
1090 self.0.request.cluster = std::option::Option::Some(v.into());
1091 self
1092 }
1093
1094 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1098 where
1099 T: std::convert::Into<crate::model::Cluster>,
1100 {
1101 self.0.request.cluster = v.map(|x| x.into());
1102 self
1103 }
1104
1105 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1107 self.0.request.request_id = v.into();
1108 self
1109 }
1110
1111 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1113 self.0.request.validate_only = v.into();
1114 self
1115 }
1116 }
1117
1118 #[doc(hidden)]
1119 impl gax::options::internal::RequestBuilder for CreateCluster {
1120 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1121 &mut self.0.options
1122 }
1123 }
1124
1125 #[derive(Clone, Debug)]
1144 pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
1145
1146 impl UpdateCluster {
1147 pub(crate) fn new(
1148 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1149 ) -> Self {
1150 Self(RequestBuilder::new(stub))
1151 }
1152
1153 pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
1155 self.0.request = v.into();
1156 self
1157 }
1158
1159 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1161 self.0.options = v.into();
1162 self
1163 }
1164
1165 pub async fn send(self) -> Result<longrunning::model::Operation> {
1172 (*self.0.stub)
1173 .update_cluster(self.0.request, self.0.options)
1174 .await
1175 .map(gax::response::Response::into_body)
1176 }
1177
1178 pub fn poller(
1180 self,
1181 ) -> impl lro::Poller<crate::model::Cluster, crate::model::OperationMetadata> {
1182 type Operation =
1183 lro::internal::Operation<crate::model::Cluster, crate::model::OperationMetadata>;
1184 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1185 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1186
1187 let stub = self.0.stub.clone();
1188 let mut options = self.0.options.clone();
1189 options.set_retry_policy(gax::retry_policy::NeverRetry);
1190 let query = move |name| {
1191 let stub = stub.clone();
1192 let options = options.clone();
1193 async {
1194 let op = GetOperation::new(stub)
1195 .set_name(name)
1196 .with_options(options)
1197 .send()
1198 .await?;
1199 Ok(Operation::new(op))
1200 }
1201 };
1202
1203 let start = move || async {
1204 let op = self.send().await?;
1205 Ok(Operation::new(op))
1206 };
1207
1208 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1209 }
1210
1211 pub fn set_update_mask<T>(mut self, v: T) -> Self
1215 where
1216 T: std::convert::Into<wkt::FieldMask>,
1217 {
1218 self.0.request.update_mask = std::option::Option::Some(v.into());
1219 self
1220 }
1221
1222 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1226 where
1227 T: std::convert::Into<wkt::FieldMask>,
1228 {
1229 self.0.request.update_mask = v.map(|x| x.into());
1230 self
1231 }
1232
1233 pub fn set_cluster<T>(mut self, v: T) -> Self
1237 where
1238 T: std::convert::Into<crate::model::Cluster>,
1239 {
1240 self.0.request.cluster = std::option::Option::Some(v.into());
1241 self
1242 }
1243
1244 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1248 where
1249 T: std::convert::Into<crate::model::Cluster>,
1250 {
1251 self.0.request.cluster = v.map(|x| x.into());
1252 self
1253 }
1254
1255 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1257 self.0.request.request_id = v.into();
1258 self
1259 }
1260
1261 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1263 self.0.request.validate_only = v.into();
1264 self
1265 }
1266 }
1267
1268 #[doc(hidden)]
1269 impl gax::options::internal::RequestBuilder for UpdateCluster {
1270 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1271 &mut self.0.options
1272 }
1273 }
1274
1275 #[derive(Clone, Debug)]
1294 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1295
1296 impl DeleteCluster {
1297 pub(crate) fn new(
1298 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1299 ) -> Self {
1300 Self(RequestBuilder::new(stub))
1301 }
1302
1303 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1305 self.0.request = v.into();
1306 self
1307 }
1308
1309 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1311 self.0.options = v.into();
1312 self
1313 }
1314
1315 pub async fn send(self) -> Result<longrunning::model::Operation> {
1322 (*self.0.stub)
1323 .delete_cluster(self.0.request, self.0.options)
1324 .await
1325 .map(gax::response::Response::into_body)
1326 }
1327
1328 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
1330 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1331 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1332 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1333
1334 let stub = self.0.stub.clone();
1335 let mut options = self.0.options.clone();
1336 options.set_retry_policy(gax::retry_policy::NeverRetry);
1337 let query = move |name| {
1338 let stub = stub.clone();
1339 let options = options.clone();
1340 async {
1341 let op = GetOperation::new(stub)
1342 .set_name(name)
1343 .with_options(options)
1344 .send()
1345 .await?;
1346 Ok(Operation::new(op))
1347 }
1348 };
1349
1350 let start = move || async {
1351 let op = self.send().await?;
1352 Ok(Operation::new(op))
1353 };
1354
1355 lro::internal::new_unit_response_poller(
1356 polling_error_policy,
1357 polling_backoff_policy,
1358 start,
1359 query,
1360 )
1361 }
1362
1363 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1367 self.0.request.name = v.into();
1368 self
1369 }
1370
1371 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1373 self.0.request.request_id = v.into();
1374 self
1375 }
1376 }
1377
1378 #[doc(hidden)]
1379 impl gax::options::internal::RequestBuilder for DeleteCluster {
1380 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1381 &mut self.0.options
1382 }
1383 }
1384
1385 #[derive(Clone, Debug)]
1407 pub struct ListNodes(RequestBuilder<crate::model::ListNodesRequest>);
1408
1409 impl ListNodes {
1410 pub(crate) fn new(
1411 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1412 ) -> Self {
1413 Self(RequestBuilder::new(stub))
1414 }
1415
1416 pub fn with_request<V: Into<crate::model::ListNodesRequest>>(mut self, v: V) -> Self {
1418 self.0.request = v.into();
1419 self
1420 }
1421
1422 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1424 self.0.options = v.into();
1425 self
1426 }
1427
1428 pub async fn send(self) -> Result<crate::model::ListNodesResponse> {
1430 (*self.0.stub)
1431 .list_nodes(self.0.request, self.0.options)
1432 .await
1433 .map(gax::response::Response::into_body)
1434 }
1435
1436 pub fn by_page(
1438 self,
1439 ) -> impl gax::paginator::Paginator<crate::model::ListNodesResponse, gax::error::Error>
1440 {
1441 use std::clone::Clone;
1442 let token = self.0.request.page_token.clone();
1443 let execute = move |token: String| {
1444 let mut builder = self.clone();
1445 builder.0.request = builder.0.request.set_page_token(token);
1446 builder.send()
1447 };
1448 gax::paginator::internal::new_paginator(token, execute)
1449 }
1450
1451 pub fn by_item(
1453 self,
1454 ) -> impl gax::paginator::ItemPaginator<crate::model::ListNodesResponse, gax::error::Error>
1455 {
1456 use gax::paginator::Paginator;
1457 self.by_page().items()
1458 }
1459
1460 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1464 self.0.request.parent = v.into();
1465 self
1466 }
1467
1468 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1470 self.0.request.page_size = v.into();
1471 self
1472 }
1473
1474 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1476 self.0.request.page_token = v.into();
1477 self
1478 }
1479 }
1480
1481 #[doc(hidden)]
1482 impl gax::options::internal::RequestBuilder for ListNodes {
1483 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1484 &mut self.0.options
1485 }
1486 }
1487
1488 #[derive(Clone, Debug)]
1506 pub struct GetNode(RequestBuilder<crate::model::GetNodeRequest>);
1507
1508 impl GetNode {
1509 pub(crate) fn new(
1510 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1511 ) -> Self {
1512 Self(RequestBuilder::new(stub))
1513 }
1514
1515 pub fn with_request<V: Into<crate::model::GetNodeRequest>>(mut self, v: V) -> Self {
1517 self.0.request = v.into();
1518 self
1519 }
1520
1521 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1523 self.0.options = v.into();
1524 self
1525 }
1526
1527 pub async fn send(self) -> Result<crate::model::Node> {
1529 (*self.0.stub)
1530 .get_node(self.0.request, self.0.options)
1531 .await
1532 .map(gax::response::Response::into_body)
1533 }
1534
1535 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1539 self.0.request.name = v.into();
1540 self
1541 }
1542 }
1543
1544 #[doc(hidden)]
1545 impl gax::options::internal::RequestBuilder for GetNode {
1546 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1547 &mut self.0.options
1548 }
1549 }
1550
1551 #[derive(Clone, Debug)]
1573 pub struct ListExternalAddresses(RequestBuilder<crate::model::ListExternalAddressesRequest>);
1574
1575 impl ListExternalAddresses {
1576 pub(crate) fn new(
1577 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1578 ) -> Self {
1579 Self(RequestBuilder::new(stub))
1580 }
1581
1582 pub fn with_request<V: Into<crate::model::ListExternalAddressesRequest>>(
1584 mut self,
1585 v: V,
1586 ) -> Self {
1587 self.0.request = v.into();
1588 self
1589 }
1590
1591 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1593 self.0.options = v.into();
1594 self
1595 }
1596
1597 pub async fn send(self) -> Result<crate::model::ListExternalAddressesResponse> {
1599 (*self.0.stub)
1600 .list_external_addresses(self.0.request, self.0.options)
1601 .await
1602 .map(gax::response::Response::into_body)
1603 }
1604
1605 pub fn by_page(
1607 self,
1608 ) -> impl gax::paginator::Paginator<crate::model::ListExternalAddressesResponse, gax::error::Error>
1609 {
1610 use std::clone::Clone;
1611 let token = self.0.request.page_token.clone();
1612 let execute = move |token: String| {
1613 let mut builder = self.clone();
1614 builder.0.request = builder.0.request.set_page_token(token);
1615 builder.send()
1616 };
1617 gax::paginator::internal::new_paginator(token, execute)
1618 }
1619
1620 pub fn by_item(
1622 self,
1623 ) -> impl gax::paginator::ItemPaginator<
1624 crate::model::ListExternalAddressesResponse,
1625 gax::error::Error,
1626 > {
1627 use gax::paginator::Paginator;
1628 self.by_page().items()
1629 }
1630
1631 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1635 self.0.request.parent = v.into();
1636 self
1637 }
1638
1639 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1641 self.0.request.page_size = v.into();
1642 self
1643 }
1644
1645 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1647 self.0.request.page_token = v.into();
1648 self
1649 }
1650
1651 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1653 self.0.request.filter = v.into();
1654 self
1655 }
1656
1657 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1659 self.0.request.order_by = v.into();
1660 self
1661 }
1662 }
1663
1664 #[doc(hidden)]
1665 impl gax::options::internal::RequestBuilder for ListExternalAddresses {
1666 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1667 &mut self.0.options
1668 }
1669 }
1670
1671 #[derive(Clone, Debug)]
1693 pub struct FetchNetworkPolicyExternalAddresses(
1694 RequestBuilder<crate::model::FetchNetworkPolicyExternalAddressesRequest>,
1695 );
1696
1697 impl FetchNetworkPolicyExternalAddresses {
1698 pub(crate) fn new(
1699 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1700 ) -> Self {
1701 Self(RequestBuilder::new(stub))
1702 }
1703
1704 pub fn with_request<V: Into<crate::model::FetchNetworkPolicyExternalAddressesRequest>>(
1706 mut self,
1707 v: V,
1708 ) -> Self {
1709 self.0.request = v.into();
1710 self
1711 }
1712
1713 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1715 self.0.options = v.into();
1716 self
1717 }
1718
1719 pub async fn send(
1721 self,
1722 ) -> Result<crate::model::FetchNetworkPolicyExternalAddressesResponse> {
1723 (*self.0.stub)
1724 .fetch_network_policy_external_addresses(self.0.request, self.0.options)
1725 .await
1726 .map(gax::response::Response::into_body)
1727 }
1728
1729 pub fn by_page(
1731 self,
1732 ) -> impl gax::paginator::Paginator<
1733 crate::model::FetchNetworkPolicyExternalAddressesResponse,
1734 gax::error::Error,
1735 > {
1736 use std::clone::Clone;
1737 let token = self.0.request.page_token.clone();
1738 let execute = move |token: String| {
1739 let mut builder = self.clone();
1740 builder.0.request = builder.0.request.set_page_token(token);
1741 builder.send()
1742 };
1743 gax::paginator::internal::new_paginator(token, execute)
1744 }
1745
1746 pub fn by_item(
1748 self,
1749 ) -> impl gax::paginator::ItemPaginator<
1750 crate::model::FetchNetworkPolicyExternalAddressesResponse,
1751 gax::error::Error,
1752 > {
1753 use gax::paginator::Paginator;
1754 self.by_page().items()
1755 }
1756
1757 pub fn set_network_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
1761 self.0.request.network_policy = v.into();
1762 self
1763 }
1764
1765 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1767 self.0.request.page_size = v.into();
1768 self
1769 }
1770
1771 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1773 self.0.request.page_token = v.into();
1774 self
1775 }
1776 }
1777
1778 #[doc(hidden)]
1779 impl gax::options::internal::RequestBuilder for FetchNetworkPolicyExternalAddresses {
1780 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1781 &mut self.0.options
1782 }
1783 }
1784
1785 #[derive(Clone, Debug)]
1803 pub struct GetExternalAddress(RequestBuilder<crate::model::GetExternalAddressRequest>);
1804
1805 impl GetExternalAddress {
1806 pub(crate) fn new(
1807 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1808 ) -> Self {
1809 Self(RequestBuilder::new(stub))
1810 }
1811
1812 pub fn with_request<V: Into<crate::model::GetExternalAddressRequest>>(
1814 mut self,
1815 v: V,
1816 ) -> Self {
1817 self.0.request = v.into();
1818 self
1819 }
1820
1821 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1823 self.0.options = v.into();
1824 self
1825 }
1826
1827 pub async fn send(self) -> Result<crate::model::ExternalAddress> {
1829 (*self.0.stub)
1830 .get_external_address(self.0.request, self.0.options)
1831 .await
1832 .map(gax::response::Response::into_body)
1833 }
1834
1835 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1839 self.0.request.name = v.into();
1840 self
1841 }
1842 }
1843
1844 #[doc(hidden)]
1845 impl gax::options::internal::RequestBuilder for GetExternalAddress {
1846 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1847 &mut self.0.options
1848 }
1849 }
1850
1851 #[derive(Clone, Debug)]
1870 pub struct CreateExternalAddress(RequestBuilder<crate::model::CreateExternalAddressRequest>);
1871
1872 impl CreateExternalAddress {
1873 pub(crate) fn new(
1874 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1875 ) -> Self {
1876 Self(RequestBuilder::new(stub))
1877 }
1878
1879 pub fn with_request<V: Into<crate::model::CreateExternalAddressRequest>>(
1881 mut self,
1882 v: V,
1883 ) -> Self {
1884 self.0.request = v.into();
1885 self
1886 }
1887
1888 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1890 self.0.options = v.into();
1891 self
1892 }
1893
1894 pub async fn send(self) -> Result<longrunning::model::Operation> {
1901 (*self.0.stub)
1902 .create_external_address(self.0.request, self.0.options)
1903 .await
1904 .map(gax::response::Response::into_body)
1905 }
1906
1907 pub fn poller(
1909 self,
1910 ) -> impl lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
1911 {
1912 type Operation = lro::internal::Operation<
1913 crate::model::ExternalAddress,
1914 crate::model::OperationMetadata,
1915 >;
1916 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1917 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1918
1919 let stub = self.0.stub.clone();
1920 let mut options = self.0.options.clone();
1921 options.set_retry_policy(gax::retry_policy::NeverRetry);
1922 let query = move |name| {
1923 let stub = stub.clone();
1924 let options = options.clone();
1925 async {
1926 let op = GetOperation::new(stub)
1927 .set_name(name)
1928 .with_options(options)
1929 .send()
1930 .await?;
1931 Ok(Operation::new(op))
1932 }
1933 };
1934
1935 let start = move || async {
1936 let op = self.send().await?;
1937 Ok(Operation::new(op))
1938 };
1939
1940 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1941 }
1942
1943 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1947 self.0.request.parent = v.into();
1948 self
1949 }
1950
1951 pub fn set_external_address<T>(mut self, v: T) -> Self
1955 where
1956 T: std::convert::Into<crate::model::ExternalAddress>,
1957 {
1958 self.0.request.external_address = std::option::Option::Some(v.into());
1959 self
1960 }
1961
1962 pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
1966 where
1967 T: std::convert::Into<crate::model::ExternalAddress>,
1968 {
1969 self.0.request.external_address = v.map(|x| x.into());
1970 self
1971 }
1972
1973 pub fn set_external_address_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1977 self.0.request.external_address_id = v.into();
1978 self
1979 }
1980
1981 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1983 self.0.request.request_id = v.into();
1984 self
1985 }
1986 }
1987
1988 #[doc(hidden)]
1989 impl gax::options::internal::RequestBuilder for CreateExternalAddress {
1990 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1991 &mut self.0.options
1992 }
1993 }
1994
1995 #[derive(Clone, Debug)]
2014 pub struct UpdateExternalAddress(RequestBuilder<crate::model::UpdateExternalAddressRequest>);
2015
2016 impl UpdateExternalAddress {
2017 pub(crate) fn new(
2018 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2019 ) -> Self {
2020 Self(RequestBuilder::new(stub))
2021 }
2022
2023 pub fn with_request<V: Into<crate::model::UpdateExternalAddressRequest>>(
2025 mut self,
2026 v: V,
2027 ) -> Self {
2028 self.0.request = v.into();
2029 self
2030 }
2031
2032 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2034 self.0.options = v.into();
2035 self
2036 }
2037
2038 pub async fn send(self) -> Result<longrunning::model::Operation> {
2045 (*self.0.stub)
2046 .update_external_address(self.0.request, self.0.options)
2047 .await
2048 .map(gax::response::Response::into_body)
2049 }
2050
2051 pub fn poller(
2053 self,
2054 ) -> impl lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
2055 {
2056 type Operation = lro::internal::Operation<
2057 crate::model::ExternalAddress,
2058 crate::model::OperationMetadata,
2059 >;
2060 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2061 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2062
2063 let stub = self.0.stub.clone();
2064 let mut options = self.0.options.clone();
2065 options.set_retry_policy(gax::retry_policy::NeverRetry);
2066 let query = move |name| {
2067 let stub = stub.clone();
2068 let options = options.clone();
2069 async {
2070 let op = GetOperation::new(stub)
2071 .set_name(name)
2072 .with_options(options)
2073 .send()
2074 .await?;
2075 Ok(Operation::new(op))
2076 }
2077 };
2078
2079 let start = move || async {
2080 let op = self.send().await?;
2081 Ok(Operation::new(op))
2082 };
2083
2084 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2085 }
2086
2087 pub fn set_update_mask<T>(mut self, v: T) -> Self
2091 where
2092 T: std::convert::Into<wkt::FieldMask>,
2093 {
2094 self.0.request.update_mask = std::option::Option::Some(v.into());
2095 self
2096 }
2097
2098 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2102 where
2103 T: std::convert::Into<wkt::FieldMask>,
2104 {
2105 self.0.request.update_mask = v.map(|x| x.into());
2106 self
2107 }
2108
2109 pub fn set_external_address<T>(mut self, v: T) -> Self
2113 where
2114 T: std::convert::Into<crate::model::ExternalAddress>,
2115 {
2116 self.0.request.external_address = std::option::Option::Some(v.into());
2117 self
2118 }
2119
2120 pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2124 where
2125 T: std::convert::Into<crate::model::ExternalAddress>,
2126 {
2127 self.0.request.external_address = v.map(|x| x.into());
2128 self
2129 }
2130
2131 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2133 self.0.request.request_id = v.into();
2134 self
2135 }
2136 }
2137
2138 #[doc(hidden)]
2139 impl gax::options::internal::RequestBuilder for UpdateExternalAddress {
2140 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2141 &mut self.0.options
2142 }
2143 }
2144
2145 #[derive(Clone, Debug)]
2164 pub struct DeleteExternalAddress(RequestBuilder<crate::model::DeleteExternalAddressRequest>);
2165
2166 impl DeleteExternalAddress {
2167 pub(crate) fn new(
2168 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2169 ) -> Self {
2170 Self(RequestBuilder::new(stub))
2171 }
2172
2173 pub fn with_request<V: Into<crate::model::DeleteExternalAddressRequest>>(
2175 mut self,
2176 v: V,
2177 ) -> Self {
2178 self.0.request = v.into();
2179 self
2180 }
2181
2182 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2184 self.0.options = v.into();
2185 self
2186 }
2187
2188 pub async fn send(self) -> Result<longrunning::model::Operation> {
2195 (*self.0.stub)
2196 .delete_external_address(self.0.request, self.0.options)
2197 .await
2198 .map(gax::response::Response::into_body)
2199 }
2200
2201 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
2203 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2204 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2205 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2206
2207 let stub = self.0.stub.clone();
2208 let mut options = self.0.options.clone();
2209 options.set_retry_policy(gax::retry_policy::NeverRetry);
2210 let query = move |name| {
2211 let stub = stub.clone();
2212 let options = options.clone();
2213 async {
2214 let op = GetOperation::new(stub)
2215 .set_name(name)
2216 .with_options(options)
2217 .send()
2218 .await?;
2219 Ok(Operation::new(op))
2220 }
2221 };
2222
2223 let start = move || async {
2224 let op = self.send().await?;
2225 Ok(Operation::new(op))
2226 };
2227
2228 lro::internal::new_unit_response_poller(
2229 polling_error_policy,
2230 polling_backoff_policy,
2231 start,
2232 query,
2233 )
2234 }
2235
2236 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2240 self.0.request.name = v.into();
2241 self
2242 }
2243
2244 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2246 self.0.request.request_id = v.into();
2247 self
2248 }
2249 }
2250
2251 #[doc(hidden)]
2252 impl gax::options::internal::RequestBuilder for DeleteExternalAddress {
2253 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2254 &mut self.0.options
2255 }
2256 }
2257
2258 #[derive(Clone, Debug)]
2280 pub struct ListSubnets(RequestBuilder<crate::model::ListSubnetsRequest>);
2281
2282 impl ListSubnets {
2283 pub(crate) fn new(
2284 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2285 ) -> Self {
2286 Self(RequestBuilder::new(stub))
2287 }
2288
2289 pub fn with_request<V: Into<crate::model::ListSubnetsRequest>>(mut self, v: V) -> Self {
2291 self.0.request = v.into();
2292 self
2293 }
2294
2295 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2297 self.0.options = v.into();
2298 self
2299 }
2300
2301 pub async fn send(self) -> Result<crate::model::ListSubnetsResponse> {
2303 (*self.0.stub)
2304 .list_subnets(self.0.request, self.0.options)
2305 .await
2306 .map(gax::response::Response::into_body)
2307 }
2308
2309 pub fn by_page(
2311 self,
2312 ) -> impl gax::paginator::Paginator<crate::model::ListSubnetsResponse, gax::error::Error>
2313 {
2314 use std::clone::Clone;
2315 let token = self.0.request.page_token.clone();
2316 let execute = move |token: String| {
2317 let mut builder = self.clone();
2318 builder.0.request = builder.0.request.set_page_token(token);
2319 builder.send()
2320 };
2321 gax::paginator::internal::new_paginator(token, execute)
2322 }
2323
2324 pub fn by_item(
2326 self,
2327 ) -> impl gax::paginator::ItemPaginator<crate::model::ListSubnetsResponse, gax::error::Error>
2328 {
2329 use gax::paginator::Paginator;
2330 self.by_page().items()
2331 }
2332
2333 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2337 self.0.request.parent = v.into();
2338 self
2339 }
2340
2341 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2343 self.0.request.page_size = v.into();
2344 self
2345 }
2346
2347 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2349 self.0.request.page_token = v.into();
2350 self
2351 }
2352 }
2353
2354 #[doc(hidden)]
2355 impl gax::options::internal::RequestBuilder for ListSubnets {
2356 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2357 &mut self.0.options
2358 }
2359 }
2360
2361 #[derive(Clone, Debug)]
2379 pub struct GetSubnet(RequestBuilder<crate::model::GetSubnetRequest>);
2380
2381 impl GetSubnet {
2382 pub(crate) fn new(
2383 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2384 ) -> Self {
2385 Self(RequestBuilder::new(stub))
2386 }
2387
2388 pub fn with_request<V: Into<crate::model::GetSubnetRequest>>(mut self, v: V) -> Self {
2390 self.0.request = v.into();
2391 self
2392 }
2393
2394 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2396 self.0.options = v.into();
2397 self
2398 }
2399
2400 pub async fn send(self) -> Result<crate::model::Subnet> {
2402 (*self.0.stub)
2403 .get_subnet(self.0.request, self.0.options)
2404 .await
2405 .map(gax::response::Response::into_body)
2406 }
2407
2408 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2412 self.0.request.name = v.into();
2413 self
2414 }
2415 }
2416
2417 #[doc(hidden)]
2418 impl gax::options::internal::RequestBuilder for GetSubnet {
2419 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2420 &mut self.0.options
2421 }
2422 }
2423
2424 #[derive(Clone, Debug)]
2443 pub struct UpdateSubnet(RequestBuilder<crate::model::UpdateSubnetRequest>);
2444
2445 impl UpdateSubnet {
2446 pub(crate) fn new(
2447 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2448 ) -> Self {
2449 Self(RequestBuilder::new(stub))
2450 }
2451
2452 pub fn with_request<V: Into<crate::model::UpdateSubnetRequest>>(mut self, v: V) -> Self {
2454 self.0.request = v.into();
2455 self
2456 }
2457
2458 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2460 self.0.options = v.into();
2461 self
2462 }
2463
2464 pub async fn send(self) -> Result<longrunning::model::Operation> {
2471 (*self.0.stub)
2472 .update_subnet(self.0.request, self.0.options)
2473 .await
2474 .map(gax::response::Response::into_body)
2475 }
2476
2477 pub fn poller(
2479 self,
2480 ) -> impl lro::Poller<crate::model::Subnet, crate::model::OperationMetadata> {
2481 type Operation =
2482 lro::internal::Operation<crate::model::Subnet, crate::model::OperationMetadata>;
2483 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2484 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2485
2486 let stub = self.0.stub.clone();
2487 let mut options = self.0.options.clone();
2488 options.set_retry_policy(gax::retry_policy::NeverRetry);
2489 let query = move |name| {
2490 let stub = stub.clone();
2491 let options = options.clone();
2492 async {
2493 let op = GetOperation::new(stub)
2494 .set_name(name)
2495 .with_options(options)
2496 .send()
2497 .await?;
2498 Ok(Operation::new(op))
2499 }
2500 };
2501
2502 let start = move || async {
2503 let op = self.send().await?;
2504 Ok(Operation::new(op))
2505 };
2506
2507 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2508 }
2509
2510 pub fn set_update_mask<T>(mut self, v: T) -> Self
2514 where
2515 T: std::convert::Into<wkt::FieldMask>,
2516 {
2517 self.0.request.update_mask = std::option::Option::Some(v.into());
2518 self
2519 }
2520
2521 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2525 where
2526 T: std::convert::Into<wkt::FieldMask>,
2527 {
2528 self.0.request.update_mask = v.map(|x| x.into());
2529 self
2530 }
2531
2532 pub fn set_subnet<T>(mut self, v: T) -> Self
2536 where
2537 T: std::convert::Into<crate::model::Subnet>,
2538 {
2539 self.0.request.subnet = std::option::Option::Some(v.into());
2540 self
2541 }
2542
2543 pub fn set_or_clear_subnet<T>(mut self, v: std::option::Option<T>) -> Self
2547 where
2548 T: std::convert::Into<crate::model::Subnet>,
2549 {
2550 self.0.request.subnet = v.map(|x| x.into());
2551 self
2552 }
2553 }
2554
2555 #[doc(hidden)]
2556 impl gax::options::internal::RequestBuilder for UpdateSubnet {
2557 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2558 &mut self.0.options
2559 }
2560 }
2561
2562 #[derive(Clone, Debug)]
2584 pub struct ListExternalAccessRules(
2585 RequestBuilder<crate::model::ListExternalAccessRulesRequest>,
2586 );
2587
2588 impl ListExternalAccessRules {
2589 pub(crate) fn new(
2590 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2591 ) -> Self {
2592 Self(RequestBuilder::new(stub))
2593 }
2594
2595 pub fn with_request<V: Into<crate::model::ListExternalAccessRulesRequest>>(
2597 mut self,
2598 v: V,
2599 ) -> Self {
2600 self.0.request = v.into();
2601 self
2602 }
2603
2604 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2606 self.0.options = v.into();
2607 self
2608 }
2609
2610 pub async fn send(self) -> Result<crate::model::ListExternalAccessRulesResponse> {
2612 (*self.0.stub)
2613 .list_external_access_rules(self.0.request, self.0.options)
2614 .await
2615 .map(gax::response::Response::into_body)
2616 }
2617
2618 pub fn by_page(
2620 self,
2621 ) -> impl gax::paginator::Paginator<
2622 crate::model::ListExternalAccessRulesResponse,
2623 gax::error::Error,
2624 > {
2625 use std::clone::Clone;
2626 let token = self.0.request.page_token.clone();
2627 let execute = move |token: String| {
2628 let mut builder = self.clone();
2629 builder.0.request = builder.0.request.set_page_token(token);
2630 builder.send()
2631 };
2632 gax::paginator::internal::new_paginator(token, execute)
2633 }
2634
2635 pub fn by_item(
2637 self,
2638 ) -> impl gax::paginator::ItemPaginator<
2639 crate::model::ListExternalAccessRulesResponse,
2640 gax::error::Error,
2641 > {
2642 use gax::paginator::Paginator;
2643 self.by_page().items()
2644 }
2645
2646 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2650 self.0.request.parent = v.into();
2651 self
2652 }
2653
2654 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2656 self.0.request.page_size = v.into();
2657 self
2658 }
2659
2660 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2662 self.0.request.page_token = v.into();
2663 self
2664 }
2665
2666 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2668 self.0.request.filter = v.into();
2669 self
2670 }
2671
2672 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2674 self.0.request.order_by = v.into();
2675 self
2676 }
2677 }
2678
2679 #[doc(hidden)]
2680 impl gax::options::internal::RequestBuilder for ListExternalAccessRules {
2681 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2682 &mut self.0.options
2683 }
2684 }
2685
2686 #[derive(Clone, Debug)]
2704 pub struct GetExternalAccessRule(RequestBuilder<crate::model::GetExternalAccessRuleRequest>);
2705
2706 impl GetExternalAccessRule {
2707 pub(crate) fn new(
2708 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2709 ) -> Self {
2710 Self(RequestBuilder::new(stub))
2711 }
2712
2713 pub fn with_request<V: Into<crate::model::GetExternalAccessRuleRequest>>(
2715 mut self,
2716 v: V,
2717 ) -> Self {
2718 self.0.request = v.into();
2719 self
2720 }
2721
2722 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2724 self.0.options = v.into();
2725 self
2726 }
2727
2728 pub async fn send(self) -> Result<crate::model::ExternalAccessRule> {
2730 (*self.0.stub)
2731 .get_external_access_rule(self.0.request, self.0.options)
2732 .await
2733 .map(gax::response::Response::into_body)
2734 }
2735
2736 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2740 self.0.request.name = v.into();
2741 self
2742 }
2743 }
2744
2745 #[doc(hidden)]
2746 impl gax::options::internal::RequestBuilder for GetExternalAccessRule {
2747 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2748 &mut self.0.options
2749 }
2750 }
2751
2752 #[derive(Clone, Debug)]
2771 pub struct CreateExternalAccessRule(
2772 RequestBuilder<crate::model::CreateExternalAccessRuleRequest>,
2773 );
2774
2775 impl CreateExternalAccessRule {
2776 pub(crate) fn new(
2777 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2778 ) -> Self {
2779 Self(RequestBuilder::new(stub))
2780 }
2781
2782 pub fn with_request<V: Into<crate::model::CreateExternalAccessRuleRequest>>(
2784 mut self,
2785 v: V,
2786 ) -> Self {
2787 self.0.request = v.into();
2788 self
2789 }
2790
2791 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2793 self.0.options = v.into();
2794 self
2795 }
2796
2797 pub async fn send(self) -> Result<longrunning::model::Operation> {
2804 (*self.0.stub)
2805 .create_external_access_rule(self.0.request, self.0.options)
2806 .await
2807 .map(gax::response::Response::into_body)
2808 }
2809
2810 pub fn poller(
2812 self,
2813 ) -> impl lro::Poller<crate::model::ExternalAccessRule, crate::model::OperationMetadata>
2814 {
2815 type Operation = lro::internal::Operation<
2816 crate::model::ExternalAccessRule,
2817 crate::model::OperationMetadata,
2818 >;
2819 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2820 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2821
2822 let stub = self.0.stub.clone();
2823 let mut options = self.0.options.clone();
2824 options.set_retry_policy(gax::retry_policy::NeverRetry);
2825 let query = move |name| {
2826 let stub = stub.clone();
2827 let options = options.clone();
2828 async {
2829 let op = GetOperation::new(stub)
2830 .set_name(name)
2831 .with_options(options)
2832 .send()
2833 .await?;
2834 Ok(Operation::new(op))
2835 }
2836 };
2837
2838 let start = move || async {
2839 let op = self.send().await?;
2840 Ok(Operation::new(op))
2841 };
2842
2843 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2844 }
2845
2846 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2850 self.0.request.parent = v.into();
2851 self
2852 }
2853
2854 pub fn set_external_access_rule<T>(mut self, v: T) -> Self
2858 where
2859 T: std::convert::Into<crate::model::ExternalAccessRule>,
2860 {
2861 self.0.request.external_access_rule = std::option::Option::Some(v.into());
2862 self
2863 }
2864
2865 pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
2869 where
2870 T: std::convert::Into<crate::model::ExternalAccessRule>,
2871 {
2872 self.0.request.external_access_rule = v.map(|x| x.into());
2873 self
2874 }
2875
2876 pub fn set_external_access_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2880 self.0.request.external_access_rule_id = v.into();
2881 self
2882 }
2883
2884 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2886 self.0.request.request_id = v.into();
2887 self
2888 }
2889 }
2890
2891 #[doc(hidden)]
2892 impl gax::options::internal::RequestBuilder for CreateExternalAccessRule {
2893 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2894 &mut self.0.options
2895 }
2896 }
2897
2898 #[derive(Clone, Debug)]
2917 pub struct UpdateExternalAccessRule(
2918 RequestBuilder<crate::model::UpdateExternalAccessRuleRequest>,
2919 );
2920
2921 impl UpdateExternalAccessRule {
2922 pub(crate) fn new(
2923 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2924 ) -> Self {
2925 Self(RequestBuilder::new(stub))
2926 }
2927
2928 pub fn with_request<V: Into<crate::model::UpdateExternalAccessRuleRequest>>(
2930 mut self,
2931 v: V,
2932 ) -> Self {
2933 self.0.request = v.into();
2934 self
2935 }
2936
2937 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2939 self.0.options = v.into();
2940 self
2941 }
2942
2943 pub async fn send(self) -> Result<longrunning::model::Operation> {
2950 (*self.0.stub)
2951 .update_external_access_rule(self.0.request, self.0.options)
2952 .await
2953 .map(gax::response::Response::into_body)
2954 }
2955
2956 pub fn poller(
2958 self,
2959 ) -> impl lro::Poller<crate::model::ExternalAccessRule, crate::model::OperationMetadata>
2960 {
2961 type Operation = lro::internal::Operation<
2962 crate::model::ExternalAccessRule,
2963 crate::model::OperationMetadata,
2964 >;
2965 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2966 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2967
2968 let stub = self.0.stub.clone();
2969 let mut options = self.0.options.clone();
2970 options.set_retry_policy(gax::retry_policy::NeverRetry);
2971 let query = move |name| {
2972 let stub = stub.clone();
2973 let options = options.clone();
2974 async {
2975 let op = GetOperation::new(stub)
2976 .set_name(name)
2977 .with_options(options)
2978 .send()
2979 .await?;
2980 Ok(Operation::new(op))
2981 }
2982 };
2983
2984 let start = move || async {
2985 let op = self.send().await?;
2986 Ok(Operation::new(op))
2987 };
2988
2989 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2990 }
2991
2992 pub fn set_update_mask<T>(mut self, v: T) -> Self
2996 where
2997 T: std::convert::Into<wkt::FieldMask>,
2998 {
2999 self.0.request.update_mask = std::option::Option::Some(v.into());
3000 self
3001 }
3002
3003 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3007 where
3008 T: std::convert::Into<wkt::FieldMask>,
3009 {
3010 self.0.request.update_mask = v.map(|x| x.into());
3011 self
3012 }
3013
3014 pub fn set_external_access_rule<T>(mut self, v: T) -> Self
3018 where
3019 T: std::convert::Into<crate::model::ExternalAccessRule>,
3020 {
3021 self.0.request.external_access_rule = std::option::Option::Some(v.into());
3022 self
3023 }
3024
3025 pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
3029 where
3030 T: std::convert::Into<crate::model::ExternalAccessRule>,
3031 {
3032 self.0.request.external_access_rule = v.map(|x| x.into());
3033 self
3034 }
3035
3036 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3038 self.0.request.request_id = v.into();
3039 self
3040 }
3041 }
3042
3043 #[doc(hidden)]
3044 impl gax::options::internal::RequestBuilder for UpdateExternalAccessRule {
3045 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3046 &mut self.0.options
3047 }
3048 }
3049
3050 #[derive(Clone, Debug)]
3069 pub struct DeleteExternalAccessRule(
3070 RequestBuilder<crate::model::DeleteExternalAccessRuleRequest>,
3071 );
3072
3073 impl DeleteExternalAccessRule {
3074 pub(crate) fn new(
3075 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3076 ) -> Self {
3077 Self(RequestBuilder::new(stub))
3078 }
3079
3080 pub fn with_request<V: Into<crate::model::DeleteExternalAccessRuleRequest>>(
3082 mut self,
3083 v: V,
3084 ) -> Self {
3085 self.0.request = v.into();
3086 self
3087 }
3088
3089 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3091 self.0.options = v.into();
3092 self
3093 }
3094
3095 pub async fn send(self) -> Result<longrunning::model::Operation> {
3102 (*self.0.stub)
3103 .delete_external_access_rule(self.0.request, self.0.options)
3104 .await
3105 .map(gax::response::Response::into_body)
3106 }
3107
3108 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3110 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3111 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3112 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3113
3114 let stub = self.0.stub.clone();
3115 let mut options = self.0.options.clone();
3116 options.set_retry_policy(gax::retry_policy::NeverRetry);
3117 let query = move |name| {
3118 let stub = stub.clone();
3119 let options = options.clone();
3120 async {
3121 let op = GetOperation::new(stub)
3122 .set_name(name)
3123 .with_options(options)
3124 .send()
3125 .await?;
3126 Ok(Operation::new(op))
3127 }
3128 };
3129
3130 let start = move || async {
3131 let op = self.send().await?;
3132 Ok(Operation::new(op))
3133 };
3134
3135 lro::internal::new_unit_response_poller(
3136 polling_error_policy,
3137 polling_backoff_policy,
3138 start,
3139 query,
3140 )
3141 }
3142
3143 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3147 self.0.request.name = v.into();
3148 self
3149 }
3150
3151 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3153 self.0.request.request_id = v.into();
3154 self
3155 }
3156 }
3157
3158 #[doc(hidden)]
3159 impl gax::options::internal::RequestBuilder for DeleteExternalAccessRule {
3160 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3161 &mut self.0.options
3162 }
3163 }
3164
3165 #[derive(Clone, Debug)]
3187 pub struct ListLoggingServers(RequestBuilder<crate::model::ListLoggingServersRequest>);
3188
3189 impl ListLoggingServers {
3190 pub(crate) fn new(
3191 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3192 ) -> Self {
3193 Self(RequestBuilder::new(stub))
3194 }
3195
3196 pub fn with_request<V: Into<crate::model::ListLoggingServersRequest>>(
3198 mut self,
3199 v: V,
3200 ) -> Self {
3201 self.0.request = v.into();
3202 self
3203 }
3204
3205 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3207 self.0.options = v.into();
3208 self
3209 }
3210
3211 pub async fn send(self) -> Result<crate::model::ListLoggingServersResponse> {
3213 (*self.0.stub)
3214 .list_logging_servers(self.0.request, self.0.options)
3215 .await
3216 .map(gax::response::Response::into_body)
3217 }
3218
3219 pub fn by_page(
3221 self,
3222 ) -> impl gax::paginator::Paginator<crate::model::ListLoggingServersResponse, gax::error::Error>
3223 {
3224 use std::clone::Clone;
3225 let token = self.0.request.page_token.clone();
3226 let execute = move |token: String| {
3227 let mut builder = self.clone();
3228 builder.0.request = builder.0.request.set_page_token(token);
3229 builder.send()
3230 };
3231 gax::paginator::internal::new_paginator(token, execute)
3232 }
3233
3234 pub fn by_item(
3236 self,
3237 ) -> impl gax::paginator::ItemPaginator<
3238 crate::model::ListLoggingServersResponse,
3239 gax::error::Error,
3240 > {
3241 use gax::paginator::Paginator;
3242 self.by_page().items()
3243 }
3244
3245 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3249 self.0.request.parent = v.into();
3250 self
3251 }
3252
3253 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3255 self.0.request.page_size = v.into();
3256 self
3257 }
3258
3259 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3261 self.0.request.page_token = v.into();
3262 self
3263 }
3264
3265 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3267 self.0.request.filter = v.into();
3268 self
3269 }
3270
3271 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3273 self.0.request.order_by = v.into();
3274 self
3275 }
3276 }
3277
3278 #[doc(hidden)]
3279 impl gax::options::internal::RequestBuilder for ListLoggingServers {
3280 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3281 &mut self.0.options
3282 }
3283 }
3284
3285 #[derive(Clone, Debug)]
3303 pub struct GetLoggingServer(RequestBuilder<crate::model::GetLoggingServerRequest>);
3304
3305 impl GetLoggingServer {
3306 pub(crate) fn new(
3307 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3308 ) -> Self {
3309 Self(RequestBuilder::new(stub))
3310 }
3311
3312 pub fn with_request<V: Into<crate::model::GetLoggingServerRequest>>(
3314 mut self,
3315 v: V,
3316 ) -> Self {
3317 self.0.request = v.into();
3318 self
3319 }
3320
3321 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3323 self.0.options = v.into();
3324 self
3325 }
3326
3327 pub async fn send(self) -> Result<crate::model::LoggingServer> {
3329 (*self.0.stub)
3330 .get_logging_server(self.0.request, self.0.options)
3331 .await
3332 .map(gax::response::Response::into_body)
3333 }
3334
3335 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3339 self.0.request.name = v.into();
3340 self
3341 }
3342 }
3343
3344 #[doc(hidden)]
3345 impl gax::options::internal::RequestBuilder for GetLoggingServer {
3346 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3347 &mut self.0.options
3348 }
3349 }
3350
3351 #[derive(Clone, Debug)]
3370 pub struct CreateLoggingServer(RequestBuilder<crate::model::CreateLoggingServerRequest>);
3371
3372 impl CreateLoggingServer {
3373 pub(crate) fn new(
3374 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3375 ) -> Self {
3376 Self(RequestBuilder::new(stub))
3377 }
3378
3379 pub fn with_request<V: Into<crate::model::CreateLoggingServerRequest>>(
3381 mut self,
3382 v: V,
3383 ) -> Self {
3384 self.0.request = v.into();
3385 self
3386 }
3387
3388 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3390 self.0.options = v.into();
3391 self
3392 }
3393
3394 pub async fn send(self) -> Result<longrunning::model::Operation> {
3401 (*self.0.stub)
3402 .create_logging_server(self.0.request, self.0.options)
3403 .await
3404 .map(gax::response::Response::into_body)
3405 }
3406
3407 pub fn poller(
3409 self,
3410 ) -> impl lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3411 {
3412 type Operation = lro::internal::Operation<
3413 crate::model::LoggingServer,
3414 crate::model::OperationMetadata,
3415 >;
3416 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3417 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3418
3419 let stub = self.0.stub.clone();
3420 let mut options = self.0.options.clone();
3421 options.set_retry_policy(gax::retry_policy::NeverRetry);
3422 let query = move |name| {
3423 let stub = stub.clone();
3424 let options = options.clone();
3425 async {
3426 let op = GetOperation::new(stub)
3427 .set_name(name)
3428 .with_options(options)
3429 .send()
3430 .await?;
3431 Ok(Operation::new(op))
3432 }
3433 };
3434
3435 let start = move || async {
3436 let op = self.send().await?;
3437 Ok(Operation::new(op))
3438 };
3439
3440 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3441 }
3442
3443 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3447 self.0.request.parent = v.into();
3448 self
3449 }
3450
3451 pub fn set_logging_server<T>(mut self, v: T) -> Self
3455 where
3456 T: std::convert::Into<crate::model::LoggingServer>,
3457 {
3458 self.0.request.logging_server = std::option::Option::Some(v.into());
3459 self
3460 }
3461
3462 pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3466 where
3467 T: std::convert::Into<crate::model::LoggingServer>,
3468 {
3469 self.0.request.logging_server = v.map(|x| x.into());
3470 self
3471 }
3472
3473 pub fn set_logging_server_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3477 self.0.request.logging_server_id = v.into();
3478 self
3479 }
3480
3481 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3483 self.0.request.request_id = v.into();
3484 self
3485 }
3486 }
3487
3488 #[doc(hidden)]
3489 impl gax::options::internal::RequestBuilder for CreateLoggingServer {
3490 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3491 &mut self.0.options
3492 }
3493 }
3494
3495 #[derive(Clone, Debug)]
3514 pub struct UpdateLoggingServer(RequestBuilder<crate::model::UpdateLoggingServerRequest>);
3515
3516 impl UpdateLoggingServer {
3517 pub(crate) fn new(
3518 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3519 ) -> Self {
3520 Self(RequestBuilder::new(stub))
3521 }
3522
3523 pub fn with_request<V: Into<crate::model::UpdateLoggingServerRequest>>(
3525 mut self,
3526 v: V,
3527 ) -> Self {
3528 self.0.request = v.into();
3529 self
3530 }
3531
3532 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3534 self.0.options = v.into();
3535 self
3536 }
3537
3538 pub async fn send(self) -> Result<longrunning::model::Operation> {
3545 (*self.0.stub)
3546 .update_logging_server(self.0.request, self.0.options)
3547 .await
3548 .map(gax::response::Response::into_body)
3549 }
3550
3551 pub fn poller(
3553 self,
3554 ) -> impl lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3555 {
3556 type Operation = lro::internal::Operation<
3557 crate::model::LoggingServer,
3558 crate::model::OperationMetadata,
3559 >;
3560 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3561 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3562
3563 let stub = self.0.stub.clone();
3564 let mut options = self.0.options.clone();
3565 options.set_retry_policy(gax::retry_policy::NeverRetry);
3566 let query = move |name| {
3567 let stub = stub.clone();
3568 let options = options.clone();
3569 async {
3570 let op = GetOperation::new(stub)
3571 .set_name(name)
3572 .with_options(options)
3573 .send()
3574 .await?;
3575 Ok(Operation::new(op))
3576 }
3577 };
3578
3579 let start = move || async {
3580 let op = self.send().await?;
3581 Ok(Operation::new(op))
3582 };
3583
3584 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3585 }
3586
3587 pub fn set_update_mask<T>(mut self, v: T) -> Self
3591 where
3592 T: std::convert::Into<wkt::FieldMask>,
3593 {
3594 self.0.request.update_mask = std::option::Option::Some(v.into());
3595 self
3596 }
3597
3598 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3602 where
3603 T: std::convert::Into<wkt::FieldMask>,
3604 {
3605 self.0.request.update_mask = v.map(|x| x.into());
3606 self
3607 }
3608
3609 pub fn set_logging_server<T>(mut self, v: T) -> Self
3613 where
3614 T: std::convert::Into<crate::model::LoggingServer>,
3615 {
3616 self.0.request.logging_server = std::option::Option::Some(v.into());
3617 self
3618 }
3619
3620 pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3624 where
3625 T: std::convert::Into<crate::model::LoggingServer>,
3626 {
3627 self.0.request.logging_server = v.map(|x| x.into());
3628 self
3629 }
3630
3631 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3633 self.0.request.request_id = v.into();
3634 self
3635 }
3636 }
3637
3638 #[doc(hidden)]
3639 impl gax::options::internal::RequestBuilder for UpdateLoggingServer {
3640 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3641 &mut self.0.options
3642 }
3643 }
3644
3645 #[derive(Clone, Debug)]
3664 pub struct DeleteLoggingServer(RequestBuilder<crate::model::DeleteLoggingServerRequest>);
3665
3666 impl DeleteLoggingServer {
3667 pub(crate) fn new(
3668 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3669 ) -> Self {
3670 Self(RequestBuilder::new(stub))
3671 }
3672
3673 pub fn with_request<V: Into<crate::model::DeleteLoggingServerRequest>>(
3675 mut self,
3676 v: V,
3677 ) -> Self {
3678 self.0.request = v.into();
3679 self
3680 }
3681
3682 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3684 self.0.options = v.into();
3685 self
3686 }
3687
3688 pub async fn send(self) -> Result<longrunning::model::Operation> {
3695 (*self.0.stub)
3696 .delete_logging_server(self.0.request, self.0.options)
3697 .await
3698 .map(gax::response::Response::into_body)
3699 }
3700
3701 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3703 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3704 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3705 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3706
3707 let stub = self.0.stub.clone();
3708 let mut options = self.0.options.clone();
3709 options.set_retry_policy(gax::retry_policy::NeverRetry);
3710 let query = move |name| {
3711 let stub = stub.clone();
3712 let options = options.clone();
3713 async {
3714 let op = GetOperation::new(stub)
3715 .set_name(name)
3716 .with_options(options)
3717 .send()
3718 .await?;
3719 Ok(Operation::new(op))
3720 }
3721 };
3722
3723 let start = move || async {
3724 let op = self.send().await?;
3725 Ok(Operation::new(op))
3726 };
3727
3728 lro::internal::new_unit_response_poller(
3729 polling_error_policy,
3730 polling_backoff_policy,
3731 start,
3732 query,
3733 )
3734 }
3735
3736 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3740 self.0.request.name = v.into();
3741 self
3742 }
3743
3744 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3746 self.0.request.request_id = v.into();
3747 self
3748 }
3749 }
3750
3751 #[doc(hidden)]
3752 impl gax::options::internal::RequestBuilder for DeleteLoggingServer {
3753 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3754 &mut self.0.options
3755 }
3756 }
3757
3758 #[derive(Clone, Debug)]
3780 pub struct ListNodeTypes(RequestBuilder<crate::model::ListNodeTypesRequest>);
3781
3782 impl ListNodeTypes {
3783 pub(crate) fn new(
3784 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3785 ) -> Self {
3786 Self(RequestBuilder::new(stub))
3787 }
3788
3789 pub fn with_request<V: Into<crate::model::ListNodeTypesRequest>>(mut self, v: V) -> Self {
3791 self.0.request = v.into();
3792 self
3793 }
3794
3795 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3797 self.0.options = v.into();
3798 self
3799 }
3800
3801 pub async fn send(self) -> Result<crate::model::ListNodeTypesResponse> {
3803 (*self.0.stub)
3804 .list_node_types(self.0.request, self.0.options)
3805 .await
3806 .map(gax::response::Response::into_body)
3807 }
3808
3809 pub fn by_page(
3811 self,
3812 ) -> impl gax::paginator::Paginator<crate::model::ListNodeTypesResponse, gax::error::Error>
3813 {
3814 use std::clone::Clone;
3815 let token = self.0.request.page_token.clone();
3816 let execute = move |token: String| {
3817 let mut builder = self.clone();
3818 builder.0.request = builder.0.request.set_page_token(token);
3819 builder.send()
3820 };
3821 gax::paginator::internal::new_paginator(token, execute)
3822 }
3823
3824 pub fn by_item(
3826 self,
3827 ) -> impl gax::paginator::ItemPaginator<crate::model::ListNodeTypesResponse, gax::error::Error>
3828 {
3829 use gax::paginator::Paginator;
3830 self.by_page().items()
3831 }
3832
3833 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3837 self.0.request.parent = v.into();
3838 self
3839 }
3840
3841 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3843 self.0.request.page_size = v.into();
3844 self
3845 }
3846
3847 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3849 self.0.request.page_token = v.into();
3850 self
3851 }
3852
3853 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3855 self.0.request.filter = v.into();
3856 self
3857 }
3858 }
3859
3860 #[doc(hidden)]
3861 impl gax::options::internal::RequestBuilder for ListNodeTypes {
3862 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3863 &mut self.0.options
3864 }
3865 }
3866
3867 #[derive(Clone, Debug)]
3885 pub struct GetNodeType(RequestBuilder<crate::model::GetNodeTypeRequest>);
3886
3887 impl GetNodeType {
3888 pub(crate) fn new(
3889 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3890 ) -> Self {
3891 Self(RequestBuilder::new(stub))
3892 }
3893
3894 pub fn with_request<V: Into<crate::model::GetNodeTypeRequest>>(mut self, v: V) -> Self {
3896 self.0.request = v.into();
3897 self
3898 }
3899
3900 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3902 self.0.options = v.into();
3903 self
3904 }
3905
3906 pub async fn send(self) -> Result<crate::model::NodeType> {
3908 (*self.0.stub)
3909 .get_node_type(self.0.request, self.0.options)
3910 .await
3911 .map(gax::response::Response::into_body)
3912 }
3913
3914 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3918 self.0.request.name = v.into();
3919 self
3920 }
3921 }
3922
3923 #[doc(hidden)]
3924 impl gax::options::internal::RequestBuilder for GetNodeType {
3925 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3926 &mut self.0.options
3927 }
3928 }
3929
3930 #[derive(Clone, Debug)]
3948 pub struct ShowNsxCredentials(RequestBuilder<crate::model::ShowNsxCredentialsRequest>);
3949
3950 impl ShowNsxCredentials {
3951 pub(crate) fn new(
3952 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3953 ) -> Self {
3954 Self(RequestBuilder::new(stub))
3955 }
3956
3957 pub fn with_request<V: Into<crate::model::ShowNsxCredentialsRequest>>(
3959 mut self,
3960 v: V,
3961 ) -> Self {
3962 self.0.request = v.into();
3963 self
3964 }
3965
3966 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3968 self.0.options = v.into();
3969 self
3970 }
3971
3972 pub async fn send(self) -> Result<crate::model::Credentials> {
3974 (*self.0.stub)
3975 .show_nsx_credentials(self.0.request, self.0.options)
3976 .await
3977 .map(gax::response::Response::into_body)
3978 }
3979
3980 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
3984 self.0.request.private_cloud = v.into();
3985 self
3986 }
3987 }
3988
3989 #[doc(hidden)]
3990 impl gax::options::internal::RequestBuilder for ShowNsxCredentials {
3991 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3992 &mut self.0.options
3993 }
3994 }
3995
3996 #[derive(Clone, Debug)]
4014 pub struct ShowVcenterCredentials(RequestBuilder<crate::model::ShowVcenterCredentialsRequest>);
4015
4016 impl ShowVcenterCredentials {
4017 pub(crate) fn new(
4018 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4019 ) -> Self {
4020 Self(RequestBuilder::new(stub))
4021 }
4022
4023 pub fn with_request<V: Into<crate::model::ShowVcenterCredentialsRequest>>(
4025 mut self,
4026 v: V,
4027 ) -> Self {
4028 self.0.request = v.into();
4029 self
4030 }
4031
4032 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4034 self.0.options = v.into();
4035 self
4036 }
4037
4038 pub async fn send(self) -> Result<crate::model::Credentials> {
4040 (*self.0.stub)
4041 .show_vcenter_credentials(self.0.request, self.0.options)
4042 .await
4043 .map(gax::response::Response::into_body)
4044 }
4045
4046 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4050 self.0.request.private_cloud = v.into();
4051 self
4052 }
4053
4054 pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
4056 self.0.request.username = v.into();
4057 self
4058 }
4059 }
4060
4061 #[doc(hidden)]
4062 impl gax::options::internal::RequestBuilder for ShowVcenterCredentials {
4063 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4064 &mut self.0.options
4065 }
4066 }
4067
4068 #[derive(Clone, Debug)]
4087 pub struct ResetNsxCredentials(RequestBuilder<crate::model::ResetNsxCredentialsRequest>);
4088
4089 impl ResetNsxCredentials {
4090 pub(crate) fn new(
4091 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4092 ) -> Self {
4093 Self(RequestBuilder::new(stub))
4094 }
4095
4096 pub fn with_request<V: Into<crate::model::ResetNsxCredentialsRequest>>(
4098 mut self,
4099 v: V,
4100 ) -> Self {
4101 self.0.request = v.into();
4102 self
4103 }
4104
4105 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4107 self.0.options = v.into();
4108 self
4109 }
4110
4111 pub async fn send(self) -> Result<longrunning::model::Operation> {
4118 (*self.0.stub)
4119 .reset_nsx_credentials(self.0.request, self.0.options)
4120 .await
4121 .map(gax::response::Response::into_body)
4122 }
4123
4124 pub fn poller(
4126 self,
4127 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
4128 type Operation = lro::internal::Operation<
4129 crate::model::PrivateCloud,
4130 crate::model::OperationMetadata,
4131 >;
4132 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4133 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4134
4135 let stub = self.0.stub.clone();
4136 let mut options = self.0.options.clone();
4137 options.set_retry_policy(gax::retry_policy::NeverRetry);
4138 let query = move |name| {
4139 let stub = stub.clone();
4140 let options = options.clone();
4141 async {
4142 let op = GetOperation::new(stub)
4143 .set_name(name)
4144 .with_options(options)
4145 .send()
4146 .await?;
4147 Ok(Operation::new(op))
4148 }
4149 };
4150
4151 let start = move || async {
4152 let op = self.send().await?;
4153 Ok(Operation::new(op))
4154 };
4155
4156 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4157 }
4158
4159 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4163 self.0.request.private_cloud = v.into();
4164 self
4165 }
4166
4167 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4169 self.0.request.request_id = v.into();
4170 self
4171 }
4172 }
4173
4174 #[doc(hidden)]
4175 impl gax::options::internal::RequestBuilder for ResetNsxCredentials {
4176 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4177 &mut self.0.options
4178 }
4179 }
4180
4181 #[derive(Clone, Debug)]
4200 pub struct ResetVcenterCredentials(
4201 RequestBuilder<crate::model::ResetVcenterCredentialsRequest>,
4202 );
4203
4204 impl ResetVcenterCredentials {
4205 pub(crate) fn new(
4206 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4207 ) -> Self {
4208 Self(RequestBuilder::new(stub))
4209 }
4210
4211 pub fn with_request<V: Into<crate::model::ResetVcenterCredentialsRequest>>(
4213 mut self,
4214 v: V,
4215 ) -> Self {
4216 self.0.request = v.into();
4217 self
4218 }
4219
4220 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4222 self.0.options = v.into();
4223 self
4224 }
4225
4226 pub async fn send(self) -> Result<longrunning::model::Operation> {
4233 (*self.0.stub)
4234 .reset_vcenter_credentials(self.0.request, self.0.options)
4235 .await
4236 .map(gax::response::Response::into_body)
4237 }
4238
4239 pub fn poller(
4241 self,
4242 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
4243 type Operation = lro::internal::Operation<
4244 crate::model::PrivateCloud,
4245 crate::model::OperationMetadata,
4246 >;
4247 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4248 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4249
4250 let stub = self.0.stub.clone();
4251 let mut options = self.0.options.clone();
4252 options.set_retry_policy(gax::retry_policy::NeverRetry);
4253 let query = move |name| {
4254 let stub = stub.clone();
4255 let options = options.clone();
4256 async {
4257 let op = GetOperation::new(stub)
4258 .set_name(name)
4259 .with_options(options)
4260 .send()
4261 .await?;
4262 Ok(Operation::new(op))
4263 }
4264 };
4265
4266 let start = move || async {
4267 let op = self.send().await?;
4268 Ok(Operation::new(op))
4269 };
4270
4271 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4272 }
4273
4274 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4278 self.0.request.private_cloud = v.into();
4279 self
4280 }
4281
4282 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4284 self.0.request.request_id = v.into();
4285 self
4286 }
4287
4288 pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
4290 self.0.request.username = v.into();
4291 self
4292 }
4293 }
4294
4295 #[doc(hidden)]
4296 impl gax::options::internal::RequestBuilder for ResetVcenterCredentials {
4297 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4298 &mut self.0.options
4299 }
4300 }
4301
4302 #[derive(Clone, Debug)]
4320 pub struct GetDnsForwarding(RequestBuilder<crate::model::GetDnsForwardingRequest>);
4321
4322 impl GetDnsForwarding {
4323 pub(crate) fn new(
4324 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4325 ) -> Self {
4326 Self(RequestBuilder::new(stub))
4327 }
4328
4329 pub fn with_request<V: Into<crate::model::GetDnsForwardingRequest>>(
4331 mut self,
4332 v: V,
4333 ) -> Self {
4334 self.0.request = v.into();
4335 self
4336 }
4337
4338 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4340 self.0.options = v.into();
4341 self
4342 }
4343
4344 pub async fn send(self) -> Result<crate::model::DnsForwarding> {
4346 (*self.0.stub)
4347 .get_dns_forwarding(self.0.request, self.0.options)
4348 .await
4349 .map(gax::response::Response::into_body)
4350 }
4351
4352 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4356 self.0.request.name = v.into();
4357 self
4358 }
4359 }
4360
4361 #[doc(hidden)]
4362 impl gax::options::internal::RequestBuilder for GetDnsForwarding {
4363 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4364 &mut self.0.options
4365 }
4366 }
4367
4368 #[derive(Clone, Debug)]
4387 pub struct UpdateDnsForwarding(RequestBuilder<crate::model::UpdateDnsForwardingRequest>);
4388
4389 impl UpdateDnsForwarding {
4390 pub(crate) fn new(
4391 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4392 ) -> Self {
4393 Self(RequestBuilder::new(stub))
4394 }
4395
4396 pub fn with_request<V: Into<crate::model::UpdateDnsForwardingRequest>>(
4398 mut self,
4399 v: V,
4400 ) -> Self {
4401 self.0.request = v.into();
4402 self
4403 }
4404
4405 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4407 self.0.options = v.into();
4408 self
4409 }
4410
4411 pub async fn send(self) -> Result<longrunning::model::Operation> {
4418 (*self.0.stub)
4419 .update_dns_forwarding(self.0.request, self.0.options)
4420 .await
4421 .map(gax::response::Response::into_body)
4422 }
4423
4424 pub fn poller(
4426 self,
4427 ) -> impl lro::Poller<crate::model::DnsForwarding, crate::model::OperationMetadata>
4428 {
4429 type Operation = lro::internal::Operation<
4430 crate::model::DnsForwarding,
4431 crate::model::OperationMetadata,
4432 >;
4433 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4434 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4435
4436 let stub = self.0.stub.clone();
4437 let mut options = self.0.options.clone();
4438 options.set_retry_policy(gax::retry_policy::NeverRetry);
4439 let query = move |name| {
4440 let stub = stub.clone();
4441 let options = options.clone();
4442 async {
4443 let op = GetOperation::new(stub)
4444 .set_name(name)
4445 .with_options(options)
4446 .send()
4447 .await?;
4448 Ok(Operation::new(op))
4449 }
4450 };
4451
4452 let start = move || async {
4453 let op = self.send().await?;
4454 Ok(Operation::new(op))
4455 };
4456
4457 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4458 }
4459
4460 pub fn set_dns_forwarding<T>(mut self, v: T) -> Self
4464 where
4465 T: std::convert::Into<crate::model::DnsForwarding>,
4466 {
4467 self.0.request.dns_forwarding = std::option::Option::Some(v.into());
4468 self
4469 }
4470
4471 pub fn set_or_clear_dns_forwarding<T>(mut self, v: std::option::Option<T>) -> Self
4475 where
4476 T: std::convert::Into<crate::model::DnsForwarding>,
4477 {
4478 self.0.request.dns_forwarding = v.map(|x| x.into());
4479 self
4480 }
4481
4482 pub fn set_update_mask<T>(mut self, v: T) -> Self
4486 where
4487 T: std::convert::Into<wkt::FieldMask>,
4488 {
4489 self.0.request.update_mask = std::option::Option::Some(v.into());
4490 self
4491 }
4492
4493 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4497 where
4498 T: std::convert::Into<wkt::FieldMask>,
4499 {
4500 self.0.request.update_mask = v.map(|x| x.into());
4501 self
4502 }
4503
4504 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4506 self.0.request.request_id = v.into();
4507 self
4508 }
4509 }
4510
4511 #[doc(hidden)]
4512 impl gax::options::internal::RequestBuilder for UpdateDnsForwarding {
4513 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4514 &mut self.0.options
4515 }
4516 }
4517
4518 #[derive(Clone, Debug)]
4536 pub struct GetNetworkPeering(RequestBuilder<crate::model::GetNetworkPeeringRequest>);
4537
4538 impl GetNetworkPeering {
4539 pub(crate) fn new(
4540 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4541 ) -> Self {
4542 Self(RequestBuilder::new(stub))
4543 }
4544
4545 pub fn with_request<V: Into<crate::model::GetNetworkPeeringRequest>>(
4547 mut self,
4548 v: V,
4549 ) -> Self {
4550 self.0.request = v.into();
4551 self
4552 }
4553
4554 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4556 self.0.options = v.into();
4557 self
4558 }
4559
4560 pub async fn send(self) -> Result<crate::model::NetworkPeering> {
4562 (*self.0.stub)
4563 .get_network_peering(self.0.request, self.0.options)
4564 .await
4565 .map(gax::response::Response::into_body)
4566 }
4567
4568 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4572 self.0.request.name = v.into();
4573 self
4574 }
4575 }
4576
4577 #[doc(hidden)]
4578 impl gax::options::internal::RequestBuilder for GetNetworkPeering {
4579 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4580 &mut self.0.options
4581 }
4582 }
4583
4584 #[derive(Clone, Debug)]
4606 pub struct ListNetworkPeerings(RequestBuilder<crate::model::ListNetworkPeeringsRequest>);
4607
4608 impl ListNetworkPeerings {
4609 pub(crate) fn new(
4610 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4611 ) -> Self {
4612 Self(RequestBuilder::new(stub))
4613 }
4614
4615 pub fn with_request<V: Into<crate::model::ListNetworkPeeringsRequest>>(
4617 mut self,
4618 v: V,
4619 ) -> Self {
4620 self.0.request = v.into();
4621 self
4622 }
4623
4624 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4626 self.0.options = v.into();
4627 self
4628 }
4629
4630 pub async fn send(self) -> Result<crate::model::ListNetworkPeeringsResponse> {
4632 (*self.0.stub)
4633 .list_network_peerings(self.0.request, self.0.options)
4634 .await
4635 .map(gax::response::Response::into_body)
4636 }
4637
4638 pub fn by_page(
4640 self,
4641 ) -> impl gax::paginator::Paginator<crate::model::ListNetworkPeeringsResponse, gax::error::Error>
4642 {
4643 use std::clone::Clone;
4644 let token = self.0.request.page_token.clone();
4645 let execute = move |token: String| {
4646 let mut builder = self.clone();
4647 builder.0.request = builder.0.request.set_page_token(token);
4648 builder.send()
4649 };
4650 gax::paginator::internal::new_paginator(token, execute)
4651 }
4652
4653 pub fn by_item(
4655 self,
4656 ) -> impl gax::paginator::ItemPaginator<
4657 crate::model::ListNetworkPeeringsResponse,
4658 gax::error::Error,
4659 > {
4660 use gax::paginator::Paginator;
4661 self.by_page().items()
4662 }
4663
4664 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4668 self.0.request.parent = v.into();
4669 self
4670 }
4671
4672 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4674 self.0.request.page_size = v.into();
4675 self
4676 }
4677
4678 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4680 self.0.request.page_token = v.into();
4681 self
4682 }
4683
4684 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4686 self.0.request.filter = v.into();
4687 self
4688 }
4689
4690 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4692 self.0.request.order_by = v.into();
4693 self
4694 }
4695 }
4696
4697 #[doc(hidden)]
4698 impl gax::options::internal::RequestBuilder for ListNetworkPeerings {
4699 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4700 &mut self.0.options
4701 }
4702 }
4703
4704 #[derive(Clone, Debug)]
4723 pub struct CreateNetworkPeering(RequestBuilder<crate::model::CreateNetworkPeeringRequest>);
4724
4725 impl CreateNetworkPeering {
4726 pub(crate) fn new(
4727 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4728 ) -> Self {
4729 Self(RequestBuilder::new(stub))
4730 }
4731
4732 pub fn with_request<V: Into<crate::model::CreateNetworkPeeringRequest>>(
4734 mut self,
4735 v: V,
4736 ) -> Self {
4737 self.0.request = v.into();
4738 self
4739 }
4740
4741 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4743 self.0.options = v.into();
4744 self
4745 }
4746
4747 pub async fn send(self) -> Result<longrunning::model::Operation> {
4754 (*self.0.stub)
4755 .create_network_peering(self.0.request, self.0.options)
4756 .await
4757 .map(gax::response::Response::into_body)
4758 }
4759
4760 pub fn poller(
4762 self,
4763 ) -> impl lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
4764 {
4765 type Operation = lro::internal::Operation<
4766 crate::model::NetworkPeering,
4767 crate::model::OperationMetadata,
4768 >;
4769 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4770 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4771
4772 let stub = self.0.stub.clone();
4773 let mut options = self.0.options.clone();
4774 options.set_retry_policy(gax::retry_policy::NeverRetry);
4775 let query = move |name| {
4776 let stub = stub.clone();
4777 let options = options.clone();
4778 async {
4779 let op = GetOperation::new(stub)
4780 .set_name(name)
4781 .with_options(options)
4782 .send()
4783 .await?;
4784 Ok(Operation::new(op))
4785 }
4786 };
4787
4788 let start = move || async {
4789 let op = self.send().await?;
4790 Ok(Operation::new(op))
4791 };
4792
4793 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4794 }
4795
4796 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4800 self.0.request.parent = v.into();
4801 self
4802 }
4803
4804 pub fn set_network_peering_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4808 self.0.request.network_peering_id = v.into();
4809 self
4810 }
4811
4812 pub fn set_network_peering<T>(mut self, v: T) -> Self
4816 where
4817 T: std::convert::Into<crate::model::NetworkPeering>,
4818 {
4819 self.0.request.network_peering = std::option::Option::Some(v.into());
4820 self
4821 }
4822
4823 pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
4827 where
4828 T: std::convert::Into<crate::model::NetworkPeering>,
4829 {
4830 self.0.request.network_peering = v.map(|x| x.into());
4831 self
4832 }
4833
4834 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4836 self.0.request.request_id = v.into();
4837 self
4838 }
4839 }
4840
4841 #[doc(hidden)]
4842 impl gax::options::internal::RequestBuilder for CreateNetworkPeering {
4843 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4844 &mut self.0.options
4845 }
4846 }
4847
4848 #[derive(Clone, Debug)]
4867 pub struct DeleteNetworkPeering(RequestBuilder<crate::model::DeleteNetworkPeeringRequest>);
4868
4869 impl DeleteNetworkPeering {
4870 pub(crate) fn new(
4871 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4872 ) -> Self {
4873 Self(RequestBuilder::new(stub))
4874 }
4875
4876 pub fn with_request<V: Into<crate::model::DeleteNetworkPeeringRequest>>(
4878 mut self,
4879 v: V,
4880 ) -> Self {
4881 self.0.request = v.into();
4882 self
4883 }
4884
4885 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4887 self.0.options = v.into();
4888 self
4889 }
4890
4891 pub async fn send(self) -> Result<longrunning::model::Operation> {
4898 (*self.0.stub)
4899 .delete_network_peering(self.0.request, self.0.options)
4900 .await
4901 .map(gax::response::Response::into_body)
4902 }
4903
4904 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
4906 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4907 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4908 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4909
4910 let stub = self.0.stub.clone();
4911 let mut options = self.0.options.clone();
4912 options.set_retry_policy(gax::retry_policy::NeverRetry);
4913 let query = move |name| {
4914 let stub = stub.clone();
4915 let options = options.clone();
4916 async {
4917 let op = GetOperation::new(stub)
4918 .set_name(name)
4919 .with_options(options)
4920 .send()
4921 .await?;
4922 Ok(Operation::new(op))
4923 }
4924 };
4925
4926 let start = move || async {
4927 let op = self.send().await?;
4928 Ok(Operation::new(op))
4929 };
4930
4931 lro::internal::new_unit_response_poller(
4932 polling_error_policy,
4933 polling_backoff_policy,
4934 start,
4935 query,
4936 )
4937 }
4938
4939 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4943 self.0.request.name = v.into();
4944 self
4945 }
4946
4947 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4949 self.0.request.request_id = v.into();
4950 self
4951 }
4952 }
4953
4954 #[doc(hidden)]
4955 impl gax::options::internal::RequestBuilder for DeleteNetworkPeering {
4956 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4957 &mut self.0.options
4958 }
4959 }
4960
4961 #[derive(Clone, Debug)]
4980 pub struct UpdateNetworkPeering(RequestBuilder<crate::model::UpdateNetworkPeeringRequest>);
4981
4982 impl UpdateNetworkPeering {
4983 pub(crate) fn new(
4984 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4985 ) -> Self {
4986 Self(RequestBuilder::new(stub))
4987 }
4988
4989 pub fn with_request<V: Into<crate::model::UpdateNetworkPeeringRequest>>(
4991 mut self,
4992 v: V,
4993 ) -> Self {
4994 self.0.request = v.into();
4995 self
4996 }
4997
4998 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5000 self.0.options = v.into();
5001 self
5002 }
5003
5004 pub async fn send(self) -> Result<longrunning::model::Operation> {
5011 (*self.0.stub)
5012 .update_network_peering(self.0.request, self.0.options)
5013 .await
5014 .map(gax::response::Response::into_body)
5015 }
5016
5017 pub fn poller(
5019 self,
5020 ) -> impl lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
5021 {
5022 type Operation = lro::internal::Operation<
5023 crate::model::NetworkPeering,
5024 crate::model::OperationMetadata,
5025 >;
5026 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5027 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5028
5029 let stub = self.0.stub.clone();
5030 let mut options = self.0.options.clone();
5031 options.set_retry_policy(gax::retry_policy::NeverRetry);
5032 let query = move |name| {
5033 let stub = stub.clone();
5034 let options = options.clone();
5035 async {
5036 let op = GetOperation::new(stub)
5037 .set_name(name)
5038 .with_options(options)
5039 .send()
5040 .await?;
5041 Ok(Operation::new(op))
5042 }
5043 };
5044
5045 let start = move || async {
5046 let op = self.send().await?;
5047 Ok(Operation::new(op))
5048 };
5049
5050 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5051 }
5052
5053 pub fn set_network_peering<T>(mut self, v: T) -> Self
5057 where
5058 T: std::convert::Into<crate::model::NetworkPeering>,
5059 {
5060 self.0.request.network_peering = std::option::Option::Some(v.into());
5061 self
5062 }
5063
5064 pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
5068 where
5069 T: std::convert::Into<crate::model::NetworkPeering>,
5070 {
5071 self.0.request.network_peering = v.map(|x| x.into());
5072 self
5073 }
5074
5075 pub fn set_update_mask<T>(mut self, v: T) -> Self
5079 where
5080 T: std::convert::Into<wkt::FieldMask>,
5081 {
5082 self.0.request.update_mask = std::option::Option::Some(v.into());
5083 self
5084 }
5085
5086 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5090 where
5091 T: std::convert::Into<wkt::FieldMask>,
5092 {
5093 self.0.request.update_mask = v.map(|x| x.into());
5094 self
5095 }
5096
5097 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5099 self.0.request.request_id = v.into();
5100 self
5101 }
5102 }
5103
5104 #[doc(hidden)]
5105 impl gax::options::internal::RequestBuilder for UpdateNetworkPeering {
5106 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5107 &mut self.0.options
5108 }
5109 }
5110
5111 #[derive(Clone, Debug)]
5133 pub struct ListPeeringRoutes(RequestBuilder<crate::model::ListPeeringRoutesRequest>);
5134
5135 impl ListPeeringRoutes {
5136 pub(crate) fn new(
5137 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5138 ) -> Self {
5139 Self(RequestBuilder::new(stub))
5140 }
5141
5142 pub fn with_request<V: Into<crate::model::ListPeeringRoutesRequest>>(
5144 mut self,
5145 v: V,
5146 ) -> Self {
5147 self.0.request = v.into();
5148 self
5149 }
5150
5151 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5153 self.0.options = v.into();
5154 self
5155 }
5156
5157 pub async fn send(self) -> Result<crate::model::ListPeeringRoutesResponse> {
5159 (*self.0.stub)
5160 .list_peering_routes(self.0.request, self.0.options)
5161 .await
5162 .map(gax::response::Response::into_body)
5163 }
5164
5165 pub fn by_page(
5167 self,
5168 ) -> impl gax::paginator::Paginator<crate::model::ListPeeringRoutesResponse, gax::error::Error>
5169 {
5170 use std::clone::Clone;
5171 let token = self.0.request.page_token.clone();
5172 let execute = move |token: String| {
5173 let mut builder = self.clone();
5174 builder.0.request = builder.0.request.set_page_token(token);
5175 builder.send()
5176 };
5177 gax::paginator::internal::new_paginator(token, execute)
5178 }
5179
5180 pub fn by_item(
5182 self,
5183 ) -> impl gax::paginator::ItemPaginator<crate::model::ListPeeringRoutesResponse, gax::error::Error>
5184 {
5185 use gax::paginator::Paginator;
5186 self.by_page().items()
5187 }
5188
5189 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5193 self.0.request.parent = v.into();
5194 self
5195 }
5196
5197 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5199 self.0.request.page_size = v.into();
5200 self
5201 }
5202
5203 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5205 self.0.request.page_token = v.into();
5206 self
5207 }
5208
5209 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5211 self.0.request.filter = v.into();
5212 self
5213 }
5214 }
5215
5216 #[doc(hidden)]
5217 impl gax::options::internal::RequestBuilder for ListPeeringRoutes {
5218 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5219 &mut self.0.options
5220 }
5221 }
5222
5223 #[derive(Clone, Debug)]
5242 pub struct CreateHcxActivationKey(RequestBuilder<crate::model::CreateHcxActivationKeyRequest>);
5243
5244 impl CreateHcxActivationKey {
5245 pub(crate) fn new(
5246 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5247 ) -> Self {
5248 Self(RequestBuilder::new(stub))
5249 }
5250
5251 pub fn with_request<V: Into<crate::model::CreateHcxActivationKeyRequest>>(
5253 mut self,
5254 v: V,
5255 ) -> Self {
5256 self.0.request = v.into();
5257 self
5258 }
5259
5260 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5262 self.0.options = v.into();
5263 self
5264 }
5265
5266 pub async fn send(self) -> Result<longrunning::model::Operation> {
5273 (*self.0.stub)
5274 .create_hcx_activation_key(self.0.request, self.0.options)
5275 .await
5276 .map(gax::response::Response::into_body)
5277 }
5278
5279 pub fn poller(
5281 self,
5282 ) -> impl lro::Poller<crate::model::HcxActivationKey, crate::model::OperationMetadata>
5283 {
5284 type Operation = lro::internal::Operation<
5285 crate::model::HcxActivationKey,
5286 crate::model::OperationMetadata,
5287 >;
5288 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5289 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5290
5291 let stub = self.0.stub.clone();
5292 let mut options = self.0.options.clone();
5293 options.set_retry_policy(gax::retry_policy::NeverRetry);
5294 let query = move |name| {
5295 let stub = stub.clone();
5296 let options = options.clone();
5297 async {
5298 let op = GetOperation::new(stub)
5299 .set_name(name)
5300 .with_options(options)
5301 .send()
5302 .await?;
5303 Ok(Operation::new(op))
5304 }
5305 };
5306
5307 let start = move || async {
5308 let op = self.send().await?;
5309 Ok(Operation::new(op))
5310 };
5311
5312 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5313 }
5314
5315 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5319 self.0.request.parent = v.into();
5320 self
5321 }
5322
5323 pub fn set_hcx_activation_key<T>(mut self, v: T) -> Self
5327 where
5328 T: std::convert::Into<crate::model::HcxActivationKey>,
5329 {
5330 self.0.request.hcx_activation_key = std::option::Option::Some(v.into());
5331 self
5332 }
5333
5334 pub fn set_or_clear_hcx_activation_key<T>(mut self, v: std::option::Option<T>) -> Self
5338 where
5339 T: std::convert::Into<crate::model::HcxActivationKey>,
5340 {
5341 self.0.request.hcx_activation_key = v.map(|x| x.into());
5342 self
5343 }
5344
5345 pub fn set_hcx_activation_key_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5349 self.0.request.hcx_activation_key_id = v.into();
5350 self
5351 }
5352
5353 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5355 self.0.request.request_id = v.into();
5356 self
5357 }
5358 }
5359
5360 #[doc(hidden)]
5361 impl gax::options::internal::RequestBuilder for CreateHcxActivationKey {
5362 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5363 &mut self.0.options
5364 }
5365 }
5366
5367 #[derive(Clone, Debug)]
5389 pub struct ListHcxActivationKeys(RequestBuilder<crate::model::ListHcxActivationKeysRequest>);
5390
5391 impl ListHcxActivationKeys {
5392 pub(crate) fn new(
5393 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5394 ) -> Self {
5395 Self(RequestBuilder::new(stub))
5396 }
5397
5398 pub fn with_request<V: Into<crate::model::ListHcxActivationKeysRequest>>(
5400 mut self,
5401 v: V,
5402 ) -> Self {
5403 self.0.request = v.into();
5404 self
5405 }
5406
5407 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5409 self.0.options = v.into();
5410 self
5411 }
5412
5413 pub async fn send(self) -> Result<crate::model::ListHcxActivationKeysResponse> {
5415 (*self.0.stub)
5416 .list_hcx_activation_keys(self.0.request, self.0.options)
5417 .await
5418 .map(gax::response::Response::into_body)
5419 }
5420
5421 pub fn by_page(
5423 self,
5424 ) -> impl gax::paginator::Paginator<crate::model::ListHcxActivationKeysResponse, gax::error::Error>
5425 {
5426 use std::clone::Clone;
5427 let token = self.0.request.page_token.clone();
5428 let execute = move |token: String| {
5429 let mut builder = self.clone();
5430 builder.0.request = builder.0.request.set_page_token(token);
5431 builder.send()
5432 };
5433 gax::paginator::internal::new_paginator(token, execute)
5434 }
5435
5436 pub fn by_item(
5438 self,
5439 ) -> impl gax::paginator::ItemPaginator<
5440 crate::model::ListHcxActivationKeysResponse,
5441 gax::error::Error,
5442 > {
5443 use gax::paginator::Paginator;
5444 self.by_page().items()
5445 }
5446
5447 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5451 self.0.request.parent = v.into();
5452 self
5453 }
5454
5455 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5457 self.0.request.page_size = v.into();
5458 self
5459 }
5460
5461 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5463 self.0.request.page_token = v.into();
5464 self
5465 }
5466 }
5467
5468 #[doc(hidden)]
5469 impl gax::options::internal::RequestBuilder for ListHcxActivationKeys {
5470 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5471 &mut self.0.options
5472 }
5473 }
5474
5475 #[derive(Clone, Debug)]
5493 pub struct GetHcxActivationKey(RequestBuilder<crate::model::GetHcxActivationKeyRequest>);
5494
5495 impl GetHcxActivationKey {
5496 pub(crate) fn new(
5497 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5498 ) -> Self {
5499 Self(RequestBuilder::new(stub))
5500 }
5501
5502 pub fn with_request<V: Into<crate::model::GetHcxActivationKeyRequest>>(
5504 mut self,
5505 v: V,
5506 ) -> Self {
5507 self.0.request = v.into();
5508 self
5509 }
5510
5511 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5513 self.0.options = v.into();
5514 self
5515 }
5516
5517 pub async fn send(self) -> Result<crate::model::HcxActivationKey> {
5519 (*self.0.stub)
5520 .get_hcx_activation_key(self.0.request, self.0.options)
5521 .await
5522 .map(gax::response::Response::into_body)
5523 }
5524
5525 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5529 self.0.request.name = v.into();
5530 self
5531 }
5532 }
5533
5534 #[doc(hidden)]
5535 impl gax::options::internal::RequestBuilder for GetHcxActivationKey {
5536 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5537 &mut self.0.options
5538 }
5539 }
5540
5541 #[derive(Clone, Debug)]
5559 pub struct GetNetworkPolicy(RequestBuilder<crate::model::GetNetworkPolicyRequest>);
5560
5561 impl GetNetworkPolicy {
5562 pub(crate) fn new(
5563 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5564 ) -> Self {
5565 Self(RequestBuilder::new(stub))
5566 }
5567
5568 pub fn with_request<V: Into<crate::model::GetNetworkPolicyRequest>>(
5570 mut self,
5571 v: V,
5572 ) -> Self {
5573 self.0.request = v.into();
5574 self
5575 }
5576
5577 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5579 self.0.options = v.into();
5580 self
5581 }
5582
5583 pub async fn send(self) -> Result<crate::model::NetworkPolicy> {
5585 (*self.0.stub)
5586 .get_network_policy(self.0.request, self.0.options)
5587 .await
5588 .map(gax::response::Response::into_body)
5589 }
5590
5591 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5595 self.0.request.name = v.into();
5596 self
5597 }
5598 }
5599
5600 #[doc(hidden)]
5601 impl gax::options::internal::RequestBuilder for GetNetworkPolicy {
5602 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5603 &mut self.0.options
5604 }
5605 }
5606
5607 #[derive(Clone, Debug)]
5629 pub struct ListNetworkPolicies(RequestBuilder<crate::model::ListNetworkPoliciesRequest>);
5630
5631 impl ListNetworkPolicies {
5632 pub(crate) fn new(
5633 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5634 ) -> Self {
5635 Self(RequestBuilder::new(stub))
5636 }
5637
5638 pub fn with_request<V: Into<crate::model::ListNetworkPoliciesRequest>>(
5640 mut self,
5641 v: V,
5642 ) -> Self {
5643 self.0.request = v.into();
5644 self
5645 }
5646
5647 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5649 self.0.options = v.into();
5650 self
5651 }
5652
5653 pub async fn send(self) -> Result<crate::model::ListNetworkPoliciesResponse> {
5655 (*self.0.stub)
5656 .list_network_policies(self.0.request, self.0.options)
5657 .await
5658 .map(gax::response::Response::into_body)
5659 }
5660
5661 pub fn by_page(
5663 self,
5664 ) -> impl gax::paginator::Paginator<crate::model::ListNetworkPoliciesResponse, gax::error::Error>
5665 {
5666 use std::clone::Clone;
5667 let token = self.0.request.page_token.clone();
5668 let execute = move |token: String| {
5669 let mut builder = self.clone();
5670 builder.0.request = builder.0.request.set_page_token(token);
5671 builder.send()
5672 };
5673 gax::paginator::internal::new_paginator(token, execute)
5674 }
5675
5676 pub fn by_item(
5678 self,
5679 ) -> impl gax::paginator::ItemPaginator<
5680 crate::model::ListNetworkPoliciesResponse,
5681 gax::error::Error,
5682 > {
5683 use gax::paginator::Paginator;
5684 self.by_page().items()
5685 }
5686
5687 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5691 self.0.request.parent = v.into();
5692 self
5693 }
5694
5695 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5697 self.0.request.page_size = v.into();
5698 self
5699 }
5700
5701 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5703 self.0.request.page_token = v.into();
5704 self
5705 }
5706
5707 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5709 self.0.request.filter = v.into();
5710 self
5711 }
5712
5713 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5715 self.0.request.order_by = v.into();
5716 self
5717 }
5718 }
5719
5720 #[doc(hidden)]
5721 impl gax::options::internal::RequestBuilder for ListNetworkPolicies {
5722 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5723 &mut self.0.options
5724 }
5725 }
5726
5727 #[derive(Clone, Debug)]
5746 pub struct CreateNetworkPolicy(RequestBuilder<crate::model::CreateNetworkPolicyRequest>);
5747
5748 impl CreateNetworkPolicy {
5749 pub(crate) fn new(
5750 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5751 ) -> Self {
5752 Self(RequestBuilder::new(stub))
5753 }
5754
5755 pub fn with_request<V: Into<crate::model::CreateNetworkPolicyRequest>>(
5757 mut self,
5758 v: V,
5759 ) -> Self {
5760 self.0.request = v.into();
5761 self
5762 }
5763
5764 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5766 self.0.options = v.into();
5767 self
5768 }
5769
5770 pub async fn send(self) -> Result<longrunning::model::Operation> {
5777 (*self.0.stub)
5778 .create_network_policy(self.0.request, self.0.options)
5779 .await
5780 .map(gax::response::Response::into_body)
5781 }
5782
5783 pub fn poller(
5785 self,
5786 ) -> impl lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
5787 {
5788 type Operation = lro::internal::Operation<
5789 crate::model::NetworkPolicy,
5790 crate::model::OperationMetadata,
5791 >;
5792 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5793 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5794
5795 let stub = self.0.stub.clone();
5796 let mut options = self.0.options.clone();
5797 options.set_retry_policy(gax::retry_policy::NeverRetry);
5798 let query = move |name| {
5799 let stub = stub.clone();
5800 let options = options.clone();
5801 async {
5802 let op = GetOperation::new(stub)
5803 .set_name(name)
5804 .with_options(options)
5805 .send()
5806 .await?;
5807 Ok(Operation::new(op))
5808 }
5809 };
5810
5811 let start = move || async {
5812 let op = self.send().await?;
5813 Ok(Operation::new(op))
5814 };
5815
5816 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5817 }
5818
5819 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5823 self.0.request.parent = v.into();
5824 self
5825 }
5826
5827 pub fn set_network_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5831 self.0.request.network_policy_id = v.into();
5832 self
5833 }
5834
5835 pub fn set_network_policy<T>(mut self, v: T) -> Self
5839 where
5840 T: std::convert::Into<crate::model::NetworkPolicy>,
5841 {
5842 self.0.request.network_policy = std::option::Option::Some(v.into());
5843 self
5844 }
5845
5846 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
5850 where
5851 T: std::convert::Into<crate::model::NetworkPolicy>,
5852 {
5853 self.0.request.network_policy = v.map(|x| x.into());
5854 self
5855 }
5856
5857 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5859 self.0.request.request_id = v.into();
5860 self
5861 }
5862 }
5863
5864 #[doc(hidden)]
5865 impl gax::options::internal::RequestBuilder for CreateNetworkPolicy {
5866 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5867 &mut self.0.options
5868 }
5869 }
5870
5871 #[derive(Clone, Debug)]
5890 pub struct UpdateNetworkPolicy(RequestBuilder<crate::model::UpdateNetworkPolicyRequest>);
5891
5892 impl UpdateNetworkPolicy {
5893 pub(crate) fn new(
5894 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5895 ) -> Self {
5896 Self(RequestBuilder::new(stub))
5897 }
5898
5899 pub fn with_request<V: Into<crate::model::UpdateNetworkPolicyRequest>>(
5901 mut self,
5902 v: V,
5903 ) -> Self {
5904 self.0.request = v.into();
5905 self
5906 }
5907
5908 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5910 self.0.options = v.into();
5911 self
5912 }
5913
5914 pub async fn send(self) -> Result<longrunning::model::Operation> {
5921 (*self.0.stub)
5922 .update_network_policy(self.0.request, self.0.options)
5923 .await
5924 .map(gax::response::Response::into_body)
5925 }
5926
5927 pub fn poller(
5929 self,
5930 ) -> impl lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
5931 {
5932 type Operation = lro::internal::Operation<
5933 crate::model::NetworkPolicy,
5934 crate::model::OperationMetadata,
5935 >;
5936 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5937 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5938
5939 let stub = self.0.stub.clone();
5940 let mut options = self.0.options.clone();
5941 options.set_retry_policy(gax::retry_policy::NeverRetry);
5942 let query = move |name| {
5943 let stub = stub.clone();
5944 let options = options.clone();
5945 async {
5946 let op = GetOperation::new(stub)
5947 .set_name(name)
5948 .with_options(options)
5949 .send()
5950 .await?;
5951 Ok(Operation::new(op))
5952 }
5953 };
5954
5955 let start = move || async {
5956 let op = self.send().await?;
5957 Ok(Operation::new(op))
5958 };
5959
5960 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5961 }
5962
5963 pub fn set_network_policy<T>(mut self, v: T) -> Self
5967 where
5968 T: std::convert::Into<crate::model::NetworkPolicy>,
5969 {
5970 self.0.request.network_policy = std::option::Option::Some(v.into());
5971 self
5972 }
5973
5974 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
5978 where
5979 T: std::convert::Into<crate::model::NetworkPolicy>,
5980 {
5981 self.0.request.network_policy = v.map(|x| x.into());
5982 self
5983 }
5984
5985 pub fn set_update_mask<T>(mut self, v: T) -> Self
5989 where
5990 T: std::convert::Into<wkt::FieldMask>,
5991 {
5992 self.0.request.update_mask = std::option::Option::Some(v.into());
5993 self
5994 }
5995
5996 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6000 where
6001 T: std::convert::Into<wkt::FieldMask>,
6002 {
6003 self.0.request.update_mask = v.map(|x| x.into());
6004 self
6005 }
6006
6007 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6009 self.0.request.request_id = v.into();
6010 self
6011 }
6012 }
6013
6014 #[doc(hidden)]
6015 impl gax::options::internal::RequestBuilder for UpdateNetworkPolicy {
6016 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6017 &mut self.0.options
6018 }
6019 }
6020
6021 #[derive(Clone, Debug)]
6040 pub struct DeleteNetworkPolicy(RequestBuilder<crate::model::DeleteNetworkPolicyRequest>);
6041
6042 impl DeleteNetworkPolicy {
6043 pub(crate) fn new(
6044 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6045 ) -> Self {
6046 Self(RequestBuilder::new(stub))
6047 }
6048
6049 pub fn with_request<V: Into<crate::model::DeleteNetworkPolicyRequest>>(
6051 mut self,
6052 v: V,
6053 ) -> Self {
6054 self.0.request = v.into();
6055 self
6056 }
6057
6058 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6060 self.0.options = v.into();
6061 self
6062 }
6063
6064 pub async fn send(self) -> Result<longrunning::model::Operation> {
6071 (*self.0.stub)
6072 .delete_network_policy(self.0.request, self.0.options)
6073 .await
6074 .map(gax::response::Response::into_body)
6075 }
6076
6077 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
6079 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6080 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6081 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6082
6083 let stub = self.0.stub.clone();
6084 let mut options = self.0.options.clone();
6085 options.set_retry_policy(gax::retry_policy::NeverRetry);
6086 let query = move |name| {
6087 let stub = stub.clone();
6088 let options = options.clone();
6089 async {
6090 let op = GetOperation::new(stub)
6091 .set_name(name)
6092 .with_options(options)
6093 .send()
6094 .await?;
6095 Ok(Operation::new(op))
6096 }
6097 };
6098
6099 let start = move || async {
6100 let op = self.send().await?;
6101 Ok(Operation::new(op))
6102 };
6103
6104 lro::internal::new_unit_response_poller(
6105 polling_error_policy,
6106 polling_backoff_policy,
6107 start,
6108 query,
6109 )
6110 }
6111
6112 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6116 self.0.request.name = v.into();
6117 self
6118 }
6119
6120 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6122 self.0.request.request_id = v.into();
6123 self
6124 }
6125 }
6126
6127 #[doc(hidden)]
6128 impl gax::options::internal::RequestBuilder for DeleteNetworkPolicy {
6129 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6130 &mut self.0.options
6131 }
6132 }
6133
6134 #[derive(Clone, Debug)]
6156 pub struct ListManagementDnsZoneBindings(
6157 RequestBuilder<crate::model::ListManagementDnsZoneBindingsRequest>,
6158 );
6159
6160 impl ListManagementDnsZoneBindings {
6161 pub(crate) fn new(
6162 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6163 ) -> Self {
6164 Self(RequestBuilder::new(stub))
6165 }
6166
6167 pub fn with_request<V: Into<crate::model::ListManagementDnsZoneBindingsRequest>>(
6169 mut self,
6170 v: V,
6171 ) -> Self {
6172 self.0.request = v.into();
6173 self
6174 }
6175
6176 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6178 self.0.options = v.into();
6179 self
6180 }
6181
6182 pub async fn send(self) -> Result<crate::model::ListManagementDnsZoneBindingsResponse> {
6184 (*self.0.stub)
6185 .list_management_dns_zone_bindings(self.0.request, self.0.options)
6186 .await
6187 .map(gax::response::Response::into_body)
6188 }
6189
6190 pub fn by_page(
6192 self,
6193 ) -> impl gax::paginator::Paginator<
6194 crate::model::ListManagementDnsZoneBindingsResponse,
6195 gax::error::Error,
6196 > {
6197 use std::clone::Clone;
6198 let token = self.0.request.page_token.clone();
6199 let execute = move |token: String| {
6200 let mut builder = self.clone();
6201 builder.0.request = builder.0.request.set_page_token(token);
6202 builder.send()
6203 };
6204 gax::paginator::internal::new_paginator(token, execute)
6205 }
6206
6207 pub fn by_item(
6209 self,
6210 ) -> impl gax::paginator::ItemPaginator<
6211 crate::model::ListManagementDnsZoneBindingsResponse,
6212 gax::error::Error,
6213 > {
6214 use gax::paginator::Paginator;
6215 self.by_page().items()
6216 }
6217
6218 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6222 self.0.request.parent = v.into();
6223 self
6224 }
6225
6226 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6228 self.0.request.page_size = v.into();
6229 self
6230 }
6231
6232 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6234 self.0.request.page_token = v.into();
6235 self
6236 }
6237
6238 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6240 self.0.request.filter = v.into();
6241 self
6242 }
6243
6244 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6246 self.0.request.order_by = v.into();
6247 self
6248 }
6249 }
6250
6251 #[doc(hidden)]
6252 impl gax::options::internal::RequestBuilder for ListManagementDnsZoneBindings {
6253 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6254 &mut self.0.options
6255 }
6256 }
6257
6258 #[derive(Clone, Debug)]
6276 pub struct GetManagementDnsZoneBinding(
6277 RequestBuilder<crate::model::GetManagementDnsZoneBindingRequest>,
6278 );
6279
6280 impl GetManagementDnsZoneBinding {
6281 pub(crate) fn new(
6282 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6283 ) -> Self {
6284 Self(RequestBuilder::new(stub))
6285 }
6286
6287 pub fn with_request<V: Into<crate::model::GetManagementDnsZoneBindingRequest>>(
6289 mut self,
6290 v: V,
6291 ) -> Self {
6292 self.0.request = v.into();
6293 self
6294 }
6295
6296 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6298 self.0.options = v.into();
6299 self
6300 }
6301
6302 pub async fn send(self) -> Result<crate::model::ManagementDnsZoneBinding> {
6304 (*self.0.stub)
6305 .get_management_dns_zone_binding(self.0.request, self.0.options)
6306 .await
6307 .map(gax::response::Response::into_body)
6308 }
6309
6310 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6314 self.0.request.name = v.into();
6315 self
6316 }
6317 }
6318
6319 #[doc(hidden)]
6320 impl gax::options::internal::RequestBuilder for GetManagementDnsZoneBinding {
6321 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6322 &mut self.0.options
6323 }
6324 }
6325
6326 #[derive(Clone, Debug)]
6345 pub struct CreateManagementDnsZoneBinding(
6346 RequestBuilder<crate::model::CreateManagementDnsZoneBindingRequest>,
6347 );
6348
6349 impl CreateManagementDnsZoneBinding {
6350 pub(crate) fn new(
6351 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6352 ) -> Self {
6353 Self(RequestBuilder::new(stub))
6354 }
6355
6356 pub fn with_request<V: Into<crate::model::CreateManagementDnsZoneBindingRequest>>(
6358 mut self,
6359 v: V,
6360 ) -> Self {
6361 self.0.request = v.into();
6362 self
6363 }
6364
6365 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6367 self.0.options = v.into();
6368 self
6369 }
6370
6371 pub async fn send(self) -> Result<longrunning::model::Operation> {
6378 (*self.0.stub)
6379 .create_management_dns_zone_binding(self.0.request, self.0.options)
6380 .await
6381 .map(gax::response::Response::into_body)
6382 }
6383
6384 pub fn poller(
6386 self,
6387 ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
6388 {
6389 type Operation = lro::internal::Operation<
6390 crate::model::ManagementDnsZoneBinding,
6391 crate::model::OperationMetadata,
6392 >;
6393 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6394 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6395
6396 let stub = self.0.stub.clone();
6397 let mut options = self.0.options.clone();
6398 options.set_retry_policy(gax::retry_policy::NeverRetry);
6399 let query = move |name| {
6400 let stub = stub.clone();
6401 let options = options.clone();
6402 async {
6403 let op = GetOperation::new(stub)
6404 .set_name(name)
6405 .with_options(options)
6406 .send()
6407 .await?;
6408 Ok(Operation::new(op))
6409 }
6410 };
6411
6412 let start = move || async {
6413 let op = self.send().await?;
6414 Ok(Operation::new(op))
6415 };
6416
6417 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6418 }
6419
6420 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6424 self.0.request.parent = v.into();
6425 self
6426 }
6427
6428 pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6432 where
6433 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6434 {
6435 self.0.request.management_dns_zone_binding = std::option::Option::Some(v.into());
6436 self
6437 }
6438
6439 pub fn set_or_clear_management_dns_zone_binding<T>(
6443 mut self,
6444 v: std::option::Option<T>,
6445 ) -> Self
6446 where
6447 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6448 {
6449 self.0.request.management_dns_zone_binding = v.map(|x| x.into());
6450 self
6451 }
6452
6453 pub fn set_management_dns_zone_binding_id<T: Into<std::string::String>>(
6457 mut self,
6458 v: T,
6459 ) -> Self {
6460 self.0.request.management_dns_zone_binding_id = v.into();
6461 self
6462 }
6463
6464 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6466 self.0.request.request_id = v.into();
6467 self
6468 }
6469 }
6470
6471 #[doc(hidden)]
6472 impl gax::options::internal::RequestBuilder for CreateManagementDnsZoneBinding {
6473 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6474 &mut self.0.options
6475 }
6476 }
6477
6478 #[derive(Clone, Debug)]
6497 pub struct UpdateManagementDnsZoneBinding(
6498 RequestBuilder<crate::model::UpdateManagementDnsZoneBindingRequest>,
6499 );
6500
6501 impl UpdateManagementDnsZoneBinding {
6502 pub(crate) fn new(
6503 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6504 ) -> Self {
6505 Self(RequestBuilder::new(stub))
6506 }
6507
6508 pub fn with_request<V: Into<crate::model::UpdateManagementDnsZoneBindingRequest>>(
6510 mut self,
6511 v: V,
6512 ) -> Self {
6513 self.0.request = v.into();
6514 self
6515 }
6516
6517 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6519 self.0.options = v.into();
6520 self
6521 }
6522
6523 pub async fn send(self) -> Result<longrunning::model::Operation> {
6530 (*self.0.stub)
6531 .update_management_dns_zone_binding(self.0.request, self.0.options)
6532 .await
6533 .map(gax::response::Response::into_body)
6534 }
6535
6536 pub fn poller(
6538 self,
6539 ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
6540 {
6541 type Operation = lro::internal::Operation<
6542 crate::model::ManagementDnsZoneBinding,
6543 crate::model::OperationMetadata,
6544 >;
6545 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6546 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6547
6548 let stub = self.0.stub.clone();
6549 let mut options = self.0.options.clone();
6550 options.set_retry_policy(gax::retry_policy::NeverRetry);
6551 let query = move |name| {
6552 let stub = stub.clone();
6553 let options = options.clone();
6554 async {
6555 let op = GetOperation::new(stub)
6556 .set_name(name)
6557 .with_options(options)
6558 .send()
6559 .await?;
6560 Ok(Operation::new(op))
6561 }
6562 };
6563
6564 let start = move || async {
6565 let op = self.send().await?;
6566 Ok(Operation::new(op))
6567 };
6568
6569 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6570 }
6571
6572 pub fn set_update_mask<T>(mut self, v: T) -> Self
6576 where
6577 T: std::convert::Into<wkt::FieldMask>,
6578 {
6579 self.0.request.update_mask = std::option::Option::Some(v.into());
6580 self
6581 }
6582
6583 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6587 where
6588 T: std::convert::Into<wkt::FieldMask>,
6589 {
6590 self.0.request.update_mask = v.map(|x| x.into());
6591 self
6592 }
6593
6594 pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6598 where
6599 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6600 {
6601 self.0.request.management_dns_zone_binding = std::option::Option::Some(v.into());
6602 self
6603 }
6604
6605 pub fn set_or_clear_management_dns_zone_binding<T>(
6609 mut self,
6610 v: std::option::Option<T>,
6611 ) -> Self
6612 where
6613 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6614 {
6615 self.0.request.management_dns_zone_binding = v.map(|x| x.into());
6616 self
6617 }
6618
6619 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6621 self.0.request.request_id = v.into();
6622 self
6623 }
6624 }
6625
6626 #[doc(hidden)]
6627 impl gax::options::internal::RequestBuilder for UpdateManagementDnsZoneBinding {
6628 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6629 &mut self.0.options
6630 }
6631 }
6632
6633 #[derive(Clone, Debug)]
6652 pub struct DeleteManagementDnsZoneBinding(
6653 RequestBuilder<crate::model::DeleteManagementDnsZoneBindingRequest>,
6654 );
6655
6656 impl DeleteManagementDnsZoneBinding {
6657 pub(crate) fn new(
6658 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6659 ) -> Self {
6660 Self(RequestBuilder::new(stub))
6661 }
6662
6663 pub fn with_request<V: Into<crate::model::DeleteManagementDnsZoneBindingRequest>>(
6665 mut self,
6666 v: V,
6667 ) -> Self {
6668 self.0.request = v.into();
6669 self
6670 }
6671
6672 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6674 self.0.options = v.into();
6675 self
6676 }
6677
6678 pub async fn send(self) -> Result<longrunning::model::Operation> {
6685 (*self.0.stub)
6686 .delete_management_dns_zone_binding(self.0.request, self.0.options)
6687 .await
6688 .map(gax::response::Response::into_body)
6689 }
6690
6691 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
6693 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6694 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6695 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6696
6697 let stub = self.0.stub.clone();
6698 let mut options = self.0.options.clone();
6699 options.set_retry_policy(gax::retry_policy::NeverRetry);
6700 let query = move |name| {
6701 let stub = stub.clone();
6702 let options = options.clone();
6703 async {
6704 let op = GetOperation::new(stub)
6705 .set_name(name)
6706 .with_options(options)
6707 .send()
6708 .await?;
6709 Ok(Operation::new(op))
6710 }
6711 };
6712
6713 let start = move || async {
6714 let op = self.send().await?;
6715 Ok(Operation::new(op))
6716 };
6717
6718 lro::internal::new_unit_response_poller(
6719 polling_error_policy,
6720 polling_backoff_policy,
6721 start,
6722 query,
6723 )
6724 }
6725
6726 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6730 self.0.request.name = v.into();
6731 self
6732 }
6733
6734 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6736 self.0.request.request_id = v.into();
6737 self
6738 }
6739 }
6740
6741 #[doc(hidden)]
6742 impl gax::options::internal::RequestBuilder for DeleteManagementDnsZoneBinding {
6743 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6744 &mut self.0.options
6745 }
6746 }
6747
6748 #[derive(Clone, Debug)]
6767 pub struct RepairManagementDnsZoneBinding(
6768 RequestBuilder<crate::model::RepairManagementDnsZoneBindingRequest>,
6769 );
6770
6771 impl RepairManagementDnsZoneBinding {
6772 pub(crate) fn new(
6773 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6774 ) -> Self {
6775 Self(RequestBuilder::new(stub))
6776 }
6777
6778 pub fn with_request<V: Into<crate::model::RepairManagementDnsZoneBindingRequest>>(
6780 mut self,
6781 v: V,
6782 ) -> Self {
6783 self.0.request = v.into();
6784 self
6785 }
6786
6787 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6789 self.0.options = v.into();
6790 self
6791 }
6792
6793 pub async fn send(self) -> Result<longrunning::model::Operation> {
6800 (*self.0.stub)
6801 .repair_management_dns_zone_binding(self.0.request, self.0.options)
6802 .await
6803 .map(gax::response::Response::into_body)
6804 }
6805
6806 pub fn poller(
6808 self,
6809 ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
6810 {
6811 type Operation = lro::internal::Operation<
6812 crate::model::ManagementDnsZoneBinding,
6813 crate::model::OperationMetadata,
6814 >;
6815 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6816 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6817
6818 let stub = self.0.stub.clone();
6819 let mut options = self.0.options.clone();
6820 options.set_retry_policy(gax::retry_policy::NeverRetry);
6821 let query = move |name| {
6822 let stub = stub.clone();
6823 let options = options.clone();
6824 async {
6825 let op = GetOperation::new(stub)
6826 .set_name(name)
6827 .with_options(options)
6828 .send()
6829 .await?;
6830 Ok(Operation::new(op))
6831 }
6832 };
6833
6834 let start = move || async {
6835 let op = self.send().await?;
6836 Ok(Operation::new(op))
6837 };
6838
6839 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6840 }
6841
6842 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6846 self.0.request.name = v.into();
6847 self
6848 }
6849
6850 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6852 self.0.request.request_id = v.into();
6853 self
6854 }
6855 }
6856
6857 #[doc(hidden)]
6858 impl gax::options::internal::RequestBuilder for RepairManagementDnsZoneBinding {
6859 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6860 &mut self.0.options
6861 }
6862 }
6863
6864 #[derive(Clone, Debug)]
6883 pub struct CreateVmwareEngineNetwork(
6884 RequestBuilder<crate::model::CreateVmwareEngineNetworkRequest>,
6885 );
6886
6887 impl CreateVmwareEngineNetwork {
6888 pub(crate) fn new(
6889 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6890 ) -> Self {
6891 Self(RequestBuilder::new(stub))
6892 }
6893
6894 pub fn with_request<V: Into<crate::model::CreateVmwareEngineNetworkRequest>>(
6896 mut self,
6897 v: V,
6898 ) -> Self {
6899 self.0.request = v.into();
6900 self
6901 }
6902
6903 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6905 self.0.options = v.into();
6906 self
6907 }
6908
6909 pub async fn send(self) -> Result<longrunning::model::Operation> {
6916 (*self.0.stub)
6917 .create_vmware_engine_network(self.0.request, self.0.options)
6918 .await
6919 .map(gax::response::Response::into_body)
6920 }
6921
6922 pub fn poller(
6924 self,
6925 ) -> impl lro::Poller<crate::model::VmwareEngineNetwork, crate::model::OperationMetadata>
6926 {
6927 type Operation = lro::internal::Operation<
6928 crate::model::VmwareEngineNetwork,
6929 crate::model::OperationMetadata,
6930 >;
6931 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6932 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6933
6934 let stub = self.0.stub.clone();
6935 let mut options = self.0.options.clone();
6936 options.set_retry_policy(gax::retry_policy::NeverRetry);
6937 let query = move |name| {
6938 let stub = stub.clone();
6939 let options = options.clone();
6940 async {
6941 let op = GetOperation::new(stub)
6942 .set_name(name)
6943 .with_options(options)
6944 .send()
6945 .await?;
6946 Ok(Operation::new(op))
6947 }
6948 };
6949
6950 let start = move || async {
6951 let op = self.send().await?;
6952 Ok(Operation::new(op))
6953 };
6954
6955 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6956 }
6957
6958 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6962 self.0.request.parent = v.into();
6963 self
6964 }
6965
6966 pub fn set_vmware_engine_network_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6970 self.0.request.vmware_engine_network_id = v.into();
6971 self
6972 }
6973
6974 pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
6978 where
6979 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
6980 {
6981 self.0.request.vmware_engine_network = std::option::Option::Some(v.into());
6982 self
6983 }
6984
6985 pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
6989 where
6990 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
6991 {
6992 self.0.request.vmware_engine_network = v.map(|x| x.into());
6993 self
6994 }
6995
6996 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6998 self.0.request.request_id = v.into();
6999 self
7000 }
7001 }
7002
7003 #[doc(hidden)]
7004 impl gax::options::internal::RequestBuilder for CreateVmwareEngineNetwork {
7005 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7006 &mut self.0.options
7007 }
7008 }
7009
7010 #[derive(Clone, Debug)]
7029 pub struct UpdateVmwareEngineNetwork(
7030 RequestBuilder<crate::model::UpdateVmwareEngineNetworkRequest>,
7031 );
7032
7033 impl UpdateVmwareEngineNetwork {
7034 pub(crate) fn new(
7035 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7036 ) -> Self {
7037 Self(RequestBuilder::new(stub))
7038 }
7039
7040 pub fn with_request<V: Into<crate::model::UpdateVmwareEngineNetworkRequest>>(
7042 mut self,
7043 v: V,
7044 ) -> Self {
7045 self.0.request = v.into();
7046 self
7047 }
7048
7049 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7051 self.0.options = v.into();
7052 self
7053 }
7054
7055 pub async fn send(self) -> Result<longrunning::model::Operation> {
7062 (*self.0.stub)
7063 .update_vmware_engine_network(self.0.request, self.0.options)
7064 .await
7065 .map(gax::response::Response::into_body)
7066 }
7067
7068 pub fn poller(
7070 self,
7071 ) -> impl lro::Poller<crate::model::VmwareEngineNetwork, crate::model::OperationMetadata>
7072 {
7073 type Operation = lro::internal::Operation<
7074 crate::model::VmwareEngineNetwork,
7075 crate::model::OperationMetadata,
7076 >;
7077 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7078 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7079
7080 let stub = self.0.stub.clone();
7081 let mut options = self.0.options.clone();
7082 options.set_retry_policy(gax::retry_policy::NeverRetry);
7083 let query = move |name| {
7084 let stub = stub.clone();
7085 let options = options.clone();
7086 async {
7087 let op = GetOperation::new(stub)
7088 .set_name(name)
7089 .with_options(options)
7090 .send()
7091 .await?;
7092 Ok(Operation::new(op))
7093 }
7094 };
7095
7096 let start = move || async {
7097 let op = self.send().await?;
7098 Ok(Operation::new(op))
7099 };
7100
7101 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7102 }
7103
7104 pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7108 where
7109 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7110 {
7111 self.0.request.vmware_engine_network = std::option::Option::Some(v.into());
7112 self
7113 }
7114
7115 pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7119 where
7120 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7121 {
7122 self.0.request.vmware_engine_network = v.map(|x| x.into());
7123 self
7124 }
7125
7126 pub fn set_update_mask<T>(mut self, v: T) -> Self
7130 where
7131 T: std::convert::Into<wkt::FieldMask>,
7132 {
7133 self.0.request.update_mask = std::option::Option::Some(v.into());
7134 self
7135 }
7136
7137 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7141 where
7142 T: std::convert::Into<wkt::FieldMask>,
7143 {
7144 self.0.request.update_mask = v.map(|x| x.into());
7145 self
7146 }
7147
7148 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7150 self.0.request.request_id = v.into();
7151 self
7152 }
7153 }
7154
7155 #[doc(hidden)]
7156 impl gax::options::internal::RequestBuilder for UpdateVmwareEngineNetwork {
7157 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7158 &mut self.0.options
7159 }
7160 }
7161
7162 #[derive(Clone, Debug)]
7181 pub struct DeleteVmwareEngineNetwork(
7182 RequestBuilder<crate::model::DeleteVmwareEngineNetworkRequest>,
7183 );
7184
7185 impl DeleteVmwareEngineNetwork {
7186 pub(crate) fn new(
7187 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7188 ) -> Self {
7189 Self(RequestBuilder::new(stub))
7190 }
7191
7192 pub fn with_request<V: Into<crate::model::DeleteVmwareEngineNetworkRequest>>(
7194 mut self,
7195 v: V,
7196 ) -> Self {
7197 self.0.request = v.into();
7198 self
7199 }
7200
7201 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7203 self.0.options = v.into();
7204 self
7205 }
7206
7207 pub async fn send(self) -> Result<longrunning::model::Operation> {
7214 (*self.0.stub)
7215 .delete_vmware_engine_network(self.0.request, self.0.options)
7216 .await
7217 .map(gax::response::Response::into_body)
7218 }
7219
7220 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
7222 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7223 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7224 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7225
7226 let stub = self.0.stub.clone();
7227 let mut options = self.0.options.clone();
7228 options.set_retry_policy(gax::retry_policy::NeverRetry);
7229 let query = move |name| {
7230 let stub = stub.clone();
7231 let options = options.clone();
7232 async {
7233 let op = GetOperation::new(stub)
7234 .set_name(name)
7235 .with_options(options)
7236 .send()
7237 .await?;
7238 Ok(Operation::new(op))
7239 }
7240 };
7241
7242 let start = move || async {
7243 let op = self.send().await?;
7244 Ok(Operation::new(op))
7245 };
7246
7247 lro::internal::new_unit_response_poller(
7248 polling_error_policy,
7249 polling_backoff_policy,
7250 start,
7251 query,
7252 )
7253 }
7254
7255 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7259 self.0.request.name = v.into();
7260 self
7261 }
7262
7263 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7265 self.0.request.request_id = v.into();
7266 self
7267 }
7268
7269 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7271 self.0.request.etag = v.into();
7272 self
7273 }
7274 }
7275
7276 #[doc(hidden)]
7277 impl gax::options::internal::RequestBuilder for DeleteVmwareEngineNetwork {
7278 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7279 &mut self.0.options
7280 }
7281 }
7282
7283 #[derive(Clone, Debug)]
7301 pub struct GetVmwareEngineNetwork(RequestBuilder<crate::model::GetVmwareEngineNetworkRequest>);
7302
7303 impl GetVmwareEngineNetwork {
7304 pub(crate) fn new(
7305 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7306 ) -> Self {
7307 Self(RequestBuilder::new(stub))
7308 }
7309
7310 pub fn with_request<V: Into<crate::model::GetVmwareEngineNetworkRequest>>(
7312 mut self,
7313 v: V,
7314 ) -> Self {
7315 self.0.request = v.into();
7316 self
7317 }
7318
7319 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7321 self.0.options = v.into();
7322 self
7323 }
7324
7325 pub async fn send(self) -> Result<crate::model::VmwareEngineNetwork> {
7327 (*self.0.stub)
7328 .get_vmware_engine_network(self.0.request, self.0.options)
7329 .await
7330 .map(gax::response::Response::into_body)
7331 }
7332
7333 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7337 self.0.request.name = v.into();
7338 self
7339 }
7340 }
7341
7342 #[doc(hidden)]
7343 impl gax::options::internal::RequestBuilder for GetVmwareEngineNetwork {
7344 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7345 &mut self.0.options
7346 }
7347 }
7348
7349 #[derive(Clone, Debug)]
7371 pub struct ListVmwareEngineNetworks(
7372 RequestBuilder<crate::model::ListVmwareEngineNetworksRequest>,
7373 );
7374
7375 impl ListVmwareEngineNetworks {
7376 pub(crate) fn new(
7377 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7378 ) -> Self {
7379 Self(RequestBuilder::new(stub))
7380 }
7381
7382 pub fn with_request<V: Into<crate::model::ListVmwareEngineNetworksRequest>>(
7384 mut self,
7385 v: V,
7386 ) -> Self {
7387 self.0.request = v.into();
7388 self
7389 }
7390
7391 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7393 self.0.options = v.into();
7394 self
7395 }
7396
7397 pub async fn send(self) -> Result<crate::model::ListVmwareEngineNetworksResponse> {
7399 (*self.0.stub)
7400 .list_vmware_engine_networks(self.0.request, self.0.options)
7401 .await
7402 .map(gax::response::Response::into_body)
7403 }
7404
7405 pub fn by_page(
7407 self,
7408 ) -> impl gax::paginator::Paginator<
7409 crate::model::ListVmwareEngineNetworksResponse,
7410 gax::error::Error,
7411 > {
7412 use std::clone::Clone;
7413 let token = self.0.request.page_token.clone();
7414 let execute = move |token: String| {
7415 let mut builder = self.clone();
7416 builder.0.request = builder.0.request.set_page_token(token);
7417 builder.send()
7418 };
7419 gax::paginator::internal::new_paginator(token, execute)
7420 }
7421
7422 pub fn by_item(
7424 self,
7425 ) -> impl gax::paginator::ItemPaginator<
7426 crate::model::ListVmwareEngineNetworksResponse,
7427 gax::error::Error,
7428 > {
7429 use gax::paginator::Paginator;
7430 self.by_page().items()
7431 }
7432
7433 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7437 self.0.request.parent = v.into();
7438 self
7439 }
7440
7441 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7443 self.0.request.page_size = v.into();
7444 self
7445 }
7446
7447 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7449 self.0.request.page_token = v.into();
7450 self
7451 }
7452
7453 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7455 self.0.request.filter = v.into();
7456 self
7457 }
7458
7459 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7461 self.0.request.order_by = v.into();
7462 self
7463 }
7464 }
7465
7466 #[doc(hidden)]
7467 impl gax::options::internal::RequestBuilder for ListVmwareEngineNetworks {
7468 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7469 &mut self.0.options
7470 }
7471 }
7472
7473 #[derive(Clone, Debug)]
7492 pub struct CreatePrivateConnection(
7493 RequestBuilder<crate::model::CreatePrivateConnectionRequest>,
7494 );
7495
7496 impl CreatePrivateConnection {
7497 pub(crate) fn new(
7498 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7499 ) -> Self {
7500 Self(RequestBuilder::new(stub))
7501 }
7502
7503 pub fn with_request<V: Into<crate::model::CreatePrivateConnectionRequest>>(
7505 mut self,
7506 v: V,
7507 ) -> Self {
7508 self.0.request = v.into();
7509 self
7510 }
7511
7512 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7514 self.0.options = v.into();
7515 self
7516 }
7517
7518 pub async fn send(self) -> Result<longrunning::model::Operation> {
7525 (*self.0.stub)
7526 .create_private_connection(self.0.request, self.0.options)
7527 .await
7528 .map(gax::response::Response::into_body)
7529 }
7530
7531 pub fn poller(
7533 self,
7534 ) -> impl lro::Poller<crate::model::PrivateConnection, crate::model::OperationMetadata>
7535 {
7536 type Operation = lro::internal::Operation<
7537 crate::model::PrivateConnection,
7538 crate::model::OperationMetadata,
7539 >;
7540 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7541 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7542
7543 let stub = self.0.stub.clone();
7544 let mut options = self.0.options.clone();
7545 options.set_retry_policy(gax::retry_policy::NeverRetry);
7546 let query = move |name| {
7547 let stub = stub.clone();
7548 let options = options.clone();
7549 async {
7550 let op = GetOperation::new(stub)
7551 .set_name(name)
7552 .with_options(options)
7553 .send()
7554 .await?;
7555 Ok(Operation::new(op))
7556 }
7557 };
7558
7559 let start = move || async {
7560 let op = self.send().await?;
7561 Ok(Operation::new(op))
7562 };
7563
7564 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7565 }
7566
7567 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7571 self.0.request.parent = v.into();
7572 self
7573 }
7574
7575 pub fn set_private_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7579 self.0.request.private_connection_id = v.into();
7580 self
7581 }
7582
7583 pub fn set_private_connection<T>(mut self, v: T) -> Self
7587 where
7588 T: std::convert::Into<crate::model::PrivateConnection>,
7589 {
7590 self.0.request.private_connection = std::option::Option::Some(v.into());
7591 self
7592 }
7593
7594 pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
7598 where
7599 T: std::convert::Into<crate::model::PrivateConnection>,
7600 {
7601 self.0.request.private_connection = v.map(|x| x.into());
7602 self
7603 }
7604
7605 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7607 self.0.request.request_id = v.into();
7608 self
7609 }
7610 }
7611
7612 #[doc(hidden)]
7613 impl gax::options::internal::RequestBuilder for CreatePrivateConnection {
7614 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7615 &mut self.0.options
7616 }
7617 }
7618
7619 #[derive(Clone, Debug)]
7637 pub struct GetPrivateConnection(RequestBuilder<crate::model::GetPrivateConnectionRequest>);
7638
7639 impl GetPrivateConnection {
7640 pub(crate) fn new(
7641 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7642 ) -> Self {
7643 Self(RequestBuilder::new(stub))
7644 }
7645
7646 pub fn with_request<V: Into<crate::model::GetPrivateConnectionRequest>>(
7648 mut self,
7649 v: V,
7650 ) -> Self {
7651 self.0.request = v.into();
7652 self
7653 }
7654
7655 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7657 self.0.options = v.into();
7658 self
7659 }
7660
7661 pub async fn send(self) -> Result<crate::model::PrivateConnection> {
7663 (*self.0.stub)
7664 .get_private_connection(self.0.request, self.0.options)
7665 .await
7666 .map(gax::response::Response::into_body)
7667 }
7668
7669 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7673 self.0.request.name = v.into();
7674 self
7675 }
7676 }
7677
7678 #[doc(hidden)]
7679 impl gax::options::internal::RequestBuilder for GetPrivateConnection {
7680 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7681 &mut self.0.options
7682 }
7683 }
7684
7685 #[derive(Clone, Debug)]
7707 pub struct ListPrivateConnections(RequestBuilder<crate::model::ListPrivateConnectionsRequest>);
7708
7709 impl ListPrivateConnections {
7710 pub(crate) fn new(
7711 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7712 ) -> Self {
7713 Self(RequestBuilder::new(stub))
7714 }
7715
7716 pub fn with_request<V: Into<crate::model::ListPrivateConnectionsRequest>>(
7718 mut self,
7719 v: V,
7720 ) -> Self {
7721 self.0.request = v.into();
7722 self
7723 }
7724
7725 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7727 self.0.options = v.into();
7728 self
7729 }
7730
7731 pub async fn send(self) -> Result<crate::model::ListPrivateConnectionsResponse> {
7733 (*self.0.stub)
7734 .list_private_connections(self.0.request, self.0.options)
7735 .await
7736 .map(gax::response::Response::into_body)
7737 }
7738
7739 pub fn by_page(
7741 self,
7742 ) -> impl gax::paginator::Paginator<
7743 crate::model::ListPrivateConnectionsResponse,
7744 gax::error::Error,
7745 > {
7746 use std::clone::Clone;
7747 let token = self.0.request.page_token.clone();
7748 let execute = move |token: String| {
7749 let mut builder = self.clone();
7750 builder.0.request = builder.0.request.set_page_token(token);
7751 builder.send()
7752 };
7753 gax::paginator::internal::new_paginator(token, execute)
7754 }
7755
7756 pub fn by_item(
7758 self,
7759 ) -> impl gax::paginator::ItemPaginator<
7760 crate::model::ListPrivateConnectionsResponse,
7761 gax::error::Error,
7762 > {
7763 use gax::paginator::Paginator;
7764 self.by_page().items()
7765 }
7766
7767 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7771 self.0.request.parent = v.into();
7772 self
7773 }
7774
7775 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7777 self.0.request.page_size = v.into();
7778 self
7779 }
7780
7781 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7783 self.0.request.page_token = v.into();
7784 self
7785 }
7786
7787 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7789 self.0.request.filter = v.into();
7790 self
7791 }
7792
7793 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7795 self.0.request.order_by = v.into();
7796 self
7797 }
7798 }
7799
7800 #[doc(hidden)]
7801 impl gax::options::internal::RequestBuilder for ListPrivateConnections {
7802 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7803 &mut self.0.options
7804 }
7805 }
7806
7807 #[derive(Clone, Debug)]
7826 pub struct UpdatePrivateConnection(
7827 RequestBuilder<crate::model::UpdatePrivateConnectionRequest>,
7828 );
7829
7830 impl UpdatePrivateConnection {
7831 pub(crate) fn new(
7832 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7833 ) -> Self {
7834 Self(RequestBuilder::new(stub))
7835 }
7836
7837 pub fn with_request<V: Into<crate::model::UpdatePrivateConnectionRequest>>(
7839 mut self,
7840 v: V,
7841 ) -> Self {
7842 self.0.request = v.into();
7843 self
7844 }
7845
7846 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7848 self.0.options = v.into();
7849 self
7850 }
7851
7852 pub async fn send(self) -> Result<longrunning::model::Operation> {
7859 (*self.0.stub)
7860 .update_private_connection(self.0.request, self.0.options)
7861 .await
7862 .map(gax::response::Response::into_body)
7863 }
7864
7865 pub fn poller(
7867 self,
7868 ) -> impl lro::Poller<crate::model::PrivateConnection, crate::model::OperationMetadata>
7869 {
7870 type Operation = lro::internal::Operation<
7871 crate::model::PrivateConnection,
7872 crate::model::OperationMetadata,
7873 >;
7874 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7875 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7876
7877 let stub = self.0.stub.clone();
7878 let mut options = self.0.options.clone();
7879 options.set_retry_policy(gax::retry_policy::NeverRetry);
7880 let query = move |name| {
7881 let stub = stub.clone();
7882 let options = options.clone();
7883 async {
7884 let op = GetOperation::new(stub)
7885 .set_name(name)
7886 .with_options(options)
7887 .send()
7888 .await?;
7889 Ok(Operation::new(op))
7890 }
7891 };
7892
7893 let start = move || async {
7894 let op = self.send().await?;
7895 Ok(Operation::new(op))
7896 };
7897
7898 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7899 }
7900
7901 pub fn set_private_connection<T>(mut self, v: T) -> Self
7905 where
7906 T: std::convert::Into<crate::model::PrivateConnection>,
7907 {
7908 self.0.request.private_connection = std::option::Option::Some(v.into());
7909 self
7910 }
7911
7912 pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
7916 where
7917 T: std::convert::Into<crate::model::PrivateConnection>,
7918 {
7919 self.0.request.private_connection = v.map(|x| x.into());
7920 self
7921 }
7922
7923 pub fn set_update_mask<T>(mut self, v: T) -> Self
7927 where
7928 T: std::convert::Into<wkt::FieldMask>,
7929 {
7930 self.0.request.update_mask = std::option::Option::Some(v.into());
7931 self
7932 }
7933
7934 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7938 where
7939 T: std::convert::Into<wkt::FieldMask>,
7940 {
7941 self.0.request.update_mask = v.map(|x| x.into());
7942 self
7943 }
7944
7945 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7947 self.0.request.request_id = v.into();
7948 self
7949 }
7950 }
7951
7952 #[doc(hidden)]
7953 impl gax::options::internal::RequestBuilder for UpdatePrivateConnection {
7954 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7955 &mut self.0.options
7956 }
7957 }
7958
7959 #[derive(Clone, Debug)]
7978 pub struct DeletePrivateConnection(
7979 RequestBuilder<crate::model::DeletePrivateConnectionRequest>,
7980 );
7981
7982 impl DeletePrivateConnection {
7983 pub(crate) fn new(
7984 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7985 ) -> Self {
7986 Self(RequestBuilder::new(stub))
7987 }
7988
7989 pub fn with_request<V: Into<crate::model::DeletePrivateConnectionRequest>>(
7991 mut self,
7992 v: V,
7993 ) -> Self {
7994 self.0.request = v.into();
7995 self
7996 }
7997
7998 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8000 self.0.options = v.into();
8001 self
8002 }
8003
8004 pub async fn send(self) -> Result<longrunning::model::Operation> {
8011 (*self.0.stub)
8012 .delete_private_connection(self.0.request, self.0.options)
8013 .await
8014 .map(gax::response::Response::into_body)
8015 }
8016
8017 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
8019 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
8020 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8021 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8022
8023 let stub = self.0.stub.clone();
8024 let mut options = self.0.options.clone();
8025 options.set_retry_policy(gax::retry_policy::NeverRetry);
8026 let query = move |name| {
8027 let stub = stub.clone();
8028 let options = options.clone();
8029 async {
8030 let op = GetOperation::new(stub)
8031 .set_name(name)
8032 .with_options(options)
8033 .send()
8034 .await?;
8035 Ok(Operation::new(op))
8036 }
8037 };
8038
8039 let start = move || async {
8040 let op = self.send().await?;
8041 Ok(Operation::new(op))
8042 };
8043
8044 lro::internal::new_unit_response_poller(
8045 polling_error_policy,
8046 polling_backoff_policy,
8047 start,
8048 query,
8049 )
8050 }
8051
8052 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8056 self.0.request.name = v.into();
8057 self
8058 }
8059
8060 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8062 self.0.request.request_id = v.into();
8063 self
8064 }
8065 }
8066
8067 #[doc(hidden)]
8068 impl gax::options::internal::RequestBuilder for DeletePrivateConnection {
8069 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8070 &mut self.0.options
8071 }
8072 }
8073
8074 #[derive(Clone, Debug)]
8096 pub struct ListPrivateConnectionPeeringRoutes(
8097 RequestBuilder<crate::model::ListPrivateConnectionPeeringRoutesRequest>,
8098 );
8099
8100 impl ListPrivateConnectionPeeringRoutes {
8101 pub(crate) fn new(
8102 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8103 ) -> Self {
8104 Self(RequestBuilder::new(stub))
8105 }
8106
8107 pub fn with_request<V: Into<crate::model::ListPrivateConnectionPeeringRoutesRequest>>(
8109 mut self,
8110 v: V,
8111 ) -> Self {
8112 self.0.request = v.into();
8113 self
8114 }
8115
8116 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8118 self.0.options = v.into();
8119 self
8120 }
8121
8122 pub async fn send(
8124 self,
8125 ) -> Result<crate::model::ListPrivateConnectionPeeringRoutesResponse> {
8126 (*self.0.stub)
8127 .list_private_connection_peering_routes(self.0.request, self.0.options)
8128 .await
8129 .map(gax::response::Response::into_body)
8130 }
8131
8132 pub fn by_page(
8134 self,
8135 ) -> impl gax::paginator::Paginator<
8136 crate::model::ListPrivateConnectionPeeringRoutesResponse,
8137 gax::error::Error,
8138 > {
8139 use std::clone::Clone;
8140 let token = self.0.request.page_token.clone();
8141 let execute = move |token: String| {
8142 let mut builder = self.clone();
8143 builder.0.request = builder.0.request.set_page_token(token);
8144 builder.send()
8145 };
8146 gax::paginator::internal::new_paginator(token, execute)
8147 }
8148
8149 pub fn by_item(
8151 self,
8152 ) -> impl gax::paginator::ItemPaginator<
8153 crate::model::ListPrivateConnectionPeeringRoutesResponse,
8154 gax::error::Error,
8155 > {
8156 use gax::paginator::Paginator;
8157 self.by_page().items()
8158 }
8159
8160 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8164 self.0.request.parent = v.into();
8165 self
8166 }
8167
8168 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8170 self.0.request.page_size = v.into();
8171 self
8172 }
8173
8174 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8176 self.0.request.page_token = v.into();
8177 self
8178 }
8179 }
8180
8181 #[doc(hidden)]
8182 impl gax::options::internal::RequestBuilder for ListPrivateConnectionPeeringRoutes {
8183 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8184 &mut self.0.options
8185 }
8186 }
8187
8188 #[derive(Clone, Debug)]
8207 pub struct GrantDnsBindPermission(RequestBuilder<crate::model::GrantDnsBindPermissionRequest>);
8208
8209 impl GrantDnsBindPermission {
8210 pub(crate) fn new(
8211 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8212 ) -> Self {
8213 Self(RequestBuilder::new(stub))
8214 }
8215
8216 pub fn with_request<V: Into<crate::model::GrantDnsBindPermissionRequest>>(
8218 mut self,
8219 v: V,
8220 ) -> Self {
8221 self.0.request = v.into();
8222 self
8223 }
8224
8225 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8227 self.0.options = v.into();
8228 self
8229 }
8230
8231 pub async fn send(self) -> Result<longrunning::model::Operation> {
8238 (*self.0.stub)
8239 .grant_dns_bind_permission(self.0.request, self.0.options)
8240 .await
8241 .map(gax::response::Response::into_body)
8242 }
8243
8244 pub fn poller(
8246 self,
8247 ) -> impl lro::Poller<crate::model::DnsBindPermission, crate::model::OperationMetadata>
8248 {
8249 type Operation = lro::internal::Operation<
8250 crate::model::DnsBindPermission,
8251 crate::model::OperationMetadata,
8252 >;
8253 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8254 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8255
8256 let stub = self.0.stub.clone();
8257 let mut options = self.0.options.clone();
8258 options.set_retry_policy(gax::retry_policy::NeverRetry);
8259 let query = move |name| {
8260 let stub = stub.clone();
8261 let options = options.clone();
8262 async {
8263 let op = GetOperation::new(stub)
8264 .set_name(name)
8265 .with_options(options)
8266 .send()
8267 .await?;
8268 Ok(Operation::new(op))
8269 }
8270 };
8271
8272 let start = move || async {
8273 let op = self.send().await?;
8274 Ok(Operation::new(op))
8275 };
8276
8277 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
8278 }
8279
8280 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8284 self.0.request.name = v.into();
8285 self
8286 }
8287
8288 pub fn set_principal<T>(mut self, v: T) -> Self
8292 where
8293 T: std::convert::Into<crate::model::Principal>,
8294 {
8295 self.0.request.principal = std::option::Option::Some(v.into());
8296 self
8297 }
8298
8299 pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8303 where
8304 T: std::convert::Into<crate::model::Principal>,
8305 {
8306 self.0.request.principal = v.map(|x| x.into());
8307 self
8308 }
8309
8310 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8312 self.0.request.request_id = v.into();
8313 self
8314 }
8315 }
8316
8317 #[doc(hidden)]
8318 impl gax::options::internal::RequestBuilder for GrantDnsBindPermission {
8319 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8320 &mut self.0.options
8321 }
8322 }
8323
8324 #[derive(Clone, Debug)]
8342 pub struct GetDnsBindPermission(RequestBuilder<crate::model::GetDnsBindPermissionRequest>);
8343
8344 impl GetDnsBindPermission {
8345 pub(crate) fn new(
8346 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8347 ) -> Self {
8348 Self(RequestBuilder::new(stub))
8349 }
8350
8351 pub fn with_request<V: Into<crate::model::GetDnsBindPermissionRequest>>(
8353 mut self,
8354 v: V,
8355 ) -> Self {
8356 self.0.request = v.into();
8357 self
8358 }
8359
8360 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8362 self.0.options = v.into();
8363 self
8364 }
8365
8366 pub async fn send(self) -> Result<crate::model::DnsBindPermission> {
8368 (*self.0.stub)
8369 .get_dns_bind_permission(self.0.request, self.0.options)
8370 .await
8371 .map(gax::response::Response::into_body)
8372 }
8373
8374 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8378 self.0.request.name = v.into();
8379 self
8380 }
8381 }
8382
8383 #[doc(hidden)]
8384 impl gax::options::internal::RequestBuilder for GetDnsBindPermission {
8385 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8386 &mut self.0.options
8387 }
8388 }
8389
8390 #[derive(Clone, Debug)]
8409 pub struct RevokeDnsBindPermission(
8410 RequestBuilder<crate::model::RevokeDnsBindPermissionRequest>,
8411 );
8412
8413 impl RevokeDnsBindPermission {
8414 pub(crate) fn new(
8415 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8416 ) -> Self {
8417 Self(RequestBuilder::new(stub))
8418 }
8419
8420 pub fn with_request<V: Into<crate::model::RevokeDnsBindPermissionRequest>>(
8422 mut self,
8423 v: V,
8424 ) -> Self {
8425 self.0.request = v.into();
8426 self
8427 }
8428
8429 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8431 self.0.options = v.into();
8432 self
8433 }
8434
8435 pub async fn send(self) -> Result<longrunning::model::Operation> {
8442 (*self.0.stub)
8443 .revoke_dns_bind_permission(self.0.request, self.0.options)
8444 .await
8445 .map(gax::response::Response::into_body)
8446 }
8447
8448 pub fn poller(
8450 self,
8451 ) -> impl lro::Poller<crate::model::DnsBindPermission, crate::model::OperationMetadata>
8452 {
8453 type Operation = lro::internal::Operation<
8454 crate::model::DnsBindPermission,
8455 crate::model::OperationMetadata,
8456 >;
8457 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8458 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8459
8460 let stub = self.0.stub.clone();
8461 let mut options = self.0.options.clone();
8462 options.set_retry_policy(gax::retry_policy::NeverRetry);
8463 let query = move |name| {
8464 let stub = stub.clone();
8465 let options = options.clone();
8466 async {
8467 let op = GetOperation::new(stub)
8468 .set_name(name)
8469 .with_options(options)
8470 .send()
8471 .await?;
8472 Ok(Operation::new(op))
8473 }
8474 };
8475
8476 let start = move || async {
8477 let op = self.send().await?;
8478 Ok(Operation::new(op))
8479 };
8480
8481 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
8482 }
8483
8484 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8488 self.0.request.name = v.into();
8489 self
8490 }
8491
8492 pub fn set_principal<T>(mut self, v: T) -> Self
8496 where
8497 T: std::convert::Into<crate::model::Principal>,
8498 {
8499 self.0.request.principal = std::option::Option::Some(v.into());
8500 self
8501 }
8502
8503 pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8507 where
8508 T: std::convert::Into<crate::model::Principal>,
8509 {
8510 self.0.request.principal = v.map(|x| x.into());
8511 self
8512 }
8513
8514 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8516 self.0.request.request_id = v.into();
8517 self
8518 }
8519 }
8520
8521 #[doc(hidden)]
8522 impl gax::options::internal::RequestBuilder for RevokeDnsBindPermission {
8523 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8524 &mut self.0.options
8525 }
8526 }
8527
8528 #[derive(Clone, Debug)]
8550 pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
8551
8552 impl ListLocations {
8553 pub(crate) fn new(
8554 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8555 ) -> Self {
8556 Self(RequestBuilder::new(stub))
8557 }
8558
8559 pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
8561 mut self,
8562 v: V,
8563 ) -> Self {
8564 self.0.request = v.into();
8565 self
8566 }
8567
8568 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8570 self.0.options = v.into();
8571 self
8572 }
8573
8574 pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
8576 (*self.0.stub)
8577 .list_locations(self.0.request, self.0.options)
8578 .await
8579 .map(gax::response::Response::into_body)
8580 }
8581
8582 pub fn by_page(
8584 self,
8585 ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
8586 {
8587 use std::clone::Clone;
8588 let token = self.0.request.page_token.clone();
8589 let execute = move |token: String| {
8590 let mut builder = self.clone();
8591 builder.0.request = builder.0.request.set_page_token(token);
8592 builder.send()
8593 };
8594 gax::paginator::internal::new_paginator(token, execute)
8595 }
8596
8597 pub fn by_item(
8599 self,
8600 ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
8601 {
8602 use gax::paginator::Paginator;
8603 self.by_page().items()
8604 }
8605
8606 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8608 self.0.request.name = v.into();
8609 self
8610 }
8611
8612 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8614 self.0.request.filter = v.into();
8615 self
8616 }
8617
8618 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8620 self.0.request.page_size = v.into();
8621 self
8622 }
8623
8624 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8626 self.0.request.page_token = v.into();
8627 self
8628 }
8629 }
8630
8631 #[doc(hidden)]
8632 impl gax::options::internal::RequestBuilder for ListLocations {
8633 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8634 &mut self.0.options
8635 }
8636 }
8637
8638 #[derive(Clone, Debug)]
8656 pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
8657
8658 impl GetLocation {
8659 pub(crate) fn new(
8660 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8661 ) -> Self {
8662 Self(RequestBuilder::new(stub))
8663 }
8664
8665 pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
8667 self.0.request = v.into();
8668 self
8669 }
8670
8671 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8673 self.0.options = v.into();
8674 self
8675 }
8676
8677 pub async fn send(self) -> Result<location::model::Location> {
8679 (*self.0.stub)
8680 .get_location(self.0.request, self.0.options)
8681 .await
8682 .map(gax::response::Response::into_body)
8683 }
8684
8685 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8687 self.0.request.name = v.into();
8688 self
8689 }
8690 }
8691
8692 #[doc(hidden)]
8693 impl gax::options::internal::RequestBuilder for GetLocation {
8694 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8695 &mut self.0.options
8696 }
8697 }
8698
8699 #[derive(Clone, Debug)]
8717 pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
8718
8719 impl SetIamPolicy {
8720 pub(crate) fn new(
8721 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8722 ) -> Self {
8723 Self(RequestBuilder::new(stub))
8724 }
8725
8726 pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
8728 self.0.request = v.into();
8729 self
8730 }
8731
8732 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8734 self.0.options = v.into();
8735 self
8736 }
8737
8738 pub async fn send(self) -> Result<iam_v1::model::Policy> {
8740 (*self.0.stub)
8741 .set_iam_policy(self.0.request, self.0.options)
8742 .await
8743 .map(gax::response::Response::into_body)
8744 }
8745
8746 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8750 self.0.request.resource = v.into();
8751 self
8752 }
8753
8754 pub fn set_policy<T>(mut self, v: T) -> Self
8758 where
8759 T: std::convert::Into<iam_v1::model::Policy>,
8760 {
8761 self.0.request.policy = std::option::Option::Some(v.into());
8762 self
8763 }
8764
8765 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8769 where
8770 T: std::convert::Into<iam_v1::model::Policy>,
8771 {
8772 self.0.request.policy = v.map(|x| x.into());
8773 self
8774 }
8775
8776 pub fn set_update_mask<T>(mut self, v: T) -> Self
8778 where
8779 T: std::convert::Into<wkt::FieldMask>,
8780 {
8781 self.0.request.update_mask = std::option::Option::Some(v.into());
8782 self
8783 }
8784
8785 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8787 where
8788 T: std::convert::Into<wkt::FieldMask>,
8789 {
8790 self.0.request.update_mask = v.map(|x| x.into());
8791 self
8792 }
8793 }
8794
8795 #[doc(hidden)]
8796 impl gax::options::internal::RequestBuilder for SetIamPolicy {
8797 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8798 &mut self.0.options
8799 }
8800 }
8801
8802 #[derive(Clone, Debug)]
8820 pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
8821
8822 impl GetIamPolicy {
8823 pub(crate) fn new(
8824 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8825 ) -> Self {
8826 Self(RequestBuilder::new(stub))
8827 }
8828
8829 pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
8831 self.0.request = v.into();
8832 self
8833 }
8834
8835 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8837 self.0.options = v.into();
8838 self
8839 }
8840
8841 pub async fn send(self) -> Result<iam_v1::model::Policy> {
8843 (*self.0.stub)
8844 .get_iam_policy(self.0.request, self.0.options)
8845 .await
8846 .map(gax::response::Response::into_body)
8847 }
8848
8849 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8853 self.0.request.resource = v.into();
8854 self
8855 }
8856
8857 pub fn set_options<T>(mut self, v: T) -> Self
8859 where
8860 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
8861 {
8862 self.0.request.options = std::option::Option::Some(v.into());
8863 self
8864 }
8865
8866 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
8868 where
8869 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
8870 {
8871 self.0.request.options = v.map(|x| x.into());
8872 self
8873 }
8874 }
8875
8876 #[doc(hidden)]
8877 impl gax::options::internal::RequestBuilder for GetIamPolicy {
8878 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8879 &mut self.0.options
8880 }
8881 }
8882
8883 #[derive(Clone, Debug)]
8901 pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
8902
8903 impl TestIamPermissions {
8904 pub(crate) fn new(
8905 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8906 ) -> Self {
8907 Self(RequestBuilder::new(stub))
8908 }
8909
8910 pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
8912 mut self,
8913 v: V,
8914 ) -> Self {
8915 self.0.request = v.into();
8916 self
8917 }
8918
8919 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8921 self.0.options = v.into();
8922 self
8923 }
8924
8925 pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
8927 (*self.0.stub)
8928 .test_iam_permissions(self.0.request, self.0.options)
8929 .await
8930 .map(gax::response::Response::into_body)
8931 }
8932
8933 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8937 self.0.request.resource = v.into();
8938 self
8939 }
8940
8941 pub fn set_permissions<T, V>(mut self, v: T) -> Self
8945 where
8946 T: std::iter::IntoIterator<Item = V>,
8947 V: std::convert::Into<std::string::String>,
8948 {
8949 use std::iter::Iterator;
8950 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8951 self
8952 }
8953 }
8954
8955 #[doc(hidden)]
8956 impl gax::options::internal::RequestBuilder for TestIamPermissions {
8957 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8958 &mut self.0.options
8959 }
8960 }
8961
8962 #[derive(Clone, Debug)]
8984 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
8985
8986 impl ListOperations {
8987 pub(crate) fn new(
8988 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8989 ) -> Self {
8990 Self(RequestBuilder::new(stub))
8991 }
8992
8993 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
8995 mut self,
8996 v: V,
8997 ) -> Self {
8998 self.0.request = v.into();
8999 self
9000 }
9001
9002 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9004 self.0.options = v.into();
9005 self
9006 }
9007
9008 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
9010 (*self.0.stub)
9011 .list_operations(self.0.request, self.0.options)
9012 .await
9013 .map(gax::response::Response::into_body)
9014 }
9015
9016 pub fn by_page(
9018 self,
9019 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
9020 {
9021 use std::clone::Clone;
9022 let token = self.0.request.page_token.clone();
9023 let execute = move |token: String| {
9024 let mut builder = self.clone();
9025 builder.0.request = builder.0.request.set_page_token(token);
9026 builder.send()
9027 };
9028 gax::paginator::internal::new_paginator(token, execute)
9029 }
9030
9031 pub fn by_item(
9033 self,
9034 ) -> impl gax::paginator::ItemPaginator<
9035 longrunning::model::ListOperationsResponse,
9036 gax::error::Error,
9037 > {
9038 use gax::paginator::Paginator;
9039 self.by_page().items()
9040 }
9041
9042 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9044 self.0.request.name = v.into();
9045 self
9046 }
9047
9048 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9050 self.0.request.filter = v.into();
9051 self
9052 }
9053
9054 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9056 self.0.request.page_size = v.into();
9057 self
9058 }
9059
9060 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9062 self.0.request.page_token = v.into();
9063 self
9064 }
9065
9066 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
9068 self.0.request.return_partial_success = v.into();
9069 self
9070 }
9071 }
9072
9073 #[doc(hidden)]
9074 impl gax::options::internal::RequestBuilder for ListOperations {
9075 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9076 &mut self.0.options
9077 }
9078 }
9079
9080 #[derive(Clone, Debug)]
9098 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
9099
9100 impl GetOperation {
9101 pub(crate) fn new(
9102 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9103 ) -> Self {
9104 Self(RequestBuilder::new(stub))
9105 }
9106
9107 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
9109 mut self,
9110 v: V,
9111 ) -> Self {
9112 self.0.request = v.into();
9113 self
9114 }
9115
9116 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9118 self.0.options = v.into();
9119 self
9120 }
9121
9122 pub async fn send(self) -> Result<longrunning::model::Operation> {
9124 (*self.0.stub)
9125 .get_operation(self.0.request, self.0.options)
9126 .await
9127 .map(gax::response::Response::into_body)
9128 }
9129
9130 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9132 self.0.request.name = v.into();
9133 self
9134 }
9135 }
9136
9137 #[doc(hidden)]
9138 impl gax::options::internal::RequestBuilder for GetOperation {
9139 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9140 &mut self.0.options
9141 }
9142 }
9143
9144 #[derive(Clone, Debug)]
9162 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
9163
9164 impl DeleteOperation {
9165 pub(crate) fn new(
9166 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9167 ) -> Self {
9168 Self(RequestBuilder::new(stub))
9169 }
9170
9171 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
9173 mut self,
9174 v: V,
9175 ) -> Self {
9176 self.0.request = v.into();
9177 self
9178 }
9179
9180 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9182 self.0.options = v.into();
9183 self
9184 }
9185
9186 pub async fn send(self) -> Result<()> {
9188 (*self.0.stub)
9189 .delete_operation(self.0.request, self.0.options)
9190 .await
9191 .map(gax::response::Response::into_body)
9192 }
9193
9194 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9196 self.0.request.name = v.into();
9197 self
9198 }
9199 }
9200
9201 #[doc(hidden)]
9202 impl gax::options::internal::RequestBuilder for DeleteOperation {
9203 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9204 &mut self.0.options
9205 }
9206 }
9207}