1pub mod vmware_engine {
19 use crate::Result;
20
21 pub type ClientBuilder = crate::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 crate::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 ) -> crate::ClientBuilderResult<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: crate::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: crate::RequestOptions::default(),
70 }
71 }
72 }
73
74 #[derive(Clone, Debug)]
95 pub struct ListPrivateClouds(RequestBuilder<crate::model::ListPrivateCloudsRequest>);
96
97 impl ListPrivateClouds {
98 pub(crate) fn new(
99 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
100 ) -> Self {
101 Self(RequestBuilder::new(stub))
102 }
103
104 pub fn with_request<V: Into<crate::model::ListPrivateCloudsRequest>>(
106 mut self,
107 v: V,
108 ) -> Self {
109 self.0.request = v.into();
110 self
111 }
112
113 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
115 self.0.options = v.into();
116 self
117 }
118
119 pub async fn send(self) -> Result<crate::model::ListPrivateCloudsResponse> {
121 (*self.0.stub)
122 .list_private_clouds(self.0.request, self.0.options)
123 .await
124 .map(crate::Response::into_body)
125 }
126
127 pub fn by_page(
129 self,
130 ) -> impl google_cloud_gax::paginator::Paginator<
131 crate::model::ListPrivateCloudsResponse,
132 crate::Error,
133 > {
134 use std::clone::Clone;
135 let token = self.0.request.page_token.clone();
136 let execute = move |token: String| {
137 let mut builder = self.clone();
138 builder.0.request = builder.0.request.set_page_token(token);
139 builder.send()
140 };
141 google_cloud_gax::paginator::internal::new_paginator(token, execute)
142 }
143
144 pub fn by_item(
146 self,
147 ) -> impl google_cloud_gax::paginator::ItemPaginator<
148 crate::model::ListPrivateCloudsResponse,
149 crate::Error,
150 > {
151 use google_cloud_gax::paginator::Paginator;
152 self.by_page().items()
153 }
154
155 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
159 self.0.request.parent = v.into();
160 self
161 }
162
163 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
165 self.0.request.page_size = v.into();
166 self
167 }
168
169 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
171 self.0.request.page_token = v.into();
172 self
173 }
174
175 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
177 self.0.request.filter = v.into();
178 self
179 }
180
181 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
183 self.0.request.order_by = v.into();
184 self
185 }
186 }
187
188 #[doc(hidden)]
189 impl crate::RequestBuilder for ListPrivateClouds {
190 fn request_options(&mut self) -> &mut crate::RequestOptions {
191 &mut self.0.options
192 }
193 }
194
195 #[derive(Clone, Debug)]
212 pub struct GetPrivateCloud(RequestBuilder<crate::model::GetPrivateCloudRequest>);
213
214 impl GetPrivateCloud {
215 pub(crate) fn new(
216 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
217 ) -> Self {
218 Self(RequestBuilder::new(stub))
219 }
220
221 pub fn with_request<V: Into<crate::model::GetPrivateCloudRequest>>(mut self, v: V) -> Self {
223 self.0.request = v.into();
224 self
225 }
226
227 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
229 self.0.options = v.into();
230 self
231 }
232
233 pub async fn send(self) -> Result<crate::model::PrivateCloud> {
235 (*self.0.stub)
236 .get_private_cloud(self.0.request, self.0.options)
237 .await
238 .map(crate::Response::into_body)
239 }
240
241 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
245 self.0.request.name = v.into();
246 self
247 }
248 }
249
250 #[doc(hidden)]
251 impl crate::RequestBuilder for GetPrivateCloud {
252 fn request_options(&mut self) -> &mut crate::RequestOptions {
253 &mut self.0.options
254 }
255 }
256
257 #[derive(Clone, Debug)]
275 pub struct CreatePrivateCloud(RequestBuilder<crate::model::CreatePrivateCloudRequest>);
276
277 impl CreatePrivateCloud {
278 pub(crate) fn new(
279 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
280 ) -> Self {
281 Self(RequestBuilder::new(stub))
282 }
283
284 pub fn with_request<V: Into<crate::model::CreatePrivateCloudRequest>>(
286 mut self,
287 v: V,
288 ) -> Self {
289 self.0.request = v.into();
290 self
291 }
292
293 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
295 self.0.options = v.into();
296 self
297 }
298
299 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
306 (*self.0.stub)
307 .create_private_cloud(self.0.request, self.0.options)
308 .await
309 .map(crate::Response::into_body)
310 }
311
312 pub fn poller(
314 self,
315 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
316 {
317 type Operation = google_cloud_lro::internal::Operation<
318 crate::model::PrivateCloud,
319 crate::model::OperationMetadata,
320 >;
321 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
322 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
323
324 let stub = self.0.stub.clone();
325 let mut options = self.0.options.clone();
326 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
327 let query = move |name| {
328 let stub = stub.clone();
329 let options = options.clone();
330 async {
331 let op = GetOperation::new(stub)
332 .set_name(name)
333 .with_options(options)
334 .send()
335 .await?;
336 Ok(Operation::new(op))
337 }
338 };
339
340 let start = move || async {
341 let op = self.send().await?;
342 Ok(Operation::new(op))
343 };
344
345 google_cloud_lro::internal::new_poller(
346 polling_error_policy,
347 polling_backoff_policy,
348 start,
349 query,
350 )
351 }
352
353 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
357 self.0.request.parent = v.into();
358 self
359 }
360
361 pub fn set_private_cloud_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
365 self.0.request.private_cloud_id = v.into();
366 self
367 }
368
369 pub fn set_private_cloud<T>(mut self, v: T) -> Self
373 where
374 T: std::convert::Into<crate::model::PrivateCloud>,
375 {
376 self.0.request.private_cloud = std::option::Option::Some(v.into());
377 self
378 }
379
380 pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
384 where
385 T: std::convert::Into<crate::model::PrivateCloud>,
386 {
387 self.0.request.private_cloud = v.map(|x| x.into());
388 self
389 }
390
391 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
393 self.0.request.request_id = v.into();
394 self
395 }
396
397 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
399 self.0.request.validate_only = v.into();
400 self
401 }
402 }
403
404 #[doc(hidden)]
405 impl crate::RequestBuilder for CreatePrivateCloud {
406 fn request_options(&mut self) -> &mut crate::RequestOptions {
407 &mut self.0.options
408 }
409 }
410
411 #[derive(Clone, Debug)]
429 pub struct UpdatePrivateCloud(RequestBuilder<crate::model::UpdatePrivateCloudRequest>);
430
431 impl UpdatePrivateCloud {
432 pub(crate) fn new(
433 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
434 ) -> Self {
435 Self(RequestBuilder::new(stub))
436 }
437
438 pub fn with_request<V: Into<crate::model::UpdatePrivateCloudRequest>>(
440 mut self,
441 v: V,
442 ) -> Self {
443 self.0.request = v.into();
444 self
445 }
446
447 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
449 self.0.options = v.into();
450 self
451 }
452
453 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
460 (*self.0.stub)
461 .update_private_cloud(self.0.request, self.0.options)
462 .await
463 .map(crate::Response::into_body)
464 }
465
466 pub fn poller(
468 self,
469 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
470 {
471 type Operation = google_cloud_lro::internal::Operation<
472 crate::model::PrivateCloud,
473 crate::model::OperationMetadata,
474 >;
475 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
476 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
477
478 let stub = self.0.stub.clone();
479 let mut options = self.0.options.clone();
480 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
481 let query = move |name| {
482 let stub = stub.clone();
483 let options = options.clone();
484 async {
485 let op = GetOperation::new(stub)
486 .set_name(name)
487 .with_options(options)
488 .send()
489 .await?;
490 Ok(Operation::new(op))
491 }
492 };
493
494 let start = move || async {
495 let op = self.send().await?;
496 Ok(Operation::new(op))
497 };
498
499 google_cloud_lro::internal::new_poller(
500 polling_error_policy,
501 polling_backoff_policy,
502 start,
503 query,
504 )
505 }
506
507 pub fn set_private_cloud<T>(mut self, v: T) -> Self
511 where
512 T: std::convert::Into<crate::model::PrivateCloud>,
513 {
514 self.0.request.private_cloud = std::option::Option::Some(v.into());
515 self
516 }
517
518 pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
522 where
523 T: std::convert::Into<crate::model::PrivateCloud>,
524 {
525 self.0.request.private_cloud = v.map(|x| x.into());
526 self
527 }
528
529 pub fn set_update_mask<T>(mut self, v: T) -> Self
533 where
534 T: std::convert::Into<wkt::FieldMask>,
535 {
536 self.0.request.update_mask = std::option::Option::Some(v.into());
537 self
538 }
539
540 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
544 where
545 T: std::convert::Into<wkt::FieldMask>,
546 {
547 self.0.request.update_mask = v.map(|x| x.into());
548 self
549 }
550
551 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
553 self.0.request.request_id = v.into();
554 self
555 }
556 }
557
558 #[doc(hidden)]
559 impl crate::RequestBuilder for UpdatePrivateCloud {
560 fn request_options(&mut self) -> &mut crate::RequestOptions {
561 &mut self.0.options
562 }
563 }
564
565 #[derive(Clone, Debug)]
583 pub struct DeletePrivateCloud(RequestBuilder<crate::model::DeletePrivateCloudRequest>);
584
585 impl DeletePrivateCloud {
586 pub(crate) fn new(
587 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
588 ) -> Self {
589 Self(RequestBuilder::new(stub))
590 }
591
592 pub fn with_request<V: Into<crate::model::DeletePrivateCloudRequest>>(
594 mut self,
595 v: V,
596 ) -> Self {
597 self.0.request = v.into();
598 self
599 }
600
601 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
603 self.0.options = v.into();
604 self
605 }
606
607 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
614 (*self.0.stub)
615 .delete_private_cloud(self.0.request, self.0.options)
616 .await
617 .map(crate::Response::into_body)
618 }
619
620 pub fn poller(
622 self,
623 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
624 {
625 type Operation = google_cloud_lro::internal::Operation<
626 crate::model::PrivateCloud,
627 crate::model::OperationMetadata,
628 >;
629 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
630 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
631
632 let stub = self.0.stub.clone();
633 let mut options = self.0.options.clone();
634 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
635 let query = move |name| {
636 let stub = stub.clone();
637 let options = options.clone();
638 async {
639 let op = GetOperation::new(stub)
640 .set_name(name)
641 .with_options(options)
642 .send()
643 .await?;
644 Ok(Operation::new(op))
645 }
646 };
647
648 let start = move || async {
649 let op = self.send().await?;
650 Ok(Operation::new(op))
651 };
652
653 google_cloud_lro::internal::new_poller(
654 polling_error_policy,
655 polling_backoff_policy,
656 start,
657 query,
658 )
659 }
660
661 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
665 self.0.request.name = v.into();
666 self
667 }
668
669 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
671 self.0.request.request_id = v.into();
672 self
673 }
674
675 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
677 self.0.request.force = v.into();
678 self
679 }
680
681 pub fn set_delay_hours<T>(mut self, v: T) -> Self
683 where
684 T: std::convert::Into<i32>,
685 {
686 self.0.request.delay_hours = std::option::Option::Some(v.into());
687 self
688 }
689
690 pub fn set_or_clear_delay_hours<T>(mut self, v: std::option::Option<T>) -> Self
692 where
693 T: std::convert::Into<i32>,
694 {
695 self.0.request.delay_hours = v.map(|x| x.into());
696 self
697 }
698 }
699
700 #[doc(hidden)]
701 impl crate::RequestBuilder for DeletePrivateCloud {
702 fn request_options(&mut self) -> &mut crate::RequestOptions {
703 &mut self.0.options
704 }
705 }
706
707 #[derive(Clone, Debug)]
725 pub struct UndeletePrivateCloud(RequestBuilder<crate::model::UndeletePrivateCloudRequest>);
726
727 impl UndeletePrivateCloud {
728 pub(crate) fn new(
729 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
730 ) -> Self {
731 Self(RequestBuilder::new(stub))
732 }
733
734 pub fn with_request<V: Into<crate::model::UndeletePrivateCloudRequest>>(
736 mut self,
737 v: V,
738 ) -> Self {
739 self.0.request = v.into();
740 self
741 }
742
743 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
745 self.0.options = v.into();
746 self
747 }
748
749 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
756 (*self.0.stub)
757 .undelete_private_cloud(self.0.request, self.0.options)
758 .await
759 .map(crate::Response::into_body)
760 }
761
762 pub fn poller(
764 self,
765 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
766 {
767 type Operation = google_cloud_lro::internal::Operation<
768 crate::model::PrivateCloud,
769 crate::model::OperationMetadata,
770 >;
771 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
772 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
773
774 let stub = self.0.stub.clone();
775 let mut options = self.0.options.clone();
776 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
777 let query = move |name| {
778 let stub = stub.clone();
779 let options = options.clone();
780 async {
781 let op = GetOperation::new(stub)
782 .set_name(name)
783 .with_options(options)
784 .send()
785 .await?;
786 Ok(Operation::new(op))
787 }
788 };
789
790 let start = move || async {
791 let op = self.send().await?;
792 Ok(Operation::new(op))
793 };
794
795 google_cloud_lro::internal::new_poller(
796 polling_error_policy,
797 polling_backoff_policy,
798 start,
799 query,
800 )
801 }
802
803 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
807 self.0.request.name = v.into();
808 self
809 }
810
811 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
813 self.0.request.request_id = v.into();
814 self
815 }
816 }
817
818 #[doc(hidden)]
819 impl crate::RequestBuilder for UndeletePrivateCloud {
820 fn request_options(&mut self) -> &mut crate::RequestOptions {
821 &mut self.0.options
822 }
823 }
824
825 #[derive(Clone, Debug)]
846 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
847
848 impl ListClusters {
849 pub(crate) fn new(
850 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
851 ) -> Self {
852 Self(RequestBuilder::new(stub))
853 }
854
855 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
857 self.0.request = v.into();
858 self
859 }
860
861 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
863 self.0.options = v.into();
864 self
865 }
866
867 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
869 (*self.0.stub)
870 .list_clusters(self.0.request, self.0.options)
871 .await
872 .map(crate::Response::into_body)
873 }
874
875 pub fn by_page(
877 self,
878 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListClustersResponse, crate::Error>
879 {
880 use std::clone::Clone;
881 let token = self.0.request.page_token.clone();
882 let execute = move |token: String| {
883 let mut builder = self.clone();
884 builder.0.request = builder.0.request.set_page_token(token);
885 builder.send()
886 };
887 google_cloud_gax::paginator::internal::new_paginator(token, execute)
888 }
889
890 pub fn by_item(
892 self,
893 ) -> impl google_cloud_gax::paginator::ItemPaginator<
894 crate::model::ListClustersResponse,
895 crate::Error,
896 > {
897 use google_cloud_gax::paginator::Paginator;
898 self.by_page().items()
899 }
900
901 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
905 self.0.request.parent = v.into();
906 self
907 }
908
909 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
911 self.0.request.page_size = v.into();
912 self
913 }
914
915 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
917 self.0.request.page_token = v.into();
918 self
919 }
920
921 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
923 self.0.request.filter = v.into();
924 self
925 }
926
927 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
929 self.0.request.order_by = v.into();
930 self
931 }
932 }
933
934 #[doc(hidden)]
935 impl crate::RequestBuilder for ListClusters {
936 fn request_options(&mut self) -> &mut crate::RequestOptions {
937 &mut self.0.options
938 }
939 }
940
941 #[derive(Clone, Debug)]
958 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
959
960 impl GetCluster {
961 pub(crate) fn new(
962 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
963 ) -> Self {
964 Self(RequestBuilder::new(stub))
965 }
966
967 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
969 self.0.request = v.into();
970 self
971 }
972
973 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
975 self.0.options = v.into();
976 self
977 }
978
979 pub async fn send(self) -> Result<crate::model::Cluster> {
981 (*self.0.stub)
982 .get_cluster(self.0.request, self.0.options)
983 .await
984 .map(crate::Response::into_body)
985 }
986
987 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
991 self.0.request.name = v.into();
992 self
993 }
994 }
995
996 #[doc(hidden)]
997 impl crate::RequestBuilder for GetCluster {
998 fn request_options(&mut self) -> &mut crate::RequestOptions {
999 &mut self.0.options
1000 }
1001 }
1002
1003 #[derive(Clone, Debug)]
1021 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
1022
1023 impl CreateCluster {
1024 pub(crate) fn new(
1025 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1026 ) -> Self {
1027 Self(RequestBuilder::new(stub))
1028 }
1029
1030 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
1032 self.0.request = v.into();
1033 self
1034 }
1035
1036 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1038 self.0.options = v.into();
1039 self
1040 }
1041
1042 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1049 (*self.0.stub)
1050 .create_cluster(self.0.request, self.0.options)
1051 .await
1052 .map(crate::Response::into_body)
1053 }
1054
1055 pub fn poller(
1057 self,
1058 ) -> impl google_cloud_lro::Poller<crate::model::Cluster, crate::model::OperationMetadata>
1059 {
1060 type Operation = google_cloud_lro::internal::Operation<
1061 crate::model::Cluster,
1062 crate::model::OperationMetadata,
1063 >;
1064 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1065 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1066
1067 let stub = self.0.stub.clone();
1068 let mut options = self.0.options.clone();
1069 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1070 let query = move |name| {
1071 let stub = stub.clone();
1072 let options = options.clone();
1073 async {
1074 let op = GetOperation::new(stub)
1075 .set_name(name)
1076 .with_options(options)
1077 .send()
1078 .await?;
1079 Ok(Operation::new(op))
1080 }
1081 };
1082
1083 let start = move || async {
1084 let op = self.send().await?;
1085 Ok(Operation::new(op))
1086 };
1087
1088 google_cloud_lro::internal::new_poller(
1089 polling_error_policy,
1090 polling_backoff_policy,
1091 start,
1092 query,
1093 )
1094 }
1095
1096 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1100 self.0.request.parent = v.into();
1101 self
1102 }
1103
1104 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1108 self.0.request.cluster_id = v.into();
1109 self
1110 }
1111
1112 pub fn set_cluster<T>(mut self, v: T) -> Self
1116 where
1117 T: std::convert::Into<crate::model::Cluster>,
1118 {
1119 self.0.request.cluster = std::option::Option::Some(v.into());
1120 self
1121 }
1122
1123 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1127 where
1128 T: std::convert::Into<crate::model::Cluster>,
1129 {
1130 self.0.request.cluster = v.map(|x| x.into());
1131 self
1132 }
1133
1134 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1136 self.0.request.request_id = v.into();
1137 self
1138 }
1139
1140 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1142 self.0.request.validate_only = v.into();
1143 self
1144 }
1145 }
1146
1147 #[doc(hidden)]
1148 impl crate::RequestBuilder for CreateCluster {
1149 fn request_options(&mut self) -> &mut crate::RequestOptions {
1150 &mut self.0.options
1151 }
1152 }
1153
1154 #[derive(Clone, Debug)]
1172 pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
1173
1174 impl UpdateCluster {
1175 pub(crate) fn new(
1176 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1177 ) -> Self {
1178 Self(RequestBuilder::new(stub))
1179 }
1180
1181 pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
1183 self.0.request = v.into();
1184 self
1185 }
1186
1187 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1189 self.0.options = v.into();
1190 self
1191 }
1192
1193 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1200 (*self.0.stub)
1201 .update_cluster(self.0.request, self.0.options)
1202 .await
1203 .map(crate::Response::into_body)
1204 }
1205
1206 pub fn poller(
1208 self,
1209 ) -> impl google_cloud_lro::Poller<crate::model::Cluster, crate::model::OperationMetadata>
1210 {
1211 type Operation = google_cloud_lro::internal::Operation<
1212 crate::model::Cluster,
1213 crate::model::OperationMetadata,
1214 >;
1215 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1216 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1217
1218 let stub = self.0.stub.clone();
1219 let mut options = self.0.options.clone();
1220 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1221 let query = move |name| {
1222 let stub = stub.clone();
1223 let options = options.clone();
1224 async {
1225 let op = GetOperation::new(stub)
1226 .set_name(name)
1227 .with_options(options)
1228 .send()
1229 .await?;
1230 Ok(Operation::new(op))
1231 }
1232 };
1233
1234 let start = move || async {
1235 let op = self.send().await?;
1236 Ok(Operation::new(op))
1237 };
1238
1239 google_cloud_lro::internal::new_poller(
1240 polling_error_policy,
1241 polling_backoff_policy,
1242 start,
1243 query,
1244 )
1245 }
1246
1247 pub fn set_update_mask<T>(mut self, v: T) -> Self
1251 where
1252 T: std::convert::Into<wkt::FieldMask>,
1253 {
1254 self.0.request.update_mask = std::option::Option::Some(v.into());
1255 self
1256 }
1257
1258 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1262 where
1263 T: std::convert::Into<wkt::FieldMask>,
1264 {
1265 self.0.request.update_mask = v.map(|x| x.into());
1266 self
1267 }
1268
1269 pub fn set_cluster<T>(mut self, v: T) -> Self
1273 where
1274 T: std::convert::Into<crate::model::Cluster>,
1275 {
1276 self.0.request.cluster = std::option::Option::Some(v.into());
1277 self
1278 }
1279
1280 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1284 where
1285 T: std::convert::Into<crate::model::Cluster>,
1286 {
1287 self.0.request.cluster = v.map(|x| x.into());
1288 self
1289 }
1290
1291 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1293 self.0.request.request_id = v.into();
1294 self
1295 }
1296
1297 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1299 self.0.request.validate_only = v.into();
1300 self
1301 }
1302 }
1303
1304 #[doc(hidden)]
1305 impl crate::RequestBuilder for UpdateCluster {
1306 fn request_options(&mut self) -> &mut crate::RequestOptions {
1307 &mut self.0.options
1308 }
1309 }
1310
1311 #[derive(Clone, Debug)]
1329 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1330
1331 impl DeleteCluster {
1332 pub(crate) fn new(
1333 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1334 ) -> Self {
1335 Self(RequestBuilder::new(stub))
1336 }
1337
1338 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1340 self.0.request = v.into();
1341 self
1342 }
1343
1344 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1346 self.0.options = v.into();
1347 self
1348 }
1349
1350 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1357 (*self.0.stub)
1358 .delete_cluster(self.0.request, self.0.options)
1359 .await
1360 .map(crate::Response::into_body)
1361 }
1362
1363 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1365 type Operation =
1366 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1367 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1368 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1369
1370 let stub = self.0.stub.clone();
1371 let mut options = self.0.options.clone();
1372 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1373 let query = move |name| {
1374 let stub = stub.clone();
1375 let options = options.clone();
1376 async {
1377 let op = GetOperation::new(stub)
1378 .set_name(name)
1379 .with_options(options)
1380 .send()
1381 .await?;
1382 Ok(Operation::new(op))
1383 }
1384 };
1385
1386 let start = move || async {
1387 let op = self.send().await?;
1388 Ok(Operation::new(op))
1389 };
1390
1391 google_cloud_lro::internal::new_unit_response_poller(
1392 polling_error_policy,
1393 polling_backoff_policy,
1394 start,
1395 query,
1396 )
1397 }
1398
1399 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1403 self.0.request.name = v.into();
1404 self
1405 }
1406
1407 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1409 self.0.request.request_id = v.into();
1410 self
1411 }
1412 }
1413
1414 #[doc(hidden)]
1415 impl crate::RequestBuilder for DeleteCluster {
1416 fn request_options(&mut self) -> &mut crate::RequestOptions {
1417 &mut self.0.options
1418 }
1419 }
1420
1421 #[derive(Clone, Debug)]
1442 pub struct ListNodes(RequestBuilder<crate::model::ListNodesRequest>);
1443
1444 impl ListNodes {
1445 pub(crate) fn new(
1446 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1447 ) -> Self {
1448 Self(RequestBuilder::new(stub))
1449 }
1450
1451 pub fn with_request<V: Into<crate::model::ListNodesRequest>>(mut self, v: V) -> Self {
1453 self.0.request = v.into();
1454 self
1455 }
1456
1457 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1459 self.0.options = v.into();
1460 self
1461 }
1462
1463 pub async fn send(self) -> Result<crate::model::ListNodesResponse> {
1465 (*self.0.stub)
1466 .list_nodes(self.0.request, self.0.options)
1467 .await
1468 .map(crate::Response::into_body)
1469 }
1470
1471 pub fn by_page(
1473 self,
1474 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListNodesResponse, crate::Error>
1475 {
1476 use std::clone::Clone;
1477 let token = self.0.request.page_token.clone();
1478 let execute = move |token: String| {
1479 let mut builder = self.clone();
1480 builder.0.request = builder.0.request.set_page_token(token);
1481 builder.send()
1482 };
1483 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1484 }
1485
1486 pub fn by_item(
1488 self,
1489 ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListNodesResponse, crate::Error>
1490 {
1491 use google_cloud_gax::paginator::Paginator;
1492 self.by_page().items()
1493 }
1494
1495 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1499 self.0.request.parent = v.into();
1500 self
1501 }
1502
1503 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1505 self.0.request.page_size = v.into();
1506 self
1507 }
1508
1509 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1511 self.0.request.page_token = v.into();
1512 self
1513 }
1514 }
1515
1516 #[doc(hidden)]
1517 impl crate::RequestBuilder for ListNodes {
1518 fn request_options(&mut self) -> &mut crate::RequestOptions {
1519 &mut self.0.options
1520 }
1521 }
1522
1523 #[derive(Clone, Debug)]
1540 pub struct GetNode(RequestBuilder<crate::model::GetNodeRequest>);
1541
1542 impl GetNode {
1543 pub(crate) fn new(
1544 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1545 ) -> Self {
1546 Self(RequestBuilder::new(stub))
1547 }
1548
1549 pub fn with_request<V: Into<crate::model::GetNodeRequest>>(mut self, v: V) -> Self {
1551 self.0.request = v.into();
1552 self
1553 }
1554
1555 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1557 self.0.options = v.into();
1558 self
1559 }
1560
1561 pub async fn send(self) -> Result<crate::model::Node> {
1563 (*self.0.stub)
1564 .get_node(self.0.request, self.0.options)
1565 .await
1566 .map(crate::Response::into_body)
1567 }
1568
1569 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1573 self.0.request.name = v.into();
1574 self
1575 }
1576 }
1577
1578 #[doc(hidden)]
1579 impl crate::RequestBuilder for GetNode {
1580 fn request_options(&mut self) -> &mut crate::RequestOptions {
1581 &mut self.0.options
1582 }
1583 }
1584
1585 #[derive(Clone, Debug)]
1606 pub struct ListExternalAddresses(RequestBuilder<crate::model::ListExternalAddressesRequest>);
1607
1608 impl ListExternalAddresses {
1609 pub(crate) fn new(
1610 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1611 ) -> Self {
1612 Self(RequestBuilder::new(stub))
1613 }
1614
1615 pub fn with_request<V: Into<crate::model::ListExternalAddressesRequest>>(
1617 mut self,
1618 v: V,
1619 ) -> Self {
1620 self.0.request = v.into();
1621 self
1622 }
1623
1624 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1626 self.0.options = v.into();
1627 self
1628 }
1629
1630 pub async fn send(self) -> Result<crate::model::ListExternalAddressesResponse> {
1632 (*self.0.stub)
1633 .list_external_addresses(self.0.request, self.0.options)
1634 .await
1635 .map(crate::Response::into_body)
1636 }
1637
1638 pub fn by_page(
1640 self,
1641 ) -> impl google_cloud_gax::paginator::Paginator<
1642 crate::model::ListExternalAddressesResponse,
1643 crate::Error,
1644 > {
1645 use std::clone::Clone;
1646 let token = self.0.request.page_token.clone();
1647 let execute = move |token: String| {
1648 let mut builder = self.clone();
1649 builder.0.request = builder.0.request.set_page_token(token);
1650 builder.send()
1651 };
1652 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1653 }
1654
1655 pub fn by_item(
1657 self,
1658 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1659 crate::model::ListExternalAddressesResponse,
1660 crate::Error,
1661 > {
1662 use google_cloud_gax::paginator::Paginator;
1663 self.by_page().items()
1664 }
1665
1666 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1670 self.0.request.parent = v.into();
1671 self
1672 }
1673
1674 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1676 self.0.request.page_size = v.into();
1677 self
1678 }
1679
1680 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1682 self.0.request.page_token = v.into();
1683 self
1684 }
1685
1686 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1688 self.0.request.filter = v.into();
1689 self
1690 }
1691
1692 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1694 self.0.request.order_by = v.into();
1695 self
1696 }
1697 }
1698
1699 #[doc(hidden)]
1700 impl crate::RequestBuilder for ListExternalAddresses {
1701 fn request_options(&mut self) -> &mut crate::RequestOptions {
1702 &mut self.0.options
1703 }
1704 }
1705
1706 #[derive(Clone, Debug)]
1727 pub struct FetchNetworkPolicyExternalAddresses(
1728 RequestBuilder<crate::model::FetchNetworkPolicyExternalAddressesRequest>,
1729 );
1730
1731 impl FetchNetworkPolicyExternalAddresses {
1732 pub(crate) fn new(
1733 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1734 ) -> Self {
1735 Self(RequestBuilder::new(stub))
1736 }
1737
1738 pub fn with_request<V: Into<crate::model::FetchNetworkPolicyExternalAddressesRequest>>(
1740 mut self,
1741 v: V,
1742 ) -> Self {
1743 self.0.request = v.into();
1744 self
1745 }
1746
1747 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1749 self.0.options = v.into();
1750 self
1751 }
1752
1753 pub async fn send(
1755 self,
1756 ) -> Result<crate::model::FetchNetworkPolicyExternalAddressesResponse> {
1757 (*self.0.stub)
1758 .fetch_network_policy_external_addresses(self.0.request, self.0.options)
1759 .await
1760 .map(crate::Response::into_body)
1761 }
1762
1763 pub fn by_page(
1765 self,
1766 ) -> impl google_cloud_gax::paginator::Paginator<
1767 crate::model::FetchNetworkPolicyExternalAddressesResponse,
1768 crate::Error,
1769 > {
1770 use std::clone::Clone;
1771 let token = self.0.request.page_token.clone();
1772 let execute = move |token: String| {
1773 let mut builder = self.clone();
1774 builder.0.request = builder.0.request.set_page_token(token);
1775 builder.send()
1776 };
1777 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1778 }
1779
1780 pub fn by_item(
1782 self,
1783 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1784 crate::model::FetchNetworkPolicyExternalAddressesResponse,
1785 crate::Error,
1786 > {
1787 use google_cloud_gax::paginator::Paginator;
1788 self.by_page().items()
1789 }
1790
1791 pub fn set_network_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
1795 self.0.request.network_policy = v.into();
1796 self
1797 }
1798
1799 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1801 self.0.request.page_size = v.into();
1802 self
1803 }
1804
1805 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1807 self.0.request.page_token = v.into();
1808 self
1809 }
1810 }
1811
1812 #[doc(hidden)]
1813 impl crate::RequestBuilder for FetchNetworkPolicyExternalAddresses {
1814 fn request_options(&mut self) -> &mut crate::RequestOptions {
1815 &mut self.0.options
1816 }
1817 }
1818
1819 #[derive(Clone, Debug)]
1836 pub struct GetExternalAddress(RequestBuilder<crate::model::GetExternalAddressRequest>);
1837
1838 impl GetExternalAddress {
1839 pub(crate) fn new(
1840 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1841 ) -> Self {
1842 Self(RequestBuilder::new(stub))
1843 }
1844
1845 pub fn with_request<V: Into<crate::model::GetExternalAddressRequest>>(
1847 mut self,
1848 v: V,
1849 ) -> Self {
1850 self.0.request = v.into();
1851 self
1852 }
1853
1854 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1856 self.0.options = v.into();
1857 self
1858 }
1859
1860 pub async fn send(self) -> Result<crate::model::ExternalAddress> {
1862 (*self.0.stub)
1863 .get_external_address(self.0.request, self.0.options)
1864 .await
1865 .map(crate::Response::into_body)
1866 }
1867
1868 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1872 self.0.request.name = v.into();
1873 self
1874 }
1875 }
1876
1877 #[doc(hidden)]
1878 impl crate::RequestBuilder for GetExternalAddress {
1879 fn request_options(&mut self) -> &mut crate::RequestOptions {
1880 &mut self.0.options
1881 }
1882 }
1883
1884 #[derive(Clone, Debug)]
1902 pub struct CreateExternalAddress(RequestBuilder<crate::model::CreateExternalAddressRequest>);
1903
1904 impl CreateExternalAddress {
1905 pub(crate) fn new(
1906 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1907 ) -> Self {
1908 Self(RequestBuilder::new(stub))
1909 }
1910
1911 pub fn with_request<V: Into<crate::model::CreateExternalAddressRequest>>(
1913 mut self,
1914 v: V,
1915 ) -> Self {
1916 self.0.request = v.into();
1917 self
1918 }
1919
1920 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1922 self.0.options = v.into();
1923 self
1924 }
1925
1926 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1933 (*self.0.stub)
1934 .create_external_address(self.0.request, self.0.options)
1935 .await
1936 .map(crate::Response::into_body)
1937 }
1938
1939 pub fn poller(
1941 self,
1942 ) -> impl google_cloud_lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
1943 {
1944 type Operation = google_cloud_lro::internal::Operation<
1945 crate::model::ExternalAddress,
1946 crate::model::OperationMetadata,
1947 >;
1948 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1949 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1950
1951 let stub = self.0.stub.clone();
1952 let mut options = self.0.options.clone();
1953 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1954 let query = move |name| {
1955 let stub = stub.clone();
1956 let options = options.clone();
1957 async {
1958 let op = GetOperation::new(stub)
1959 .set_name(name)
1960 .with_options(options)
1961 .send()
1962 .await?;
1963 Ok(Operation::new(op))
1964 }
1965 };
1966
1967 let start = move || async {
1968 let op = self.send().await?;
1969 Ok(Operation::new(op))
1970 };
1971
1972 google_cloud_lro::internal::new_poller(
1973 polling_error_policy,
1974 polling_backoff_policy,
1975 start,
1976 query,
1977 )
1978 }
1979
1980 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1984 self.0.request.parent = v.into();
1985 self
1986 }
1987
1988 pub fn set_external_address<T>(mut self, v: T) -> Self
1992 where
1993 T: std::convert::Into<crate::model::ExternalAddress>,
1994 {
1995 self.0.request.external_address = std::option::Option::Some(v.into());
1996 self
1997 }
1998
1999 pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2003 where
2004 T: std::convert::Into<crate::model::ExternalAddress>,
2005 {
2006 self.0.request.external_address = v.map(|x| x.into());
2007 self
2008 }
2009
2010 pub fn set_external_address_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2014 self.0.request.external_address_id = v.into();
2015 self
2016 }
2017
2018 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2020 self.0.request.request_id = v.into();
2021 self
2022 }
2023 }
2024
2025 #[doc(hidden)]
2026 impl crate::RequestBuilder for CreateExternalAddress {
2027 fn request_options(&mut self) -> &mut crate::RequestOptions {
2028 &mut self.0.options
2029 }
2030 }
2031
2032 #[derive(Clone, Debug)]
2050 pub struct UpdateExternalAddress(RequestBuilder<crate::model::UpdateExternalAddressRequest>);
2051
2052 impl UpdateExternalAddress {
2053 pub(crate) fn new(
2054 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2055 ) -> Self {
2056 Self(RequestBuilder::new(stub))
2057 }
2058
2059 pub fn with_request<V: Into<crate::model::UpdateExternalAddressRequest>>(
2061 mut self,
2062 v: V,
2063 ) -> Self {
2064 self.0.request = v.into();
2065 self
2066 }
2067
2068 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2070 self.0.options = v.into();
2071 self
2072 }
2073
2074 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2081 (*self.0.stub)
2082 .update_external_address(self.0.request, self.0.options)
2083 .await
2084 .map(crate::Response::into_body)
2085 }
2086
2087 pub fn poller(
2089 self,
2090 ) -> impl google_cloud_lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
2091 {
2092 type Operation = google_cloud_lro::internal::Operation<
2093 crate::model::ExternalAddress,
2094 crate::model::OperationMetadata,
2095 >;
2096 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2097 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2098
2099 let stub = self.0.stub.clone();
2100 let mut options = self.0.options.clone();
2101 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2102 let query = move |name| {
2103 let stub = stub.clone();
2104 let options = options.clone();
2105 async {
2106 let op = GetOperation::new(stub)
2107 .set_name(name)
2108 .with_options(options)
2109 .send()
2110 .await?;
2111 Ok(Operation::new(op))
2112 }
2113 };
2114
2115 let start = move || async {
2116 let op = self.send().await?;
2117 Ok(Operation::new(op))
2118 };
2119
2120 google_cloud_lro::internal::new_poller(
2121 polling_error_policy,
2122 polling_backoff_policy,
2123 start,
2124 query,
2125 )
2126 }
2127
2128 pub fn set_update_mask<T>(mut self, v: T) -> Self
2132 where
2133 T: std::convert::Into<wkt::FieldMask>,
2134 {
2135 self.0.request.update_mask = std::option::Option::Some(v.into());
2136 self
2137 }
2138
2139 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2143 where
2144 T: std::convert::Into<wkt::FieldMask>,
2145 {
2146 self.0.request.update_mask = v.map(|x| x.into());
2147 self
2148 }
2149
2150 pub fn set_external_address<T>(mut self, v: T) -> Self
2154 where
2155 T: std::convert::Into<crate::model::ExternalAddress>,
2156 {
2157 self.0.request.external_address = std::option::Option::Some(v.into());
2158 self
2159 }
2160
2161 pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2165 where
2166 T: std::convert::Into<crate::model::ExternalAddress>,
2167 {
2168 self.0.request.external_address = v.map(|x| x.into());
2169 self
2170 }
2171
2172 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2174 self.0.request.request_id = v.into();
2175 self
2176 }
2177 }
2178
2179 #[doc(hidden)]
2180 impl crate::RequestBuilder for UpdateExternalAddress {
2181 fn request_options(&mut self) -> &mut crate::RequestOptions {
2182 &mut self.0.options
2183 }
2184 }
2185
2186 #[derive(Clone, Debug)]
2204 pub struct DeleteExternalAddress(RequestBuilder<crate::model::DeleteExternalAddressRequest>);
2205
2206 impl DeleteExternalAddress {
2207 pub(crate) fn new(
2208 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2209 ) -> Self {
2210 Self(RequestBuilder::new(stub))
2211 }
2212
2213 pub fn with_request<V: Into<crate::model::DeleteExternalAddressRequest>>(
2215 mut self,
2216 v: V,
2217 ) -> Self {
2218 self.0.request = v.into();
2219 self
2220 }
2221
2222 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2224 self.0.options = v.into();
2225 self
2226 }
2227
2228 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2235 (*self.0.stub)
2236 .delete_external_address(self.0.request, self.0.options)
2237 .await
2238 .map(crate::Response::into_body)
2239 }
2240
2241 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2243 type Operation =
2244 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2245 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2246 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2247
2248 let stub = self.0.stub.clone();
2249 let mut options = self.0.options.clone();
2250 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2251 let query = move |name| {
2252 let stub = stub.clone();
2253 let options = options.clone();
2254 async {
2255 let op = GetOperation::new(stub)
2256 .set_name(name)
2257 .with_options(options)
2258 .send()
2259 .await?;
2260 Ok(Operation::new(op))
2261 }
2262 };
2263
2264 let start = move || async {
2265 let op = self.send().await?;
2266 Ok(Operation::new(op))
2267 };
2268
2269 google_cloud_lro::internal::new_unit_response_poller(
2270 polling_error_policy,
2271 polling_backoff_policy,
2272 start,
2273 query,
2274 )
2275 }
2276
2277 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2281 self.0.request.name = v.into();
2282 self
2283 }
2284
2285 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2287 self.0.request.request_id = v.into();
2288 self
2289 }
2290 }
2291
2292 #[doc(hidden)]
2293 impl crate::RequestBuilder for DeleteExternalAddress {
2294 fn request_options(&mut self) -> &mut crate::RequestOptions {
2295 &mut self.0.options
2296 }
2297 }
2298
2299 #[derive(Clone, Debug)]
2320 pub struct ListSubnets(RequestBuilder<crate::model::ListSubnetsRequest>);
2321
2322 impl ListSubnets {
2323 pub(crate) fn new(
2324 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2325 ) -> Self {
2326 Self(RequestBuilder::new(stub))
2327 }
2328
2329 pub fn with_request<V: Into<crate::model::ListSubnetsRequest>>(mut self, v: V) -> Self {
2331 self.0.request = v.into();
2332 self
2333 }
2334
2335 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2337 self.0.options = v.into();
2338 self
2339 }
2340
2341 pub async fn send(self) -> Result<crate::model::ListSubnetsResponse> {
2343 (*self.0.stub)
2344 .list_subnets(self.0.request, self.0.options)
2345 .await
2346 .map(crate::Response::into_body)
2347 }
2348
2349 pub fn by_page(
2351 self,
2352 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListSubnetsResponse, crate::Error>
2353 {
2354 use std::clone::Clone;
2355 let token = self.0.request.page_token.clone();
2356 let execute = move |token: String| {
2357 let mut builder = self.clone();
2358 builder.0.request = builder.0.request.set_page_token(token);
2359 builder.send()
2360 };
2361 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2362 }
2363
2364 pub fn by_item(
2366 self,
2367 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2368 crate::model::ListSubnetsResponse,
2369 crate::Error,
2370 > {
2371 use google_cloud_gax::paginator::Paginator;
2372 self.by_page().items()
2373 }
2374
2375 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2379 self.0.request.parent = v.into();
2380 self
2381 }
2382
2383 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2385 self.0.request.page_size = v.into();
2386 self
2387 }
2388
2389 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2391 self.0.request.page_token = v.into();
2392 self
2393 }
2394 }
2395
2396 #[doc(hidden)]
2397 impl crate::RequestBuilder for ListSubnets {
2398 fn request_options(&mut self) -> &mut crate::RequestOptions {
2399 &mut self.0.options
2400 }
2401 }
2402
2403 #[derive(Clone, Debug)]
2420 pub struct GetSubnet(RequestBuilder<crate::model::GetSubnetRequest>);
2421
2422 impl GetSubnet {
2423 pub(crate) fn new(
2424 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2425 ) -> Self {
2426 Self(RequestBuilder::new(stub))
2427 }
2428
2429 pub fn with_request<V: Into<crate::model::GetSubnetRequest>>(mut self, v: V) -> Self {
2431 self.0.request = v.into();
2432 self
2433 }
2434
2435 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2437 self.0.options = v.into();
2438 self
2439 }
2440
2441 pub async fn send(self) -> Result<crate::model::Subnet> {
2443 (*self.0.stub)
2444 .get_subnet(self.0.request, self.0.options)
2445 .await
2446 .map(crate::Response::into_body)
2447 }
2448
2449 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2453 self.0.request.name = v.into();
2454 self
2455 }
2456 }
2457
2458 #[doc(hidden)]
2459 impl crate::RequestBuilder for GetSubnet {
2460 fn request_options(&mut self) -> &mut crate::RequestOptions {
2461 &mut self.0.options
2462 }
2463 }
2464
2465 #[derive(Clone, Debug)]
2483 pub struct UpdateSubnet(RequestBuilder<crate::model::UpdateSubnetRequest>);
2484
2485 impl UpdateSubnet {
2486 pub(crate) fn new(
2487 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2488 ) -> Self {
2489 Self(RequestBuilder::new(stub))
2490 }
2491
2492 pub fn with_request<V: Into<crate::model::UpdateSubnetRequest>>(mut self, v: V) -> Self {
2494 self.0.request = v.into();
2495 self
2496 }
2497
2498 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2500 self.0.options = v.into();
2501 self
2502 }
2503
2504 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2511 (*self.0.stub)
2512 .update_subnet(self.0.request, self.0.options)
2513 .await
2514 .map(crate::Response::into_body)
2515 }
2516
2517 pub fn poller(
2519 self,
2520 ) -> impl google_cloud_lro::Poller<crate::model::Subnet, crate::model::OperationMetadata>
2521 {
2522 type Operation = google_cloud_lro::internal::Operation<
2523 crate::model::Subnet,
2524 crate::model::OperationMetadata,
2525 >;
2526 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2527 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2528
2529 let stub = self.0.stub.clone();
2530 let mut options = self.0.options.clone();
2531 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2532 let query = move |name| {
2533 let stub = stub.clone();
2534 let options = options.clone();
2535 async {
2536 let op = GetOperation::new(stub)
2537 .set_name(name)
2538 .with_options(options)
2539 .send()
2540 .await?;
2541 Ok(Operation::new(op))
2542 }
2543 };
2544
2545 let start = move || async {
2546 let op = self.send().await?;
2547 Ok(Operation::new(op))
2548 };
2549
2550 google_cloud_lro::internal::new_poller(
2551 polling_error_policy,
2552 polling_backoff_policy,
2553 start,
2554 query,
2555 )
2556 }
2557
2558 pub fn set_update_mask<T>(mut self, v: T) -> Self
2562 where
2563 T: std::convert::Into<wkt::FieldMask>,
2564 {
2565 self.0.request.update_mask = std::option::Option::Some(v.into());
2566 self
2567 }
2568
2569 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2573 where
2574 T: std::convert::Into<wkt::FieldMask>,
2575 {
2576 self.0.request.update_mask = v.map(|x| x.into());
2577 self
2578 }
2579
2580 pub fn set_subnet<T>(mut self, v: T) -> Self
2584 where
2585 T: std::convert::Into<crate::model::Subnet>,
2586 {
2587 self.0.request.subnet = std::option::Option::Some(v.into());
2588 self
2589 }
2590
2591 pub fn set_or_clear_subnet<T>(mut self, v: std::option::Option<T>) -> Self
2595 where
2596 T: std::convert::Into<crate::model::Subnet>,
2597 {
2598 self.0.request.subnet = v.map(|x| x.into());
2599 self
2600 }
2601 }
2602
2603 #[doc(hidden)]
2604 impl crate::RequestBuilder for UpdateSubnet {
2605 fn request_options(&mut self) -> &mut crate::RequestOptions {
2606 &mut self.0.options
2607 }
2608 }
2609
2610 #[derive(Clone, Debug)]
2631 pub struct ListExternalAccessRules(
2632 RequestBuilder<crate::model::ListExternalAccessRulesRequest>,
2633 );
2634
2635 impl ListExternalAccessRules {
2636 pub(crate) fn new(
2637 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2638 ) -> Self {
2639 Self(RequestBuilder::new(stub))
2640 }
2641
2642 pub fn with_request<V: Into<crate::model::ListExternalAccessRulesRequest>>(
2644 mut self,
2645 v: V,
2646 ) -> Self {
2647 self.0.request = v.into();
2648 self
2649 }
2650
2651 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2653 self.0.options = v.into();
2654 self
2655 }
2656
2657 pub async fn send(self) -> Result<crate::model::ListExternalAccessRulesResponse> {
2659 (*self.0.stub)
2660 .list_external_access_rules(self.0.request, self.0.options)
2661 .await
2662 .map(crate::Response::into_body)
2663 }
2664
2665 pub fn by_page(
2667 self,
2668 ) -> impl google_cloud_gax::paginator::Paginator<
2669 crate::model::ListExternalAccessRulesResponse,
2670 crate::Error,
2671 > {
2672 use std::clone::Clone;
2673 let token = self.0.request.page_token.clone();
2674 let execute = move |token: String| {
2675 let mut builder = self.clone();
2676 builder.0.request = builder.0.request.set_page_token(token);
2677 builder.send()
2678 };
2679 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2680 }
2681
2682 pub fn by_item(
2684 self,
2685 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2686 crate::model::ListExternalAccessRulesResponse,
2687 crate::Error,
2688 > {
2689 use google_cloud_gax::paginator::Paginator;
2690 self.by_page().items()
2691 }
2692
2693 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2697 self.0.request.parent = v.into();
2698 self
2699 }
2700
2701 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2703 self.0.request.page_size = v.into();
2704 self
2705 }
2706
2707 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2709 self.0.request.page_token = v.into();
2710 self
2711 }
2712
2713 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2715 self.0.request.filter = v.into();
2716 self
2717 }
2718
2719 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2721 self.0.request.order_by = v.into();
2722 self
2723 }
2724 }
2725
2726 #[doc(hidden)]
2727 impl crate::RequestBuilder for ListExternalAccessRules {
2728 fn request_options(&mut self) -> &mut crate::RequestOptions {
2729 &mut self.0.options
2730 }
2731 }
2732
2733 #[derive(Clone, Debug)]
2750 pub struct GetExternalAccessRule(RequestBuilder<crate::model::GetExternalAccessRuleRequest>);
2751
2752 impl GetExternalAccessRule {
2753 pub(crate) fn new(
2754 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2755 ) -> Self {
2756 Self(RequestBuilder::new(stub))
2757 }
2758
2759 pub fn with_request<V: Into<crate::model::GetExternalAccessRuleRequest>>(
2761 mut self,
2762 v: V,
2763 ) -> Self {
2764 self.0.request = v.into();
2765 self
2766 }
2767
2768 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2770 self.0.options = v.into();
2771 self
2772 }
2773
2774 pub async fn send(self) -> Result<crate::model::ExternalAccessRule> {
2776 (*self.0.stub)
2777 .get_external_access_rule(self.0.request, self.0.options)
2778 .await
2779 .map(crate::Response::into_body)
2780 }
2781
2782 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2786 self.0.request.name = v.into();
2787 self
2788 }
2789 }
2790
2791 #[doc(hidden)]
2792 impl crate::RequestBuilder for GetExternalAccessRule {
2793 fn request_options(&mut self) -> &mut crate::RequestOptions {
2794 &mut self.0.options
2795 }
2796 }
2797
2798 #[derive(Clone, Debug)]
2816 pub struct CreateExternalAccessRule(
2817 RequestBuilder<crate::model::CreateExternalAccessRuleRequest>,
2818 );
2819
2820 impl CreateExternalAccessRule {
2821 pub(crate) fn new(
2822 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2823 ) -> Self {
2824 Self(RequestBuilder::new(stub))
2825 }
2826
2827 pub fn with_request<V: Into<crate::model::CreateExternalAccessRuleRequest>>(
2829 mut self,
2830 v: V,
2831 ) -> Self {
2832 self.0.request = v.into();
2833 self
2834 }
2835
2836 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2838 self.0.options = v.into();
2839 self
2840 }
2841
2842 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2849 (*self.0.stub)
2850 .create_external_access_rule(self.0.request, self.0.options)
2851 .await
2852 .map(crate::Response::into_body)
2853 }
2854
2855 pub fn poller(
2857 self,
2858 ) -> impl google_cloud_lro::Poller<
2859 crate::model::ExternalAccessRule,
2860 crate::model::OperationMetadata,
2861 > {
2862 type Operation = google_cloud_lro::internal::Operation<
2863 crate::model::ExternalAccessRule,
2864 crate::model::OperationMetadata,
2865 >;
2866 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2867 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2868
2869 let stub = self.0.stub.clone();
2870 let mut options = self.0.options.clone();
2871 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2872 let query = move |name| {
2873 let stub = stub.clone();
2874 let options = options.clone();
2875 async {
2876 let op = GetOperation::new(stub)
2877 .set_name(name)
2878 .with_options(options)
2879 .send()
2880 .await?;
2881 Ok(Operation::new(op))
2882 }
2883 };
2884
2885 let start = move || async {
2886 let op = self.send().await?;
2887 Ok(Operation::new(op))
2888 };
2889
2890 google_cloud_lro::internal::new_poller(
2891 polling_error_policy,
2892 polling_backoff_policy,
2893 start,
2894 query,
2895 )
2896 }
2897
2898 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2902 self.0.request.parent = v.into();
2903 self
2904 }
2905
2906 pub fn set_external_access_rule<T>(mut self, v: T) -> Self
2910 where
2911 T: std::convert::Into<crate::model::ExternalAccessRule>,
2912 {
2913 self.0.request.external_access_rule = std::option::Option::Some(v.into());
2914 self
2915 }
2916
2917 pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
2921 where
2922 T: std::convert::Into<crate::model::ExternalAccessRule>,
2923 {
2924 self.0.request.external_access_rule = v.map(|x| x.into());
2925 self
2926 }
2927
2928 pub fn set_external_access_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2932 self.0.request.external_access_rule_id = v.into();
2933 self
2934 }
2935
2936 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2938 self.0.request.request_id = v.into();
2939 self
2940 }
2941 }
2942
2943 #[doc(hidden)]
2944 impl crate::RequestBuilder for CreateExternalAccessRule {
2945 fn request_options(&mut self) -> &mut crate::RequestOptions {
2946 &mut self.0.options
2947 }
2948 }
2949
2950 #[derive(Clone, Debug)]
2968 pub struct UpdateExternalAccessRule(
2969 RequestBuilder<crate::model::UpdateExternalAccessRuleRequest>,
2970 );
2971
2972 impl UpdateExternalAccessRule {
2973 pub(crate) fn new(
2974 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2975 ) -> Self {
2976 Self(RequestBuilder::new(stub))
2977 }
2978
2979 pub fn with_request<V: Into<crate::model::UpdateExternalAccessRuleRequest>>(
2981 mut self,
2982 v: V,
2983 ) -> Self {
2984 self.0.request = v.into();
2985 self
2986 }
2987
2988 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2990 self.0.options = v.into();
2991 self
2992 }
2993
2994 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3001 (*self.0.stub)
3002 .update_external_access_rule(self.0.request, self.0.options)
3003 .await
3004 .map(crate::Response::into_body)
3005 }
3006
3007 pub fn poller(
3009 self,
3010 ) -> impl google_cloud_lro::Poller<
3011 crate::model::ExternalAccessRule,
3012 crate::model::OperationMetadata,
3013 > {
3014 type Operation = google_cloud_lro::internal::Operation<
3015 crate::model::ExternalAccessRule,
3016 crate::model::OperationMetadata,
3017 >;
3018 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3019 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3020
3021 let stub = self.0.stub.clone();
3022 let mut options = self.0.options.clone();
3023 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3024 let query = move |name| {
3025 let stub = stub.clone();
3026 let options = options.clone();
3027 async {
3028 let op = GetOperation::new(stub)
3029 .set_name(name)
3030 .with_options(options)
3031 .send()
3032 .await?;
3033 Ok(Operation::new(op))
3034 }
3035 };
3036
3037 let start = move || async {
3038 let op = self.send().await?;
3039 Ok(Operation::new(op))
3040 };
3041
3042 google_cloud_lro::internal::new_poller(
3043 polling_error_policy,
3044 polling_backoff_policy,
3045 start,
3046 query,
3047 )
3048 }
3049
3050 pub fn set_update_mask<T>(mut self, v: T) -> Self
3054 where
3055 T: std::convert::Into<wkt::FieldMask>,
3056 {
3057 self.0.request.update_mask = std::option::Option::Some(v.into());
3058 self
3059 }
3060
3061 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3065 where
3066 T: std::convert::Into<wkt::FieldMask>,
3067 {
3068 self.0.request.update_mask = v.map(|x| x.into());
3069 self
3070 }
3071
3072 pub fn set_external_access_rule<T>(mut self, v: T) -> Self
3076 where
3077 T: std::convert::Into<crate::model::ExternalAccessRule>,
3078 {
3079 self.0.request.external_access_rule = std::option::Option::Some(v.into());
3080 self
3081 }
3082
3083 pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
3087 where
3088 T: std::convert::Into<crate::model::ExternalAccessRule>,
3089 {
3090 self.0.request.external_access_rule = v.map(|x| x.into());
3091 self
3092 }
3093
3094 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3096 self.0.request.request_id = v.into();
3097 self
3098 }
3099 }
3100
3101 #[doc(hidden)]
3102 impl crate::RequestBuilder for UpdateExternalAccessRule {
3103 fn request_options(&mut self) -> &mut crate::RequestOptions {
3104 &mut self.0.options
3105 }
3106 }
3107
3108 #[derive(Clone, Debug)]
3126 pub struct DeleteExternalAccessRule(
3127 RequestBuilder<crate::model::DeleteExternalAccessRuleRequest>,
3128 );
3129
3130 impl DeleteExternalAccessRule {
3131 pub(crate) fn new(
3132 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3133 ) -> Self {
3134 Self(RequestBuilder::new(stub))
3135 }
3136
3137 pub fn with_request<V: Into<crate::model::DeleteExternalAccessRuleRequest>>(
3139 mut self,
3140 v: V,
3141 ) -> Self {
3142 self.0.request = v.into();
3143 self
3144 }
3145
3146 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3148 self.0.options = v.into();
3149 self
3150 }
3151
3152 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3159 (*self.0.stub)
3160 .delete_external_access_rule(self.0.request, self.0.options)
3161 .await
3162 .map(crate::Response::into_body)
3163 }
3164
3165 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3167 type Operation =
3168 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3169 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3170 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3171
3172 let stub = self.0.stub.clone();
3173 let mut options = self.0.options.clone();
3174 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3175 let query = move |name| {
3176 let stub = stub.clone();
3177 let options = options.clone();
3178 async {
3179 let op = GetOperation::new(stub)
3180 .set_name(name)
3181 .with_options(options)
3182 .send()
3183 .await?;
3184 Ok(Operation::new(op))
3185 }
3186 };
3187
3188 let start = move || async {
3189 let op = self.send().await?;
3190 Ok(Operation::new(op))
3191 };
3192
3193 google_cloud_lro::internal::new_unit_response_poller(
3194 polling_error_policy,
3195 polling_backoff_policy,
3196 start,
3197 query,
3198 )
3199 }
3200
3201 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3205 self.0.request.name = v.into();
3206 self
3207 }
3208
3209 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3211 self.0.request.request_id = v.into();
3212 self
3213 }
3214 }
3215
3216 #[doc(hidden)]
3217 impl crate::RequestBuilder for DeleteExternalAccessRule {
3218 fn request_options(&mut self) -> &mut crate::RequestOptions {
3219 &mut self.0.options
3220 }
3221 }
3222
3223 #[derive(Clone, Debug)]
3244 pub struct ListLoggingServers(RequestBuilder<crate::model::ListLoggingServersRequest>);
3245
3246 impl ListLoggingServers {
3247 pub(crate) fn new(
3248 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3249 ) -> Self {
3250 Self(RequestBuilder::new(stub))
3251 }
3252
3253 pub fn with_request<V: Into<crate::model::ListLoggingServersRequest>>(
3255 mut self,
3256 v: V,
3257 ) -> Self {
3258 self.0.request = v.into();
3259 self
3260 }
3261
3262 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3264 self.0.options = v.into();
3265 self
3266 }
3267
3268 pub async fn send(self) -> Result<crate::model::ListLoggingServersResponse> {
3270 (*self.0.stub)
3271 .list_logging_servers(self.0.request, self.0.options)
3272 .await
3273 .map(crate::Response::into_body)
3274 }
3275
3276 pub fn by_page(
3278 self,
3279 ) -> impl google_cloud_gax::paginator::Paginator<
3280 crate::model::ListLoggingServersResponse,
3281 crate::Error,
3282 > {
3283 use std::clone::Clone;
3284 let token = self.0.request.page_token.clone();
3285 let execute = move |token: String| {
3286 let mut builder = self.clone();
3287 builder.0.request = builder.0.request.set_page_token(token);
3288 builder.send()
3289 };
3290 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3291 }
3292
3293 pub fn by_item(
3295 self,
3296 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3297 crate::model::ListLoggingServersResponse,
3298 crate::Error,
3299 > {
3300 use google_cloud_gax::paginator::Paginator;
3301 self.by_page().items()
3302 }
3303
3304 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3308 self.0.request.parent = v.into();
3309 self
3310 }
3311
3312 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3314 self.0.request.page_size = v.into();
3315 self
3316 }
3317
3318 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3320 self.0.request.page_token = v.into();
3321 self
3322 }
3323
3324 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3326 self.0.request.filter = v.into();
3327 self
3328 }
3329
3330 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3332 self.0.request.order_by = v.into();
3333 self
3334 }
3335 }
3336
3337 #[doc(hidden)]
3338 impl crate::RequestBuilder for ListLoggingServers {
3339 fn request_options(&mut self) -> &mut crate::RequestOptions {
3340 &mut self.0.options
3341 }
3342 }
3343
3344 #[derive(Clone, Debug)]
3361 pub struct GetLoggingServer(RequestBuilder<crate::model::GetLoggingServerRequest>);
3362
3363 impl GetLoggingServer {
3364 pub(crate) fn new(
3365 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3366 ) -> Self {
3367 Self(RequestBuilder::new(stub))
3368 }
3369
3370 pub fn with_request<V: Into<crate::model::GetLoggingServerRequest>>(
3372 mut self,
3373 v: V,
3374 ) -> Self {
3375 self.0.request = v.into();
3376 self
3377 }
3378
3379 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3381 self.0.options = v.into();
3382 self
3383 }
3384
3385 pub async fn send(self) -> Result<crate::model::LoggingServer> {
3387 (*self.0.stub)
3388 .get_logging_server(self.0.request, self.0.options)
3389 .await
3390 .map(crate::Response::into_body)
3391 }
3392
3393 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3397 self.0.request.name = v.into();
3398 self
3399 }
3400 }
3401
3402 #[doc(hidden)]
3403 impl crate::RequestBuilder for GetLoggingServer {
3404 fn request_options(&mut self) -> &mut crate::RequestOptions {
3405 &mut self.0.options
3406 }
3407 }
3408
3409 #[derive(Clone, Debug)]
3427 pub struct CreateLoggingServer(RequestBuilder<crate::model::CreateLoggingServerRequest>);
3428
3429 impl CreateLoggingServer {
3430 pub(crate) fn new(
3431 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3432 ) -> Self {
3433 Self(RequestBuilder::new(stub))
3434 }
3435
3436 pub fn with_request<V: Into<crate::model::CreateLoggingServerRequest>>(
3438 mut self,
3439 v: V,
3440 ) -> Self {
3441 self.0.request = v.into();
3442 self
3443 }
3444
3445 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3447 self.0.options = v.into();
3448 self
3449 }
3450
3451 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3458 (*self.0.stub)
3459 .create_logging_server(self.0.request, self.0.options)
3460 .await
3461 .map(crate::Response::into_body)
3462 }
3463
3464 pub fn poller(
3466 self,
3467 ) -> impl google_cloud_lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3468 {
3469 type Operation = google_cloud_lro::internal::Operation<
3470 crate::model::LoggingServer,
3471 crate::model::OperationMetadata,
3472 >;
3473 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3474 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3475
3476 let stub = self.0.stub.clone();
3477 let mut options = self.0.options.clone();
3478 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3479 let query = move |name| {
3480 let stub = stub.clone();
3481 let options = options.clone();
3482 async {
3483 let op = GetOperation::new(stub)
3484 .set_name(name)
3485 .with_options(options)
3486 .send()
3487 .await?;
3488 Ok(Operation::new(op))
3489 }
3490 };
3491
3492 let start = move || async {
3493 let op = self.send().await?;
3494 Ok(Operation::new(op))
3495 };
3496
3497 google_cloud_lro::internal::new_poller(
3498 polling_error_policy,
3499 polling_backoff_policy,
3500 start,
3501 query,
3502 )
3503 }
3504
3505 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3509 self.0.request.parent = v.into();
3510 self
3511 }
3512
3513 pub fn set_logging_server<T>(mut self, v: T) -> Self
3517 where
3518 T: std::convert::Into<crate::model::LoggingServer>,
3519 {
3520 self.0.request.logging_server = std::option::Option::Some(v.into());
3521 self
3522 }
3523
3524 pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3528 where
3529 T: std::convert::Into<crate::model::LoggingServer>,
3530 {
3531 self.0.request.logging_server = v.map(|x| x.into());
3532 self
3533 }
3534
3535 pub fn set_logging_server_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3539 self.0.request.logging_server_id = v.into();
3540 self
3541 }
3542
3543 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3545 self.0.request.request_id = v.into();
3546 self
3547 }
3548 }
3549
3550 #[doc(hidden)]
3551 impl crate::RequestBuilder for CreateLoggingServer {
3552 fn request_options(&mut self) -> &mut crate::RequestOptions {
3553 &mut self.0.options
3554 }
3555 }
3556
3557 #[derive(Clone, Debug)]
3575 pub struct UpdateLoggingServer(RequestBuilder<crate::model::UpdateLoggingServerRequest>);
3576
3577 impl UpdateLoggingServer {
3578 pub(crate) fn new(
3579 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3580 ) -> Self {
3581 Self(RequestBuilder::new(stub))
3582 }
3583
3584 pub fn with_request<V: Into<crate::model::UpdateLoggingServerRequest>>(
3586 mut self,
3587 v: V,
3588 ) -> Self {
3589 self.0.request = v.into();
3590 self
3591 }
3592
3593 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3595 self.0.options = v.into();
3596 self
3597 }
3598
3599 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3606 (*self.0.stub)
3607 .update_logging_server(self.0.request, self.0.options)
3608 .await
3609 .map(crate::Response::into_body)
3610 }
3611
3612 pub fn poller(
3614 self,
3615 ) -> impl google_cloud_lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3616 {
3617 type Operation = google_cloud_lro::internal::Operation<
3618 crate::model::LoggingServer,
3619 crate::model::OperationMetadata,
3620 >;
3621 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3622 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3623
3624 let stub = self.0.stub.clone();
3625 let mut options = self.0.options.clone();
3626 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3627 let query = move |name| {
3628 let stub = stub.clone();
3629 let options = options.clone();
3630 async {
3631 let op = GetOperation::new(stub)
3632 .set_name(name)
3633 .with_options(options)
3634 .send()
3635 .await?;
3636 Ok(Operation::new(op))
3637 }
3638 };
3639
3640 let start = move || async {
3641 let op = self.send().await?;
3642 Ok(Operation::new(op))
3643 };
3644
3645 google_cloud_lro::internal::new_poller(
3646 polling_error_policy,
3647 polling_backoff_policy,
3648 start,
3649 query,
3650 )
3651 }
3652
3653 pub fn set_update_mask<T>(mut self, v: T) -> Self
3657 where
3658 T: std::convert::Into<wkt::FieldMask>,
3659 {
3660 self.0.request.update_mask = std::option::Option::Some(v.into());
3661 self
3662 }
3663
3664 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3668 where
3669 T: std::convert::Into<wkt::FieldMask>,
3670 {
3671 self.0.request.update_mask = v.map(|x| x.into());
3672 self
3673 }
3674
3675 pub fn set_logging_server<T>(mut self, v: T) -> Self
3679 where
3680 T: std::convert::Into<crate::model::LoggingServer>,
3681 {
3682 self.0.request.logging_server = std::option::Option::Some(v.into());
3683 self
3684 }
3685
3686 pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3690 where
3691 T: std::convert::Into<crate::model::LoggingServer>,
3692 {
3693 self.0.request.logging_server = v.map(|x| x.into());
3694 self
3695 }
3696
3697 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3699 self.0.request.request_id = v.into();
3700 self
3701 }
3702 }
3703
3704 #[doc(hidden)]
3705 impl crate::RequestBuilder for UpdateLoggingServer {
3706 fn request_options(&mut self) -> &mut crate::RequestOptions {
3707 &mut self.0.options
3708 }
3709 }
3710
3711 #[derive(Clone, Debug)]
3729 pub struct DeleteLoggingServer(RequestBuilder<crate::model::DeleteLoggingServerRequest>);
3730
3731 impl DeleteLoggingServer {
3732 pub(crate) fn new(
3733 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3734 ) -> Self {
3735 Self(RequestBuilder::new(stub))
3736 }
3737
3738 pub fn with_request<V: Into<crate::model::DeleteLoggingServerRequest>>(
3740 mut self,
3741 v: V,
3742 ) -> Self {
3743 self.0.request = v.into();
3744 self
3745 }
3746
3747 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3749 self.0.options = v.into();
3750 self
3751 }
3752
3753 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3760 (*self.0.stub)
3761 .delete_logging_server(self.0.request, self.0.options)
3762 .await
3763 .map(crate::Response::into_body)
3764 }
3765
3766 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3768 type Operation =
3769 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3770 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3771 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3772
3773 let stub = self.0.stub.clone();
3774 let mut options = self.0.options.clone();
3775 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3776 let query = move |name| {
3777 let stub = stub.clone();
3778 let options = options.clone();
3779 async {
3780 let op = GetOperation::new(stub)
3781 .set_name(name)
3782 .with_options(options)
3783 .send()
3784 .await?;
3785 Ok(Operation::new(op))
3786 }
3787 };
3788
3789 let start = move || async {
3790 let op = self.send().await?;
3791 Ok(Operation::new(op))
3792 };
3793
3794 google_cloud_lro::internal::new_unit_response_poller(
3795 polling_error_policy,
3796 polling_backoff_policy,
3797 start,
3798 query,
3799 )
3800 }
3801
3802 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3806 self.0.request.name = v.into();
3807 self
3808 }
3809
3810 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3812 self.0.request.request_id = v.into();
3813 self
3814 }
3815 }
3816
3817 #[doc(hidden)]
3818 impl crate::RequestBuilder for DeleteLoggingServer {
3819 fn request_options(&mut self) -> &mut crate::RequestOptions {
3820 &mut self.0.options
3821 }
3822 }
3823
3824 #[derive(Clone, Debug)]
3845 pub struct ListNodeTypes(RequestBuilder<crate::model::ListNodeTypesRequest>);
3846
3847 impl ListNodeTypes {
3848 pub(crate) fn new(
3849 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3850 ) -> Self {
3851 Self(RequestBuilder::new(stub))
3852 }
3853
3854 pub fn with_request<V: Into<crate::model::ListNodeTypesRequest>>(mut self, v: V) -> Self {
3856 self.0.request = v.into();
3857 self
3858 }
3859
3860 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3862 self.0.options = v.into();
3863 self
3864 }
3865
3866 pub async fn send(self) -> Result<crate::model::ListNodeTypesResponse> {
3868 (*self.0.stub)
3869 .list_node_types(self.0.request, self.0.options)
3870 .await
3871 .map(crate::Response::into_body)
3872 }
3873
3874 pub fn by_page(
3876 self,
3877 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListNodeTypesResponse, crate::Error>
3878 {
3879 use std::clone::Clone;
3880 let token = self.0.request.page_token.clone();
3881 let execute = move |token: String| {
3882 let mut builder = self.clone();
3883 builder.0.request = builder.0.request.set_page_token(token);
3884 builder.send()
3885 };
3886 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3887 }
3888
3889 pub fn by_item(
3891 self,
3892 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3893 crate::model::ListNodeTypesResponse,
3894 crate::Error,
3895 > {
3896 use google_cloud_gax::paginator::Paginator;
3897 self.by_page().items()
3898 }
3899
3900 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3904 self.0.request.parent = v.into();
3905 self
3906 }
3907
3908 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3910 self.0.request.page_size = v.into();
3911 self
3912 }
3913
3914 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3916 self.0.request.page_token = v.into();
3917 self
3918 }
3919
3920 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3922 self.0.request.filter = v.into();
3923 self
3924 }
3925 }
3926
3927 #[doc(hidden)]
3928 impl crate::RequestBuilder for ListNodeTypes {
3929 fn request_options(&mut self) -> &mut crate::RequestOptions {
3930 &mut self.0.options
3931 }
3932 }
3933
3934 #[derive(Clone, Debug)]
3951 pub struct GetNodeType(RequestBuilder<crate::model::GetNodeTypeRequest>);
3952
3953 impl GetNodeType {
3954 pub(crate) fn new(
3955 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3956 ) -> Self {
3957 Self(RequestBuilder::new(stub))
3958 }
3959
3960 pub fn with_request<V: Into<crate::model::GetNodeTypeRequest>>(mut self, v: V) -> Self {
3962 self.0.request = v.into();
3963 self
3964 }
3965
3966 pub fn with_options<V: Into<crate::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::NodeType> {
3974 (*self.0.stub)
3975 .get_node_type(self.0.request, self.0.options)
3976 .await
3977 .map(crate::Response::into_body)
3978 }
3979
3980 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3984 self.0.request.name = v.into();
3985 self
3986 }
3987 }
3988
3989 #[doc(hidden)]
3990 impl crate::RequestBuilder for GetNodeType {
3991 fn request_options(&mut self) -> &mut crate::RequestOptions {
3992 &mut self.0.options
3993 }
3994 }
3995
3996 #[derive(Clone, Debug)]
4013 pub struct ShowNsxCredentials(RequestBuilder<crate::model::ShowNsxCredentialsRequest>);
4014
4015 impl ShowNsxCredentials {
4016 pub(crate) fn new(
4017 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4018 ) -> Self {
4019 Self(RequestBuilder::new(stub))
4020 }
4021
4022 pub fn with_request<V: Into<crate::model::ShowNsxCredentialsRequest>>(
4024 mut self,
4025 v: V,
4026 ) -> Self {
4027 self.0.request = v.into();
4028 self
4029 }
4030
4031 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4033 self.0.options = v.into();
4034 self
4035 }
4036
4037 pub async fn send(self) -> Result<crate::model::Credentials> {
4039 (*self.0.stub)
4040 .show_nsx_credentials(self.0.request, self.0.options)
4041 .await
4042 .map(crate::Response::into_body)
4043 }
4044
4045 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4049 self.0.request.private_cloud = v.into();
4050 self
4051 }
4052 }
4053
4054 #[doc(hidden)]
4055 impl crate::RequestBuilder for ShowNsxCredentials {
4056 fn request_options(&mut self) -> &mut crate::RequestOptions {
4057 &mut self.0.options
4058 }
4059 }
4060
4061 #[derive(Clone, Debug)]
4078 pub struct ShowVcenterCredentials(RequestBuilder<crate::model::ShowVcenterCredentialsRequest>);
4079
4080 impl ShowVcenterCredentials {
4081 pub(crate) fn new(
4082 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4083 ) -> Self {
4084 Self(RequestBuilder::new(stub))
4085 }
4086
4087 pub fn with_request<V: Into<crate::model::ShowVcenterCredentialsRequest>>(
4089 mut self,
4090 v: V,
4091 ) -> Self {
4092 self.0.request = v.into();
4093 self
4094 }
4095
4096 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4098 self.0.options = v.into();
4099 self
4100 }
4101
4102 pub async fn send(self) -> Result<crate::model::Credentials> {
4104 (*self.0.stub)
4105 .show_vcenter_credentials(self.0.request, self.0.options)
4106 .await
4107 .map(crate::Response::into_body)
4108 }
4109
4110 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4114 self.0.request.private_cloud = v.into();
4115 self
4116 }
4117
4118 pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
4120 self.0.request.username = v.into();
4121 self
4122 }
4123 }
4124
4125 #[doc(hidden)]
4126 impl crate::RequestBuilder for ShowVcenterCredentials {
4127 fn request_options(&mut self) -> &mut crate::RequestOptions {
4128 &mut self.0.options
4129 }
4130 }
4131
4132 #[derive(Clone, Debug)]
4150 pub struct ResetNsxCredentials(RequestBuilder<crate::model::ResetNsxCredentialsRequest>);
4151
4152 impl ResetNsxCredentials {
4153 pub(crate) fn new(
4154 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4155 ) -> Self {
4156 Self(RequestBuilder::new(stub))
4157 }
4158
4159 pub fn with_request<V: Into<crate::model::ResetNsxCredentialsRequest>>(
4161 mut self,
4162 v: V,
4163 ) -> Self {
4164 self.0.request = v.into();
4165 self
4166 }
4167
4168 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4170 self.0.options = v.into();
4171 self
4172 }
4173
4174 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4181 (*self.0.stub)
4182 .reset_nsx_credentials(self.0.request, self.0.options)
4183 .await
4184 .map(crate::Response::into_body)
4185 }
4186
4187 pub fn poller(
4189 self,
4190 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
4191 {
4192 type Operation = google_cloud_lro::internal::Operation<
4193 crate::model::PrivateCloud,
4194 crate::model::OperationMetadata,
4195 >;
4196 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4197 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4198
4199 let stub = self.0.stub.clone();
4200 let mut options = self.0.options.clone();
4201 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4202 let query = move |name| {
4203 let stub = stub.clone();
4204 let options = options.clone();
4205 async {
4206 let op = GetOperation::new(stub)
4207 .set_name(name)
4208 .with_options(options)
4209 .send()
4210 .await?;
4211 Ok(Operation::new(op))
4212 }
4213 };
4214
4215 let start = move || async {
4216 let op = self.send().await?;
4217 Ok(Operation::new(op))
4218 };
4219
4220 google_cloud_lro::internal::new_poller(
4221 polling_error_policy,
4222 polling_backoff_policy,
4223 start,
4224 query,
4225 )
4226 }
4227
4228 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4232 self.0.request.private_cloud = v.into();
4233 self
4234 }
4235
4236 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4238 self.0.request.request_id = v.into();
4239 self
4240 }
4241 }
4242
4243 #[doc(hidden)]
4244 impl crate::RequestBuilder for ResetNsxCredentials {
4245 fn request_options(&mut self) -> &mut crate::RequestOptions {
4246 &mut self.0.options
4247 }
4248 }
4249
4250 #[derive(Clone, Debug)]
4268 pub struct ResetVcenterCredentials(
4269 RequestBuilder<crate::model::ResetVcenterCredentialsRequest>,
4270 );
4271
4272 impl ResetVcenterCredentials {
4273 pub(crate) fn new(
4274 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4275 ) -> Self {
4276 Self(RequestBuilder::new(stub))
4277 }
4278
4279 pub fn with_request<V: Into<crate::model::ResetVcenterCredentialsRequest>>(
4281 mut self,
4282 v: V,
4283 ) -> Self {
4284 self.0.request = v.into();
4285 self
4286 }
4287
4288 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4290 self.0.options = v.into();
4291 self
4292 }
4293
4294 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4301 (*self.0.stub)
4302 .reset_vcenter_credentials(self.0.request, self.0.options)
4303 .await
4304 .map(crate::Response::into_body)
4305 }
4306
4307 pub fn poller(
4309 self,
4310 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
4311 {
4312 type Operation = google_cloud_lro::internal::Operation<
4313 crate::model::PrivateCloud,
4314 crate::model::OperationMetadata,
4315 >;
4316 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4317 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4318
4319 let stub = self.0.stub.clone();
4320 let mut options = self.0.options.clone();
4321 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4322 let query = move |name| {
4323 let stub = stub.clone();
4324 let options = options.clone();
4325 async {
4326 let op = GetOperation::new(stub)
4327 .set_name(name)
4328 .with_options(options)
4329 .send()
4330 .await?;
4331 Ok(Operation::new(op))
4332 }
4333 };
4334
4335 let start = move || async {
4336 let op = self.send().await?;
4337 Ok(Operation::new(op))
4338 };
4339
4340 google_cloud_lro::internal::new_poller(
4341 polling_error_policy,
4342 polling_backoff_policy,
4343 start,
4344 query,
4345 )
4346 }
4347
4348 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4352 self.0.request.private_cloud = v.into();
4353 self
4354 }
4355
4356 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4358 self.0.request.request_id = v.into();
4359 self
4360 }
4361
4362 pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
4364 self.0.request.username = v.into();
4365 self
4366 }
4367 }
4368
4369 #[doc(hidden)]
4370 impl crate::RequestBuilder for ResetVcenterCredentials {
4371 fn request_options(&mut self) -> &mut crate::RequestOptions {
4372 &mut self.0.options
4373 }
4374 }
4375
4376 #[derive(Clone, Debug)]
4393 pub struct GetDnsForwarding(RequestBuilder<crate::model::GetDnsForwardingRequest>);
4394
4395 impl GetDnsForwarding {
4396 pub(crate) fn new(
4397 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4398 ) -> Self {
4399 Self(RequestBuilder::new(stub))
4400 }
4401
4402 pub fn with_request<V: Into<crate::model::GetDnsForwardingRequest>>(
4404 mut self,
4405 v: V,
4406 ) -> Self {
4407 self.0.request = v.into();
4408 self
4409 }
4410
4411 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4413 self.0.options = v.into();
4414 self
4415 }
4416
4417 pub async fn send(self) -> Result<crate::model::DnsForwarding> {
4419 (*self.0.stub)
4420 .get_dns_forwarding(self.0.request, self.0.options)
4421 .await
4422 .map(crate::Response::into_body)
4423 }
4424
4425 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4429 self.0.request.name = v.into();
4430 self
4431 }
4432 }
4433
4434 #[doc(hidden)]
4435 impl crate::RequestBuilder for GetDnsForwarding {
4436 fn request_options(&mut self) -> &mut crate::RequestOptions {
4437 &mut self.0.options
4438 }
4439 }
4440
4441 #[derive(Clone, Debug)]
4459 pub struct UpdateDnsForwarding(RequestBuilder<crate::model::UpdateDnsForwardingRequest>);
4460
4461 impl UpdateDnsForwarding {
4462 pub(crate) fn new(
4463 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4464 ) -> Self {
4465 Self(RequestBuilder::new(stub))
4466 }
4467
4468 pub fn with_request<V: Into<crate::model::UpdateDnsForwardingRequest>>(
4470 mut self,
4471 v: V,
4472 ) -> Self {
4473 self.0.request = v.into();
4474 self
4475 }
4476
4477 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4479 self.0.options = v.into();
4480 self
4481 }
4482
4483 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4490 (*self.0.stub)
4491 .update_dns_forwarding(self.0.request, self.0.options)
4492 .await
4493 .map(crate::Response::into_body)
4494 }
4495
4496 pub fn poller(
4498 self,
4499 ) -> impl google_cloud_lro::Poller<crate::model::DnsForwarding, crate::model::OperationMetadata>
4500 {
4501 type Operation = google_cloud_lro::internal::Operation<
4502 crate::model::DnsForwarding,
4503 crate::model::OperationMetadata,
4504 >;
4505 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4506 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4507
4508 let stub = self.0.stub.clone();
4509 let mut options = self.0.options.clone();
4510 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4511 let query = move |name| {
4512 let stub = stub.clone();
4513 let options = options.clone();
4514 async {
4515 let op = GetOperation::new(stub)
4516 .set_name(name)
4517 .with_options(options)
4518 .send()
4519 .await?;
4520 Ok(Operation::new(op))
4521 }
4522 };
4523
4524 let start = move || async {
4525 let op = self.send().await?;
4526 Ok(Operation::new(op))
4527 };
4528
4529 google_cloud_lro::internal::new_poller(
4530 polling_error_policy,
4531 polling_backoff_policy,
4532 start,
4533 query,
4534 )
4535 }
4536
4537 pub fn set_dns_forwarding<T>(mut self, v: T) -> Self
4541 where
4542 T: std::convert::Into<crate::model::DnsForwarding>,
4543 {
4544 self.0.request.dns_forwarding = std::option::Option::Some(v.into());
4545 self
4546 }
4547
4548 pub fn set_or_clear_dns_forwarding<T>(mut self, v: std::option::Option<T>) -> Self
4552 where
4553 T: std::convert::Into<crate::model::DnsForwarding>,
4554 {
4555 self.0.request.dns_forwarding = v.map(|x| x.into());
4556 self
4557 }
4558
4559 pub fn set_update_mask<T>(mut self, v: T) -> Self
4563 where
4564 T: std::convert::Into<wkt::FieldMask>,
4565 {
4566 self.0.request.update_mask = std::option::Option::Some(v.into());
4567 self
4568 }
4569
4570 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4574 where
4575 T: std::convert::Into<wkt::FieldMask>,
4576 {
4577 self.0.request.update_mask = v.map(|x| x.into());
4578 self
4579 }
4580
4581 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4583 self.0.request.request_id = v.into();
4584 self
4585 }
4586 }
4587
4588 #[doc(hidden)]
4589 impl crate::RequestBuilder for UpdateDnsForwarding {
4590 fn request_options(&mut self) -> &mut crate::RequestOptions {
4591 &mut self.0.options
4592 }
4593 }
4594
4595 #[derive(Clone, Debug)]
4612 pub struct GetNetworkPeering(RequestBuilder<crate::model::GetNetworkPeeringRequest>);
4613
4614 impl GetNetworkPeering {
4615 pub(crate) fn new(
4616 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4617 ) -> Self {
4618 Self(RequestBuilder::new(stub))
4619 }
4620
4621 pub fn with_request<V: Into<crate::model::GetNetworkPeeringRequest>>(
4623 mut self,
4624 v: V,
4625 ) -> Self {
4626 self.0.request = v.into();
4627 self
4628 }
4629
4630 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4632 self.0.options = v.into();
4633 self
4634 }
4635
4636 pub async fn send(self) -> Result<crate::model::NetworkPeering> {
4638 (*self.0.stub)
4639 .get_network_peering(self.0.request, self.0.options)
4640 .await
4641 .map(crate::Response::into_body)
4642 }
4643
4644 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4648 self.0.request.name = v.into();
4649 self
4650 }
4651 }
4652
4653 #[doc(hidden)]
4654 impl crate::RequestBuilder for GetNetworkPeering {
4655 fn request_options(&mut self) -> &mut crate::RequestOptions {
4656 &mut self.0.options
4657 }
4658 }
4659
4660 #[derive(Clone, Debug)]
4681 pub struct ListNetworkPeerings(RequestBuilder<crate::model::ListNetworkPeeringsRequest>);
4682
4683 impl ListNetworkPeerings {
4684 pub(crate) fn new(
4685 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4686 ) -> Self {
4687 Self(RequestBuilder::new(stub))
4688 }
4689
4690 pub fn with_request<V: Into<crate::model::ListNetworkPeeringsRequest>>(
4692 mut self,
4693 v: V,
4694 ) -> Self {
4695 self.0.request = v.into();
4696 self
4697 }
4698
4699 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4701 self.0.options = v.into();
4702 self
4703 }
4704
4705 pub async fn send(self) -> Result<crate::model::ListNetworkPeeringsResponse> {
4707 (*self.0.stub)
4708 .list_network_peerings(self.0.request, self.0.options)
4709 .await
4710 .map(crate::Response::into_body)
4711 }
4712
4713 pub fn by_page(
4715 self,
4716 ) -> impl google_cloud_gax::paginator::Paginator<
4717 crate::model::ListNetworkPeeringsResponse,
4718 crate::Error,
4719 > {
4720 use std::clone::Clone;
4721 let token = self.0.request.page_token.clone();
4722 let execute = move |token: String| {
4723 let mut builder = self.clone();
4724 builder.0.request = builder.0.request.set_page_token(token);
4725 builder.send()
4726 };
4727 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4728 }
4729
4730 pub fn by_item(
4732 self,
4733 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4734 crate::model::ListNetworkPeeringsResponse,
4735 crate::Error,
4736 > {
4737 use google_cloud_gax::paginator::Paginator;
4738 self.by_page().items()
4739 }
4740
4741 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4745 self.0.request.parent = v.into();
4746 self
4747 }
4748
4749 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4751 self.0.request.page_size = v.into();
4752 self
4753 }
4754
4755 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4757 self.0.request.page_token = v.into();
4758 self
4759 }
4760
4761 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4763 self.0.request.filter = v.into();
4764 self
4765 }
4766
4767 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4769 self.0.request.order_by = v.into();
4770 self
4771 }
4772 }
4773
4774 #[doc(hidden)]
4775 impl crate::RequestBuilder for ListNetworkPeerings {
4776 fn request_options(&mut self) -> &mut crate::RequestOptions {
4777 &mut self.0.options
4778 }
4779 }
4780
4781 #[derive(Clone, Debug)]
4799 pub struct CreateNetworkPeering(RequestBuilder<crate::model::CreateNetworkPeeringRequest>);
4800
4801 impl CreateNetworkPeering {
4802 pub(crate) fn new(
4803 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4804 ) -> Self {
4805 Self(RequestBuilder::new(stub))
4806 }
4807
4808 pub fn with_request<V: Into<crate::model::CreateNetworkPeeringRequest>>(
4810 mut self,
4811 v: V,
4812 ) -> Self {
4813 self.0.request = v.into();
4814 self
4815 }
4816
4817 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4819 self.0.options = v.into();
4820 self
4821 }
4822
4823 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4830 (*self.0.stub)
4831 .create_network_peering(self.0.request, self.0.options)
4832 .await
4833 .map(crate::Response::into_body)
4834 }
4835
4836 pub fn poller(
4838 self,
4839 ) -> impl google_cloud_lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
4840 {
4841 type Operation = google_cloud_lro::internal::Operation<
4842 crate::model::NetworkPeering,
4843 crate::model::OperationMetadata,
4844 >;
4845 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4846 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4847
4848 let stub = self.0.stub.clone();
4849 let mut options = self.0.options.clone();
4850 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4851 let query = move |name| {
4852 let stub = stub.clone();
4853 let options = options.clone();
4854 async {
4855 let op = GetOperation::new(stub)
4856 .set_name(name)
4857 .with_options(options)
4858 .send()
4859 .await?;
4860 Ok(Operation::new(op))
4861 }
4862 };
4863
4864 let start = move || async {
4865 let op = self.send().await?;
4866 Ok(Operation::new(op))
4867 };
4868
4869 google_cloud_lro::internal::new_poller(
4870 polling_error_policy,
4871 polling_backoff_policy,
4872 start,
4873 query,
4874 )
4875 }
4876
4877 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4881 self.0.request.parent = v.into();
4882 self
4883 }
4884
4885 pub fn set_network_peering_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4889 self.0.request.network_peering_id = v.into();
4890 self
4891 }
4892
4893 pub fn set_network_peering<T>(mut self, v: T) -> Self
4897 where
4898 T: std::convert::Into<crate::model::NetworkPeering>,
4899 {
4900 self.0.request.network_peering = std::option::Option::Some(v.into());
4901 self
4902 }
4903
4904 pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
4908 where
4909 T: std::convert::Into<crate::model::NetworkPeering>,
4910 {
4911 self.0.request.network_peering = v.map(|x| x.into());
4912 self
4913 }
4914
4915 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4917 self.0.request.request_id = v.into();
4918 self
4919 }
4920 }
4921
4922 #[doc(hidden)]
4923 impl crate::RequestBuilder for CreateNetworkPeering {
4924 fn request_options(&mut self) -> &mut crate::RequestOptions {
4925 &mut self.0.options
4926 }
4927 }
4928
4929 #[derive(Clone, Debug)]
4947 pub struct DeleteNetworkPeering(RequestBuilder<crate::model::DeleteNetworkPeeringRequest>);
4948
4949 impl DeleteNetworkPeering {
4950 pub(crate) fn new(
4951 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4952 ) -> Self {
4953 Self(RequestBuilder::new(stub))
4954 }
4955
4956 pub fn with_request<V: Into<crate::model::DeleteNetworkPeeringRequest>>(
4958 mut self,
4959 v: V,
4960 ) -> Self {
4961 self.0.request = v.into();
4962 self
4963 }
4964
4965 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4967 self.0.options = v.into();
4968 self
4969 }
4970
4971 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4978 (*self.0.stub)
4979 .delete_network_peering(self.0.request, self.0.options)
4980 .await
4981 .map(crate::Response::into_body)
4982 }
4983
4984 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
4986 type Operation =
4987 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4988 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4989 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4990
4991 let stub = self.0.stub.clone();
4992 let mut options = self.0.options.clone();
4993 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4994 let query = move |name| {
4995 let stub = stub.clone();
4996 let options = options.clone();
4997 async {
4998 let op = GetOperation::new(stub)
4999 .set_name(name)
5000 .with_options(options)
5001 .send()
5002 .await?;
5003 Ok(Operation::new(op))
5004 }
5005 };
5006
5007 let start = move || async {
5008 let op = self.send().await?;
5009 Ok(Operation::new(op))
5010 };
5011
5012 google_cloud_lro::internal::new_unit_response_poller(
5013 polling_error_policy,
5014 polling_backoff_policy,
5015 start,
5016 query,
5017 )
5018 }
5019
5020 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5024 self.0.request.name = v.into();
5025 self
5026 }
5027
5028 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5030 self.0.request.request_id = v.into();
5031 self
5032 }
5033 }
5034
5035 #[doc(hidden)]
5036 impl crate::RequestBuilder for DeleteNetworkPeering {
5037 fn request_options(&mut self) -> &mut crate::RequestOptions {
5038 &mut self.0.options
5039 }
5040 }
5041
5042 #[derive(Clone, Debug)]
5060 pub struct UpdateNetworkPeering(RequestBuilder<crate::model::UpdateNetworkPeeringRequest>);
5061
5062 impl UpdateNetworkPeering {
5063 pub(crate) fn new(
5064 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5065 ) -> Self {
5066 Self(RequestBuilder::new(stub))
5067 }
5068
5069 pub fn with_request<V: Into<crate::model::UpdateNetworkPeeringRequest>>(
5071 mut self,
5072 v: V,
5073 ) -> Self {
5074 self.0.request = v.into();
5075 self
5076 }
5077
5078 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5080 self.0.options = v.into();
5081 self
5082 }
5083
5084 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5091 (*self.0.stub)
5092 .update_network_peering(self.0.request, self.0.options)
5093 .await
5094 .map(crate::Response::into_body)
5095 }
5096
5097 pub fn poller(
5099 self,
5100 ) -> impl google_cloud_lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
5101 {
5102 type Operation = google_cloud_lro::internal::Operation<
5103 crate::model::NetworkPeering,
5104 crate::model::OperationMetadata,
5105 >;
5106 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5107 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5108
5109 let stub = self.0.stub.clone();
5110 let mut options = self.0.options.clone();
5111 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5112 let query = move |name| {
5113 let stub = stub.clone();
5114 let options = options.clone();
5115 async {
5116 let op = GetOperation::new(stub)
5117 .set_name(name)
5118 .with_options(options)
5119 .send()
5120 .await?;
5121 Ok(Operation::new(op))
5122 }
5123 };
5124
5125 let start = move || async {
5126 let op = self.send().await?;
5127 Ok(Operation::new(op))
5128 };
5129
5130 google_cloud_lro::internal::new_poller(
5131 polling_error_policy,
5132 polling_backoff_policy,
5133 start,
5134 query,
5135 )
5136 }
5137
5138 pub fn set_network_peering<T>(mut self, v: T) -> Self
5142 where
5143 T: std::convert::Into<crate::model::NetworkPeering>,
5144 {
5145 self.0.request.network_peering = std::option::Option::Some(v.into());
5146 self
5147 }
5148
5149 pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
5153 where
5154 T: std::convert::Into<crate::model::NetworkPeering>,
5155 {
5156 self.0.request.network_peering = v.map(|x| x.into());
5157 self
5158 }
5159
5160 pub fn set_update_mask<T>(mut self, v: T) -> Self
5164 where
5165 T: std::convert::Into<wkt::FieldMask>,
5166 {
5167 self.0.request.update_mask = std::option::Option::Some(v.into());
5168 self
5169 }
5170
5171 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5175 where
5176 T: std::convert::Into<wkt::FieldMask>,
5177 {
5178 self.0.request.update_mask = v.map(|x| x.into());
5179 self
5180 }
5181
5182 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5184 self.0.request.request_id = v.into();
5185 self
5186 }
5187 }
5188
5189 #[doc(hidden)]
5190 impl crate::RequestBuilder for UpdateNetworkPeering {
5191 fn request_options(&mut self) -> &mut crate::RequestOptions {
5192 &mut self.0.options
5193 }
5194 }
5195
5196 #[derive(Clone, Debug)]
5217 pub struct ListPeeringRoutes(RequestBuilder<crate::model::ListPeeringRoutesRequest>);
5218
5219 impl ListPeeringRoutes {
5220 pub(crate) fn new(
5221 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5222 ) -> Self {
5223 Self(RequestBuilder::new(stub))
5224 }
5225
5226 pub fn with_request<V: Into<crate::model::ListPeeringRoutesRequest>>(
5228 mut self,
5229 v: V,
5230 ) -> Self {
5231 self.0.request = v.into();
5232 self
5233 }
5234
5235 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5237 self.0.options = v.into();
5238 self
5239 }
5240
5241 pub async fn send(self) -> Result<crate::model::ListPeeringRoutesResponse> {
5243 (*self.0.stub)
5244 .list_peering_routes(self.0.request, self.0.options)
5245 .await
5246 .map(crate::Response::into_body)
5247 }
5248
5249 pub fn by_page(
5251 self,
5252 ) -> impl google_cloud_gax::paginator::Paginator<
5253 crate::model::ListPeeringRoutesResponse,
5254 crate::Error,
5255 > {
5256 use std::clone::Clone;
5257 let token = self.0.request.page_token.clone();
5258 let execute = move |token: String| {
5259 let mut builder = self.clone();
5260 builder.0.request = builder.0.request.set_page_token(token);
5261 builder.send()
5262 };
5263 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5264 }
5265
5266 pub fn by_item(
5268 self,
5269 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5270 crate::model::ListPeeringRoutesResponse,
5271 crate::Error,
5272 > {
5273 use google_cloud_gax::paginator::Paginator;
5274 self.by_page().items()
5275 }
5276
5277 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5281 self.0.request.parent = v.into();
5282 self
5283 }
5284
5285 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5287 self.0.request.page_size = v.into();
5288 self
5289 }
5290
5291 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5293 self.0.request.page_token = v.into();
5294 self
5295 }
5296
5297 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5299 self.0.request.filter = v.into();
5300 self
5301 }
5302 }
5303
5304 #[doc(hidden)]
5305 impl crate::RequestBuilder for ListPeeringRoutes {
5306 fn request_options(&mut self) -> &mut crate::RequestOptions {
5307 &mut self.0.options
5308 }
5309 }
5310
5311 #[derive(Clone, Debug)]
5329 pub struct CreateHcxActivationKey(RequestBuilder<crate::model::CreateHcxActivationKeyRequest>);
5330
5331 impl CreateHcxActivationKey {
5332 pub(crate) fn new(
5333 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5334 ) -> Self {
5335 Self(RequestBuilder::new(stub))
5336 }
5337
5338 pub fn with_request<V: Into<crate::model::CreateHcxActivationKeyRequest>>(
5340 mut self,
5341 v: V,
5342 ) -> Self {
5343 self.0.request = v.into();
5344 self
5345 }
5346
5347 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5349 self.0.options = v.into();
5350 self
5351 }
5352
5353 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5360 (*self.0.stub)
5361 .create_hcx_activation_key(self.0.request, self.0.options)
5362 .await
5363 .map(crate::Response::into_body)
5364 }
5365
5366 pub fn poller(
5368 self,
5369 ) -> impl google_cloud_lro::Poller<crate::model::HcxActivationKey, crate::model::OperationMetadata>
5370 {
5371 type Operation = google_cloud_lro::internal::Operation<
5372 crate::model::HcxActivationKey,
5373 crate::model::OperationMetadata,
5374 >;
5375 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5376 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5377
5378 let stub = self.0.stub.clone();
5379 let mut options = self.0.options.clone();
5380 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5381 let query = move |name| {
5382 let stub = stub.clone();
5383 let options = options.clone();
5384 async {
5385 let op = GetOperation::new(stub)
5386 .set_name(name)
5387 .with_options(options)
5388 .send()
5389 .await?;
5390 Ok(Operation::new(op))
5391 }
5392 };
5393
5394 let start = move || async {
5395 let op = self.send().await?;
5396 Ok(Operation::new(op))
5397 };
5398
5399 google_cloud_lro::internal::new_poller(
5400 polling_error_policy,
5401 polling_backoff_policy,
5402 start,
5403 query,
5404 )
5405 }
5406
5407 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5411 self.0.request.parent = v.into();
5412 self
5413 }
5414
5415 pub fn set_hcx_activation_key<T>(mut self, v: T) -> Self
5419 where
5420 T: std::convert::Into<crate::model::HcxActivationKey>,
5421 {
5422 self.0.request.hcx_activation_key = std::option::Option::Some(v.into());
5423 self
5424 }
5425
5426 pub fn set_or_clear_hcx_activation_key<T>(mut self, v: std::option::Option<T>) -> Self
5430 where
5431 T: std::convert::Into<crate::model::HcxActivationKey>,
5432 {
5433 self.0.request.hcx_activation_key = v.map(|x| x.into());
5434 self
5435 }
5436
5437 pub fn set_hcx_activation_key_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5441 self.0.request.hcx_activation_key_id = v.into();
5442 self
5443 }
5444
5445 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5447 self.0.request.request_id = v.into();
5448 self
5449 }
5450 }
5451
5452 #[doc(hidden)]
5453 impl crate::RequestBuilder for CreateHcxActivationKey {
5454 fn request_options(&mut self) -> &mut crate::RequestOptions {
5455 &mut self.0.options
5456 }
5457 }
5458
5459 #[derive(Clone, Debug)]
5480 pub struct ListHcxActivationKeys(RequestBuilder<crate::model::ListHcxActivationKeysRequest>);
5481
5482 impl ListHcxActivationKeys {
5483 pub(crate) fn new(
5484 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5485 ) -> Self {
5486 Self(RequestBuilder::new(stub))
5487 }
5488
5489 pub fn with_request<V: Into<crate::model::ListHcxActivationKeysRequest>>(
5491 mut self,
5492 v: V,
5493 ) -> Self {
5494 self.0.request = v.into();
5495 self
5496 }
5497
5498 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5500 self.0.options = v.into();
5501 self
5502 }
5503
5504 pub async fn send(self) -> Result<crate::model::ListHcxActivationKeysResponse> {
5506 (*self.0.stub)
5507 .list_hcx_activation_keys(self.0.request, self.0.options)
5508 .await
5509 .map(crate::Response::into_body)
5510 }
5511
5512 pub fn by_page(
5514 self,
5515 ) -> impl google_cloud_gax::paginator::Paginator<
5516 crate::model::ListHcxActivationKeysResponse,
5517 crate::Error,
5518 > {
5519 use std::clone::Clone;
5520 let token = self.0.request.page_token.clone();
5521 let execute = move |token: String| {
5522 let mut builder = self.clone();
5523 builder.0.request = builder.0.request.set_page_token(token);
5524 builder.send()
5525 };
5526 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5527 }
5528
5529 pub fn by_item(
5531 self,
5532 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5533 crate::model::ListHcxActivationKeysResponse,
5534 crate::Error,
5535 > {
5536 use google_cloud_gax::paginator::Paginator;
5537 self.by_page().items()
5538 }
5539
5540 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5544 self.0.request.parent = v.into();
5545 self
5546 }
5547
5548 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5550 self.0.request.page_size = v.into();
5551 self
5552 }
5553
5554 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5556 self.0.request.page_token = v.into();
5557 self
5558 }
5559 }
5560
5561 #[doc(hidden)]
5562 impl crate::RequestBuilder for ListHcxActivationKeys {
5563 fn request_options(&mut self) -> &mut crate::RequestOptions {
5564 &mut self.0.options
5565 }
5566 }
5567
5568 #[derive(Clone, Debug)]
5585 pub struct GetHcxActivationKey(RequestBuilder<crate::model::GetHcxActivationKeyRequest>);
5586
5587 impl GetHcxActivationKey {
5588 pub(crate) fn new(
5589 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5590 ) -> Self {
5591 Self(RequestBuilder::new(stub))
5592 }
5593
5594 pub fn with_request<V: Into<crate::model::GetHcxActivationKeyRequest>>(
5596 mut self,
5597 v: V,
5598 ) -> Self {
5599 self.0.request = v.into();
5600 self
5601 }
5602
5603 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5605 self.0.options = v.into();
5606 self
5607 }
5608
5609 pub async fn send(self) -> Result<crate::model::HcxActivationKey> {
5611 (*self.0.stub)
5612 .get_hcx_activation_key(self.0.request, self.0.options)
5613 .await
5614 .map(crate::Response::into_body)
5615 }
5616
5617 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5621 self.0.request.name = v.into();
5622 self
5623 }
5624 }
5625
5626 #[doc(hidden)]
5627 impl crate::RequestBuilder for GetHcxActivationKey {
5628 fn request_options(&mut self) -> &mut crate::RequestOptions {
5629 &mut self.0.options
5630 }
5631 }
5632
5633 #[derive(Clone, Debug)]
5650 pub struct GetNetworkPolicy(RequestBuilder<crate::model::GetNetworkPolicyRequest>);
5651
5652 impl GetNetworkPolicy {
5653 pub(crate) fn new(
5654 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5655 ) -> Self {
5656 Self(RequestBuilder::new(stub))
5657 }
5658
5659 pub fn with_request<V: Into<crate::model::GetNetworkPolicyRequest>>(
5661 mut self,
5662 v: V,
5663 ) -> Self {
5664 self.0.request = v.into();
5665 self
5666 }
5667
5668 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5670 self.0.options = v.into();
5671 self
5672 }
5673
5674 pub async fn send(self) -> Result<crate::model::NetworkPolicy> {
5676 (*self.0.stub)
5677 .get_network_policy(self.0.request, self.0.options)
5678 .await
5679 .map(crate::Response::into_body)
5680 }
5681
5682 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5686 self.0.request.name = v.into();
5687 self
5688 }
5689 }
5690
5691 #[doc(hidden)]
5692 impl crate::RequestBuilder for GetNetworkPolicy {
5693 fn request_options(&mut self) -> &mut crate::RequestOptions {
5694 &mut self.0.options
5695 }
5696 }
5697
5698 #[derive(Clone, Debug)]
5719 pub struct ListNetworkPolicies(RequestBuilder<crate::model::ListNetworkPoliciesRequest>);
5720
5721 impl ListNetworkPolicies {
5722 pub(crate) fn new(
5723 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5724 ) -> Self {
5725 Self(RequestBuilder::new(stub))
5726 }
5727
5728 pub fn with_request<V: Into<crate::model::ListNetworkPoliciesRequest>>(
5730 mut self,
5731 v: V,
5732 ) -> Self {
5733 self.0.request = v.into();
5734 self
5735 }
5736
5737 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5739 self.0.options = v.into();
5740 self
5741 }
5742
5743 pub async fn send(self) -> Result<crate::model::ListNetworkPoliciesResponse> {
5745 (*self.0.stub)
5746 .list_network_policies(self.0.request, self.0.options)
5747 .await
5748 .map(crate::Response::into_body)
5749 }
5750
5751 pub fn by_page(
5753 self,
5754 ) -> impl google_cloud_gax::paginator::Paginator<
5755 crate::model::ListNetworkPoliciesResponse,
5756 crate::Error,
5757 > {
5758 use std::clone::Clone;
5759 let token = self.0.request.page_token.clone();
5760 let execute = move |token: String| {
5761 let mut builder = self.clone();
5762 builder.0.request = builder.0.request.set_page_token(token);
5763 builder.send()
5764 };
5765 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5766 }
5767
5768 pub fn by_item(
5770 self,
5771 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5772 crate::model::ListNetworkPoliciesResponse,
5773 crate::Error,
5774 > {
5775 use google_cloud_gax::paginator::Paginator;
5776 self.by_page().items()
5777 }
5778
5779 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5783 self.0.request.parent = v.into();
5784 self
5785 }
5786
5787 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5789 self.0.request.page_size = v.into();
5790 self
5791 }
5792
5793 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5795 self.0.request.page_token = v.into();
5796 self
5797 }
5798
5799 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5801 self.0.request.filter = v.into();
5802 self
5803 }
5804
5805 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5807 self.0.request.order_by = v.into();
5808 self
5809 }
5810 }
5811
5812 #[doc(hidden)]
5813 impl crate::RequestBuilder for ListNetworkPolicies {
5814 fn request_options(&mut self) -> &mut crate::RequestOptions {
5815 &mut self.0.options
5816 }
5817 }
5818
5819 #[derive(Clone, Debug)]
5837 pub struct CreateNetworkPolicy(RequestBuilder<crate::model::CreateNetworkPolicyRequest>);
5838
5839 impl CreateNetworkPolicy {
5840 pub(crate) fn new(
5841 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5842 ) -> Self {
5843 Self(RequestBuilder::new(stub))
5844 }
5845
5846 pub fn with_request<V: Into<crate::model::CreateNetworkPolicyRequest>>(
5848 mut self,
5849 v: V,
5850 ) -> Self {
5851 self.0.request = v.into();
5852 self
5853 }
5854
5855 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5857 self.0.options = v.into();
5858 self
5859 }
5860
5861 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5868 (*self.0.stub)
5869 .create_network_policy(self.0.request, self.0.options)
5870 .await
5871 .map(crate::Response::into_body)
5872 }
5873
5874 pub fn poller(
5876 self,
5877 ) -> impl google_cloud_lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
5878 {
5879 type Operation = google_cloud_lro::internal::Operation<
5880 crate::model::NetworkPolicy,
5881 crate::model::OperationMetadata,
5882 >;
5883 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5884 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5885
5886 let stub = self.0.stub.clone();
5887 let mut options = self.0.options.clone();
5888 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5889 let query = move |name| {
5890 let stub = stub.clone();
5891 let options = options.clone();
5892 async {
5893 let op = GetOperation::new(stub)
5894 .set_name(name)
5895 .with_options(options)
5896 .send()
5897 .await?;
5898 Ok(Operation::new(op))
5899 }
5900 };
5901
5902 let start = move || async {
5903 let op = self.send().await?;
5904 Ok(Operation::new(op))
5905 };
5906
5907 google_cloud_lro::internal::new_poller(
5908 polling_error_policy,
5909 polling_backoff_policy,
5910 start,
5911 query,
5912 )
5913 }
5914
5915 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5919 self.0.request.parent = v.into();
5920 self
5921 }
5922
5923 pub fn set_network_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5927 self.0.request.network_policy_id = v.into();
5928 self
5929 }
5930
5931 pub fn set_network_policy<T>(mut self, v: T) -> Self
5935 where
5936 T: std::convert::Into<crate::model::NetworkPolicy>,
5937 {
5938 self.0.request.network_policy = std::option::Option::Some(v.into());
5939 self
5940 }
5941
5942 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
5946 where
5947 T: std::convert::Into<crate::model::NetworkPolicy>,
5948 {
5949 self.0.request.network_policy = v.map(|x| x.into());
5950 self
5951 }
5952
5953 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5955 self.0.request.request_id = v.into();
5956 self
5957 }
5958 }
5959
5960 #[doc(hidden)]
5961 impl crate::RequestBuilder for CreateNetworkPolicy {
5962 fn request_options(&mut self) -> &mut crate::RequestOptions {
5963 &mut self.0.options
5964 }
5965 }
5966
5967 #[derive(Clone, Debug)]
5985 pub struct UpdateNetworkPolicy(RequestBuilder<crate::model::UpdateNetworkPolicyRequest>);
5986
5987 impl UpdateNetworkPolicy {
5988 pub(crate) fn new(
5989 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5990 ) -> Self {
5991 Self(RequestBuilder::new(stub))
5992 }
5993
5994 pub fn with_request<V: Into<crate::model::UpdateNetworkPolicyRequest>>(
5996 mut self,
5997 v: V,
5998 ) -> Self {
5999 self.0.request = v.into();
6000 self
6001 }
6002
6003 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6005 self.0.options = v.into();
6006 self
6007 }
6008
6009 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6016 (*self.0.stub)
6017 .update_network_policy(self.0.request, self.0.options)
6018 .await
6019 .map(crate::Response::into_body)
6020 }
6021
6022 pub fn poller(
6024 self,
6025 ) -> impl google_cloud_lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
6026 {
6027 type Operation = google_cloud_lro::internal::Operation<
6028 crate::model::NetworkPolicy,
6029 crate::model::OperationMetadata,
6030 >;
6031 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6032 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6033
6034 let stub = self.0.stub.clone();
6035 let mut options = self.0.options.clone();
6036 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6037 let query = move |name| {
6038 let stub = stub.clone();
6039 let options = options.clone();
6040 async {
6041 let op = GetOperation::new(stub)
6042 .set_name(name)
6043 .with_options(options)
6044 .send()
6045 .await?;
6046 Ok(Operation::new(op))
6047 }
6048 };
6049
6050 let start = move || async {
6051 let op = self.send().await?;
6052 Ok(Operation::new(op))
6053 };
6054
6055 google_cloud_lro::internal::new_poller(
6056 polling_error_policy,
6057 polling_backoff_policy,
6058 start,
6059 query,
6060 )
6061 }
6062
6063 pub fn set_network_policy<T>(mut self, v: T) -> Self
6067 where
6068 T: std::convert::Into<crate::model::NetworkPolicy>,
6069 {
6070 self.0.request.network_policy = std::option::Option::Some(v.into());
6071 self
6072 }
6073
6074 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
6078 where
6079 T: std::convert::Into<crate::model::NetworkPolicy>,
6080 {
6081 self.0.request.network_policy = v.map(|x| x.into());
6082 self
6083 }
6084
6085 pub fn set_update_mask<T>(mut self, v: T) -> Self
6089 where
6090 T: std::convert::Into<wkt::FieldMask>,
6091 {
6092 self.0.request.update_mask = std::option::Option::Some(v.into());
6093 self
6094 }
6095
6096 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6100 where
6101 T: std::convert::Into<wkt::FieldMask>,
6102 {
6103 self.0.request.update_mask = v.map(|x| x.into());
6104 self
6105 }
6106
6107 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6109 self.0.request.request_id = v.into();
6110 self
6111 }
6112 }
6113
6114 #[doc(hidden)]
6115 impl crate::RequestBuilder for UpdateNetworkPolicy {
6116 fn request_options(&mut self) -> &mut crate::RequestOptions {
6117 &mut self.0.options
6118 }
6119 }
6120
6121 #[derive(Clone, Debug)]
6139 pub struct DeleteNetworkPolicy(RequestBuilder<crate::model::DeleteNetworkPolicyRequest>);
6140
6141 impl DeleteNetworkPolicy {
6142 pub(crate) fn new(
6143 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6144 ) -> Self {
6145 Self(RequestBuilder::new(stub))
6146 }
6147
6148 pub fn with_request<V: Into<crate::model::DeleteNetworkPolicyRequest>>(
6150 mut self,
6151 v: V,
6152 ) -> Self {
6153 self.0.request = v.into();
6154 self
6155 }
6156
6157 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6159 self.0.options = v.into();
6160 self
6161 }
6162
6163 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6170 (*self.0.stub)
6171 .delete_network_policy(self.0.request, self.0.options)
6172 .await
6173 .map(crate::Response::into_body)
6174 }
6175
6176 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6178 type Operation =
6179 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6180 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6181 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6182
6183 let stub = self.0.stub.clone();
6184 let mut options = self.0.options.clone();
6185 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6186 let query = move |name| {
6187 let stub = stub.clone();
6188 let options = options.clone();
6189 async {
6190 let op = GetOperation::new(stub)
6191 .set_name(name)
6192 .with_options(options)
6193 .send()
6194 .await?;
6195 Ok(Operation::new(op))
6196 }
6197 };
6198
6199 let start = move || async {
6200 let op = self.send().await?;
6201 Ok(Operation::new(op))
6202 };
6203
6204 google_cloud_lro::internal::new_unit_response_poller(
6205 polling_error_policy,
6206 polling_backoff_policy,
6207 start,
6208 query,
6209 )
6210 }
6211
6212 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6216 self.0.request.name = v.into();
6217 self
6218 }
6219
6220 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6222 self.0.request.request_id = v.into();
6223 self
6224 }
6225 }
6226
6227 #[doc(hidden)]
6228 impl crate::RequestBuilder for DeleteNetworkPolicy {
6229 fn request_options(&mut self) -> &mut crate::RequestOptions {
6230 &mut self.0.options
6231 }
6232 }
6233
6234 #[derive(Clone, Debug)]
6255 pub struct ListManagementDnsZoneBindings(
6256 RequestBuilder<crate::model::ListManagementDnsZoneBindingsRequest>,
6257 );
6258
6259 impl ListManagementDnsZoneBindings {
6260 pub(crate) fn new(
6261 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6262 ) -> Self {
6263 Self(RequestBuilder::new(stub))
6264 }
6265
6266 pub fn with_request<V: Into<crate::model::ListManagementDnsZoneBindingsRequest>>(
6268 mut self,
6269 v: V,
6270 ) -> Self {
6271 self.0.request = v.into();
6272 self
6273 }
6274
6275 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6277 self.0.options = v.into();
6278 self
6279 }
6280
6281 pub async fn send(self) -> Result<crate::model::ListManagementDnsZoneBindingsResponse> {
6283 (*self.0.stub)
6284 .list_management_dns_zone_bindings(self.0.request, self.0.options)
6285 .await
6286 .map(crate::Response::into_body)
6287 }
6288
6289 pub fn by_page(
6291 self,
6292 ) -> impl google_cloud_gax::paginator::Paginator<
6293 crate::model::ListManagementDnsZoneBindingsResponse,
6294 crate::Error,
6295 > {
6296 use std::clone::Clone;
6297 let token = self.0.request.page_token.clone();
6298 let execute = move |token: String| {
6299 let mut builder = self.clone();
6300 builder.0.request = builder.0.request.set_page_token(token);
6301 builder.send()
6302 };
6303 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6304 }
6305
6306 pub fn by_item(
6308 self,
6309 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6310 crate::model::ListManagementDnsZoneBindingsResponse,
6311 crate::Error,
6312 > {
6313 use google_cloud_gax::paginator::Paginator;
6314 self.by_page().items()
6315 }
6316
6317 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6321 self.0.request.parent = v.into();
6322 self
6323 }
6324
6325 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6327 self.0.request.page_size = v.into();
6328 self
6329 }
6330
6331 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6333 self.0.request.page_token = v.into();
6334 self
6335 }
6336
6337 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6339 self.0.request.filter = v.into();
6340 self
6341 }
6342
6343 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6345 self.0.request.order_by = v.into();
6346 self
6347 }
6348 }
6349
6350 #[doc(hidden)]
6351 impl crate::RequestBuilder for ListManagementDnsZoneBindings {
6352 fn request_options(&mut self) -> &mut crate::RequestOptions {
6353 &mut self.0.options
6354 }
6355 }
6356
6357 #[derive(Clone, Debug)]
6374 pub struct GetManagementDnsZoneBinding(
6375 RequestBuilder<crate::model::GetManagementDnsZoneBindingRequest>,
6376 );
6377
6378 impl GetManagementDnsZoneBinding {
6379 pub(crate) fn new(
6380 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6381 ) -> Self {
6382 Self(RequestBuilder::new(stub))
6383 }
6384
6385 pub fn with_request<V: Into<crate::model::GetManagementDnsZoneBindingRequest>>(
6387 mut self,
6388 v: V,
6389 ) -> Self {
6390 self.0.request = v.into();
6391 self
6392 }
6393
6394 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6396 self.0.options = v.into();
6397 self
6398 }
6399
6400 pub async fn send(self) -> Result<crate::model::ManagementDnsZoneBinding> {
6402 (*self.0.stub)
6403 .get_management_dns_zone_binding(self.0.request, self.0.options)
6404 .await
6405 .map(crate::Response::into_body)
6406 }
6407
6408 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6412 self.0.request.name = v.into();
6413 self
6414 }
6415 }
6416
6417 #[doc(hidden)]
6418 impl crate::RequestBuilder for GetManagementDnsZoneBinding {
6419 fn request_options(&mut self) -> &mut crate::RequestOptions {
6420 &mut self.0.options
6421 }
6422 }
6423
6424 #[derive(Clone, Debug)]
6442 pub struct CreateManagementDnsZoneBinding(
6443 RequestBuilder<crate::model::CreateManagementDnsZoneBindingRequest>,
6444 );
6445
6446 impl CreateManagementDnsZoneBinding {
6447 pub(crate) fn new(
6448 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6449 ) -> Self {
6450 Self(RequestBuilder::new(stub))
6451 }
6452
6453 pub fn with_request<V: Into<crate::model::CreateManagementDnsZoneBindingRequest>>(
6455 mut self,
6456 v: V,
6457 ) -> Self {
6458 self.0.request = v.into();
6459 self
6460 }
6461
6462 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6464 self.0.options = v.into();
6465 self
6466 }
6467
6468 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6475 (*self.0.stub)
6476 .create_management_dns_zone_binding(self.0.request, self.0.options)
6477 .await
6478 .map(crate::Response::into_body)
6479 }
6480
6481 pub fn poller(
6483 self,
6484 ) -> impl google_cloud_lro::Poller<
6485 crate::model::ManagementDnsZoneBinding,
6486 crate::model::OperationMetadata,
6487 > {
6488 type Operation = google_cloud_lro::internal::Operation<
6489 crate::model::ManagementDnsZoneBinding,
6490 crate::model::OperationMetadata,
6491 >;
6492 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6493 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6494
6495 let stub = self.0.stub.clone();
6496 let mut options = self.0.options.clone();
6497 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6498 let query = move |name| {
6499 let stub = stub.clone();
6500 let options = options.clone();
6501 async {
6502 let op = GetOperation::new(stub)
6503 .set_name(name)
6504 .with_options(options)
6505 .send()
6506 .await?;
6507 Ok(Operation::new(op))
6508 }
6509 };
6510
6511 let start = move || async {
6512 let op = self.send().await?;
6513 Ok(Operation::new(op))
6514 };
6515
6516 google_cloud_lro::internal::new_poller(
6517 polling_error_policy,
6518 polling_backoff_policy,
6519 start,
6520 query,
6521 )
6522 }
6523
6524 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6528 self.0.request.parent = v.into();
6529 self
6530 }
6531
6532 pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6536 where
6537 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6538 {
6539 self.0.request.management_dns_zone_binding = std::option::Option::Some(v.into());
6540 self
6541 }
6542
6543 pub fn set_or_clear_management_dns_zone_binding<T>(
6547 mut self,
6548 v: std::option::Option<T>,
6549 ) -> Self
6550 where
6551 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6552 {
6553 self.0.request.management_dns_zone_binding = v.map(|x| x.into());
6554 self
6555 }
6556
6557 pub fn set_management_dns_zone_binding_id<T: Into<std::string::String>>(
6561 mut self,
6562 v: T,
6563 ) -> Self {
6564 self.0.request.management_dns_zone_binding_id = v.into();
6565 self
6566 }
6567
6568 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6570 self.0.request.request_id = v.into();
6571 self
6572 }
6573 }
6574
6575 #[doc(hidden)]
6576 impl crate::RequestBuilder for CreateManagementDnsZoneBinding {
6577 fn request_options(&mut self) -> &mut crate::RequestOptions {
6578 &mut self.0.options
6579 }
6580 }
6581
6582 #[derive(Clone, Debug)]
6600 pub struct UpdateManagementDnsZoneBinding(
6601 RequestBuilder<crate::model::UpdateManagementDnsZoneBindingRequest>,
6602 );
6603
6604 impl UpdateManagementDnsZoneBinding {
6605 pub(crate) fn new(
6606 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6607 ) -> Self {
6608 Self(RequestBuilder::new(stub))
6609 }
6610
6611 pub fn with_request<V: Into<crate::model::UpdateManagementDnsZoneBindingRequest>>(
6613 mut self,
6614 v: V,
6615 ) -> Self {
6616 self.0.request = v.into();
6617 self
6618 }
6619
6620 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6622 self.0.options = v.into();
6623 self
6624 }
6625
6626 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6633 (*self.0.stub)
6634 .update_management_dns_zone_binding(self.0.request, self.0.options)
6635 .await
6636 .map(crate::Response::into_body)
6637 }
6638
6639 pub fn poller(
6641 self,
6642 ) -> impl google_cloud_lro::Poller<
6643 crate::model::ManagementDnsZoneBinding,
6644 crate::model::OperationMetadata,
6645 > {
6646 type Operation = google_cloud_lro::internal::Operation<
6647 crate::model::ManagementDnsZoneBinding,
6648 crate::model::OperationMetadata,
6649 >;
6650 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6651 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6652
6653 let stub = self.0.stub.clone();
6654 let mut options = self.0.options.clone();
6655 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6656 let query = move |name| {
6657 let stub = stub.clone();
6658 let options = options.clone();
6659 async {
6660 let op = GetOperation::new(stub)
6661 .set_name(name)
6662 .with_options(options)
6663 .send()
6664 .await?;
6665 Ok(Operation::new(op))
6666 }
6667 };
6668
6669 let start = move || async {
6670 let op = self.send().await?;
6671 Ok(Operation::new(op))
6672 };
6673
6674 google_cloud_lro::internal::new_poller(
6675 polling_error_policy,
6676 polling_backoff_policy,
6677 start,
6678 query,
6679 )
6680 }
6681
6682 pub fn set_update_mask<T>(mut self, v: T) -> Self
6686 where
6687 T: std::convert::Into<wkt::FieldMask>,
6688 {
6689 self.0.request.update_mask = std::option::Option::Some(v.into());
6690 self
6691 }
6692
6693 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6697 where
6698 T: std::convert::Into<wkt::FieldMask>,
6699 {
6700 self.0.request.update_mask = v.map(|x| x.into());
6701 self
6702 }
6703
6704 pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6708 where
6709 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6710 {
6711 self.0.request.management_dns_zone_binding = std::option::Option::Some(v.into());
6712 self
6713 }
6714
6715 pub fn set_or_clear_management_dns_zone_binding<T>(
6719 mut self,
6720 v: std::option::Option<T>,
6721 ) -> Self
6722 where
6723 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6724 {
6725 self.0.request.management_dns_zone_binding = v.map(|x| x.into());
6726 self
6727 }
6728
6729 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6731 self.0.request.request_id = v.into();
6732 self
6733 }
6734 }
6735
6736 #[doc(hidden)]
6737 impl crate::RequestBuilder for UpdateManagementDnsZoneBinding {
6738 fn request_options(&mut self) -> &mut crate::RequestOptions {
6739 &mut self.0.options
6740 }
6741 }
6742
6743 #[derive(Clone, Debug)]
6761 pub struct DeleteManagementDnsZoneBinding(
6762 RequestBuilder<crate::model::DeleteManagementDnsZoneBindingRequest>,
6763 );
6764
6765 impl DeleteManagementDnsZoneBinding {
6766 pub(crate) fn new(
6767 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6768 ) -> Self {
6769 Self(RequestBuilder::new(stub))
6770 }
6771
6772 pub fn with_request<V: Into<crate::model::DeleteManagementDnsZoneBindingRequest>>(
6774 mut self,
6775 v: V,
6776 ) -> Self {
6777 self.0.request = v.into();
6778 self
6779 }
6780
6781 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6783 self.0.options = v.into();
6784 self
6785 }
6786
6787 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6794 (*self.0.stub)
6795 .delete_management_dns_zone_binding(self.0.request, self.0.options)
6796 .await
6797 .map(crate::Response::into_body)
6798 }
6799
6800 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6802 type Operation =
6803 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6804 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6805 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6806
6807 let stub = self.0.stub.clone();
6808 let mut options = self.0.options.clone();
6809 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6810 let query = move |name| {
6811 let stub = stub.clone();
6812 let options = options.clone();
6813 async {
6814 let op = GetOperation::new(stub)
6815 .set_name(name)
6816 .with_options(options)
6817 .send()
6818 .await?;
6819 Ok(Operation::new(op))
6820 }
6821 };
6822
6823 let start = move || async {
6824 let op = self.send().await?;
6825 Ok(Operation::new(op))
6826 };
6827
6828 google_cloud_lro::internal::new_unit_response_poller(
6829 polling_error_policy,
6830 polling_backoff_policy,
6831 start,
6832 query,
6833 )
6834 }
6835
6836 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6840 self.0.request.name = v.into();
6841 self
6842 }
6843
6844 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6846 self.0.request.request_id = v.into();
6847 self
6848 }
6849 }
6850
6851 #[doc(hidden)]
6852 impl crate::RequestBuilder for DeleteManagementDnsZoneBinding {
6853 fn request_options(&mut self) -> &mut crate::RequestOptions {
6854 &mut self.0.options
6855 }
6856 }
6857
6858 #[derive(Clone, Debug)]
6876 pub struct RepairManagementDnsZoneBinding(
6877 RequestBuilder<crate::model::RepairManagementDnsZoneBindingRequest>,
6878 );
6879
6880 impl RepairManagementDnsZoneBinding {
6881 pub(crate) fn new(
6882 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6883 ) -> Self {
6884 Self(RequestBuilder::new(stub))
6885 }
6886
6887 pub fn with_request<V: Into<crate::model::RepairManagementDnsZoneBindingRequest>>(
6889 mut self,
6890 v: V,
6891 ) -> Self {
6892 self.0.request = v.into();
6893 self
6894 }
6895
6896 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6898 self.0.options = v.into();
6899 self
6900 }
6901
6902 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6909 (*self.0.stub)
6910 .repair_management_dns_zone_binding(self.0.request, self.0.options)
6911 .await
6912 .map(crate::Response::into_body)
6913 }
6914
6915 pub fn poller(
6917 self,
6918 ) -> impl google_cloud_lro::Poller<
6919 crate::model::ManagementDnsZoneBinding,
6920 crate::model::OperationMetadata,
6921 > {
6922 type Operation = google_cloud_lro::internal::Operation<
6923 crate::model::ManagementDnsZoneBinding,
6924 crate::model::OperationMetadata,
6925 >;
6926 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6927 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6928
6929 let stub = self.0.stub.clone();
6930 let mut options = self.0.options.clone();
6931 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6932 let query = move |name| {
6933 let stub = stub.clone();
6934 let options = options.clone();
6935 async {
6936 let op = GetOperation::new(stub)
6937 .set_name(name)
6938 .with_options(options)
6939 .send()
6940 .await?;
6941 Ok(Operation::new(op))
6942 }
6943 };
6944
6945 let start = move || async {
6946 let op = self.send().await?;
6947 Ok(Operation::new(op))
6948 };
6949
6950 google_cloud_lro::internal::new_poller(
6951 polling_error_policy,
6952 polling_backoff_policy,
6953 start,
6954 query,
6955 )
6956 }
6957
6958 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6962 self.0.request.name = v.into();
6963 self
6964 }
6965
6966 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6968 self.0.request.request_id = v.into();
6969 self
6970 }
6971 }
6972
6973 #[doc(hidden)]
6974 impl crate::RequestBuilder for RepairManagementDnsZoneBinding {
6975 fn request_options(&mut self) -> &mut crate::RequestOptions {
6976 &mut self.0.options
6977 }
6978 }
6979
6980 #[derive(Clone, Debug)]
6998 pub struct CreateVmwareEngineNetwork(
6999 RequestBuilder<crate::model::CreateVmwareEngineNetworkRequest>,
7000 );
7001
7002 impl CreateVmwareEngineNetwork {
7003 pub(crate) fn new(
7004 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7005 ) -> Self {
7006 Self(RequestBuilder::new(stub))
7007 }
7008
7009 pub fn with_request<V: Into<crate::model::CreateVmwareEngineNetworkRequest>>(
7011 mut self,
7012 v: V,
7013 ) -> Self {
7014 self.0.request = v.into();
7015 self
7016 }
7017
7018 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7020 self.0.options = v.into();
7021 self
7022 }
7023
7024 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7031 (*self.0.stub)
7032 .create_vmware_engine_network(self.0.request, self.0.options)
7033 .await
7034 .map(crate::Response::into_body)
7035 }
7036
7037 pub fn poller(
7039 self,
7040 ) -> impl google_cloud_lro::Poller<
7041 crate::model::VmwareEngineNetwork,
7042 crate::model::OperationMetadata,
7043 > {
7044 type Operation = google_cloud_lro::internal::Operation<
7045 crate::model::VmwareEngineNetwork,
7046 crate::model::OperationMetadata,
7047 >;
7048 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7049 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7050
7051 let stub = self.0.stub.clone();
7052 let mut options = self.0.options.clone();
7053 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7054 let query = move |name| {
7055 let stub = stub.clone();
7056 let options = options.clone();
7057 async {
7058 let op = GetOperation::new(stub)
7059 .set_name(name)
7060 .with_options(options)
7061 .send()
7062 .await?;
7063 Ok(Operation::new(op))
7064 }
7065 };
7066
7067 let start = move || async {
7068 let op = self.send().await?;
7069 Ok(Operation::new(op))
7070 };
7071
7072 google_cloud_lro::internal::new_poller(
7073 polling_error_policy,
7074 polling_backoff_policy,
7075 start,
7076 query,
7077 )
7078 }
7079
7080 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7084 self.0.request.parent = v.into();
7085 self
7086 }
7087
7088 pub fn set_vmware_engine_network_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7092 self.0.request.vmware_engine_network_id = v.into();
7093 self
7094 }
7095
7096 pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7100 where
7101 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7102 {
7103 self.0.request.vmware_engine_network = std::option::Option::Some(v.into());
7104 self
7105 }
7106
7107 pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7111 where
7112 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7113 {
7114 self.0.request.vmware_engine_network = v.map(|x| x.into());
7115 self
7116 }
7117
7118 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7120 self.0.request.request_id = v.into();
7121 self
7122 }
7123 }
7124
7125 #[doc(hidden)]
7126 impl crate::RequestBuilder for CreateVmwareEngineNetwork {
7127 fn request_options(&mut self) -> &mut crate::RequestOptions {
7128 &mut self.0.options
7129 }
7130 }
7131
7132 #[derive(Clone, Debug)]
7150 pub struct UpdateVmwareEngineNetwork(
7151 RequestBuilder<crate::model::UpdateVmwareEngineNetworkRequest>,
7152 );
7153
7154 impl UpdateVmwareEngineNetwork {
7155 pub(crate) fn new(
7156 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7157 ) -> Self {
7158 Self(RequestBuilder::new(stub))
7159 }
7160
7161 pub fn with_request<V: Into<crate::model::UpdateVmwareEngineNetworkRequest>>(
7163 mut self,
7164 v: V,
7165 ) -> Self {
7166 self.0.request = v.into();
7167 self
7168 }
7169
7170 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7172 self.0.options = v.into();
7173 self
7174 }
7175
7176 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7183 (*self.0.stub)
7184 .update_vmware_engine_network(self.0.request, self.0.options)
7185 .await
7186 .map(crate::Response::into_body)
7187 }
7188
7189 pub fn poller(
7191 self,
7192 ) -> impl google_cloud_lro::Poller<
7193 crate::model::VmwareEngineNetwork,
7194 crate::model::OperationMetadata,
7195 > {
7196 type Operation = google_cloud_lro::internal::Operation<
7197 crate::model::VmwareEngineNetwork,
7198 crate::model::OperationMetadata,
7199 >;
7200 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7201 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7202
7203 let stub = self.0.stub.clone();
7204 let mut options = self.0.options.clone();
7205 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7206 let query = move |name| {
7207 let stub = stub.clone();
7208 let options = options.clone();
7209 async {
7210 let op = GetOperation::new(stub)
7211 .set_name(name)
7212 .with_options(options)
7213 .send()
7214 .await?;
7215 Ok(Operation::new(op))
7216 }
7217 };
7218
7219 let start = move || async {
7220 let op = self.send().await?;
7221 Ok(Operation::new(op))
7222 };
7223
7224 google_cloud_lro::internal::new_poller(
7225 polling_error_policy,
7226 polling_backoff_policy,
7227 start,
7228 query,
7229 )
7230 }
7231
7232 pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7236 where
7237 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7238 {
7239 self.0.request.vmware_engine_network = std::option::Option::Some(v.into());
7240 self
7241 }
7242
7243 pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7247 where
7248 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7249 {
7250 self.0.request.vmware_engine_network = v.map(|x| x.into());
7251 self
7252 }
7253
7254 pub fn set_update_mask<T>(mut self, v: T) -> Self
7258 where
7259 T: std::convert::Into<wkt::FieldMask>,
7260 {
7261 self.0.request.update_mask = std::option::Option::Some(v.into());
7262 self
7263 }
7264
7265 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7269 where
7270 T: std::convert::Into<wkt::FieldMask>,
7271 {
7272 self.0.request.update_mask = v.map(|x| x.into());
7273 self
7274 }
7275
7276 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7278 self.0.request.request_id = v.into();
7279 self
7280 }
7281 }
7282
7283 #[doc(hidden)]
7284 impl crate::RequestBuilder for UpdateVmwareEngineNetwork {
7285 fn request_options(&mut self) -> &mut crate::RequestOptions {
7286 &mut self.0.options
7287 }
7288 }
7289
7290 #[derive(Clone, Debug)]
7308 pub struct DeleteVmwareEngineNetwork(
7309 RequestBuilder<crate::model::DeleteVmwareEngineNetworkRequest>,
7310 );
7311
7312 impl DeleteVmwareEngineNetwork {
7313 pub(crate) fn new(
7314 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7315 ) -> Self {
7316 Self(RequestBuilder::new(stub))
7317 }
7318
7319 pub fn with_request<V: Into<crate::model::DeleteVmwareEngineNetworkRequest>>(
7321 mut self,
7322 v: V,
7323 ) -> Self {
7324 self.0.request = v.into();
7325 self
7326 }
7327
7328 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7330 self.0.options = v.into();
7331 self
7332 }
7333
7334 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7341 (*self.0.stub)
7342 .delete_vmware_engine_network(self.0.request, self.0.options)
7343 .await
7344 .map(crate::Response::into_body)
7345 }
7346
7347 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7349 type Operation =
7350 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7351 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7352 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7353
7354 let stub = self.0.stub.clone();
7355 let mut options = self.0.options.clone();
7356 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7357 let query = move |name| {
7358 let stub = stub.clone();
7359 let options = options.clone();
7360 async {
7361 let op = GetOperation::new(stub)
7362 .set_name(name)
7363 .with_options(options)
7364 .send()
7365 .await?;
7366 Ok(Operation::new(op))
7367 }
7368 };
7369
7370 let start = move || async {
7371 let op = self.send().await?;
7372 Ok(Operation::new(op))
7373 };
7374
7375 google_cloud_lro::internal::new_unit_response_poller(
7376 polling_error_policy,
7377 polling_backoff_policy,
7378 start,
7379 query,
7380 )
7381 }
7382
7383 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7387 self.0.request.name = v.into();
7388 self
7389 }
7390
7391 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7393 self.0.request.request_id = v.into();
7394 self
7395 }
7396
7397 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7399 self.0.request.etag = v.into();
7400 self
7401 }
7402 }
7403
7404 #[doc(hidden)]
7405 impl crate::RequestBuilder for DeleteVmwareEngineNetwork {
7406 fn request_options(&mut self) -> &mut crate::RequestOptions {
7407 &mut self.0.options
7408 }
7409 }
7410
7411 #[derive(Clone, Debug)]
7428 pub struct GetVmwareEngineNetwork(RequestBuilder<crate::model::GetVmwareEngineNetworkRequest>);
7429
7430 impl GetVmwareEngineNetwork {
7431 pub(crate) fn new(
7432 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7433 ) -> Self {
7434 Self(RequestBuilder::new(stub))
7435 }
7436
7437 pub fn with_request<V: Into<crate::model::GetVmwareEngineNetworkRequest>>(
7439 mut self,
7440 v: V,
7441 ) -> Self {
7442 self.0.request = v.into();
7443 self
7444 }
7445
7446 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7448 self.0.options = v.into();
7449 self
7450 }
7451
7452 pub async fn send(self) -> Result<crate::model::VmwareEngineNetwork> {
7454 (*self.0.stub)
7455 .get_vmware_engine_network(self.0.request, self.0.options)
7456 .await
7457 .map(crate::Response::into_body)
7458 }
7459
7460 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7464 self.0.request.name = v.into();
7465 self
7466 }
7467 }
7468
7469 #[doc(hidden)]
7470 impl crate::RequestBuilder for GetVmwareEngineNetwork {
7471 fn request_options(&mut self) -> &mut crate::RequestOptions {
7472 &mut self.0.options
7473 }
7474 }
7475
7476 #[derive(Clone, Debug)]
7497 pub struct ListVmwareEngineNetworks(
7498 RequestBuilder<crate::model::ListVmwareEngineNetworksRequest>,
7499 );
7500
7501 impl ListVmwareEngineNetworks {
7502 pub(crate) fn new(
7503 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7504 ) -> Self {
7505 Self(RequestBuilder::new(stub))
7506 }
7507
7508 pub fn with_request<V: Into<crate::model::ListVmwareEngineNetworksRequest>>(
7510 mut self,
7511 v: V,
7512 ) -> Self {
7513 self.0.request = v.into();
7514 self
7515 }
7516
7517 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7519 self.0.options = v.into();
7520 self
7521 }
7522
7523 pub async fn send(self) -> Result<crate::model::ListVmwareEngineNetworksResponse> {
7525 (*self.0.stub)
7526 .list_vmware_engine_networks(self.0.request, self.0.options)
7527 .await
7528 .map(crate::Response::into_body)
7529 }
7530
7531 pub fn by_page(
7533 self,
7534 ) -> impl google_cloud_gax::paginator::Paginator<
7535 crate::model::ListVmwareEngineNetworksResponse,
7536 crate::Error,
7537 > {
7538 use std::clone::Clone;
7539 let token = self.0.request.page_token.clone();
7540 let execute = move |token: String| {
7541 let mut builder = self.clone();
7542 builder.0.request = builder.0.request.set_page_token(token);
7543 builder.send()
7544 };
7545 google_cloud_gax::paginator::internal::new_paginator(token, execute)
7546 }
7547
7548 pub fn by_item(
7550 self,
7551 ) -> impl google_cloud_gax::paginator::ItemPaginator<
7552 crate::model::ListVmwareEngineNetworksResponse,
7553 crate::Error,
7554 > {
7555 use google_cloud_gax::paginator::Paginator;
7556 self.by_page().items()
7557 }
7558
7559 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7563 self.0.request.parent = v.into();
7564 self
7565 }
7566
7567 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7569 self.0.request.page_size = v.into();
7570 self
7571 }
7572
7573 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7575 self.0.request.page_token = v.into();
7576 self
7577 }
7578
7579 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7581 self.0.request.filter = v.into();
7582 self
7583 }
7584
7585 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7587 self.0.request.order_by = v.into();
7588 self
7589 }
7590 }
7591
7592 #[doc(hidden)]
7593 impl crate::RequestBuilder for ListVmwareEngineNetworks {
7594 fn request_options(&mut self) -> &mut crate::RequestOptions {
7595 &mut self.0.options
7596 }
7597 }
7598
7599 #[derive(Clone, Debug)]
7617 pub struct CreatePrivateConnection(
7618 RequestBuilder<crate::model::CreatePrivateConnectionRequest>,
7619 );
7620
7621 impl CreatePrivateConnection {
7622 pub(crate) fn new(
7623 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7624 ) -> Self {
7625 Self(RequestBuilder::new(stub))
7626 }
7627
7628 pub fn with_request<V: Into<crate::model::CreatePrivateConnectionRequest>>(
7630 mut self,
7631 v: V,
7632 ) -> Self {
7633 self.0.request = v.into();
7634 self
7635 }
7636
7637 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7639 self.0.options = v.into();
7640 self
7641 }
7642
7643 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7650 (*self.0.stub)
7651 .create_private_connection(self.0.request, self.0.options)
7652 .await
7653 .map(crate::Response::into_body)
7654 }
7655
7656 pub fn poller(
7658 self,
7659 ) -> impl google_cloud_lro::Poller<
7660 crate::model::PrivateConnection,
7661 crate::model::OperationMetadata,
7662 > {
7663 type Operation = google_cloud_lro::internal::Operation<
7664 crate::model::PrivateConnection,
7665 crate::model::OperationMetadata,
7666 >;
7667 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7668 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7669
7670 let stub = self.0.stub.clone();
7671 let mut options = self.0.options.clone();
7672 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7673 let query = move |name| {
7674 let stub = stub.clone();
7675 let options = options.clone();
7676 async {
7677 let op = GetOperation::new(stub)
7678 .set_name(name)
7679 .with_options(options)
7680 .send()
7681 .await?;
7682 Ok(Operation::new(op))
7683 }
7684 };
7685
7686 let start = move || async {
7687 let op = self.send().await?;
7688 Ok(Operation::new(op))
7689 };
7690
7691 google_cloud_lro::internal::new_poller(
7692 polling_error_policy,
7693 polling_backoff_policy,
7694 start,
7695 query,
7696 )
7697 }
7698
7699 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7703 self.0.request.parent = v.into();
7704 self
7705 }
7706
7707 pub fn set_private_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7711 self.0.request.private_connection_id = v.into();
7712 self
7713 }
7714
7715 pub fn set_private_connection<T>(mut self, v: T) -> Self
7719 where
7720 T: std::convert::Into<crate::model::PrivateConnection>,
7721 {
7722 self.0.request.private_connection = std::option::Option::Some(v.into());
7723 self
7724 }
7725
7726 pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
7730 where
7731 T: std::convert::Into<crate::model::PrivateConnection>,
7732 {
7733 self.0.request.private_connection = v.map(|x| x.into());
7734 self
7735 }
7736
7737 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7739 self.0.request.request_id = v.into();
7740 self
7741 }
7742 }
7743
7744 #[doc(hidden)]
7745 impl crate::RequestBuilder for CreatePrivateConnection {
7746 fn request_options(&mut self) -> &mut crate::RequestOptions {
7747 &mut self.0.options
7748 }
7749 }
7750
7751 #[derive(Clone, Debug)]
7768 pub struct GetPrivateConnection(RequestBuilder<crate::model::GetPrivateConnectionRequest>);
7769
7770 impl GetPrivateConnection {
7771 pub(crate) fn new(
7772 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7773 ) -> Self {
7774 Self(RequestBuilder::new(stub))
7775 }
7776
7777 pub fn with_request<V: Into<crate::model::GetPrivateConnectionRequest>>(
7779 mut self,
7780 v: V,
7781 ) -> Self {
7782 self.0.request = v.into();
7783 self
7784 }
7785
7786 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7788 self.0.options = v.into();
7789 self
7790 }
7791
7792 pub async fn send(self) -> Result<crate::model::PrivateConnection> {
7794 (*self.0.stub)
7795 .get_private_connection(self.0.request, self.0.options)
7796 .await
7797 .map(crate::Response::into_body)
7798 }
7799
7800 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7804 self.0.request.name = v.into();
7805 self
7806 }
7807 }
7808
7809 #[doc(hidden)]
7810 impl crate::RequestBuilder for GetPrivateConnection {
7811 fn request_options(&mut self) -> &mut crate::RequestOptions {
7812 &mut self.0.options
7813 }
7814 }
7815
7816 #[derive(Clone, Debug)]
7837 pub struct ListPrivateConnections(RequestBuilder<crate::model::ListPrivateConnectionsRequest>);
7838
7839 impl ListPrivateConnections {
7840 pub(crate) fn new(
7841 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7842 ) -> Self {
7843 Self(RequestBuilder::new(stub))
7844 }
7845
7846 pub fn with_request<V: Into<crate::model::ListPrivateConnectionsRequest>>(
7848 mut self,
7849 v: V,
7850 ) -> Self {
7851 self.0.request = v.into();
7852 self
7853 }
7854
7855 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7857 self.0.options = v.into();
7858 self
7859 }
7860
7861 pub async fn send(self) -> Result<crate::model::ListPrivateConnectionsResponse> {
7863 (*self.0.stub)
7864 .list_private_connections(self.0.request, self.0.options)
7865 .await
7866 .map(crate::Response::into_body)
7867 }
7868
7869 pub fn by_page(
7871 self,
7872 ) -> impl google_cloud_gax::paginator::Paginator<
7873 crate::model::ListPrivateConnectionsResponse,
7874 crate::Error,
7875 > {
7876 use std::clone::Clone;
7877 let token = self.0.request.page_token.clone();
7878 let execute = move |token: String| {
7879 let mut builder = self.clone();
7880 builder.0.request = builder.0.request.set_page_token(token);
7881 builder.send()
7882 };
7883 google_cloud_gax::paginator::internal::new_paginator(token, execute)
7884 }
7885
7886 pub fn by_item(
7888 self,
7889 ) -> impl google_cloud_gax::paginator::ItemPaginator<
7890 crate::model::ListPrivateConnectionsResponse,
7891 crate::Error,
7892 > {
7893 use google_cloud_gax::paginator::Paginator;
7894 self.by_page().items()
7895 }
7896
7897 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7901 self.0.request.parent = v.into();
7902 self
7903 }
7904
7905 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7907 self.0.request.page_size = v.into();
7908 self
7909 }
7910
7911 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7913 self.0.request.page_token = v.into();
7914 self
7915 }
7916
7917 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7919 self.0.request.filter = v.into();
7920 self
7921 }
7922
7923 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7925 self.0.request.order_by = v.into();
7926 self
7927 }
7928 }
7929
7930 #[doc(hidden)]
7931 impl crate::RequestBuilder for ListPrivateConnections {
7932 fn request_options(&mut self) -> &mut crate::RequestOptions {
7933 &mut self.0.options
7934 }
7935 }
7936
7937 #[derive(Clone, Debug)]
7955 pub struct UpdatePrivateConnection(
7956 RequestBuilder<crate::model::UpdatePrivateConnectionRequest>,
7957 );
7958
7959 impl UpdatePrivateConnection {
7960 pub(crate) fn new(
7961 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7962 ) -> Self {
7963 Self(RequestBuilder::new(stub))
7964 }
7965
7966 pub fn with_request<V: Into<crate::model::UpdatePrivateConnectionRequest>>(
7968 mut self,
7969 v: V,
7970 ) -> Self {
7971 self.0.request = v.into();
7972 self
7973 }
7974
7975 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7977 self.0.options = v.into();
7978 self
7979 }
7980
7981 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7988 (*self.0.stub)
7989 .update_private_connection(self.0.request, self.0.options)
7990 .await
7991 .map(crate::Response::into_body)
7992 }
7993
7994 pub fn poller(
7996 self,
7997 ) -> impl google_cloud_lro::Poller<
7998 crate::model::PrivateConnection,
7999 crate::model::OperationMetadata,
8000 > {
8001 type Operation = google_cloud_lro::internal::Operation<
8002 crate::model::PrivateConnection,
8003 crate::model::OperationMetadata,
8004 >;
8005 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8006 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8007
8008 let stub = self.0.stub.clone();
8009 let mut options = self.0.options.clone();
8010 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8011 let query = move |name| {
8012 let stub = stub.clone();
8013 let options = options.clone();
8014 async {
8015 let op = GetOperation::new(stub)
8016 .set_name(name)
8017 .with_options(options)
8018 .send()
8019 .await?;
8020 Ok(Operation::new(op))
8021 }
8022 };
8023
8024 let start = move || async {
8025 let op = self.send().await?;
8026 Ok(Operation::new(op))
8027 };
8028
8029 google_cloud_lro::internal::new_poller(
8030 polling_error_policy,
8031 polling_backoff_policy,
8032 start,
8033 query,
8034 )
8035 }
8036
8037 pub fn set_private_connection<T>(mut self, v: T) -> Self
8041 where
8042 T: std::convert::Into<crate::model::PrivateConnection>,
8043 {
8044 self.0.request.private_connection = std::option::Option::Some(v.into());
8045 self
8046 }
8047
8048 pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
8052 where
8053 T: std::convert::Into<crate::model::PrivateConnection>,
8054 {
8055 self.0.request.private_connection = v.map(|x| x.into());
8056 self
8057 }
8058
8059 pub fn set_update_mask<T>(mut self, v: T) -> Self
8063 where
8064 T: std::convert::Into<wkt::FieldMask>,
8065 {
8066 self.0.request.update_mask = std::option::Option::Some(v.into());
8067 self
8068 }
8069
8070 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8074 where
8075 T: std::convert::Into<wkt::FieldMask>,
8076 {
8077 self.0.request.update_mask = v.map(|x| x.into());
8078 self
8079 }
8080
8081 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8083 self.0.request.request_id = v.into();
8084 self
8085 }
8086 }
8087
8088 #[doc(hidden)]
8089 impl crate::RequestBuilder for UpdatePrivateConnection {
8090 fn request_options(&mut self) -> &mut crate::RequestOptions {
8091 &mut self.0.options
8092 }
8093 }
8094
8095 #[derive(Clone, Debug)]
8113 pub struct DeletePrivateConnection(
8114 RequestBuilder<crate::model::DeletePrivateConnectionRequest>,
8115 );
8116
8117 impl DeletePrivateConnection {
8118 pub(crate) fn new(
8119 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8120 ) -> Self {
8121 Self(RequestBuilder::new(stub))
8122 }
8123
8124 pub fn with_request<V: Into<crate::model::DeletePrivateConnectionRequest>>(
8126 mut self,
8127 v: V,
8128 ) -> Self {
8129 self.0.request = v.into();
8130 self
8131 }
8132
8133 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8135 self.0.options = v.into();
8136 self
8137 }
8138
8139 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8146 (*self.0.stub)
8147 .delete_private_connection(self.0.request, self.0.options)
8148 .await
8149 .map(crate::Response::into_body)
8150 }
8151
8152 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
8154 type Operation =
8155 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
8156 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8157 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8158
8159 let stub = self.0.stub.clone();
8160 let mut options = self.0.options.clone();
8161 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8162 let query = move |name| {
8163 let stub = stub.clone();
8164 let options = options.clone();
8165 async {
8166 let op = GetOperation::new(stub)
8167 .set_name(name)
8168 .with_options(options)
8169 .send()
8170 .await?;
8171 Ok(Operation::new(op))
8172 }
8173 };
8174
8175 let start = move || async {
8176 let op = self.send().await?;
8177 Ok(Operation::new(op))
8178 };
8179
8180 google_cloud_lro::internal::new_unit_response_poller(
8181 polling_error_policy,
8182 polling_backoff_policy,
8183 start,
8184 query,
8185 )
8186 }
8187
8188 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8192 self.0.request.name = v.into();
8193 self
8194 }
8195
8196 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8198 self.0.request.request_id = v.into();
8199 self
8200 }
8201 }
8202
8203 #[doc(hidden)]
8204 impl crate::RequestBuilder for DeletePrivateConnection {
8205 fn request_options(&mut self) -> &mut crate::RequestOptions {
8206 &mut self.0.options
8207 }
8208 }
8209
8210 #[derive(Clone, Debug)]
8231 pub struct ListPrivateConnectionPeeringRoutes(
8232 RequestBuilder<crate::model::ListPrivateConnectionPeeringRoutesRequest>,
8233 );
8234
8235 impl ListPrivateConnectionPeeringRoutes {
8236 pub(crate) fn new(
8237 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8238 ) -> Self {
8239 Self(RequestBuilder::new(stub))
8240 }
8241
8242 pub fn with_request<V: Into<crate::model::ListPrivateConnectionPeeringRoutesRequest>>(
8244 mut self,
8245 v: V,
8246 ) -> Self {
8247 self.0.request = v.into();
8248 self
8249 }
8250
8251 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8253 self.0.options = v.into();
8254 self
8255 }
8256
8257 pub async fn send(
8259 self,
8260 ) -> Result<crate::model::ListPrivateConnectionPeeringRoutesResponse> {
8261 (*self.0.stub)
8262 .list_private_connection_peering_routes(self.0.request, self.0.options)
8263 .await
8264 .map(crate::Response::into_body)
8265 }
8266
8267 pub fn by_page(
8269 self,
8270 ) -> impl google_cloud_gax::paginator::Paginator<
8271 crate::model::ListPrivateConnectionPeeringRoutesResponse,
8272 crate::Error,
8273 > {
8274 use std::clone::Clone;
8275 let token = self.0.request.page_token.clone();
8276 let execute = move |token: String| {
8277 let mut builder = self.clone();
8278 builder.0.request = builder.0.request.set_page_token(token);
8279 builder.send()
8280 };
8281 google_cloud_gax::paginator::internal::new_paginator(token, execute)
8282 }
8283
8284 pub fn by_item(
8286 self,
8287 ) -> impl google_cloud_gax::paginator::ItemPaginator<
8288 crate::model::ListPrivateConnectionPeeringRoutesResponse,
8289 crate::Error,
8290 > {
8291 use google_cloud_gax::paginator::Paginator;
8292 self.by_page().items()
8293 }
8294
8295 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8299 self.0.request.parent = v.into();
8300 self
8301 }
8302
8303 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8305 self.0.request.page_size = v.into();
8306 self
8307 }
8308
8309 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8311 self.0.request.page_token = v.into();
8312 self
8313 }
8314 }
8315
8316 #[doc(hidden)]
8317 impl crate::RequestBuilder for ListPrivateConnectionPeeringRoutes {
8318 fn request_options(&mut self) -> &mut crate::RequestOptions {
8319 &mut self.0.options
8320 }
8321 }
8322
8323 #[derive(Clone, Debug)]
8341 pub struct GrantDnsBindPermission(RequestBuilder<crate::model::GrantDnsBindPermissionRequest>);
8342
8343 impl GrantDnsBindPermission {
8344 pub(crate) fn new(
8345 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8346 ) -> Self {
8347 Self(RequestBuilder::new(stub))
8348 }
8349
8350 pub fn with_request<V: Into<crate::model::GrantDnsBindPermissionRequest>>(
8352 mut self,
8353 v: V,
8354 ) -> Self {
8355 self.0.request = v.into();
8356 self
8357 }
8358
8359 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8361 self.0.options = v.into();
8362 self
8363 }
8364
8365 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8372 (*self.0.stub)
8373 .grant_dns_bind_permission(self.0.request, self.0.options)
8374 .await
8375 .map(crate::Response::into_body)
8376 }
8377
8378 pub fn poller(
8380 self,
8381 ) -> impl google_cloud_lro::Poller<
8382 crate::model::DnsBindPermission,
8383 crate::model::OperationMetadata,
8384 > {
8385 type Operation = google_cloud_lro::internal::Operation<
8386 crate::model::DnsBindPermission,
8387 crate::model::OperationMetadata,
8388 >;
8389 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8390 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8391
8392 let stub = self.0.stub.clone();
8393 let mut options = self.0.options.clone();
8394 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8395 let query = move |name| {
8396 let stub = stub.clone();
8397 let options = options.clone();
8398 async {
8399 let op = GetOperation::new(stub)
8400 .set_name(name)
8401 .with_options(options)
8402 .send()
8403 .await?;
8404 Ok(Operation::new(op))
8405 }
8406 };
8407
8408 let start = move || async {
8409 let op = self.send().await?;
8410 Ok(Operation::new(op))
8411 };
8412
8413 google_cloud_lro::internal::new_poller(
8414 polling_error_policy,
8415 polling_backoff_policy,
8416 start,
8417 query,
8418 )
8419 }
8420
8421 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8425 self.0.request.name = v.into();
8426 self
8427 }
8428
8429 pub fn set_principal<T>(mut self, v: T) -> Self
8433 where
8434 T: std::convert::Into<crate::model::Principal>,
8435 {
8436 self.0.request.principal = std::option::Option::Some(v.into());
8437 self
8438 }
8439
8440 pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8444 where
8445 T: std::convert::Into<crate::model::Principal>,
8446 {
8447 self.0.request.principal = v.map(|x| x.into());
8448 self
8449 }
8450
8451 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8453 self.0.request.request_id = v.into();
8454 self
8455 }
8456 }
8457
8458 #[doc(hidden)]
8459 impl crate::RequestBuilder for GrantDnsBindPermission {
8460 fn request_options(&mut self) -> &mut crate::RequestOptions {
8461 &mut self.0.options
8462 }
8463 }
8464
8465 #[derive(Clone, Debug)]
8482 pub struct GetDnsBindPermission(RequestBuilder<crate::model::GetDnsBindPermissionRequest>);
8483
8484 impl GetDnsBindPermission {
8485 pub(crate) fn new(
8486 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8487 ) -> Self {
8488 Self(RequestBuilder::new(stub))
8489 }
8490
8491 pub fn with_request<V: Into<crate::model::GetDnsBindPermissionRequest>>(
8493 mut self,
8494 v: V,
8495 ) -> Self {
8496 self.0.request = v.into();
8497 self
8498 }
8499
8500 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8502 self.0.options = v.into();
8503 self
8504 }
8505
8506 pub async fn send(self) -> Result<crate::model::DnsBindPermission> {
8508 (*self.0.stub)
8509 .get_dns_bind_permission(self.0.request, self.0.options)
8510 .await
8511 .map(crate::Response::into_body)
8512 }
8513
8514 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8518 self.0.request.name = v.into();
8519 self
8520 }
8521 }
8522
8523 #[doc(hidden)]
8524 impl crate::RequestBuilder for GetDnsBindPermission {
8525 fn request_options(&mut self) -> &mut crate::RequestOptions {
8526 &mut self.0.options
8527 }
8528 }
8529
8530 #[derive(Clone, Debug)]
8548 pub struct RevokeDnsBindPermission(
8549 RequestBuilder<crate::model::RevokeDnsBindPermissionRequest>,
8550 );
8551
8552 impl RevokeDnsBindPermission {
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<crate::model::RevokeDnsBindPermissionRequest>>(
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<crate::RequestOptions>>(mut self, v: V) -> Self {
8570 self.0.options = v.into();
8571 self
8572 }
8573
8574 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8581 (*self.0.stub)
8582 .revoke_dns_bind_permission(self.0.request, self.0.options)
8583 .await
8584 .map(crate::Response::into_body)
8585 }
8586
8587 pub fn poller(
8589 self,
8590 ) -> impl google_cloud_lro::Poller<
8591 crate::model::DnsBindPermission,
8592 crate::model::OperationMetadata,
8593 > {
8594 type Operation = google_cloud_lro::internal::Operation<
8595 crate::model::DnsBindPermission,
8596 crate::model::OperationMetadata,
8597 >;
8598 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8599 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8600
8601 let stub = self.0.stub.clone();
8602 let mut options = self.0.options.clone();
8603 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8604 let query = move |name| {
8605 let stub = stub.clone();
8606 let options = options.clone();
8607 async {
8608 let op = GetOperation::new(stub)
8609 .set_name(name)
8610 .with_options(options)
8611 .send()
8612 .await?;
8613 Ok(Operation::new(op))
8614 }
8615 };
8616
8617 let start = move || async {
8618 let op = self.send().await?;
8619 Ok(Operation::new(op))
8620 };
8621
8622 google_cloud_lro::internal::new_poller(
8623 polling_error_policy,
8624 polling_backoff_policy,
8625 start,
8626 query,
8627 )
8628 }
8629
8630 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8634 self.0.request.name = v.into();
8635 self
8636 }
8637
8638 pub fn set_principal<T>(mut self, v: T) -> Self
8642 where
8643 T: std::convert::Into<crate::model::Principal>,
8644 {
8645 self.0.request.principal = std::option::Option::Some(v.into());
8646 self
8647 }
8648
8649 pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8653 where
8654 T: std::convert::Into<crate::model::Principal>,
8655 {
8656 self.0.request.principal = v.map(|x| x.into());
8657 self
8658 }
8659
8660 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8662 self.0.request.request_id = v.into();
8663 self
8664 }
8665 }
8666
8667 #[doc(hidden)]
8668 impl crate::RequestBuilder for RevokeDnsBindPermission {
8669 fn request_options(&mut self) -> &mut crate::RequestOptions {
8670 &mut self.0.options
8671 }
8672 }
8673
8674 #[derive(Clone, Debug)]
8695 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
8696
8697 impl ListLocations {
8698 pub(crate) fn new(
8699 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8700 ) -> Self {
8701 Self(RequestBuilder::new(stub))
8702 }
8703
8704 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
8706 mut self,
8707 v: V,
8708 ) -> Self {
8709 self.0.request = v.into();
8710 self
8711 }
8712
8713 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8715 self.0.options = v.into();
8716 self
8717 }
8718
8719 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
8721 (*self.0.stub)
8722 .list_locations(self.0.request, self.0.options)
8723 .await
8724 .map(crate::Response::into_body)
8725 }
8726
8727 pub fn by_page(
8729 self,
8730 ) -> impl google_cloud_gax::paginator::Paginator<
8731 google_cloud_location::model::ListLocationsResponse,
8732 crate::Error,
8733 > {
8734 use std::clone::Clone;
8735 let token = self.0.request.page_token.clone();
8736 let execute = move |token: String| {
8737 let mut builder = self.clone();
8738 builder.0.request = builder.0.request.set_page_token(token);
8739 builder.send()
8740 };
8741 google_cloud_gax::paginator::internal::new_paginator(token, execute)
8742 }
8743
8744 pub fn by_item(
8746 self,
8747 ) -> impl google_cloud_gax::paginator::ItemPaginator<
8748 google_cloud_location::model::ListLocationsResponse,
8749 crate::Error,
8750 > {
8751 use google_cloud_gax::paginator::Paginator;
8752 self.by_page().items()
8753 }
8754
8755 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8757 self.0.request.name = v.into();
8758 self
8759 }
8760
8761 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8763 self.0.request.filter = v.into();
8764 self
8765 }
8766
8767 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8769 self.0.request.page_size = v.into();
8770 self
8771 }
8772
8773 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8775 self.0.request.page_token = v.into();
8776 self
8777 }
8778 }
8779
8780 #[doc(hidden)]
8781 impl crate::RequestBuilder for ListLocations {
8782 fn request_options(&mut self) -> &mut crate::RequestOptions {
8783 &mut self.0.options
8784 }
8785 }
8786
8787 #[derive(Clone, Debug)]
8804 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8805
8806 impl GetLocation {
8807 pub(crate) fn new(
8808 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8809 ) -> Self {
8810 Self(RequestBuilder::new(stub))
8811 }
8812
8813 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8815 mut self,
8816 v: V,
8817 ) -> Self {
8818 self.0.request = v.into();
8819 self
8820 }
8821
8822 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8824 self.0.options = v.into();
8825 self
8826 }
8827
8828 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
8830 (*self.0.stub)
8831 .get_location(self.0.request, self.0.options)
8832 .await
8833 .map(crate::Response::into_body)
8834 }
8835
8836 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8838 self.0.request.name = v.into();
8839 self
8840 }
8841 }
8842
8843 #[doc(hidden)]
8844 impl crate::RequestBuilder for GetLocation {
8845 fn request_options(&mut self) -> &mut crate::RequestOptions {
8846 &mut self.0.options
8847 }
8848 }
8849
8850 #[derive(Clone, Debug)]
8867 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
8868
8869 impl SetIamPolicy {
8870 pub(crate) fn new(
8871 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8872 ) -> Self {
8873 Self(RequestBuilder::new(stub))
8874 }
8875
8876 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
8878 mut self,
8879 v: V,
8880 ) -> Self {
8881 self.0.request = v.into();
8882 self
8883 }
8884
8885 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8887 self.0.options = v.into();
8888 self
8889 }
8890
8891 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8893 (*self.0.stub)
8894 .set_iam_policy(self.0.request, self.0.options)
8895 .await
8896 .map(crate::Response::into_body)
8897 }
8898
8899 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8903 self.0.request.resource = v.into();
8904 self
8905 }
8906
8907 pub fn set_policy<T>(mut self, v: T) -> Self
8911 where
8912 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8913 {
8914 self.0.request.policy = std::option::Option::Some(v.into());
8915 self
8916 }
8917
8918 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8922 where
8923 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8924 {
8925 self.0.request.policy = v.map(|x| x.into());
8926 self
8927 }
8928
8929 pub fn set_update_mask<T>(mut self, v: T) -> Self
8931 where
8932 T: std::convert::Into<wkt::FieldMask>,
8933 {
8934 self.0.request.update_mask = std::option::Option::Some(v.into());
8935 self
8936 }
8937
8938 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8940 where
8941 T: std::convert::Into<wkt::FieldMask>,
8942 {
8943 self.0.request.update_mask = v.map(|x| x.into());
8944 self
8945 }
8946 }
8947
8948 #[doc(hidden)]
8949 impl crate::RequestBuilder for SetIamPolicy {
8950 fn request_options(&mut self) -> &mut crate::RequestOptions {
8951 &mut self.0.options
8952 }
8953 }
8954
8955 #[derive(Clone, Debug)]
8972 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
8973
8974 impl GetIamPolicy {
8975 pub(crate) fn new(
8976 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8977 ) -> Self {
8978 Self(RequestBuilder::new(stub))
8979 }
8980
8981 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
8983 mut self,
8984 v: V,
8985 ) -> Self {
8986 self.0.request = v.into();
8987 self
8988 }
8989
8990 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8992 self.0.options = v.into();
8993 self
8994 }
8995
8996 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8998 (*self.0.stub)
8999 .get_iam_policy(self.0.request, self.0.options)
9000 .await
9001 .map(crate::Response::into_body)
9002 }
9003
9004 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9008 self.0.request.resource = v.into();
9009 self
9010 }
9011
9012 pub fn set_options<T>(mut self, v: T) -> Self
9014 where
9015 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9016 {
9017 self.0.request.options = std::option::Option::Some(v.into());
9018 self
9019 }
9020
9021 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
9023 where
9024 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9025 {
9026 self.0.request.options = v.map(|x| x.into());
9027 self
9028 }
9029 }
9030
9031 #[doc(hidden)]
9032 impl crate::RequestBuilder for GetIamPolicy {
9033 fn request_options(&mut self) -> &mut crate::RequestOptions {
9034 &mut self.0.options
9035 }
9036 }
9037
9038 #[derive(Clone, Debug)]
9055 pub struct TestIamPermissions(
9056 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
9057 );
9058
9059 impl TestIamPermissions {
9060 pub(crate) fn new(
9061 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9062 ) -> Self {
9063 Self(RequestBuilder::new(stub))
9064 }
9065
9066 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
9068 mut self,
9069 v: V,
9070 ) -> Self {
9071 self.0.request = v.into();
9072 self
9073 }
9074
9075 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9077 self.0.options = v.into();
9078 self
9079 }
9080
9081 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
9083 (*self.0.stub)
9084 .test_iam_permissions(self.0.request, self.0.options)
9085 .await
9086 .map(crate::Response::into_body)
9087 }
9088
9089 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9093 self.0.request.resource = v.into();
9094 self
9095 }
9096
9097 pub fn set_permissions<T, V>(mut self, v: T) -> Self
9101 where
9102 T: std::iter::IntoIterator<Item = V>,
9103 V: std::convert::Into<std::string::String>,
9104 {
9105 use std::iter::Iterator;
9106 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
9107 self
9108 }
9109 }
9110
9111 #[doc(hidden)]
9112 impl crate::RequestBuilder for TestIamPermissions {
9113 fn request_options(&mut self) -> &mut crate::RequestOptions {
9114 &mut self.0.options
9115 }
9116 }
9117
9118 #[derive(Clone, Debug)]
9139 pub struct ListOperations(
9140 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
9141 );
9142
9143 impl ListOperations {
9144 pub(crate) fn new(
9145 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9146 ) -> Self {
9147 Self(RequestBuilder::new(stub))
9148 }
9149
9150 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
9152 mut self,
9153 v: V,
9154 ) -> Self {
9155 self.0.request = v.into();
9156 self
9157 }
9158
9159 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9161 self.0.options = v.into();
9162 self
9163 }
9164
9165 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
9167 (*self.0.stub)
9168 .list_operations(self.0.request, self.0.options)
9169 .await
9170 .map(crate::Response::into_body)
9171 }
9172
9173 pub fn by_page(
9175 self,
9176 ) -> impl google_cloud_gax::paginator::Paginator<
9177 google_cloud_longrunning::model::ListOperationsResponse,
9178 crate::Error,
9179 > {
9180 use std::clone::Clone;
9181 let token = self.0.request.page_token.clone();
9182 let execute = move |token: String| {
9183 let mut builder = self.clone();
9184 builder.0.request = builder.0.request.set_page_token(token);
9185 builder.send()
9186 };
9187 google_cloud_gax::paginator::internal::new_paginator(token, execute)
9188 }
9189
9190 pub fn by_item(
9192 self,
9193 ) -> impl google_cloud_gax::paginator::ItemPaginator<
9194 google_cloud_longrunning::model::ListOperationsResponse,
9195 crate::Error,
9196 > {
9197 use google_cloud_gax::paginator::Paginator;
9198 self.by_page().items()
9199 }
9200
9201 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9203 self.0.request.name = v.into();
9204 self
9205 }
9206
9207 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9209 self.0.request.filter = v.into();
9210 self
9211 }
9212
9213 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9215 self.0.request.page_size = v.into();
9216 self
9217 }
9218
9219 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9221 self.0.request.page_token = v.into();
9222 self
9223 }
9224
9225 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
9227 self.0.request.return_partial_success = v.into();
9228 self
9229 }
9230 }
9231
9232 #[doc(hidden)]
9233 impl crate::RequestBuilder for ListOperations {
9234 fn request_options(&mut self) -> &mut crate::RequestOptions {
9235 &mut self.0.options
9236 }
9237 }
9238
9239 #[derive(Clone, Debug)]
9256 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
9257
9258 impl GetOperation {
9259 pub(crate) fn new(
9260 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9261 ) -> Self {
9262 Self(RequestBuilder::new(stub))
9263 }
9264
9265 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
9267 mut self,
9268 v: V,
9269 ) -> Self {
9270 self.0.request = v.into();
9271 self
9272 }
9273
9274 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9276 self.0.options = v.into();
9277 self
9278 }
9279
9280 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9282 (*self.0.stub)
9283 .get_operation(self.0.request, self.0.options)
9284 .await
9285 .map(crate::Response::into_body)
9286 }
9287
9288 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9290 self.0.request.name = v.into();
9291 self
9292 }
9293 }
9294
9295 #[doc(hidden)]
9296 impl crate::RequestBuilder for GetOperation {
9297 fn request_options(&mut self) -> &mut crate::RequestOptions {
9298 &mut self.0.options
9299 }
9300 }
9301
9302 #[derive(Clone, Debug)]
9319 pub struct DeleteOperation(
9320 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
9321 );
9322
9323 impl DeleteOperation {
9324 pub(crate) fn new(
9325 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9326 ) -> Self {
9327 Self(RequestBuilder::new(stub))
9328 }
9329
9330 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
9332 mut self,
9333 v: V,
9334 ) -> Self {
9335 self.0.request = v.into();
9336 self
9337 }
9338
9339 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9341 self.0.options = v.into();
9342 self
9343 }
9344
9345 pub async fn send(self) -> Result<()> {
9347 (*self.0.stub)
9348 .delete_operation(self.0.request, self.0.options)
9349 .await
9350 .map(crate::Response::into_body)
9351 }
9352
9353 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9355 self.0.request.name = v.into();
9356 self
9357 }
9358 }
9359
9360 #[doc(hidden)]
9361 impl crate::RequestBuilder for DeleteOperation {
9362 fn request_options(&mut self) -> &mut crate::RequestOptions {
9363 &mut self.0.options
9364 }
9365 }
9366}