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