1pub mod vmware_engine {
18 use crate::Result;
19
20 pub type ClientBuilder =
34 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::VmwareEngine;
38 pub struct Factory;
39 impl gax::client_builder::internal::ClientFactory for Factory {
40 type Client = VmwareEngine;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(self, config: gaxi::options::ClientConfig) -> gax::Result<Self::Client> {
43 Self::Client::new(config).await
44 }
45 }
46 }
47
48 #[derive(Clone, Debug)]
50 pub(crate) struct RequestBuilder<R: std::default::Default> {
51 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
52 request: R,
53 options: gax::options::RequestOptions,
54 }
55
56 impl<R> RequestBuilder<R>
57 where
58 R: std::default::Default,
59 {
60 pub(crate) fn new(
61 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
62 ) -> Self {
63 Self {
64 stub,
65 request: R::default(),
66 options: gax::options::RequestOptions::default(),
67 }
68 }
69 }
70
71 #[derive(Clone, Debug)]
92 pub struct ListPrivateClouds(RequestBuilder<crate::model::ListPrivateCloudsRequest>);
93
94 impl ListPrivateClouds {
95 pub(crate) fn new(
96 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
97 ) -> Self {
98 Self(RequestBuilder::new(stub))
99 }
100
101 pub fn with_request<V: Into<crate::model::ListPrivateCloudsRequest>>(
103 mut self,
104 v: V,
105 ) -> Self {
106 self.0.request = v.into();
107 self
108 }
109
110 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
112 self.0.options = v.into();
113 self
114 }
115
116 pub async fn send(self) -> Result<crate::model::ListPrivateCloudsResponse> {
118 (*self.0.stub)
119 .list_private_clouds(self.0.request, self.0.options)
120 .await
121 .map(gax::response::Response::into_body)
122 }
123
124 pub fn by_page(
126 self,
127 ) -> impl gax::paginator::Paginator<crate::model::ListPrivateCloudsResponse, gax::error::Error>
128 {
129 use std::clone::Clone;
130 let token = self.0.request.page_token.clone();
131 let execute = move |token: String| {
132 let mut builder = self.clone();
133 builder.0.request = builder.0.request.set_page_token(token);
134 builder.send()
135 };
136 gax::paginator::internal::new_paginator(token, execute)
137 }
138
139 pub fn by_item(
141 self,
142 ) -> impl gax::paginator::ItemPaginator<crate::model::ListPrivateCloudsResponse, gax::error::Error>
143 {
144 use gax::paginator::Paginator;
145 self.by_page().items()
146 }
147
148 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
152 self.0.request.parent = v.into();
153 self
154 }
155
156 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
158 self.0.request.page_size = v.into();
159 self
160 }
161
162 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
164 self.0.request.page_token = v.into();
165 self
166 }
167
168 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
170 self.0.request.filter = v.into();
171 self
172 }
173
174 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
176 self.0.request.order_by = v.into();
177 self
178 }
179 }
180
181 #[doc(hidden)]
182 impl gax::options::internal::RequestBuilder for ListPrivateClouds {
183 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
184 &mut self.0.options
185 }
186 }
187
188 #[derive(Clone, Debug)]
205 pub struct GetPrivateCloud(RequestBuilder<crate::model::GetPrivateCloudRequest>);
206
207 impl GetPrivateCloud {
208 pub(crate) fn new(
209 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
210 ) -> Self {
211 Self(RequestBuilder::new(stub))
212 }
213
214 pub fn with_request<V: Into<crate::model::GetPrivateCloudRequest>>(mut self, v: V) -> Self {
216 self.0.request = v.into();
217 self
218 }
219
220 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
222 self.0.options = v.into();
223 self
224 }
225
226 pub async fn send(self) -> Result<crate::model::PrivateCloud> {
228 (*self.0.stub)
229 .get_private_cloud(self.0.request, self.0.options)
230 .await
231 .map(gax::response::Response::into_body)
232 }
233
234 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
238 self.0.request.name = v.into();
239 self
240 }
241 }
242
243 #[doc(hidden)]
244 impl gax::options::internal::RequestBuilder for GetPrivateCloud {
245 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
246 &mut self.0.options
247 }
248 }
249
250 #[derive(Clone, Debug)]
268 pub struct CreatePrivateCloud(RequestBuilder<crate::model::CreatePrivateCloudRequest>);
269
270 impl CreatePrivateCloud {
271 pub(crate) fn new(
272 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
273 ) -> Self {
274 Self(RequestBuilder::new(stub))
275 }
276
277 pub fn with_request<V: Into<crate::model::CreatePrivateCloudRequest>>(
279 mut self,
280 v: V,
281 ) -> Self {
282 self.0.request = v.into();
283 self
284 }
285
286 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
288 self.0.options = v.into();
289 self
290 }
291
292 pub async fn send(self) -> Result<longrunning::model::Operation> {
299 (*self.0.stub)
300 .create_private_cloud(self.0.request, self.0.options)
301 .await
302 .map(gax::response::Response::into_body)
303 }
304
305 pub fn poller(
307 self,
308 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
309 type Operation = lro::internal::Operation<
310 crate::model::PrivateCloud,
311 crate::model::OperationMetadata,
312 >;
313 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
314 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
315
316 let stub = self.0.stub.clone();
317 let mut options = self.0.options.clone();
318 options.set_retry_policy(gax::retry_policy::NeverRetry);
319 let query = move |name| {
320 let stub = stub.clone();
321 let options = options.clone();
322 async {
323 let op = GetOperation::new(stub)
324 .set_name(name)
325 .with_options(options)
326 .send()
327 .await?;
328 Ok(Operation::new(op))
329 }
330 };
331
332 let start = move || async {
333 let op = self.send().await?;
334 Ok(Operation::new(op))
335 };
336
337 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
338 }
339
340 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
344 self.0.request.parent = v.into();
345 self
346 }
347
348 pub fn set_private_cloud_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
352 self.0.request.private_cloud_id = v.into();
353 self
354 }
355
356 pub fn set_private_cloud<T: Into<std::option::Option<crate::model::PrivateCloud>>>(
360 mut self,
361 v: T,
362 ) -> Self {
363 self.0.request.private_cloud = v.into();
364 self
365 }
366
367 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
369 self.0.request.request_id = v.into();
370 self
371 }
372
373 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
375 self.0.request.validate_only = v.into();
376 self
377 }
378 }
379
380 #[doc(hidden)]
381 impl gax::options::internal::RequestBuilder for CreatePrivateCloud {
382 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
383 &mut self.0.options
384 }
385 }
386
387 #[derive(Clone, Debug)]
405 pub struct UpdatePrivateCloud(RequestBuilder<crate::model::UpdatePrivateCloudRequest>);
406
407 impl UpdatePrivateCloud {
408 pub(crate) fn new(
409 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
410 ) -> Self {
411 Self(RequestBuilder::new(stub))
412 }
413
414 pub fn with_request<V: Into<crate::model::UpdatePrivateCloudRequest>>(
416 mut self,
417 v: V,
418 ) -> Self {
419 self.0.request = v.into();
420 self
421 }
422
423 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
425 self.0.options = v.into();
426 self
427 }
428
429 pub async fn send(self) -> Result<longrunning::model::Operation> {
436 (*self.0.stub)
437 .update_private_cloud(self.0.request, self.0.options)
438 .await
439 .map(gax::response::Response::into_body)
440 }
441
442 pub fn poller(
444 self,
445 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
446 type Operation = lro::internal::Operation<
447 crate::model::PrivateCloud,
448 crate::model::OperationMetadata,
449 >;
450 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
451 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
452
453 let stub = self.0.stub.clone();
454 let mut options = self.0.options.clone();
455 options.set_retry_policy(gax::retry_policy::NeverRetry);
456 let query = move |name| {
457 let stub = stub.clone();
458 let options = options.clone();
459 async {
460 let op = GetOperation::new(stub)
461 .set_name(name)
462 .with_options(options)
463 .send()
464 .await?;
465 Ok(Operation::new(op))
466 }
467 };
468
469 let start = move || async {
470 let op = self.send().await?;
471 Ok(Operation::new(op))
472 };
473
474 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
475 }
476
477 pub fn set_private_cloud<T: Into<std::option::Option<crate::model::PrivateCloud>>>(
481 mut self,
482 v: T,
483 ) -> Self {
484 self.0.request.private_cloud = v.into();
485 self
486 }
487
488 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
492 mut self,
493 v: T,
494 ) -> Self {
495 self.0.request.update_mask = v.into();
496 self
497 }
498
499 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
501 self.0.request.request_id = v.into();
502 self
503 }
504 }
505
506 #[doc(hidden)]
507 impl gax::options::internal::RequestBuilder for UpdatePrivateCloud {
508 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
509 &mut self.0.options
510 }
511 }
512
513 #[derive(Clone, Debug)]
531 pub struct DeletePrivateCloud(RequestBuilder<crate::model::DeletePrivateCloudRequest>);
532
533 impl DeletePrivateCloud {
534 pub(crate) fn new(
535 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
536 ) -> Self {
537 Self(RequestBuilder::new(stub))
538 }
539
540 pub fn with_request<V: Into<crate::model::DeletePrivateCloudRequest>>(
542 mut self,
543 v: V,
544 ) -> Self {
545 self.0.request = v.into();
546 self
547 }
548
549 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
551 self.0.options = v.into();
552 self
553 }
554
555 pub async fn send(self) -> Result<longrunning::model::Operation> {
562 (*self.0.stub)
563 .delete_private_cloud(self.0.request, self.0.options)
564 .await
565 .map(gax::response::Response::into_body)
566 }
567
568 pub fn poller(
570 self,
571 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
572 type Operation = lro::internal::Operation<
573 crate::model::PrivateCloud,
574 crate::model::OperationMetadata,
575 >;
576 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
577 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
578
579 let stub = self.0.stub.clone();
580 let mut options = self.0.options.clone();
581 options.set_retry_policy(gax::retry_policy::NeverRetry);
582 let query = move |name| {
583 let stub = stub.clone();
584 let options = options.clone();
585 async {
586 let op = GetOperation::new(stub)
587 .set_name(name)
588 .with_options(options)
589 .send()
590 .await?;
591 Ok(Operation::new(op))
592 }
593 };
594
595 let start = move || async {
596 let op = self.send().await?;
597 Ok(Operation::new(op))
598 };
599
600 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
601 }
602
603 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
607 self.0.request.name = v.into();
608 self
609 }
610
611 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
613 self.0.request.request_id = v.into();
614 self
615 }
616
617 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
619 self.0.request.force = v.into();
620 self
621 }
622
623 pub fn set_delay_hours<T: Into<std::option::Option<i32>>>(mut self, v: T) -> Self {
625 self.0.request.delay_hours = v.into();
626 self
627 }
628 }
629
630 #[doc(hidden)]
631 impl gax::options::internal::RequestBuilder for DeletePrivateCloud {
632 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
633 &mut self.0.options
634 }
635 }
636
637 #[derive(Clone, Debug)]
655 pub struct UndeletePrivateCloud(RequestBuilder<crate::model::UndeletePrivateCloudRequest>);
656
657 impl UndeletePrivateCloud {
658 pub(crate) fn new(
659 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
660 ) -> Self {
661 Self(RequestBuilder::new(stub))
662 }
663
664 pub fn with_request<V: Into<crate::model::UndeletePrivateCloudRequest>>(
666 mut self,
667 v: V,
668 ) -> Self {
669 self.0.request = v.into();
670 self
671 }
672
673 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
675 self.0.options = v.into();
676 self
677 }
678
679 pub async fn send(self) -> Result<longrunning::model::Operation> {
686 (*self.0.stub)
687 .undelete_private_cloud(self.0.request, self.0.options)
688 .await
689 .map(gax::response::Response::into_body)
690 }
691
692 pub fn poller(
694 self,
695 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
696 type Operation = lro::internal::Operation<
697 crate::model::PrivateCloud,
698 crate::model::OperationMetadata,
699 >;
700 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
701 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
702
703 let stub = self.0.stub.clone();
704 let mut options = self.0.options.clone();
705 options.set_retry_policy(gax::retry_policy::NeverRetry);
706 let query = move |name| {
707 let stub = stub.clone();
708 let options = options.clone();
709 async {
710 let op = GetOperation::new(stub)
711 .set_name(name)
712 .with_options(options)
713 .send()
714 .await?;
715 Ok(Operation::new(op))
716 }
717 };
718
719 let start = move || async {
720 let op = self.send().await?;
721 Ok(Operation::new(op))
722 };
723
724 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
725 }
726
727 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
731 self.0.request.name = v.into();
732 self
733 }
734
735 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
737 self.0.request.request_id = v.into();
738 self
739 }
740 }
741
742 #[doc(hidden)]
743 impl gax::options::internal::RequestBuilder for UndeletePrivateCloud {
744 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
745 &mut self.0.options
746 }
747 }
748
749 #[derive(Clone, Debug)]
770 pub struct ListClusters(RequestBuilder<crate::model::ListClustersRequest>);
771
772 impl ListClusters {
773 pub(crate) fn new(
774 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
775 ) -> Self {
776 Self(RequestBuilder::new(stub))
777 }
778
779 pub fn with_request<V: Into<crate::model::ListClustersRequest>>(mut self, v: V) -> Self {
781 self.0.request = v.into();
782 self
783 }
784
785 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
787 self.0.options = v.into();
788 self
789 }
790
791 pub async fn send(self) -> Result<crate::model::ListClustersResponse> {
793 (*self.0.stub)
794 .list_clusters(self.0.request, self.0.options)
795 .await
796 .map(gax::response::Response::into_body)
797 }
798
799 pub fn by_page(
801 self,
802 ) -> impl gax::paginator::Paginator<crate::model::ListClustersResponse, gax::error::Error>
803 {
804 use std::clone::Clone;
805 let token = self.0.request.page_token.clone();
806 let execute = move |token: String| {
807 let mut builder = self.clone();
808 builder.0.request = builder.0.request.set_page_token(token);
809 builder.send()
810 };
811 gax::paginator::internal::new_paginator(token, execute)
812 }
813
814 pub fn by_item(
816 self,
817 ) -> impl gax::paginator::ItemPaginator<crate::model::ListClustersResponse, gax::error::Error>
818 {
819 use gax::paginator::Paginator;
820 self.by_page().items()
821 }
822
823 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
827 self.0.request.parent = v.into();
828 self
829 }
830
831 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
833 self.0.request.page_size = v.into();
834 self
835 }
836
837 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
839 self.0.request.page_token = v.into();
840 self
841 }
842
843 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
845 self.0.request.filter = v.into();
846 self
847 }
848
849 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
851 self.0.request.order_by = v.into();
852 self
853 }
854 }
855
856 #[doc(hidden)]
857 impl gax::options::internal::RequestBuilder for ListClusters {
858 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
859 &mut self.0.options
860 }
861 }
862
863 #[derive(Clone, Debug)]
880 pub struct GetCluster(RequestBuilder<crate::model::GetClusterRequest>);
881
882 impl GetCluster {
883 pub(crate) fn new(
884 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
885 ) -> Self {
886 Self(RequestBuilder::new(stub))
887 }
888
889 pub fn with_request<V: Into<crate::model::GetClusterRequest>>(mut self, v: V) -> Self {
891 self.0.request = v.into();
892 self
893 }
894
895 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
897 self.0.options = v.into();
898 self
899 }
900
901 pub async fn send(self) -> Result<crate::model::Cluster> {
903 (*self.0.stub)
904 .get_cluster(self.0.request, self.0.options)
905 .await
906 .map(gax::response::Response::into_body)
907 }
908
909 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
913 self.0.request.name = v.into();
914 self
915 }
916 }
917
918 #[doc(hidden)]
919 impl gax::options::internal::RequestBuilder for GetCluster {
920 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
921 &mut self.0.options
922 }
923 }
924
925 #[derive(Clone, Debug)]
943 pub struct CreateCluster(RequestBuilder<crate::model::CreateClusterRequest>);
944
945 impl CreateCluster {
946 pub(crate) fn new(
947 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
948 ) -> Self {
949 Self(RequestBuilder::new(stub))
950 }
951
952 pub fn with_request<V: Into<crate::model::CreateClusterRequest>>(mut self, v: V) -> Self {
954 self.0.request = v.into();
955 self
956 }
957
958 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
960 self.0.options = v.into();
961 self
962 }
963
964 pub async fn send(self) -> Result<longrunning::model::Operation> {
971 (*self.0.stub)
972 .create_cluster(self.0.request, self.0.options)
973 .await
974 .map(gax::response::Response::into_body)
975 }
976
977 pub fn poller(
979 self,
980 ) -> impl lro::Poller<crate::model::Cluster, crate::model::OperationMetadata> {
981 type Operation =
982 lro::internal::Operation<crate::model::Cluster, crate::model::OperationMetadata>;
983 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
984 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
985
986 let stub = self.0.stub.clone();
987 let mut options = self.0.options.clone();
988 options.set_retry_policy(gax::retry_policy::NeverRetry);
989 let query = move |name| {
990 let stub = stub.clone();
991 let options = options.clone();
992 async {
993 let op = GetOperation::new(stub)
994 .set_name(name)
995 .with_options(options)
996 .send()
997 .await?;
998 Ok(Operation::new(op))
999 }
1000 };
1001
1002 let start = move || async {
1003 let op = self.send().await?;
1004 Ok(Operation::new(op))
1005 };
1006
1007 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1008 }
1009
1010 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1014 self.0.request.parent = v.into();
1015 self
1016 }
1017
1018 pub fn set_cluster_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1022 self.0.request.cluster_id = v.into();
1023 self
1024 }
1025
1026 pub fn set_cluster<T: Into<std::option::Option<crate::model::Cluster>>>(
1030 mut self,
1031 v: T,
1032 ) -> Self {
1033 self.0.request.cluster = v.into();
1034 self
1035 }
1036
1037 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1039 self.0.request.request_id = v.into();
1040 self
1041 }
1042
1043 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1045 self.0.request.validate_only = v.into();
1046 self
1047 }
1048 }
1049
1050 #[doc(hidden)]
1051 impl gax::options::internal::RequestBuilder for CreateCluster {
1052 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1053 &mut self.0.options
1054 }
1055 }
1056
1057 #[derive(Clone, Debug)]
1075 pub struct UpdateCluster(RequestBuilder<crate::model::UpdateClusterRequest>);
1076
1077 impl UpdateCluster {
1078 pub(crate) fn new(
1079 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1080 ) -> Self {
1081 Self(RequestBuilder::new(stub))
1082 }
1083
1084 pub fn with_request<V: Into<crate::model::UpdateClusterRequest>>(mut self, v: V) -> Self {
1086 self.0.request = v.into();
1087 self
1088 }
1089
1090 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1092 self.0.options = v.into();
1093 self
1094 }
1095
1096 pub async fn send(self) -> Result<longrunning::model::Operation> {
1103 (*self.0.stub)
1104 .update_cluster(self.0.request, self.0.options)
1105 .await
1106 .map(gax::response::Response::into_body)
1107 }
1108
1109 pub fn poller(
1111 self,
1112 ) -> impl lro::Poller<crate::model::Cluster, crate::model::OperationMetadata> {
1113 type Operation =
1114 lro::internal::Operation<crate::model::Cluster, crate::model::OperationMetadata>;
1115 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1116 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1117
1118 let stub = self.0.stub.clone();
1119 let mut options = self.0.options.clone();
1120 options.set_retry_policy(gax::retry_policy::NeverRetry);
1121 let query = move |name| {
1122 let stub = stub.clone();
1123 let options = options.clone();
1124 async {
1125 let op = GetOperation::new(stub)
1126 .set_name(name)
1127 .with_options(options)
1128 .send()
1129 .await?;
1130 Ok(Operation::new(op))
1131 }
1132 };
1133
1134 let start = move || async {
1135 let op = self.send().await?;
1136 Ok(Operation::new(op))
1137 };
1138
1139 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1140 }
1141
1142 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
1146 mut self,
1147 v: T,
1148 ) -> Self {
1149 self.0.request.update_mask = v.into();
1150 self
1151 }
1152
1153 pub fn set_cluster<T: Into<std::option::Option<crate::model::Cluster>>>(
1157 mut self,
1158 v: T,
1159 ) -> Self {
1160 self.0.request.cluster = v.into();
1161 self
1162 }
1163
1164 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1166 self.0.request.request_id = v.into();
1167 self
1168 }
1169
1170 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1172 self.0.request.validate_only = v.into();
1173 self
1174 }
1175 }
1176
1177 #[doc(hidden)]
1178 impl gax::options::internal::RequestBuilder for UpdateCluster {
1179 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1180 &mut self.0.options
1181 }
1182 }
1183
1184 #[derive(Clone, Debug)]
1202 pub struct DeleteCluster(RequestBuilder<crate::model::DeleteClusterRequest>);
1203
1204 impl DeleteCluster {
1205 pub(crate) fn new(
1206 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1207 ) -> Self {
1208 Self(RequestBuilder::new(stub))
1209 }
1210
1211 pub fn with_request<V: Into<crate::model::DeleteClusterRequest>>(mut self, v: V) -> Self {
1213 self.0.request = v.into();
1214 self
1215 }
1216
1217 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1219 self.0.options = v.into();
1220 self
1221 }
1222
1223 pub async fn send(self) -> Result<longrunning::model::Operation> {
1230 (*self.0.stub)
1231 .delete_cluster(self.0.request, self.0.options)
1232 .await
1233 .map(gax::response::Response::into_body)
1234 }
1235
1236 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
1238 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1239 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1240 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1241
1242 let stub = self.0.stub.clone();
1243 let mut options = self.0.options.clone();
1244 options.set_retry_policy(gax::retry_policy::NeverRetry);
1245 let query = move |name| {
1246 let stub = stub.clone();
1247 let options = options.clone();
1248 async {
1249 let op = GetOperation::new(stub)
1250 .set_name(name)
1251 .with_options(options)
1252 .send()
1253 .await?;
1254 Ok(Operation::new(op))
1255 }
1256 };
1257
1258 let start = move || async {
1259 let op = self.send().await?;
1260 Ok(Operation::new(op))
1261 };
1262
1263 lro::internal::new_unit_response_poller(
1264 polling_error_policy,
1265 polling_backoff_policy,
1266 start,
1267 query,
1268 )
1269 }
1270
1271 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1275 self.0.request.name = v.into();
1276 self
1277 }
1278
1279 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1281 self.0.request.request_id = v.into();
1282 self
1283 }
1284 }
1285
1286 #[doc(hidden)]
1287 impl gax::options::internal::RequestBuilder for DeleteCluster {
1288 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1289 &mut self.0.options
1290 }
1291 }
1292
1293 #[derive(Clone, Debug)]
1314 pub struct ListNodes(RequestBuilder<crate::model::ListNodesRequest>);
1315
1316 impl ListNodes {
1317 pub(crate) fn new(
1318 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1319 ) -> Self {
1320 Self(RequestBuilder::new(stub))
1321 }
1322
1323 pub fn with_request<V: Into<crate::model::ListNodesRequest>>(mut self, v: V) -> Self {
1325 self.0.request = v.into();
1326 self
1327 }
1328
1329 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1331 self.0.options = v.into();
1332 self
1333 }
1334
1335 pub async fn send(self) -> Result<crate::model::ListNodesResponse> {
1337 (*self.0.stub)
1338 .list_nodes(self.0.request, self.0.options)
1339 .await
1340 .map(gax::response::Response::into_body)
1341 }
1342
1343 pub fn by_page(
1345 self,
1346 ) -> impl gax::paginator::Paginator<crate::model::ListNodesResponse, gax::error::Error>
1347 {
1348 use std::clone::Clone;
1349 let token = self.0.request.page_token.clone();
1350 let execute = move |token: String| {
1351 let mut builder = self.clone();
1352 builder.0.request = builder.0.request.set_page_token(token);
1353 builder.send()
1354 };
1355 gax::paginator::internal::new_paginator(token, execute)
1356 }
1357
1358 pub fn by_item(
1360 self,
1361 ) -> impl gax::paginator::ItemPaginator<crate::model::ListNodesResponse, gax::error::Error>
1362 {
1363 use gax::paginator::Paginator;
1364 self.by_page().items()
1365 }
1366
1367 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1371 self.0.request.parent = v.into();
1372 self
1373 }
1374
1375 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1377 self.0.request.page_size = v.into();
1378 self
1379 }
1380
1381 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1383 self.0.request.page_token = v.into();
1384 self
1385 }
1386 }
1387
1388 #[doc(hidden)]
1389 impl gax::options::internal::RequestBuilder for ListNodes {
1390 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1391 &mut self.0.options
1392 }
1393 }
1394
1395 #[derive(Clone, Debug)]
1412 pub struct GetNode(RequestBuilder<crate::model::GetNodeRequest>);
1413
1414 impl GetNode {
1415 pub(crate) fn new(
1416 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1417 ) -> Self {
1418 Self(RequestBuilder::new(stub))
1419 }
1420
1421 pub fn with_request<V: Into<crate::model::GetNodeRequest>>(mut self, v: V) -> Self {
1423 self.0.request = v.into();
1424 self
1425 }
1426
1427 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1429 self.0.options = v.into();
1430 self
1431 }
1432
1433 pub async fn send(self) -> Result<crate::model::Node> {
1435 (*self.0.stub)
1436 .get_node(self.0.request, self.0.options)
1437 .await
1438 .map(gax::response::Response::into_body)
1439 }
1440
1441 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1445 self.0.request.name = v.into();
1446 self
1447 }
1448 }
1449
1450 #[doc(hidden)]
1451 impl gax::options::internal::RequestBuilder for GetNode {
1452 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1453 &mut self.0.options
1454 }
1455 }
1456
1457 #[derive(Clone, Debug)]
1478 pub struct ListExternalAddresses(RequestBuilder<crate::model::ListExternalAddressesRequest>);
1479
1480 impl ListExternalAddresses {
1481 pub(crate) fn new(
1482 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1483 ) -> Self {
1484 Self(RequestBuilder::new(stub))
1485 }
1486
1487 pub fn with_request<V: Into<crate::model::ListExternalAddressesRequest>>(
1489 mut self,
1490 v: V,
1491 ) -> Self {
1492 self.0.request = v.into();
1493 self
1494 }
1495
1496 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1498 self.0.options = v.into();
1499 self
1500 }
1501
1502 pub async fn send(self) -> Result<crate::model::ListExternalAddressesResponse> {
1504 (*self.0.stub)
1505 .list_external_addresses(self.0.request, self.0.options)
1506 .await
1507 .map(gax::response::Response::into_body)
1508 }
1509
1510 pub fn by_page(
1512 self,
1513 ) -> impl gax::paginator::Paginator<crate::model::ListExternalAddressesResponse, gax::error::Error>
1514 {
1515 use std::clone::Clone;
1516 let token = self.0.request.page_token.clone();
1517 let execute = move |token: String| {
1518 let mut builder = self.clone();
1519 builder.0.request = builder.0.request.set_page_token(token);
1520 builder.send()
1521 };
1522 gax::paginator::internal::new_paginator(token, execute)
1523 }
1524
1525 pub fn by_item(
1527 self,
1528 ) -> impl gax::paginator::ItemPaginator<
1529 crate::model::ListExternalAddressesResponse,
1530 gax::error::Error,
1531 > {
1532 use gax::paginator::Paginator;
1533 self.by_page().items()
1534 }
1535
1536 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1540 self.0.request.parent = v.into();
1541 self
1542 }
1543
1544 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1546 self.0.request.page_size = v.into();
1547 self
1548 }
1549
1550 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1552 self.0.request.page_token = v.into();
1553 self
1554 }
1555
1556 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1558 self.0.request.filter = v.into();
1559 self
1560 }
1561
1562 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1564 self.0.request.order_by = v.into();
1565 self
1566 }
1567 }
1568
1569 #[doc(hidden)]
1570 impl gax::options::internal::RequestBuilder for ListExternalAddresses {
1571 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1572 &mut self.0.options
1573 }
1574 }
1575
1576 #[derive(Clone, Debug)]
1597 pub struct FetchNetworkPolicyExternalAddresses(
1598 RequestBuilder<crate::model::FetchNetworkPolicyExternalAddressesRequest>,
1599 );
1600
1601 impl FetchNetworkPolicyExternalAddresses {
1602 pub(crate) fn new(
1603 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1604 ) -> Self {
1605 Self(RequestBuilder::new(stub))
1606 }
1607
1608 pub fn with_request<V: Into<crate::model::FetchNetworkPolicyExternalAddressesRequest>>(
1610 mut self,
1611 v: V,
1612 ) -> Self {
1613 self.0.request = v.into();
1614 self
1615 }
1616
1617 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1619 self.0.options = v.into();
1620 self
1621 }
1622
1623 pub async fn send(
1625 self,
1626 ) -> Result<crate::model::FetchNetworkPolicyExternalAddressesResponse> {
1627 (*self.0.stub)
1628 .fetch_network_policy_external_addresses(self.0.request, self.0.options)
1629 .await
1630 .map(gax::response::Response::into_body)
1631 }
1632
1633 pub fn by_page(
1635 self,
1636 ) -> impl gax::paginator::Paginator<
1637 crate::model::FetchNetworkPolicyExternalAddressesResponse,
1638 gax::error::Error,
1639 > {
1640 use std::clone::Clone;
1641 let token = self.0.request.page_token.clone();
1642 let execute = move |token: String| {
1643 let mut builder = self.clone();
1644 builder.0.request = builder.0.request.set_page_token(token);
1645 builder.send()
1646 };
1647 gax::paginator::internal::new_paginator(token, execute)
1648 }
1649
1650 pub fn by_item(
1652 self,
1653 ) -> impl gax::paginator::ItemPaginator<
1654 crate::model::FetchNetworkPolicyExternalAddressesResponse,
1655 gax::error::Error,
1656 > {
1657 use gax::paginator::Paginator;
1658 self.by_page().items()
1659 }
1660
1661 pub fn set_network_policy<T: Into<std::string::String>>(mut self, v: T) -> Self {
1665 self.0.request.network_policy = v.into();
1666 self
1667 }
1668
1669 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1671 self.0.request.page_size = v.into();
1672 self
1673 }
1674
1675 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1677 self.0.request.page_token = v.into();
1678 self
1679 }
1680 }
1681
1682 #[doc(hidden)]
1683 impl gax::options::internal::RequestBuilder for FetchNetworkPolicyExternalAddresses {
1684 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1685 &mut self.0.options
1686 }
1687 }
1688
1689 #[derive(Clone, Debug)]
1706 pub struct GetExternalAddress(RequestBuilder<crate::model::GetExternalAddressRequest>);
1707
1708 impl GetExternalAddress {
1709 pub(crate) fn new(
1710 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1711 ) -> Self {
1712 Self(RequestBuilder::new(stub))
1713 }
1714
1715 pub fn with_request<V: Into<crate::model::GetExternalAddressRequest>>(
1717 mut self,
1718 v: V,
1719 ) -> Self {
1720 self.0.request = v.into();
1721 self
1722 }
1723
1724 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1726 self.0.options = v.into();
1727 self
1728 }
1729
1730 pub async fn send(self) -> Result<crate::model::ExternalAddress> {
1732 (*self.0.stub)
1733 .get_external_address(self.0.request, self.0.options)
1734 .await
1735 .map(gax::response::Response::into_body)
1736 }
1737
1738 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1742 self.0.request.name = v.into();
1743 self
1744 }
1745 }
1746
1747 #[doc(hidden)]
1748 impl gax::options::internal::RequestBuilder for GetExternalAddress {
1749 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1750 &mut self.0.options
1751 }
1752 }
1753
1754 #[derive(Clone, Debug)]
1772 pub struct CreateExternalAddress(RequestBuilder<crate::model::CreateExternalAddressRequest>);
1773
1774 impl CreateExternalAddress {
1775 pub(crate) fn new(
1776 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1777 ) -> Self {
1778 Self(RequestBuilder::new(stub))
1779 }
1780
1781 pub fn with_request<V: Into<crate::model::CreateExternalAddressRequest>>(
1783 mut self,
1784 v: V,
1785 ) -> Self {
1786 self.0.request = v.into();
1787 self
1788 }
1789
1790 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1792 self.0.options = v.into();
1793 self
1794 }
1795
1796 pub async fn send(self) -> Result<longrunning::model::Operation> {
1803 (*self.0.stub)
1804 .create_external_address(self.0.request, self.0.options)
1805 .await
1806 .map(gax::response::Response::into_body)
1807 }
1808
1809 pub fn poller(
1811 self,
1812 ) -> impl lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
1813 {
1814 type Operation = lro::internal::Operation<
1815 crate::model::ExternalAddress,
1816 crate::model::OperationMetadata,
1817 >;
1818 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1819 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1820
1821 let stub = self.0.stub.clone();
1822 let mut options = self.0.options.clone();
1823 options.set_retry_policy(gax::retry_policy::NeverRetry);
1824 let query = move |name| {
1825 let stub = stub.clone();
1826 let options = options.clone();
1827 async {
1828 let op = GetOperation::new(stub)
1829 .set_name(name)
1830 .with_options(options)
1831 .send()
1832 .await?;
1833 Ok(Operation::new(op))
1834 }
1835 };
1836
1837 let start = move || async {
1838 let op = self.send().await?;
1839 Ok(Operation::new(op))
1840 };
1841
1842 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1843 }
1844
1845 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1849 self.0.request.parent = v.into();
1850 self
1851 }
1852
1853 pub fn set_external_address<T: Into<std::option::Option<crate::model::ExternalAddress>>>(
1857 mut self,
1858 v: T,
1859 ) -> Self {
1860 self.0.request.external_address = v.into();
1861 self
1862 }
1863
1864 pub fn set_external_address_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1868 self.0.request.external_address_id = v.into();
1869 self
1870 }
1871
1872 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1874 self.0.request.request_id = v.into();
1875 self
1876 }
1877 }
1878
1879 #[doc(hidden)]
1880 impl gax::options::internal::RequestBuilder for CreateExternalAddress {
1881 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1882 &mut self.0.options
1883 }
1884 }
1885
1886 #[derive(Clone, Debug)]
1904 pub struct UpdateExternalAddress(RequestBuilder<crate::model::UpdateExternalAddressRequest>);
1905
1906 impl UpdateExternalAddress {
1907 pub(crate) fn new(
1908 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
1909 ) -> Self {
1910 Self(RequestBuilder::new(stub))
1911 }
1912
1913 pub fn with_request<V: Into<crate::model::UpdateExternalAddressRequest>>(
1915 mut self,
1916 v: V,
1917 ) -> Self {
1918 self.0.request = v.into();
1919 self
1920 }
1921
1922 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1924 self.0.options = v.into();
1925 self
1926 }
1927
1928 pub async fn send(self) -> Result<longrunning::model::Operation> {
1935 (*self.0.stub)
1936 .update_external_address(self.0.request, self.0.options)
1937 .await
1938 .map(gax::response::Response::into_body)
1939 }
1940
1941 pub fn poller(
1943 self,
1944 ) -> impl lro::Poller<crate::model::ExternalAddress, crate::model::OperationMetadata>
1945 {
1946 type Operation = lro::internal::Operation<
1947 crate::model::ExternalAddress,
1948 crate::model::OperationMetadata,
1949 >;
1950 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1951 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1952
1953 let stub = self.0.stub.clone();
1954 let mut options = self.0.options.clone();
1955 options.set_retry_policy(gax::retry_policy::NeverRetry);
1956 let query = move |name| {
1957 let stub = stub.clone();
1958 let options = options.clone();
1959 async {
1960 let op = GetOperation::new(stub)
1961 .set_name(name)
1962 .with_options(options)
1963 .send()
1964 .await?;
1965 Ok(Operation::new(op))
1966 }
1967 };
1968
1969 let start = move || async {
1970 let op = self.send().await?;
1971 Ok(Operation::new(op))
1972 };
1973
1974 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1975 }
1976
1977 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
1981 mut self,
1982 v: T,
1983 ) -> Self {
1984 self.0.request.update_mask = v.into();
1985 self
1986 }
1987
1988 pub fn set_external_address<T: Into<std::option::Option<crate::model::ExternalAddress>>>(
1992 mut self,
1993 v: T,
1994 ) -> Self {
1995 self.0.request.external_address = v.into();
1996 self
1997 }
1998
1999 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2001 self.0.request.request_id = v.into();
2002 self
2003 }
2004 }
2005
2006 #[doc(hidden)]
2007 impl gax::options::internal::RequestBuilder for UpdateExternalAddress {
2008 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2009 &mut self.0.options
2010 }
2011 }
2012
2013 #[derive(Clone, Debug)]
2031 pub struct DeleteExternalAddress(RequestBuilder<crate::model::DeleteExternalAddressRequest>);
2032
2033 impl DeleteExternalAddress {
2034 pub(crate) fn new(
2035 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2036 ) -> Self {
2037 Self(RequestBuilder::new(stub))
2038 }
2039
2040 pub fn with_request<V: Into<crate::model::DeleteExternalAddressRequest>>(
2042 mut self,
2043 v: V,
2044 ) -> Self {
2045 self.0.request = v.into();
2046 self
2047 }
2048
2049 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2051 self.0.options = v.into();
2052 self
2053 }
2054
2055 pub async fn send(self) -> Result<longrunning::model::Operation> {
2062 (*self.0.stub)
2063 .delete_external_address(self.0.request, self.0.options)
2064 .await
2065 .map(gax::response::Response::into_body)
2066 }
2067
2068 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
2070 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2071 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2072 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2073
2074 let stub = self.0.stub.clone();
2075 let mut options = self.0.options.clone();
2076 options.set_retry_policy(gax::retry_policy::NeverRetry);
2077 let query = move |name| {
2078 let stub = stub.clone();
2079 let options = options.clone();
2080 async {
2081 let op = GetOperation::new(stub)
2082 .set_name(name)
2083 .with_options(options)
2084 .send()
2085 .await?;
2086 Ok(Operation::new(op))
2087 }
2088 };
2089
2090 let start = move || async {
2091 let op = self.send().await?;
2092 Ok(Operation::new(op))
2093 };
2094
2095 lro::internal::new_unit_response_poller(
2096 polling_error_policy,
2097 polling_backoff_policy,
2098 start,
2099 query,
2100 )
2101 }
2102
2103 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2107 self.0.request.name = v.into();
2108 self
2109 }
2110
2111 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2113 self.0.request.request_id = v.into();
2114 self
2115 }
2116 }
2117
2118 #[doc(hidden)]
2119 impl gax::options::internal::RequestBuilder for DeleteExternalAddress {
2120 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2121 &mut self.0.options
2122 }
2123 }
2124
2125 #[derive(Clone, Debug)]
2146 pub struct ListSubnets(RequestBuilder<crate::model::ListSubnetsRequest>);
2147
2148 impl ListSubnets {
2149 pub(crate) fn new(
2150 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2151 ) -> Self {
2152 Self(RequestBuilder::new(stub))
2153 }
2154
2155 pub fn with_request<V: Into<crate::model::ListSubnetsRequest>>(mut self, v: V) -> Self {
2157 self.0.request = v.into();
2158 self
2159 }
2160
2161 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2163 self.0.options = v.into();
2164 self
2165 }
2166
2167 pub async fn send(self) -> Result<crate::model::ListSubnetsResponse> {
2169 (*self.0.stub)
2170 .list_subnets(self.0.request, self.0.options)
2171 .await
2172 .map(gax::response::Response::into_body)
2173 }
2174
2175 pub fn by_page(
2177 self,
2178 ) -> impl gax::paginator::Paginator<crate::model::ListSubnetsResponse, gax::error::Error>
2179 {
2180 use std::clone::Clone;
2181 let token = self.0.request.page_token.clone();
2182 let execute = move |token: String| {
2183 let mut builder = self.clone();
2184 builder.0.request = builder.0.request.set_page_token(token);
2185 builder.send()
2186 };
2187 gax::paginator::internal::new_paginator(token, execute)
2188 }
2189
2190 pub fn by_item(
2192 self,
2193 ) -> impl gax::paginator::ItemPaginator<crate::model::ListSubnetsResponse, gax::error::Error>
2194 {
2195 use gax::paginator::Paginator;
2196 self.by_page().items()
2197 }
2198
2199 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2203 self.0.request.parent = v.into();
2204 self
2205 }
2206
2207 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2209 self.0.request.page_size = v.into();
2210 self
2211 }
2212
2213 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2215 self.0.request.page_token = v.into();
2216 self
2217 }
2218 }
2219
2220 #[doc(hidden)]
2221 impl gax::options::internal::RequestBuilder for ListSubnets {
2222 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2223 &mut self.0.options
2224 }
2225 }
2226
2227 #[derive(Clone, Debug)]
2244 pub struct GetSubnet(RequestBuilder<crate::model::GetSubnetRequest>);
2245
2246 impl GetSubnet {
2247 pub(crate) fn new(
2248 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2249 ) -> Self {
2250 Self(RequestBuilder::new(stub))
2251 }
2252
2253 pub fn with_request<V: Into<crate::model::GetSubnetRequest>>(mut self, v: V) -> Self {
2255 self.0.request = v.into();
2256 self
2257 }
2258
2259 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2261 self.0.options = v.into();
2262 self
2263 }
2264
2265 pub async fn send(self) -> Result<crate::model::Subnet> {
2267 (*self.0.stub)
2268 .get_subnet(self.0.request, self.0.options)
2269 .await
2270 .map(gax::response::Response::into_body)
2271 }
2272
2273 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2277 self.0.request.name = v.into();
2278 self
2279 }
2280 }
2281
2282 #[doc(hidden)]
2283 impl gax::options::internal::RequestBuilder for GetSubnet {
2284 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2285 &mut self.0.options
2286 }
2287 }
2288
2289 #[derive(Clone, Debug)]
2307 pub struct UpdateSubnet(RequestBuilder<crate::model::UpdateSubnetRequest>);
2308
2309 impl UpdateSubnet {
2310 pub(crate) fn new(
2311 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2312 ) -> Self {
2313 Self(RequestBuilder::new(stub))
2314 }
2315
2316 pub fn with_request<V: Into<crate::model::UpdateSubnetRequest>>(mut self, v: V) -> Self {
2318 self.0.request = v.into();
2319 self
2320 }
2321
2322 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2324 self.0.options = v.into();
2325 self
2326 }
2327
2328 pub async fn send(self) -> Result<longrunning::model::Operation> {
2335 (*self.0.stub)
2336 .update_subnet(self.0.request, self.0.options)
2337 .await
2338 .map(gax::response::Response::into_body)
2339 }
2340
2341 pub fn poller(
2343 self,
2344 ) -> impl lro::Poller<crate::model::Subnet, crate::model::OperationMetadata> {
2345 type Operation =
2346 lro::internal::Operation<crate::model::Subnet, crate::model::OperationMetadata>;
2347 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2348 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2349
2350 let stub = self.0.stub.clone();
2351 let mut options = self.0.options.clone();
2352 options.set_retry_policy(gax::retry_policy::NeverRetry);
2353 let query = move |name| {
2354 let stub = stub.clone();
2355 let options = options.clone();
2356 async {
2357 let op = GetOperation::new(stub)
2358 .set_name(name)
2359 .with_options(options)
2360 .send()
2361 .await?;
2362 Ok(Operation::new(op))
2363 }
2364 };
2365
2366 let start = move || async {
2367 let op = self.send().await?;
2368 Ok(Operation::new(op))
2369 };
2370
2371 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2372 }
2373
2374 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
2378 mut self,
2379 v: T,
2380 ) -> Self {
2381 self.0.request.update_mask = v.into();
2382 self
2383 }
2384
2385 pub fn set_subnet<T: Into<std::option::Option<crate::model::Subnet>>>(
2389 mut self,
2390 v: T,
2391 ) -> Self {
2392 self.0.request.subnet = v.into();
2393 self
2394 }
2395 }
2396
2397 #[doc(hidden)]
2398 impl gax::options::internal::RequestBuilder for UpdateSubnet {
2399 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2400 &mut self.0.options
2401 }
2402 }
2403
2404 #[derive(Clone, Debug)]
2425 pub struct ListExternalAccessRules(
2426 RequestBuilder<crate::model::ListExternalAccessRulesRequest>,
2427 );
2428
2429 impl ListExternalAccessRules {
2430 pub(crate) fn new(
2431 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2432 ) -> Self {
2433 Self(RequestBuilder::new(stub))
2434 }
2435
2436 pub fn with_request<V: Into<crate::model::ListExternalAccessRulesRequest>>(
2438 mut self,
2439 v: V,
2440 ) -> Self {
2441 self.0.request = v.into();
2442 self
2443 }
2444
2445 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2447 self.0.options = v.into();
2448 self
2449 }
2450
2451 pub async fn send(self) -> Result<crate::model::ListExternalAccessRulesResponse> {
2453 (*self.0.stub)
2454 .list_external_access_rules(self.0.request, self.0.options)
2455 .await
2456 .map(gax::response::Response::into_body)
2457 }
2458
2459 pub fn by_page(
2461 self,
2462 ) -> impl gax::paginator::Paginator<
2463 crate::model::ListExternalAccessRulesResponse,
2464 gax::error::Error,
2465 > {
2466 use std::clone::Clone;
2467 let token = self.0.request.page_token.clone();
2468 let execute = move |token: String| {
2469 let mut builder = self.clone();
2470 builder.0.request = builder.0.request.set_page_token(token);
2471 builder.send()
2472 };
2473 gax::paginator::internal::new_paginator(token, execute)
2474 }
2475
2476 pub fn by_item(
2478 self,
2479 ) -> impl gax::paginator::ItemPaginator<
2480 crate::model::ListExternalAccessRulesResponse,
2481 gax::error::Error,
2482 > {
2483 use gax::paginator::Paginator;
2484 self.by_page().items()
2485 }
2486
2487 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2491 self.0.request.parent = v.into();
2492 self
2493 }
2494
2495 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2497 self.0.request.page_size = v.into();
2498 self
2499 }
2500
2501 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2503 self.0.request.page_token = v.into();
2504 self
2505 }
2506
2507 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2509 self.0.request.filter = v.into();
2510 self
2511 }
2512
2513 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2515 self.0.request.order_by = v.into();
2516 self
2517 }
2518 }
2519
2520 #[doc(hidden)]
2521 impl gax::options::internal::RequestBuilder for ListExternalAccessRules {
2522 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2523 &mut self.0.options
2524 }
2525 }
2526
2527 #[derive(Clone, Debug)]
2544 pub struct GetExternalAccessRule(RequestBuilder<crate::model::GetExternalAccessRuleRequest>);
2545
2546 impl GetExternalAccessRule {
2547 pub(crate) fn new(
2548 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2549 ) -> Self {
2550 Self(RequestBuilder::new(stub))
2551 }
2552
2553 pub fn with_request<V: Into<crate::model::GetExternalAccessRuleRequest>>(
2555 mut self,
2556 v: V,
2557 ) -> Self {
2558 self.0.request = v.into();
2559 self
2560 }
2561
2562 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2564 self.0.options = v.into();
2565 self
2566 }
2567
2568 pub async fn send(self) -> Result<crate::model::ExternalAccessRule> {
2570 (*self.0.stub)
2571 .get_external_access_rule(self.0.request, self.0.options)
2572 .await
2573 .map(gax::response::Response::into_body)
2574 }
2575
2576 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2580 self.0.request.name = v.into();
2581 self
2582 }
2583 }
2584
2585 #[doc(hidden)]
2586 impl gax::options::internal::RequestBuilder for GetExternalAccessRule {
2587 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2588 &mut self.0.options
2589 }
2590 }
2591
2592 #[derive(Clone, Debug)]
2610 pub struct CreateExternalAccessRule(
2611 RequestBuilder<crate::model::CreateExternalAccessRuleRequest>,
2612 );
2613
2614 impl CreateExternalAccessRule {
2615 pub(crate) fn new(
2616 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2617 ) -> Self {
2618 Self(RequestBuilder::new(stub))
2619 }
2620
2621 pub fn with_request<V: Into<crate::model::CreateExternalAccessRuleRequest>>(
2623 mut self,
2624 v: V,
2625 ) -> Self {
2626 self.0.request = v.into();
2627 self
2628 }
2629
2630 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2632 self.0.options = v.into();
2633 self
2634 }
2635
2636 pub async fn send(self) -> Result<longrunning::model::Operation> {
2643 (*self.0.stub)
2644 .create_external_access_rule(self.0.request, self.0.options)
2645 .await
2646 .map(gax::response::Response::into_body)
2647 }
2648
2649 pub fn poller(
2651 self,
2652 ) -> impl lro::Poller<crate::model::ExternalAccessRule, crate::model::OperationMetadata>
2653 {
2654 type Operation = lro::internal::Operation<
2655 crate::model::ExternalAccessRule,
2656 crate::model::OperationMetadata,
2657 >;
2658 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2659 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2660
2661 let stub = self.0.stub.clone();
2662 let mut options = self.0.options.clone();
2663 options.set_retry_policy(gax::retry_policy::NeverRetry);
2664 let query = move |name| {
2665 let stub = stub.clone();
2666 let options = options.clone();
2667 async {
2668 let op = GetOperation::new(stub)
2669 .set_name(name)
2670 .with_options(options)
2671 .send()
2672 .await?;
2673 Ok(Operation::new(op))
2674 }
2675 };
2676
2677 let start = move || async {
2678 let op = self.send().await?;
2679 Ok(Operation::new(op))
2680 };
2681
2682 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2683 }
2684
2685 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2689 self.0.request.parent = v.into();
2690 self
2691 }
2692
2693 pub fn set_external_access_rule<
2697 T: Into<std::option::Option<crate::model::ExternalAccessRule>>,
2698 >(
2699 mut self,
2700 v: T,
2701 ) -> Self {
2702 self.0.request.external_access_rule = v.into();
2703 self
2704 }
2705
2706 pub fn set_external_access_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2710 self.0.request.external_access_rule_id = v.into();
2711 self
2712 }
2713
2714 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2716 self.0.request.request_id = v.into();
2717 self
2718 }
2719 }
2720
2721 #[doc(hidden)]
2722 impl gax::options::internal::RequestBuilder for CreateExternalAccessRule {
2723 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2724 &mut self.0.options
2725 }
2726 }
2727
2728 #[derive(Clone, Debug)]
2746 pub struct UpdateExternalAccessRule(
2747 RequestBuilder<crate::model::UpdateExternalAccessRuleRequest>,
2748 );
2749
2750 impl UpdateExternalAccessRule {
2751 pub(crate) fn new(
2752 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2753 ) -> Self {
2754 Self(RequestBuilder::new(stub))
2755 }
2756
2757 pub fn with_request<V: Into<crate::model::UpdateExternalAccessRuleRequest>>(
2759 mut self,
2760 v: V,
2761 ) -> Self {
2762 self.0.request = v.into();
2763 self
2764 }
2765
2766 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2768 self.0.options = v.into();
2769 self
2770 }
2771
2772 pub async fn send(self) -> Result<longrunning::model::Operation> {
2779 (*self.0.stub)
2780 .update_external_access_rule(self.0.request, self.0.options)
2781 .await
2782 .map(gax::response::Response::into_body)
2783 }
2784
2785 pub fn poller(
2787 self,
2788 ) -> impl lro::Poller<crate::model::ExternalAccessRule, crate::model::OperationMetadata>
2789 {
2790 type Operation = lro::internal::Operation<
2791 crate::model::ExternalAccessRule,
2792 crate::model::OperationMetadata,
2793 >;
2794 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2795 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2796
2797 let stub = self.0.stub.clone();
2798 let mut options = self.0.options.clone();
2799 options.set_retry_policy(gax::retry_policy::NeverRetry);
2800 let query = move |name| {
2801 let stub = stub.clone();
2802 let options = options.clone();
2803 async {
2804 let op = GetOperation::new(stub)
2805 .set_name(name)
2806 .with_options(options)
2807 .send()
2808 .await?;
2809 Ok(Operation::new(op))
2810 }
2811 };
2812
2813 let start = move || async {
2814 let op = self.send().await?;
2815 Ok(Operation::new(op))
2816 };
2817
2818 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2819 }
2820
2821 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
2825 mut self,
2826 v: T,
2827 ) -> Self {
2828 self.0.request.update_mask = v.into();
2829 self
2830 }
2831
2832 pub fn set_external_access_rule<
2836 T: Into<std::option::Option<crate::model::ExternalAccessRule>>,
2837 >(
2838 mut self,
2839 v: T,
2840 ) -> Self {
2841 self.0.request.external_access_rule = v.into();
2842 self
2843 }
2844
2845 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2847 self.0.request.request_id = v.into();
2848 self
2849 }
2850 }
2851
2852 #[doc(hidden)]
2853 impl gax::options::internal::RequestBuilder for UpdateExternalAccessRule {
2854 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2855 &mut self.0.options
2856 }
2857 }
2858
2859 #[derive(Clone, Debug)]
2877 pub struct DeleteExternalAccessRule(
2878 RequestBuilder<crate::model::DeleteExternalAccessRuleRequest>,
2879 );
2880
2881 impl DeleteExternalAccessRule {
2882 pub(crate) fn new(
2883 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2884 ) -> Self {
2885 Self(RequestBuilder::new(stub))
2886 }
2887
2888 pub fn with_request<V: Into<crate::model::DeleteExternalAccessRuleRequest>>(
2890 mut self,
2891 v: V,
2892 ) -> Self {
2893 self.0.request = v.into();
2894 self
2895 }
2896
2897 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2899 self.0.options = v.into();
2900 self
2901 }
2902
2903 pub async fn send(self) -> Result<longrunning::model::Operation> {
2910 (*self.0.stub)
2911 .delete_external_access_rule(self.0.request, self.0.options)
2912 .await
2913 .map(gax::response::Response::into_body)
2914 }
2915
2916 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
2918 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2919 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2920 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2921
2922 let stub = self.0.stub.clone();
2923 let mut options = self.0.options.clone();
2924 options.set_retry_policy(gax::retry_policy::NeverRetry);
2925 let query = move |name| {
2926 let stub = stub.clone();
2927 let options = options.clone();
2928 async {
2929 let op = GetOperation::new(stub)
2930 .set_name(name)
2931 .with_options(options)
2932 .send()
2933 .await?;
2934 Ok(Operation::new(op))
2935 }
2936 };
2937
2938 let start = move || async {
2939 let op = self.send().await?;
2940 Ok(Operation::new(op))
2941 };
2942
2943 lro::internal::new_unit_response_poller(
2944 polling_error_policy,
2945 polling_backoff_policy,
2946 start,
2947 query,
2948 )
2949 }
2950
2951 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2955 self.0.request.name = v.into();
2956 self
2957 }
2958
2959 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2961 self.0.request.request_id = v.into();
2962 self
2963 }
2964 }
2965
2966 #[doc(hidden)]
2967 impl gax::options::internal::RequestBuilder for DeleteExternalAccessRule {
2968 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2969 &mut self.0.options
2970 }
2971 }
2972
2973 #[derive(Clone, Debug)]
2994 pub struct ListLoggingServers(RequestBuilder<crate::model::ListLoggingServersRequest>);
2995
2996 impl ListLoggingServers {
2997 pub(crate) fn new(
2998 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
2999 ) -> Self {
3000 Self(RequestBuilder::new(stub))
3001 }
3002
3003 pub fn with_request<V: Into<crate::model::ListLoggingServersRequest>>(
3005 mut self,
3006 v: V,
3007 ) -> Self {
3008 self.0.request = v.into();
3009 self
3010 }
3011
3012 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3014 self.0.options = v.into();
3015 self
3016 }
3017
3018 pub async fn send(self) -> Result<crate::model::ListLoggingServersResponse> {
3020 (*self.0.stub)
3021 .list_logging_servers(self.0.request, self.0.options)
3022 .await
3023 .map(gax::response::Response::into_body)
3024 }
3025
3026 pub fn by_page(
3028 self,
3029 ) -> impl gax::paginator::Paginator<crate::model::ListLoggingServersResponse, gax::error::Error>
3030 {
3031 use std::clone::Clone;
3032 let token = self.0.request.page_token.clone();
3033 let execute = move |token: String| {
3034 let mut builder = self.clone();
3035 builder.0.request = builder.0.request.set_page_token(token);
3036 builder.send()
3037 };
3038 gax::paginator::internal::new_paginator(token, execute)
3039 }
3040
3041 pub fn by_item(
3043 self,
3044 ) -> impl gax::paginator::ItemPaginator<
3045 crate::model::ListLoggingServersResponse,
3046 gax::error::Error,
3047 > {
3048 use gax::paginator::Paginator;
3049 self.by_page().items()
3050 }
3051
3052 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3056 self.0.request.parent = v.into();
3057 self
3058 }
3059
3060 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3062 self.0.request.page_size = v.into();
3063 self
3064 }
3065
3066 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3068 self.0.request.page_token = v.into();
3069 self
3070 }
3071
3072 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3074 self.0.request.filter = v.into();
3075 self
3076 }
3077
3078 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3080 self.0.request.order_by = v.into();
3081 self
3082 }
3083 }
3084
3085 #[doc(hidden)]
3086 impl gax::options::internal::RequestBuilder for ListLoggingServers {
3087 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3088 &mut self.0.options
3089 }
3090 }
3091
3092 #[derive(Clone, Debug)]
3109 pub struct GetLoggingServer(RequestBuilder<crate::model::GetLoggingServerRequest>);
3110
3111 impl GetLoggingServer {
3112 pub(crate) fn new(
3113 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3114 ) -> Self {
3115 Self(RequestBuilder::new(stub))
3116 }
3117
3118 pub fn with_request<V: Into<crate::model::GetLoggingServerRequest>>(
3120 mut self,
3121 v: V,
3122 ) -> Self {
3123 self.0.request = v.into();
3124 self
3125 }
3126
3127 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3129 self.0.options = v.into();
3130 self
3131 }
3132
3133 pub async fn send(self) -> Result<crate::model::LoggingServer> {
3135 (*self.0.stub)
3136 .get_logging_server(self.0.request, self.0.options)
3137 .await
3138 .map(gax::response::Response::into_body)
3139 }
3140
3141 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3145 self.0.request.name = v.into();
3146 self
3147 }
3148 }
3149
3150 #[doc(hidden)]
3151 impl gax::options::internal::RequestBuilder for GetLoggingServer {
3152 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3153 &mut self.0.options
3154 }
3155 }
3156
3157 #[derive(Clone, Debug)]
3175 pub struct CreateLoggingServer(RequestBuilder<crate::model::CreateLoggingServerRequest>);
3176
3177 impl CreateLoggingServer {
3178 pub(crate) fn new(
3179 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3180 ) -> Self {
3181 Self(RequestBuilder::new(stub))
3182 }
3183
3184 pub fn with_request<V: Into<crate::model::CreateLoggingServerRequest>>(
3186 mut self,
3187 v: V,
3188 ) -> Self {
3189 self.0.request = v.into();
3190 self
3191 }
3192
3193 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3195 self.0.options = v.into();
3196 self
3197 }
3198
3199 pub async fn send(self) -> Result<longrunning::model::Operation> {
3206 (*self.0.stub)
3207 .create_logging_server(self.0.request, self.0.options)
3208 .await
3209 .map(gax::response::Response::into_body)
3210 }
3211
3212 pub fn poller(
3214 self,
3215 ) -> impl lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3216 {
3217 type Operation = lro::internal::Operation<
3218 crate::model::LoggingServer,
3219 crate::model::OperationMetadata,
3220 >;
3221 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3222 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3223
3224 let stub = self.0.stub.clone();
3225 let mut options = self.0.options.clone();
3226 options.set_retry_policy(gax::retry_policy::NeverRetry);
3227 let query = move |name| {
3228 let stub = stub.clone();
3229 let options = options.clone();
3230 async {
3231 let op = GetOperation::new(stub)
3232 .set_name(name)
3233 .with_options(options)
3234 .send()
3235 .await?;
3236 Ok(Operation::new(op))
3237 }
3238 };
3239
3240 let start = move || async {
3241 let op = self.send().await?;
3242 Ok(Operation::new(op))
3243 };
3244
3245 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3246 }
3247
3248 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3252 self.0.request.parent = v.into();
3253 self
3254 }
3255
3256 pub fn set_logging_server<T: Into<std::option::Option<crate::model::LoggingServer>>>(
3260 mut self,
3261 v: T,
3262 ) -> Self {
3263 self.0.request.logging_server = v.into();
3264 self
3265 }
3266
3267 pub fn set_logging_server_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3271 self.0.request.logging_server_id = v.into();
3272 self
3273 }
3274
3275 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3277 self.0.request.request_id = v.into();
3278 self
3279 }
3280 }
3281
3282 #[doc(hidden)]
3283 impl gax::options::internal::RequestBuilder for CreateLoggingServer {
3284 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3285 &mut self.0.options
3286 }
3287 }
3288
3289 #[derive(Clone, Debug)]
3307 pub struct UpdateLoggingServer(RequestBuilder<crate::model::UpdateLoggingServerRequest>);
3308
3309 impl UpdateLoggingServer {
3310 pub(crate) fn new(
3311 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3312 ) -> Self {
3313 Self(RequestBuilder::new(stub))
3314 }
3315
3316 pub fn with_request<V: Into<crate::model::UpdateLoggingServerRequest>>(
3318 mut self,
3319 v: V,
3320 ) -> Self {
3321 self.0.request = v.into();
3322 self
3323 }
3324
3325 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3327 self.0.options = v.into();
3328 self
3329 }
3330
3331 pub async fn send(self) -> Result<longrunning::model::Operation> {
3338 (*self.0.stub)
3339 .update_logging_server(self.0.request, self.0.options)
3340 .await
3341 .map(gax::response::Response::into_body)
3342 }
3343
3344 pub fn poller(
3346 self,
3347 ) -> impl lro::Poller<crate::model::LoggingServer, crate::model::OperationMetadata>
3348 {
3349 type Operation = lro::internal::Operation<
3350 crate::model::LoggingServer,
3351 crate::model::OperationMetadata,
3352 >;
3353 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3354 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3355
3356 let stub = self.0.stub.clone();
3357 let mut options = self.0.options.clone();
3358 options.set_retry_policy(gax::retry_policy::NeverRetry);
3359 let query = move |name| {
3360 let stub = stub.clone();
3361 let options = options.clone();
3362 async {
3363 let op = GetOperation::new(stub)
3364 .set_name(name)
3365 .with_options(options)
3366 .send()
3367 .await?;
3368 Ok(Operation::new(op))
3369 }
3370 };
3371
3372 let start = move || async {
3373 let op = self.send().await?;
3374 Ok(Operation::new(op))
3375 };
3376
3377 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3378 }
3379
3380 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
3384 mut self,
3385 v: T,
3386 ) -> Self {
3387 self.0.request.update_mask = v.into();
3388 self
3389 }
3390
3391 pub fn set_logging_server<T: Into<std::option::Option<crate::model::LoggingServer>>>(
3395 mut self,
3396 v: T,
3397 ) -> Self {
3398 self.0.request.logging_server = v.into();
3399 self
3400 }
3401
3402 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3404 self.0.request.request_id = v.into();
3405 self
3406 }
3407 }
3408
3409 #[doc(hidden)]
3410 impl gax::options::internal::RequestBuilder for UpdateLoggingServer {
3411 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3412 &mut self.0.options
3413 }
3414 }
3415
3416 #[derive(Clone, Debug)]
3434 pub struct DeleteLoggingServer(RequestBuilder<crate::model::DeleteLoggingServerRequest>);
3435
3436 impl DeleteLoggingServer {
3437 pub(crate) fn new(
3438 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3439 ) -> Self {
3440 Self(RequestBuilder::new(stub))
3441 }
3442
3443 pub fn with_request<V: Into<crate::model::DeleteLoggingServerRequest>>(
3445 mut self,
3446 v: V,
3447 ) -> Self {
3448 self.0.request = v.into();
3449 self
3450 }
3451
3452 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3454 self.0.options = v.into();
3455 self
3456 }
3457
3458 pub async fn send(self) -> Result<longrunning::model::Operation> {
3465 (*self.0.stub)
3466 .delete_logging_server(self.0.request, self.0.options)
3467 .await
3468 .map(gax::response::Response::into_body)
3469 }
3470
3471 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3473 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3474 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3475 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3476
3477 let stub = self.0.stub.clone();
3478 let mut options = self.0.options.clone();
3479 options.set_retry_policy(gax::retry_policy::NeverRetry);
3480 let query = move |name| {
3481 let stub = stub.clone();
3482 let options = options.clone();
3483 async {
3484 let op = GetOperation::new(stub)
3485 .set_name(name)
3486 .with_options(options)
3487 .send()
3488 .await?;
3489 Ok(Operation::new(op))
3490 }
3491 };
3492
3493 let start = move || async {
3494 let op = self.send().await?;
3495 Ok(Operation::new(op))
3496 };
3497
3498 lro::internal::new_unit_response_poller(
3499 polling_error_policy,
3500 polling_backoff_policy,
3501 start,
3502 query,
3503 )
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 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3516 self.0.request.request_id = v.into();
3517 self
3518 }
3519 }
3520
3521 #[doc(hidden)]
3522 impl gax::options::internal::RequestBuilder for DeleteLoggingServer {
3523 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3524 &mut self.0.options
3525 }
3526 }
3527
3528 #[derive(Clone, Debug)]
3549 pub struct ListNodeTypes(RequestBuilder<crate::model::ListNodeTypesRequest>);
3550
3551 impl ListNodeTypes {
3552 pub(crate) fn new(
3553 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3554 ) -> Self {
3555 Self(RequestBuilder::new(stub))
3556 }
3557
3558 pub fn with_request<V: Into<crate::model::ListNodeTypesRequest>>(mut self, v: V) -> Self {
3560 self.0.request = v.into();
3561 self
3562 }
3563
3564 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3566 self.0.options = v.into();
3567 self
3568 }
3569
3570 pub async fn send(self) -> Result<crate::model::ListNodeTypesResponse> {
3572 (*self.0.stub)
3573 .list_node_types(self.0.request, self.0.options)
3574 .await
3575 .map(gax::response::Response::into_body)
3576 }
3577
3578 pub fn by_page(
3580 self,
3581 ) -> impl gax::paginator::Paginator<crate::model::ListNodeTypesResponse, gax::error::Error>
3582 {
3583 use std::clone::Clone;
3584 let token = self.0.request.page_token.clone();
3585 let execute = move |token: String| {
3586 let mut builder = self.clone();
3587 builder.0.request = builder.0.request.set_page_token(token);
3588 builder.send()
3589 };
3590 gax::paginator::internal::new_paginator(token, execute)
3591 }
3592
3593 pub fn by_item(
3595 self,
3596 ) -> impl gax::paginator::ItemPaginator<crate::model::ListNodeTypesResponse, gax::error::Error>
3597 {
3598 use gax::paginator::Paginator;
3599 self.by_page().items()
3600 }
3601
3602 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3606 self.0.request.parent = v.into();
3607 self
3608 }
3609
3610 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3612 self.0.request.page_size = v.into();
3613 self
3614 }
3615
3616 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3618 self.0.request.page_token = v.into();
3619 self
3620 }
3621
3622 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3624 self.0.request.filter = v.into();
3625 self
3626 }
3627 }
3628
3629 #[doc(hidden)]
3630 impl gax::options::internal::RequestBuilder for ListNodeTypes {
3631 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3632 &mut self.0.options
3633 }
3634 }
3635
3636 #[derive(Clone, Debug)]
3653 pub struct GetNodeType(RequestBuilder<crate::model::GetNodeTypeRequest>);
3654
3655 impl GetNodeType {
3656 pub(crate) fn new(
3657 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3658 ) -> Self {
3659 Self(RequestBuilder::new(stub))
3660 }
3661
3662 pub fn with_request<V: Into<crate::model::GetNodeTypeRequest>>(mut self, v: V) -> Self {
3664 self.0.request = v.into();
3665 self
3666 }
3667
3668 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3670 self.0.options = v.into();
3671 self
3672 }
3673
3674 pub async fn send(self) -> Result<crate::model::NodeType> {
3676 (*self.0.stub)
3677 .get_node_type(self.0.request, self.0.options)
3678 .await
3679 .map(gax::response::Response::into_body)
3680 }
3681
3682 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3686 self.0.request.name = v.into();
3687 self
3688 }
3689 }
3690
3691 #[doc(hidden)]
3692 impl gax::options::internal::RequestBuilder for GetNodeType {
3693 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3694 &mut self.0.options
3695 }
3696 }
3697
3698 #[derive(Clone, Debug)]
3715 pub struct ShowNsxCredentials(RequestBuilder<crate::model::ShowNsxCredentialsRequest>);
3716
3717 impl ShowNsxCredentials {
3718 pub(crate) fn new(
3719 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3720 ) -> Self {
3721 Self(RequestBuilder::new(stub))
3722 }
3723
3724 pub fn with_request<V: Into<crate::model::ShowNsxCredentialsRequest>>(
3726 mut self,
3727 v: V,
3728 ) -> Self {
3729 self.0.request = v.into();
3730 self
3731 }
3732
3733 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3735 self.0.options = v.into();
3736 self
3737 }
3738
3739 pub async fn send(self) -> Result<crate::model::Credentials> {
3741 (*self.0.stub)
3742 .show_nsx_credentials(self.0.request, self.0.options)
3743 .await
3744 .map(gax::response::Response::into_body)
3745 }
3746
3747 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
3751 self.0.request.private_cloud = v.into();
3752 self
3753 }
3754 }
3755
3756 #[doc(hidden)]
3757 impl gax::options::internal::RequestBuilder for ShowNsxCredentials {
3758 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3759 &mut self.0.options
3760 }
3761 }
3762
3763 #[derive(Clone, Debug)]
3780 pub struct ShowVcenterCredentials(RequestBuilder<crate::model::ShowVcenterCredentialsRequest>);
3781
3782 impl ShowVcenterCredentials {
3783 pub(crate) fn new(
3784 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3785 ) -> Self {
3786 Self(RequestBuilder::new(stub))
3787 }
3788
3789 pub fn with_request<V: Into<crate::model::ShowVcenterCredentialsRequest>>(
3791 mut self,
3792 v: V,
3793 ) -> Self {
3794 self.0.request = v.into();
3795 self
3796 }
3797
3798 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3800 self.0.options = v.into();
3801 self
3802 }
3803
3804 pub async fn send(self) -> Result<crate::model::Credentials> {
3806 (*self.0.stub)
3807 .show_vcenter_credentials(self.0.request, self.0.options)
3808 .await
3809 .map(gax::response::Response::into_body)
3810 }
3811
3812 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
3816 self.0.request.private_cloud = v.into();
3817 self
3818 }
3819
3820 pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
3822 self.0.request.username = v.into();
3823 self
3824 }
3825 }
3826
3827 #[doc(hidden)]
3828 impl gax::options::internal::RequestBuilder for ShowVcenterCredentials {
3829 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3830 &mut self.0.options
3831 }
3832 }
3833
3834 #[derive(Clone, Debug)]
3852 pub struct ResetNsxCredentials(RequestBuilder<crate::model::ResetNsxCredentialsRequest>);
3853
3854 impl ResetNsxCredentials {
3855 pub(crate) fn new(
3856 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3857 ) -> Self {
3858 Self(RequestBuilder::new(stub))
3859 }
3860
3861 pub fn with_request<V: Into<crate::model::ResetNsxCredentialsRequest>>(
3863 mut self,
3864 v: V,
3865 ) -> Self {
3866 self.0.request = v.into();
3867 self
3868 }
3869
3870 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3872 self.0.options = v.into();
3873 self
3874 }
3875
3876 pub async fn send(self) -> Result<longrunning::model::Operation> {
3883 (*self.0.stub)
3884 .reset_nsx_credentials(self.0.request, self.0.options)
3885 .await
3886 .map(gax::response::Response::into_body)
3887 }
3888
3889 pub fn poller(
3891 self,
3892 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
3893 type Operation = lro::internal::Operation<
3894 crate::model::PrivateCloud,
3895 crate::model::OperationMetadata,
3896 >;
3897 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3898 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3899
3900 let stub = self.0.stub.clone();
3901 let mut options = self.0.options.clone();
3902 options.set_retry_policy(gax::retry_policy::NeverRetry);
3903 let query = move |name| {
3904 let stub = stub.clone();
3905 let options = options.clone();
3906 async {
3907 let op = GetOperation::new(stub)
3908 .set_name(name)
3909 .with_options(options)
3910 .send()
3911 .await?;
3912 Ok(Operation::new(op))
3913 }
3914 };
3915
3916 let start = move || async {
3917 let op = self.send().await?;
3918 Ok(Operation::new(op))
3919 };
3920
3921 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3922 }
3923
3924 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
3928 self.0.request.private_cloud = v.into();
3929 self
3930 }
3931
3932 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3934 self.0.request.request_id = v.into();
3935 self
3936 }
3937 }
3938
3939 #[doc(hidden)]
3940 impl gax::options::internal::RequestBuilder for ResetNsxCredentials {
3941 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3942 &mut self.0.options
3943 }
3944 }
3945
3946 #[derive(Clone, Debug)]
3964 pub struct ResetVcenterCredentials(
3965 RequestBuilder<crate::model::ResetVcenterCredentialsRequest>,
3966 );
3967
3968 impl ResetVcenterCredentials {
3969 pub(crate) fn new(
3970 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
3971 ) -> Self {
3972 Self(RequestBuilder::new(stub))
3973 }
3974
3975 pub fn with_request<V: Into<crate::model::ResetVcenterCredentialsRequest>>(
3977 mut self,
3978 v: V,
3979 ) -> Self {
3980 self.0.request = v.into();
3981 self
3982 }
3983
3984 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3986 self.0.options = v.into();
3987 self
3988 }
3989
3990 pub async fn send(self) -> Result<longrunning::model::Operation> {
3997 (*self.0.stub)
3998 .reset_vcenter_credentials(self.0.request, self.0.options)
3999 .await
4000 .map(gax::response::Response::into_body)
4001 }
4002
4003 pub fn poller(
4005 self,
4006 ) -> impl lro::Poller<crate::model::PrivateCloud, crate::model::OperationMetadata> {
4007 type Operation = lro::internal::Operation<
4008 crate::model::PrivateCloud,
4009 crate::model::OperationMetadata,
4010 >;
4011 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4012 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4013
4014 let stub = self.0.stub.clone();
4015 let mut options = self.0.options.clone();
4016 options.set_retry_policy(gax::retry_policy::NeverRetry);
4017 let query = move |name| {
4018 let stub = stub.clone();
4019 let options = options.clone();
4020 async {
4021 let op = GetOperation::new(stub)
4022 .set_name(name)
4023 .with_options(options)
4024 .send()
4025 .await?;
4026 Ok(Operation::new(op))
4027 }
4028 };
4029
4030 let start = move || async {
4031 let op = self.send().await?;
4032 Ok(Operation::new(op))
4033 };
4034
4035 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4036 }
4037
4038 pub fn set_private_cloud<T: Into<std::string::String>>(mut self, v: T) -> Self {
4042 self.0.request.private_cloud = v.into();
4043 self
4044 }
4045
4046 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4048 self.0.request.request_id = v.into();
4049 self
4050 }
4051
4052 pub fn set_username<T: Into<std::string::String>>(mut self, v: T) -> Self {
4054 self.0.request.username = v.into();
4055 self
4056 }
4057 }
4058
4059 #[doc(hidden)]
4060 impl gax::options::internal::RequestBuilder for ResetVcenterCredentials {
4061 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4062 &mut self.0.options
4063 }
4064 }
4065
4066 #[derive(Clone, Debug)]
4083 pub struct GetDnsForwarding(RequestBuilder<crate::model::GetDnsForwardingRequest>);
4084
4085 impl GetDnsForwarding {
4086 pub(crate) fn new(
4087 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4088 ) -> Self {
4089 Self(RequestBuilder::new(stub))
4090 }
4091
4092 pub fn with_request<V: Into<crate::model::GetDnsForwardingRequest>>(
4094 mut self,
4095 v: V,
4096 ) -> Self {
4097 self.0.request = v.into();
4098 self
4099 }
4100
4101 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4103 self.0.options = v.into();
4104 self
4105 }
4106
4107 pub async fn send(self) -> Result<crate::model::DnsForwarding> {
4109 (*self.0.stub)
4110 .get_dns_forwarding(self.0.request, self.0.options)
4111 .await
4112 .map(gax::response::Response::into_body)
4113 }
4114
4115 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4119 self.0.request.name = v.into();
4120 self
4121 }
4122 }
4123
4124 #[doc(hidden)]
4125 impl gax::options::internal::RequestBuilder for GetDnsForwarding {
4126 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4127 &mut self.0.options
4128 }
4129 }
4130
4131 #[derive(Clone, Debug)]
4149 pub struct UpdateDnsForwarding(RequestBuilder<crate::model::UpdateDnsForwardingRequest>);
4150
4151 impl UpdateDnsForwarding {
4152 pub(crate) fn new(
4153 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4154 ) -> Self {
4155 Self(RequestBuilder::new(stub))
4156 }
4157
4158 pub fn with_request<V: Into<crate::model::UpdateDnsForwardingRequest>>(
4160 mut self,
4161 v: V,
4162 ) -> Self {
4163 self.0.request = v.into();
4164 self
4165 }
4166
4167 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4169 self.0.options = v.into();
4170 self
4171 }
4172
4173 pub async fn send(self) -> Result<longrunning::model::Operation> {
4180 (*self.0.stub)
4181 .update_dns_forwarding(self.0.request, self.0.options)
4182 .await
4183 .map(gax::response::Response::into_body)
4184 }
4185
4186 pub fn poller(
4188 self,
4189 ) -> impl lro::Poller<crate::model::DnsForwarding, crate::model::OperationMetadata>
4190 {
4191 type Operation = lro::internal::Operation<
4192 crate::model::DnsForwarding,
4193 crate::model::OperationMetadata,
4194 >;
4195 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4196 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4197
4198 let stub = self.0.stub.clone();
4199 let mut options = self.0.options.clone();
4200 options.set_retry_policy(gax::retry_policy::NeverRetry);
4201 let query = move |name| {
4202 let stub = stub.clone();
4203 let options = options.clone();
4204 async {
4205 let op = GetOperation::new(stub)
4206 .set_name(name)
4207 .with_options(options)
4208 .send()
4209 .await?;
4210 Ok(Operation::new(op))
4211 }
4212 };
4213
4214 let start = move || async {
4215 let op = self.send().await?;
4216 Ok(Operation::new(op))
4217 };
4218
4219 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4220 }
4221
4222 pub fn set_dns_forwarding<T: Into<std::option::Option<crate::model::DnsForwarding>>>(
4226 mut self,
4227 v: T,
4228 ) -> Self {
4229 self.0.request.dns_forwarding = v.into();
4230 self
4231 }
4232
4233 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
4237 mut self,
4238 v: T,
4239 ) -> Self {
4240 self.0.request.update_mask = v.into();
4241 self
4242 }
4243
4244 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4246 self.0.request.request_id = v.into();
4247 self
4248 }
4249 }
4250
4251 #[doc(hidden)]
4252 impl gax::options::internal::RequestBuilder for UpdateDnsForwarding {
4253 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4254 &mut self.0.options
4255 }
4256 }
4257
4258 #[derive(Clone, Debug)]
4275 pub struct GetNetworkPeering(RequestBuilder<crate::model::GetNetworkPeeringRequest>);
4276
4277 impl GetNetworkPeering {
4278 pub(crate) fn new(
4279 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4280 ) -> Self {
4281 Self(RequestBuilder::new(stub))
4282 }
4283
4284 pub fn with_request<V: Into<crate::model::GetNetworkPeeringRequest>>(
4286 mut self,
4287 v: V,
4288 ) -> Self {
4289 self.0.request = v.into();
4290 self
4291 }
4292
4293 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4295 self.0.options = v.into();
4296 self
4297 }
4298
4299 pub async fn send(self) -> Result<crate::model::NetworkPeering> {
4301 (*self.0.stub)
4302 .get_network_peering(self.0.request, self.0.options)
4303 .await
4304 .map(gax::response::Response::into_body)
4305 }
4306
4307 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4311 self.0.request.name = v.into();
4312 self
4313 }
4314 }
4315
4316 #[doc(hidden)]
4317 impl gax::options::internal::RequestBuilder for GetNetworkPeering {
4318 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4319 &mut self.0.options
4320 }
4321 }
4322
4323 #[derive(Clone, Debug)]
4344 pub struct ListNetworkPeerings(RequestBuilder<crate::model::ListNetworkPeeringsRequest>);
4345
4346 impl ListNetworkPeerings {
4347 pub(crate) fn new(
4348 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4349 ) -> Self {
4350 Self(RequestBuilder::new(stub))
4351 }
4352
4353 pub fn with_request<V: Into<crate::model::ListNetworkPeeringsRequest>>(
4355 mut self,
4356 v: V,
4357 ) -> Self {
4358 self.0.request = v.into();
4359 self
4360 }
4361
4362 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4364 self.0.options = v.into();
4365 self
4366 }
4367
4368 pub async fn send(self) -> Result<crate::model::ListNetworkPeeringsResponse> {
4370 (*self.0.stub)
4371 .list_network_peerings(self.0.request, self.0.options)
4372 .await
4373 .map(gax::response::Response::into_body)
4374 }
4375
4376 pub fn by_page(
4378 self,
4379 ) -> impl gax::paginator::Paginator<crate::model::ListNetworkPeeringsResponse, gax::error::Error>
4380 {
4381 use std::clone::Clone;
4382 let token = self.0.request.page_token.clone();
4383 let execute = move |token: String| {
4384 let mut builder = self.clone();
4385 builder.0.request = builder.0.request.set_page_token(token);
4386 builder.send()
4387 };
4388 gax::paginator::internal::new_paginator(token, execute)
4389 }
4390
4391 pub fn by_item(
4393 self,
4394 ) -> impl gax::paginator::ItemPaginator<
4395 crate::model::ListNetworkPeeringsResponse,
4396 gax::error::Error,
4397 > {
4398 use gax::paginator::Paginator;
4399 self.by_page().items()
4400 }
4401
4402 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4406 self.0.request.parent = v.into();
4407 self
4408 }
4409
4410 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4412 self.0.request.page_size = v.into();
4413 self
4414 }
4415
4416 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4418 self.0.request.page_token = v.into();
4419 self
4420 }
4421
4422 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4424 self.0.request.filter = v.into();
4425 self
4426 }
4427
4428 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4430 self.0.request.order_by = v.into();
4431 self
4432 }
4433 }
4434
4435 #[doc(hidden)]
4436 impl gax::options::internal::RequestBuilder for ListNetworkPeerings {
4437 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4438 &mut self.0.options
4439 }
4440 }
4441
4442 #[derive(Clone, Debug)]
4460 pub struct CreateNetworkPeering(RequestBuilder<crate::model::CreateNetworkPeeringRequest>);
4461
4462 impl CreateNetworkPeering {
4463 pub(crate) fn new(
4464 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4465 ) -> Self {
4466 Self(RequestBuilder::new(stub))
4467 }
4468
4469 pub fn with_request<V: Into<crate::model::CreateNetworkPeeringRequest>>(
4471 mut self,
4472 v: V,
4473 ) -> Self {
4474 self.0.request = v.into();
4475 self
4476 }
4477
4478 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4480 self.0.options = v.into();
4481 self
4482 }
4483
4484 pub async fn send(self) -> Result<longrunning::model::Operation> {
4491 (*self.0.stub)
4492 .create_network_peering(self.0.request, self.0.options)
4493 .await
4494 .map(gax::response::Response::into_body)
4495 }
4496
4497 pub fn poller(
4499 self,
4500 ) -> impl lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
4501 {
4502 type Operation = lro::internal::Operation<
4503 crate::model::NetworkPeering,
4504 crate::model::OperationMetadata,
4505 >;
4506 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4507 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4508
4509 let stub = self.0.stub.clone();
4510 let mut options = self.0.options.clone();
4511 options.set_retry_policy(gax::retry_policy::NeverRetry);
4512 let query = move |name| {
4513 let stub = stub.clone();
4514 let options = options.clone();
4515 async {
4516 let op = GetOperation::new(stub)
4517 .set_name(name)
4518 .with_options(options)
4519 .send()
4520 .await?;
4521 Ok(Operation::new(op))
4522 }
4523 };
4524
4525 let start = move || async {
4526 let op = self.send().await?;
4527 Ok(Operation::new(op))
4528 };
4529
4530 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4531 }
4532
4533 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4537 self.0.request.parent = v.into();
4538 self
4539 }
4540
4541 pub fn set_network_peering_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4545 self.0.request.network_peering_id = v.into();
4546 self
4547 }
4548
4549 pub fn set_network_peering<T: Into<std::option::Option<crate::model::NetworkPeering>>>(
4553 mut self,
4554 v: T,
4555 ) -> Self {
4556 self.0.request.network_peering = v.into();
4557 self
4558 }
4559
4560 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4562 self.0.request.request_id = v.into();
4563 self
4564 }
4565 }
4566
4567 #[doc(hidden)]
4568 impl gax::options::internal::RequestBuilder for CreateNetworkPeering {
4569 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4570 &mut self.0.options
4571 }
4572 }
4573
4574 #[derive(Clone, Debug)]
4592 pub struct DeleteNetworkPeering(RequestBuilder<crate::model::DeleteNetworkPeeringRequest>);
4593
4594 impl DeleteNetworkPeering {
4595 pub(crate) fn new(
4596 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4597 ) -> Self {
4598 Self(RequestBuilder::new(stub))
4599 }
4600
4601 pub fn with_request<V: Into<crate::model::DeleteNetworkPeeringRequest>>(
4603 mut self,
4604 v: V,
4605 ) -> Self {
4606 self.0.request = v.into();
4607 self
4608 }
4609
4610 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4612 self.0.options = v.into();
4613 self
4614 }
4615
4616 pub async fn send(self) -> Result<longrunning::model::Operation> {
4623 (*self.0.stub)
4624 .delete_network_peering(self.0.request, self.0.options)
4625 .await
4626 .map(gax::response::Response::into_body)
4627 }
4628
4629 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
4631 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4632 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4633 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4634
4635 let stub = self.0.stub.clone();
4636 let mut options = self.0.options.clone();
4637 options.set_retry_policy(gax::retry_policy::NeverRetry);
4638 let query = move |name| {
4639 let stub = stub.clone();
4640 let options = options.clone();
4641 async {
4642 let op = GetOperation::new(stub)
4643 .set_name(name)
4644 .with_options(options)
4645 .send()
4646 .await?;
4647 Ok(Operation::new(op))
4648 }
4649 };
4650
4651 let start = move || async {
4652 let op = self.send().await?;
4653 Ok(Operation::new(op))
4654 };
4655
4656 lro::internal::new_unit_response_poller(
4657 polling_error_policy,
4658 polling_backoff_policy,
4659 start,
4660 query,
4661 )
4662 }
4663
4664 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4668 self.0.request.name = v.into();
4669 self
4670 }
4671
4672 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4674 self.0.request.request_id = v.into();
4675 self
4676 }
4677 }
4678
4679 #[doc(hidden)]
4680 impl gax::options::internal::RequestBuilder for DeleteNetworkPeering {
4681 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4682 &mut self.0.options
4683 }
4684 }
4685
4686 #[derive(Clone, Debug)]
4704 pub struct UpdateNetworkPeering(RequestBuilder<crate::model::UpdateNetworkPeeringRequest>);
4705
4706 impl UpdateNetworkPeering {
4707 pub(crate) fn new(
4708 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4709 ) -> Self {
4710 Self(RequestBuilder::new(stub))
4711 }
4712
4713 pub fn with_request<V: Into<crate::model::UpdateNetworkPeeringRequest>>(
4715 mut self,
4716 v: V,
4717 ) -> Self {
4718 self.0.request = v.into();
4719 self
4720 }
4721
4722 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4724 self.0.options = v.into();
4725 self
4726 }
4727
4728 pub async fn send(self) -> Result<longrunning::model::Operation> {
4735 (*self.0.stub)
4736 .update_network_peering(self.0.request, self.0.options)
4737 .await
4738 .map(gax::response::Response::into_body)
4739 }
4740
4741 pub fn poller(
4743 self,
4744 ) -> impl lro::Poller<crate::model::NetworkPeering, crate::model::OperationMetadata>
4745 {
4746 type Operation = lro::internal::Operation<
4747 crate::model::NetworkPeering,
4748 crate::model::OperationMetadata,
4749 >;
4750 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4751 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4752
4753 let stub = self.0.stub.clone();
4754 let mut options = self.0.options.clone();
4755 options.set_retry_policy(gax::retry_policy::NeverRetry);
4756 let query = move |name| {
4757 let stub = stub.clone();
4758 let options = options.clone();
4759 async {
4760 let op = GetOperation::new(stub)
4761 .set_name(name)
4762 .with_options(options)
4763 .send()
4764 .await?;
4765 Ok(Operation::new(op))
4766 }
4767 };
4768
4769 let start = move || async {
4770 let op = self.send().await?;
4771 Ok(Operation::new(op))
4772 };
4773
4774 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4775 }
4776
4777 pub fn set_network_peering<T: Into<std::option::Option<crate::model::NetworkPeering>>>(
4781 mut self,
4782 v: T,
4783 ) -> Self {
4784 self.0.request.network_peering = v.into();
4785 self
4786 }
4787
4788 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
4792 mut self,
4793 v: T,
4794 ) -> Self {
4795 self.0.request.update_mask = v.into();
4796 self
4797 }
4798
4799 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4801 self.0.request.request_id = v.into();
4802 self
4803 }
4804 }
4805
4806 #[doc(hidden)]
4807 impl gax::options::internal::RequestBuilder for UpdateNetworkPeering {
4808 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4809 &mut self.0.options
4810 }
4811 }
4812
4813 #[derive(Clone, Debug)]
4834 pub struct ListPeeringRoutes(RequestBuilder<crate::model::ListPeeringRoutesRequest>);
4835
4836 impl ListPeeringRoutes {
4837 pub(crate) fn new(
4838 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4839 ) -> Self {
4840 Self(RequestBuilder::new(stub))
4841 }
4842
4843 pub fn with_request<V: Into<crate::model::ListPeeringRoutesRequest>>(
4845 mut self,
4846 v: V,
4847 ) -> Self {
4848 self.0.request = v.into();
4849 self
4850 }
4851
4852 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4854 self.0.options = v.into();
4855 self
4856 }
4857
4858 pub async fn send(self) -> Result<crate::model::ListPeeringRoutesResponse> {
4860 (*self.0.stub)
4861 .list_peering_routes(self.0.request, self.0.options)
4862 .await
4863 .map(gax::response::Response::into_body)
4864 }
4865
4866 pub fn by_page(
4868 self,
4869 ) -> impl gax::paginator::Paginator<crate::model::ListPeeringRoutesResponse, gax::error::Error>
4870 {
4871 use std::clone::Clone;
4872 let token = self.0.request.page_token.clone();
4873 let execute = move |token: String| {
4874 let mut builder = self.clone();
4875 builder.0.request = builder.0.request.set_page_token(token);
4876 builder.send()
4877 };
4878 gax::paginator::internal::new_paginator(token, execute)
4879 }
4880
4881 pub fn by_item(
4883 self,
4884 ) -> impl gax::paginator::ItemPaginator<crate::model::ListPeeringRoutesResponse, gax::error::Error>
4885 {
4886 use gax::paginator::Paginator;
4887 self.by_page().items()
4888 }
4889
4890 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4894 self.0.request.parent = v.into();
4895 self
4896 }
4897
4898 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4900 self.0.request.page_size = v.into();
4901 self
4902 }
4903
4904 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4906 self.0.request.page_token = v.into();
4907 self
4908 }
4909
4910 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4912 self.0.request.filter = v.into();
4913 self
4914 }
4915 }
4916
4917 #[doc(hidden)]
4918 impl gax::options::internal::RequestBuilder for ListPeeringRoutes {
4919 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4920 &mut self.0.options
4921 }
4922 }
4923
4924 #[derive(Clone, Debug)]
4942 pub struct CreateHcxActivationKey(RequestBuilder<crate::model::CreateHcxActivationKeyRequest>);
4943
4944 impl CreateHcxActivationKey {
4945 pub(crate) fn new(
4946 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
4947 ) -> Self {
4948 Self(RequestBuilder::new(stub))
4949 }
4950
4951 pub fn with_request<V: Into<crate::model::CreateHcxActivationKeyRequest>>(
4953 mut self,
4954 v: V,
4955 ) -> Self {
4956 self.0.request = v.into();
4957 self
4958 }
4959
4960 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4962 self.0.options = v.into();
4963 self
4964 }
4965
4966 pub async fn send(self) -> Result<longrunning::model::Operation> {
4973 (*self.0.stub)
4974 .create_hcx_activation_key(self.0.request, self.0.options)
4975 .await
4976 .map(gax::response::Response::into_body)
4977 }
4978
4979 pub fn poller(
4981 self,
4982 ) -> impl lro::Poller<crate::model::HcxActivationKey, crate::model::OperationMetadata>
4983 {
4984 type Operation = lro::internal::Operation<
4985 crate::model::HcxActivationKey,
4986 crate::model::OperationMetadata,
4987 >;
4988 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4989 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4990
4991 let stub = self.0.stub.clone();
4992 let mut options = self.0.options.clone();
4993 options.set_retry_policy(gax::retry_policy::NeverRetry);
4994 let query = move |name| {
4995 let stub = stub.clone();
4996 let options = options.clone();
4997 async {
4998 let op = GetOperation::new(stub)
4999 .set_name(name)
5000 .with_options(options)
5001 .send()
5002 .await?;
5003 Ok(Operation::new(op))
5004 }
5005 };
5006
5007 let start = move || async {
5008 let op = self.send().await?;
5009 Ok(Operation::new(op))
5010 };
5011
5012 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5013 }
5014
5015 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5019 self.0.request.parent = v.into();
5020 self
5021 }
5022
5023 pub fn set_hcx_activation_key<
5027 T: Into<std::option::Option<crate::model::HcxActivationKey>>,
5028 >(
5029 mut self,
5030 v: T,
5031 ) -> Self {
5032 self.0.request.hcx_activation_key = v.into();
5033 self
5034 }
5035
5036 pub fn set_hcx_activation_key_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5040 self.0.request.hcx_activation_key_id = v.into();
5041 self
5042 }
5043
5044 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5046 self.0.request.request_id = v.into();
5047 self
5048 }
5049 }
5050
5051 #[doc(hidden)]
5052 impl gax::options::internal::RequestBuilder for CreateHcxActivationKey {
5053 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5054 &mut self.0.options
5055 }
5056 }
5057
5058 #[derive(Clone, Debug)]
5079 pub struct ListHcxActivationKeys(RequestBuilder<crate::model::ListHcxActivationKeysRequest>);
5080
5081 impl ListHcxActivationKeys {
5082 pub(crate) fn new(
5083 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5084 ) -> Self {
5085 Self(RequestBuilder::new(stub))
5086 }
5087
5088 pub fn with_request<V: Into<crate::model::ListHcxActivationKeysRequest>>(
5090 mut self,
5091 v: V,
5092 ) -> Self {
5093 self.0.request = v.into();
5094 self
5095 }
5096
5097 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5099 self.0.options = v.into();
5100 self
5101 }
5102
5103 pub async fn send(self) -> Result<crate::model::ListHcxActivationKeysResponse> {
5105 (*self.0.stub)
5106 .list_hcx_activation_keys(self.0.request, self.0.options)
5107 .await
5108 .map(gax::response::Response::into_body)
5109 }
5110
5111 pub fn by_page(
5113 self,
5114 ) -> impl gax::paginator::Paginator<crate::model::ListHcxActivationKeysResponse, gax::error::Error>
5115 {
5116 use std::clone::Clone;
5117 let token = self.0.request.page_token.clone();
5118 let execute = move |token: String| {
5119 let mut builder = self.clone();
5120 builder.0.request = builder.0.request.set_page_token(token);
5121 builder.send()
5122 };
5123 gax::paginator::internal::new_paginator(token, execute)
5124 }
5125
5126 pub fn by_item(
5128 self,
5129 ) -> impl gax::paginator::ItemPaginator<
5130 crate::model::ListHcxActivationKeysResponse,
5131 gax::error::Error,
5132 > {
5133 use gax::paginator::Paginator;
5134 self.by_page().items()
5135 }
5136
5137 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5141 self.0.request.parent = v.into();
5142 self
5143 }
5144
5145 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5147 self.0.request.page_size = v.into();
5148 self
5149 }
5150
5151 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5153 self.0.request.page_token = v.into();
5154 self
5155 }
5156 }
5157
5158 #[doc(hidden)]
5159 impl gax::options::internal::RequestBuilder for ListHcxActivationKeys {
5160 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5161 &mut self.0.options
5162 }
5163 }
5164
5165 #[derive(Clone, Debug)]
5182 pub struct GetHcxActivationKey(RequestBuilder<crate::model::GetHcxActivationKeyRequest>);
5183
5184 impl GetHcxActivationKey {
5185 pub(crate) fn new(
5186 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5187 ) -> Self {
5188 Self(RequestBuilder::new(stub))
5189 }
5190
5191 pub fn with_request<V: Into<crate::model::GetHcxActivationKeyRequest>>(
5193 mut self,
5194 v: V,
5195 ) -> Self {
5196 self.0.request = v.into();
5197 self
5198 }
5199
5200 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5202 self.0.options = v.into();
5203 self
5204 }
5205
5206 pub async fn send(self) -> Result<crate::model::HcxActivationKey> {
5208 (*self.0.stub)
5209 .get_hcx_activation_key(self.0.request, self.0.options)
5210 .await
5211 .map(gax::response::Response::into_body)
5212 }
5213
5214 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5218 self.0.request.name = v.into();
5219 self
5220 }
5221 }
5222
5223 #[doc(hidden)]
5224 impl gax::options::internal::RequestBuilder for GetHcxActivationKey {
5225 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5226 &mut self.0.options
5227 }
5228 }
5229
5230 #[derive(Clone, Debug)]
5247 pub struct GetNetworkPolicy(RequestBuilder<crate::model::GetNetworkPolicyRequest>);
5248
5249 impl GetNetworkPolicy {
5250 pub(crate) fn new(
5251 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5252 ) -> Self {
5253 Self(RequestBuilder::new(stub))
5254 }
5255
5256 pub fn with_request<V: Into<crate::model::GetNetworkPolicyRequest>>(
5258 mut self,
5259 v: V,
5260 ) -> Self {
5261 self.0.request = v.into();
5262 self
5263 }
5264
5265 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5267 self.0.options = v.into();
5268 self
5269 }
5270
5271 pub async fn send(self) -> Result<crate::model::NetworkPolicy> {
5273 (*self.0.stub)
5274 .get_network_policy(self.0.request, self.0.options)
5275 .await
5276 .map(gax::response::Response::into_body)
5277 }
5278
5279 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5283 self.0.request.name = v.into();
5284 self
5285 }
5286 }
5287
5288 #[doc(hidden)]
5289 impl gax::options::internal::RequestBuilder for GetNetworkPolicy {
5290 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5291 &mut self.0.options
5292 }
5293 }
5294
5295 #[derive(Clone, Debug)]
5316 pub struct ListNetworkPolicies(RequestBuilder<crate::model::ListNetworkPoliciesRequest>);
5317
5318 impl ListNetworkPolicies {
5319 pub(crate) fn new(
5320 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5321 ) -> Self {
5322 Self(RequestBuilder::new(stub))
5323 }
5324
5325 pub fn with_request<V: Into<crate::model::ListNetworkPoliciesRequest>>(
5327 mut self,
5328 v: V,
5329 ) -> Self {
5330 self.0.request = v.into();
5331 self
5332 }
5333
5334 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5336 self.0.options = v.into();
5337 self
5338 }
5339
5340 pub async fn send(self) -> Result<crate::model::ListNetworkPoliciesResponse> {
5342 (*self.0.stub)
5343 .list_network_policies(self.0.request, self.0.options)
5344 .await
5345 .map(gax::response::Response::into_body)
5346 }
5347
5348 pub fn by_page(
5350 self,
5351 ) -> impl gax::paginator::Paginator<crate::model::ListNetworkPoliciesResponse, gax::error::Error>
5352 {
5353 use std::clone::Clone;
5354 let token = self.0.request.page_token.clone();
5355 let execute = move |token: String| {
5356 let mut builder = self.clone();
5357 builder.0.request = builder.0.request.set_page_token(token);
5358 builder.send()
5359 };
5360 gax::paginator::internal::new_paginator(token, execute)
5361 }
5362
5363 pub fn by_item(
5365 self,
5366 ) -> impl gax::paginator::ItemPaginator<
5367 crate::model::ListNetworkPoliciesResponse,
5368 gax::error::Error,
5369 > {
5370 use gax::paginator::Paginator;
5371 self.by_page().items()
5372 }
5373
5374 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5378 self.0.request.parent = v.into();
5379 self
5380 }
5381
5382 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5384 self.0.request.page_size = v.into();
5385 self
5386 }
5387
5388 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5390 self.0.request.page_token = v.into();
5391 self
5392 }
5393
5394 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5396 self.0.request.filter = v.into();
5397 self
5398 }
5399
5400 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5402 self.0.request.order_by = v.into();
5403 self
5404 }
5405 }
5406
5407 #[doc(hidden)]
5408 impl gax::options::internal::RequestBuilder for ListNetworkPolicies {
5409 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5410 &mut self.0.options
5411 }
5412 }
5413
5414 #[derive(Clone, Debug)]
5432 pub struct CreateNetworkPolicy(RequestBuilder<crate::model::CreateNetworkPolicyRequest>);
5433
5434 impl CreateNetworkPolicy {
5435 pub(crate) fn new(
5436 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5437 ) -> Self {
5438 Self(RequestBuilder::new(stub))
5439 }
5440
5441 pub fn with_request<V: Into<crate::model::CreateNetworkPolicyRequest>>(
5443 mut self,
5444 v: V,
5445 ) -> Self {
5446 self.0.request = v.into();
5447 self
5448 }
5449
5450 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5452 self.0.options = v.into();
5453 self
5454 }
5455
5456 pub async fn send(self) -> Result<longrunning::model::Operation> {
5463 (*self.0.stub)
5464 .create_network_policy(self.0.request, self.0.options)
5465 .await
5466 .map(gax::response::Response::into_body)
5467 }
5468
5469 pub fn poller(
5471 self,
5472 ) -> impl lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
5473 {
5474 type Operation = lro::internal::Operation<
5475 crate::model::NetworkPolicy,
5476 crate::model::OperationMetadata,
5477 >;
5478 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5479 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5480
5481 let stub = self.0.stub.clone();
5482 let mut options = self.0.options.clone();
5483 options.set_retry_policy(gax::retry_policy::NeverRetry);
5484 let query = move |name| {
5485 let stub = stub.clone();
5486 let options = options.clone();
5487 async {
5488 let op = GetOperation::new(stub)
5489 .set_name(name)
5490 .with_options(options)
5491 .send()
5492 .await?;
5493 Ok(Operation::new(op))
5494 }
5495 };
5496
5497 let start = move || async {
5498 let op = self.send().await?;
5499 Ok(Operation::new(op))
5500 };
5501
5502 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5503 }
5504
5505 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5509 self.0.request.parent = v.into();
5510 self
5511 }
5512
5513 pub fn set_network_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5517 self.0.request.network_policy_id = v.into();
5518 self
5519 }
5520
5521 pub fn set_network_policy<T: Into<std::option::Option<crate::model::NetworkPolicy>>>(
5525 mut self,
5526 v: T,
5527 ) -> Self {
5528 self.0.request.network_policy = v.into();
5529 self
5530 }
5531
5532 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5534 self.0.request.request_id = v.into();
5535 self
5536 }
5537 }
5538
5539 #[doc(hidden)]
5540 impl gax::options::internal::RequestBuilder for CreateNetworkPolicy {
5541 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5542 &mut self.0.options
5543 }
5544 }
5545
5546 #[derive(Clone, Debug)]
5564 pub struct UpdateNetworkPolicy(RequestBuilder<crate::model::UpdateNetworkPolicyRequest>);
5565
5566 impl UpdateNetworkPolicy {
5567 pub(crate) fn new(
5568 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5569 ) -> Self {
5570 Self(RequestBuilder::new(stub))
5571 }
5572
5573 pub fn with_request<V: Into<crate::model::UpdateNetworkPolicyRequest>>(
5575 mut self,
5576 v: V,
5577 ) -> Self {
5578 self.0.request = v.into();
5579 self
5580 }
5581
5582 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5584 self.0.options = v.into();
5585 self
5586 }
5587
5588 pub async fn send(self) -> Result<longrunning::model::Operation> {
5595 (*self.0.stub)
5596 .update_network_policy(self.0.request, self.0.options)
5597 .await
5598 .map(gax::response::Response::into_body)
5599 }
5600
5601 pub fn poller(
5603 self,
5604 ) -> impl lro::Poller<crate::model::NetworkPolicy, crate::model::OperationMetadata>
5605 {
5606 type Operation = lro::internal::Operation<
5607 crate::model::NetworkPolicy,
5608 crate::model::OperationMetadata,
5609 >;
5610 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5611 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5612
5613 let stub = self.0.stub.clone();
5614 let mut options = self.0.options.clone();
5615 options.set_retry_policy(gax::retry_policy::NeverRetry);
5616 let query = move |name| {
5617 let stub = stub.clone();
5618 let options = options.clone();
5619 async {
5620 let op = GetOperation::new(stub)
5621 .set_name(name)
5622 .with_options(options)
5623 .send()
5624 .await?;
5625 Ok(Operation::new(op))
5626 }
5627 };
5628
5629 let start = move || async {
5630 let op = self.send().await?;
5631 Ok(Operation::new(op))
5632 };
5633
5634 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5635 }
5636
5637 pub fn set_network_policy<T: Into<std::option::Option<crate::model::NetworkPolicy>>>(
5641 mut self,
5642 v: T,
5643 ) -> Self {
5644 self.0.request.network_policy = v.into();
5645 self
5646 }
5647
5648 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
5652 mut self,
5653 v: T,
5654 ) -> Self {
5655 self.0.request.update_mask = v.into();
5656 self
5657 }
5658
5659 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5661 self.0.request.request_id = v.into();
5662 self
5663 }
5664 }
5665
5666 #[doc(hidden)]
5667 impl gax::options::internal::RequestBuilder for UpdateNetworkPolicy {
5668 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5669 &mut self.0.options
5670 }
5671 }
5672
5673 #[derive(Clone, Debug)]
5691 pub struct DeleteNetworkPolicy(RequestBuilder<crate::model::DeleteNetworkPolicyRequest>);
5692
5693 impl DeleteNetworkPolicy {
5694 pub(crate) fn new(
5695 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5696 ) -> Self {
5697 Self(RequestBuilder::new(stub))
5698 }
5699
5700 pub fn with_request<V: Into<crate::model::DeleteNetworkPolicyRequest>>(
5702 mut self,
5703 v: V,
5704 ) -> Self {
5705 self.0.request = v.into();
5706 self
5707 }
5708
5709 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5711 self.0.options = v.into();
5712 self
5713 }
5714
5715 pub async fn send(self) -> Result<longrunning::model::Operation> {
5722 (*self.0.stub)
5723 .delete_network_policy(self.0.request, self.0.options)
5724 .await
5725 .map(gax::response::Response::into_body)
5726 }
5727
5728 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
5730 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5731 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5732 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5733
5734 let stub = self.0.stub.clone();
5735 let mut options = self.0.options.clone();
5736 options.set_retry_policy(gax::retry_policy::NeverRetry);
5737 let query = move |name| {
5738 let stub = stub.clone();
5739 let options = options.clone();
5740 async {
5741 let op = GetOperation::new(stub)
5742 .set_name(name)
5743 .with_options(options)
5744 .send()
5745 .await?;
5746 Ok(Operation::new(op))
5747 }
5748 };
5749
5750 let start = move || async {
5751 let op = self.send().await?;
5752 Ok(Operation::new(op))
5753 };
5754
5755 lro::internal::new_unit_response_poller(
5756 polling_error_policy,
5757 polling_backoff_policy,
5758 start,
5759 query,
5760 )
5761 }
5762
5763 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5767 self.0.request.name = v.into();
5768 self
5769 }
5770
5771 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5773 self.0.request.request_id = v.into();
5774 self
5775 }
5776 }
5777
5778 #[doc(hidden)]
5779 impl gax::options::internal::RequestBuilder for DeleteNetworkPolicy {
5780 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5781 &mut self.0.options
5782 }
5783 }
5784
5785 #[derive(Clone, Debug)]
5806 pub struct ListManagementDnsZoneBindings(
5807 RequestBuilder<crate::model::ListManagementDnsZoneBindingsRequest>,
5808 );
5809
5810 impl ListManagementDnsZoneBindings {
5811 pub(crate) fn new(
5812 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5813 ) -> Self {
5814 Self(RequestBuilder::new(stub))
5815 }
5816
5817 pub fn with_request<V: Into<crate::model::ListManagementDnsZoneBindingsRequest>>(
5819 mut self,
5820 v: V,
5821 ) -> Self {
5822 self.0.request = v.into();
5823 self
5824 }
5825
5826 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5828 self.0.options = v.into();
5829 self
5830 }
5831
5832 pub async fn send(self) -> Result<crate::model::ListManagementDnsZoneBindingsResponse> {
5834 (*self.0.stub)
5835 .list_management_dns_zone_bindings(self.0.request, self.0.options)
5836 .await
5837 .map(gax::response::Response::into_body)
5838 }
5839
5840 pub fn by_page(
5842 self,
5843 ) -> impl gax::paginator::Paginator<
5844 crate::model::ListManagementDnsZoneBindingsResponse,
5845 gax::error::Error,
5846 > {
5847 use std::clone::Clone;
5848 let token = self.0.request.page_token.clone();
5849 let execute = move |token: String| {
5850 let mut builder = self.clone();
5851 builder.0.request = builder.0.request.set_page_token(token);
5852 builder.send()
5853 };
5854 gax::paginator::internal::new_paginator(token, execute)
5855 }
5856
5857 pub fn by_item(
5859 self,
5860 ) -> impl gax::paginator::ItemPaginator<
5861 crate::model::ListManagementDnsZoneBindingsResponse,
5862 gax::error::Error,
5863 > {
5864 use gax::paginator::Paginator;
5865 self.by_page().items()
5866 }
5867
5868 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5872 self.0.request.parent = v.into();
5873 self
5874 }
5875
5876 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5878 self.0.request.page_size = v.into();
5879 self
5880 }
5881
5882 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5884 self.0.request.page_token = v.into();
5885 self
5886 }
5887
5888 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5890 self.0.request.filter = v.into();
5891 self
5892 }
5893
5894 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5896 self.0.request.order_by = v.into();
5897 self
5898 }
5899 }
5900
5901 #[doc(hidden)]
5902 impl gax::options::internal::RequestBuilder for ListManagementDnsZoneBindings {
5903 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5904 &mut self.0.options
5905 }
5906 }
5907
5908 #[derive(Clone, Debug)]
5925 pub struct GetManagementDnsZoneBinding(
5926 RequestBuilder<crate::model::GetManagementDnsZoneBindingRequest>,
5927 );
5928
5929 impl GetManagementDnsZoneBinding {
5930 pub(crate) fn new(
5931 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
5932 ) -> Self {
5933 Self(RequestBuilder::new(stub))
5934 }
5935
5936 pub fn with_request<V: Into<crate::model::GetManagementDnsZoneBindingRequest>>(
5938 mut self,
5939 v: V,
5940 ) -> Self {
5941 self.0.request = v.into();
5942 self
5943 }
5944
5945 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5947 self.0.options = v.into();
5948 self
5949 }
5950
5951 pub async fn send(self) -> Result<crate::model::ManagementDnsZoneBinding> {
5953 (*self.0.stub)
5954 .get_management_dns_zone_binding(self.0.request, self.0.options)
5955 .await
5956 .map(gax::response::Response::into_body)
5957 }
5958
5959 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5963 self.0.request.name = v.into();
5964 self
5965 }
5966 }
5967
5968 #[doc(hidden)]
5969 impl gax::options::internal::RequestBuilder for GetManagementDnsZoneBinding {
5970 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5971 &mut self.0.options
5972 }
5973 }
5974
5975 #[derive(Clone, Debug)]
5993 pub struct CreateManagementDnsZoneBinding(
5994 RequestBuilder<crate::model::CreateManagementDnsZoneBindingRequest>,
5995 );
5996
5997 impl CreateManagementDnsZoneBinding {
5998 pub(crate) fn new(
5999 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6000 ) -> Self {
6001 Self(RequestBuilder::new(stub))
6002 }
6003
6004 pub fn with_request<V: Into<crate::model::CreateManagementDnsZoneBindingRequest>>(
6006 mut self,
6007 v: V,
6008 ) -> Self {
6009 self.0.request = v.into();
6010 self
6011 }
6012
6013 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6015 self.0.options = v.into();
6016 self
6017 }
6018
6019 pub async fn send(self) -> Result<longrunning::model::Operation> {
6026 (*self.0.stub)
6027 .create_management_dns_zone_binding(self.0.request, self.0.options)
6028 .await
6029 .map(gax::response::Response::into_body)
6030 }
6031
6032 pub fn poller(
6034 self,
6035 ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
6036 {
6037 type Operation = lro::internal::Operation<
6038 crate::model::ManagementDnsZoneBinding,
6039 crate::model::OperationMetadata,
6040 >;
6041 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6042 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6043
6044 let stub = self.0.stub.clone();
6045 let mut options = self.0.options.clone();
6046 options.set_retry_policy(gax::retry_policy::NeverRetry);
6047 let query = move |name| {
6048 let stub = stub.clone();
6049 let options = options.clone();
6050 async {
6051 let op = GetOperation::new(stub)
6052 .set_name(name)
6053 .with_options(options)
6054 .send()
6055 .await?;
6056 Ok(Operation::new(op))
6057 }
6058 };
6059
6060 let start = move || async {
6061 let op = self.send().await?;
6062 Ok(Operation::new(op))
6063 };
6064
6065 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6066 }
6067
6068 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6072 self.0.request.parent = v.into();
6073 self
6074 }
6075
6076 pub fn set_management_dns_zone_binding<
6080 T: Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
6081 >(
6082 mut self,
6083 v: T,
6084 ) -> Self {
6085 self.0.request.management_dns_zone_binding = v.into();
6086 self
6087 }
6088
6089 pub fn set_management_dns_zone_binding_id<T: Into<std::string::String>>(
6093 mut self,
6094 v: T,
6095 ) -> Self {
6096 self.0.request.management_dns_zone_binding_id = v.into();
6097 self
6098 }
6099
6100 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6102 self.0.request.request_id = v.into();
6103 self
6104 }
6105 }
6106
6107 #[doc(hidden)]
6108 impl gax::options::internal::RequestBuilder for CreateManagementDnsZoneBinding {
6109 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6110 &mut self.0.options
6111 }
6112 }
6113
6114 #[derive(Clone, Debug)]
6132 pub struct UpdateManagementDnsZoneBinding(
6133 RequestBuilder<crate::model::UpdateManagementDnsZoneBindingRequest>,
6134 );
6135
6136 impl UpdateManagementDnsZoneBinding {
6137 pub(crate) fn new(
6138 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6139 ) -> Self {
6140 Self(RequestBuilder::new(stub))
6141 }
6142
6143 pub fn with_request<V: Into<crate::model::UpdateManagementDnsZoneBindingRequest>>(
6145 mut self,
6146 v: V,
6147 ) -> Self {
6148 self.0.request = v.into();
6149 self
6150 }
6151
6152 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6154 self.0.options = v.into();
6155 self
6156 }
6157
6158 pub async fn send(self) -> Result<longrunning::model::Operation> {
6165 (*self.0.stub)
6166 .update_management_dns_zone_binding(self.0.request, self.0.options)
6167 .await
6168 .map(gax::response::Response::into_body)
6169 }
6170
6171 pub fn poller(
6173 self,
6174 ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
6175 {
6176 type Operation = lro::internal::Operation<
6177 crate::model::ManagementDnsZoneBinding,
6178 crate::model::OperationMetadata,
6179 >;
6180 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6181 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6182
6183 let stub = self.0.stub.clone();
6184 let mut options = self.0.options.clone();
6185 options.set_retry_policy(gax::retry_policy::NeverRetry);
6186 let query = move |name| {
6187 let stub = stub.clone();
6188 let options = options.clone();
6189 async {
6190 let op = GetOperation::new(stub)
6191 .set_name(name)
6192 .with_options(options)
6193 .send()
6194 .await?;
6195 Ok(Operation::new(op))
6196 }
6197 };
6198
6199 let start = move || async {
6200 let op = self.send().await?;
6201 Ok(Operation::new(op))
6202 };
6203
6204 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6205 }
6206
6207 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
6211 mut self,
6212 v: T,
6213 ) -> Self {
6214 self.0.request.update_mask = v.into();
6215 self
6216 }
6217
6218 pub fn set_management_dns_zone_binding<
6222 T: Into<std::option::Option<crate::model::ManagementDnsZoneBinding>>,
6223 >(
6224 mut self,
6225 v: T,
6226 ) -> Self {
6227 self.0.request.management_dns_zone_binding = v.into();
6228 self
6229 }
6230
6231 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6233 self.0.request.request_id = v.into();
6234 self
6235 }
6236 }
6237
6238 #[doc(hidden)]
6239 impl gax::options::internal::RequestBuilder for UpdateManagementDnsZoneBinding {
6240 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6241 &mut self.0.options
6242 }
6243 }
6244
6245 #[derive(Clone, Debug)]
6263 pub struct DeleteManagementDnsZoneBinding(
6264 RequestBuilder<crate::model::DeleteManagementDnsZoneBindingRequest>,
6265 );
6266
6267 impl DeleteManagementDnsZoneBinding {
6268 pub(crate) fn new(
6269 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6270 ) -> Self {
6271 Self(RequestBuilder::new(stub))
6272 }
6273
6274 pub fn with_request<V: Into<crate::model::DeleteManagementDnsZoneBindingRequest>>(
6276 mut self,
6277 v: V,
6278 ) -> Self {
6279 self.0.request = v.into();
6280 self
6281 }
6282
6283 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6285 self.0.options = v.into();
6286 self
6287 }
6288
6289 pub async fn send(self) -> Result<longrunning::model::Operation> {
6296 (*self.0.stub)
6297 .delete_management_dns_zone_binding(self.0.request, self.0.options)
6298 .await
6299 .map(gax::response::Response::into_body)
6300 }
6301
6302 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
6304 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6305 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6306 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6307
6308 let stub = self.0.stub.clone();
6309 let mut options = self.0.options.clone();
6310 options.set_retry_policy(gax::retry_policy::NeverRetry);
6311 let query = move |name| {
6312 let stub = stub.clone();
6313 let options = options.clone();
6314 async {
6315 let op = GetOperation::new(stub)
6316 .set_name(name)
6317 .with_options(options)
6318 .send()
6319 .await?;
6320 Ok(Operation::new(op))
6321 }
6322 };
6323
6324 let start = move || async {
6325 let op = self.send().await?;
6326 Ok(Operation::new(op))
6327 };
6328
6329 lro::internal::new_unit_response_poller(
6330 polling_error_policy,
6331 polling_backoff_policy,
6332 start,
6333 query,
6334 )
6335 }
6336
6337 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6341 self.0.request.name = v.into();
6342 self
6343 }
6344
6345 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6347 self.0.request.request_id = v.into();
6348 self
6349 }
6350 }
6351
6352 #[doc(hidden)]
6353 impl gax::options::internal::RequestBuilder for DeleteManagementDnsZoneBinding {
6354 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6355 &mut self.0.options
6356 }
6357 }
6358
6359 #[derive(Clone, Debug)]
6377 pub struct RepairManagementDnsZoneBinding(
6378 RequestBuilder<crate::model::RepairManagementDnsZoneBindingRequest>,
6379 );
6380
6381 impl RepairManagementDnsZoneBinding {
6382 pub(crate) fn new(
6383 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6384 ) -> Self {
6385 Self(RequestBuilder::new(stub))
6386 }
6387
6388 pub fn with_request<V: Into<crate::model::RepairManagementDnsZoneBindingRequest>>(
6390 mut self,
6391 v: V,
6392 ) -> Self {
6393 self.0.request = v.into();
6394 self
6395 }
6396
6397 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6399 self.0.options = v.into();
6400 self
6401 }
6402
6403 pub async fn send(self) -> Result<longrunning::model::Operation> {
6410 (*self.0.stub)
6411 .repair_management_dns_zone_binding(self.0.request, self.0.options)
6412 .await
6413 .map(gax::response::Response::into_body)
6414 }
6415
6416 pub fn poller(
6418 self,
6419 ) -> impl lro::Poller<crate::model::ManagementDnsZoneBinding, crate::model::OperationMetadata>
6420 {
6421 type Operation = lro::internal::Operation<
6422 crate::model::ManagementDnsZoneBinding,
6423 crate::model::OperationMetadata,
6424 >;
6425 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6426 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6427
6428 let stub = self.0.stub.clone();
6429 let mut options = self.0.options.clone();
6430 options.set_retry_policy(gax::retry_policy::NeverRetry);
6431 let query = move |name| {
6432 let stub = stub.clone();
6433 let options = options.clone();
6434 async {
6435 let op = GetOperation::new(stub)
6436 .set_name(name)
6437 .with_options(options)
6438 .send()
6439 .await?;
6440 Ok(Operation::new(op))
6441 }
6442 };
6443
6444 let start = move || async {
6445 let op = self.send().await?;
6446 Ok(Operation::new(op))
6447 };
6448
6449 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6450 }
6451
6452 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6456 self.0.request.name = v.into();
6457 self
6458 }
6459
6460 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6462 self.0.request.request_id = v.into();
6463 self
6464 }
6465 }
6466
6467 #[doc(hidden)]
6468 impl gax::options::internal::RequestBuilder for RepairManagementDnsZoneBinding {
6469 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6470 &mut self.0.options
6471 }
6472 }
6473
6474 #[derive(Clone, Debug)]
6492 pub struct CreateVmwareEngineNetwork(
6493 RequestBuilder<crate::model::CreateVmwareEngineNetworkRequest>,
6494 );
6495
6496 impl CreateVmwareEngineNetwork {
6497 pub(crate) fn new(
6498 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6499 ) -> Self {
6500 Self(RequestBuilder::new(stub))
6501 }
6502
6503 pub fn with_request<V: Into<crate::model::CreateVmwareEngineNetworkRequest>>(
6505 mut self,
6506 v: V,
6507 ) -> Self {
6508 self.0.request = v.into();
6509 self
6510 }
6511
6512 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6514 self.0.options = v.into();
6515 self
6516 }
6517
6518 pub async fn send(self) -> Result<longrunning::model::Operation> {
6525 (*self.0.stub)
6526 .create_vmware_engine_network(self.0.request, self.0.options)
6527 .await
6528 .map(gax::response::Response::into_body)
6529 }
6530
6531 pub fn poller(
6533 self,
6534 ) -> impl lro::Poller<crate::model::VmwareEngineNetwork, crate::model::OperationMetadata>
6535 {
6536 type Operation = lro::internal::Operation<
6537 crate::model::VmwareEngineNetwork,
6538 crate::model::OperationMetadata,
6539 >;
6540 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6541 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6542
6543 let stub = self.0.stub.clone();
6544 let mut options = self.0.options.clone();
6545 options.set_retry_policy(gax::retry_policy::NeverRetry);
6546 let query = move |name| {
6547 let stub = stub.clone();
6548 let options = options.clone();
6549 async {
6550 let op = GetOperation::new(stub)
6551 .set_name(name)
6552 .with_options(options)
6553 .send()
6554 .await?;
6555 Ok(Operation::new(op))
6556 }
6557 };
6558
6559 let start = move || async {
6560 let op = self.send().await?;
6561 Ok(Operation::new(op))
6562 };
6563
6564 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6565 }
6566
6567 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6571 self.0.request.parent = v.into();
6572 self
6573 }
6574
6575 pub fn set_vmware_engine_network_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6579 self.0.request.vmware_engine_network_id = v.into();
6580 self
6581 }
6582
6583 pub fn set_vmware_engine_network<
6587 T: Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
6588 >(
6589 mut self,
6590 v: T,
6591 ) -> Self {
6592 self.0.request.vmware_engine_network = v.into();
6593 self
6594 }
6595
6596 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6598 self.0.request.request_id = v.into();
6599 self
6600 }
6601 }
6602
6603 #[doc(hidden)]
6604 impl gax::options::internal::RequestBuilder for CreateVmwareEngineNetwork {
6605 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6606 &mut self.0.options
6607 }
6608 }
6609
6610 #[derive(Clone, Debug)]
6628 pub struct UpdateVmwareEngineNetwork(
6629 RequestBuilder<crate::model::UpdateVmwareEngineNetworkRequest>,
6630 );
6631
6632 impl UpdateVmwareEngineNetwork {
6633 pub(crate) fn new(
6634 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6635 ) -> Self {
6636 Self(RequestBuilder::new(stub))
6637 }
6638
6639 pub fn with_request<V: Into<crate::model::UpdateVmwareEngineNetworkRequest>>(
6641 mut self,
6642 v: V,
6643 ) -> Self {
6644 self.0.request = v.into();
6645 self
6646 }
6647
6648 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6650 self.0.options = v.into();
6651 self
6652 }
6653
6654 pub async fn send(self) -> Result<longrunning::model::Operation> {
6661 (*self.0.stub)
6662 .update_vmware_engine_network(self.0.request, self.0.options)
6663 .await
6664 .map(gax::response::Response::into_body)
6665 }
6666
6667 pub fn poller(
6669 self,
6670 ) -> impl lro::Poller<crate::model::VmwareEngineNetwork, crate::model::OperationMetadata>
6671 {
6672 type Operation = lro::internal::Operation<
6673 crate::model::VmwareEngineNetwork,
6674 crate::model::OperationMetadata,
6675 >;
6676 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6677 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6678
6679 let stub = self.0.stub.clone();
6680 let mut options = self.0.options.clone();
6681 options.set_retry_policy(gax::retry_policy::NeverRetry);
6682 let query = move |name| {
6683 let stub = stub.clone();
6684 let options = options.clone();
6685 async {
6686 let op = GetOperation::new(stub)
6687 .set_name(name)
6688 .with_options(options)
6689 .send()
6690 .await?;
6691 Ok(Operation::new(op))
6692 }
6693 };
6694
6695 let start = move || async {
6696 let op = self.send().await?;
6697 Ok(Operation::new(op))
6698 };
6699
6700 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6701 }
6702
6703 pub fn set_vmware_engine_network<
6707 T: Into<std::option::Option<crate::model::VmwareEngineNetwork>>,
6708 >(
6709 mut self,
6710 v: T,
6711 ) -> Self {
6712 self.0.request.vmware_engine_network = v.into();
6713 self
6714 }
6715
6716 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
6720 mut self,
6721 v: T,
6722 ) -> Self {
6723 self.0.request.update_mask = v.into();
6724 self
6725 }
6726
6727 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6729 self.0.request.request_id = v.into();
6730 self
6731 }
6732 }
6733
6734 #[doc(hidden)]
6735 impl gax::options::internal::RequestBuilder for UpdateVmwareEngineNetwork {
6736 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6737 &mut self.0.options
6738 }
6739 }
6740
6741 #[derive(Clone, Debug)]
6759 pub struct DeleteVmwareEngineNetwork(
6760 RequestBuilder<crate::model::DeleteVmwareEngineNetworkRequest>,
6761 );
6762
6763 impl DeleteVmwareEngineNetwork {
6764 pub(crate) fn new(
6765 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6766 ) -> Self {
6767 Self(RequestBuilder::new(stub))
6768 }
6769
6770 pub fn with_request<V: Into<crate::model::DeleteVmwareEngineNetworkRequest>>(
6772 mut self,
6773 v: V,
6774 ) -> Self {
6775 self.0.request = v.into();
6776 self
6777 }
6778
6779 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6781 self.0.options = v.into();
6782 self
6783 }
6784
6785 pub async fn send(self) -> Result<longrunning::model::Operation> {
6792 (*self.0.stub)
6793 .delete_vmware_engine_network(self.0.request, self.0.options)
6794 .await
6795 .map(gax::response::Response::into_body)
6796 }
6797
6798 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
6800 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6801 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6802 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6803
6804 let stub = self.0.stub.clone();
6805 let mut options = self.0.options.clone();
6806 options.set_retry_policy(gax::retry_policy::NeverRetry);
6807 let query = move |name| {
6808 let stub = stub.clone();
6809 let options = options.clone();
6810 async {
6811 let op = GetOperation::new(stub)
6812 .set_name(name)
6813 .with_options(options)
6814 .send()
6815 .await?;
6816 Ok(Operation::new(op))
6817 }
6818 };
6819
6820 let start = move || async {
6821 let op = self.send().await?;
6822 Ok(Operation::new(op))
6823 };
6824
6825 lro::internal::new_unit_response_poller(
6826 polling_error_policy,
6827 polling_backoff_policy,
6828 start,
6829 query,
6830 )
6831 }
6832
6833 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6837 self.0.request.name = v.into();
6838 self
6839 }
6840
6841 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6843 self.0.request.request_id = v.into();
6844 self
6845 }
6846
6847 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
6849 self.0.request.etag = v.into();
6850 self
6851 }
6852 }
6853
6854 #[doc(hidden)]
6855 impl gax::options::internal::RequestBuilder for DeleteVmwareEngineNetwork {
6856 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6857 &mut self.0.options
6858 }
6859 }
6860
6861 #[derive(Clone, Debug)]
6878 pub struct GetVmwareEngineNetwork(RequestBuilder<crate::model::GetVmwareEngineNetworkRequest>);
6879
6880 impl GetVmwareEngineNetwork {
6881 pub(crate) fn new(
6882 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6883 ) -> Self {
6884 Self(RequestBuilder::new(stub))
6885 }
6886
6887 pub fn with_request<V: Into<crate::model::GetVmwareEngineNetworkRequest>>(
6889 mut self,
6890 v: V,
6891 ) -> Self {
6892 self.0.request = v.into();
6893 self
6894 }
6895
6896 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6898 self.0.options = v.into();
6899 self
6900 }
6901
6902 pub async fn send(self) -> Result<crate::model::VmwareEngineNetwork> {
6904 (*self.0.stub)
6905 .get_vmware_engine_network(self.0.request, self.0.options)
6906 .await
6907 .map(gax::response::Response::into_body)
6908 }
6909
6910 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6914 self.0.request.name = v.into();
6915 self
6916 }
6917 }
6918
6919 #[doc(hidden)]
6920 impl gax::options::internal::RequestBuilder for GetVmwareEngineNetwork {
6921 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6922 &mut self.0.options
6923 }
6924 }
6925
6926 #[derive(Clone, Debug)]
6947 pub struct ListVmwareEngineNetworks(
6948 RequestBuilder<crate::model::ListVmwareEngineNetworksRequest>,
6949 );
6950
6951 impl ListVmwareEngineNetworks {
6952 pub(crate) fn new(
6953 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
6954 ) -> Self {
6955 Self(RequestBuilder::new(stub))
6956 }
6957
6958 pub fn with_request<V: Into<crate::model::ListVmwareEngineNetworksRequest>>(
6960 mut self,
6961 v: V,
6962 ) -> Self {
6963 self.0.request = v.into();
6964 self
6965 }
6966
6967 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6969 self.0.options = v.into();
6970 self
6971 }
6972
6973 pub async fn send(self) -> Result<crate::model::ListVmwareEngineNetworksResponse> {
6975 (*self.0.stub)
6976 .list_vmware_engine_networks(self.0.request, self.0.options)
6977 .await
6978 .map(gax::response::Response::into_body)
6979 }
6980
6981 pub fn by_page(
6983 self,
6984 ) -> impl gax::paginator::Paginator<
6985 crate::model::ListVmwareEngineNetworksResponse,
6986 gax::error::Error,
6987 > {
6988 use std::clone::Clone;
6989 let token = self.0.request.page_token.clone();
6990 let execute = move |token: String| {
6991 let mut builder = self.clone();
6992 builder.0.request = builder.0.request.set_page_token(token);
6993 builder.send()
6994 };
6995 gax::paginator::internal::new_paginator(token, execute)
6996 }
6997
6998 pub fn by_item(
7000 self,
7001 ) -> impl gax::paginator::ItemPaginator<
7002 crate::model::ListVmwareEngineNetworksResponse,
7003 gax::error::Error,
7004 > {
7005 use gax::paginator::Paginator;
7006 self.by_page().items()
7007 }
7008
7009 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7013 self.0.request.parent = v.into();
7014 self
7015 }
7016
7017 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7019 self.0.request.page_size = v.into();
7020 self
7021 }
7022
7023 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7025 self.0.request.page_token = v.into();
7026 self
7027 }
7028
7029 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7031 self.0.request.filter = v.into();
7032 self
7033 }
7034
7035 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7037 self.0.request.order_by = v.into();
7038 self
7039 }
7040 }
7041
7042 #[doc(hidden)]
7043 impl gax::options::internal::RequestBuilder for ListVmwareEngineNetworks {
7044 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7045 &mut self.0.options
7046 }
7047 }
7048
7049 #[derive(Clone, Debug)]
7067 pub struct CreatePrivateConnection(
7068 RequestBuilder<crate::model::CreatePrivateConnectionRequest>,
7069 );
7070
7071 impl CreatePrivateConnection {
7072 pub(crate) fn new(
7073 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7074 ) -> Self {
7075 Self(RequestBuilder::new(stub))
7076 }
7077
7078 pub fn with_request<V: Into<crate::model::CreatePrivateConnectionRequest>>(
7080 mut self,
7081 v: V,
7082 ) -> Self {
7083 self.0.request = v.into();
7084 self
7085 }
7086
7087 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7089 self.0.options = v.into();
7090 self
7091 }
7092
7093 pub async fn send(self) -> Result<longrunning::model::Operation> {
7100 (*self.0.stub)
7101 .create_private_connection(self.0.request, self.0.options)
7102 .await
7103 .map(gax::response::Response::into_body)
7104 }
7105
7106 pub fn poller(
7108 self,
7109 ) -> impl lro::Poller<crate::model::PrivateConnection, crate::model::OperationMetadata>
7110 {
7111 type Operation = lro::internal::Operation<
7112 crate::model::PrivateConnection,
7113 crate::model::OperationMetadata,
7114 >;
7115 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7116 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7117
7118 let stub = self.0.stub.clone();
7119 let mut options = self.0.options.clone();
7120 options.set_retry_policy(gax::retry_policy::NeverRetry);
7121 let query = move |name| {
7122 let stub = stub.clone();
7123 let options = options.clone();
7124 async {
7125 let op = GetOperation::new(stub)
7126 .set_name(name)
7127 .with_options(options)
7128 .send()
7129 .await?;
7130 Ok(Operation::new(op))
7131 }
7132 };
7133
7134 let start = move || async {
7135 let op = self.send().await?;
7136 Ok(Operation::new(op))
7137 };
7138
7139 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7140 }
7141
7142 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7146 self.0.request.parent = v.into();
7147 self
7148 }
7149
7150 pub fn set_private_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7154 self.0.request.private_connection_id = v.into();
7155 self
7156 }
7157
7158 pub fn set_private_connection<
7162 T: Into<std::option::Option<crate::model::PrivateConnection>>,
7163 >(
7164 mut self,
7165 v: T,
7166 ) -> Self {
7167 self.0.request.private_connection = v.into();
7168 self
7169 }
7170
7171 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7173 self.0.request.request_id = v.into();
7174 self
7175 }
7176 }
7177
7178 #[doc(hidden)]
7179 impl gax::options::internal::RequestBuilder for CreatePrivateConnection {
7180 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7181 &mut self.0.options
7182 }
7183 }
7184
7185 #[derive(Clone, Debug)]
7202 pub struct GetPrivateConnection(RequestBuilder<crate::model::GetPrivateConnectionRequest>);
7203
7204 impl GetPrivateConnection {
7205 pub(crate) fn new(
7206 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7207 ) -> Self {
7208 Self(RequestBuilder::new(stub))
7209 }
7210
7211 pub fn with_request<V: Into<crate::model::GetPrivateConnectionRequest>>(
7213 mut self,
7214 v: V,
7215 ) -> Self {
7216 self.0.request = v.into();
7217 self
7218 }
7219
7220 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7222 self.0.options = v.into();
7223 self
7224 }
7225
7226 pub async fn send(self) -> Result<crate::model::PrivateConnection> {
7228 (*self.0.stub)
7229 .get_private_connection(self.0.request, self.0.options)
7230 .await
7231 .map(gax::response::Response::into_body)
7232 }
7233
7234 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7238 self.0.request.name = v.into();
7239 self
7240 }
7241 }
7242
7243 #[doc(hidden)]
7244 impl gax::options::internal::RequestBuilder for GetPrivateConnection {
7245 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7246 &mut self.0.options
7247 }
7248 }
7249
7250 #[derive(Clone, Debug)]
7271 pub struct ListPrivateConnections(RequestBuilder<crate::model::ListPrivateConnectionsRequest>);
7272
7273 impl ListPrivateConnections {
7274 pub(crate) fn new(
7275 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7276 ) -> Self {
7277 Self(RequestBuilder::new(stub))
7278 }
7279
7280 pub fn with_request<V: Into<crate::model::ListPrivateConnectionsRequest>>(
7282 mut self,
7283 v: V,
7284 ) -> Self {
7285 self.0.request = v.into();
7286 self
7287 }
7288
7289 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7291 self.0.options = v.into();
7292 self
7293 }
7294
7295 pub async fn send(self) -> Result<crate::model::ListPrivateConnectionsResponse> {
7297 (*self.0.stub)
7298 .list_private_connections(self.0.request, self.0.options)
7299 .await
7300 .map(gax::response::Response::into_body)
7301 }
7302
7303 pub fn by_page(
7305 self,
7306 ) -> impl gax::paginator::Paginator<
7307 crate::model::ListPrivateConnectionsResponse,
7308 gax::error::Error,
7309 > {
7310 use std::clone::Clone;
7311 let token = self.0.request.page_token.clone();
7312 let execute = move |token: String| {
7313 let mut builder = self.clone();
7314 builder.0.request = builder.0.request.set_page_token(token);
7315 builder.send()
7316 };
7317 gax::paginator::internal::new_paginator(token, execute)
7318 }
7319
7320 pub fn by_item(
7322 self,
7323 ) -> impl gax::paginator::ItemPaginator<
7324 crate::model::ListPrivateConnectionsResponse,
7325 gax::error::Error,
7326 > {
7327 use gax::paginator::Paginator;
7328 self.by_page().items()
7329 }
7330
7331 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7335 self.0.request.parent = v.into();
7336 self
7337 }
7338
7339 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7341 self.0.request.page_size = v.into();
7342 self
7343 }
7344
7345 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7347 self.0.request.page_token = v.into();
7348 self
7349 }
7350
7351 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7353 self.0.request.filter = v.into();
7354 self
7355 }
7356
7357 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7359 self.0.request.order_by = v.into();
7360 self
7361 }
7362 }
7363
7364 #[doc(hidden)]
7365 impl gax::options::internal::RequestBuilder for ListPrivateConnections {
7366 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7367 &mut self.0.options
7368 }
7369 }
7370
7371 #[derive(Clone, Debug)]
7389 pub struct UpdatePrivateConnection(
7390 RequestBuilder<crate::model::UpdatePrivateConnectionRequest>,
7391 );
7392
7393 impl UpdatePrivateConnection {
7394 pub(crate) fn new(
7395 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7396 ) -> Self {
7397 Self(RequestBuilder::new(stub))
7398 }
7399
7400 pub fn with_request<V: Into<crate::model::UpdatePrivateConnectionRequest>>(
7402 mut self,
7403 v: V,
7404 ) -> Self {
7405 self.0.request = v.into();
7406 self
7407 }
7408
7409 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7411 self.0.options = v.into();
7412 self
7413 }
7414
7415 pub async fn send(self) -> Result<longrunning::model::Operation> {
7422 (*self.0.stub)
7423 .update_private_connection(self.0.request, self.0.options)
7424 .await
7425 .map(gax::response::Response::into_body)
7426 }
7427
7428 pub fn poller(
7430 self,
7431 ) -> impl lro::Poller<crate::model::PrivateConnection, crate::model::OperationMetadata>
7432 {
7433 type Operation = lro::internal::Operation<
7434 crate::model::PrivateConnection,
7435 crate::model::OperationMetadata,
7436 >;
7437 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7438 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7439
7440 let stub = self.0.stub.clone();
7441 let mut options = self.0.options.clone();
7442 options.set_retry_policy(gax::retry_policy::NeverRetry);
7443 let query = move |name| {
7444 let stub = stub.clone();
7445 let options = options.clone();
7446 async {
7447 let op = GetOperation::new(stub)
7448 .set_name(name)
7449 .with_options(options)
7450 .send()
7451 .await?;
7452 Ok(Operation::new(op))
7453 }
7454 };
7455
7456 let start = move || async {
7457 let op = self.send().await?;
7458 Ok(Operation::new(op))
7459 };
7460
7461 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7462 }
7463
7464 pub fn set_private_connection<
7468 T: Into<std::option::Option<crate::model::PrivateConnection>>,
7469 >(
7470 mut self,
7471 v: T,
7472 ) -> Self {
7473 self.0.request.private_connection = v.into();
7474 self
7475 }
7476
7477 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
7481 mut self,
7482 v: T,
7483 ) -> Self {
7484 self.0.request.update_mask = v.into();
7485 self
7486 }
7487
7488 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7490 self.0.request.request_id = v.into();
7491 self
7492 }
7493 }
7494
7495 #[doc(hidden)]
7496 impl gax::options::internal::RequestBuilder for UpdatePrivateConnection {
7497 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7498 &mut self.0.options
7499 }
7500 }
7501
7502 #[derive(Clone, Debug)]
7520 pub struct DeletePrivateConnection(
7521 RequestBuilder<crate::model::DeletePrivateConnectionRequest>,
7522 );
7523
7524 impl DeletePrivateConnection {
7525 pub(crate) fn new(
7526 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7527 ) -> Self {
7528 Self(RequestBuilder::new(stub))
7529 }
7530
7531 pub fn with_request<V: Into<crate::model::DeletePrivateConnectionRequest>>(
7533 mut self,
7534 v: V,
7535 ) -> Self {
7536 self.0.request = v.into();
7537 self
7538 }
7539
7540 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7542 self.0.options = v.into();
7543 self
7544 }
7545
7546 pub async fn send(self) -> Result<longrunning::model::Operation> {
7553 (*self.0.stub)
7554 .delete_private_connection(self.0.request, self.0.options)
7555 .await
7556 .map(gax::response::Response::into_body)
7557 }
7558
7559 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
7561 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7562 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7563 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7564
7565 let stub = self.0.stub.clone();
7566 let mut options = self.0.options.clone();
7567 options.set_retry_policy(gax::retry_policy::NeverRetry);
7568 let query = move |name| {
7569 let stub = stub.clone();
7570 let options = options.clone();
7571 async {
7572 let op = GetOperation::new(stub)
7573 .set_name(name)
7574 .with_options(options)
7575 .send()
7576 .await?;
7577 Ok(Operation::new(op))
7578 }
7579 };
7580
7581 let start = move || async {
7582 let op = self.send().await?;
7583 Ok(Operation::new(op))
7584 };
7585
7586 lro::internal::new_unit_response_poller(
7587 polling_error_policy,
7588 polling_backoff_policy,
7589 start,
7590 query,
7591 )
7592 }
7593
7594 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7598 self.0.request.name = v.into();
7599 self
7600 }
7601
7602 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7604 self.0.request.request_id = v.into();
7605 self
7606 }
7607 }
7608
7609 #[doc(hidden)]
7610 impl gax::options::internal::RequestBuilder for DeletePrivateConnection {
7611 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7612 &mut self.0.options
7613 }
7614 }
7615
7616 #[derive(Clone, Debug)]
7637 pub struct ListPrivateConnectionPeeringRoutes(
7638 RequestBuilder<crate::model::ListPrivateConnectionPeeringRoutesRequest>,
7639 );
7640
7641 impl ListPrivateConnectionPeeringRoutes {
7642 pub(crate) fn new(
7643 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7644 ) -> Self {
7645 Self(RequestBuilder::new(stub))
7646 }
7647
7648 pub fn with_request<V: Into<crate::model::ListPrivateConnectionPeeringRoutesRequest>>(
7650 mut self,
7651 v: V,
7652 ) -> Self {
7653 self.0.request = v.into();
7654 self
7655 }
7656
7657 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7659 self.0.options = v.into();
7660 self
7661 }
7662
7663 pub async fn send(
7665 self,
7666 ) -> Result<crate::model::ListPrivateConnectionPeeringRoutesResponse> {
7667 (*self.0.stub)
7668 .list_private_connection_peering_routes(self.0.request, self.0.options)
7669 .await
7670 .map(gax::response::Response::into_body)
7671 }
7672
7673 pub fn by_page(
7675 self,
7676 ) -> impl gax::paginator::Paginator<
7677 crate::model::ListPrivateConnectionPeeringRoutesResponse,
7678 gax::error::Error,
7679 > {
7680 use std::clone::Clone;
7681 let token = self.0.request.page_token.clone();
7682 let execute = move |token: String| {
7683 let mut builder = self.clone();
7684 builder.0.request = builder.0.request.set_page_token(token);
7685 builder.send()
7686 };
7687 gax::paginator::internal::new_paginator(token, execute)
7688 }
7689
7690 pub fn by_item(
7692 self,
7693 ) -> impl gax::paginator::ItemPaginator<
7694 crate::model::ListPrivateConnectionPeeringRoutesResponse,
7695 gax::error::Error,
7696 > {
7697 use gax::paginator::Paginator;
7698 self.by_page().items()
7699 }
7700
7701 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7705 self.0.request.parent = v.into();
7706 self
7707 }
7708
7709 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7711 self.0.request.page_size = v.into();
7712 self
7713 }
7714
7715 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7717 self.0.request.page_token = v.into();
7718 self
7719 }
7720 }
7721
7722 #[doc(hidden)]
7723 impl gax::options::internal::RequestBuilder for ListPrivateConnectionPeeringRoutes {
7724 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7725 &mut self.0.options
7726 }
7727 }
7728
7729 #[derive(Clone, Debug)]
7747 pub struct GrantDnsBindPermission(RequestBuilder<crate::model::GrantDnsBindPermissionRequest>);
7748
7749 impl GrantDnsBindPermission {
7750 pub(crate) fn new(
7751 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7752 ) -> Self {
7753 Self(RequestBuilder::new(stub))
7754 }
7755
7756 pub fn with_request<V: Into<crate::model::GrantDnsBindPermissionRequest>>(
7758 mut self,
7759 v: V,
7760 ) -> Self {
7761 self.0.request = v.into();
7762 self
7763 }
7764
7765 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7767 self.0.options = v.into();
7768 self
7769 }
7770
7771 pub async fn send(self) -> Result<longrunning::model::Operation> {
7778 (*self.0.stub)
7779 .grant_dns_bind_permission(self.0.request, self.0.options)
7780 .await
7781 .map(gax::response::Response::into_body)
7782 }
7783
7784 pub fn poller(
7786 self,
7787 ) -> impl lro::Poller<crate::model::DnsBindPermission, crate::model::OperationMetadata>
7788 {
7789 type Operation = lro::internal::Operation<
7790 crate::model::DnsBindPermission,
7791 crate::model::OperationMetadata,
7792 >;
7793 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7794 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7795
7796 let stub = self.0.stub.clone();
7797 let mut options = self.0.options.clone();
7798 options.set_retry_policy(gax::retry_policy::NeverRetry);
7799 let query = move |name| {
7800 let stub = stub.clone();
7801 let options = options.clone();
7802 async {
7803 let op = GetOperation::new(stub)
7804 .set_name(name)
7805 .with_options(options)
7806 .send()
7807 .await?;
7808 Ok(Operation::new(op))
7809 }
7810 };
7811
7812 let start = move || async {
7813 let op = self.send().await?;
7814 Ok(Operation::new(op))
7815 };
7816
7817 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
7818 }
7819
7820 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7824 self.0.request.name = v.into();
7825 self
7826 }
7827
7828 pub fn set_principal<T: Into<std::option::Option<crate::model::Principal>>>(
7832 mut self,
7833 v: T,
7834 ) -> Self {
7835 self.0.request.principal = v.into();
7836 self
7837 }
7838
7839 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7841 self.0.request.request_id = v.into();
7842 self
7843 }
7844 }
7845
7846 #[doc(hidden)]
7847 impl gax::options::internal::RequestBuilder for GrantDnsBindPermission {
7848 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7849 &mut self.0.options
7850 }
7851 }
7852
7853 #[derive(Clone, Debug)]
7870 pub struct GetDnsBindPermission(RequestBuilder<crate::model::GetDnsBindPermissionRequest>);
7871
7872 impl GetDnsBindPermission {
7873 pub(crate) fn new(
7874 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7875 ) -> Self {
7876 Self(RequestBuilder::new(stub))
7877 }
7878
7879 pub fn with_request<V: Into<crate::model::GetDnsBindPermissionRequest>>(
7881 mut self,
7882 v: V,
7883 ) -> Self {
7884 self.0.request = v.into();
7885 self
7886 }
7887
7888 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7890 self.0.options = v.into();
7891 self
7892 }
7893
7894 pub async fn send(self) -> Result<crate::model::DnsBindPermission> {
7896 (*self.0.stub)
7897 .get_dns_bind_permission(self.0.request, self.0.options)
7898 .await
7899 .map(gax::response::Response::into_body)
7900 }
7901
7902 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7906 self.0.request.name = v.into();
7907 self
7908 }
7909 }
7910
7911 #[doc(hidden)]
7912 impl gax::options::internal::RequestBuilder for GetDnsBindPermission {
7913 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7914 &mut self.0.options
7915 }
7916 }
7917
7918 #[derive(Clone, Debug)]
7936 pub struct RevokeDnsBindPermission(
7937 RequestBuilder<crate::model::RevokeDnsBindPermissionRequest>,
7938 );
7939
7940 impl RevokeDnsBindPermission {
7941 pub(crate) fn new(
7942 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
7943 ) -> Self {
7944 Self(RequestBuilder::new(stub))
7945 }
7946
7947 pub fn with_request<V: Into<crate::model::RevokeDnsBindPermissionRequest>>(
7949 mut self,
7950 v: V,
7951 ) -> Self {
7952 self.0.request = v.into();
7953 self
7954 }
7955
7956 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7958 self.0.options = v.into();
7959 self
7960 }
7961
7962 pub async fn send(self) -> Result<longrunning::model::Operation> {
7969 (*self.0.stub)
7970 .revoke_dns_bind_permission(self.0.request, self.0.options)
7971 .await
7972 .map(gax::response::Response::into_body)
7973 }
7974
7975 pub fn poller(
7977 self,
7978 ) -> impl lro::Poller<crate::model::DnsBindPermission, crate::model::OperationMetadata>
7979 {
7980 type Operation = lro::internal::Operation<
7981 crate::model::DnsBindPermission,
7982 crate::model::OperationMetadata,
7983 >;
7984 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7985 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7986
7987 let stub = self.0.stub.clone();
7988 let mut options = self.0.options.clone();
7989 options.set_retry_policy(gax::retry_policy::NeverRetry);
7990 let query = move |name| {
7991 let stub = stub.clone();
7992 let options = options.clone();
7993 async {
7994 let op = GetOperation::new(stub)
7995 .set_name(name)
7996 .with_options(options)
7997 .send()
7998 .await?;
7999 Ok(Operation::new(op))
8000 }
8001 };
8002
8003 let start = move || async {
8004 let op = self.send().await?;
8005 Ok(Operation::new(op))
8006 };
8007
8008 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
8009 }
8010
8011 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8015 self.0.request.name = v.into();
8016 self
8017 }
8018
8019 pub fn set_principal<T: Into<std::option::Option<crate::model::Principal>>>(
8023 mut self,
8024 v: T,
8025 ) -> Self {
8026 self.0.request.principal = v.into();
8027 self
8028 }
8029
8030 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8032 self.0.request.request_id = v.into();
8033 self
8034 }
8035 }
8036
8037 #[doc(hidden)]
8038 impl gax::options::internal::RequestBuilder for RevokeDnsBindPermission {
8039 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8040 &mut self.0.options
8041 }
8042 }
8043
8044 #[derive(Clone, Debug)]
8065 pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
8066
8067 impl ListLocations {
8068 pub(crate) fn new(
8069 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8070 ) -> Self {
8071 Self(RequestBuilder::new(stub))
8072 }
8073
8074 pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
8076 mut self,
8077 v: V,
8078 ) -> Self {
8079 self.0.request = v.into();
8080 self
8081 }
8082
8083 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8085 self.0.options = v.into();
8086 self
8087 }
8088
8089 pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
8091 (*self.0.stub)
8092 .list_locations(self.0.request, self.0.options)
8093 .await
8094 .map(gax::response::Response::into_body)
8095 }
8096
8097 pub fn by_page(
8099 self,
8100 ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
8101 {
8102 use std::clone::Clone;
8103 let token = self.0.request.page_token.clone();
8104 let execute = move |token: String| {
8105 let mut builder = self.clone();
8106 builder.0.request = builder.0.request.set_page_token(token);
8107 builder.send()
8108 };
8109 gax::paginator::internal::new_paginator(token, execute)
8110 }
8111
8112 pub fn by_item(
8114 self,
8115 ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
8116 {
8117 use gax::paginator::Paginator;
8118 self.by_page().items()
8119 }
8120
8121 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8123 self.0.request.name = v.into();
8124 self
8125 }
8126
8127 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8129 self.0.request.filter = v.into();
8130 self
8131 }
8132
8133 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8135 self.0.request.page_size = v.into();
8136 self
8137 }
8138
8139 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8141 self.0.request.page_token = v.into();
8142 self
8143 }
8144 }
8145
8146 #[doc(hidden)]
8147 impl gax::options::internal::RequestBuilder for ListLocations {
8148 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8149 &mut self.0.options
8150 }
8151 }
8152
8153 #[derive(Clone, Debug)]
8170 pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
8171
8172 impl GetLocation {
8173 pub(crate) fn new(
8174 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8175 ) -> Self {
8176 Self(RequestBuilder::new(stub))
8177 }
8178
8179 pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
8181 self.0.request = v.into();
8182 self
8183 }
8184
8185 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8187 self.0.options = v.into();
8188 self
8189 }
8190
8191 pub async fn send(self) -> Result<location::model::Location> {
8193 (*self.0.stub)
8194 .get_location(self.0.request, self.0.options)
8195 .await
8196 .map(gax::response::Response::into_body)
8197 }
8198
8199 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8201 self.0.request.name = v.into();
8202 self
8203 }
8204 }
8205
8206 #[doc(hidden)]
8207 impl gax::options::internal::RequestBuilder for GetLocation {
8208 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8209 &mut self.0.options
8210 }
8211 }
8212
8213 #[derive(Clone, Debug)]
8230 pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
8231
8232 impl SetIamPolicy {
8233 pub(crate) fn new(
8234 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8235 ) -> Self {
8236 Self(RequestBuilder::new(stub))
8237 }
8238
8239 pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
8241 self.0.request = v.into();
8242 self
8243 }
8244
8245 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8247 self.0.options = v.into();
8248 self
8249 }
8250
8251 pub async fn send(self) -> Result<iam_v1::model::Policy> {
8253 (*self.0.stub)
8254 .set_iam_policy(self.0.request, self.0.options)
8255 .await
8256 .map(gax::response::Response::into_body)
8257 }
8258
8259 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8263 self.0.request.resource = v.into();
8264 self
8265 }
8266
8267 pub fn set_policy<T: Into<std::option::Option<iam_v1::model::Policy>>>(
8271 mut self,
8272 v: T,
8273 ) -> Self {
8274 self.0.request.policy = v.into();
8275 self
8276 }
8277
8278 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
8280 mut self,
8281 v: T,
8282 ) -> Self {
8283 self.0.request.update_mask = v.into();
8284 self
8285 }
8286 }
8287
8288 #[doc(hidden)]
8289 impl gax::options::internal::RequestBuilder for SetIamPolicy {
8290 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8291 &mut self.0.options
8292 }
8293 }
8294
8295 #[derive(Clone, Debug)]
8312 pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
8313
8314 impl GetIamPolicy {
8315 pub(crate) fn new(
8316 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8317 ) -> Self {
8318 Self(RequestBuilder::new(stub))
8319 }
8320
8321 pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
8323 self.0.request = v.into();
8324 self
8325 }
8326
8327 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8329 self.0.options = v.into();
8330 self
8331 }
8332
8333 pub async fn send(self) -> Result<iam_v1::model::Policy> {
8335 (*self.0.stub)
8336 .get_iam_policy(self.0.request, self.0.options)
8337 .await
8338 .map(gax::response::Response::into_body)
8339 }
8340
8341 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8345 self.0.request.resource = v.into();
8346 self
8347 }
8348
8349 pub fn set_options<T: Into<std::option::Option<iam_v1::model::GetPolicyOptions>>>(
8351 mut self,
8352 v: T,
8353 ) -> Self {
8354 self.0.request.options = v.into();
8355 self
8356 }
8357 }
8358
8359 #[doc(hidden)]
8360 impl gax::options::internal::RequestBuilder for GetIamPolicy {
8361 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8362 &mut self.0.options
8363 }
8364 }
8365
8366 #[derive(Clone, Debug)]
8383 pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
8384
8385 impl TestIamPermissions {
8386 pub(crate) fn new(
8387 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8388 ) -> Self {
8389 Self(RequestBuilder::new(stub))
8390 }
8391
8392 pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
8394 mut self,
8395 v: V,
8396 ) -> Self {
8397 self.0.request = v.into();
8398 self
8399 }
8400
8401 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8403 self.0.options = v.into();
8404 self
8405 }
8406
8407 pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
8409 (*self.0.stub)
8410 .test_iam_permissions(self.0.request, self.0.options)
8411 .await
8412 .map(gax::response::Response::into_body)
8413 }
8414
8415 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8419 self.0.request.resource = v.into();
8420 self
8421 }
8422
8423 pub fn set_permissions<T, V>(mut self, v: T) -> Self
8427 where
8428 T: std::iter::IntoIterator<Item = V>,
8429 V: std::convert::Into<std::string::String>,
8430 {
8431 use std::iter::Iterator;
8432 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8433 self
8434 }
8435 }
8436
8437 #[doc(hidden)]
8438 impl gax::options::internal::RequestBuilder for TestIamPermissions {
8439 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8440 &mut self.0.options
8441 }
8442 }
8443
8444 #[derive(Clone, Debug)]
8465 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
8466
8467 impl ListOperations {
8468 pub(crate) fn new(
8469 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8470 ) -> Self {
8471 Self(RequestBuilder::new(stub))
8472 }
8473
8474 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
8476 mut self,
8477 v: V,
8478 ) -> Self {
8479 self.0.request = v.into();
8480 self
8481 }
8482
8483 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8485 self.0.options = v.into();
8486 self
8487 }
8488
8489 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
8491 (*self.0.stub)
8492 .list_operations(self.0.request, self.0.options)
8493 .await
8494 .map(gax::response::Response::into_body)
8495 }
8496
8497 pub fn by_page(
8499 self,
8500 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
8501 {
8502 use std::clone::Clone;
8503 let token = self.0.request.page_token.clone();
8504 let execute = move |token: String| {
8505 let mut builder = self.clone();
8506 builder.0.request = builder.0.request.set_page_token(token);
8507 builder.send()
8508 };
8509 gax::paginator::internal::new_paginator(token, execute)
8510 }
8511
8512 pub fn by_item(
8514 self,
8515 ) -> impl gax::paginator::ItemPaginator<
8516 longrunning::model::ListOperationsResponse,
8517 gax::error::Error,
8518 > {
8519 use gax::paginator::Paginator;
8520 self.by_page().items()
8521 }
8522
8523 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8525 self.0.request.name = v.into();
8526 self
8527 }
8528
8529 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8531 self.0.request.filter = v.into();
8532 self
8533 }
8534
8535 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8537 self.0.request.page_size = v.into();
8538 self
8539 }
8540
8541 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8543 self.0.request.page_token = v.into();
8544 self
8545 }
8546 }
8547
8548 #[doc(hidden)]
8549 impl gax::options::internal::RequestBuilder for ListOperations {
8550 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8551 &mut self.0.options
8552 }
8553 }
8554
8555 #[derive(Clone, Debug)]
8572 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
8573
8574 impl GetOperation {
8575 pub(crate) fn new(
8576 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8577 ) -> Self {
8578 Self(RequestBuilder::new(stub))
8579 }
8580
8581 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
8583 mut self,
8584 v: V,
8585 ) -> Self {
8586 self.0.request = v.into();
8587 self
8588 }
8589
8590 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8592 self.0.options = v.into();
8593 self
8594 }
8595
8596 pub async fn send(self) -> Result<longrunning::model::Operation> {
8598 (*self.0.stub)
8599 .get_operation(self.0.request, self.0.options)
8600 .await
8601 .map(gax::response::Response::into_body)
8602 }
8603
8604 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8606 self.0.request.name = v.into();
8607 self
8608 }
8609 }
8610
8611 #[doc(hidden)]
8612 impl gax::options::internal::RequestBuilder for GetOperation {
8613 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8614 &mut self.0.options
8615 }
8616 }
8617
8618 #[derive(Clone, Debug)]
8635 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
8636
8637 impl DeleteOperation {
8638 pub(crate) fn new(
8639 stub: std::sync::Arc<dyn super::super::stub::dynamic::VmwareEngine>,
8640 ) -> Self {
8641 Self(RequestBuilder::new(stub))
8642 }
8643
8644 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
8646 mut self,
8647 v: V,
8648 ) -> Self {
8649 self.0.request = v.into();
8650 self
8651 }
8652
8653 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8655 self.0.options = v.into();
8656 self
8657 }
8658
8659 pub async fn send(self) -> Result<()> {
8661 (*self.0.stub)
8662 .delete_operation(self.0.request, self.0.options)
8663 .await
8664 .map(gax::response::Response::into_body)
8665 }
8666
8667 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8669 self.0.request.name = v.into();
8670 self
8671 }
8672 }
8673
8674 #[doc(hidden)]
8675 impl gax::options::internal::RequestBuilder for DeleteOperation {
8676 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8677 &mut self.0.options
8678 }
8679 }
8680}