1pub mod vmware_engine {
19 use crate::Result;
20
21 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::VmwareEngine;
38 pub struct Factory;
39 impl crate::ClientFactory for Factory {
40 type Client = VmwareEngine;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> crate::ClientBuilderResult<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
55 request: R,
56 options: crate::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(
64 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
65 ) -> Self {
66 Self {
67 stub,
68 request: R::default(),
69 options: crate::RequestOptions::default(),
70 }
71 }
72 }
73
74 #[derive(Clone, Debug)]
95 pub struct ListPrivateClouds(RequestBuilder<crate::model::ListPrivateCloudsRequest>);
96
97 impl ListPrivateClouds {
98 pub(crate) fn new(
99 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
100 ) -> Self {
101 Self(RequestBuilder::new(stub))
102 }
103
104 pub fn with_request<V: Into<crate::model::ListPrivateCloudsRequest>>(
106 mut self,
107 v: V,
108 ) -> Self {
109 self.0.request = v.into();
110 self
111 }
112
113 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
115 self.0.options = v.into();
116 self
117 }
118
119 pub async fn send(self) -> Result<crate::model::ListPrivateCloudsResponse> {
121 (*self.0.stub)
122 .list_private_clouds(self.0.request, self.0.options)
123 .await
124 .map(crate::Response::into_body)
125 }
126
127 pub fn by_page(
129 self,
130 ) -> impl google_cloud_gax::paginator::Paginator<
131 crate::model::ListPrivateCloudsResponse,
132 crate::Error,
133 > {
134 use std::clone::Clone;
135 let token = self.0.request.page_token.clone();
136 let execute = move |token: String| {
137 let mut builder = self.clone();
138 builder.0.request = builder.0.request.set_page_token(token);
139 builder.send()
140 };
141 google_cloud_gax::paginator::internal::new_paginator(token, execute)
142 }
143
144 pub fn by_item(
146 self,
147 ) -> impl google_cloud_gax::paginator::ItemPaginator<
148 crate::model::ListPrivateCloudsResponse,
149 crate::Error,
150 > {
151 use google_cloud_gax::paginator::Paginator;
152 self.by_page().items()
153 }
154
155 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
159 self.0.request.parent = v.into();
160 self
161 }
162
163 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
165 self.0.request.page_size = v.into();
166 self
167 }
168
169 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
171 self.0.request.page_token = v.into();
172 self
173 }
174
175 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
177 self.0.request.filter = v.into();
178 self
179 }
180
181 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
183 self.0.request.order_by = v.into();
184 self
185 }
186 }
187
188 #[doc(hidden)]
189 impl crate::RequestBuilder for ListPrivateClouds {
190 fn request_options(&mut self) -> &mut crate::RequestOptions {
191 &mut self.0.options
192 }
193 }
194
195 #[derive(Clone, Debug)]
212 pub struct GetPrivateCloud(RequestBuilder<crate::model::GetPrivateCloudRequest>);
213
214 impl GetPrivateCloud {
215 pub(crate) fn new(
216 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
217 ) -> Self {
218 Self(RequestBuilder::new(stub))
219 }
220
221 pub fn with_request<V: Into<crate::model::GetPrivateCloudRequest>>(mut self, v: V) -> Self {
223 self.0.request = v.into();
224 self
225 }
226
227 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
229 self.0.options = v.into();
230 self
231 }
232
233 pub async fn send(self) -> Result<crate::model::PrivateCloud> {
235 (*self.0.stub)
236 .get_private_cloud(self.0.request, self.0.options)
237 .await
238 .map(crate::Response::into_body)
239 }
240
241 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
245 self.0.request.name = v.into();
246 self
247 }
248 }
249
250 #[doc(hidden)]
251 impl crate::RequestBuilder for GetPrivateCloud {
252 fn request_options(&mut self) -> &mut crate::RequestOptions {
253 &mut self.0.options
254 }
255 }
256
257 #[derive(Clone, Debug)]
275 pub struct CreatePrivateCloud(RequestBuilder<crate::model::CreatePrivateCloudRequest>);
276
277 impl CreatePrivateCloud {
278 pub(crate) fn new(
279 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
280 ) -> Self {
281 Self(RequestBuilder::new(stub))
282 }
283
284 pub fn with_request<V: Into<crate::model::CreatePrivateCloudRequest>>(
286 mut self,
287 v: V,
288 ) -> Self {
289 self.0.request = v.into();
290 self
291 }
292
293 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
295 self.0.options = v.into();
296 self
297 }
298
299 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
306 (*self.0.stub)
307 .create_private_cloud(self.0.request, self.0.options)
308 .await
309 .map(crate::Response::into_body)
310 }
311
312 pub fn poller(
314 self,
315 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
316 {
317 type Operation = google_cloud_lro::internal::Operation<
318 crate::model::PrivateCloud,
319 crate::model::OperationMetadata,
320 >;
321 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
322 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
323 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
324 if let Some(ref mut details) = poller_options.tracing {
325 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::create_private_cloud::until_done";
326 }
327
328 let stub = self.0.stub.clone();
329 let mut options = self.0.options.clone();
330 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
331 let query = move |name| {
332 let stub = stub.clone();
333 let options = options.clone();
334 async {
335 let op = GetOperation::new(stub)
336 .set_name(name)
337 .with_options(options)
338 .send()
339 .await?;
340 Ok(Operation::new(op))
341 }
342 };
343
344 let start = move || async {
345 let op = self.send().await?;
346 Ok(Operation::new(op))
347 };
348
349 use google_cloud_lro::internal::PollerExt;
350 {
351 google_cloud_lro::internal::new_poller(
352 polling_error_policy,
353 polling_backoff_policy,
354 start,
355 query,
356 )
357 }
358 .with_options(poller_options)
359 }
360
361 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
365 self.0.request.parent = v.into();
366 self
367 }
368
369 pub fn set_private_cloud_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
373 self.0.request.private_cloud_id = v.into();
374 self
375 }
376
377 pub fn set_private_cloud<T>(mut self, v: T) -> Self
381 where
382 T: std::convert::Into<crate::model::PrivateCloud>,
383 {
384 self.0.request.private_cloud = std::option::Option::Some(v.into());
385 self
386 }
387
388 pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
392 where
393 T: std::convert::Into<crate::model::PrivateCloud>,
394 {
395 self.0.request.private_cloud = v.map(|x| x.into());
396 self
397 }
398
399 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
401 self.0.request.request_id = v.into();
402 self
403 }
404
405 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
407 self.0.request.validate_only = v.into();
408 self
409 }
410 }
411
412 #[doc(hidden)]
413 impl crate::RequestBuilder for CreatePrivateCloud {
414 fn request_options(&mut self) -> &mut crate::RequestOptions {
415 &mut self.0.options
416 }
417 }
418
419 #[derive(Clone, Debug)]
437 pub struct UpdatePrivateCloud(RequestBuilder<crate::model::UpdatePrivateCloudRequest>);
438
439 impl UpdatePrivateCloud {
440 pub(crate) fn new(
441 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
442 ) -> Self {
443 Self(RequestBuilder::new(stub))
444 }
445
446 pub fn with_request<V: Into<crate::model::UpdatePrivateCloudRequest>>(
448 mut self,
449 v: V,
450 ) -> Self {
451 self.0.request = v.into();
452 self
453 }
454
455 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
457 self.0.options = v.into();
458 self
459 }
460
461 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
468 (*self.0.stub)
469 .update_private_cloud(self.0.request, self.0.options)
470 .await
471 .map(crate::Response::into_body)
472 }
473
474 pub fn poller(
476 self,
477 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
478 {
479 type Operation = google_cloud_lro::internal::Operation<
480 crate::model::PrivateCloud,
481 crate::model::OperationMetadata,
482 >;
483 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
484 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
485 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
486 if let Some(ref mut details) = poller_options.tracing {
487 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::update_private_cloud::until_done";
488 }
489
490 let stub = self.0.stub.clone();
491 let mut options = self.0.options.clone();
492 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
493 let query = move |name| {
494 let stub = stub.clone();
495 let options = options.clone();
496 async {
497 let op = GetOperation::new(stub)
498 .set_name(name)
499 .with_options(options)
500 .send()
501 .await?;
502 Ok(Operation::new(op))
503 }
504 };
505
506 let start = move || async {
507 let op = self.send().await?;
508 Ok(Operation::new(op))
509 };
510
511 use google_cloud_lro::internal::PollerExt;
512 {
513 google_cloud_lro::internal::new_poller(
514 polling_error_policy,
515 polling_backoff_policy,
516 start,
517 query,
518 )
519 }
520 .with_options(poller_options)
521 }
522
523 pub fn set_private_cloud<T>(mut self, v: T) -> Self
527 where
528 T: std::convert::Into<crate::model::PrivateCloud>,
529 {
530 self.0.request.private_cloud = std::option::Option::Some(v.into());
531 self
532 }
533
534 pub fn set_or_clear_private_cloud<T>(mut self, v: std::option::Option<T>) -> Self
538 where
539 T: std::convert::Into<crate::model::PrivateCloud>,
540 {
541 self.0.request.private_cloud = v.map(|x| x.into());
542 self
543 }
544
545 pub fn set_update_mask<T>(mut self, v: T) -> Self
549 where
550 T: std::convert::Into<wkt::FieldMask>,
551 {
552 self.0.request.update_mask = std::option::Option::Some(v.into());
553 self
554 }
555
556 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
560 where
561 T: std::convert::Into<wkt::FieldMask>,
562 {
563 self.0.request.update_mask = v.map(|x| x.into());
564 self
565 }
566
567 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
569 self.0.request.request_id = v.into();
570 self
571 }
572 }
573
574 #[doc(hidden)]
575 impl crate::RequestBuilder for UpdatePrivateCloud {
576 fn request_options(&mut self) -> &mut crate::RequestOptions {
577 &mut self.0.options
578 }
579 }
580
581 #[derive(Clone, Debug)]
599 pub struct DeletePrivateCloud(RequestBuilder<crate::model::DeletePrivateCloudRequest>);
600
601 impl DeletePrivateCloud {
602 pub(crate) fn new(
603 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
604 ) -> Self {
605 Self(RequestBuilder::new(stub))
606 }
607
608 pub fn with_request<V: Into<crate::model::DeletePrivateCloudRequest>>(
610 mut self,
611 v: V,
612 ) -> Self {
613 self.0.request = v.into();
614 self
615 }
616
617 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
619 self.0.options = v.into();
620 self
621 }
622
623 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
630 (*self.0.stub)
631 .delete_private_cloud(self.0.request, self.0.options)
632 .await
633 .map(crate::Response::into_body)
634 }
635
636 pub fn poller(
638 self,
639 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
640 {
641 type Operation = google_cloud_lro::internal::Operation<
642 crate::model::PrivateCloud,
643 crate::model::OperationMetadata,
644 >;
645 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
646 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
647 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
648 if let Some(ref mut details) = poller_options.tracing {
649 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::delete_private_cloud::until_done";
650 }
651
652 let stub = self.0.stub.clone();
653 let mut options = self.0.options.clone();
654 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
655 let query = move |name| {
656 let stub = stub.clone();
657 let options = options.clone();
658 async {
659 let op = GetOperation::new(stub)
660 .set_name(name)
661 .with_options(options)
662 .send()
663 .await?;
664 Ok(Operation::new(op))
665 }
666 };
667
668 let start = move || async {
669 let op = self.send().await?;
670 Ok(Operation::new(op))
671 };
672
673 use google_cloud_lro::internal::PollerExt;
674 {
675 google_cloud_lro::internal::new_poller(
676 polling_error_policy,
677 polling_backoff_policy,
678 start,
679 query,
680 )
681 }
682 .with_options(poller_options)
683 }
684
685 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
689 self.0.request.name = v.into();
690 self
691 }
692
693 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
695 self.0.request.request_id = v.into();
696 self
697 }
698
699 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
701 self.0.request.force = v.into();
702 self
703 }
704
705 pub fn set_delay_hours<T>(mut self, v: T) -> Self
707 where
708 T: std::convert::Into<i32>,
709 {
710 self.0.request.delay_hours = std::option::Option::Some(v.into());
711 self
712 }
713
714 pub fn set_or_clear_delay_hours<T>(mut self, v: std::option::Option<T>) -> Self
716 where
717 T: std::convert::Into<i32>,
718 {
719 self.0.request.delay_hours = v.map(|x| x.into());
720 self
721 }
722 }
723
724 #[doc(hidden)]
725 impl crate::RequestBuilder for DeletePrivateCloud {
726 fn request_options(&mut self) -> &mut crate::RequestOptions {
727 &mut self.0.options
728 }
729 }
730
731 #[derive(Clone, Debug)]
749 pub struct UndeletePrivateCloud(RequestBuilder<crate::model::UndeletePrivateCloudRequest>);
750
751 impl UndeletePrivateCloud {
752 pub(crate) fn new(
753 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
754 ) -> Self {
755 Self(RequestBuilder::new(stub))
756 }
757
758 pub fn with_request<V: Into<crate::model::UndeletePrivateCloudRequest>>(
760 mut self,
761 v: V,
762 ) -> Self {
763 self.0.request = v.into();
764 self
765 }
766
767 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
769 self.0.options = v.into();
770 self
771 }
772
773 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
780 (*self.0.stub)
781 .undelete_private_cloud(self.0.request, self.0.options)
782 .await
783 .map(crate::Response::into_body)
784 }
785
786 pub fn poller(
788 self,
789 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
790 {
791 type Operation = google_cloud_lro::internal::Operation<
792 crate::model::PrivateCloud,
793 crate::model::OperationMetadata,
794 >;
795 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
796 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
797 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
798 if let Some(ref mut details) = poller_options.tracing {
799 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::undelete_private_cloud::until_done";
800 }
801
802 let stub = self.0.stub.clone();
803 let mut options = self.0.options.clone();
804 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
805 let query = move |name| {
806 let stub = stub.clone();
807 let options = options.clone();
808 async {
809 let op = GetOperation::new(stub)
810 .set_name(name)
811 .with_options(options)
812 .send()
813 .await?;
814 Ok(Operation::new(op))
815 }
816 };
817
818 let start = move || async {
819 let op = self.send().await?;
820 Ok(Operation::new(op))
821 };
822
823 use google_cloud_lro::internal::PollerExt;
824 {
825 google_cloud_lro::internal::new_poller(
826 polling_error_policy,
827 polling_backoff_policy,
828 start,
829 query,
830 )
831 }
832 .with_options(poller_options)
833 }
834
835 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
839 self.0.request.name = v.into();
840 self
841 }
842
843 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
845 self.0.request.request_id = v.into();
846 self
847 }
848 }
849
850 #[doc(hidden)]
851 impl crate::RequestBuilder for UndeletePrivateCloud {
852 fn request_options(&mut self) -> &mut crate::RequestOptions {
853 &mut self.0.options
854 }
855 }
856
857 #[derive(Clone, Debug)]
878 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
879
880 impl ListClusters {
881 pub(crate) fn new(
882 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
883 ) -> Self {
884 Self(RequestBuilder::new(stub))
885 }
886
887 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
889 self.0.request = v.into();
890 self
891 }
892
893 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
895 self.0.options = v.into();
896 self
897 }
898
899 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
901 (*self.0.stub)
902 .list_clusters(self.0.request, self.0.options)
903 .await
904 .map(crate::Response::into_body)
905 }
906
907 pub fn by_page(
909 self,
910 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListClustersResponse, crate::Error>
911 {
912 use std::clone::Clone;
913 let token = self.0.request.page_token.clone();
914 let execute = move |token: String| {
915 let mut builder = self.clone();
916 builder.0.request = builder.0.request.set_page_token(token);
917 builder.send()
918 };
919 google_cloud_gax::paginator::internal::new_paginator(token, execute)
920 }
921
922 pub fn by_item(
924 self,
925 ) -> impl google_cloud_gax::paginator::ItemPaginator<
926 crate::model::ListClustersResponse,
927 crate::Error,
928 > {
929 use google_cloud_gax::paginator::Paginator;
930 self.by_page().items()
931 }
932
933 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
937 self.0.request.parent = v.into();
938 self
939 }
940
941 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
943 self.0.request.page_size = v.into();
944 self
945 }
946
947 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
949 self.0.request.page_token = v.into();
950 self
951 }
952
953 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
955 self.0.request.filter = v.into();
956 self
957 }
958
959 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
961 self.0.request.order_by = v.into();
962 self
963 }
964 }
965
966 #[doc(hidden)]
967 impl crate::RequestBuilder for ListClusters {
968 fn request_options(&mut self) -> &mut crate::RequestOptions {
969 &mut self.0.options
970 }
971 }
972
973 #[derive(Clone, Debug)]
990 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
991
992 impl GetCluster {
993 pub(crate) fn new(
994 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
995 ) -> Self {
996 Self(RequestBuilder::new(stub))
997 }
998
999 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
1001 self.0.request = v.into();
1002 self
1003 }
1004
1005 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1007 self.0.options = v.into();
1008 self
1009 }
1010
1011 pub async fn send(self) -> Result<crate::model::Cluster> {
1013 (*self.0.stub)
1014 .get_cluster(self.0.request, self.0.options)
1015 .await
1016 .map(crate::Response::into_body)
1017 }
1018
1019 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1023 self.0.request.name = v.into();
1024 self
1025 }
1026 }
1027
1028 #[doc(hidden)]
1029 impl crate::RequestBuilder for GetCluster {
1030 fn request_options(&mut self) -> &mut crate::RequestOptions {
1031 &mut self.0.options
1032 }
1033 }
1034
1035 #[derive(Clone, Debug)]
1053 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
1054
1055 impl CreateCluster {
1056 pub(crate) fn new(
1057 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1058 ) -> Self {
1059 Self(RequestBuilder::new(stub))
1060 }
1061
1062 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
1064 self.0.request = v.into();
1065 self
1066 }
1067
1068 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1070 self.0.options = v.into();
1071 self
1072 }
1073
1074 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1081 (*self.0.stub)
1082 .create_cluster(self.0.request, self.0.options)
1083 .await
1084 .map(crate::Response::into_body)
1085 }
1086
1087 pub fn poller(
1089 self,
1090 ) -> impl google_cloud_lro::Poller<crate::model::Cluster, crate::model::OperationMetadata>
1091 {
1092 type Operation = google_cloud_lro::internal::Operation<
1093 crate::model::Cluster,
1094 crate::model::OperationMetadata,
1095 >;
1096 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1097 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1098 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1099 if let Some(ref mut details) = poller_options.tracing {
1100 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::create_cluster::until_done";
1101 }
1102
1103 let stub = self.0.stub.clone();
1104 let mut options = self.0.options.clone();
1105 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1106 let query = move |name| {
1107 let stub = stub.clone();
1108 let options = options.clone();
1109 async {
1110 let op = GetOperation::new(stub)
1111 .set_name(name)
1112 .with_options(options)
1113 .send()
1114 .await?;
1115 Ok(Operation::new(op))
1116 }
1117 };
1118
1119 let start = move || async {
1120 let op = self.send().await?;
1121 Ok(Operation::new(op))
1122 };
1123
1124 use google_cloud_lro::internal::PollerExt;
1125 {
1126 google_cloud_lro::internal::new_poller(
1127 polling_error_policy,
1128 polling_backoff_policy,
1129 start,
1130 query,
1131 )
1132 }
1133 .with_options(poller_options)
1134 }
1135
1136 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1140 self.0.request.parent = v.into();
1141 self
1142 }
1143
1144 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1148 self.0.request.cluster_id = v.into();
1149 self
1150 }
1151
1152 pub fn set_cluster<T>(mut self, v: T) -> Self
1156 where
1157 T: std::convert::Into<crate::model::Cluster>,
1158 {
1159 self.0.request.cluster = std::option::Option::Some(v.into());
1160 self
1161 }
1162
1163 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1167 where
1168 T: std::convert::Into<crate::model::Cluster>,
1169 {
1170 self.0.request.cluster = v.map(|x| x.into());
1171 self
1172 }
1173
1174 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1176 self.0.request.request_id = v.into();
1177 self
1178 }
1179
1180 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1182 self.0.request.validate_only = v.into();
1183 self
1184 }
1185 }
1186
1187 #[doc(hidden)]
1188 impl crate::RequestBuilder for CreateCluster {
1189 fn request_options(&mut self) -> &mut crate::RequestOptions {
1190 &mut self.0.options
1191 }
1192 }
1193
1194 #[derive(Clone, Debug)]
1212 pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
1213
1214 impl UpdateCluster {
1215 pub(crate) fn new(
1216 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1217 ) -> Self {
1218 Self(RequestBuilder::new(stub))
1219 }
1220
1221 pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
1223 self.0.request = v.into();
1224 self
1225 }
1226
1227 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1229 self.0.options = v.into();
1230 self
1231 }
1232
1233 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1240 (*self.0.stub)
1241 .update_cluster(self.0.request, self.0.options)
1242 .await
1243 .map(crate::Response::into_body)
1244 }
1245
1246 pub fn poller(
1248 self,
1249 ) -> impl google_cloud_lro::Poller<crate::model::Cluster, crate::model::OperationMetadata>
1250 {
1251 type Operation = google_cloud_lro::internal::Operation<
1252 crate::model::Cluster,
1253 crate::model::OperationMetadata,
1254 >;
1255 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1256 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1257 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1258 if let Some(ref mut details) = poller_options.tracing {
1259 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::update_cluster::until_done";
1260 }
1261
1262 let stub = self.0.stub.clone();
1263 let mut options = self.0.options.clone();
1264 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1265 let query = move |name| {
1266 let stub = stub.clone();
1267 let options = options.clone();
1268 async {
1269 let op = GetOperation::new(stub)
1270 .set_name(name)
1271 .with_options(options)
1272 .send()
1273 .await?;
1274 Ok(Operation::new(op))
1275 }
1276 };
1277
1278 let start = move || async {
1279 let op = self.send().await?;
1280 Ok(Operation::new(op))
1281 };
1282
1283 use google_cloud_lro::internal::PollerExt;
1284 {
1285 google_cloud_lro::internal::new_poller(
1286 polling_error_policy,
1287 polling_backoff_policy,
1288 start,
1289 query,
1290 )
1291 }
1292 .with_options(poller_options)
1293 }
1294
1295 pub fn set_update_mask<T>(mut self, v: T) -> Self
1299 where
1300 T: std::convert::Into<wkt::FieldMask>,
1301 {
1302 self.0.request.update_mask = std::option::Option::Some(v.into());
1303 self
1304 }
1305
1306 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1310 where
1311 T: std::convert::Into<wkt::FieldMask>,
1312 {
1313 self.0.request.update_mask = v.map(|x| x.into());
1314 self
1315 }
1316
1317 pub fn set_cluster<T>(mut self, v: T) -> Self
1321 where
1322 T: std::convert::Into<crate::model::Cluster>,
1323 {
1324 self.0.request.cluster = std::option::Option::Some(v.into());
1325 self
1326 }
1327
1328 pub fn set_or_clear_cluster<T>(mut self, v: std::option::Option<T>) -> Self
1332 where
1333 T: std::convert::Into<crate::model::Cluster>,
1334 {
1335 self.0.request.cluster = v.map(|x| x.into());
1336 self
1337 }
1338
1339 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1341 self.0.request.request_id = v.into();
1342 self
1343 }
1344
1345 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1347 self.0.request.validate_only = v.into();
1348 self
1349 }
1350 }
1351
1352 #[doc(hidden)]
1353 impl crate::RequestBuilder for UpdateCluster {
1354 fn request_options(&mut self) -> &mut crate::RequestOptions {
1355 &mut self.0.options
1356 }
1357 }
1358
1359 #[derive(Clone, Debug)]
1377 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1378
1379 impl DeleteCluster {
1380 pub(crate) fn new(
1381 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1382 ) -> Self {
1383 Self(RequestBuilder::new(stub))
1384 }
1385
1386 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1388 self.0.request = v.into();
1389 self
1390 }
1391
1392 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1394 self.0.options = v.into();
1395 self
1396 }
1397
1398 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1405 (*self.0.stub)
1406 .delete_cluster(self.0.request, self.0.options)
1407 .await
1408 .map(crate::Response::into_body)
1409 }
1410
1411 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1413 type Operation =
1414 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1415 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1416 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1417 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1418 if let Some(ref mut details) = poller_options.tracing {
1419 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::delete_cluster::until_done";
1420 }
1421
1422 let stub = self.0.stub.clone();
1423 let mut options = self.0.options.clone();
1424 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1425 let query = move |name| {
1426 let stub = stub.clone();
1427 let options = options.clone();
1428 async {
1429 let op = GetOperation::new(stub)
1430 .set_name(name)
1431 .with_options(options)
1432 .send()
1433 .await?;
1434 Ok(Operation::new(op))
1435 }
1436 };
1437
1438 let start = move || async {
1439 let op = self.send().await?;
1440 Ok(Operation::new(op))
1441 };
1442
1443 use google_cloud_lro::internal::PollerExt;
1444 {
1445 google_cloud_lro::internal::new_unit_response_poller(
1446 polling_error_policy,
1447 polling_backoff_policy,
1448 start,
1449 query,
1450 )
1451 }
1452 .with_options(poller_options)
1453 }
1454
1455 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1459 self.0.request.name = v.into();
1460 self
1461 }
1462
1463 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1465 self.0.request.request_id = v.into();
1466 self
1467 }
1468 }
1469
1470 #[doc(hidden)]
1471 impl crate::RequestBuilder for DeleteCluster {
1472 fn request_options(&mut self) -> &mut crate::RequestOptions {
1473 &mut self.0.options
1474 }
1475 }
1476
1477 #[derive(Clone, Debug)]
1498 pub struct ListNodes(RequestBuilder<crate::model::ListNodesRequest>);
1499
1500 impl ListNodes {
1501 pub(crate) fn new(
1502 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1503 ) -> Self {
1504 Self(RequestBuilder::new(stub))
1505 }
1506
1507 pub fn with_request<V: Into<crate::model::ListNodesRequest>>(mut self, v: V) -> Self {
1509 self.0.request = v.into();
1510 self
1511 }
1512
1513 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1515 self.0.options = v.into();
1516 self
1517 }
1518
1519 pub async fn send(self) -> Result<crate::model::ListNodesResponse> {
1521 (*self.0.stub)
1522 .list_nodes(self.0.request, self.0.options)
1523 .await
1524 .map(crate::Response::into_body)
1525 }
1526
1527 pub fn by_page(
1529 self,
1530 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListNodesResponse, crate::Error>
1531 {
1532 use std::clone::Clone;
1533 let token = self.0.request.page_token.clone();
1534 let execute = move |token: String| {
1535 let mut builder = self.clone();
1536 builder.0.request = builder.0.request.set_page_token(token);
1537 builder.send()
1538 };
1539 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1540 }
1541
1542 pub fn by_item(
1544 self,
1545 ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListNodesResponse, crate::Error>
1546 {
1547 use google_cloud_gax::paginator::Paginator;
1548 self.by_page().items()
1549 }
1550
1551 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1555 self.0.request.parent = v.into();
1556 self
1557 }
1558
1559 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1561 self.0.request.page_size = v.into();
1562 self
1563 }
1564
1565 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1567 self.0.request.page_token = v.into();
1568 self
1569 }
1570 }
1571
1572 #[doc(hidden)]
1573 impl crate::RequestBuilder for ListNodes {
1574 fn request_options(&mut self) -> &mut crate::RequestOptions {
1575 &mut self.0.options
1576 }
1577 }
1578
1579 #[derive(Clone, Debug)]
1596 pub struct GetNode(RequestBuilder<crate::model::GetNodeRequest>);
1597
1598 impl GetNode {
1599 pub(crate) fn new(
1600 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1601 ) -> Self {
1602 Self(RequestBuilder::new(stub))
1603 }
1604
1605 pub fn with_request<V: Into<crate::model::GetNodeRequest>>(mut self, v: V) -> Self {
1607 self.0.request = v.into();
1608 self
1609 }
1610
1611 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1613 self.0.options = v.into();
1614 self
1615 }
1616
1617 pub async fn send(self) -> Result<crate::model::Node> {
1619 (*self.0.stub)
1620 .get_node(self.0.request, self.0.options)
1621 .await
1622 .map(crate::Response::into_body)
1623 }
1624
1625 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1629 self.0.request.name = v.into();
1630 self
1631 }
1632 }
1633
1634 #[doc(hidden)]
1635 impl crate::RequestBuilder for GetNode {
1636 fn request_options(&mut self) -> &mut crate::RequestOptions {
1637 &mut self.0.options
1638 }
1639 }
1640
1641 #[derive(Clone, Debug)]
1662 pub struct ListExternalAddresses(RequestBuilder<crate::model::ListExternalAddressesRequest>);
1663
1664 impl ListExternalAddresses {
1665 pub(crate) fn new(
1666 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1667 ) -> Self {
1668 Self(RequestBuilder::new(stub))
1669 }
1670
1671 pub fn with_request<V: Into<crate::model::ListExternalAddressesRequest>>(
1673 mut self,
1674 v: V,
1675 ) -> Self {
1676 self.0.request = v.into();
1677 self
1678 }
1679
1680 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1682 self.0.options = v.into();
1683 self
1684 }
1685
1686 pub async fn send(self) -> Result<crate::model::ListExternalAddressesResponse> {
1688 (*self.0.stub)
1689 .list_external_addresses(self.0.request, self.0.options)
1690 .await
1691 .map(crate::Response::into_body)
1692 }
1693
1694 pub fn by_page(
1696 self,
1697 ) -> impl google_cloud_gax::paginator::Paginator<
1698 crate::model::ListExternalAddressesResponse,
1699 crate::Error,
1700 > {
1701 use std::clone::Clone;
1702 let token = self.0.request.page_token.clone();
1703 let execute = move |token: String| {
1704 let mut builder = self.clone();
1705 builder.0.request = builder.0.request.set_page_token(token);
1706 builder.send()
1707 };
1708 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1709 }
1710
1711 pub fn by_item(
1713 self,
1714 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1715 crate::model::ListExternalAddressesResponse,
1716 crate::Error,
1717 > {
1718 use google_cloud_gax::paginator::Paginator;
1719 self.by_page().items()
1720 }
1721
1722 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1726 self.0.request.parent = v.into();
1727 self
1728 }
1729
1730 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1732 self.0.request.page_size = v.into();
1733 self
1734 }
1735
1736 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1738 self.0.request.page_token = v.into();
1739 self
1740 }
1741
1742 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1744 self.0.request.filter = v.into();
1745 self
1746 }
1747
1748 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1750 self.0.request.order_by = v.into();
1751 self
1752 }
1753 }
1754
1755 #[doc(hidden)]
1756 impl crate::RequestBuilder for ListExternalAddresses {
1757 fn request_options(&mut self) -> &mut crate::RequestOptions {
1758 &mut self.0.options
1759 }
1760 }
1761
1762 #[derive(Clone, Debug)]
1783 pub struct FetchNetworkPolicyExternalAddresses(
1784 RequestBuilder<crate::model::FetchNetworkPolicyExternalAddressesRequest>,
1785 );
1786
1787 impl FetchNetworkPolicyExternalAddresses {
1788 pub(crate) fn new(
1789 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1790 ) -> Self {
1791 Self(RequestBuilder::new(stub))
1792 }
1793
1794 pub fn with_request<V: Into<crate::model::FetchNetworkPolicyExternalAddressesRequest>>(
1796 mut self,
1797 v: V,
1798 ) -> Self {
1799 self.0.request = v.into();
1800 self
1801 }
1802
1803 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1805 self.0.options = v.into();
1806 self
1807 }
1808
1809 pub async fn send(
1811 self,
1812 ) -> Result<crate::model::FetchNetworkPolicyExternalAddressesResponse> {
1813 (*self.0.stub)
1814 .fetch_network_policy_external_addresses(self.0.request, self.0.options)
1815 .await
1816 .map(crate::Response::into_body)
1817 }
1818
1819 pub fn by_page(
1821 self,
1822 ) -> impl google_cloud_gax::paginator::Paginator<
1823 crate::model::FetchNetworkPolicyExternalAddressesResponse,
1824 crate::Error,
1825 > {
1826 use std::clone::Clone;
1827 let token = self.0.request.page_token.clone();
1828 let execute = move |token: String| {
1829 let mut builder = self.clone();
1830 builder.0.request = builder.0.request.set_page_token(token);
1831 builder.send()
1832 };
1833 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1834 }
1835
1836 pub fn by_item(
1838 self,
1839 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1840 crate::model::FetchNetworkPolicyExternalAddressesResponse,
1841 crate::Error,
1842 > {
1843 use google_cloud_gax::paginator::Paginator;
1844 self.by_page().items()
1845 }
1846
1847 pub fn set_network_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
1851 self.0.request.network_policy = v.into();
1852 self
1853 }
1854
1855 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1857 self.0.request.page_size = v.into();
1858 self
1859 }
1860
1861 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1863 self.0.request.page_token = v.into();
1864 self
1865 }
1866 }
1867
1868 #[doc(hidden)]
1869 impl crate::RequestBuilder for FetchNetworkPolicyExternalAddresses {
1870 fn request_options(&mut self) -> &mut crate::RequestOptions {
1871 &mut self.0.options
1872 }
1873 }
1874
1875 #[derive(Clone, Debug)]
1892 pub struct GetExternalAddress(RequestBuilder<crate::model::GetExternalAddressRequest>);
1893
1894 impl GetExternalAddress {
1895 pub(crate) fn new(
1896 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1897 ) -> Self {
1898 Self(RequestBuilder::new(stub))
1899 }
1900
1901 pub fn with_request<V: Into<crate::model::GetExternalAddressRequest>>(
1903 mut self,
1904 v: V,
1905 ) -> Self {
1906 self.0.request = v.into();
1907 self
1908 }
1909
1910 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1912 self.0.options = v.into();
1913 self
1914 }
1915
1916 pub async fn send(self) -> Result<crate::model::ExternalAddress> {
1918 (*self.0.stub)
1919 .get_external_address(self.0.request, self.0.options)
1920 .await
1921 .map(crate::Response::into_body)
1922 }
1923
1924 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1928 self.0.request.name = v.into();
1929 self
1930 }
1931 }
1932
1933 #[doc(hidden)]
1934 impl crate::RequestBuilder for GetExternalAddress {
1935 fn request_options(&mut self) -> &mut crate::RequestOptions {
1936 &mut self.0.options
1937 }
1938 }
1939
1940 #[derive(Clone, Debug)]
1958 pub struct CreateExternalAddress(RequestBuilder<crate::model::CreateExternalAddressRequest>);
1959
1960 impl CreateExternalAddress {
1961 pub(crate) fn new(
1962 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1963 ) -> Self {
1964 Self(RequestBuilder::new(stub))
1965 }
1966
1967 pub fn with_request<V: Into<crate::model::CreateExternalAddressRequest>>(
1969 mut self,
1970 v: V,
1971 ) -> Self {
1972 self.0.request = v.into();
1973 self
1974 }
1975
1976 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1978 self.0.options = v.into();
1979 self
1980 }
1981
1982 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1989 (*self.0.stub)
1990 .create_external_address(self.0.request, self.0.options)
1991 .await
1992 .map(crate::Response::into_body)
1993 }
1994
1995 pub fn poller(
1997 self,
1998 ) -> impl google_cloud_lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
1999 {
2000 type Operation = google_cloud_lro::internal::Operation<
2001 crate::model::ExternalAddress,
2002 crate::model::OperationMetadata,
2003 >;
2004 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2005 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2006 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2007 if let Some(ref mut details) = poller_options.tracing {
2008 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::create_external_address::until_done";
2009 }
2010
2011 let stub = self.0.stub.clone();
2012 let mut options = self.0.options.clone();
2013 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2014 let query = move |name| {
2015 let stub = stub.clone();
2016 let options = options.clone();
2017 async {
2018 let op = GetOperation::new(stub)
2019 .set_name(name)
2020 .with_options(options)
2021 .send()
2022 .await?;
2023 Ok(Operation::new(op))
2024 }
2025 };
2026
2027 let start = move || async {
2028 let op = self.send().await?;
2029 Ok(Operation::new(op))
2030 };
2031
2032 use google_cloud_lro::internal::PollerExt;
2033 {
2034 google_cloud_lro::internal::new_poller(
2035 polling_error_policy,
2036 polling_backoff_policy,
2037 start,
2038 query,
2039 )
2040 }
2041 .with_options(poller_options)
2042 }
2043
2044 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2048 self.0.request.parent = v.into();
2049 self
2050 }
2051
2052 pub fn set_external_address<T>(mut self, v: T) -> Self
2056 where
2057 T: std::convert::Into<crate::model::ExternalAddress>,
2058 {
2059 self.0.request.external_address = std::option::Option::Some(v.into());
2060 self
2061 }
2062
2063 pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2067 where
2068 T: std::convert::Into<crate::model::ExternalAddress>,
2069 {
2070 self.0.request.external_address = v.map(|x| x.into());
2071 self
2072 }
2073
2074 pub fn set_external_address_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2078 self.0.request.external_address_id = v.into();
2079 self
2080 }
2081
2082 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2084 self.0.request.request_id = v.into();
2085 self
2086 }
2087 }
2088
2089 #[doc(hidden)]
2090 impl crate::RequestBuilder for CreateExternalAddress {
2091 fn request_options(&mut self) -> &mut crate::RequestOptions {
2092 &mut self.0.options
2093 }
2094 }
2095
2096 #[derive(Clone, Debug)]
2114 pub struct UpdateExternalAddress(RequestBuilder<crate::model::UpdateExternalAddressRequest>);
2115
2116 impl UpdateExternalAddress {
2117 pub(crate) fn new(
2118 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2119 ) -> Self {
2120 Self(RequestBuilder::new(stub))
2121 }
2122
2123 pub fn with_request<V: Into<crate::model::UpdateExternalAddressRequest>>(
2125 mut self,
2126 v: V,
2127 ) -> Self {
2128 self.0.request = v.into();
2129 self
2130 }
2131
2132 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2134 self.0.options = v.into();
2135 self
2136 }
2137
2138 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2145 (*self.0.stub)
2146 .update_external_address(self.0.request, self.0.options)
2147 .await
2148 .map(crate::Response::into_body)
2149 }
2150
2151 pub fn poller(
2153 self,
2154 ) -> impl google_cloud_lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
2155 {
2156 type Operation = google_cloud_lro::internal::Operation<
2157 crate::model::ExternalAddress,
2158 crate::model::OperationMetadata,
2159 >;
2160 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2161 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2162 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2163 if let Some(ref mut details) = poller_options.tracing {
2164 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::update_external_address::until_done";
2165 }
2166
2167 let stub = self.0.stub.clone();
2168 let mut options = self.0.options.clone();
2169 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2170 let query = move |name| {
2171 let stub = stub.clone();
2172 let options = options.clone();
2173 async {
2174 let op = GetOperation::new(stub)
2175 .set_name(name)
2176 .with_options(options)
2177 .send()
2178 .await?;
2179 Ok(Operation::new(op))
2180 }
2181 };
2182
2183 let start = move || async {
2184 let op = self.send().await?;
2185 Ok(Operation::new(op))
2186 };
2187
2188 use google_cloud_lro::internal::PollerExt;
2189 {
2190 google_cloud_lro::internal::new_poller(
2191 polling_error_policy,
2192 polling_backoff_policy,
2193 start,
2194 query,
2195 )
2196 }
2197 .with_options(poller_options)
2198 }
2199
2200 pub fn set_update_mask<T>(mut self, v: T) -> Self
2204 where
2205 T: std::convert::Into<wkt::FieldMask>,
2206 {
2207 self.0.request.update_mask = std::option::Option::Some(v.into());
2208 self
2209 }
2210
2211 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2215 where
2216 T: std::convert::Into<wkt::FieldMask>,
2217 {
2218 self.0.request.update_mask = v.map(|x| x.into());
2219 self
2220 }
2221
2222 pub fn set_external_address<T>(mut self, v: T) -> Self
2226 where
2227 T: std::convert::Into<crate::model::ExternalAddress>,
2228 {
2229 self.0.request.external_address = std::option::Option::Some(v.into());
2230 self
2231 }
2232
2233 pub fn set_or_clear_external_address<T>(mut self, v: std::option::Option<T>) -> Self
2237 where
2238 T: std::convert::Into<crate::model::ExternalAddress>,
2239 {
2240 self.0.request.external_address = v.map(|x| x.into());
2241 self
2242 }
2243
2244 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2246 self.0.request.request_id = v.into();
2247 self
2248 }
2249 }
2250
2251 #[doc(hidden)]
2252 impl crate::RequestBuilder for UpdateExternalAddress {
2253 fn request_options(&mut self) -> &mut crate::RequestOptions {
2254 &mut self.0.options
2255 }
2256 }
2257
2258 #[derive(Clone, Debug)]
2276 pub struct DeleteExternalAddress(RequestBuilder<crate::model::DeleteExternalAddressRequest>);
2277
2278 impl DeleteExternalAddress {
2279 pub(crate) fn new(
2280 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2281 ) -> Self {
2282 Self(RequestBuilder::new(stub))
2283 }
2284
2285 pub fn with_request<V: Into<crate::model::DeleteExternalAddressRequest>>(
2287 mut self,
2288 v: V,
2289 ) -> Self {
2290 self.0.request = v.into();
2291 self
2292 }
2293
2294 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2296 self.0.options = v.into();
2297 self
2298 }
2299
2300 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2307 (*self.0.stub)
2308 .delete_external_address(self.0.request, self.0.options)
2309 .await
2310 .map(crate::Response::into_body)
2311 }
2312
2313 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2315 type Operation =
2316 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2317 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2318 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2319 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2320 if let Some(ref mut details) = poller_options.tracing {
2321 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::delete_external_address::until_done";
2322 }
2323
2324 let stub = self.0.stub.clone();
2325 let mut options = self.0.options.clone();
2326 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2327 let query = move |name| {
2328 let stub = stub.clone();
2329 let options = options.clone();
2330 async {
2331 let op = GetOperation::new(stub)
2332 .set_name(name)
2333 .with_options(options)
2334 .send()
2335 .await?;
2336 Ok(Operation::new(op))
2337 }
2338 };
2339
2340 let start = move || async {
2341 let op = self.send().await?;
2342 Ok(Operation::new(op))
2343 };
2344
2345 use google_cloud_lro::internal::PollerExt;
2346 {
2347 google_cloud_lro::internal::new_unit_response_poller(
2348 polling_error_policy,
2349 polling_backoff_policy,
2350 start,
2351 query,
2352 )
2353 }
2354 .with_options(poller_options)
2355 }
2356
2357 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2361 self.0.request.name = v.into();
2362 self
2363 }
2364
2365 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2367 self.0.request.request_id = v.into();
2368 self
2369 }
2370 }
2371
2372 #[doc(hidden)]
2373 impl crate::RequestBuilder for DeleteExternalAddress {
2374 fn request_options(&mut self) -> &mut crate::RequestOptions {
2375 &mut self.0.options
2376 }
2377 }
2378
2379 #[derive(Clone, Debug)]
2400 pub struct ListSubnets(RequestBuilder<crate::model::ListSubnetsRequest>);
2401
2402 impl ListSubnets {
2403 pub(crate) fn new(
2404 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2405 ) -> Self {
2406 Self(RequestBuilder::new(stub))
2407 }
2408
2409 pub fn with_request<V: Into<crate::model::ListSubnetsRequest>>(mut self, v: V) -> Self {
2411 self.0.request = v.into();
2412 self
2413 }
2414
2415 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2417 self.0.options = v.into();
2418 self
2419 }
2420
2421 pub async fn send(self) -> Result<crate::model::ListSubnetsResponse> {
2423 (*self.0.stub)
2424 .list_subnets(self.0.request, self.0.options)
2425 .await
2426 .map(crate::Response::into_body)
2427 }
2428
2429 pub fn by_page(
2431 self,
2432 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListSubnetsResponse, crate::Error>
2433 {
2434 use std::clone::Clone;
2435 let token = self.0.request.page_token.clone();
2436 let execute = move |token: String| {
2437 let mut builder = self.clone();
2438 builder.0.request = builder.0.request.set_page_token(token);
2439 builder.send()
2440 };
2441 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2442 }
2443
2444 pub fn by_item(
2446 self,
2447 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2448 crate::model::ListSubnetsResponse,
2449 crate::Error,
2450 > {
2451 use google_cloud_gax::paginator::Paginator;
2452 self.by_page().items()
2453 }
2454
2455 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2459 self.0.request.parent = v.into();
2460 self
2461 }
2462
2463 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2465 self.0.request.page_size = v.into();
2466 self
2467 }
2468
2469 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2471 self.0.request.page_token = v.into();
2472 self
2473 }
2474 }
2475
2476 #[doc(hidden)]
2477 impl crate::RequestBuilder for ListSubnets {
2478 fn request_options(&mut self) -> &mut crate::RequestOptions {
2479 &mut self.0.options
2480 }
2481 }
2482
2483 #[derive(Clone, Debug)]
2500 pub struct GetSubnet(RequestBuilder<crate::model::GetSubnetRequest>);
2501
2502 impl GetSubnet {
2503 pub(crate) fn new(
2504 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2505 ) -> Self {
2506 Self(RequestBuilder::new(stub))
2507 }
2508
2509 pub fn with_request<V: Into<crate::model::GetSubnetRequest>>(mut self, v: V) -> Self {
2511 self.0.request = v.into();
2512 self
2513 }
2514
2515 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2517 self.0.options = v.into();
2518 self
2519 }
2520
2521 pub async fn send(self) -> Result<crate::model::Subnet> {
2523 (*self.0.stub)
2524 .get_subnet(self.0.request, self.0.options)
2525 .await
2526 .map(crate::Response::into_body)
2527 }
2528
2529 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2533 self.0.request.name = v.into();
2534 self
2535 }
2536 }
2537
2538 #[doc(hidden)]
2539 impl crate::RequestBuilder for GetSubnet {
2540 fn request_options(&mut self) -> &mut crate::RequestOptions {
2541 &mut self.0.options
2542 }
2543 }
2544
2545 #[derive(Clone, Debug)]
2563 pub struct UpdateSubnet(RequestBuilder<crate::model::UpdateSubnetRequest>);
2564
2565 impl UpdateSubnet {
2566 pub(crate) fn new(
2567 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2568 ) -> Self {
2569 Self(RequestBuilder::new(stub))
2570 }
2571
2572 pub fn with_request<V: Into<crate::model::UpdateSubnetRequest>>(mut self, v: V) -> Self {
2574 self.0.request = v.into();
2575 self
2576 }
2577
2578 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2580 self.0.options = v.into();
2581 self
2582 }
2583
2584 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2591 (*self.0.stub)
2592 .update_subnet(self.0.request, self.0.options)
2593 .await
2594 .map(crate::Response::into_body)
2595 }
2596
2597 pub fn poller(
2599 self,
2600 ) -> impl google_cloud_lro::Poller<crate::model::Subnet, crate::model::OperationMetadata>
2601 {
2602 type Operation = google_cloud_lro::internal::Operation<
2603 crate::model::Subnet,
2604 crate::model::OperationMetadata,
2605 >;
2606 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2607 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2608 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2609 if let Some(ref mut details) = poller_options.tracing {
2610 details.method_name =
2611 "google_cloud_vmwareengine_v1::client::VmwareEngine::update_subnet::until_done";
2612 }
2613
2614 let stub = self.0.stub.clone();
2615 let mut options = self.0.options.clone();
2616 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2617 let query = move |name| {
2618 let stub = stub.clone();
2619 let options = options.clone();
2620 async {
2621 let op = GetOperation::new(stub)
2622 .set_name(name)
2623 .with_options(options)
2624 .send()
2625 .await?;
2626 Ok(Operation::new(op))
2627 }
2628 };
2629
2630 let start = move || async {
2631 let op = self.send().await?;
2632 Ok(Operation::new(op))
2633 };
2634
2635 use google_cloud_lro::internal::PollerExt;
2636 {
2637 google_cloud_lro::internal::new_poller(
2638 polling_error_policy,
2639 polling_backoff_policy,
2640 start,
2641 query,
2642 )
2643 }
2644 .with_options(poller_options)
2645 }
2646
2647 pub fn set_update_mask<T>(mut self, v: T) -> Self
2651 where
2652 T: std::convert::Into<wkt::FieldMask>,
2653 {
2654 self.0.request.update_mask = std::option::Option::Some(v.into());
2655 self
2656 }
2657
2658 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2662 where
2663 T: std::convert::Into<wkt::FieldMask>,
2664 {
2665 self.0.request.update_mask = v.map(|x| x.into());
2666 self
2667 }
2668
2669 pub fn set_subnet<T>(mut self, v: T) -> Self
2673 where
2674 T: std::convert::Into<crate::model::Subnet>,
2675 {
2676 self.0.request.subnet = std::option::Option::Some(v.into());
2677 self
2678 }
2679
2680 pub fn set_or_clear_subnet<T>(mut self, v: std::option::Option<T>) -> Self
2684 where
2685 T: std::convert::Into<crate::model::Subnet>,
2686 {
2687 self.0.request.subnet = v.map(|x| x.into());
2688 self
2689 }
2690 }
2691
2692 #[doc(hidden)]
2693 impl crate::RequestBuilder for UpdateSubnet {
2694 fn request_options(&mut self) -> &mut crate::RequestOptions {
2695 &mut self.0.options
2696 }
2697 }
2698
2699 #[derive(Clone, Debug)]
2720 pub struct ListExternalAccessRules(
2721 RequestBuilder<crate::model::ListExternalAccessRulesRequest>,
2722 );
2723
2724 impl ListExternalAccessRules {
2725 pub(crate) fn new(
2726 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2727 ) -> Self {
2728 Self(RequestBuilder::new(stub))
2729 }
2730
2731 pub fn with_request<V: Into<crate::model::ListExternalAccessRulesRequest>>(
2733 mut self,
2734 v: V,
2735 ) -> Self {
2736 self.0.request = v.into();
2737 self
2738 }
2739
2740 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2742 self.0.options = v.into();
2743 self
2744 }
2745
2746 pub async fn send(self) -> Result<crate::model::ListExternalAccessRulesResponse> {
2748 (*self.0.stub)
2749 .list_external_access_rules(self.0.request, self.0.options)
2750 .await
2751 .map(crate::Response::into_body)
2752 }
2753
2754 pub fn by_page(
2756 self,
2757 ) -> impl google_cloud_gax::paginator::Paginator<
2758 crate::model::ListExternalAccessRulesResponse,
2759 crate::Error,
2760 > {
2761 use std::clone::Clone;
2762 let token = self.0.request.page_token.clone();
2763 let execute = move |token: String| {
2764 let mut builder = self.clone();
2765 builder.0.request = builder.0.request.set_page_token(token);
2766 builder.send()
2767 };
2768 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2769 }
2770
2771 pub fn by_item(
2773 self,
2774 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2775 crate::model::ListExternalAccessRulesResponse,
2776 crate::Error,
2777 > {
2778 use google_cloud_gax::paginator::Paginator;
2779 self.by_page().items()
2780 }
2781
2782 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2786 self.0.request.parent = v.into();
2787 self
2788 }
2789
2790 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2792 self.0.request.page_size = v.into();
2793 self
2794 }
2795
2796 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2798 self.0.request.page_token = v.into();
2799 self
2800 }
2801
2802 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2804 self.0.request.filter = v.into();
2805 self
2806 }
2807
2808 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2810 self.0.request.order_by = v.into();
2811 self
2812 }
2813 }
2814
2815 #[doc(hidden)]
2816 impl crate::RequestBuilder for ListExternalAccessRules {
2817 fn request_options(&mut self) -> &mut crate::RequestOptions {
2818 &mut self.0.options
2819 }
2820 }
2821
2822 #[derive(Clone, Debug)]
2839 pub struct GetExternalAccessRule(RequestBuilder<crate::model::GetExternalAccessRuleRequest>);
2840
2841 impl GetExternalAccessRule {
2842 pub(crate) fn new(
2843 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2844 ) -> Self {
2845 Self(RequestBuilder::new(stub))
2846 }
2847
2848 pub fn with_request<V: Into<crate::model::GetExternalAccessRuleRequest>>(
2850 mut self,
2851 v: V,
2852 ) -> Self {
2853 self.0.request = v.into();
2854 self
2855 }
2856
2857 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2859 self.0.options = v.into();
2860 self
2861 }
2862
2863 pub async fn send(self) -> Result<crate::model::ExternalAccessRule> {
2865 (*self.0.stub)
2866 .get_external_access_rule(self.0.request, self.0.options)
2867 .await
2868 .map(crate::Response::into_body)
2869 }
2870
2871 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2875 self.0.request.name = v.into();
2876 self
2877 }
2878 }
2879
2880 #[doc(hidden)]
2881 impl crate::RequestBuilder for GetExternalAccessRule {
2882 fn request_options(&mut self) -> &mut crate::RequestOptions {
2883 &mut self.0.options
2884 }
2885 }
2886
2887 #[derive(Clone, Debug)]
2905 pub struct CreateExternalAccessRule(
2906 RequestBuilder<crate::model::CreateExternalAccessRuleRequest>,
2907 );
2908
2909 impl CreateExternalAccessRule {
2910 pub(crate) fn new(
2911 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2912 ) -> Self {
2913 Self(RequestBuilder::new(stub))
2914 }
2915
2916 pub fn with_request<V: Into<crate::model::CreateExternalAccessRuleRequest>>(
2918 mut self,
2919 v: V,
2920 ) -> Self {
2921 self.0.request = v.into();
2922 self
2923 }
2924
2925 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2927 self.0.options = v.into();
2928 self
2929 }
2930
2931 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2938 (*self.0.stub)
2939 .create_external_access_rule(self.0.request, self.0.options)
2940 .await
2941 .map(crate::Response::into_body)
2942 }
2943
2944 pub fn poller(
2946 self,
2947 ) -> impl google_cloud_lro::Poller<
2948 crate::model::ExternalAccessRule,
2949 crate::model::OperationMetadata,
2950 > {
2951 type Operation = google_cloud_lro::internal::Operation<
2952 crate::model::ExternalAccessRule,
2953 crate::model::OperationMetadata,
2954 >;
2955 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2956 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2957 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2958 if let Some(ref mut details) = poller_options.tracing {
2959 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::create_external_access_rule::until_done";
2960 }
2961
2962 let stub = self.0.stub.clone();
2963 let mut options = self.0.options.clone();
2964 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2965 let query = move |name| {
2966 let stub = stub.clone();
2967 let options = options.clone();
2968 async {
2969 let op = GetOperation::new(stub)
2970 .set_name(name)
2971 .with_options(options)
2972 .send()
2973 .await?;
2974 Ok(Operation::new(op))
2975 }
2976 };
2977
2978 let start = move || async {
2979 let op = self.send().await?;
2980 Ok(Operation::new(op))
2981 };
2982
2983 use google_cloud_lro::internal::PollerExt;
2984 {
2985 google_cloud_lro::internal::new_poller(
2986 polling_error_policy,
2987 polling_backoff_policy,
2988 start,
2989 query,
2990 )
2991 }
2992 .with_options(poller_options)
2993 }
2994
2995 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2999 self.0.request.parent = v.into();
3000 self
3001 }
3002
3003 pub fn set_external_access_rule<T>(mut self, v: T) -> Self
3007 where
3008 T: std::convert::Into<crate::model::ExternalAccessRule>,
3009 {
3010 self.0.request.external_access_rule = std::option::Option::Some(v.into());
3011 self
3012 }
3013
3014 pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
3018 where
3019 T: std::convert::Into<crate::model::ExternalAccessRule>,
3020 {
3021 self.0.request.external_access_rule = v.map(|x| x.into());
3022 self
3023 }
3024
3025 pub fn set_external_access_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3029 self.0.request.external_access_rule_id = v.into();
3030 self
3031 }
3032
3033 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3035 self.0.request.request_id = v.into();
3036 self
3037 }
3038 }
3039
3040 #[doc(hidden)]
3041 impl crate::RequestBuilder for CreateExternalAccessRule {
3042 fn request_options(&mut self) -> &mut crate::RequestOptions {
3043 &mut self.0.options
3044 }
3045 }
3046
3047 #[derive(Clone, Debug)]
3065 pub struct UpdateExternalAccessRule(
3066 RequestBuilder<crate::model::UpdateExternalAccessRuleRequest>,
3067 );
3068
3069 impl UpdateExternalAccessRule {
3070 pub(crate) fn new(
3071 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3072 ) -> Self {
3073 Self(RequestBuilder::new(stub))
3074 }
3075
3076 pub fn with_request<V: Into<crate::model::UpdateExternalAccessRuleRequest>>(
3078 mut self,
3079 v: V,
3080 ) -> Self {
3081 self.0.request = v.into();
3082 self
3083 }
3084
3085 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3087 self.0.options = v.into();
3088 self
3089 }
3090
3091 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3098 (*self.0.stub)
3099 .update_external_access_rule(self.0.request, self.0.options)
3100 .await
3101 .map(crate::Response::into_body)
3102 }
3103
3104 pub fn poller(
3106 self,
3107 ) -> impl google_cloud_lro::Poller<
3108 crate::model::ExternalAccessRule,
3109 crate::model::OperationMetadata,
3110 > {
3111 type Operation = google_cloud_lro::internal::Operation<
3112 crate::model::ExternalAccessRule,
3113 crate::model::OperationMetadata,
3114 >;
3115 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3116 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3117 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3118 if let Some(ref mut details) = poller_options.tracing {
3119 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::update_external_access_rule::until_done";
3120 }
3121
3122 let stub = self.0.stub.clone();
3123 let mut options = self.0.options.clone();
3124 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3125 let query = move |name| {
3126 let stub = stub.clone();
3127 let options = options.clone();
3128 async {
3129 let op = GetOperation::new(stub)
3130 .set_name(name)
3131 .with_options(options)
3132 .send()
3133 .await?;
3134 Ok(Operation::new(op))
3135 }
3136 };
3137
3138 let start = move || async {
3139 let op = self.send().await?;
3140 Ok(Operation::new(op))
3141 };
3142
3143 use google_cloud_lro::internal::PollerExt;
3144 {
3145 google_cloud_lro::internal::new_poller(
3146 polling_error_policy,
3147 polling_backoff_policy,
3148 start,
3149 query,
3150 )
3151 }
3152 .with_options(poller_options)
3153 }
3154
3155 pub fn set_update_mask<T>(mut self, v: T) -> Self
3159 where
3160 T: std::convert::Into<wkt::FieldMask>,
3161 {
3162 self.0.request.update_mask = std::option::Option::Some(v.into());
3163 self
3164 }
3165
3166 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3170 where
3171 T: std::convert::Into<wkt::FieldMask>,
3172 {
3173 self.0.request.update_mask = v.map(|x| x.into());
3174 self
3175 }
3176
3177 pub fn set_external_access_rule<T>(mut self, v: T) -> Self
3181 where
3182 T: std::convert::Into<crate::model::ExternalAccessRule>,
3183 {
3184 self.0.request.external_access_rule = std::option::Option::Some(v.into());
3185 self
3186 }
3187
3188 pub fn set_or_clear_external_access_rule<T>(mut self, v: std::option::Option<T>) -> Self
3192 where
3193 T: std::convert::Into<crate::model::ExternalAccessRule>,
3194 {
3195 self.0.request.external_access_rule = v.map(|x| x.into());
3196 self
3197 }
3198
3199 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3201 self.0.request.request_id = v.into();
3202 self
3203 }
3204 }
3205
3206 #[doc(hidden)]
3207 impl crate::RequestBuilder for UpdateExternalAccessRule {
3208 fn request_options(&mut self) -> &mut crate::RequestOptions {
3209 &mut self.0.options
3210 }
3211 }
3212
3213 #[derive(Clone, Debug)]
3231 pub struct DeleteExternalAccessRule(
3232 RequestBuilder<crate::model::DeleteExternalAccessRuleRequest>,
3233 );
3234
3235 impl DeleteExternalAccessRule {
3236 pub(crate) fn new(
3237 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3238 ) -> Self {
3239 Self(RequestBuilder::new(stub))
3240 }
3241
3242 pub fn with_request<V: Into<crate::model::DeleteExternalAccessRuleRequest>>(
3244 mut self,
3245 v: V,
3246 ) -> Self {
3247 self.0.request = v.into();
3248 self
3249 }
3250
3251 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3253 self.0.options = v.into();
3254 self
3255 }
3256
3257 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3264 (*self.0.stub)
3265 .delete_external_access_rule(self.0.request, self.0.options)
3266 .await
3267 .map(crate::Response::into_body)
3268 }
3269
3270 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3272 type Operation =
3273 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3274 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3275 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3276 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3277 if let Some(ref mut details) = poller_options.tracing {
3278 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::delete_external_access_rule::until_done";
3279 }
3280
3281 let stub = self.0.stub.clone();
3282 let mut options = self.0.options.clone();
3283 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3284 let query = move |name| {
3285 let stub = stub.clone();
3286 let options = options.clone();
3287 async {
3288 let op = GetOperation::new(stub)
3289 .set_name(name)
3290 .with_options(options)
3291 .send()
3292 .await?;
3293 Ok(Operation::new(op))
3294 }
3295 };
3296
3297 let start = move || async {
3298 let op = self.send().await?;
3299 Ok(Operation::new(op))
3300 };
3301
3302 use google_cloud_lro::internal::PollerExt;
3303 {
3304 google_cloud_lro::internal::new_unit_response_poller(
3305 polling_error_policy,
3306 polling_backoff_policy,
3307 start,
3308 query,
3309 )
3310 }
3311 .with_options(poller_options)
3312 }
3313
3314 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3318 self.0.request.name = v.into();
3319 self
3320 }
3321
3322 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3324 self.0.request.request_id = v.into();
3325 self
3326 }
3327 }
3328
3329 #[doc(hidden)]
3330 impl crate::RequestBuilder for DeleteExternalAccessRule {
3331 fn request_options(&mut self) -> &mut crate::RequestOptions {
3332 &mut self.0.options
3333 }
3334 }
3335
3336 #[derive(Clone, Debug)]
3357 pub struct ListLoggingServers(RequestBuilder<crate::model::ListLoggingServersRequest>);
3358
3359 impl ListLoggingServers {
3360 pub(crate) fn new(
3361 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3362 ) -> Self {
3363 Self(RequestBuilder::new(stub))
3364 }
3365
3366 pub fn with_request<V: Into<crate::model::ListLoggingServersRequest>>(
3368 mut self,
3369 v: V,
3370 ) -> Self {
3371 self.0.request = v.into();
3372 self
3373 }
3374
3375 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3377 self.0.options = v.into();
3378 self
3379 }
3380
3381 pub async fn send(self) -> Result<crate::model::ListLoggingServersResponse> {
3383 (*self.0.stub)
3384 .list_logging_servers(self.0.request, self.0.options)
3385 .await
3386 .map(crate::Response::into_body)
3387 }
3388
3389 pub fn by_page(
3391 self,
3392 ) -> impl google_cloud_gax::paginator::Paginator<
3393 crate::model::ListLoggingServersResponse,
3394 crate::Error,
3395 > {
3396 use std::clone::Clone;
3397 let token = self.0.request.page_token.clone();
3398 let execute = move |token: String| {
3399 let mut builder = self.clone();
3400 builder.0.request = builder.0.request.set_page_token(token);
3401 builder.send()
3402 };
3403 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3404 }
3405
3406 pub fn by_item(
3408 self,
3409 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3410 crate::model::ListLoggingServersResponse,
3411 crate::Error,
3412 > {
3413 use google_cloud_gax::paginator::Paginator;
3414 self.by_page().items()
3415 }
3416
3417 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3421 self.0.request.parent = v.into();
3422 self
3423 }
3424
3425 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3427 self.0.request.page_size = v.into();
3428 self
3429 }
3430
3431 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3433 self.0.request.page_token = v.into();
3434 self
3435 }
3436
3437 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3439 self.0.request.filter = v.into();
3440 self
3441 }
3442
3443 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3445 self.0.request.order_by = v.into();
3446 self
3447 }
3448 }
3449
3450 #[doc(hidden)]
3451 impl crate::RequestBuilder for ListLoggingServers {
3452 fn request_options(&mut self) -> &mut crate::RequestOptions {
3453 &mut self.0.options
3454 }
3455 }
3456
3457 #[derive(Clone, Debug)]
3474 pub struct GetLoggingServer(RequestBuilder<crate::model::GetLoggingServerRequest>);
3475
3476 impl GetLoggingServer {
3477 pub(crate) fn new(
3478 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3479 ) -> Self {
3480 Self(RequestBuilder::new(stub))
3481 }
3482
3483 pub fn with_request<V: Into<crate::model::GetLoggingServerRequest>>(
3485 mut self,
3486 v: V,
3487 ) -> Self {
3488 self.0.request = v.into();
3489 self
3490 }
3491
3492 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3494 self.0.options = v.into();
3495 self
3496 }
3497
3498 pub async fn send(self) -> Result<crate::model::LoggingServer> {
3500 (*self.0.stub)
3501 .get_logging_server(self.0.request, self.0.options)
3502 .await
3503 .map(crate::Response::into_body)
3504 }
3505
3506 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3510 self.0.request.name = v.into();
3511 self
3512 }
3513 }
3514
3515 #[doc(hidden)]
3516 impl crate::RequestBuilder for GetLoggingServer {
3517 fn request_options(&mut self) -> &mut crate::RequestOptions {
3518 &mut self.0.options
3519 }
3520 }
3521
3522 #[derive(Clone, Debug)]
3540 pub struct CreateLoggingServer(RequestBuilder<crate::model::CreateLoggingServerRequest>);
3541
3542 impl CreateLoggingServer {
3543 pub(crate) fn new(
3544 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3545 ) -> Self {
3546 Self(RequestBuilder::new(stub))
3547 }
3548
3549 pub fn with_request<V: Into<crate::model::CreateLoggingServerRequest>>(
3551 mut self,
3552 v: V,
3553 ) -> Self {
3554 self.0.request = v.into();
3555 self
3556 }
3557
3558 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3560 self.0.options = v.into();
3561 self
3562 }
3563
3564 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3571 (*self.0.stub)
3572 .create_logging_server(self.0.request, self.0.options)
3573 .await
3574 .map(crate::Response::into_body)
3575 }
3576
3577 pub fn poller(
3579 self,
3580 ) -> impl google_cloud_lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3581 {
3582 type Operation = google_cloud_lro::internal::Operation<
3583 crate::model::LoggingServer,
3584 crate::model::OperationMetadata,
3585 >;
3586 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3587 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3588 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3589 if let Some(ref mut details) = poller_options.tracing {
3590 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::create_logging_server::until_done";
3591 }
3592
3593 let stub = self.0.stub.clone();
3594 let mut options = self.0.options.clone();
3595 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3596 let query = move |name| {
3597 let stub = stub.clone();
3598 let options = options.clone();
3599 async {
3600 let op = GetOperation::new(stub)
3601 .set_name(name)
3602 .with_options(options)
3603 .send()
3604 .await?;
3605 Ok(Operation::new(op))
3606 }
3607 };
3608
3609 let start = move || async {
3610 let op = self.send().await?;
3611 Ok(Operation::new(op))
3612 };
3613
3614 use google_cloud_lro::internal::PollerExt;
3615 {
3616 google_cloud_lro::internal::new_poller(
3617 polling_error_policy,
3618 polling_backoff_policy,
3619 start,
3620 query,
3621 )
3622 }
3623 .with_options(poller_options)
3624 }
3625
3626 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3630 self.0.request.parent = v.into();
3631 self
3632 }
3633
3634 pub fn set_logging_server<T>(mut self, v: T) -> Self
3638 where
3639 T: std::convert::Into<crate::model::LoggingServer>,
3640 {
3641 self.0.request.logging_server = std::option::Option::Some(v.into());
3642 self
3643 }
3644
3645 pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3649 where
3650 T: std::convert::Into<crate::model::LoggingServer>,
3651 {
3652 self.0.request.logging_server = v.map(|x| x.into());
3653 self
3654 }
3655
3656 pub fn set_logging_server_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3660 self.0.request.logging_server_id = v.into();
3661 self
3662 }
3663
3664 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3666 self.0.request.request_id = v.into();
3667 self
3668 }
3669 }
3670
3671 #[doc(hidden)]
3672 impl crate::RequestBuilder for CreateLoggingServer {
3673 fn request_options(&mut self) -> &mut crate::RequestOptions {
3674 &mut self.0.options
3675 }
3676 }
3677
3678 #[derive(Clone, Debug)]
3696 pub struct UpdateLoggingServer(RequestBuilder<crate::model::UpdateLoggingServerRequest>);
3697
3698 impl UpdateLoggingServer {
3699 pub(crate) fn new(
3700 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3701 ) -> Self {
3702 Self(RequestBuilder::new(stub))
3703 }
3704
3705 pub fn with_request<V: Into<crate::model::UpdateLoggingServerRequest>>(
3707 mut self,
3708 v: V,
3709 ) -> Self {
3710 self.0.request = v.into();
3711 self
3712 }
3713
3714 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3716 self.0.options = v.into();
3717 self
3718 }
3719
3720 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3727 (*self.0.stub)
3728 .update_logging_server(self.0.request, self.0.options)
3729 .await
3730 .map(crate::Response::into_body)
3731 }
3732
3733 pub fn poller(
3735 self,
3736 ) -> impl google_cloud_lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3737 {
3738 type Operation = google_cloud_lro::internal::Operation<
3739 crate::model::LoggingServer,
3740 crate::model::OperationMetadata,
3741 >;
3742 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3743 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3744 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3745 if let Some(ref mut details) = poller_options.tracing {
3746 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::update_logging_server::until_done";
3747 }
3748
3749 let stub = self.0.stub.clone();
3750 let mut options = self.0.options.clone();
3751 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3752 let query = move |name| {
3753 let stub = stub.clone();
3754 let options = options.clone();
3755 async {
3756 let op = GetOperation::new(stub)
3757 .set_name(name)
3758 .with_options(options)
3759 .send()
3760 .await?;
3761 Ok(Operation::new(op))
3762 }
3763 };
3764
3765 let start = move || async {
3766 let op = self.send().await?;
3767 Ok(Operation::new(op))
3768 };
3769
3770 use google_cloud_lro::internal::PollerExt;
3771 {
3772 google_cloud_lro::internal::new_poller(
3773 polling_error_policy,
3774 polling_backoff_policy,
3775 start,
3776 query,
3777 )
3778 }
3779 .with_options(poller_options)
3780 }
3781
3782 pub fn set_update_mask<T>(mut self, v: T) -> Self
3786 where
3787 T: std::convert::Into<wkt::FieldMask>,
3788 {
3789 self.0.request.update_mask = std::option::Option::Some(v.into());
3790 self
3791 }
3792
3793 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3797 where
3798 T: std::convert::Into<wkt::FieldMask>,
3799 {
3800 self.0.request.update_mask = v.map(|x| x.into());
3801 self
3802 }
3803
3804 pub fn set_logging_server<T>(mut self, v: T) -> Self
3808 where
3809 T: std::convert::Into<crate::model::LoggingServer>,
3810 {
3811 self.0.request.logging_server = std::option::Option::Some(v.into());
3812 self
3813 }
3814
3815 pub fn set_or_clear_logging_server<T>(mut self, v: std::option::Option<T>) -> Self
3819 where
3820 T: std::convert::Into<crate::model::LoggingServer>,
3821 {
3822 self.0.request.logging_server = v.map(|x| x.into());
3823 self
3824 }
3825
3826 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3828 self.0.request.request_id = v.into();
3829 self
3830 }
3831 }
3832
3833 #[doc(hidden)]
3834 impl crate::RequestBuilder for UpdateLoggingServer {
3835 fn request_options(&mut self) -> &mut crate::RequestOptions {
3836 &mut self.0.options
3837 }
3838 }
3839
3840 #[derive(Clone, Debug)]
3858 pub struct DeleteLoggingServer(RequestBuilder<crate::model::DeleteLoggingServerRequest>);
3859
3860 impl DeleteLoggingServer {
3861 pub(crate) fn new(
3862 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3863 ) -> Self {
3864 Self(RequestBuilder::new(stub))
3865 }
3866
3867 pub fn with_request<V: Into<crate::model::DeleteLoggingServerRequest>>(
3869 mut self,
3870 v: V,
3871 ) -> Self {
3872 self.0.request = v.into();
3873 self
3874 }
3875
3876 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3878 self.0.options = v.into();
3879 self
3880 }
3881
3882 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3889 (*self.0.stub)
3890 .delete_logging_server(self.0.request, self.0.options)
3891 .await
3892 .map(crate::Response::into_body)
3893 }
3894
3895 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3897 type Operation =
3898 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3899 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3900 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3901 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3902 if let Some(ref mut details) = poller_options.tracing {
3903 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::delete_logging_server::until_done";
3904 }
3905
3906 let stub = self.0.stub.clone();
3907 let mut options = self.0.options.clone();
3908 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3909 let query = move |name| {
3910 let stub = stub.clone();
3911 let options = options.clone();
3912 async {
3913 let op = GetOperation::new(stub)
3914 .set_name(name)
3915 .with_options(options)
3916 .send()
3917 .await?;
3918 Ok(Operation::new(op))
3919 }
3920 };
3921
3922 let start = move || async {
3923 let op = self.send().await?;
3924 Ok(Operation::new(op))
3925 };
3926
3927 use google_cloud_lro::internal::PollerExt;
3928 {
3929 google_cloud_lro::internal::new_unit_response_poller(
3930 polling_error_policy,
3931 polling_backoff_policy,
3932 start,
3933 query,
3934 )
3935 }
3936 .with_options(poller_options)
3937 }
3938
3939 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3943 self.0.request.name = v.into();
3944 self
3945 }
3946
3947 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3949 self.0.request.request_id = v.into();
3950 self
3951 }
3952 }
3953
3954 #[doc(hidden)]
3955 impl crate::RequestBuilder for DeleteLoggingServer {
3956 fn request_options(&mut self) -> &mut crate::RequestOptions {
3957 &mut self.0.options
3958 }
3959 }
3960
3961 #[derive(Clone, Debug)]
3982 pub struct ListNodeTypes(RequestBuilder<crate::model::ListNodeTypesRequest>);
3983
3984 impl ListNodeTypes {
3985 pub(crate) fn new(
3986 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3987 ) -> Self {
3988 Self(RequestBuilder::new(stub))
3989 }
3990
3991 pub fn with_request<V: Into<crate::model::ListNodeTypesRequest>>(mut self, v: V) -> Self {
3993 self.0.request = v.into();
3994 self
3995 }
3996
3997 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3999 self.0.options = v.into();
4000 self
4001 }
4002
4003 pub async fn send(self) -> Result<crate::model::ListNodeTypesResponse> {
4005 (*self.0.stub)
4006 .list_node_types(self.0.request, self.0.options)
4007 .await
4008 .map(crate::Response::into_body)
4009 }
4010
4011 pub fn by_page(
4013 self,
4014 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListNodeTypesResponse, crate::Error>
4015 {
4016 use std::clone::Clone;
4017 let token = self.0.request.page_token.clone();
4018 let execute = move |token: String| {
4019 let mut builder = self.clone();
4020 builder.0.request = builder.0.request.set_page_token(token);
4021 builder.send()
4022 };
4023 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4024 }
4025
4026 pub fn by_item(
4028 self,
4029 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4030 crate::model::ListNodeTypesResponse,
4031 crate::Error,
4032 > {
4033 use google_cloud_gax::paginator::Paginator;
4034 self.by_page().items()
4035 }
4036
4037 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4041 self.0.request.parent = v.into();
4042 self
4043 }
4044
4045 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4047 self.0.request.page_size = v.into();
4048 self
4049 }
4050
4051 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4053 self.0.request.page_token = v.into();
4054 self
4055 }
4056
4057 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4059 self.0.request.filter = v.into();
4060 self
4061 }
4062 }
4063
4064 #[doc(hidden)]
4065 impl crate::RequestBuilder for ListNodeTypes {
4066 fn request_options(&mut self) -> &mut crate::RequestOptions {
4067 &mut self.0.options
4068 }
4069 }
4070
4071 #[derive(Clone, Debug)]
4088 pub struct GetNodeType(RequestBuilder<crate::model::GetNodeTypeRequest>);
4089
4090 impl GetNodeType {
4091 pub(crate) fn new(
4092 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4093 ) -> Self {
4094 Self(RequestBuilder::new(stub))
4095 }
4096
4097 pub fn with_request<V: Into<crate::model::GetNodeTypeRequest>>(mut self, v: V) -> Self {
4099 self.0.request = v.into();
4100 self
4101 }
4102
4103 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4105 self.0.options = v.into();
4106 self
4107 }
4108
4109 pub async fn send(self) -> Result<crate::model::NodeType> {
4111 (*self.0.stub)
4112 .get_node_type(self.0.request, self.0.options)
4113 .await
4114 .map(crate::Response::into_body)
4115 }
4116
4117 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4121 self.0.request.name = v.into();
4122 self
4123 }
4124 }
4125
4126 #[doc(hidden)]
4127 impl crate::RequestBuilder for GetNodeType {
4128 fn request_options(&mut self) -> &mut crate::RequestOptions {
4129 &mut self.0.options
4130 }
4131 }
4132
4133 #[derive(Clone, Debug)]
4150 pub struct ShowNsxCredentials(RequestBuilder<crate::model::ShowNsxCredentialsRequest>);
4151
4152 impl ShowNsxCredentials {
4153 pub(crate) fn new(
4154 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4155 ) -> Self {
4156 Self(RequestBuilder::new(stub))
4157 }
4158
4159 pub fn with_request<V: Into<crate::model::ShowNsxCredentialsRequest>>(
4161 mut self,
4162 v: V,
4163 ) -> Self {
4164 self.0.request = v.into();
4165 self
4166 }
4167
4168 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4170 self.0.options = v.into();
4171 self
4172 }
4173
4174 pub async fn send(self) -> Result<crate::model::Credentials> {
4176 (*self.0.stub)
4177 .show_nsx_credentials(self.0.request, self.0.options)
4178 .await
4179 .map(crate::Response::into_body)
4180 }
4181
4182 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4186 self.0.request.private_cloud = v.into();
4187 self
4188 }
4189 }
4190
4191 #[doc(hidden)]
4192 impl crate::RequestBuilder for ShowNsxCredentials {
4193 fn request_options(&mut self) -> &mut crate::RequestOptions {
4194 &mut self.0.options
4195 }
4196 }
4197
4198 #[derive(Clone, Debug)]
4215 pub struct ShowVcenterCredentials(RequestBuilder<crate::model::ShowVcenterCredentialsRequest>);
4216
4217 impl ShowVcenterCredentials {
4218 pub(crate) fn new(
4219 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4220 ) -> Self {
4221 Self(RequestBuilder::new(stub))
4222 }
4223
4224 pub fn with_request<V: Into<crate::model::ShowVcenterCredentialsRequest>>(
4226 mut self,
4227 v: V,
4228 ) -> Self {
4229 self.0.request = v.into();
4230 self
4231 }
4232
4233 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4235 self.0.options = v.into();
4236 self
4237 }
4238
4239 pub async fn send(self) -> Result<crate::model::Credentials> {
4241 (*self.0.stub)
4242 .show_vcenter_credentials(self.0.request, self.0.options)
4243 .await
4244 .map(crate::Response::into_body)
4245 }
4246
4247 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4251 self.0.request.private_cloud = v.into();
4252 self
4253 }
4254
4255 pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
4257 self.0.request.username = v.into();
4258 self
4259 }
4260 }
4261
4262 #[doc(hidden)]
4263 impl crate::RequestBuilder for ShowVcenterCredentials {
4264 fn request_options(&mut self) -> &mut crate::RequestOptions {
4265 &mut self.0.options
4266 }
4267 }
4268
4269 #[derive(Clone, Debug)]
4287 pub struct ResetNsxCredentials(RequestBuilder<crate::model::ResetNsxCredentialsRequest>);
4288
4289 impl ResetNsxCredentials {
4290 pub(crate) fn new(
4291 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4292 ) -> Self {
4293 Self(RequestBuilder::new(stub))
4294 }
4295
4296 pub fn with_request<V: Into<crate::model::ResetNsxCredentialsRequest>>(
4298 mut self,
4299 v: V,
4300 ) -> Self {
4301 self.0.request = v.into();
4302 self
4303 }
4304
4305 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4307 self.0.options = v.into();
4308 self
4309 }
4310
4311 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4318 (*self.0.stub)
4319 .reset_nsx_credentials(self.0.request, self.0.options)
4320 .await
4321 .map(crate::Response::into_body)
4322 }
4323
4324 pub fn poller(
4326 self,
4327 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
4328 {
4329 type Operation = google_cloud_lro::internal::Operation<
4330 crate::model::PrivateCloud,
4331 crate::model::OperationMetadata,
4332 >;
4333 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4334 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4335 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4336 if let Some(ref mut details) = poller_options.tracing {
4337 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::reset_nsx_credentials::until_done";
4338 }
4339
4340 let stub = self.0.stub.clone();
4341 let mut options = self.0.options.clone();
4342 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4343 let query = move |name| {
4344 let stub = stub.clone();
4345 let options = options.clone();
4346 async {
4347 let op = GetOperation::new(stub)
4348 .set_name(name)
4349 .with_options(options)
4350 .send()
4351 .await?;
4352 Ok(Operation::new(op))
4353 }
4354 };
4355
4356 let start = move || async {
4357 let op = self.send().await?;
4358 Ok(Operation::new(op))
4359 };
4360
4361 use google_cloud_lro::internal::PollerExt;
4362 {
4363 google_cloud_lro::internal::new_poller(
4364 polling_error_policy,
4365 polling_backoff_policy,
4366 start,
4367 query,
4368 )
4369 }
4370 .with_options(poller_options)
4371 }
4372
4373 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4377 self.0.request.private_cloud = v.into();
4378 self
4379 }
4380
4381 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4383 self.0.request.request_id = v.into();
4384 self
4385 }
4386 }
4387
4388 #[doc(hidden)]
4389 impl crate::RequestBuilder for ResetNsxCredentials {
4390 fn request_options(&mut self) -> &mut crate::RequestOptions {
4391 &mut self.0.options
4392 }
4393 }
4394
4395 #[derive(Clone, Debug)]
4413 pub struct ResetVcenterCredentials(
4414 RequestBuilder<crate::model::ResetVcenterCredentialsRequest>,
4415 );
4416
4417 impl ResetVcenterCredentials {
4418 pub(crate) fn new(
4419 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4420 ) -> Self {
4421 Self(RequestBuilder::new(stub))
4422 }
4423
4424 pub fn with_request<V: Into<crate::model::ResetVcenterCredentialsRequest>>(
4426 mut self,
4427 v: V,
4428 ) -> Self {
4429 self.0.request = v.into();
4430 self
4431 }
4432
4433 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4435 self.0.options = v.into();
4436 self
4437 }
4438
4439 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4446 (*self.0.stub)
4447 .reset_vcenter_credentials(self.0.request, self.0.options)
4448 .await
4449 .map(crate::Response::into_body)
4450 }
4451
4452 pub fn poller(
4454 self,
4455 ) -> impl google_cloud_lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata>
4456 {
4457 type Operation = google_cloud_lro::internal::Operation<
4458 crate::model::PrivateCloud,
4459 crate::model::OperationMetadata,
4460 >;
4461 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4462 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4463 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4464 if let Some(ref mut details) = poller_options.tracing {
4465 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::reset_vcenter_credentials::until_done";
4466 }
4467
4468 let stub = self.0.stub.clone();
4469 let mut options = self.0.options.clone();
4470 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4471 let query = move |name| {
4472 let stub = stub.clone();
4473 let options = options.clone();
4474 async {
4475 let op = GetOperation::new(stub)
4476 .set_name(name)
4477 .with_options(options)
4478 .send()
4479 .await?;
4480 Ok(Operation::new(op))
4481 }
4482 };
4483
4484 let start = move || async {
4485 let op = self.send().await?;
4486 Ok(Operation::new(op))
4487 };
4488
4489 use google_cloud_lro::internal::PollerExt;
4490 {
4491 google_cloud_lro::internal::new_poller(
4492 polling_error_policy,
4493 polling_backoff_policy,
4494 start,
4495 query,
4496 )
4497 }
4498 .with_options(poller_options)
4499 }
4500
4501 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4505 self.0.request.private_cloud = v.into();
4506 self
4507 }
4508
4509 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4511 self.0.request.request_id = v.into();
4512 self
4513 }
4514
4515 pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
4517 self.0.request.username = v.into();
4518 self
4519 }
4520 }
4521
4522 #[doc(hidden)]
4523 impl crate::RequestBuilder for ResetVcenterCredentials {
4524 fn request_options(&mut self) -> &mut crate::RequestOptions {
4525 &mut self.0.options
4526 }
4527 }
4528
4529 #[derive(Clone, Debug)]
4546 pub struct GetDnsForwarding(RequestBuilder<crate::model::GetDnsForwardingRequest>);
4547
4548 impl GetDnsForwarding {
4549 pub(crate) fn new(
4550 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4551 ) -> Self {
4552 Self(RequestBuilder::new(stub))
4553 }
4554
4555 pub fn with_request<V: Into<crate::model::GetDnsForwardingRequest>>(
4557 mut self,
4558 v: V,
4559 ) -> Self {
4560 self.0.request = v.into();
4561 self
4562 }
4563
4564 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4566 self.0.options = v.into();
4567 self
4568 }
4569
4570 pub async fn send(self) -> Result<crate::model::DnsForwarding> {
4572 (*self.0.stub)
4573 .get_dns_forwarding(self.0.request, self.0.options)
4574 .await
4575 .map(crate::Response::into_body)
4576 }
4577
4578 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4582 self.0.request.name = v.into();
4583 self
4584 }
4585 }
4586
4587 #[doc(hidden)]
4588 impl crate::RequestBuilder for GetDnsForwarding {
4589 fn request_options(&mut self) -> &mut crate::RequestOptions {
4590 &mut self.0.options
4591 }
4592 }
4593
4594 #[derive(Clone, Debug)]
4612 pub struct UpdateDnsForwarding(RequestBuilder<crate::model::UpdateDnsForwardingRequest>);
4613
4614 impl UpdateDnsForwarding {
4615 pub(crate) fn new(
4616 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4617 ) -> Self {
4618 Self(RequestBuilder::new(stub))
4619 }
4620
4621 pub fn with_request<V: Into<crate::model::UpdateDnsForwardingRequest>>(
4623 mut self,
4624 v: V,
4625 ) -> Self {
4626 self.0.request = v.into();
4627 self
4628 }
4629
4630 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4632 self.0.options = v.into();
4633 self
4634 }
4635
4636 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4643 (*self.0.stub)
4644 .update_dns_forwarding(self.0.request, self.0.options)
4645 .await
4646 .map(crate::Response::into_body)
4647 }
4648
4649 pub fn poller(
4651 self,
4652 ) -> impl google_cloud_lro::Poller<crate::model::DnsForwarding, crate::model::OperationMetadata>
4653 {
4654 type Operation = google_cloud_lro::internal::Operation<
4655 crate::model::DnsForwarding,
4656 crate::model::OperationMetadata,
4657 >;
4658 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4659 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4660 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4661 if let Some(ref mut details) = poller_options.tracing {
4662 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::update_dns_forwarding::until_done";
4663 }
4664
4665 let stub = self.0.stub.clone();
4666 let mut options = self.0.options.clone();
4667 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4668 let query = move |name| {
4669 let stub = stub.clone();
4670 let options = options.clone();
4671 async {
4672 let op = GetOperation::new(stub)
4673 .set_name(name)
4674 .with_options(options)
4675 .send()
4676 .await?;
4677 Ok(Operation::new(op))
4678 }
4679 };
4680
4681 let start = move || async {
4682 let op = self.send().await?;
4683 Ok(Operation::new(op))
4684 };
4685
4686 use google_cloud_lro::internal::PollerExt;
4687 {
4688 google_cloud_lro::internal::new_poller(
4689 polling_error_policy,
4690 polling_backoff_policy,
4691 start,
4692 query,
4693 )
4694 }
4695 .with_options(poller_options)
4696 }
4697
4698 pub fn set_dns_forwarding<T>(mut self, v: T) -> Self
4702 where
4703 T: std::convert::Into<crate::model::DnsForwarding>,
4704 {
4705 self.0.request.dns_forwarding = std::option::Option::Some(v.into());
4706 self
4707 }
4708
4709 pub fn set_or_clear_dns_forwarding<T>(mut self, v: std::option::Option<T>) -> Self
4713 where
4714 T: std::convert::Into<crate::model::DnsForwarding>,
4715 {
4716 self.0.request.dns_forwarding = v.map(|x| x.into());
4717 self
4718 }
4719
4720 pub fn set_update_mask<T>(mut self, v: T) -> Self
4724 where
4725 T: std::convert::Into<wkt::FieldMask>,
4726 {
4727 self.0.request.update_mask = std::option::Option::Some(v.into());
4728 self
4729 }
4730
4731 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4735 where
4736 T: std::convert::Into<wkt::FieldMask>,
4737 {
4738 self.0.request.update_mask = v.map(|x| x.into());
4739 self
4740 }
4741
4742 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4744 self.0.request.request_id = v.into();
4745 self
4746 }
4747 }
4748
4749 #[doc(hidden)]
4750 impl crate::RequestBuilder for UpdateDnsForwarding {
4751 fn request_options(&mut self) -> &mut crate::RequestOptions {
4752 &mut self.0.options
4753 }
4754 }
4755
4756 #[derive(Clone, Debug)]
4773 pub struct GetNetworkPeering(RequestBuilder<crate::model::GetNetworkPeeringRequest>);
4774
4775 impl GetNetworkPeering {
4776 pub(crate) fn new(
4777 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4778 ) -> Self {
4779 Self(RequestBuilder::new(stub))
4780 }
4781
4782 pub fn with_request<V: Into<crate::model::GetNetworkPeeringRequest>>(
4784 mut self,
4785 v: V,
4786 ) -> Self {
4787 self.0.request = v.into();
4788 self
4789 }
4790
4791 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4793 self.0.options = v.into();
4794 self
4795 }
4796
4797 pub async fn send(self) -> Result<crate::model::NetworkPeering> {
4799 (*self.0.stub)
4800 .get_network_peering(self.0.request, self.0.options)
4801 .await
4802 .map(crate::Response::into_body)
4803 }
4804
4805 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4809 self.0.request.name = v.into();
4810 self
4811 }
4812 }
4813
4814 #[doc(hidden)]
4815 impl crate::RequestBuilder for GetNetworkPeering {
4816 fn request_options(&mut self) -> &mut crate::RequestOptions {
4817 &mut self.0.options
4818 }
4819 }
4820
4821 #[derive(Clone, Debug)]
4842 pub struct ListNetworkPeerings(RequestBuilder<crate::model::ListNetworkPeeringsRequest>);
4843
4844 impl ListNetworkPeerings {
4845 pub(crate) fn new(
4846 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4847 ) -> Self {
4848 Self(RequestBuilder::new(stub))
4849 }
4850
4851 pub fn with_request<V: Into<crate::model::ListNetworkPeeringsRequest>>(
4853 mut self,
4854 v: V,
4855 ) -> Self {
4856 self.0.request = v.into();
4857 self
4858 }
4859
4860 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4862 self.0.options = v.into();
4863 self
4864 }
4865
4866 pub async fn send(self) -> Result<crate::model::ListNetworkPeeringsResponse> {
4868 (*self.0.stub)
4869 .list_network_peerings(self.0.request, self.0.options)
4870 .await
4871 .map(crate::Response::into_body)
4872 }
4873
4874 pub fn by_page(
4876 self,
4877 ) -> impl google_cloud_gax::paginator::Paginator<
4878 crate::model::ListNetworkPeeringsResponse,
4879 crate::Error,
4880 > {
4881 use std::clone::Clone;
4882 let token = self.0.request.page_token.clone();
4883 let execute = move |token: String| {
4884 let mut builder = self.clone();
4885 builder.0.request = builder.0.request.set_page_token(token);
4886 builder.send()
4887 };
4888 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4889 }
4890
4891 pub fn by_item(
4893 self,
4894 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4895 crate::model::ListNetworkPeeringsResponse,
4896 crate::Error,
4897 > {
4898 use google_cloud_gax::paginator::Paginator;
4899 self.by_page().items()
4900 }
4901
4902 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4906 self.0.request.parent = v.into();
4907 self
4908 }
4909
4910 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4912 self.0.request.page_size = v.into();
4913 self
4914 }
4915
4916 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4918 self.0.request.page_token = v.into();
4919 self
4920 }
4921
4922 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4924 self.0.request.filter = v.into();
4925 self
4926 }
4927
4928 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4930 self.0.request.order_by = v.into();
4931 self
4932 }
4933 }
4934
4935 #[doc(hidden)]
4936 impl crate::RequestBuilder for ListNetworkPeerings {
4937 fn request_options(&mut self) -> &mut crate::RequestOptions {
4938 &mut self.0.options
4939 }
4940 }
4941
4942 #[derive(Clone, Debug)]
4960 pub struct CreateNetworkPeering(RequestBuilder<crate::model::CreateNetworkPeeringRequest>);
4961
4962 impl CreateNetworkPeering {
4963 pub(crate) fn new(
4964 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4965 ) -> Self {
4966 Self(RequestBuilder::new(stub))
4967 }
4968
4969 pub fn with_request<V: Into<crate::model::CreateNetworkPeeringRequest>>(
4971 mut self,
4972 v: V,
4973 ) -> Self {
4974 self.0.request = v.into();
4975 self
4976 }
4977
4978 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4980 self.0.options = v.into();
4981 self
4982 }
4983
4984 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4991 (*self.0.stub)
4992 .create_network_peering(self.0.request, self.0.options)
4993 .await
4994 .map(crate::Response::into_body)
4995 }
4996
4997 pub fn poller(
4999 self,
5000 ) -> impl google_cloud_lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
5001 {
5002 type Operation = google_cloud_lro::internal::Operation<
5003 crate::model::NetworkPeering,
5004 crate::model::OperationMetadata,
5005 >;
5006 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5007 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5008 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5009 if let Some(ref mut details) = poller_options.tracing {
5010 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::create_network_peering::until_done";
5011 }
5012
5013 let stub = self.0.stub.clone();
5014 let mut options = self.0.options.clone();
5015 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5016 let query = move |name| {
5017 let stub = stub.clone();
5018 let options = options.clone();
5019 async {
5020 let op = GetOperation::new(stub)
5021 .set_name(name)
5022 .with_options(options)
5023 .send()
5024 .await?;
5025 Ok(Operation::new(op))
5026 }
5027 };
5028
5029 let start = move || async {
5030 let op = self.send().await?;
5031 Ok(Operation::new(op))
5032 };
5033
5034 use google_cloud_lro::internal::PollerExt;
5035 {
5036 google_cloud_lro::internal::new_poller(
5037 polling_error_policy,
5038 polling_backoff_policy,
5039 start,
5040 query,
5041 )
5042 }
5043 .with_options(poller_options)
5044 }
5045
5046 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5050 self.0.request.parent = v.into();
5051 self
5052 }
5053
5054 pub fn set_network_peering_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5058 self.0.request.network_peering_id = v.into();
5059 self
5060 }
5061
5062 pub fn set_network_peering<T>(mut self, v: T) -> Self
5066 where
5067 T: std::convert::Into<crate::model::NetworkPeering>,
5068 {
5069 self.0.request.network_peering = std::option::Option::Some(v.into());
5070 self
5071 }
5072
5073 pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
5077 where
5078 T: std::convert::Into<crate::model::NetworkPeering>,
5079 {
5080 self.0.request.network_peering = v.map(|x| x.into());
5081 self
5082 }
5083
5084 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5086 self.0.request.request_id = v.into();
5087 self
5088 }
5089 }
5090
5091 #[doc(hidden)]
5092 impl crate::RequestBuilder for CreateNetworkPeering {
5093 fn request_options(&mut self) -> &mut crate::RequestOptions {
5094 &mut self.0.options
5095 }
5096 }
5097
5098 #[derive(Clone, Debug)]
5116 pub struct DeleteNetworkPeering(RequestBuilder<crate::model::DeleteNetworkPeeringRequest>);
5117
5118 impl DeleteNetworkPeering {
5119 pub(crate) fn new(
5120 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5121 ) -> Self {
5122 Self(RequestBuilder::new(stub))
5123 }
5124
5125 pub fn with_request<V: Into<crate::model::DeleteNetworkPeeringRequest>>(
5127 mut self,
5128 v: V,
5129 ) -> Self {
5130 self.0.request = v.into();
5131 self
5132 }
5133
5134 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5136 self.0.options = v.into();
5137 self
5138 }
5139
5140 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5147 (*self.0.stub)
5148 .delete_network_peering(self.0.request, self.0.options)
5149 .await
5150 .map(crate::Response::into_body)
5151 }
5152
5153 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5155 type Operation =
5156 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5157 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5158 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5159 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5160 if let Some(ref mut details) = poller_options.tracing {
5161 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::delete_network_peering::until_done";
5162 }
5163
5164 let stub = self.0.stub.clone();
5165 let mut options = self.0.options.clone();
5166 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5167 let query = move |name| {
5168 let stub = stub.clone();
5169 let options = options.clone();
5170 async {
5171 let op = GetOperation::new(stub)
5172 .set_name(name)
5173 .with_options(options)
5174 .send()
5175 .await?;
5176 Ok(Operation::new(op))
5177 }
5178 };
5179
5180 let start = move || async {
5181 let op = self.send().await?;
5182 Ok(Operation::new(op))
5183 };
5184
5185 use google_cloud_lro::internal::PollerExt;
5186 {
5187 google_cloud_lro::internal::new_unit_response_poller(
5188 polling_error_policy,
5189 polling_backoff_policy,
5190 start,
5191 query,
5192 )
5193 }
5194 .with_options(poller_options)
5195 }
5196
5197 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5201 self.0.request.name = v.into();
5202 self
5203 }
5204
5205 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5207 self.0.request.request_id = v.into();
5208 self
5209 }
5210 }
5211
5212 #[doc(hidden)]
5213 impl crate::RequestBuilder for DeleteNetworkPeering {
5214 fn request_options(&mut self) -> &mut crate::RequestOptions {
5215 &mut self.0.options
5216 }
5217 }
5218
5219 #[derive(Clone, Debug)]
5237 pub struct UpdateNetworkPeering(RequestBuilder<crate::model::UpdateNetworkPeeringRequest>);
5238
5239 impl UpdateNetworkPeering {
5240 pub(crate) fn new(
5241 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5242 ) -> Self {
5243 Self(RequestBuilder::new(stub))
5244 }
5245
5246 pub fn with_request<V: Into<crate::model::UpdateNetworkPeeringRequest>>(
5248 mut self,
5249 v: V,
5250 ) -> Self {
5251 self.0.request = v.into();
5252 self
5253 }
5254
5255 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5257 self.0.options = v.into();
5258 self
5259 }
5260
5261 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5268 (*self.0.stub)
5269 .update_network_peering(self.0.request, self.0.options)
5270 .await
5271 .map(crate::Response::into_body)
5272 }
5273
5274 pub fn poller(
5276 self,
5277 ) -> impl google_cloud_lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
5278 {
5279 type Operation = google_cloud_lro::internal::Operation<
5280 crate::model::NetworkPeering,
5281 crate::model::OperationMetadata,
5282 >;
5283 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5284 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5285 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5286 if let Some(ref mut details) = poller_options.tracing {
5287 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::update_network_peering::until_done";
5288 }
5289
5290 let stub = self.0.stub.clone();
5291 let mut options = self.0.options.clone();
5292 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5293 let query = move |name| {
5294 let stub = stub.clone();
5295 let options = options.clone();
5296 async {
5297 let op = GetOperation::new(stub)
5298 .set_name(name)
5299 .with_options(options)
5300 .send()
5301 .await?;
5302 Ok(Operation::new(op))
5303 }
5304 };
5305
5306 let start = move || async {
5307 let op = self.send().await?;
5308 Ok(Operation::new(op))
5309 };
5310
5311 use google_cloud_lro::internal::PollerExt;
5312 {
5313 google_cloud_lro::internal::new_poller(
5314 polling_error_policy,
5315 polling_backoff_policy,
5316 start,
5317 query,
5318 )
5319 }
5320 .with_options(poller_options)
5321 }
5322
5323 pub fn set_network_peering<T>(mut self, v: T) -> Self
5327 where
5328 T: std::convert::Into<crate::model::NetworkPeering>,
5329 {
5330 self.0.request.network_peering = std::option::Option::Some(v.into());
5331 self
5332 }
5333
5334 pub fn set_or_clear_network_peering<T>(mut self, v: std::option::Option<T>) -> Self
5338 where
5339 T: std::convert::Into<crate::model::NetworkPeering>,
5340 {
5341 self.0.request.network_peering = v.map(|x| x.into());
5342 self
5343 }
5344
5345 pub fn set_update_mask<T>(mut self, v: T) -> Self
5349 where
5350 T: std::convert::Into<wkt::FieldMask>,
5351 {
5352 self.0.request.update_mask = std::option::Option::Some(v.into());
5353 self
5354 }
5355
5356 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5360 where
5361 T: std::convert::Into<wkt::FieldMask>,
5362 {
5363 self.0.request.update_mask = v.map(|x| x.into());
5364 self
5365 }
5366
5367 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5369 self.0.request.request_id = v.into();
5370 self
5371 }
5372 }
5373
5374 #[doc(hidden)]
5375 impl crate::RequestBuilder for UpdateNetworkPeering {
5376 fn request_options(&mut self) -> &mut crate::RequestOptions {
5377 &mut self.0.options
5378 }
5379 }
5380
5381 #[derive(Clone, Debug)]
5402 pub struct ListPeeringRoutes(RequestBuilder<crate::model::ListPeeringRoutesRequest>);
5403
5404 impl ListPeeringRoutes {
5405 pub(crate) fn new(
5406 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5407 ) -> Self {
5408 Self(RequestBuilder::new(stub))
5409 }
5410
5411 pub fn with_request<V: Into<crate::model::ListPeeringRoutesRequest>>(
5413 mut self,
5414 v: V,
5415 ) -> Self {
5416 self.0.request = v.into();
5417 self
5418 }
5419
5420 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5422 self.0.options = v.into();
5423 self
5424 }
5425
5426 pub async fn send(self) -> Result<crate::model::ListPeeringRoutesResponse> {
5428 (*self.0.stub)
5429 .list_peering_routes(self.0.request, self.0.options)
5430 .await
5431 .map(crate::Response::into_body)
5432 }
5433
5434 pub fn by_page(
5436 self,
5437 ) -> impl google_cloud_gax::paginator::Paginator<
5438 crate::model::ListPeeringRoutesResponse,
5439 crate::Error,
5440 > {
5441 use std::clone::Clone;
5442 let token = self.0.request.page_token.clone();
5443 let execute = move |token: String| {
5444 let mut builder = self.clone();
5445 builder.0.request = builder.0.request.set_page_token(token);
5446 builder.send()
5447 };
5448 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5449 }
5450
5451 pub fn by_item(
5453 self,
5454 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5455 crate::model::ListPeeringRoutesResponse,
5456 crate::Error,
5457 > {
5458 use google_cloud_gax::paginator::Paginator;
5459 self.by_page().items()
5460 }
5461
5462 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5466 self.0.request.parent = v.into();
5467 self
5468 }
5469
5470 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5472 self.0.request.page_size = v.into();
5473 self
5474 }
5475
5476 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5478 self.0.request.page_token = v.into();
5479 self
5480 }
5481
5482 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5484 self.0.request.filter = v.into();
5485 self
5486 }
5487 }
5488
5489 #[doc(hidden)]
5490 impl crate::RequestBuilder for ListPeeringRoutes {
5491 fn request_options(&mut self) -> &mut crate::RequestOptions {
5492 &mut self.0.options
5493 }
5494 }
5495
5496 #[derive(Clone, Debug)]
5514 pub struct CreateHcxActivationKey(RequestBuilder<crate::model::CreateHcxActivationKeyRequest>);
5515
5516 impl CreateHcxActivationKey {
5517 pub(crate) fn new(
5518 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5519 ) -> Self {
5520 Self(RequestBuilder::new(stub))
5521 }
5522
5523 pub fn with_request<V: Into<crate::model::CreateHcxActivationKeyRequest>>(
5525 mut self,
5526 v: V,
5527 ) -> Self {
5528 self.0.request = v.into();
5529 self
5530 }
5531
5532 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5534 self.0.options = v.into();
5535 self
5536 }
5537
5538 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5545 (*self.0.stub)
5546 .create_hcx_activation_key(self.0.request, self.0.options)
5547 .await
5548 .map(crate::Response::into_body)
5549 }
5550
5551 pub fn poller(
5553 self,
5554 ) -> impl google_cloud_lro::Poller<crate::model::HcxActivationKey, crate::model::OperationMetadata>
5555 {
5556 type Operation = google_cloud_lro::internal::Operation<
5557 crate::model::HcxActivationKey,
5558 crate::model::OperationMetadata,
5559 >;
5560 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5561 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5562 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5563 if let Some(ref mut details) = poller_options.tracing {
5564 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::create_hcx_activation_key::until_done";
5565 }
5566
5567 let stub = self.0.stub.clone();
5568 let mut options = self.0.options.clone();
5569 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5570 let query = move |name| {
5571 let stub = stub.clone();
5572 let options = options.clone();
5573 async {
5574 let op = GetOperation::new(stub)
5575 .set_name(name)
5576 .with_options(options)
5577 .send()
5578 .await?;
5579 Ok(Operation::new(op))
5580 }
5581 };
5582
5583 let start = move || async {
5584 let op = self.send().await?;
5585 Ok(Operation::new(op))
5586 };
5587
5588 use google_cloud_lro::internal::PollerExt;
5589 {
5590 google_cloud_lro::internal::new_poller(
5591 polling_error_policy,
5592 polling_backoff_policy,
5593 start,
5594 query,
5595 )
5596 }
5597 .with_options(poller_options)
5598 }
5599
5600 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5604 self.0.request.parent = v.into();
5605 self
5606 }
5607
5608 pub fn set_hcx_activation_key<T>(mut self, v: T) -> Self
5612 where
5613 T: std::convert::Into<crate::model::HcxActivationKey>,
5614 {
5615 self.0.request.hcx_activation_key = std::option::Option::Some(v.into());
5616 self
5617 }
5618
5619 pub fn set_or_clear_hcx_activation_key<T>(mut self, v: std::option::Option<T>) -> Self
5623 where
5624 T: std::convert::Into<crate::model::HcxActivationKey>,
5625 {
5626 self.0.request.hcx_activation_key = v.map(|x| x.into());
5627 self
5628 }
5629
5630 pub fn set_hcx_activation_key_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5634 self.0.request.hcx_activation_key_id = v.into();
5635 self
5636 }
5637
5638 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5640 self.0.request.request_id = v.into();
5641 self
5642 }
5643 }
5644
5645 #[doc(hidden)]
5646 impl crate::RequestBuilder for CreateHcxActivationKey {
5647 fn request_options(&mut self) -> &mut crate::RequestOptions {
5648 &mut self.0.options
5649 }
5650 }
5651
5652 #[derive(Clone, Debug)]
5673 pub struct ListHcxActivationKeys(RequestBuilder<crate::model::ListHcxActivationKeysRequest>);
5674
5675 impl ListHcxActivationKeys {
5676 pub(crate) fn new(
5677 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5678 ) -> Self {
5679 Self(RequestBuilder::new(stub))
5680 }
5681
5682 pub fn with_request<V: Into<crate::model::ListHcxActivationKeysRequest>>(
5684 mut self,
5685 v: V,
5686 ) -> Self {
5687 self.0.request = v.into();
5688 self
5689 }
5690
5691 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5693 self.0.options = v.into();
5694 self
5695 }
5696
5697 pub async fn send(self) -> Result<crate::model::ListHcxActivationKeysResponse> {
5699 (*self.0.stub)
5700 .list_hcx_activation_keys(self.0.request, self.0.options)
5701 .await
5702 .map(crate::Response::into_body)
5703 }
5704
5705 pub fn by_page(
5707 self,
5708 ) -> impl google_cloud_gax::paginator::Paginator<
5709 crate::model::ListHcxActivationKeysResponse,
5710 crate::Error,
5711 > {
5712 use std::clone::Clone;
5713 let token = self.0.request.page_token.clone();
5714 let execute = move |token: String| {
5715 let mut builder = self.clone();
5716 builder.0.request = builder.0.request.set_page_token(token);
5717 builder.send()
5718 };
5719 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5720 }
5721
5722 pub fn by_item(
5724 self,
5725 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5726 crate::model::ListHcxActivationKeysResponse,
5727 crate::Error,
5728 > {
5729 use google_cloud_gax::paginator::Paginator;
5730 self.by_page().items()
5731 }
5732
5733 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5737 self.0.request.parent = v.into();
5738 self
5739 }
5740
5741 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5743 self.0.request.page_size = v.into();
5744 self
5745 }
5746
5747 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5749 self.0.request.page_token = v.into();
5750 self
5751 }
5752 }
5753
5754 #[doc(hidden)]
5755 impl crate::RequestBuilder for ListHcxActivationKeys {
5756 fn request_options(&mut self) -> &mut crate::RequestOptions {
5757 &mut self.0.options
5758 }
5759 }
5760
5761 #[derive(Clone, Debug)]
5778 pub struct GetHcxActivationKey(RequestBuilder<crate::model::GetHcxActivationKeyRequest>);
5779
5780 impl GetHcxActivationKey {
5781 pub(crate) fn new(
5782 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5783 ) -> Self {
5784 Self(RequestBuilder::new(stub))
5785 }
5786
5787 pub fn with_request<V: Into<crate::model::GetHcxActivationKeyRequest>>(
5789 mut self,
5790 v: V,
5791 ) -> Self {
5792 self.0.request = v.into();
5793 self
5794 }
5795
5796 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5798 self.0.options = v.into();
5799 self
5800 }
5801
5802 pub async fn send(self) -> Result<crate::model::HcxActivationKey> {
5804 (*self.0.stub)
5805 .get_hcx_activation_key(self.0.request, self.0.options)
5806 .await
5807 .map(crate::Response::into_body)
5808 }
5809
5810 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5814 self.0.request.name = v.into();
5815 self
5816 }
5817 }
5818
5819 #[doc(hidden)]
5820 impl crate::RequestBuilder for GetHcxActivationKey {
5821 fn request_options(&mut self) -> &mut crate::RequestOptions {
5822 &mut self.0.options
5823 }
5824 }
5825
5826 #[derive(Clone, Debug)]
5843 pub struct GetNetworkPolicy(RequestBuilder<crate::model::GetNetworkPolicyRequest>);
5844
5845 impl GetNetworkPolicy {
5846 pub(crate) fn new(
5847 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5848 ) -> Self {
5849 Self(RequestBuilder::new(stub))
5850 }
5851
5852 pub fn with_request<V: Into<crate::model::GetNetworkPolicyRequest>>(
5854 mut self,
5855 v: V,
5856 ) -> Self {
5857 self.0.request = v.into();
5858 self
5859 }
5860
5861 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5863 self.0.options = v.into();
5864 self
5865 }
5866
5867 pub async fn send(self) -> Result<crate::model::NetworkPolicy> {
5869 (*self.0.stub)
5870 .get_network_policy(self.0.request, self.0.options)
5871 .await
5872 .map(crate::Response::into_body)
5873 }
5874
5875 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5879 self.0.request.name = v.into();
5880 self
5881 }
5882 }
5883
5884 #[doc(hidden)]
5885 impl crate::RequestBuilder for GetNetworkPolicy {
5886 fn request_options(&mut self) -> &mut crate::RequestOptions {
5887 &mut self.0.options
5888 }
5889 }
5890
5891 #[derive(Clone, Debug)]
5912 pub struct ListNetworkPolicies(RequestBuilder<crate::model::ListNetworkPoliciesRequest>);
5913
5914 impl ListNetworkPolicies {
5915 pub(crate) fn new(
5916 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5917 ) -> Self {
5918 Self(RequestBuilder::new(stub))
5919 }
5920
5921 pub fn with_request<V: Into<crate::model::ListNetworkPoliciesRequest>>(
5923 mut self,
5924 v: V,
5925 ) -> Self {
5926 self.0.request = v.into();
5927 self
5928 }
5929
5930 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5932 self.0.options = v.into();
5933 self
5934 }
5935
5936 pub async fn send(self) -> Result<crate::model::ListNetworkPoliciesResponse> {
5938 (*self.0.stub)
5939 .list_network_policies(self.0.request, self.0.options)
5940 .await
5941 .map(crate::Response::into_body)
5942 }
5943
5944 pub fn by_page(
5946 self,
5947 ) -> impl google_cloud_gax::paginator::Paginator<
5948 crate::model::ListNetworkPoliciesResponse,
5949 crate::Error,
5950 > {
5951 use std::clone::Clone;
5952 let token = self.0.request.page_token.clone();
5953 let execute = move |token: String| {
5954 let mut builder = self.clone();
5955 builder.0.request = builder.0.request.set_page_token(token);
5956 builder.send()
5957 };
5958 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5959 }
5960
5961 pub fn by_item(
5963 self,
5964 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5965 crate::model::ListNetworkPoliciesResponse,
5966 crate::Error,
5967 > {
5968 use google_cloud_gax::paginator::Paginator;
5969 self.by_page().items()
5970 }
5971
5972 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5976 self.0.request.parent = v.into();
5977 self
5978 }
5979
5980 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5982 self.0.request.page_size = v.into();
5983 self
5984 }
5985
5986 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5988 self.0.request.page_token = v.into();
5989 self
5990 }
5991
5992 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5994 self.0.request.filter = v.into();
5995 self
5996 }
5997
5998 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6000 self.0.request.order_by = v.into();
6001 self
6002 }
6003 }
6004
6005 #[doc(hidden)]
6006 impl crate::RequestBuilder for ListNetworkPolicies {
6007 fn request_options(&mut self) -> &mut crate::RequestOptions {
6008 &mut self.0.options
6009 }
6010 }
6011
6012 #[derive(Clone, Debug)]
6030 pub struct CreateNetworkPolicy(RequestBuilder<crate::model::CreateNetworkPolicyRequest>);
6031
6032 impl CreateNetworkPolicy {
6033 pub(crate) fn new(
6034 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6035 ) -> Self {
6036 Self(RequestBuilder::new(stub))
6037 }
6038
6039 pub fn with_request<V: Into<crate::model::CreateNetworkPolicyRequest>>(
6041 mut self,
6042 v: V,
6043 ) -> Self {
6044 self.0.request = v.into();
6045 self
6046 }
6047
6048 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6050 self.0.options = v.into();
6051 self
6052 }
6053
6054 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6061 (*self.0.stub)
6062 .create_network_policy(self.0.request, self.0.options)
6063 .await
6064 .map(crate::Response::into_body)
6065 }
6066
6067 pub fn poller(
6069 self,
6070 ) -> impl google_cloud_lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
6071 {
6072 type Operation = google_cloud_lro::internal::Operation<
6073 crate::model::NetworkPolicy,
6074 crate::model::OperationMetadata,
6075 >;
6076 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6077 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6078 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6079 if let Some(ref mut details) = poller_options.tracing {
6080 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::create_network_policy::until_done";
6081 }
6082
6083 let stub = self.0.stub.clone();
6084 let mut options = self.0.options.clone();
6085 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6086 let query = move |name| {
6087 let stub = stub.clone();
6088 let options = options.clone();
6089 async {
6090 let op = GetOperation::new(stub)
6091 .set_name(name)
6092 .with_options(options)
6093 .send()
6094 .await?;
6095 Ok(Operation::new(op))
6096 }
6097 };
6098
6099 let start = move || async {
6100 let op = self.send().await?;
6101 Ok(Operation::new(op))
6102 };
6103
6104 use google_cloud_lro::internal::PollerExt;
6105 {
6106 google_cloud_lro::internal::new_poller(
6107 polling_error_policy,
6108 polling_backoff_policy,
6109 start,
6110 query,
6111 )
6112 }
6113 .with_options(poller_options)
6114 }
6115
6116 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6120 self.0.request.parent = v.into();
6121 self
6122 }
6123
6124 pub fn set_network_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6128 self.0.request.network_policy_id = v.into();
6129 self
6130 }
6131
6132 pub fn set_network_policy<T>(mut self, v: T) -> Self
6136 where
6137 T: std::convert::Into<crate::model::NetworkPolicy>,
6138 {
6139 self.0.request.network_policy = std::option::Option::Some(v.into());
6140 self
6141 }
6142
6143 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
6147 where
6148 T: std::convert::Into<crate::model::NetworkPolicy>,
6149 {
6150 self.0.request.network_policy = v.map(|x| x.into());
6151 self
6152 }
6153
6154 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6156 self.0.request.request_id = v.into();
6157 self
6158 }
6159 }
6160
6161 #[doc(hidden)]
6162 impl crate::RequestBuilder for CreateNetworkPolicy {
6163 fn request_options(&mut self) -> &mut crate::RequestOptions {
6164 &mut self.0.options
6165 }
6166 }
6167
6168 #[derive(Clone, Debug)]
6186 pub struct UpdateNetworkPolicy(RequestBuilder<crate::model::UpdateNetworkPolicyRequest>);
6187
6188 impl UpdateNetworkPolicy {
6189 pub(crate) fn new(
6190 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6191 ) -> Self {
6192 Self(RequestBuilder::new(stub))
6193 }
6194
6195 pub fn with_request<V: Into<crate::model::UpdateNetworkPolicyRequest>>(
6197 mut self,
6198 v: V,
6199 ) -> Self {
6200 self.0.request = v.into();
6201 self
6202 }
6203
6204 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6206 self.0.options = v.into();
6207 self
6208 }
6209
6210 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6217 (*self.0.stub)
6218 .update_network_policy(self.0.request, self.0.options)
6219 .await
6220 .map(crate::Response::into_body)
6221 }
6222
6223 pub fn poller(
6225 self,
6226 ) -> impl google_cloud_lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
6227 {
6228 type Operation = google_cloud_lro::internal::Operation<
6229 crate::model::NetworkPolicy,
6230 crate::model::OperationMetadata,
6231 >;
6232 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6233 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6234 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6235 if let Some(ref mut details) = poller_options.tracing {
6236 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::update_network_policy::until_done";
6237 }
6238
6239 let stub = self.0.stub.clone();
6240 let mut options = self.0.options.clone();
6241 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6242 let query = move |name| {
6243 let stub = stub.clone();
6244 let options = options.clone();
6245 async {
6246 let op = GetOperation::new(stub)
6247 .set_name(name)
6248 .with_options(options)
6249 .send()
6250 .await?;
6251 Ok(Operation::new(op))
6252 }
6253 };
6254
6255 let start = move || async {
6256 let op = self.send().await?;
6257 Ok(Operation::new(op))
6258 };
6259
6260 use google_cloud_lro::internal::PollerExt;
6261 {
6262 google_cloud_lro::internal::new_poller(
6263 polling_error_policy,
6264 polling_backoff_policy,
6265 start,
6266 query,
6267 )
6268 }
6269 .with_options(poller_options)
6270 }
6271
6272 pub fn set_network_policy<T>(mut self, v: T) -> Self
6276 where
6277 T: std::convert::Into<crate::model::NetworkPolicy>,
6278 {
6279 self.0.request.network_policy = std::option::Option::Some(v.into());
6280 self
6281 }
6282
6283 pub fn set_or_clear_network_policy<T>(mut self, v: std::option::Option<T>) -> Self
6287 where
6288 T: std::convert::Into<crate::model::NetworkPolicy>,
6289 {
6290 self.0.request.network_policy = v.map(|x| x.into());
6291 self
6292 }
6293
6294 pub fn set_update_mask<T>(mut self, v: T) -> Self
6298 where
6299 T: std::convert::Into<wkt::FieldMask>,
6300 {
6301 self.0.request.update_mask = std::option::Option::Some(v.into());
6302 self
6303 }
6304
6305 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6309 where
6310 T: std::convert::Into<wkt::FieldMask>,
6311 {
6312 self.0.request.update_mask = v.map(|x| x.into());
6313 self
6314 }
6315
6316 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6318 self.0.request.request_id = v.into();
6319 self
6320 }
6321 }
6322
6323 #[doc(hidden)]
6324 impl crate::RequestBuilder for UpdateNetworkPolicy {
6325 fn request_options(&mut self) -> &mut crate::RequestOptions {
6326 &mut self.0.options
6327 }
6328 }
6329
6330 #[derive(Clone, Debug)]
6348 pub struct DeleteNetworkPolicy(RequestBuilder<crate::model::DeleteNetworkPolicyRequest>);
6349
6350 impl DeleteNetworkPolicy {
6351 pub(crate) fn new(
6352 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6353 ) -> Self {
6354 Self(RequestBuilder::new(stub))
6355 }
6356
6357 pub fn with_request<V: Into<crate::model::DeleteNetworkPolicyRequest>>(
6359 mut self,
6360 v: V,
6361 ) -> Self {
6362 self.0.request = v.into();
6363 self
6364 }
6365
6366 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6368 self.0.options = v.into();
6369 self
6370 }
6371
6372 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6379 (*self.0.stub)
6380 .delete_network_policy(self.0.request, self.0.options)
6381 .await
6382 .map(crate::Response::into_body)
6383 }
6384
6385 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6387 type Operation =
6388 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6389 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6390 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6391 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6392 if let Some(ref mut details) = poller_options.tracing {
6393 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::delete_network_policy::until_done";
6394 }
6395
6396 let stub = self.0.stub.clone();
6397 let mut options = self.0.options.clone();
6398 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6399 let query = move |name| {
6400 let stub = stub.clone();
6401 let options = options.clone();
6402 async {
6403 let op = GetOperation::new(stub)
6404 .set_name(name)
6405 .with_options(options)
6406 .send()
6407 .await?;
6408 Ok(Operation::new(op))
6409 }
6410 };
6411
6412 let start = move || async {
6413 let op = self.send().await?;
6414 Ok(Operation::new(op))
6415 };
6416
6417 use google_cloud_lro::internal::PollerExt;
6418 {
6419 google_cloud_lro::internal::new_unit_response_poller(
6420 polling_error_policy,
6421 polling_backoff_policy,
6422 start,
6423 query,
6424 )
6425 }
6426 .with_options(poller_options)
6427 }
6428
6429 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6433 self.0.request.name = v.into();
6434 self
6435 }
6436
6437 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6439 self.0.request.request_id = v.into();
6440 self
6441 }
6442 }
6443
6444 #[doc(hidden)]
6445 impl crate::RequestBuilder for DeleteNetworkPolicy {
6446 fn request_options(&mut self) -> &mut crate::RequestOptions {
6447 &mut self.0.options
6448 }
6449 }
6450
6451 #[derive(Clone, Debug)]
6472 pub struct ListManagementDnsZoneBindings(
6473 RequestBuilder<crate::model::ListManagementDnsZoneBindingsRequest>,
6474 );
6475
6476 impl ListManagementDnsZoneBindings {
6477 pub(crate) fn new(
6478 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6479 ) -> Self {
6480 Self(RequestBuilder::new(stub))
6481 }
6482
6483 pub fn with_request<V: Into<crate::model::ListManagementDnsZoneBindingsRequest>>(
6485 mut self,
6486 v: V,
6487 ) -> Self {
6488 self.0.request = v.into();
6489 self
6490 }
6491
6492 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6494 self.0.options = v.into();
6495 self
6496 }
6497
6498 pub async fn send(self) -> Result<crate::model::ListManagementDnsZoneBindingsResponse> {
6500 (*self.0.stub)
6501 .list_management_dns_zone_bindings(self.0.request, self.0.options)
6502 .await
6503 .map(crate::Response::into_body)
6504 }
6505
6506 pub fn by_page(
6508 self,
6509 ) -> impl google_cloud_gax::paginator::Paginator<
6510 crate::model::ListManagementDnsZoneBindingsResponse,
6511 crate::Error,
6512 > {
6513 use std::clone::Clone;
6514 let token = self.0.request.page_token.clone();
6515 let execute = move |token: String| {
6516 let mut builder = self.clone();
6517 builder.0.request = builder.0.request.set_page_token(token);
6518 builder.send()
6519 };
6520 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6521 }
6522
6523 pub fn by_item(
6525 self,
6526 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6527 crate::model::ListManagementDnsZoneBindingsResponse,
6528 crate::Error,
6529 > {
6530 use google_cloud_gax::paginator::Paginator;
6531 self.by_page().items()
6532 }
6533
6534 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6538 self.0.request.parent = v.into();
6539 self
6540 }
6541
6542 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6544 self.0.request.page_size = v.into();
6545 self
6546 }
6547
6548 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6550 self.0.request.page_token = v.into();
6551 self
6552 }
6553
6554 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6556 self.0.request.filter = v.into();
6557 self
6558 }
6559
6560 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6562 self.0.request.order_by = v.into();
6563 self
6564 }
6565 }
6566
6567 #[doc(hidden)]
6568 impl crate::RequestBuilder for ListManagementDnsZoneBindings {
6569 fn request_options(&mut self) -> &mut crate::RequestOptions {
6570 &mut self.0.options
6571 }
6572 }
6573
6574 #[derive(Clone, Debug)]
6591 pub struct GetManagementDnsZoneBinding(
6592 RequestBuilder<crate::model::GetManagementDnsZoneBindingRequest>,
6593 );
6594
6595 impl GetManagementDnsZoneBinding {
6596 pub(crate) fn new(
6597 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6598 ) -> Self {
6599 Self(RequestBuilder::new(stub))
6600 }
6601
6602 pub fn with_request<V: Into<crate::model::GetManagementDnsZoneBindingRequest>>(
6604 mut self,
6605 v: V,
6606 ) -> Self {
6607 self.0.request = v.into();
6608 self
6609 }
6610
6611 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6613 self.0.options = v.into();
6614 self
6615 }
6616
6617 pub async fn send(self) -> Result<crate::model::ManagementDnsZoneBinding> {
6619 (*self.0.stub)
6620 .get_management_dns_zone_binding(self.0.request, self.0.options)
6621 .await
6622 .map(crate::Response::into_body)
6623 }
6624
6625 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6629 self.0.request.name = v.into();
6630 self
6631 }
6632 }
6633
6634 #[doc(hidden)]
6635 impl crate::RequestBuilder for GetManagementDnsZoneBinding {
6636 fn request_options(&mut self) -> &mut crate::RequestOptions {
6637 &mut self.0.options
6638 }
6639 }
6640
6641 #[derive(Clone, Debug)]
6659 pub struct CreateManagementDnsZoneBinding(
6660 RequestBuilder<crate::model::CreateManagementDnsZoneBindingRequest>,
6661 );
6662
6663 impl CreateManagementDnsZoneBinding {
6664 pub(crate) fn new(
6665 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6666 ) -> Self {
6667 Self(RequestBuilder::new(stub))
6668 }
6669
6670 pub fn with_request<V: Into<crate::model::CreateManagementDnsZoneBindingRequest>>(
6672 mut self,
6673 v: V,
6674 ) -> Self {
6675 self.0.request = v.into();
6676 self
6677 }
6678
6679 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6681 self.0.options = v.into();
6682 self
6683 }
6684
6685 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6692 (*self.0.stub)
6693 .create_management_dns_zone_binding(self.0.request, self.0.options)
6694 .await
6695 .map(crate::Response::into_body)
6696 }
6697
6698 pub fn poller(
6700 self,
6701 ) -> impl google_cloud_lro::Poller<
6702 crate::model::ManagementDnsZoneBinding,
6703 crate::model::OperationMetadata,
6704 > {
6705 type Operation = google_cloud_lro::internal::Operation<
6706 crate::model::ManagementDnsZoneBinding,
6707 crate::model::OperationMetadata,
6708 >;
6709 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6710 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6711 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6712 if let Some(ref mut details) = poller_options.tracing {
6713 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::create_management_dns_zone_binding::until_done";
6714 }
6715
6716 let stub = self.0.stub.clone();
6717 let mut options = self.0.options.clone();
6718 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6719 let query = move |name| {
6720 let stub = stub.clone();
6721 let options = options.clone();
6722 async {
6723 let op = GetOperation::new(stub)
6724 .set_name(name)
6725 .with_options(options)
6726 .send()
6727 .await?;
6728 Ok(Operation::new(op))
6729 }
6730 };
6731
6732 let start = move || async {
6733 let op = self.send().await?;
6734 Ok(Operation::new(op))
6735 };
6736
6737 use google_cloud_lro::internal::PollerExt;
6738 {
6739 google_cloud_lro::internal::new_poller(
6740 polling_error_policy,
6741 polling_backoff_policy,
6742 start,
6743 query,
6744 )
6745 }
6746 .with_options(poller_options)
6747 }
6748
6749 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6753 self.0.request.parent = v.into();
6754 self
6755 }
6756
6757 pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6761 where
6762 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6763 {
6764 self.0.request.management_dns_zone_binding = std::option::Option::Some(v.into());
6765 self
6766 }
6767
6768 pub fn set_or_clear_management_dns_zone_binding<T>(
6772 mut self,
6773 v: std::option::Option<T>,
6774 ) -> Self
6775 where
6776 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6777 {
6778 self.0.request.management_dns_zone_binding = v.map(|x| x.into());
6779 self
6780 }
6781
6782 pub fn set_management_dns_zone_binding_id<T: Into<std::string::String>>(
6786 mut self,
6787 v: T,
6788 ) -> Self {
6789 self.0.request.management_dns_zone_binding_id = v.into();
6790 self
6791 }
6792
6793 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6795 self.0.request.request_id = v.into();
6796 self
6797 }
6798 }
6799
6800 #[doc(hidden)]
6801 impl crate::RequestBuilder for CreateManagementDnsZoneBinding {
6802 fn request_options(&mut self) -> &mut crate::RequestOptions {
6803 &mut self.0.options
6804 }
6805 }
6806
6807 #[derive(Clone, Debug)]
6825 pub struct UpdateManagementDnsZoneBinding(
6826 RequestBuilder<crate::model::UpdateManagementDnsZoneBindingRequest>,
6827 );
6828
6829 impl UpdateManagementDnsZoneBinding {
6830 pub(crate) fn new(
6831 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6832 ) -> Self {
6833 Self(RequestBuilder::new(stub))
6834 }
6835
6836 pub fn with_request<V: Into<crate::model::UpdateManagementDnsZoneBindingRequest>>(
6838 mut self,
6839 v: V,
6840 ) -> Self {
6841 self.0.request = v.into();
6842 self
6843 }
6844
6845 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6847 self.0.options = v.into();
6848 self
6849 }
6850
6851 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6858 (*self.0.stub)
6859 .update_management_dns_zone_binding(self.0.request, self.0.options)
6860 .await
6861 .map(crate::Response::into_body)
6862 }
6863
6864 pub fn poller(
6866 self,
6867 ) -> impl google_cloud_lro::Poller<
6868 crate::model::ManagementDnsZoneBinding,
6869 crate::model::OperationMetadata,
6870 > {
6871 type Operation = google_cloud_lro::internal::Operation<
6872 crate::model::ManagementDnsZoneBinding,
6873 crate::model::OperationMetadata,
6874 >;
6875 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6876 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6877 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6878 if let Some(ref mut details) = poller_options.tracing {
6879 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::update_management_dns_zone_binding::until_done";
6880 }
6881
6882 let stub = self.0.stub.clone();
6883 let mut options = self.0.options.clone();
6884 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6885 let query = move |name| {
6886 let stub = stub.clone();
6887 let options = options.clone();
6888 async {
6889 let op = GetOperation::new(stub)
6890 .set_name(name)
6891 .with_options(options)
6892 .send()
6893 .await?;
6894 Ok(Operation::new(op))
6895 }
6896 };
6897
6898 let start = move || async {
6899 let op = self.send().await?;
6900 Ok(Operation::new(op))
6901 };
6902
6903 use google_cloud_lro::internal::PollerExt;
6904 {
6905 google_cloud_lro::internal::new_poller(
6906 polling_error_policy,
6907 polling_backoff_policy,
6908 start,
6909 query,
6910 )
6911 }
6912 .with_options(poller_options)
6913 }
6914
6915 pub fn set_update_mask<T>(mut self, v: T) -> Self
6919 where
6920 T: std::convert::Into<wkt::FieldMask>,
6921 {
6922 self.0.request.update_mask = std::option::Option::Some(v.into());
6923 self
6924 }
6925
6926 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6930 where
6931 T: std::convert::Into<wkt::FieldMask>,
6932 {
6933 self.0.request.update_mask = v.map(|x| x.into());
6934 self
6935 }
6936
6937 pub fn set_management_dns_zone_binding<T>(mut self, v: T) -> Self
6941 where
6942 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6943 {
6944 self.0.request.management_dns_zone_binding = std::option::Option::Some(v.into());
6945 self
6946 }
6947
6948 pub fn set_or_clear_management_dns_zone_binding<T>(
6952 mut self,
6953 v: std::option::Option<T>,
6954 ) -> Self
6955 where
6956 T: std::convert::Into<crate::model::ManagementDnsZoneBinding>,
6957 {
6958 self.0.request.management_dns_zone_binding = v.map(|x| x.into());
6959 self
6960 }
6961
6962 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6964 self.0.request.request_id = v.into();
6965 self
6966 }
6967 }
6968
6969 #[doc(hidden)]
6970 impl crate::RequestBuilder for UpdateManagementDnsZoneBinding {
6971 fn request_options(&mut self) -> &mut crate::RequestOptions {
6972 &mut self.0.options
6973 }
6974 }
6975
6976 #[derive(Clone, Debug)]
6994 pub struct DeleteManagementDnsZoneBinding(
6995 RequestBuilder<crate::model::DeleteManagementDnsZoneBindingRequest>,
6996 );
6997
6998 impl DeleteManagementDnsZoneBinding {
6999 pub(crate) fn new(
7000 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7001 ) -> Self {
7002 Self(RequestBuilder::new(stub))
7003 }
7004
7005 pub fn with_request<V: Into<crate::model::DeleteManagementDnsZoneBindingRequest>>(
7007 mut self,
7008 v: V,
7009 ) -> Self {
7010 self.0.request = v.into();
7011 self
7012 }
7013
7014 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7016 self.0.options = v.into();
7017 self
7018 }
7019
7020 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7027 (*self.0.stub)
7028 .delete_management_dns_zone_binding(self.0.request, self.0.options)
7029 .await
7030 .map(crate::Response::into_body)
7031 }
7032
7033 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7035 type Operation =
7036 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7037 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7038 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7039 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7040 if let Some(ref mut details) = poller_options.tracing {
7041 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::delete_management_dns_zone_binding::until_done";
7042 }
7043
7044 let stub = self.0.stub.clone();
7045 let mut options = self.0.options.clone();
7046 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7047 let query = move |name| {
7048 let stub = stub.clone();
7049 let options = options.clone();
7050 async {
7051 let op = GetOperation::new(stub)
7052 .set_name(name)
7053 .with_options(options)
7054 .send()
7055 .await?;
7056 Ok(Operation::new(op))
7057 }
7058 };
7059
7060 let start = move || async {
7061 let op = self.send().await?;
7062 Ok(Operation::new(op))
7063 };
7064
7065 use google_cloud_lro::internal::PollerExt;
7066 {
7067 google_cloud_lro::internal::new_unit_response_poller(
7068 polling_error_policy,
7069 polling_backoff_policy,
7070 start,
7071 query,
7072 )
7073 }
7074 .with_options(poller_options)
7075 }
7076
7077 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7081 self.0.request.name = v.into();
7082 self
7083 }
7084
7085 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7087 self.0.request.request_id = v.into();
7088 self
7089 }
7090 }
7091
7092 #[doc(hidden)]
7093 impl crate::RequestBuilder for DeleteManagementDnsZoneBinding {
7094 fn request_options(&mut self) -> &mut crate::RequestOptions {
7095 &mut self.0.options
7096 }
7097 }
7098
7099 #[derive(Clone, Debug)]
7117 pub struct RepairManagementDnsZoneBinding(
7118 RequestBuilder<crate::model::RepairManagementDnsZoneBindingRequest>,
7119 );
7120
7121 impl RepairManagementDnsZoneBinding {
7122 pub(crate) fn new(
7123 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7124 ) -> Self {
7125 Self(RequestBuilder::new(stub))
7126 }
7127
7128 pub fn with_request<V: Into<crate::model::RepairManagementDnsZoneBindingRequest>>(
7130 mut self,
7131 v: V,
7132 ) -> Self {
7133 self.0.request = v.into();
7134 self
7135 }
7136
7137 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7139 self.0.options = v.into();
7140 self
7141 }
7142
7143 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7150 (*self.0.stub)
7151 .repair_management_dns_zone_binding(self.0.request, self.0.options)
7152 .await
7153 .map(crate::Response::into_body)
7154 }
7155
7156 pub fn poller(
7158 self,
7159 ) -> impl google_cloud_lro::Poller<
7160 crate::model::ManagementDnsZoneBinding,
7161 crate::model::OperationMetadata,
7162 > {
7163 type Operation = google_cloud_lro::internal::Operation<
7164 crate::model::ManagementDnsZoneBinding,
7165 crate::model::OperationMetadata,
7166 >;
7167 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7168 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7169 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7170 if let Some(ref mut details) = poller_options.tracing {
7171 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::repair_management_dns_zone_binding::until_done";
7172 }
7173
7174 let stub = self.0.stub.clone();
7175 let mut options = self.0.options.clone();
7176 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7177 let query = move |name| {
7178 let stub = stub.clone();
7179 let options = options.clone();
7180 async {
7181 let op = GetOperation::new(stub)
7182 .set_name(name)
7183 .with_options(options)
7184 .send()
7185 .await?;
7186 Ok(Operation::new(op))
7187 }
7188 };
7189
7190 let start = move || async {
7191 let op = self.send().await?;
7192 Ok(Operation::new(op))
7193 };
7194
7195 use google_cloud_lro::internal::PollerExt;
7196 {
7197 google_cloud_lro::internal::new_poller(
7198 polling_error_policy,
7199 polling_backoff_policy,
7200 start,
7201 query,
7202 )
7203 }
7204 .with_options(poller_options)
7205 }
7206
7207 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7211 self.0.request.name = v.into();
7212 self
7213 }
7214
7215 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7217 self.0.request.request_id = v.into();
7218 self
7219 }
7220 }
7221
7222 #[doc(hidden)]
7223 impl crate::RequestBuilder for RepairManagementDnsZoneBinding {
7224 fn request_options(&mut self) -> &mut crate::RequestOptions {
7225 &mut self.0.options
7226 }
7227 }
7228
7229 #[derive(Clone, Debug)]
7247 pub struct CreateVmwareEngineNetwork(
7248 RequestBuilder<crate::model::CreateVmwareEngineNetworkRequest>,
7249 );
7250
7251 impl CreateVmwareEngineNetwork {
7252 pub(crate) fn new(
7253 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7254 ) -> Self {
7255 Self(RequestBuilder::new(stub))
7256 }
7257
7258 pub fn with_request<V: Into<crate::model::CreateVmwareEngineNetworkRequest>>(
7260 mut self,
7261 v: V,
7262 ) -> Self {
7263 self.0.request = v.into();
7264 self
7265 }
7266
7267 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7269 self.0.options = v.into();
7270 self
7271 }
7272
7273 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7280 (*self.0.stub)
7281 .create_vmware_engine_network(self.0.request, self.0.options)
7282 .await
7283 .map(crate::Response::into_body)
7284 }
7285
7286 pub fn poller(
7288 self,
7289 ) -> impl google_cloud_lro::Poller<
7290 crate::model::VmwareEngineNetwork,
7291 crate::model::OperationMetadata,
7292 > {
7293 type Operation = google_cloud_lro::internal::Operation<
7294 crate::model::VmwareEngineNetwork,
7295 crate::model::OperationMetadata,
7296 >;
7297 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7298 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7299 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7300 if let Some(ref mut details) = poller_options.tracing {
7301 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::create_vmware_engine_network::until_done";
7302 }
7303
7304 let stub = self.0.stub.clone();
7305 let mut options = self.0.options.clone();
7306 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7307 let query = move |name| {
7308 let stub = stub.clone();
7309 let options = options.clone();
7310 async {
7311 let op = GetOperation::new(stub)
7312 .set_name(name)
7313 .with_options(options)
7314 .send()
7315 .await?;
7316 Ok(Operation::new(op))
7317 }
7318 };
7319
7320 let start = move || async {
7321 let op = self.send().await?;
7322 Ok(Operation::new(op))
7323 };
7324
7325 use google_cloud_lro::internal::PollerExt;
7326 {
7327 google_cloud_lro::internal::new_poller(
7328 polling_error_policy,
7329 polling_backoff_policy,
7330 start,
7331 query,
7332 )
7333 }
7334 .with_options(poller_options)
7335 }
7336
7337 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7341 self.0.request.parent = v.into();
7342 self
7343 }
7344
7345 pub fn set_vmware_engine_network_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7349 self.0.request.vmware_engine_network_id = v.into();
7350 self
7351 }
7352
7353 pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7357 where
7358 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7359 {
7360 self.0.request.vmware_engine_network = std::option::Option::Some(v.into());
7361 self
7362 }
7363
7364 pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7368 where
7369 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7370 {
7371 self.0.request.vmware_engine_network = v.map(|x| x.into());
7372 self
7373 }
7374
7375 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7377 self.0.request.request_id = v.into();
7378 self
7379 }
7380 }
7381
7382 #[doc(hidden)]
7383 impl crate::RequestBuilder for CreateVmwareEngineNetwork {
7384 fn request_options(&mut self) -> &mut crate::RequestOptions {
7385 &mut self.0.options
7386 }
7387 }
7388
7389 #[derive(Clone, Debug)]
7407 pub struct UpdateVmwareEngineNetwork(
7408 RequestBuilder<crate::model::UpdateVmwareEngineNetworkRequest>,
7409 );
7410
7411 impl UpdateVmwareEngineNetwork {
7412 pub(crate) fn new(
7413 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7414 ) -> Self {
7415 Self(RequestBuilder::new(stub))
7416 }
7417
7418 pub fn with_request<V: Into<crate::model::UpdateVmwareEngineNetworkRequest>>(
7420 mut self,
7421 v: V,
7422 ) -> Self {
7423 self.0.request = v.into();
7424 self
7425 }
7426
7427 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7429 self.0.options = v.into();
7430 self
7431 }
7432
7433 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7440 (*self.0.stub)
7441 .update_vmware_engine_network(self.0.request, self.0.options)
7442 .await
7443 .map(crate::Response::into_body)
7444 }
7445
7446 pub fn poller(
7448 self,
7449 ) -> impl google_cloud_lro::Poller<
7450 crate::model::VmwareEngineNetwork,
7451 crate::model::OperationMetadata,
7452 > {
7453 type Operation = google_cloud_lro::internal::Operation<
7454 crate::model::VmwareEngineNetwork,
7455 crate::model::OperationMetadata,
7456 >;
7457 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7458 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7459 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7460 if let Some(ref mut details) = poller_options.tracing {
7461 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::update_vmware_engine_network::until_done";
7462 }
7463
7464 let stub = self.0.stub.clone();
7465 let mut options = self.0.options.clone();
7466 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7467 let query = move |name| {
7468 let stub = stub.clone();
7469 let options = options.clone();
7470 async {
7471 let op = GetOperation::new(stub)
7472 .set_name(name)
7473 .with_options(options)
7474 .send()
7475 .await?;
7476 Ok(Operation::new(op))
7477 }
7478 };
7479
7480 let start = move || async {
7481 let op = self.send().await?;
7482 Ok(Operation::new(op))
7483 };
7484
7485 use google_cloud_lro::internal::PollerExt;
7486 {
7487 google_cloud_lro::internal::new_poller(
7488 polling_error_policy,
7489 polling_backoff_policy,
7490 start,
7491 query,
7492 )
7493 }
7494 .with_options(poller_options)
7495 }
7496
7497 pub fn set_vmware_engine_network<T>(mut self, v: T) -> Self
7501 where
7502 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7503 {
7504 self.0.request.vmware_engine_network = std::option::Option::Some(v.into());
7505 self
7506 }
7507
7508 pub fn set_or_clear_vmware_engine_network<T>(mut self, v: std::option::Option<T>) -> Self
7512 where
7513 T: std::convert::Into<crate::model::VmwareEngineNetwork>,
7514 {
7515 self.0.request.vmware_engine_network = v.map(|x| x.into());
7516 self
7517 }
7518
7519 pub fn set_update_mask<T>(mut self, v: T) -> Self
7523 where
7524 T: std::convert::Into<wkt::FieldMask>,
7525 {
7526 self.0.request.update_mask = std::option::Option::Some(v.into());
7527 self
7528 }
7529
7530 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7534 where
7535 T: std::convert::Into<wkt::FieldMask>,
7536 {
7537 self.0.request.update_mask = v.map(|x| x.into());
7538 self
7539 }
7540
7541 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7543 self.0.request.request_id = v.into();
7544 self
7545 }
7546 }
7547
7548 #[doc(hidden)]
7549 impl crate::RequestBuilder for UpdateVmwareEngineNetwork {
7550 fn request_options(&mut self) -> &mut crate::RequestOptions {
7551 &mut self.0.options
7552 }
7553 }
7554
7555 #[derive(Clone, Debug)]
7573 pub struct DeleteVmwareEngineNetwork(
7574 RequestBuilder<crate::model::DeleteVmwareEngineNetworkRequest>,
7575 );
7576
7577 impl DeleteVmwareEngineNetwork {
7578 pub(crate) fn new(
7579 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7580 ) -> Self {
7581 Self(RequestBuilder::new(stub))
7582 }
7583
7584 pub fn with_request<V: Into<crate::model::DeleteVmwareEngineNetworkRequest>>(
7586 mut self,
7587 v: V,
7588 ) -> Self {
7589 self.0.request = v.into();
7590 self
7591 }
7592
7593 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7595 self.0.options = v.into();
7596 self
7597 }
7598
7599 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7606 (*self.0.stub)
7607 .delete_vmware_engine_network(self.0.request, self.0.options)
7608 .await
7609 .map(crate::Response::into_body)
7610 }
7611
7612 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7614 type Operation =
7615 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7616 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7617 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7618 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7619 if let Some(ref mut details) = poller_options.tracing {
7620 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::delete_vmware_engine_network::until_done";
7621 }
7622
7623 let stub = self.0.stub.clone();
7624 let mut options = self.0.options.clone();
7625 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7626 let query = move |name| {
7627 let stub = stub.clone();
7628 let options = options.clone();
7629 async {
7630 let op = GetOperation::new(stub)
7631 .set_name(name)
7632 .with_options(options)
7633 .send()
7634 .await?;
7635 Ok(Operation::new(op))
7636 }
7637 };
7638
7639 let start = move || async {
7640 let op = self.send().await?;
7641 Ok(Operation::new(op))
7642 };
7643
7644 use google_cloud_lro::internal::PollerExt;
7645 {
7646 google_cloud_lro::internal::new_unit_response_poller(
7647 polling_error_policy,
7648 polling_backoff_policy,
7649 start,
7650 query,
7651 )
7652 }
7653 .with_options(poller_options)
7654 }
7655
7656 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7660 self.0.request.name = v.into();
7661 self
7662 }
7663
7664 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7666 self.0.request.request_id = v.into();
7667 self
7668 }
7669
7670 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7672 self.0.request.etag = v.into();
7673 self
7674 }
7675 }
7676
7677 #[doc(hidden)]
7678 impl crate::RequestBuilder for DeleteVmwareEngineNetwork {
7679 fn request_options(&mut self) -> &mut crate::RequestOptions {
7680 &mut self.0.options
7681 }
7682 }
7683
7684 #[derive(Clone, Debug)]
7701 pub struct GetVmwareEngineNetwork(RequestBuilder<crate::model::GetVmwareEngineNetworkRequest>);
7702
7703 impl GetVmwareEngineNetwork {
7704 pub(crate) fn new(
7705 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7706 ) -> Self {
7707 Self(RequestBuilder::new(stub))
7708 }
7709
7710 pub fn with_request<V: Into<crate::model::GetVmwareEngineNetworkRequest>>(
7712 mut self,
7713 v: V,
7714 ) -> Self {
7715 self.0.request = v.into();
7716 self
7717 }
7718
7719 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7721 self.0.options = v.into();
7722 self
7723 }
7724
7725 pub async fn send(self) -> Result<crate::model::VmwareEngineNetwork> {
7727 (*self.0.stub)
7728 .get_vmware_engine_network(self.0.request, self.0.options)
7729 .await
7730 .map(crate::Response::into_body)
7731 }
7732
7733 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7737 self.0.request.name = v.into();
7738 self
7739 }
7740 }
7741
7742 #[doc(hidden)]
7743 impl crate::RequestBuilder for GetVmwareEngineNetwork {
7744 fn request_options(&mut self) -> &mut crate::RequestOptions {
7745 &mut self.0.options
7746 }
7747 }
7748
7749 #[derive(Clone, Debug)]
7770 pub struct ListVmwareEngineNetworks(
7771 RequestBuilder<crate::model::ListVmwareEngineNetworksRequest>,
7772 );
7773
7774 impl ListVmwareEngineNetworks {
7775 pub(crate) fn new(
7776 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7777 ) -> Self {
7778 Self(RequestBuilder::new(stub))
7779 }
7780
7781 pub fn with_request<V: Into<crate::model::ListVmwareEngineNetworksRequest>>(
7783 mut self,
7784 v: V,
7785 ) -> Self {
7786 self.0.request = v.into();
7787 self
7788 }
7789
7790 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7792 self.0.options = v.into();
7793 self
7794 }
7795
7796 pub async fn send(self) -> Result<crate::model::ListVmwareEngineNetworksResponse> {
7798 (*self.0.stub)
7799 .list_vmware_engine_networks(self.0.request, self.0.options)
7800 .await
7801 .map(crate::Response::into_body)
7802 }
7803
7804 pub fn by_page(
7806 self,
7807 ) -> impl google_cloud_gax::paginator::Paginator<
7808 crate::model::ListVmwareEngineNetworksResponse,
7809 crate::Error,
7810 > {
7811 use std::clone::Clone;
7812 let token = self.0.request.page_token.clone();
7813 let execute = move |token: String| {
7814 let mut builder = self.clone();
7815 builder.0.request = builder.0.request.set_page_token(token);
7816 builder.send()
7817 };
7818 google_cloud_gax::paginator::internal::new_paginator(token, execute)
7819 }
7820
7821 pub fn by_item(
7823 self,
7824 ) -> impl google_cloud_gax::paginator::ItemPaginator<
7825 crate::model::ListVmwareEngineNetworksResponse,
7826 crate::Error,
7827 > {
7828 use google_cloud_gax::paginator::Paginator;
7829 self.by_page().items()
7830 }
7831
7832 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7836 self.0.request.parent = v.into();
7837 self
7838 }
7839
7840 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7842 self.0.request.page_size = v.into();
7843 self
7844 }
7845
7846 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7848 self.0.request.page_token = v.into();
7849 self
7850 }
7851
7852 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7854 self.0.request.filter = v.into();
7855 self
7856 }
7857
7858 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7860 self.0.request.order_by = v.into();
7861 self
7862 }
7863 }
7864
7865 #[doc(hidden)]
7866 impl crate::RequestBuilder for ListVmwareEngineNetworks {
7867 fn request_options(&mut self) -> &mut crate::RequestOptions {
7868 &mut self.0.options
7869 }
7870 }
7871
7872 #[derive(Clone, Debug)]
7890 pub struct CreatePrivateConnection(
7891 RequestBuilder<crate::model::CreatePrivateConnectionRequest>,
7892 );
7893
7894 impl CreatePrivateConnection {
7895 pub(crate) fn new(
7896 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7897 ) -> Self {
7898 Self(RequestBuilder::new(stub))
7899 }
7900
7901 pub fn with_request<V: Into<crate::model::CreatePrivateConnectionRequest>>(
7903 mut self,
7904 v: V,
7905 ) -> Self {
7906 self.0.request = v.into();
7907 self
7908 }
7909
7910 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7912 self.0.options = v.into();
7913 self
7914 }
7915
7916 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7923 (*self.0.stub)
7924 .create_private_connection(self.0.request, self.0.options)
7925 .await
7926 .map(crate::Response::into_body)
7927 }
7928
7929 pub fn poller(
7931 self,
7932 ) -> impl google_cloud_lro::Poller<
7933 crate::model::PrivateConnection,
7934 crate::model::OperationMetadata,
7935 > {
7936 type Operation = google_cloud_lro::internal::Operation<
7937 crate::model::PrivateConnection,
7938 crate::model::OperationMetadata,
7939 >;
7940 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7941 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7942 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7943 if let Some(ref mut details) = poller_options.tracing {
7944 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::create_private_connection::until_done";
7945 }
7946
7947 let stub = self.0.stub.clone();
7948 let mut options = self.0.options.clone();
7949 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7950 let query = move |name| {
7951 let stub = stub.clone();
7952 let options = options.clone();
7953 async {
7954 let op = GetOperation::new(stub)
7955 .set_name(name)
7956 .with_options(options)
7957 .send()
7958 .await?;
7959 Ok(Operation::new(op))
7960 }
7961 };
7962
7963 let start = move || async {
7964 let op = self.send().await?;
7965 Ok(Operation::new(op))
7966 };
7967
7968 use google_cloud_lro::internal::PollerExt;
7969 {
7970 google_cloud_lro::internal::new_poller(
7971 polling_error_policy,
7972 polling_backoff_policy,
7973 start,
7974 query,
7975 )
7976 }
7977 .with_options(poller_options)
7978 }
7979
7980 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7984 self.0.request.parent = v.into();
7985 self
7986 }
7987
7988 pub fn set_private_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7992 self.0.request.private_connection_id = v.into();
7993 self
7994 }
7995
7996 pub fn set_private_connection<T>(mut self, v: T) -> Self
8000 where
8001 T: std::convert::Into<crate::model::PrivateConnection>,
8002 {
8003 self.0.request.private_connection = std::option::Option::Some(v.into());
8004 self
8005 }
8006
8007 pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
8011 where
8012 T: std::convert::Into<crate::model::PrivateConnection>,
8013 {
8014 self.0.request.private_connection = v.map(|x| x.into());
8015 self
8016 }
8017
8018 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8020 self.0.request.request_id = v.into();
8021 self
8022 }
8023 }
8024
8025 #[doc(hidden)]
8026 impl crate::RequestBuilder for CreatePrivateConnection {
8027 fn request_options(&mut self) -> &mut crate::RequestOptions {
8028 &mut self.0.options
8029 }
8030 }
8031
8032 #[derive(Clone, Debug)]
8049 pub struct GetPrivateConnection(RequestBuilder<crate::model::GetPrivateConnectionRequest>);
8050
8051 impl GetPrivateConnection {
8052 pub(crate) fn new(
8053 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8054 ) -> Self {
8055 Self(RequestBuilder::new(stub))
8056 }
8057
8058 pub fn with_request<V: Into<crate::model::GetPrivateConnectionRequest>>(
8060 mut self,
8061 v: V,
8062 ) -> Self {
8063 self.0.request = v.into();
8064 self
8065 }
8066
8067 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8069 self.0.options = v.into();
8070 self
8071 }
8072
8073 pub async fn send(self) -> Result<crate::model::PrivateConnection> {
8075 (*self.0.stub)
8076 .get_private_connection(self.0.request, self.0.options)
8077 .await
8078 .map(crate::Response::into_body)
8079 }
8080
8081 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8085 self.0.request.name = v.into();
8086 self
8087 }
8088 }
8089
8090 #[doc(hidden)]
8091 impl crate::RequestBuilder for GetPrivateConnection {
8092 fn request_options(&mut self) -> &mut crate::RequestOptions {
8093 &mut self.0.options
8094 }
8095 }
8096
8097 #[derive(Clone, Debug)]
8118 pub struct ListPrivateConnections(RequestBuilder<crate::model::ListPrivateConnectionsRequest>);
8119
8120 impl ListPrivateConnections {
8121 pub(crate) fn new(
8122 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8123 ) -> Self {
8124 Self(RequestBuilder::new(stub))
8125 }
8126
8127 pub fn with_request<V: Into<crate::model::ListPrivateConnectionsRequest>>(
8129 mut self,
8130 v: V,
8131 ) -> Self {
8132 self.0.request = v.into();
8133 self
8134 }
8135
8136 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8138 self.0.options = v.into();
8139 self
8140 }
8141
8142 pub async fn send(self) -> Result<crate::model::ListPrivateConnectionsResponse> {
8144 (*self.0.stub)
8145 .list_private_connections(self.0.request, self.0.options)
8146 .await
8147 .map(crate::Response::into_body)
8148 }
8149
8150 pub fn by_page(
8152 self,
8153 ) -> impl google_cloud_gax::paginator::Paginator<
8154 crate::model::ListPrivateConnectionsResponse,
8155 crate::Error,
8156 > {
8157 use std::clone::Clone;
8158 let token = self.0.request.page_token.clone();
8159 let execute = move |token: String| {
8160 let mut builder = self.clone();
8161 builder.0.request = builder.0.request.set_page_token(token);
8162 builder.send()
8163 };
8164 google_cloud_gax::paginator::internal::new_paginator(token, execute)
8165 }
8166
8167 pub fn by_item(
8169 self,
8170 ) -> impl google_cloud_gax::paginator::ItemPaginator<
8171 crate::model::ListPrivateConnectionsResponse,
8172 crate::Error,
8173 > {
8174 use google_cloud_gax::paginator::Paginator;
8175 self.by_page().items()
8176 }
8177
8178 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8182 self.0.request.parent = v.into();
8183 self
8184 }
8185
8186 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8188 self.0.request.page_size = v.into();
8189 self
8190 }
8191
8192 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8194 self.0.request.page_token = v.into();
8195 self
8196 }
8197
8198 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8200 self.0.request.filter = v.into();
8201 self
8202 }
8203
8204 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
8206 self.0.request.order_by = v.into();
8207 self
8208 }
8209 }
8210
8211 #[doc(hidden)]
8212 impl crate::RequestBuilder for ListPrivateConnections {
8213 fn request_options(&mut self) -> &mut crate::RequestOptions {
8214 &mut self.0.options
8215 }
8216 }
8217
8218 #[derive(Clone, Debug)]
8236 pub struct UpdatePrivateConnection(
8237 RequestBuilder<crate::model::UpdatePrivateConnectionRequest>,
8238 );
8239
8240 impl UpdatePrivateConnection {
8241 pub(crate) fn new(
8242 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8243 ) -> Self {
8244 Self(RequestBuilder::new(stub))
8245 }
8246
8247 pub fn with_request<V: Into<crate::model::UpdatePrivateConnectionRequest>>(
8249 mut self,
8250 v: V,
8251 ) -> Self {
8252 self.0.request = v.into();
8253 self
8254 }
8255
8256 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8258 self.0.options = v.into();
8259 self
8260 }
8261
8262 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8269 (*self.0.stub)
8270 .update_private_connection(self.0.request, self.0.options)
8271 .await
8272 .map(crate::Response::into_body)
8273 }
8274
8275 pub fn poller(
8277 self,
8278 ) -> impl google_cloud_lro::Poller<
8279 crate::model::PrivateConnection,
8280 crate::model::OperationMetadata,
8281 > {
8282 type Operation = google_cloud_lro::internal::Operation<
8283 crate::model::PrivateConnection,
8284 crate::model::OperationMetadata,
8285 >;
8286 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8287 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8288 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
8289 if let Some(ref mut details) = poller_options.tracing {
8290 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::update_private_connection::until_done";
8291 }
8292
8293 let stub = self.0.stub.clone();
8294 let mut options = self.0.options.clone();
8295 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8296 let query = move |name| {
8297 let stub = stub.clone();
8298 let options = options.clone();
8299 async {
8300 let op = GetOperation::new(stub)
8301 .set_name(name)
8302 .with_options(options)
8303 .send()
8304 .await?;
8305 Ok(Operation::new(op))
8306 }
8307 };
8308
8309 let start = move || async {
8310 let op = self.send().await?;
8311 Ok(Operation::new(op))
8312 };
8313
8314 use google_cloud_lro::internal::PollerExt;
8315 {
8316 google_cloud_lro::internal::new_poller(
8317 polling_error_policy,
8318 polling_backoff_policy,
8319 start,
8320 query,
8321 )
8322 }
8323 .with_options(poller_options)
8324 }
8325
8326 pub fn set_private_connection<T>(mut self, v: T) -> Self
8330 where
8331 T: std::convert::Into<crate::model::PrivateConnection>,
8332 {
8333 self.0.request.private_connection = std::option::Option::Some(v.into());
8334 self
8335 }
8336
8337 pub fn set_or_clear_private_connection<T>(mut self, v: std::option::Option<T>) -> Self
8341 where
8342 T: std::convert::Into<crate::model::PrivateConnection>,
8343 {
8344 self.0.request.private_connection = v.map(|x| x.into());
8345 self
8346 }
8347
8348 pub fn set_update_mask<T>(mut self, v: T) -> Self
8352 where
8353 T: std::convert::Into<wkt::FieldMask>,
8354 {
8355 self.0.request.update_mask = std::option::Option::Some(v.into());
8356 self
8357 }
8358
8359 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8363 where
8364 T: std::convert::Into<wkt::FieldMask>,
8365 {
8366 self.0.request.update_mask = v.map(|x| x.into());
8367 self
8368 }
8369
8370 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8372 self.0.request.request_id = v.into();
8373 self
8374 }
8375 }
8376
8377 #[doc(hidden)]
8378 impl crate::RequestBuilder for UpdatePrivateConnection {
8379 fn request_options(&mut self) -> &mut crate::RequestOptions {
8380 &mut self.0.options
8381 }
8382 }
8383
8384 #[derive(Clone, Debug)]
8402 pub struct DeletePrivateConnection(
8403 RequestBuilder<crate::model::DeletePrivateConnectionRequest>,
8404 );
8405
8406 impl DeletePrivateConnection {
8407 pub(crate) fn new(
8408 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8409 ) -> Self {
8410 Self(RequestBuilder::new(stub))
8411 }
8412
8413 pub fn with_request<V: Into<crate::model::DeletePrivateConnectionRequest>>(
8415 mut self,
8416 v: V,
8417 ) -> Self {
8418 self.0.request = v.into();
8419 self
8420 }
8421
8422 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8424 self.0.options = v.into();
8425 self
8426 }
8427
8428 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8435 (*self.0.stub)
8436 .delete_private_connection(self.0.request, self.0.options)
8437 .await
8438 .map(crate::Response::into_body)
8439 }
8440
8441 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
8443 type Operation =
8444 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
8445 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8446 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8447 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
8448 if let Some(ref mut details) = poller_options.tracing {
8449 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::delete_private_connection::until_done";
8450 }
8451
8452 let stub = self.0.stub.clone();
8453 let mut options = self.0.options.clone();
8454 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8455 let query = move |name| {
8456 let stub = stub.clone();
8457 let options = options.clone();
8458 async {
8459 let op = GetOperation::new(stub)
8460 .set_name(name)
8461 .with_options(options)
8462 .send()
8463 .await?;
8464 Ok(Operation::new(op))
8465 }
8466 };
8467
8468 let start = move || async {
8469 let op = self.send().await?;
8470 Ok(Operation::new(op))
8471 };
8472
8473 use google_cloud_lro::internal::PollerExt;
8474 {
8475 google_cloud_lro::internal::new_unit_response_poller(
8476 polling_error_policy,
8477 polling_backoff_policy,
8478 start,
8479 query,
8480 )
8481 }
8482 .with_options(poller_options)
8483 }
8484
8485 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8489 self.0.request.name = v.into();
8490 self
8491 }
8492
8493 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8495 self.0.request.request_id = v.into();
8496 self
8497 }
8498 }
8499
8500 #[doc(hidden)]
8501 impl crate::RequestBuilder for DeletePrivateConnection {
8502 fn request_options(&mut self) -> &mut crate::RequestOptions {
8503 &mut self.0.options
8504 }
8505 }
8506
8507 #[derive(Clone, Debug)]
8528 pub struct ListPrivateConnectionPeeringRoutes(
8529 RequestBuilder<crate::model::ListPrivateConnectionPeeringRoutesRequest>,
8530 );
8531
8532 impl ListPrivateConnectionPeeringRoutes {
8533 pub(crate) fn new(
8534 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8535 ) -> Self {
8536 Self(RequestBuilder::new(stub))
8537 }
8538
8539 pub fn with_request<V: Into<crate::model::ListPrivateConnectionPeeringRoutesRequest>>(
8541 mut self,
8542 v: V,
8543 ) -> Self {
8544 self.0.request = v.into();
8545 self
8546 }
8547
8548 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8550 self.0.options = v.into();
8551 self
8552 }
8553
8554 pub async fn send(
8556 self,
8557 ) -> Result<crate::model::ListPrivateConnectionPeeringRoutesResponse> {
8558 (*self.0.stub)
8559 .list_private_connection_peering_routes(self.0.request, self.0.options)
8560 .await
8561 .map(crate::Response::into_body)
8562 }
8563
8564 pub fn by_page(
8566 self,
8567 ) -> impl google_cloud_gax::paginator::Paginator<
8568 crate::model::ListPrivateConnectionPeeringRoutesResponse,
8569 crate::Error,
8570 > {
8571 use std::clone::Clone;
8572 let token = self.0.request.page_token.clone();
8573 let execute = move |token: String| {
8574 let mut builder = self.clone();
8575 builder.0.request = builder.0.request.set_page_token(token);
8576 builder.send()
8577 };
8578 google_cloud_gax::paginator::internal::new_paginator(token, execute)
8579 }
8580
8581 pub fn by_item(
8583 self,
8584 ) -> impl google_cloud_gax::paginator::ItemPaginator<
8585 crate::model::ListPrivateConnectionPeeringRoutesResponse,
8586 crate::Error,
8587 > {
8588 use google_cloud_gax::paginator::Paginator;
8589 self.by_page().items()
8590 }
8591
8592 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8596 self.0.request.parent = v.into();
8597 self
8598 }
8599
8600 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8602 self.0.request.page_size = v.into();
8603 self
8604 }
8605
8606 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8608 self.0.request.page_token = v.into();
8609 self
8610 }
8611 }
8612
8613 #[doc(hidden)]
8614 impl crate::RequestBuilder for ListPrivateConnectionPeeringRoutes {
8615 fn request_options(&mut self) -> &mut crate::RequestOptions {
8616 &mut self.0.options
8617 }
8618 }
8619
8620 #[derive(Clone, Debug)]
8638 pub struct GrantDnsBindPermission(RequestBuilder<crate::model::GrantDnsBindPermissionRequest>);
8639
8640 impl GrantDnsBindPermission {
8641 pub(crate) fn new(
8642 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8643 ) -> Self {
8644 Self(RequestBuilder::new(stub))
8645 }
8646
8647 pub fn with_request<V: Into<crate::model::GrantDnsBindPermissionRequest>>(
8649 mut self,
8650 v: V,
8651 ) -> Self {
8652 self.0.request = v.into();
8653 self
8654 }
8655
8656 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8658 self.0.options = v.into();
8659 self
8660 }
8661
8662 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8669 (*self.0.stub)
8670 .grant_dns_bind_permission(self.0.request, self.0.options)
8671 .await
8672 .map(crate::Response::into_body)
8673 }
8674
8675 pub fn poller(
8677 self,
8678 ) -> impl google_cloud_lro::Poller<
8679 crate::model::DnsBindPermission,
8680 crate::model::OperationMetadata,
8681 > {
8682 type Operation = google_cloud_lro::internal::Operation<
8683 crate::model::DnsBindPermission,
8684 crate::model::OperationMetadata,
8685 >;
8686 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8687 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8688 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
8689 if let Some(ref mut details) = poller_options.tracing {
8690 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::grant_dns_bind_permission::until_done";
8691 }
8692
8693 let stub = self.0.stub.clone();
8694 let mut options = self.0.options.clone();
8695 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8696 let query = move |name| {
8697 let stub = stub.clone();
8698 let options = options.clone();
8699 async {
8700 let op = GetOperation::new(stub)
8701 .set_name(name)
8702 .with_options(options)
8703 .send()
8704 .await?;
8705 Ok(Operation::new(op))
8706 }
8707 };
8708
8709 let start = move || async {
8710 let op = self.send().await?;
8711 Ok(Operation::new(op))
8712 };
8713
8714 use google_cloud_lro::internal::PollerExt;
8715 {
8716 google_cloud_lro::internal::new_poller(
8717 polling_error_policy,
8718 polling_backoff_policy,
8719 start,
8720 query,
8721 )
8722 }
8723 .with_options(poller_options)
8724 }
8725
8726 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8730 self.0.request.name = v.into();
8731 self
8732 }
8733
8734 pub fn set_principal<T>(mut self, v: T) -> Self
8738 where
8739 T: std::convert::Into<crate::model::Principal>,
8740 {
8741 self.0.request.principal = std::option::Option::Some(v.into());
8742 self
8743 }
8744
8745 pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8749 where
8750 T: std::convert::Into<crate::model::Principal>,
8751 {
8752 self.0.request.principal = v.map(|x| x.into());
8753 self
8754 }
8755
8756 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8758 self.0.request.request_id = v.into();
8759 self
8760 }
8761 }
8762
8763 #[doc(hidden)]
8764 impl crate::RequestBuilder for GrantDnsBindPermission {
8765 fn request_options(&mut self) -> &mut crate::RequestOptions {
8766 &mut self.0.options
8767 }
8768 }
8769
8770 #[derive(Clone, Debug)]
8787 pub struct GetDnsBindPermission(RequestBuilder<crate::model::GetDnsBindPermissionRequest>);
8788
8789 impl GetDnsBindPermission {
8790 pub(crate) fn new(
8791 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8792 ) -> Self {
8793 Self(RequestBuilder::new(stub))
8794 }
8795
8796 pub fn with_request<V: Into<crate::model::GetDnsBindPermissionRequest>>(
8798 mut self,
8799 v: V,
8800 ) -> Self {
8801 self.0.request = v.into();
8802 self
8803 }
8804
8805 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8807 self.0.options = v.into();
8808 self
8809 }
8810
8811 pub async fn send(self) -> Result<crate::model::DnsBindPermission> {
8813 (*self.0.stub)
8814 .get_dns_bind_permission(self.0.request, self.0.options)
8815 .await
8816 .map(crate::Response::into_body)
8817 }
8818
8819 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8823 self.0.request.name = v.into();
8824 self
8825 }
8826 }
8827
8828 #[doc(hidden)]
8829 impl crate::RequestBuilder for GetDnsBindPermission {
8830 fn request_options(&mut self) -> &mut crate::RequestOptions {
8831 &mut self.0.options
8832 }
8833 }
8834
8835 #[derive(Clone, Debug)]
8853 pub struct RevokeDnsBindPermission(
8854 RequestBuilder<crate::model::RevokeDnsBindPermissionRequest>,
8855 );
8856
8857 impl RevokeDnsBindPermission {
8858 pub(crate) fn new(
8859 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8860 ) -> Self {
8861 Self(RequestBuilder::new(stub))
8862 }
8863
8864 pub fn with_request<V: Into<crate::model::RevokeDnsBindPermissionRequest>>(
8866 mut self,
8867 v: V,
8868 ) -> Self {
8869 self.0.request = v.into();
8870 self
8871 }
8872
8873 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8875 self.0.options = v.into();
8876 self
8877 }
8878
8879 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8886 (*self.0.stub)
8887 .revoke_dns_bind_permission(self.0.request, self.0.options)
8888 .await
8889 .map(crate::Response::into_body)
8890 }
8891
8892 pub fn poller(
8894 self,
8895 ) -> impl google_cloud_lro::Poller<
8896 crate::model::DnsBindPermission,
8897 crate::model::OperationMetadata,
8898 > {
8899 type Operation = google_cloud_lro::internal::Operation<
8900 crate::model::DnsBindPermission,
8901 crate::model::OperationMetadata,
8902 >;
8903 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8904 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8905 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
8906 if let Some(ref mut details) = poller_options.tracing {
8907 details.method_name = "google_cloud_vmwareengine_v1::client::VmwareEngine::revoke_dns_bind_permission::until_done";
8908 }
8909
8910 let stub = self.0.stub.clone();
8911 let mut options = self.0.options.clone();
8912 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
8913 let query = move |name| {
8914 let stub = stub.clone();
8915 let options = options.clone();
8916 async {
8917 let op = GetOperation::new(stub)
8918 .set_name(name)
8919 .with_options(options)
8920 .send()
8921 .await?;
8922 Ok(Operation::new(op))
8923 }
8924 };
8925
8926 let start = move || async {
8927 let op = self.send().await?;
8928 Ok(Operation::new(op))
8929 };
8930
8931 use google_cloud_lro::internal::PollerExt;
8932 {
8933 google_cloud_lro::internal::new_poller(
8934 polling_error_policy,
8935 polling_backoff_policy,
8936 start,
8937 query,
8938 )
8939 }
8940 .with_options(poller_options)
8941 }
8942
8943 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8947 self.0.request.name = v.into();
8948 self
8949 }
8950
8951 pub fn set_principal<T>(mut self, v: T) -> Self
8955 where
8956 T: std::convert::Into<crate::model::Principal>,
8957 {
8958 self.0.request.principal = std::option::Option::Some(v.into());
8959 self
8960 }
8961
8962 pub fn set_or_clear_principal<T>(mut self, v: std::option::Option<T>) -> Self
8966 where
8967 T: std::convert::Into<crate::model::Principal>,
8968 {
8969 self.0.request.principal = v.map(|x| x.into());
8970 self
8971 }
8972
8973 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8975 self.0.request.request_id = v.into();
8976 self
8977 }
8978 }
8979
8980 #[doc(hidden)]
8981 impl crate::RequestBuilder for RevokeDnsBindPermission {
8982 fn request_options(&mut self) -> &mut crate::RequestOptions {
8983 &mut self.0.options
8984 }
8985 }
8986
8987 #[derive(Clone, Debug)]
9008 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
9009
9010 impl ListLocations {
9011 pub(crate) fn new(
9012 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9013 ) -> Self {
9014 Self(RequestBuilder::new(stub))
9015 }
9016
9017 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
9019 mut self,
9020 v: V,
9021 ) -> Self {
9022 self.0.request = v.into();
9023 self
9024 }
9025
9026 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9028 self.0.options = v.into();
9029 self
9030 }
9031
9032 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
9034 (*self.0.stub)
9035 .list_locations(self.0.request, self.0.options)
9036 .await
9037 .map(crate::Response::into_body)
9038 }
9039
9040 pub fn by_page(
9042 self,
9043 ) -> impl google_cloud_gax::paginator::Paginator<
9044 google_cloud_location::model::ListLocationsResponse,
9045 crate::Error,
9046 > {
9047 use std::clone::Clone;
9048 let token = self.0.request.page_token.clone();
9049 let execute = move |token: String| {
9050 let mut builder = self.clone();
9051 builder.0.request = builder.0.request.set_page_token(token);
9052 builder.send()
9053 };
9054 google_cloud_gax::paginator::internal::new_paginator(token, execute)
9055 }
9056
9057 pub fn by_item(
9059 self,
9060 ) -> impl google_cloud_gax::paginator::ItemPaginator<
9061 google_cloud_location::model::ListLocationsResponse,
9062 crate::Error,
9063 > {
9064 use google_cloud_gax::paginator::Paginator;
9065 self.by_page().items()
9066 }
9067
9068 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9070 self.0.request.name = v.into();
9071 self
9072 }
9073
9074 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9076 self.0.request.filter = v.into();
9077 self
9078 }
9079
9080 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9082 self.0.request.page_size = v.into();
9083 self
9084 }
9085
9086 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9088 self.0.request.page_token = v.into();
9089 self
9090 }
9091 }
9092
9093 #[doc(hidden)]
9094 impl crate::RequestBuilder for ListLocations {
9095 fn request_options(&mut self) -> &mut crate::RequestOptions {
9096 &mut self.0.options
9097 }
9098 }
9099
9100 #[derive(Clone, Debug)]
9117 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
9118
9119 impl GetLocation {
9120 pub(crate) fn new(
9121 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9122 ) -> Self {
9123 Self(RequestBuilder::new(stub))
9124 }
9125
9126 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
9128 mut self,
9129 v: V,
9130 ) -> Self {
9131 self.0.request = v.into();
9132 self
9133 }
9134
9135 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9137 self.0.options = v.into();
9138 self
9139 }
9140
9141 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
9143 (*self.0.stub)
9144 .get_location(self.0.request, self.0.options)
9145 .await
9146 .map(crate::Response::into_body)
9147 }
9148
9149 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9151 self.0.request.name = v.into();
9152 self
9153 }
9154 }
9155
9156 #[doc(hidden)]
9157 impl crate::RequestBuilder for GetLocation {
9158 fn request_options(&mut self) -> &mut crate::RequestOptions {
9159 &mut self.0.options
9160 }
9161 }
9162
9163 #[derive(Clone, Debug)]
9180 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
9181
9182 impl SetIamPolicy {
9183 pub(crate) fn new(
9184 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9185 ) -> Self {
9186 Self(RequestBuilder::new(stub))
9187 }
9188
9189 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
9191 mut self,
9192 v: V,
9193 ) -> Self {
9194 self.0.request = v.into();
9195 self
9196 }
9197
9198 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9200 self.0.options = v.into();
9201 self
9202 }
9203
9204 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
9206 (*self.0.stub)
9207 .set_iam_policy(self.0.request, self.0.options)
9208 .await
9209 .map(crate::Response::into_body)
9210 }
9211
9212 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9216 self.0.request.resource = v.into();
9217 self
9218 }
9219
9220 pub fn set_policy<T>(mut self, v: T) -> Self
9224 where
9225 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
9226 {
9227 self.0.request.policy = std::option::Option::Some(v.into());
9228 self
9229 }
9230
9231 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
9235 where
9236 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
9237 {
9238 self.0.request.policy = v.map(|x| x.into());
9239 self
9240 }
9241
9242 pub fn set_update_mask<T>(mut self, v: T) -> Self
9244 where
9245 T: std::convert::Into<wkt::FieldMask>,
9246 {
9247 self.0.request.update_mask = std::option::Option::Some(v.into());
9248 self
9249 }
9250
9251 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9253 where
9254 T: std::convert::Into<wkt::FieldMask>,
9255 {
9256 self.0.request.update_mask = v.map(|x| x.into());
9257 self
9258 }
9259 }
9260
9261 #[doc(hidden)]
9262 impl crate::RequestBuilder for SetIamPolicy {
9263 fn request_options(&mut self) -> &mut crate::RequestOptions {
9264 &mut self.0.options
9265 }
9266 }
9267
9268 #[derive(Clone, Debug)]
9285 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
9286
9287 impl GetIamPolicy {
9288 pub(crate) fn new(
9289 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9290 ) -> Self {
9291 Self(RequestBuilder::new(stub))
9292 }
9293
9294 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
9296 mut self,
9297 v: V,
9298 ) -> Self {
9299 self.0.request = v.into();
9300 self
9301 }
9302
9303 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9305 self.0.options = v.into();
9306 self
9307 }
9308
9309 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
9311 (*self.0.stub)
9312 .get_iam_policy(self.0.request, self.0.options)
9313 .await
9314 .map(crate::Response::into_body)
9315 }
9316
9317 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9321 self.0.request.resource = v.into();
9322 self
9323 }
9324
9325 pub fn set_options<T>(mut self, v: T) -> Self
9327 where
9328 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9329 {
9330 self.0.request.options = std::option::Option::Some(v.into());
9331 self
9332 }
9333
9334 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
9336 where
9337 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9338 {
9339 self.0.request.options = v.map(|x| x.into());
9340 self
9341 }
9342 }
9343
9344 #[doc(hidden)]
9345 impl crate::RequestBuilder for GetIamPolicy {
9346 fn request_options(&mut self) -> &mut crate::RequestOptions {
9347 &mut self.0.options
9348 }
9349 }
9350
9351 #[derive(Clone, Debug)]
9368 pub struct TestIamPermissions(
9369 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
9370 );
9371
9372 impl TestIamPermissions {
9373 pub(crate) fn new(
9374 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9375 ) -> Self {
9376 Self(RequestBuilder::new(stub))
9377 }
9378
9379 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
9381 mut self,
9382 v: V,
9383 ) -> Self {
9384 self.0.request = v.into();
9385 self
9386 }
9387
9388 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9390 self.0.options = v.into();
9391 self
9392 }
9393
9394 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
9396 (*self.0.stub)
9397 .test_iam_permissions(self.0.request, self.0.options)
9398 .await
9399 .map(crate::Response::into_body)
9400 }
9401
9402 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9406 self.0.request.resource = v.into();
9407 self
9408 }
9409
9410 pub fn set_permissions<T, V>(mut self, v: T) -> Self
9414 where
9415 T: std::iter::IntoIterator<Item = V>,
9416 V: std::convert::Into<std::string::String>,
9417 {
9418 use std::iter::Iterator;
9419 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
9420 self
9421 }
9422 }
9423
9424 #[doc(hidden)]
9425 impl crate::RequestBuilder for TestIamPermissions {
9426 fn request_options(&mut self) -> &mut crate::RequestOptions {
9427 &mut self.0.options
9428 }
9429 }
9430
9431 #[derive(Clone, Debug)]
9452 pub struct ListOperations(
9453 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
9454 );
9455
9456 impl ListOperations {
9457 pub(crate) fn new(
9458 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9459 ) -> Self {
9460 Self(RequestBuilder::new(stub))
9461 }
9462
9463 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
9465 mut self,
9466 v: V,
9467 ) -> Self {
9468 self.0.request = v.into();
9469 self
9470 }
9471
9472 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9474 self.0.options = v.into();
9475 self
9476 }
9477
9478 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
9480 (*self.0.stub)
9481 .list_operations(self.0.request, self.0.options)
9482 .await
9483 .map(crate::Response::into_body)
9484 }
9485
9486 pub fn by_page(
9488 self,
9489 ) -> impl google_cloud_gax::paginator::Paginator<
9490 google_cloud_longrunning::model::ListOperationsResponse,
9491 crate::Error,
9492 > {
9493 use std::clone::Clone;
9494 let token = self.0.request.page_token.clone();
9495 let execute = move |token: String| {
9496 let mut builder = self.clone();
9497 builder.0.request = builder.0.request.set_page_token(token);
9498 builder.send()
9499 };
9500 google_cloud_gax::paginator::internal::new_paginator(token, execute)
9501 }
9502
9503 pub fn by_item(
9505 self,
9506 ) -> impl google_cloud_gax::paginator::ItemPaginator<
9507 google_cloud_longrunning::model::ListOperationsResponse,
9508 crate::Error,
9509 > {
9510 use google_cloud_gax::paginator::Paginator;
9511 self.by_page().items()
9512 }
9513
9514 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9516 self.0.request.name = v.into();
9517 self
9518 }
9519
9520 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9522 self.0.request.filter = v.into();
9523 self
9524 }
9525
9526 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9528 self.0.request.page_size = v.into();
9529 self
9530 }
9531
9532 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9534 self.0.request.page_token = v.into();
9535 self
9536 }
9537
9538 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
9540 self.0.request.return_partial_success = v.into();
9541 self
9542 }
9543 }
9544
9545 #[doc(hidden)]
9546 impl crate::RequestBuilder for ListOperations {
9547 fn request_options(&mut self) -> &mut crate::RequestOptions {
9548 &mut self.0.options
9549 }
9550 }
9551
9552 #[derive(Clone, Debug)]
9569 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
9570
9571 impl GetOperation {
9572 pub(crate) fn new(
9573 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9574 ) -> Self {
9575 Self(RequestBuilder::new(stub))
9576 }
9577
9578 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
9580 mut self,
9581 v: V,
9582 ) -> Self {
9583 self.0.request = v.into();
9584 self
9585 }
9586
9587 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9589 self.0.options = v.into();
9590 self
9591 }
9592
9593 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9595 (*self.0.stub)
9596 .get_operation(self.0.request, self.0.options)
9597 .await
9598 .map(crate::Response::into_body)
9599 }
9600
9601 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9603 self.0.request.name = v.into();
9604 self
9605 }
9606 }
9607
9608 #[doc(hidden)]
9609 impl crate::RequestBuilder for GetOperation {
9610 fn request_options(&mut self) -> &mut crate::RequestOptions {
9611 &mut self.0.options
9612 }
9613 }
9614
9615 #[derive(Clone, Debug)]
9632 pub struct DeleteOperation(
9633 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
9634 );
9635
9636 impl DeleteOperation {
9637 pub(crate) fn new(
9638 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
9639 ) -> Self {
9640 Self(RequestBuilder::new(stub))
9641 }
9642
9643 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
9645 mut self,
9646 v: V,
9647 ) -> Self {
9648 self.0.request = v.into();
9649 self
9650 }
9651
9652 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9654 self.0.options = v.into();
9655 self
9656 }
9657
9658 pub async fn send(self) -> Result<()> {
9660 (*self.0.stub)
9661 .delete_operation(self.0.request, self.0.options)
9662 .await
9663 .map(crate::Response::into_body)
9664 }
9665
9666 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9668 self.0.request.name = v.into();
9669 self
9670 }
9671 }
9672
9673 #[doc(hidden)]
9674 impl crate::RequestBuilder for DeleteOperation {
9675 fn request_options(&mut self) -> &mut crate::RequestOptions {
9676 &mut self.0.options
9677 }
9678 }
9679}