1pub mod net_app {
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::NetApp;
38 pub struct Factory;
39 impl gax::client_builder::internal::ClientFactory for Factory {
40 type Client = NetApp;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> gax::client_builder::Result<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>,
55 request: R,
56 options: gax::options::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
64 Self {
65 stub,
66 request: R::default(),
67 options: gax::options::RequestOptions::default(),
68 }
69 }
70 }
71
72 #[derive(Clone, Debug)]
93 pub struct ListStoragePools(RequestBuilder<crate::model::ListStoragePoolsRequest>);
94
95 impl ListStoragePools {
96 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
97 Self(RequestBuilder::new(stub))
98 }
99
100 pub fn with_request<V: Into<crate::model::ListStoragePoolsRequest>>(
102 mut self,
103 v: V,
104 ) -> Self {
105 self.0.request = v.into();
106 self
107 }
108
109 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
111 self.0.options = v.into();
112 self
113 }
114
115 pub async fn send(self) -> Result<crate::model::ListStoragePoolsResponse> {
117 (*self.0.stub)
118 .list_storage_pools(self.0.request, self.0.options)
119 .await
120 .map(gax::response::Response::into_body)
121 }
122
123 pub fn by_page(
125 self,
126 ) -> impl gax::paginator::Paginator<crate::model::ListStoragePoolsResponse, gax::error::Error>
127 {
128 use std::clone::Clone;
129 let token = self.0.request.page_token.clone();
130 let execute = move |token: String| {
131 let mut builder = self.clone();
132 builder.0.request = builder.0.request.set_page_token(token);
133 builder.send()
134 };
135 gax::paginator::internal::new_paginator(token, execute)
136 }
137
138 pub fn by_item(
140 self,
141 ) -> impl gax::paginator::ItemPaginator<crate::model::ListStoragePoolsResponse, gax::error::Error>
142 {
143 use gax::paginator::Paginator;
144 self.by_page().items()
145 }
146
147 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
151 self.0.request.parent = v.into();
152 self
153 }
154
155 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
157 self.0.request.page_size = v.into();
158 self
159 }
160
161 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
163 self.0.request.page_token = v.into();
164 self
165 }
166
167 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
169 self.0.request.order_by = v.into();
170 self
171 }
172
173 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
175 self.0.request.filter = v.into();
176 self
177 }
178 }
179
180 #[doc(hidden)]
181 impl gax::options::internal::RequestBuilder for ListStoragePools {
182 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
183 &mut self.0.options
184 }
185 }
186
187 #[derive(Clone, Debug)]
205 pub struct CreateStoragePool(RequestBuilder<crate::model::CreateStoragePoolRequest>);
206
207 impl CreateStoragePool {
208 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
209 Self(RequestBuilder::new(stub))
210 }
211
212 pub fn with_request<V: Into<crate::model::CreateStoragePoolRequest>>(
214 mut self,
215 v: V,
216 ) -> Self {
217 self.0.request = v.into();
218 self
219 }
220
221 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
223 self.0.options = v.into();
224 self
225 }
226
227 pub async fn send(self) -> Result<longrunning::model::Operation> {
234 (*self.0.stub)
235 .create_storage_pool(self.0.request, self.0.options)
236 .await
237 .map(gax::response::Response::into_body)
238 }
239
240 pub fn poller(
242 self,
243 ) -> impl lro::Poller<crate::model::StoragePool, crate::model::OperationMetadata> {
244 type Operation = lro::internal::Operation<
245 crate::model::StoragePool,
246 crate::model::OperationMetadata,
247 >;
248 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
249 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
250
251 let stub = self.0.stub.clone();
252 let mut options = self.0.options.clone();
253 options.set_retry_policy(gax::retry_policy::NeverRetry);
254 let query = move |name| {
255 let stub = stub.clone();
256 let options = options.clone();
257 async {
258 let op = GetOperation::new(stub)
259 .set_name(name)
260 .with_options(options)
261 .send()
262 .await?;
263 Ok(Operation::new(op))
264 }
265 };
266
267 let start = move || async {
268 let op = self.send().await?;
269 Ok(Operation::new(op))
270 };
271
272 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
273 }
274
275 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
279 self.0.request.parent = v.into();
280 self
281 }
282
283 pub fn set_storage_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
287 self.0.request.storage_pool_id = v.into();
288 self
289 }
290
291 pub fn set_storage_pool<T>(mut self, v: T) -> Self
295 where
296 T: std::convert::Into<crate::model::StoragePool>,
297 {
298 self.0.request.storage_pool = std::option::Option::Some(v.into());
299 self
300 }
301
302 pub fn set_or_clear_storage_pool<T>(mut self, v: std::option::Option<T>) -> Self
306 where
307 T: std::convert::Into<crate::model::StoragePool>,
308 {
309 self.0.request.storage_pool = v.map(|x| x.into());
310 self
311 }
312 }
313
314 #[doc(hidden)]
315 impl gax::options::internal::RequestBuilder for CreateStoragePool {
316 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
317 &mut self.0.options
318 }
319 }
320
321 #[derive(Clone, Debug)]
338 pub struct GetStoragePool(RequestBuilder<crate::model::GetStoragePoolRequest>);
339
340 impl GetStoragePool {
341 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
342 Self(RequestBuilder::new(stub))
343 }
344
345 pub fn with_request<V: Into<crate::model::GetStoragePoolRequest>>(mut self, v: V) -> Self {
347 self.0.request = v.into();
348 self
349 }
350
351 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
353 self.0.options = v.into();
354 self
355 }
356
357 pub async fn send(self) -> Result<crate::model::StoragePool> {
359 (*self.0.stub)
360 .get_storage_pool(self.0.request, self.0.options)
361 .await
362 .map(gax::response::Response::into_body)
363 }
364
365 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
369 self.0.request.name = v.into();
370 self
371 }
372 }
373
374 #[doc(hidden)]
375 impl gax::options::internal::RequestBuilder for GetStoragePool {
376 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
377 &mut self.0.options
378 }
379 }
380
381 #[derive(Clone, Debug)]
399 pub struct UpdateStoragePool(RequestBuilder<crate::model::UpdateStoragePoolRequest>);
400
401 impl UpdateStoragePool {
402 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
403 Self(RequestBuilder::new(stub))
404 }
405
406 pub fn with_request<V: Into<crate::model::UpdateStoragePoolRequest>>(
408 mut self,
409 v: V,
410 ) -> Self {
411 self.0.request = v.into();
412 self
413 }
414
415 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
417 self.0.options = v.into();
418 self
419 }
420
421 pub async fn send(self) -> Result<longrunning::model::Operation> {
428 (*self.0.stub)
429 .update_storage_pool(self.0.request, self.0.options)
430 .await
431 .map(gax::response::Response::into_body)
432 }
433
434 pub fn poller(
436 self,
437 ) -> impl lro::Poller<crate::model::StoragePool, crate::model::OperationMetadata> {
438 type Operation = lro::internal::Operation<
439 crate::model::StoragePool,
440 crate::model::OperationMetadata,
441 >;
442 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
443 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
444
445 let stub = self.0.stub.clone();
446 let mut options = self.0.options.clone();
447 options.set_retry_policy(gax::retry_policy::NeverRetry);
448 let query = move |name| {
449 let stub = stub.clone();
450 let options = options.clone();
451 async {
452 let op = GetOperation::new(stub)
453 .set_name(name)
454 .with_options(options)
455 .send()
456 .await?;
457 Ok(Operation::new(op))
458 }
459 };
460
461 let start = move || async {
462 let op = self.send().await?;
463 Ok(Operation::new(op))
464 };
465
466 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
467 }
468
469 pub fn set_update_mask<T>(mut self, v: T) -> Self
473 where
474 T: std::convert::Into<wkt::FieldMask>,
475 {
476 self.0.request.update_mask = std::option::Option::Some(v.into());
477 self
478 }
479
480 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
484 where
485 T: std::convert::Into<wkt::FieldMask>,
486 {
487 self.0.request.update_mask = v.map(|x| x.into());
488 self
489 }
490
491 pub fn set_storage_pool<T>(mut self, v: T) -> Self
495 where
496 T: std::convert::Into<crate::model::StoragePool>,
497 {
498 self.0.request.storage_pool = std::option::Option::Some(v.into());
499 self
500 }
501
502 pub fn set_or_clear_storage_pool<T>(mut self, v: std::option::Option<T>) -> Self
506 where
507 T: std::convert::Into<crate::model::StoragePool>,
508 {
509 self.0.request.storage_pool = v.map(|x| x.into());
510 self
511 }
512 }
513
514 #[doc(hidden)]
515 impl gax::options::internal::RequestBuilder for UpdateStoragePool {
516 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
517 &mut self.0.options
518 }
519 }
520
521 #[derive(Clone, Debug)]
539 pub struct DeleteStoragePool(RequestBuilder<crate::model::DeleteStoragePoolRequest>);
540
541 impl DeleteStoragePool {
542 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
543 Self(RequestBuilder::new(stub))
544 }
545
546 pub fn with_request<V: Into<crate::model::DeleteStoragePoolRequest>>(
548 mut self,
549 v: V,
550 ) -> Self {
551 self.0.request = v.into();
552 self
553 }
554
555 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
557 self.0.options = v.into();
558 self
559 }
560
561 pub async fn send(self) -> Result<longrunning::model::Operation> {
568 (*self.0.stub)
569 .delete_storage_pool(self.0.request, self.0.options)
570 .await
571 .map(gax::response::Response::into_body)
572 }
573
574 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
576 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
577 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
578 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
579
580 let stub = self.0.stub.clone();
581 let mut options = self.0.options.clone();
582 options.set_retry_policy(gax::retry_policy::NeverRetry);
583 let query = move |name| {
584 let stub = stub.clone();
585 let options = options.clone();
586 async {
587 let op = GetOperation::new(stub)
588 .set_name(name)
589 .with_options(options)
590 .send()
591 .await?;
592 Ok(Operation::new(op))
593 }
594 };
595
596 let start = move || async {
597 let op = self.send().await?;
598 Ok(Operation::new(op))
599 };
600
601 lro::internal::new_unit_response_poller(
602 polling_error_policy,
603 polling_backoff_policy,
604 start,
605 query,
606 )
607 }
608
609 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
613 self.0.request.name = v.into();
614 self
615 }
616 }
617
618 #[doc(hidden)]
619 impl gax::options::internal::RequestBuilder for DeleteStoragePool {
620 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
621 &mut self.0.options
622 }
623 }
624
625 #[derive(Clone, Debug)]
643 pub struct ValidateDirectoryService(
644 RequestBuilder<crate::model::ValidateDirectoryServiceRequest>,
645 );
646
647 impl ValidateDirectoryService {
648 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
649 Self(RequestBuilder::new(stub))
650 }
651
652 pub fn with_request<V: Into<crate::model::ValidateDirectoryServiceRequest>>(
654 mut self,
655 v: V,
656 ) -> Self {
657 self.0.request = v.into();
658 self
659 }
660
661 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
663 self.0.options = v.into();
664 self
665 }
666
667 pub async fn send(self) -> Result<longrunning::model::Operation> {
674 (*self.0.stub)
675 .validate_directory_service(self.0.request, self.0.options)
676 .await
677 .map(gax::response::Response::into_body)
678 }
679
680 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
682 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
683 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
684 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
685
686 let stub = self.0.stub.clone();
687 let mut options = self.0.options.clone();
688 options.set_retry_policy(gax::retry_policy::NeverRetry);
689 let query = move |name| {
690 let stub = stub.clone();
691 let options = options.clone();
692 async {
693 let op = GetOperation::new(stub)
694 .set_name(name)
695 .with_options(options)
696 .send()
697 .await?;
698 Ok(Operation::new(op))
699 }
700 };
701
702 let start = move || async {
703 let op = self.send().await?;
704 Ok(Operation::new(op))
705 };
706
707 lro::internal::new_unit_response_poller(
708 polling_error_policy,
709 polling_backoff_policy,
710 start,
711 query,
712 )
713 }
714
715 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
719 self.0.request.name = v.into();
720 self
721 }
722
723 pub fn set_directory_service_type<T: Into<crate::model::DirectoryServiceType>>(
725 mut self,
726 v: T,
727 ) -> Self {
728 self.0.request.directory_service_type = v.into();
729 self
730 }
731 }
732
733 #[doc(hidden)]
734 impl gax::options::internal::RequestBuilder for ValidateDirectoryService {
735 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
736 &mut self.0.options
737 }
738 }
739
740 #[derive(Clone, Debug)]
758 pub struct SwitchActiveReplicaZone(
759 RequestBuilder<crate::model::SwitchActiveReplicaZoneRequest>,
760 );
761
762 impl SwitchActiveReplicaZone {
763 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
764 Self(RequestBuilder::new(stub))
765 }
766
767 pub fn with_request<V: Into<crate::model::SwitchActiveReplicaZoneRequest>>(
769 mut self,
770 v: V,
771 ) -> Self {
772 self.0.request = v.into();
773 self
774 }
775
776 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
778 self.0.options = v.into();
779 self
780 }
781
782 pub async fn send(self) -> Result<longrunning::model::Operation> {
789 (*self.0.stub)
790 .switch_active_replica_zone(self.0.request, self.0.options)
791 .await
792 .map(gax::response::Response::into_body)
793 }
794
795 pub fn poller(
797 self,
798 ) -> impl lro::Poller<crate::model::StoragePool, crate::model::OperationMetadata> {
799 type Operation = lro::internal::Operation<
800 crate::model::StoragePool,
801 crate::model::OperationMetadata,
802 >;
803 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
804 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
805
806 let stub = self.0.stub.clone();
807 let mut options = self.0.options.clone();
808 options.set_retry_policy(gax::retry_policy::NeverRetry);
809 let query = move |name| {
810 let stub = stub.clone();
811 let options = options.clone();
812 async {
813 let op = GetOperation::new(stub)
814 .set_name(name)
815 .with_options(options)
816 .send()
817 .await?;
818 Ok(Operation::new(op))
819 }
820 };
821
822 let start = move || async {
823 let op = self.send().await?;
824 Ok(Operation::new(op))
825 };
826
827 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
828 }
829
830 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
834 self.0.request.name = v.into();
835 self
836 }
837 }
838
839 #[doc(hidden)]
840 impl gax::options::internal::RequestBuilder for SwitchActiveReplicaZone {
841 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
842 &mut self.0.options
843 }
844 }
845
846 #[derive(Clone, Debug)]
867 pub struct ListVolumes(RequestBuilder<crate::model::ListVolumesRequest>);
868
869 impl ListVolumes {
870 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
871 Self(RequestBuilder::new(stub))
872 }
873
874 pub fn with_request<V: Into<crate::model::ListVolumesRequest>>(mut self, v: V) -> Self {
876 self.0.request = v.into();
877 self
878 }
879
880 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
882 self.0.options = v.into();
883 self
884 }
885
886 pub async fn send(self) -> Result<crate::model::ListVolumesResponse> {
888 (*self.0.stub)
889 .list_volumes(self.0.request, self.0.options)
890 .await
891 .map(gax::response::Response::into_body)
892 }
893
894 pub fn by_page(
896 self,
897 ) -> impl gax::paginator::Paginator<crate::model::ListVolumesResponse, gax::error::Error>
898 {
899 use std::clone::Clone;
900 let token = self.0.request.page_token.clone();
901 let execute = move |token: String| {
902 let mut builder = self.clone();
903 builder.0.request = builder.0.request.set_page_token(token);
904 builder.send()
905 };
906 gax::paginator::internal::new_paginator(token, execute)
907 }
908
909 pub fn by_item(
911 self,
912 ) -> impl gax::paginator::ItemPaginator<crate::model::ListVolumesResponse, gax::error::Error>
913 {
914 use gax::paginator::Paginator;
915 self.by_page().items()
916 }
917
918 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
922 self.0.request.parent = v.into();
923 self
924 }
925
926 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
928 self.0.request.page_size = v.into();
929 self
930 }
931
932 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
934 self.0.request.page_token = v.into();
935 self
936 }
937
938 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
940 self.0.request.filter = v.into();
941 self
942 }
943
944 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
946 self.0.request.order_by = v.into();
947 self
948 }
949 }
950
951 #[doc(hidden)]
952 impl gax::options::internal::RequestBuilder for ListVolumes {
953 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
954 &mut self.0.options
955 }
956 }
957
958 #[derive(Clone, Debug)]
975 pub struct GetVolume(RequestBuilder<crate::model::GetVolumeRequest>);
976
977 impl GetVolume {
978 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
979 Self(RequestBuilder::new(stub))
980 }
981
982 pub fn with_request<V: Into<crate::model::GetVolumeRequest>>(mut self, v: V) -> Self {
984 self.0.request = v.into();
985 self
986 }
987
988 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
990 self.0.options = v.into();
991 self
992 }
993
994 pub async fn send(self) -> Result<crate::model::Volume> {
996 (*self.0.stub)
997 .get_volume(self.0.request, self.0.options)
998 .await
999 .map(gax::response::Response::into_body)
1000 }
1001
1002 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1006 self.0.request.name = v.into();
1007 self
1008 }
1009 }
1010
1011 #[doc(hidden)]
1012 impl gax::options::internal::RequestBuilder for GetVolume {
1013 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1014 &mut self.0.options
1015 }
1016 }
1017
1018 #[derive(Clone, Debug)]
1036 pub struct CreateVolume(RequestBuilder<crate::model::CreateVolumeRequest>);
1037
1038 impl CreateVolume {
1039 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1040 Self(RequestBuilder::new(stub))
1041 }
1042
1043 pub fn with_request<V: Into<crate::model::CreateVolumeRequest>>(mut self, v: V) -> Self {
1045 self.0.request = v.into();
1046 self
1047 }
1048
1049 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1051 self.0.options = v.into();
1052 self
1053 }
1054
1055 pub async fn send(self) -> Result<longrunning::model::Operation> {
1062 (*self.0.stub)
1063 .create_volume(self.0.request, self.0.options)
1064 .await
1065 .map(gax::response::Response::into_body)
1066 }
1067
1068 pub fn poller(
1070 self,
1071 ) -> impl lro::Poller<crate::model::Volume, crate::model::OperationMetadata> {
1072 type Operation =
1073 lro::internal::Operation<crate::model::Volume, crate::model::OperationMetadata>;
1074 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1075 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1076
1077 let stub = self.0.stub.clone();
1078 let mut options = self.0.options.clone();
1079 options.set_retry_policy(gax::retry_policy::NeverRetry);
1080 let query = move |name| {
1081 let stub = stub.clone();
1082 let options = options.clone();
1083 async {
1084 let op = GetOperation::new(stub)
1085 .set_name(name)
1086 .with_options(options)
1087 .send()
1088 .await?;
1089 Ok(Operation::new(op))
1090 }
1091 };
1092
1093 let start = move || async {
1094 let op = self.send().await?;
1095 Ok(Operation::new(op))
1096 };
1097
1098 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1099 }
1100
1101 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1105 self.0.request.parent = v.into();
1106 self
1107 }
1108
1109 pub fn set_volume_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1113 self.0.request.volume_id = v.into();
1114 self
1115 }
1116
1117 pub fn set_volume<T>(mut self, v: T) -> Self
1121 where
1122 T: std::convert::Into<crate::model::Volume>,
1123 {
1124 self.0.request.volume = std::option::Option::Some(v.into());
1125 self
1126 }
1127
1128 pub fn set_or_clear_volume<T>(mut self, v: std::option::Option<T>) -> Self
1132 where
1133 T: std::convert::Into<crate::model::Volume>,
1134 {
1135 self.0.request.volume = v.map(|x| x.into());
1136 self
1137 }
1138 }
1139
1140 #[doc(hidden)]
1141 impl gax::options::internal::RequestBuilder for CreateVolume {
1142 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1143 &mut self.0.options
1144 }
1145 }
1146
1147 #[derive(Clone, Debug)]
1165 pub struct UpdateVolume(RequestBuilder<crate::model::UpdateVolumeRequest>);
1166
1167 impl UpdateVolume {
1168 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1169 Self(RequestBuilder::new(stub))
1170 }
1171
1172 pub fn with_request<V: Into<crate::model::UpdateVolumeRequest>>(mut self, v: V) -> Self {
1174 self.0.request = v.into();
1175 self
1176 }
1177
1178 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1180 self.0.options = v.into();
1181 self
1182 }
1183
1184 pub async fn send(self) -> Result<longrunning::model::Operation> {
1191 (*self.0.stub)
1192 .update_volume(self.0.request, self.0.options)
1193 .await
1194 .map(gax::response::Response::into_body)
1195 }
1196
1197 pub fn poller(
1199 self,
1200 ) -> impl lro::Poller<crate::model::Volume, crate::model::OperationMetadata> {
1201 type Operation =
1202 lro::internal::Operation<crate::model::Volume, crate::model::OperationMetadata>;
1203 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1204 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1205
1206 let stub = self.0.stub.clone();
1207 let mut options = self.0.options.clone();
1208 options.set_retry_policy(gax::retry_policy::NeverRetry);
1209 let query = move |name| {
1210 let stub = stub.clone();
1211 let options = options.clone();
1212 async {
1213 let op = GetOperation::new(stub)
1214 .set_name(name)
1215 .with_options(options)
1216 .send()
1217 .await?;
1218 Ok(Operation::new(op))
1219 }
1220 };
1221
1222 let start = move || async {
1223 let op = self.send().await?;
1224 Ok(Operation::new(op))
1225 };
1226
1227 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1228 }
1229
1230 pub fn set_update_mask<T>(mut self, v: T) -> Self
1234 where
1235 T: std::convert::Into<wkt::FieldMask>,
1236 {
1237 self.0.request.update_mask = std::option::Option::Some(v.into());
1238 self
1239 }
1240
1241 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1245 where
1246 T: std::convert::Into<wkt::FieldMask>,
1247 {
1248 self.0.request.update_mask = v.map(|x| x.into());
1249 self
1250 }
1251
1252 pub fn set_volume<T>(mut self, v: T) -> Self
1256 where
1257 T: std::convert::Into<crate::model::Volume>,
1258 {
1259 self.0.request.volume = std::option::Option::Some(v.into());
1260 self
1261 }
1262
1263 pub fn set_or_clear_volume<T>(mut self, v: std::option::Option<T>) -> Self
1267 where
1268 T: std::convert::Into<crate::model::Volume>,
1269 {
1270 self.0.request.volume = v.map(|x| x.into());
1271 self
1272 }
1273 }
1274
1275 #[doc(hidden)]
1276 impl gax::options::internal::RequestBuilder for UpdateVolume {
1277 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1278 &mut self.0.options
1279 }
1280 }
1281
1282 #[derive(Clone, Debug)]
1300 pub struct DeleteVolume(RequestBuilder<crate::model::DeleteVolumeRequest>);
1301
1302 impl DeleteVolume {
1303 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1304 Self(RequestBuilder::new(stub))
1305 }
1306
1307 pub fn with_request<V: Into<crate::model::DeleteVolumeRequest>>(mut self, v: V) -> Self {
1309 self.0.request = v.into();
1310 self
1311 }
1312
1313 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1315 self.0.options = v.into();
1316 self
1317 }
1318
1319 pub async fn send(self) -> Result<longrunning::model::Operation> {
1326 (*self.0.stub)
1327 .delete_volume(self.0.request, self.0.options)
1328 .await
1329 .map(gax::response::Response::into_body)
1330 }
1331
1332 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
1334 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1335 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1336 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1337
1338 let stub = self.0.stub.clone();
1339 let mut options = self.0.options.clone();
1340 options.set_retry_policy(gax::retry_policy::NeverRetry);
1341 let query = move |name| {
1342 let stub = stub.clone();
1343 let options = options.clone();
1344 async {
1345 let op = GetOperation::new(stub)
1346 .set_name(name)
1347 .with_options(options)
1348 .send()
1349 .await?;
1350 Ok(Operation::new(op))
1351 }
1352 };
1353
1354 let start = move || async {
1355 let op = self.send().await?;
1356 Ok(Operation::new(op))
1357 };
1358
1359 lro::internal::new_unit_response_poller(
1360 polling_error_policy,
1361 polling_backoff_policy,
1362 start,
1363 query,
1364 )
1365 }
1366
1367 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1371 self.0.request.name = v.into();
1372 self
1373 }
1374
1375 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
1377 self.0.request.force = v.into();
1378 self
1379 }
1380 }
1381
1382 #[doc(hidden)]
1383 impl gax::options::internal::RequestBuilder for DeleteVolume {
1384 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1385 &mut self.0.options
1386 }
1387 }
1388
1389 #[derive(Clone, Debug)]
1407 pub struct RevertVolume(RequestBuilder<crate::model::RevertVolumeRequest>);
1408
1409 impl RevertVolume {
1410 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1411 Self(RequestBuilder::new(stub))
1412 }
1413
1414 pub fn with_request<V: Into<crate::model::RevertVolumeRequest>>(mut self, v: V) -> Self {
1416 self.0.request = v.into();
1417 self
1418 }
1419
1420 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1422 self.0.options = v.into();
1423 self
1424 }
1425
1426 pub async fn send(self) -> Result<longrunning::model::Operation> {
1433 (*self.0.stub)
1434 .revert_volume(self.0.request, self.0.options)
1435 .await
1436 .map(gax::response::Response::into_body)
1437 }
1438
1439 pub fn poller(
1441 self,
1442 ) -> impl lro::Poller<crate::model::Volume, crate::model::OperationMetadata> {
1443 type Operation =
1444 lro::internal::Operation<crate::model::Volume, crate::model::OperationMetadata>;
1445 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1446 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1447
1448 let stub = self.0.stub.clone();
1449 let mut options = self.0.options.clone();
1450 options.set_retry_policy(gax::retry_policy::NeverRetry);
1451 let query = move |name| {
1452 let stub = stub.clone();
1453 let options = options.clone();
1454 async {
1455 let op = GetOperation::new(stub)
1456 .set_name(name)
1457 .with_options(options)
1458 .send()
1459 .await?;
1460 Ok(Operation::new(op))
1461 }
1462 };
1463
1464 let start = move || async {
1465 let op = self.send().await?;
1466 Ok(Operation::new(op))
1467 };
1468
1469 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1470 }
1471
1472 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1476 self.0.request.name = v.into();
1477 self
1478 }
1479
1480 pub fn set_snapshot_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1484 self.0.request.snapshot_id = v.into();
1485 self
1486 }
1487 }
1488
1489 #[doc(hidden)]
1490 impl gax::options::internal::RequestBuilder for RevertVolume {
1491 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1492 &mut self.0.options
1493 }
1494 }
1495
1496 #[derive(Clone, Debug)]
1517 pub struct ListSnapshots(RequestBuilder<crate::model::ListSnapshotsRequest>);
1518
1519 impl ListSnapshots {
1520 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1521 Self(RequestBuilder::new(stub))
1522 }
1523
1524 pub fn with_request<V: Into<crate::model::ListSnapshotsRequest>>(mut self, v: V) -> Self {
1526 self.0.request = v.into();
1527 self
1528 }
1529
1530 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1532 self.0.options = v.into();
1533 self
1534 }
1535
1536 pub async fn send(self) -> Result<crate::model::ListSnapshotsResponse> {
1538 (*self.0.stub)
1539 .list_snapshots(self.0.request, self.0.options)
1540 .await
1541 .map(gax::response::Response::into_body)
1542 }
1543
1544 pub fn by_page(
1546 self,
1547 ) -> impl gax::paginator::Paginator<crate::model::ListSnapshotsResponse, gax::error::Error>
1548 {
1549 use std::clone::Clone;
1550 let token = self.0.request.page_token.clone();
1551 let execute = move |token: String| {
1552 let mut builder = self.clone();
1553 builder.0.request = builder.0.request.set_page_token(token);
1554 builder.send()
1555 };
1556 gax::paginator::internal::new_paginator(token, execute)
1557 }
1558
1559 pub fn by_item(
1561 self,
1562 ) -> impl gax::paginator::ItemPaginator<crate::model::ListSnapshotsResponse, gax::error::Error>
1563 {
1564 use gax::paginator::Paginator;
1565 self.by_page().items()
1566 }
1567
1568 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1572 self.0.request.parent = v.into();
1573 self
1574 }
1575
1576 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1578 self.0.request.page_size = v.into();
1579 self
1580 }
1581
1582 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1584 self.0.request.page_token = v.into();
1585 self
1586 }
1587
1588 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1590 self.0.request.order_by = v.into();
1591 self
1592 }
1593
1594 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1596 self.0.request.filter = v.into();
1597 self
1598 }
1599 }
1600
1601 #[doc(hidden)]
1602 impl gax::options::internal::RequestBuilder for ListSnapshots {
1603 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1604 &mut self.0.options
1605 }
1606 }
1607
1608 #[derive(Clone, Debug)]
1625 pub struct GetSnapshot(RequestBuilder<crate::model::GetSnapshotRequest>);
1626
1627 impl GetSnapshot {
1628 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1629 Self(RequestBuilder::new(stub))
1630 }
1631
1632 pub fn with_request<V: Into<crate::model::GetSnapshotRequest>>(mut self, v: V) -> Self {
1634 self.0.request = v.into();
1635 self
1636 }
1637
1638 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1640 self.0.options = v.into();
1641 self
1642 }
1643
1644 pub async fn send(self) -> Result<crate::model::Snapshot> {
1646 (*self.0.stub)
1647 .get_snapshot(self.0.request, self.0.options)
1648 .await
1649 .map(gax::response::Response::into_body)
1650 }
1651
1652 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1656 self.0.request.name = v.into();
1657 self
1658 }
1659 }
1660
1661 #[doc(hidden)]
1662 impl gax::options::internal::RequestBuilder for GetSnapshot {
1663 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1664 &mut self.0.options
1665 }
1666 }
1667
1668 #[derive(Clone, Debug)]
1686 pub struct CreateSnapshot(RequestBuilder<crate::model::CreateSnapshotRequest>);
1687
1688 impl CreateSnapshot {
1689 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1690 Self(RequestBuilder::new(stub))
1691 }
1692
1693 pub fn with_request<V: Into<crate::model::CreateSnapshotRequest>>(mut self, v: V) -> Self {
1695 self.0.request = v.into();
1696 self
1697 }
1698
1699 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1701 self.0.options = v.into();
1702 self
1703 }
1704
1705 pub async fn send(self) -> Result<longrunning::model::Operation> {
1712 (*self.0.stub)
1713 .create_snapshot(self.0.request, self.0.options)
1714 .await
1715 .map(gax::response::Response::into_body)
1716 }
1717
1718 pub fn poller(
1720 self,
1721 ) -> impl lro::Poller<crate::model::Snapshot, crate::model::OperationMetadata> {
1722 type Operation =
1723 lro::internal::Operation<crate::model::Snapshot, crate::model::OperationMetadata>;
1724 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1725 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1726
1727 let stub = self.0.stub.clone();
1728 let mut options = self.0.options.clone();
1729 options.set_retry_policy(gax::retry_policy::NeverRetry);
1730 let query = move |name| {
1731 let stub = stub.clone();
1732 let options = options.clone();
1733 async {
1734 let op = GetOperation::new(stub)
1735 .set_name(name)
1736 .with_options(options)
1737 .send()
1738 .await?;
1739 Ok(Operation::new(op))
1740 }
1741 };
1742
1743 let start = move || async {
1744 let op = self.send().await?;
1745 Ok(Operation::new(op))
1746 };
1747
1748 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1749 }
1750
1751 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1755 self.0.request.parent = v.into();
1756 self
1757 }
1758
1759 pub fn set_snapshot<T>(mut self, v: T) -> Self
1763 where
1764 T: std::convert::Into<crate::model::Snapshot>,
1765 {
1766 self.0.request.snapshot = std::option::Option::Some(v.into());
1767 self
1768 }
1769
1770 pub fn set_or_clear_snapshot<T>(mut self, v: std::option::Option<T>) -> Self
1774 where
1775 T: std::convert::Into<crate::model::Snapshot>,
1776 {
1777 self.0.request.snapshot = v.map(|x| x.into());
1778 self
1779 }
1780
1781 pub fn set_snapshot_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1785 self.0.request.snapshot_id = v.into();
1786 self
1787 }
1788 }
1789
1790 #[doc(hidden)]
1791 impl gax::options::internal::RequestBuilder for CreateSnapshot {
1792 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1793 &mut self.0.options
1794 }
1795 }
1796
1797 #[derive(Clone, Debug)]
1815 pub struct DeleteSnapshot(RequestBuilder<crate::model::DeleteSnapshotRequest>);
1816
1817 impl DeleteSnapshot {
1818 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1819 Self(RequestBuilder::new(stub))
1820 }
1821
1822 pub fn with_request<V: Into<crate::model::DeleteSnapshotRequest>>(mut self, v: V) -> Self {
1824 self.0.request = v.into();
1825 self
1826 }
1827
1828 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1830 self.0.options = v.into();
1831 self
1832 }
1833
1834 pub async fn send(self) -> Result<longrunning::model::Operation> {
1841 (*self.0.stub)
1842 .delete_snapshot(self.0.request, self.0.options)
1843 .await
1844 .map(gax::response::Response::into_body)
1845 }
1846
1847 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
1849 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1850 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1851 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1852
1853 let stub = self.0.stub.clone();
1854 let mut options = self.0.options.clone();
1855 options.set_retry_policy(gax::retry_policy::NeverRetry);
1856 let query = move |name| {
1857 let stub = stub.clone();
1858 let options = options.clone();
1859 async {
1860 let op = GetOperation::new(stub)
1861 .set_name(name)
1862 .with_options(options)
1863 .send()
1864 .await?;
1865 Ok(Operation::new(op))
1866 }
1867 };
1868
1869 let start = move || async {
1870 let op = self.send().await?;
1871 Ok(Operation::new(op))
1872 };
1873
1874 lro::internal::new_unit_response_poller(
1875 polling_error_policy,
1876 polling_backoff_policy,
1877 start,
1878 query,
1879 )
1880 }
1881
1882 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1886 self.0.request.name = v.into();
1887 self
1888 }
1889 }
1890
1891 #[doc(hidden)]
1892 impl gax::options::internal::RequestBuilder for DeleteSnapshot {
1893 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1894 &mut self.0.options
1895 }
1896 }
1897
1898 #[derive(Clone, Debug)]
1916 pub struct UpdateSnapshot(RequestBuilder<crate::model::UpdateSnapshotRequest>);
1917
1918 impl UpdateSnapshot {
1919 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1920 Self(RequestBuilder::new(stub))
1921 }
1922
1923 pub fn with_request<V: Into<crate::model::UpdateSnapshotRequest>>(mut self, v: V) -> Self {
1925 self.0.request = v.into();
1926 self
1927 }
1928
1929 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1931 self.0.options = v.into();
1932 self
1933 }
1934
1935 pub async fn send(self) -> Result<longrunning::model::Operation> {
1942 (*self.0.stub)
1943 .update_snapshot(self.0.request, self.0.options)
1944 .await
1945 .map(gax::response::Response::into_body)
1946 }
1947
1948 pub fn poller(
1950 self,
1951 ) -> impl lro::Poller<crate::model::Snapshot, crate::model::OperationMetadata> {
1952 type Operation =
1953 lro::internal::Operation<crate::model::Snapshot, crate::model::OperationMetadata>;
1954 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1955 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1956
1957 let stub = self.0.stub.clone();
1958 let mut options = self.0.options.clone();
1959 options.set_retry_policy(gax::retry_policy::NeverRetry);
1960 let query = move |name| {
1961 let stub = stub.clone();
1962 let options = options.clone();
1963 async {
1964 let op = GetOperation::new(stub)
1965 .set_name(name)
1966 .with_options(options)
1967 .send()
1968 .await?;
1969 Ok(Operation::new(op))
1970 }
1971 };
1972
1973 let start = move || async {
1974 let op = self.send().await?;
1975 Ok(Operation::new(op))
1976 };
1977
1978 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
1979 }
1980
1981 pub fn set_update_mask<T>(mut self, v: T) -> Self
1985 where
1986 T: std::convert::Into<wkt::FieldMask>,
1987 {
1988 self.0.request.update_mask = std::option::Option::Some(v.into());
1989 self
1990 }
1991
1992 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1996 where
1997 T: std::convert::Into<wkt::FieldMask>,
1998 {
1999 self.0.request.update_mask = v.map(|x| x.into());
2000 self
2001 }
2002
2003 pub fn set_snapshot<T>(mut self, v: T) -> Self
2007 where
2008 T: std::convert::Into<crate::model::Snapshot>,
2009 {
2010 self.0.request.snapshot = std::option::Option::Some(v.into());
2011 self
2012 }
2013
2014 pub fn set_or_clear_snapshot<T>(mut self, v: std::option::Option<T>) -> Self
2018 where
2019 T: std::convert::Into<crate::model::Snapshot>,
2020 {
2021 self.0.request.snapshot = v.map(|x| x.into());
2022 self
2023 }
2024 }
2025
2026 #[doc(hidden)]
2027 impl gax::options::internal::RequestBuilder for UpdateSnapshot {
2028 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2029 &mut self.0.options
2030 }
2031 }
2032
2033 #[derive(Clone, Debug)]
2054 pub struct ListActiveDirectories(RequestBuilder<crate::model::ListActiveDirectoriesRequest>);
2055
2056 impl ListActiveDirectories {
2057 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2058 Self(RequestBuilder::new(stub))
2059 }
2060
2061 pub fn with_request<V: Into<crate::model::ListActiveDirectoriesRequest>>(
2063 mut self,
2064 v: V,
2065 ) -> Self {
2066 self.0.request = v.into();
2067 self
2068 }
2069
2070 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2072 self.0.options = v.into();
2073 self
2074 }
2075
2076 pub async fn send(self) -> Result<crate::model::ListActiveDirectoriesResponse> {
2078 (*self.0.stub)
2079 .list_active_directories(self.0.request, self.0.options)
2080 .await
2081 .map(gax::response::Response::into_body)
2082 }
2083
2084 pub fn by_page(
2086 self,
2087 ) -> impl gax::paginator::Paginator<crate::model::ListActiveDirectoriesResponse, gax::error::Error>
2088 {
2089 use std::clone::Clone;
2090 let token = self.0.request.page_token.clone();
2091 let execute = move |token: String| {
2092 let mut builder = self.clone();
2093 builder.0.request = builder.0.request.set_page_token(token);
2094 builder.send()
2095 };
2096 gax::paginator::internal::new_paginator(token, execute)
2097 }
2098
2099 pub fn by_item(
2101 self,
2102 ) -> impl gax::paginator::ItemPaginator<
2103 crate::model::ListActiveDirectoriesResponse,
2104 gax::error::Error,
2105 > {
2106 use gax::paginator::Paginator;
2107 self.by_page().items()
2108 }
2109
2110 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2114 self.0.request.parent = v.into();
2115 self
2116 }
2117
2118 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2120 self.0.request.page_size = v.into();
2121 self
2122 }
2123
2124 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2126 self.0.request.page_token = v.into();
2127 self
2128 }
2129
2130 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2132 self.0.request.filter = v.into();
2133 self
2134 }
2135
2136 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2138 self.0.request.order_by = v.into();
2139 self
2140 }
2141 }
2142
2143 #[doc(hidden)]
2144 impl gax::options::internal::RequestBuilder for ListActiveDirectories {
2145 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2146 &mut self.0.options
2147 }
2148 }
2149
2150 #[derive(Clone, Debug)]
2167 pub struct GetActiveDirectory(RequestBuilder<crate::model::GetActiveDirectoryRequest>);
2168
2169 impl GetActiveDirectory {
2170 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2171 Self(RequestBuilder::new(stub))
2172 }
2173
2174 pub fn with_request<V: Into<crate::model::GetActiveDirectoryRequest>>(
2176 mut self,
2177 v: V,
2178 ) -> Self {
2179 self.0.request = v.into();
2180 self
2181 }
2182
2183 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2185 self.0.options = v.into();
2186 self
2187 }
2188
2189 pub async fn send(self) -> Result<crate::model::ActiveDirectory> {
2191 (*self.0.stub)
2192 .get_active_directory(self.0.request, self.0.options)
2193 .await
2194 .map(gax::response::Response::into_body)
2195 }
2196
2197 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2201 self.0.request.name = v.into();
2202 self
2203 }
2204 }
2205
2206 #[doc(hidden)]
2207 impl gax::options::internal::RequestBuilder for GetActiveDirectory {
2208 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2209 &mut self.0.options
2210 }
2211 }
2212
2213 #[derive(Clone, Debug)]
2231 pub struct CreateActiveDirectory(RequestBuilder<crate::model::CreateActiveDirectoryRequest>);
2232
2233 impl CreateActiveDirectory {
2234 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2235 Self(RequestBuilder::new(stub))
2236 }
2237
2238 pub fn with_request<V: Into<crate::model::CreateActiveDirectoryRequest>>(
2240 mut self,
2241 v: V,
2242 ) -> Self {
2243 self.0.request = v.into();
2244 self
2245 }
2246
2247 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2249 self.0.options = v.into();
2250 self
2251 }
2252
2253 pub async fn send(self) -> Result<longrunning::model::Operation> {
2260 (*self.0.stub)
2261 .create_active_directory(self.0.request, self.0.options)
2262 .await
2263 .map(gax::response::Response::into_body)
2264 }
2265
2266 pub fn poller(
2268 self,
2269 ) -> impl lro::Poller<crate::model::ActiveDirectory, crate::model::OperationMetadata>
2270 {
2271 type Operation = lro::internal::Operation<
2272 crate::model::ActiveDirectory,
2273 crate::model::OperationMetadata,
2274 >;
2275 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2276 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2277
2278 let stub = self.0.stub.clone();
2279 let mut options = self.0.options.clone();
2280 options.set_retry_policy(gax::retry_policy::NeverRetry);
2281 let query = move |name| {
2282 let stub = stub.clone();
2283 let options = options.clone();
2284 async {
2285 let op = GetOperation::new(stub)
2286 .set_name(name)
2287 .with_options(options)
2288 .send()
2289 .await?;
2290 Ok(Operation::new(op))
2291 }
2292 };
2293
2294 let start = move || async {
2295 let op = self.send().await?;
2296 Ok(Operation::new(op))
2297 };
2298
2299 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2300 }
2301
2302 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2306 self.0.request.parent = v.into();
2307 self
2308 }
2309
2310 pub fn set_active_directory<T>(mut self, v: T) -> Self
2314 where
2315 T: std::convert::Into<crate::model::ActiveDirectory>,
2316 {
2317 self.0.request.active_directory = std::option::Option::Some(v.into());
2318 self
2319 }
2320
2321 pub fn set_or_clear_active_directory<T>(mut self, v: std::option::Option<T>) -> Self
2325 where
2326 T: std::convert::Into<crate::model::ActiveDirectory>,
2327 {
2328 self.0.request.active_directory = v.map(|x| x.into());
2329 self
2330 }
2331
2332 pub fn set_active_directory_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2336 self.0.request.active_directory_id = v.into();
2337 self
2338 }
2339 }
2340
2341 #[doc(hidden)]
2342 impl gax::options::internal::RequestBuilder for CreateActiveDirectory {
2343 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2344 &mut self.0.options
2345 }
2346 }
2347
2348 #[derive(Clone, Debug)]
2366 pub struct UpdateActiveDirectory(RequestBuilder<crate::model::UpdateActiveDirectoryRequest>);
2367
2368 impl UpdateActiveDirectory {
2369 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2370 Self(RequestBuilder::new(stub))
2371 }
2372
2373 pub fn with_request<V: Into<crate::model::UpdateActiveDirectoryRequest>>(
2375 mut self,
2376 v: V,
2377 ) -> Self {
2378 self.0.request = v.into();
2379 self
2380 }
2381
2382 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2384 self.0.options = v.into();
2385 self
2386 }
2387
2388 pub async fn send(self) -> Result<longrunning::model::Operation> {
2395 (*self.0.stub)
2396 .update_active_directory(self.0.request, self.0.options)
2397 .await
2398 .map(gax::response::Response::into_body)
2399 }
2400
2401 pub fn poller(
2403 self,
2404 ) -> impl lro::Poller<crate::model::ActiveDirectory, crate::model::OperationMetadata>
2405 {
2406 type Operation = lro::internal::Operation<
2407 crate::model::ActiveDirectory,
2408 crate::model::OperationMetadata,
2409 >;
2410 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2411 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2412
2413 let stub = self.0.stub.clone();
2414 let mut options = self.0.options.clone();
2415 options.set_retry_policy(gax::retry_policy::NeverRetry);
2416 let query = move |name| {
2417 let stub = stub.clone();
2418 let options = options.clone();
2419 async {
2420 let op = GetOperation::new(stub)
2421 .set_name(name)
2422 .with_options(options)
2423 .send()
2424 .await?;
2425 Ok(Operation::new(op))
2426 }
2427 };
2428
2429 let start = move || async {
2430 let op = self.send().await?;
2431 Ok(Operation::new(op))
2432 };
2433
2434 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2435 }
2436
2437 pub fn set_update_mask<T>(mut self, v: T) -> Self
2441 where
2442 T: std::convert::Into<wkt::FieldMask>,
2443 {
2444 self.0.request.update_mask = std::option::Option::Some(v.into());
2445 self
2446 }
2447
2448 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2452 where
2453 T: std::convert::Into<wkt::FieldMask>,
2454 {
2455 self.0.request.update_mask = v.map(|x| x.into());
2456 self
2457 }
2458
2459 pub fn set_active_directory<T>(mut self, v: T) -> Self
2463 where
2464 T: std::convert::Into<crate::model::ActiveDirectory>,
2465 {
2466 self.0.request.active_directory = std::option::Option::Some(v.into());
2467 self
2468 }
2469
2470 pub fn set_or_clear_active_directory<T>(mut self, v: std::option::Option<T>) -> Self
2474 where
2475 T: std::convert::Into<crate::model::ActiveDirectory>,
2476 {
2477 self.0.request.active_directory = v.map(|x| x.into());
2478 self
2479 }
2480 }
2481
2482 #[doc(hidden)]
2483 impl gax::options::internal::RequestBuilder for UpdateActiveDirectory {
2484 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2485 &mut self.0.options
2486 }
2487 }
2488
2489 #[derive(Clone, Debug)]
2507 pub struct DeleteActiveDirectory(RequestBuilder<crate::model::DeleteActiveDirectoryRequest>);
2508
2509 impl DeleteActiveDirectory {
2510 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2511 Self(RequestBuilder::new(stub))
2512 }
2513
2514 pub fn with_request<V: Into<crate::model::DeleteActiveDirectoryRequest>>(
2516 mut self,
2517 v: V,
2518 ) -> Self {
2519 self.0.request = v.into();
2520 self
2521 }
2522
2523 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2525 self.0.options = v.into();
2526 self
2527 }
2528
2529 pub async fn send(self) -> Result<longrunning::model::Operation> {
2536 (*self.0.stub)
2537 .delete_active_directory(self.0.request, self.0.options)
2538 .await
2539 .map(gax::response::Response::into_body)
2540 }
2541
2542 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
2544 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2545 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2546 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2547
2548 let stub = self.0.stub.clone();
2549 let mut options = self.0.options.clone();
2550 options.set_retry_policy(gax::retry_policy::NeverRetry);
2551 let query = move |name| {
2552 let stub = stub.clone();
2553 let options = options.clone();
2554 async {
2555 let op = GetOperation::new(stub)
2556 .set_name(name)
2557 .with_options(options)
2558 .send()
2559 .await?;
2560 Ok(Operation::new(op))
2561 }
2562 };
2563
2564 let start = move || async {
2565 let op = self.send().await?;
2566 Ok(Operation::new(op))
2567 };
2568
2569 lro::internal::new_unit_response_poller(
2570 polling_error_policy,
2571 polling_backoff_policy,
2572 start,
2573 query,
2574 )
2575 }
2576
2577 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2581 self.0.request.name = v.into();
2582 self
2583 }
2584 }
2585
2586 #[doc(hidden)]
2587 impl gax::options::internal::RequestBuilder for DeleteActiveDirectory {
2588 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2589 &mut self.0.options
2590 }
2591 }
2592
2593 #[derive(Clone, Debug)]
2614 pub struct ListKmsConfigs(RequestBuilder<crate::model::ListKmsConfigsRequest>);
2615
2616 impl ListKmsConfigs {
2617 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2618 Self(RequestBuilder::new(stub))
2619 }
2620
2621 pub fn with_request<V: Into<crate::model::ListKmsConfigsRequest>>(mut self, v: V) -> Self {
2623 self.0.request = v.into();
2624 self
2625 }
2626
2627 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2629 self.0.options = v.into();
2630 self
2631 }
2632
2633 pub async fn send(self) -> Result<crate::model::ListKmsConfigsResponse> {
2635 (*self.0.stub)
2636 .list_kms_configs(self.0.request, self.0.options)
2637 .await
2638 .map(gax::response::Response::into_body)
2639 }
2640
2641 pub fn by_page(
2643 self,
2644 ) -> impl gax::paginator::Paginator<crate::model::ListKmsConfigsResponse, gax::error::Error>
2645 {
2646 use std::clone::Clone;
2647 let token = self.0.request.page_token.clone();
2648 let execute = move |token: String| {
2649 let mut builder = self.clone();
2650 builder.0.request = builder.0.request.set_page_token(token);
2651 builder.send()
2652 };
2653 gax::paginator::internal::new_paginator(token, execute)
2654 }
2655
2656 pub fn by_item(
2658 self,
2659 ) -> impl gax::paginator::ItemPaginator<crate::model::ListKmsConfigsResponse, gax::error::Error>
2660 {
2661 use gax::paginator::Paginator;
2662 self.by_page().items()
2663 }
2664
2665 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2669 self.0.request.parent = v.into();
2670 self
2671 }
2672
2673 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2675 self.0.request.page_size = v.into();
2676 self
2677 }
2678
2679 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2681 self.0.request.page_token = v.into();
2682 self
2683 }
2684
2685 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2687 self.0.request.order_by = v.into();
2688 self
2689 }
2690
2691 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2693 self.0.request.filter = v.into();
2694 self
2695 }
2696 }
2697
2698 #[doc(hidden)]
2699 impl gax::options::internal::RequestBuilder for ListKmsConfigs {
2700 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2701 &mut self.0.options
2702 }
2703 }
2704
2705 #[derive(Clone, Debug)]
2723 pub struct CreateKmsConfig(RequestBuilder<crate::model::CreateKmsConfigRequest>);
2724
2725 impl CreateKmsConfig {
2726 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2727 Self(RequestBuilder::new(stub))
2728 }
2729
2730 pub fn with_request<V: Into<crate::model::CreateKmsConfigRequest>>(mut self, v: V) -> Self {
2732 self.0.request = v.into();
2733 self
2734 }
2735
2736 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2738 self.0.options = v.into();
2739 self
2740 }
2741
2742 pub async fn send(self) -> Result<longrunning::model::Operation> {
2749 (*self.0.stub)
2750 .create_kms_config(self.0.request, self.0.options)
2751 .await
2752 .map(gax::response::Response::into_body)
2753 }
2754
2755 pub fn poller(
2757 self,
2758 ) -> impl lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata> {
2759 type Operation =
2760 lro::internal::Operation<crate::model::KmsConfig, crate::model::OperationMetadata>;
2761 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2762 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2763
2764 let stub = self.0.stub.clone();
2765 let mut options = self.0.options.clone();
2766 options.set_retry_policy(gax::retry_policy::NeverRetry);
2767 let query = move |name| {
2768 let stub = stub.clone();
2769 let options = options.clone();
2770 async {
2771 let op = GetOperation::new(stub)
2772 .set_name(name)
2773 .with_options(options)
2774 .send()
2775 .await?;
2776 Ok(Operation::new(op))
2777 }
2778 };
2779
2780 let start = move || async {
2781 let op = self.send().await?;
2782 Ok(Operation::new(op))
2783 };
2784
2785 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2786 }
2787
2788 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2792 self.0.request.parent = v.into();
2793 self
2794 }
2795
2796 pub fn set_kms_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2800 self.0.request.kms_config_id = v.into();
2801 self
2802 }
2803
2804 pub fn set_kms_config<T>(mut self, v: T) -> Self
2808 where
2809 T: std::convert::Into<crate::model::KmsConfig>,
2810 {
2811 self.0.request.kms_config = std::option::Option::Some(v.into());
2812 self
2813 }
2814
2815 pub fn set_or_clear_kms_config<T>(mut self, v: std::option::Option<T>) -> Self
2819 where
2820 T: std::convert::Into<crate::model::KmsConfig>,
2821 {
2822 self.0.request.kms_config = v.map(|x| x.into());
2823 self
2824 }
2825 }
2826
2827 #[doc(hidden)]
2828 impl gax::options::internal::RequestBuilder for CreateKmsConfig {
2829 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2830 &mut self.0.options
2831 }
2832 }
2833
2834 #[derive(Clone, Debug)]
2851 pub struct GetKmsConfig(RequestBuilder<crate::model::GetKmsConfigRequest>);
2852
2853 impl GetKmsConfig {
2854 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2855 Self(RequestBuilder::new(stub))
2856 }
2857
2858 pub fn with_request<V: Into<crate::model::GetKmsConfigRequest>>(mut self, v: V) -> Self {
2860 self.0.request = v.into();
2861 self
2862 }
2863
2864 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2866 self.0.options = v.into();
2867 self
2868 }
2869
2870 pub async fn send(self) -> Result<crate::model::KmsConfig> {
2872 (*self.0.stub)
2873 .get_kms_config(self.0.request, self.0.options)
2874 .await
2875 .map(gax::response::Response::into_body)
2876 }
2877
2878 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2882 self.0.request.name = v.into();
2883 self
2884 }
2885 }
2886
2887 #[doc(hidden)]
2888 impl gax::options::internal::RequestBuilder for GetKmsConfig {
2889 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2890 &mut self.0.options
2891 }
2892 }
2893
2894 #[derive(Clone, Debug)]
2912 pub struct UpdateKmsConfig(RequestBuilder<crate::model::UpdateKmsConfigRequest>);
2913
2914 impl UpdateKmsConfig {
2915 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2916 Self(RequestBuilder::new(stub))
2917 }
2918
2919 pub fn with_request<V: Into<crate::model::UpdateKmsConfigRequest>>(mut self, v: V) -> Self {
2921 self.0.request = v.into();
2922 self
2923 }
2924
2925 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2927 self.0.options = v.into();
2928 self
2929 }
2930
2931 pub async fn send(self) -> Result<longrunning::model::Operation> {
2938 (*self.0.stub)
2939 .update_kms_config(self.0.request, self.0.options)
2940 .await
2941 .map(gax::response::Response::into_body)
2942 }
2943
2944 pub fn poller(
2946 self,
2947 ) -> impl lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata> {
2948 type Operation =
2949 lro::internal::Operation<crate::model::KmsConfig, crate::model::OperationMetadata>;
2950 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2951 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2952
2953 let stub = self.0.stub.clone();
2954 let mut options = self.0.options.clone();
2955 options.set_retry_policy(gax::retry_policy::NeverRetry);
2956 let query = move |name| {
2957 let stub = stub.clone();
2958 let options = options.clone();
2959 async {
2960 let op = GetOperation::new(stub)
2961 .set_name(name)
2962 .with_options(options)
2963 .send()
2964 .await?;
2965 Ok(Operation::new(op))
2966 }
2967 };
2968
2969 let start = move || async {
2970 let op = self.send().await?;
2971 Ok(Operation::new(op))
2972 };
2973
2974 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2975 }
2976
2977 pub fn set_update_mask<T>(mut self, v: T) -> Self
2981 where
2982 T: std::convert::Into<wkt::FieldMask>,
2983 {
2984 self.0.request.update_mask = std::option::Option::Some(v.into());
2985 self
2986 }
2987
2988 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2992 where
2993 T: std::convert::Into<wkt::FieldMask>,
2994 {
2995 self.0.request.update_mask = v.map(|x| x.into());
2996 self
2997 }
2998
2999 pub fn set_kms_config<T>(mut self, v: T) -> Self
3003 where
3004 T: std::convert::Into<crate::model::KmsConfig>,
3005 {
3006 self.0.request.kms_config = std::option::Option::Some(v.into());
3007 self
3008 }
3009
3010 pub fn set_or_clear_kms_config<T>(mut self, v: std::option::Option<T>) -> Self
3014 where
3015 T: std::convert::Into<crate::model::KmsConfig>,
3016 {
3017 self.0.request.kms_config = v.map(|x| x.into());
3018 self
3019 }
3020 }
3021
3022 #[doc(hidden)]
3023 impl gax::options::internal::RequestBuilder for UpdateKmsConfig {
3024 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3025 &mut self.0.options
3026 }
3027 }
3028
3029 #[derive(Clone, Debug)]
3047 pub struct EncryptVolumes(RequestBuilder<crate::model::EncryptVolumesRequest>);
3048
3049 impl EncryptVolumes {
3050 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3051 Self(RequestBuilder::new(stub))
3052 }
3053
3054 pub fn with_request<V: Into<crate::model::EncryptVolumesRequest>>(mut self, v: V) -> Self {
3056 self.0.request = v.into();
3057 self
3058 }
3059
3060 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3062 self.0.options = v.into();
3063 self
3064 }
3065
3066 pub async fn send(self) -> Result<longrunning::model::Operation> {
3073 (*self.0.stub)
3074 .encrypt_volumes(self.0.request, self.0.options)
3075 .await
3076 .map(gax::response::Response::into_body)
3077 }
3078
3079 pub fn poller(
3081 self,
3082 ) -> impl lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata> {
3083 type Operation =
3084 lro::internal::Operation<crate::model::KmsConfig, crate::model::OperationMetadata>;
3085 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3086 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3087
3088 let stub = self.0.stub.clone();
3089 let mut options = self.0.options.clone();
3090 options.set_retry_policy(gax::retry_policy::NeverRetry);
3091 let query = move |name| {
3092 let stub = stub.clone();
3093 let options = options.clone();
3094 async {
3095 let op = GetOperation::new(stub)
3096 .set_name(name)
3097 .with_options(options)
3098 .send()
3099 .await?;
3100 Ok(Operation::new(op))
3101 }
3102 };
3103
3104 let start = move || async {
3105 let op = self.send().await?;
3106 Ok(Operation::new(op))
3107 };
3108
3109 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3110 }
3111
3112 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3116 self.0.request.name = v.into();
3117 self
3118 }
3119 }
3120
3121 #[doc(hidden)]
3122 impl gax::options::internal::RequestBuilder for EncryptVolumes {
3123 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3124 &mut self.0.options
3125 }
3126 }
3127
3128 #[derive(Clone, Debug)]
3145 pub struct VerifyKmsConfig(RequestBuilder<crate::model::VerifyKmsConfigRequest>);
3146
3147 impl VerifyKmsConfig {
3148 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3149 Self(RequestBuilder::new(stub))
3150 }
3151
3152 pub fn with_request<V: Into<crate::model::VerifyKmsConfigRequest>>(mut self, v: V) -> Self {
3154 self.0.request = v.into();
3155 self
3156 }
3157
3158 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3160 self.0.options = v.into();
3161 self
3162 }
3163
3164 pub async fn send(self) -> Result<crate::model::VerifyKmsConfigResponse> {
3166 (*self.0.stub)
3167 .verify_kms_config(self.0.request, self.0.options)
3168 .await
3169 .map(gax::response::Response::into_body)
3170 }
3171
3172 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3176 self.0.request.name = v.into();
3177 self
3178 }
3179 }
3180
3181 #[doc(hidden)]
3182 impl gax::options::internal::RequestBuilder for VerifyKmsConfig {
3183 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3184 &mut self.0.options
3185 }
3186 }
3187
3188 #[derive(Clone, Debug)]
3206 pub struct DeleteKmsConfig(RequestBuilder<crate::model::DeleteKmsConfigRequest>);
3207
3208 impl DeleteKmsConfig {
3209 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3210 Self(RequestBuilder::new(stub))
3211 }
3212
3213 pub fn with_request<V: Into<crate::model::DeleteKmsConfigRequest>>(mut self, v: V) -> Self {
3215 self.0.request = v.into();
3216 self
3217 }
3218
3219 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3221 self.0.options = v.into();
3222 self
3223 }
3224
3225 pub async fn send(self) -> Result<longrunning::model::Operation> {
3232 (*self.0.stub)
3233 .delete_kms_config(self.0.request, self.0.options)
3234 .await
3235 .map(gax::response::Response::into_body)
3236 }
3237
3238 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3240 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3241 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3242 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3243
3244 let stub = self.0.stub.clone();
3245 let mut options = self.0.options.clone();
3246 options.set_retry_policy(gax::retry_policy::NeverRetry);
3247 let query = move |name| {
3248 let stub = stub.clone();
3249 let options = options.clone();
3250 async {
3251 let op = GetOperation::new(stub)
3252 .set_name(name)
3253 .with_options(options)
3254 .send()
3255 .await?;
3256 Ok(Operation::new(op))
3257 }
3258 };
3259
3260 let start = move || async {
3261 let op = self.send().await?;
3262 Ok(Operation::new(op))
3263 };
3264
3265 lro::internal::new_unit_response_poller(
3266 polling_error_policy,
3267 polling_backoff_policy,
3268 start,
3269 query,
3270 )
3271 }
3272
3273 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3277 self.0.request.name = v.into();
3278 self
3279 }
3280 }
3281
3282 #[doc(hidden)]
3283 impl gax::options::internal::RequestBuilder for DeleteKmsConfig {
3284 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3285 &mut self.0.options
3286 }
3287 }
3288
3289 #[derive(Clone, Debug)]
3310 pub struct ListReplications(RequestBuilder<crate::model::ListReplicationsRequest>);
3311
3312 impl ListReplications {
3313 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3314 Self(RequestBuilder::new(stub))
3315 }
3316
3317 pub fn with_request<V: Into<crate::model::ListReplicationsRequest>>(
3319 mut self,
3320 v: V,
3321 ) -> Self {
3322 self.0.request = v.into();
3323 self
3324 }
3325
3326 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3328 self.0.options = v.into();
3329 self
3330 }
3331
3332 pub async fn send(self) -> Result<crate::model::ListReplicationsResponse> {
3334 (*self.0.stub)
3335 .list_replications(self.0.request, self.0.options)
3336 .await
3337 .map(gax::response::Response::into_body)
3338 }
3339
3340 pub fn by_page(
3342 self,
3343 ) -> impl gax::paginator::Paginator<crate::model::ListReplicationsResponse, gax::error::Error>
3344 {
3345 use std::clone::Clone;
3346 let token = self.0.request.page_token.clone();
3347 let execute = move |token: String| {
3348 let mut builder = self.clone();
3349 builder.0.request = builder.0.request.set_page_token(token);
3350 builder.send()
3351 };
3352 gax::paginator::internal::new_paginator(token, execute)
3353 }
3354
3355 pub fn by_item(
3357 self,
3358 ) -> impl gax::paginator::ItemPaginator<crate::model::ListReplicationsResponse, gax::error::Error>
3359 {
3360 use gax::paginator::Paginator;
3361 self.by_page().items()
3362 }
3363
3364 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3368 self.0.request.parent = v.into();
3369 self
3370 }
3371
3372 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3374 self.0.request.page_size = v.into();
3375 self
3376 }
3377
3378 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3380 self.0.request.page_token = v.into();
3381 self
3382 }
3383
3384 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3386 self.0.request.order_by = v.into();
3387 self
3388 }
3389
3390 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3392 self.0.request.filter = v.into();
3393 self
3394 }
3395 }
3396
3397 #[doc(hidden)]
3398 impl gax::options::internal::RequestBuilder for ListReplications {
3399 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3400 &mut self.0.options
3401 }
3402 }
3403
3404 #[derive(Clone, Debug)]
3421 pub struct GetReplication(RequestBuilder<crate::model::GetReplicationRequest>);
3422
3423 impl GetReplication {
3424 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3425 Self(RequestBuilder::new(stub))
3426 }
3427
3428 pub fn with_request<V: Into<crate::model::GetReplicationRequest>>(mut self, v: V) -> Self {
3430 self.0.request = v.into();
3431 self
3432 }
3433
3434 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3436 self.0.options = v.into();
3437 self
3438 }
3439
3440 pub async fn send(self) -> Result<crate::model::Replication> {
3442 (*self.0.stub)
3443 .get_replication(self.0.request, self.0.options)
3444 .await
3445 .map(gax::response::Response::into_body)
3446 }
3447
3448 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3452 self.0.request.name = v.into();
3453 self
3454 }
3455 }
3456
3457 #[doc(hidden)]
3458 impl gax::options::internal::RequestBuilder for GetReplication {
3459 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3460 &mut self.0.options
3461 }
3462 }
3463
3464 #[derive(Clone, Debug)]
3482 pub struct CreateReplication(RequestBuilder<crate::model::CreateReplicationRequest>);
3483
3484 impl CreateReplication {
3485 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3486 Self(RequestBuilder::new(stub))
3487 }
3488
3489 pub fn with_request<V: Into<crate::model::CreateReplicationRequest>>(
3491 mut self,
3492 v: V,
3493 ) -> Self {
3494 self.0.request = v.into();
3495 self
3496 }
3497
3498 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3500 self.0.options = v.into();
3501 self
3502 }
3503
3504 pub async fn send(self) -> Result<longrunning::model::Operation> {
3511 (*self.0.stub)
3512 .create_replication(self.0.request, self.0.options)
3513 .await
3514 .map(gax::response::Response::into_body)
3515 }
3516
3517 pub fn poller(
3519 self,
3520 ) -> impl lro::Poller<crate::model::Replication, crate::model::OperationMetadata> {
3521 type Operation = lro::internal::Operation<
3522 crate::model::Replication,
3523 crate::model::OperationMetadata,
3524 >;
3525 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3526 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3527
3528 let stub = self.0.stub.clone();
3529 let mut options = self.0.options.clone();
3530 options.set_retry_policy(gax::retry_policy::NeverRetry);
3531 let query = move |name| {
3532 let stub = stub.clone();
3533 let options = options.clone();
3534 async {
3535 let op = GetOperation::new(stub)
3536 .set_name(name)
3537 .with_options(options)
3538 .send()
3539 .await?;
3540 Ok(Operation::new(op))
3541 }
3542 };
3543
3544 let start = move || async {
3545 let op = self.send().await?;
3546 Ok(Operation::new(op))
3547 };
3548
3549 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3550 }
3551
3552 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3556 self.0.request.parent = v.into();
3557 self
3558 }
3559
3560 pub fn set_replication<T>(mut self, v: T) -> Self
3564 where
3565 T: std::convert::Into<crate::model::Replication>,
3566 {
3567 self.0.request.replication = std::option::Option::Some(v.into());
3568 self
3569 }
3570
3571 pub fn set_or_clear_replication<T>(mut self, v: std::option::Option<T>) -> Self
3575 where
3576 T: std::convert::Into<crate::model::Replication>,
3577 {
3578 self.0.request.replication = v.map(|x| x.into());
3579 self
3580 }
3581
3582 pub fn set_replication_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3586 self.0.request.replication_id = v.into();
3587 self
3588 }
3589 }
3590
3591 #[doc(hidden)]
3592 impl gax::options::internal::RequestBuilder for CreateReplication {
3593 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3594 &mut self.0.options
3595 }
3596 }
3597
3598 #[derive(Clone, Debug)]
3616 pub struct DeleteReplication(RequestBuilder<crate::model::DeleteReplicationRequest>);
3617
3618 impl DeleteReplication {
3619 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3620 Self(RequestBuilder::new(stub))
3621 }
3622
3623 pub fn with_request<V: Into<crate::model::DeleteReplicationRequest>>(
3625 mut self,
3626 v: V,
3627 ) -> Self {
3628 self.0.request = v.into();
3629 self
3630 }
3631
3632 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3634 self.0.options = v.into();
3635 self
3636 }
3637
3638 pub async fn send(self) -> Result<longrunning::model::Operation> {
3645 (*self.0.stub)
3646 .delete_replication(self.0.request, self.0.options)
3647 .await
3648 .map(gax::response::Response::into_body)
3649 }
3650
3651 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3653 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3654 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3655 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3656
3657 let stub = self.0.stub.clone();
3658 let mut options = self.0.options.clone();
3659 options.set_retry_policy(gax::retry_policy::NeverRetry);
3660 let query = move |name| {
3661 let stub = stub.clone();
3662 let options = options.clone();
3663 async {
3664 let op = GetOperation::new(stub)
3665 .set_name(name)
3666 .with_options(options)
3667 .send()
3668 .await?;
3669 Ok(Operation::new(op))
3670 }
3671 };
3672
3673 let start = move || async {
3674 let op = self.send().await?;
3675 Ok(Operation::new(op))
3676 };
3677
3678 lro::internal::new_unit_response_poller(
3679 polling_error_policy,
3680 polling_backoff_policy,
3681 start,
3682 query,
3683 )
3684 }
3685
3686 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3690 self.0.request.name = v.into();
3691 self
3692 }
3693 }
3694
3695 #[doc(hidden)]
3696 impl gax::options::internal::RequestBuilder for DeleteReplication {
3697 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3698 &mut self.0.options
3699 }
3700 }
3701
3702 #[derive(Clone, Debug)]
3720 pub struct UpdateReplication(RequestBuilder<crate::model::UpdateReplicationRequest>);
3721
3722 impl UpdateReplication {
3723 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3724 Self(RequestBuilder::new(stub))
3725 }
3726
3727 pub fn with_request<V: Into<crate::model::UpdateReplicationRequest>>(
3729 mut self,
3730 v: V,
3731 ) -> Self {
3732 self.0.request = v.into();
3733 self
3734 }
3735
3736 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3738 self.0.options = v.into();
3739 self
3740 }
3741
3742 pub async fn send(self) -> Result<longrunning::model::Operation> {
3749 (*self.0.stub)
3750 .update_replication(self.0.request, self.0.options)
3751 .await
3752 .map(gax::response::Response::into_body)
3753 }
3754
3755 pub fn poller(
3757 self,
3758 ) -> impl lro::Poller<crate::model::Replication, crate::model::OperationMetadata> {
3759 type Operation = lro::internal::Operation<
3760 crate::model::Replication,
3761 crate::model::OperationMetadata,
3762 >;
3763 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3764 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3765
3766 let stub = self.0.stub.clone();
3767 let mut options = self.0.options.clone();
3768 options.set_retry_policy(gax::retry_policy::NeverRetry);
3769 let query = move |name| {
3770 let stub = stub.clone();
3771 let options = options.clone();
3772 async {
3773 let op = GetOperation::new(stub)
3774 .set_name(name)
3775 .with_options(options)
3776 .send()
3777 .await?;
3778 Ok(Operation::new(op))
3779 }
3780 };
3781
3782 let start = move || async {
3783 let op = self.send().await?;
3784 Ok(Operation::new(op))
3785 };
3786
3787 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3788 }
3789
3790 pub fn set_update_mask<T>(mut self, v: T) -> Self
3794 where
3795 T: std::convert::Into<wkt::FieldMask>,
3796 {
3797 self.0.request.update_mask = std::option::Option::Some(v.into());
3798 self
3799 }
3800
3801 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3805 where
3806 T: std::convert::Into<wkt::FieldMask>,
3807 {
3808 self.0.request.update_mask = v.map(|x| x.into());
3809 self
3810 }
3811
3812 pub fn set_replication<T>(mut self, v: T) -> Self
3816 where
3817 T: std::convert::Into<crate::model::Replication>,
3818 {
3819 self.0.request.replication = std::option::Option::Some(v.into());
3820 self
3821 }
3822
3823 pub fn set_or_clear_replication<T>(mut self, v: std::option::Option<T>) -> Self
3827 where
3828 T: std::convert::Into<crate::model::Replication>,
3829 {
3830 self.0.request.replication = v.map(|x| x.into());
3831 self
3832 }
3833 }
3834
3835 #[doc(hidden)]
3836 impl gax::options::internal::RequestBuilder for UpdateReplication {
3837 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3838 &mut self.0.options
3839 }
3840 }
3841
3842 #[derive(Clone, Debug)]
3860 pub struct StopReplication(RequestBuilder<crate::model::StopReplicationRequest>);
3861
3862 impl StopReplication {
3863 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3864 Self(RequestBuilder::new(stub))
3865 }
3866
3867 pub fn with_request<V: Into<crate::model::StopReplicationRequest>>(mut self, v: V) -> Self {
3869 self.0.request = v.into();
3870 self
3871 }
3872
3873 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3875 self.0.options = v.into();
3876 self
3877 }
3878
3879 pub async fn send(self) -> Result<longrunning::model::Operation> {
3886 (*self.0.stub)
3887 .stop_replication(self.0.request, self.0.options)
3888 .await
3889 .map(gax::response::Response::into_body)
3890 }
3891
3892 pub fn poller(
3894 self,
3895 ) -> impl lro::Poller<crate::model::Replication, crate::model::OperationMetadata> {
3896 type Operation = lro::internal::Operation<
3897 crate::model::Replication,
3898 crate::model::OperationMetadata,
3899 >;
3900 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3901 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3902
3903 let stub = self.0.stub.clone();
3904 let mut options = self.0.options.clone();
3905 options.set_retry_policy(gax::retry_policy::NeverRetry);
3906 let query = move |name| {
3907 let stub = stub.clone();
3908 let options = options.clone();
3909 async {
3910 let op = GetOperation::new(stub)
3911 .set_name(name)
3912 .with_options(options)
3913 .send()
3914 .await?;
3915 Ok(Operation::new(op))
3916 }
3917 };
3918
3919 let start = move || async {
3920 let op = self.send().await?;
3921 Ok(Operation::new(op))
3922 };
3923
3924 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3925 }
3926
3927 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3931 self.0.request.name = v.into();
3932 self
3933 }
3934
3935 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
3937 self.0.request.force = v.into();
3938 self
3939 }
3940 }
3941
3942 #[doc(hidden)]
3943 impl gax::options::internal::RequestBuilder for StopReplication {
3944 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3945 &mut self.0.options
3946 }
3947 }
3948
3949 #[derive(Clone, Debug)]
3967 pub struct ResumeReplication(RequestBuilder<crate::model::ResumeReplicationRequest>);
3968
3969 impl ResumeReplication {
3970 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3971 Self(RequestBuilder::new(stub))
3972 }
3973
3974 pub fn with_request<V: Into<crate::model::ResumeReplicationRequest>>(
3976 mut self,
3977 v: V,
3978 ) -> Self {
3979 self.0.request = v.into();
3980 self
3981 }
3982
3983 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3985 self.0.options = v.into();
3986 self
3987 }
3988
3989 pub async fn send(self) -> Result<longrunning::model::Operation> {
3996 (*self.0.stub)
3997 .resume_replication(self.0.request, self.0.options)
3998 .await
3999 .map(gax::response::Response::into_body)
4000 }
4001
4002 pub fn poller(
4004 self,
4005 ) -> impl lro::Poller<crate::model::Replication, crate::model::OperationMetadata> {
4006 type Operation = lro::internal::Operation<
4007 crate::model::Replication,
4008 crate::model::OperationMetadata,
4009 >;
4010 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4011 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4012
4013 let stub = self.0.stub.clone();
4014 let mut options = self.0.options.clone();
4015 options.set_retry_policy(gax::retry_policy::NeverRetry);
4016 let query = move |name| {
4017 let stub = stub.clone();
4018 let options = options.clone();
4019 async {
4020 let op = GetOperation::new(stub)
4021 .set_name(name)
4022 .with_options(options)
4023 .send()
4024 .await?;
4025 Ok(Operation::new(op))
4026 }
4027 };
4028
4029 let start = move || async {
4030 let op = self.send().await?;
4031 Ok(Operation::new(op))
4032 };
4033
4034 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4035 }
4036
4037 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4041 self.0.request.name = v.into();
4042 self
4043 }
4044 }
4045
4046 #[doc(hidden)]
4047 impl gax::options::internal::RequestBuilder for ResumeReplication {
4048 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4049 &mut self.0.options
4050 }
4051 }
4052
4053 #[derive(Clone, Debug)]
4071 pub struct ReverseReplicationDirection(
4072 RequestBuilder<crate::model::ReverseReplicationDirectionRequest>,
4073 );
4074
4075 impl ReverseReplicationDirection {
4076 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4077 Self(RequestBuilder::new(stub))
4078 }
4079
4080 pub fn with_request<V: Into<crate::model::ReverseReplicationDirectionRequest>>(
4082 mut self,
4083 v: V,
4084 ) -> Self {
4085 self.0.request = v.into();
4086 self
4087 }
4088
4089 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4091 self.0.options = v.into();
4092 self
4093 }
4094
4095 pub async fn send(self) -> Result<longrunning::model::Operation> {
4102 (*self.0.stub)
4103 .reverse_replication_direction(self.0.request, self.0.options)
4104 .await
4105 .map(gax::response::Response::into_body)
4106 }
4107
4108 pub fn poller(
4110 self,
4111 ) -> impl lro::Poller<crate::model::Replication, crate::model::OperationMetadata> {
4112 type Operation = lro::internal::Operation<
4113 crate::model::Replication,
4114 crate::model::OperationMetadata,
4115 >;
4116 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4117 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4118
4119 let stub = self.0.stub.clone();
4120 let mut options = self.0.options.clone();
4121 options.set_retry_policy(gax::retry_policy::NeverRetry);
4122 let query = move |name| {
4123 let stub = stub.clone();
4124 let options = options.clone();
4125 async {
4126 let op = GetOperation::new(stub)
4127 .set_name(name)
4128 .with_options(options)
4129 .send()
4130 .await?;
4131 Ok(Operation::new(op))
4132 }
4133 };
4134
4135 let start = move || async {
4136 let op = self.send().await?;
4137 Ok(Operation::new(op))
4138 };
4139
4140 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4141 }
4142
4143 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4147 self.0.request.name = v.into();
4148 self
4149 }
4150 }
4151
4152 #[doc(hidden)]
4153 impl gax::options::internal::RequestBuilder for ReverseReplicationDirection {
4154 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4155 &mut self.0.options
4156 }
4157 }
4158
4159 #[derive(Clone, Debug)]
4177 pub struct EstablishPeering(RequestBuilder<crate::model::EstablishPeeringRequest>);
4178
4179 impl EstablishPeering {
4180 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4181 Self(RequestBuilder::new(stub))
4182 }
4183
4184 pub fn with_request<V: Into<crate::model::EstablishPeeringRequest>>(
4186 mut self,
4187 v: V,
4188 ) -> Self {
4189 self.0.request = v.into();
4190 self
4191 }
4192
4193 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4195 self.0.options = v.into();
4196 self
4197 }
4198
4199 pub async fn send(self) -> Result<longrunning::model::Operation> {
4206 (*self.0.stub)
4207 .establish_peering(self.0.request, self.0.options)
4208 .await
4209 .map(gax::response::Response::into_body)
4210 }
4211
4212 pub fn poller(
4214 self,
4215 ) -> impl lro::Poller<crate::model::Replication, crate::model::OperationMetadata> {
4216 type Operation = lro::internal::Operation<
4217 crate::model::Replication,
4218 crate::model::OperationMetadata,
4219 >;
4220 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4221 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4222
4223 let stub = self.0.stub.clone();
4224 let mut options = self.0.options.clone();
4225 options.set_retry_policy(gax::retry_policy::NeverRetry);
4226 let query = move |name| {
4227 let stub = stub.clone();
4228 let options = options.clone();
4229 async {
4230 let op = GetOperation::new(stub)
4231 .set_name(name)
4232 .with_options(options)
4233 .send()
4234 .await?;
4235 Ok(Operation::new(op))
4236 }
4237 };
4238
4239 let start = move || async {
4240 let op = self.send().await?;
4241 Ok(Operation::new(op))
4242 };
4243
4244 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4245 }
4246
4247 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4251 self.0.request.name = v.into();
4252 self
4253 }
4254
4255 pub fn set_peer_cluster_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4259 self.0.request.peer_cluster_name = v.into();
4260 self
4261 }
4262
4263 pub fn set_peer_svm_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4267 self.0.request.peer_svm_name = v.into();
4268 self
4269 }
4270
4271 pub fn set_peer_ip_addresses<T, V>(mut self, v: T) -> Self
4273 where
4274 T: std::iter::IntoIterator<Item = V>,
4275 V: std::convert::Into<std::string::String>,
4276 {
4277 use std::iter::Iterator;
4278 self.0.request.peer_ip_addresses = v.into_iter().map(|i| i.into()).collect();
4279 self
4280 }
4281
4282 pub fn set_peer_volume_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4286 self.0.request.peer_volume_name = v.into();
4287 self
4288 }
4289 }
4290
4291 #[doc(hidden)]
4292 impl gax::options::internal::RequestBuilder for EstablishPeering {
4293 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4294 &mut self.0.options
4295 }
4296 }
4297
4298 #[derive(Clone, Debug)]
4316 pub struct SyncReplication(RequestBuilder<crate::model::SyncReplicationRequest>);
4317
4318 impl SyncReplication {
4319 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4320 Self(RequestBuilder::new(stub))
4321 }
4322
4323 pub fn with_request<V: Into<crate::model::SyncReplicationRequest>>(mut self, v: V) -> Self {
4325 self.0.request = v.into();
4326 self
4327 }
4328
4329 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4331 self.0.options = v.into();
4332 self
4333 }
4334
4335 pub async fn send(self) -> Result<longrunning::model::Operation> {
4342 (*self.0.stub)
4343 .sync_replication(self.0.request, self.0.options)
4344 .await
4345 .map(gax::response::Response::into_body)
4346 }
4347
4348 pub fn poller(
4350 self,
4351 ) -> impl lro::Poller<crate::model::Replication, crate::model::OperationMetadata> {
4352 type Operation = lro::internal::Operation<
4353 crate::model::Replication,
4354 crate::model::OperationMetadata,
4355 >;
4356 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4357 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4358
4359 let stub = self.0.stub.clone();
4360 let mut options = self.0.options.clone();
4361 options.set_retry_policy(gax::retry_policy::NeverRetry);
4362 let query = move |name| {
4363 let stub = stub.clone();
4364 let options = options.clone();
4365 async {
4366 let op = GetOperation::new(stub)
4367 .set_name(name)
4368 .with_options(options)
4369 .send()
4370 .await?;
4371 Ok(Operation::new(op))
4372 }
4373 };
4374
4375 let start = move || async {
4376 let op = self.send().await?;
4377 Ok(Operation::new(op))
4378 };
4379
4380 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4381 }
4382
4383 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4387 self.0.request.name = v.into();
4388 self
4389 }
4390 }
4391
4392 #[doc(hidden)]
4393 impl gax::options::internal::RequestBuilder for SyncReplication {
4394 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4395 &mut self.0.options
4396 }
4397 }
4398
4399 #[derive(Clone, Debug)]
4417 pub struct CreateBackupVault(RequestBuilder<crate::model::CreateBackupVaultRequest>);
4418
4419 impl CreateBackupVault {
4420 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4421 Self(RequestBuilder::new(stub))
4422 }
4423
4424 pub fn with_request<V: Into<crate::model::CreateBackupVaultRequest>>(
4426 mut self,
4427 v: V,
4428 ) -> Self {
4429 self.0.request = v.into();
4430 self
4431 }
4432
4433 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4435 self.0.options = v.into();
4436 self
4437 }
4438
4439 pub async fn send(self) -> Result<longrunning::model::Operation> {
4446 (*self.0.stub)
4447 .create_backup_vault(self.0.request, self.0.options)
4448 .await
4449 .map(gax::response::Response::into_body)
4450 }
4451
4452 pub fn poller(
4454 self,
4455 ) -> impl lro::Poller<crate::model::BackupVault, crate::model::OperationMetadata> {
4456 type Operation = lro::internal::Operation<
4457 crate::model::BackupVault,
4458 crate::model::OperationMetadata,
4459 >;
4460 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4461 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4462
4463 let stub = self.0.stub.clone();
4464 let mut options = self.0.options.clone();
4465 options.set_retry_policy(gax::retry_policy::NeverRetry);
4466 let query = move |name| {
4467 let stub = stub.clone();
4468 let options = options.clone();
4469 async {
4470 let op = GetOperation::new(stub)
4471 .set_name(name)
4472 .with_options(options)
4473 .send()
4474 .await?;
4475 Ok(Operation::new(op))
4476 }
4477 };
4478
4479 let start = move || async {
4480 let op = self.send().await?;
4481 Ok(Operation::new(op))
4482 };
4483
4484 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4485 }
4486
4487 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4491 self.0.request.parent = v.into();
4492 self
4493 }
4494
4495 pub fn set_backup_vault_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4499 self.0.request.backup_vault_id = v.into();
4500 self
4501 }
4502
4503 pub fn set_backup_vault<T>(mut self, v: T) -> Self
4507 where
4508 T: std::convert::Into<crate::model::BackupVault>,
4509 {
4510 self.0.request.backup_vault = std::option::Option::Some(v.into());
4511 self
4512 }
4513
4514 pub fn set_or_clear_backup_vault<T>(mut self, v: std::option::Option<T>) -> Self
4518 where
4519 T: std::convert::Into<crate::model::BackupVault>,
4520 {
4521 self.0.request.backup_vault = v.map(|x| x.into());
4522 self
4523 }
4524 }
4525
4526 #[doc(hidden)]
4527 impl gax::options::internal::RequestBuilder for CreateBackupVault {
4528 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4529 &mut self.0.options
4530 }
4531 }
4532
4533 #[derive(Clone, Debug)]
4550 pub struct GetBackupVault(RequestBuilder<crate::model::GetBackupVaultRequest>);
4551
4552 impl GetBackupVault {
4553 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4554 Self(RequestBuilder::new(stub))
4555 }
4556
4557 pub fn with_request<V: Into<crate::model::GetBackupVaultRequest>>(mut self, v: V) -> Self {
4559 self.0.request = v.into();
4560 self
4561 }
4562
4563 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4565 self.0.options = v.into();
4566 self
4567 }
4568
4569 pub async fn send(self) -> Result<crate::model::BackupVault> {
4571 (*self.0.stub)
4572 .get_backup_vault(self.0.request, self.0.options)
4573 .await
4574 .map(gax::response::Response::into_body)
4575 }
4576
4577 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4581 self.0.request.name = v.into();
4582 self
4583 }
4584 }
4585
4586 #[doc(hidden)]
4587 impl gax::options::internal::RequestBuilder for GetBackupVault {
4588 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4589 &mut self.0.options
4590 }
4591 }
4592
4593 #[derive(Clone, Debug)]
4614 pub struct ListBackupVaults(RequestBuilder<crate::model::ListBackupVaultsRequest>);
4615
4616 impl ListBackupVaults {
4617 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4618 Self(RequestBuilder::new(stub))
4619 }
4620
4621 pub fn with_request<V: Into<crate::model::ListBackupVaultsRequest>>(
4623 mut self,
4624 v: V,
4625 ) -> Self {
4626 self.0.request = v.into();
4627 self
4628 }
4629
4630 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4632 self.0.options = v.into();
4633 self
4634 }
4635
4636 pub async fn send(self) -> Result<crate::model::ListBackupVaultsResponse> {
4638 (*self.0.stub)
4639 .list_backup_vaults(self.0.request, self.0.options)
4640 .await
4641 .map(gax::response::Response::into_body)
4642 }
4643
4644 pub fn by_page(
4646 self,
4647 ) -> impl gax::paginator::Paginator<crate::model::ListBackupVaultsResponse, gax::error::Error>
4648 {
4649 use std::clone::Clone;
4650 let token = self.0.request.page_token.clone();
4651 let execute = move |token: String| {
4652 let mut builder = self.clone();
4653 builder.0.request = builder.0.request.set_page_token(token);
4654 builder.send()
4655 };
4656 gax::paginator::internal::new_paginator(token, execute)
4657 }
4658
4659 pub fn by_item(
4661 self,
4662 ) -> impl gax::paginator::ItemPaginator<crate::model::ListBackupVaultsResponse, gax::error::Error>
4663 {
4664 use gax::paginator::Paginator;
4665 self.by_page().items()
4666 }
4667
4668 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4672 self.0.request.parent = v.into();
4673 self
4674 }
4675
4676 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4678 self.0.request.page_size = v.into();
4679 self
4680 }
4681
4682 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4684 self.0.request.page_token = v.into();
4685 self
4686 }
4687
4688 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4690 self.0.request.order_by = v.into();
4691 self
4692 }
4693
4694 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4696 self.0.request.filter = v.into();
4697 self
4698 }
4699 }
4700
4701 #[doc(hidden)]
4702 impl gax::options::internal::RequestBuilder for ListBackupVaults {
4703 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4704 &mut self.0.options
4705 }
4706 }
4707
4708 #[derive(Clone, Debug)]
4726 pub struct UpdateBackupVault(RequestBuilder<crate::model::UpdateBackupVaultRequest>);
4727
4728 impl UpdateBackupVault {
4729 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4730 Self(RequestBuilder::new(stub))
4731 }
4732
4733 pub fn with_request<V: Into<crate::model::UpdateBackupVaultRequest>>(
4735 mut self,
4736 v: V,
4737 ) -> Self {
4738 self.0.request = v.into();
4739 self
4740 }
4741
4742 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4744 self.0.options = v.into();
4745 self
4746 }
4747
4748 pub async fn send(self) -> Result<longrunning::model::Operation> {
4755 (*self.0.stub)
4756 .update_backup_vault(self.0.request, self.0.options)
4757 .await
4758 .map(gax::response::Response::into_body)
4759 }
4760
4761 pub fn poller(
4763 self,
4764 ) -> impl lro::Poller<crate::model::BackupVault, crate::model::OperationMetadata> {
4765 type Operation = lro::internal::Operation<
4766 crate::model::BackupVault,
4767 crate::model::OperationMetadata,
4768 >;
4769 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4770 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4771
4772 let stub = self.0.stub.clone();
4773 let mut options = self.0.options.clone();
4774 options.set_retry_policy(gax::retry_policy::NeverRetry);
4775 let query = move |name| {
4776 let stub = stub.clone();
4777 let options = options.clone();
4778 async {
4779 let op = GetOperation::new(stub)
4780 .set_name(name)
4781 .with_options(options)
4782 .send()
4783 .await?;
4784 Ok(Operation::new(op))
4785 }
4786 };
4787
4788 let start = move || async {
4789 let op = self.send().await?;
4790 Ok(Operation::new(op))
4791 };
4792
4793 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4794 }
4795
4796 pub fn set_update_mask<T>(mut self, v: T) -> Self
4800 where
4801 T: std::convert::Into<wkt::FieldMask>,
4802 {
4803 self.0.request.update_mask = std::option::Option::Some(v.into());
4804 self
4805 }
4806
4807 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4811 where
4812 T: std::convert::Into<wkt::FieldMask>,
4813 {
4814 self.0.request.update_mask = v.map(|x| x.into());
4815 self
4816 }
4817
4818 pub fn set_backup_vault<T>(mut self, v: T) -> Self
4822 where
4823 T: std::convert::Into<crate::model::BackupVault>,
4824 {
4825 self.0.request.backup_vault = std::option::Option::Some(v.into());
4826 self
4827 }
4828
4829 pub fn set_or_clear_backup_vault<T>(mut self, v: std::option::Option<T>) -> Self
4833 where
4834 T: std::convert::Into<crate::model::BackupVault>,
4835 {
4836 self.0.request.backup_vault = v.map(|x| x.into());
4837 self
4838 }
4839 }
4840
4841 #[doc(hidden)]
4842 impl gax::options::internal::RequestBuilder for UpdateBackupVault {
4843 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4844 &mut self.0.options
4845 }
4846 }
4847
4848 #[derive(Clone, Debug)]
4866 pub struct DeleteBackupVault(RequestBuilder<crate::model::DeleteBackupVaultRequest>);
4867
4868 impl DeleteBackupVault {
4869 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4870 Self(RequestBuilder::new(stub))
4871 }
4872
4873 pub fn with_request<V: Into<crate::model::DeleteBackupVaultRequest>>(
4875 mut self,
4876 v: V,
4877 ) -> Self {
4878 self.0.request = v.into();
4879 self
4880 }
4881
4882 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4884 self.0.options = v.into();
4885 self
4886 }
4887
4888 pub async fn send(self) -> Result<longrunning::model::Operation> {
4895 (*self.0.stub)
4896 .delete_backup_vault(self.0.request, self.0.options)
4897 .await
4898 .map(gax::response::Response::into_body)
4899 }
4900
4901 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
4903 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4904 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4905 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4906
4907 let stub = self.0.stub.clone();
4908 let mut options = self.0.options.clone();
4909 options.set_retry_policy(gax::retry_policy::NeverRetry);
4910 let query = move |name| {
4911 let stub = stub.clone();
4912 let options = options.clone();
4913 async {
4914 let op = GetOperation::new(stub)
4915 .set_name(name)
4916 .with_options(options)
4917 .send()
4918 .await?;
4919 Ok(Operation::new(op))
4920 }
4921 };
4922
4923 let start = move || async {
4924 let op = self.send().await?;
4925 Ok(Operation::new(op))
4926 };
4927
4928 lro::internal::new_unit_response_poller(
4929 polling_error_policy,
4930 polling_backoff_policy,
4931 start,
4932 query,
4933 )
4934 }
4935
4936 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4940 self.0.request.name = v.into();
4941 self
4942 }
4943 }
4944
4945 #[doc(hidden)]
4946 impl gax::options::internal::RequestBuilder for DeleteBackupVault {
4947 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4948 &mut self.0.options
4949 }
4950 }
4951
4952 #[derive(Clone, Debug)]
4970 pub struct CreateBackup(RequestBuilder<crate::model::CreateBackupRequest>);
4971
4972 impl CreateBackup {
4973 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4974 Self(RequestBuilder::new(stub))
4975 }
4976
4977 pub fn with_request<V: Into<crate::model::CreateBackupRequest>>(mut self, v: V) -> Self {
4979 self.0.request = v.into();
4980 self
4981 }
4982
4983 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4985 self.0.options = v.into();
4986 self
4987 }
4988
4989 pub async fn send(self) -> Result<longrunning::model::Operation> {
4996 (*self.0.stub)
4997 .create_backup(self.0.request, self.0.options)
4998 .await
4999 .map(gax::response::Response::into_body)
5000 }
5001
5002 pub fn poller(
5004 self,
5005 ) -> impl lro::Poller<crate::model::Backup, crate::model::OperationMetadata> {
5006 type Operation =
5007 lro::internal::Operation<crate::model::Backup, crate::model::OperationMetadata>;
5008 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5009 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5010
5011 let stub = self.0.stub.clone();
5012 let mut options = self.0.options.clone();
5013 options.set_retry_policy(gax::retry_policy::NeverRetry);
5014 let query = move |name| {
5015 let stub = stub.clone();
5016 let options = options.clone();
5017 async {
5018 let op = GetOperation::new(stub)
5019 .set_name(name)
5020 .with_options(options)
5021 .send()
5022 .await?;
5023 Ok(Operation::new(op))
5024 }
5025 };
5026
5027 let start = move || async {
5028 let op = self.send().await?;
5029 Ok(Operation::new(op))
5030 };
5031
5032 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5033 }
5034
5035 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5039 self.0.request.parent = v.into();
5040 self
5041 }
5042
5043 pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5047 self.0.request.backup_id = v.into();
5048 self
5049 }
5050
5051 pub fn set_backup<T>(mut self, v: T) -> Self
5055 where
5056 T: std::convert::Into<crate::model::Backup>,
5057 {
5058 self.0.request.backup = std::option::Option::Some(v.into());
5059 self
5060 }
5061
5062 pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5066 where
5067 T: std::convert::Into<crate::model::Backup>,
5068 {
5069 self.0.request.backup = v.map(|x| x.into());
5070 self
5071 }
5072 }
5073
5074 #[doc(hidden)]
5075 impl gax::options::internal::RequestBuilder for CreateBackup {
5076 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5077 &mut self.0.options
5078 }
5079 }
5080
5081 #[derive(Clone, Debug)]
5098 pub struct GetBackup(RequestBuilder<crate::model::GetBackupRequest>);
5099
5100 impl GetBackup {
5101 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5102 Self(RequestBuilder::new(stub))
5103 }
5104
5105 pub fn with_request<V: Into<crate::model::GetBackupRequest>>(mut self, v: V) -> Self {
5107 self.0.request = v.into();
5108 self
5109 }
5110
5111 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5113 self.0.options = v.into();
5114 self
5115 }
5116
5117 pub async fn send(self) -> Result<crate::model::Backup> {
5119 (*self.0.stub)
5120 .get_backup(self.0.request, self.0.options)
5121 .await
5122 .map(gax::response::Response::into_body)
5123 }
5124
5125 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5129 self.0.request.name = v.into();
5130 self
5131 }
5132 }
5133
5134 #[doc(hidden)]
5135 impl gax::options::internal::RequestBuilder for GetBackup {
5136 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5137 &mut self.0.options
5138 }
5139 }
5140
5141 #[derive(Clone, Debug)]
5162 pub struct ListBackups(RequestBuilder<crate::model::ListBackupsRequest>);
5163
5164 impl ListBackups {
5165 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5166 Self(RequestBuilder::new(stub))
5167 }
5168
5169 pub fn with_request<V: Into<crate::model::ListBackupsRequest>>(mut self, v: V) -> Self {
5171 self.0.request = v.into();
5172 self
5173 }
5174
5175 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5177 self.0.options = v.into();
5178 self
5179 }
5180
5181 pub async fn send(self) -> Result<crate::model::ListBackupsResponse> {
5183 (*self.0.stub)
5184 .list_backups(self.0.request, self.0.options)
5185 .await
5186 .map(gax::response::Response::into_body)
5187 }
5188
5189 pub fn by_page(
5191 self,
5192 ) -> impl gax::paginator::Paginator<crate::model::ListBackupsResponse, gax::error::Error>
5193 {
5194 use std::clone::Clone;
5195 let token = self.0.request.page_token.clone();
5196 let execute = move |token: String| {
5197 let mut builder = self.clone();
5198 builder.0.request = builder.0.request.set_page_token(token);
5199 builder.send()
5200 };
5201 gax::paginator::internal::new_paginator(token, execute)
5202 }
5203
5204 pub fn by_item(
5206 self,
5207 ) -> impl gax::paginator::ItemPaginator<crate::model::ListBackupsResponse, gax::error::Error>
5208 {
5209 use gax::paginator::Paginator;
5210 self.by_page().items()
5211 }
5212
5213 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5217 self.0.request.parent = v.into();
5218 self
5219 }
5220
5221 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5223 self.0.request.page_size = v.into();
5224 self
5225 }
5226
5227 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5229 self.0.request.page_token = v.into();
5230 self
5231 }
5232
5233 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5235 self.0.request.order_by = v.into();
5236 self
5237 }
5238
5239 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5241 self.0.request.filter = v.into();
5242 self
5243 }
5244 }
5245
5246 #[doc(hidden)]
5247 impl gax::options::internal::RequestBuilder for ListBackups {
5248 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5249 &mut self.0.options
5250 }
5251 }
5252
5253 #[derive(Clone, Debug)]
5271 pub struct DeleteBackup(RequestBuilder<crate::model::DeleteBackupRequest>);
5272
5273 impl DeleteBackup {
5274 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5275 Self(RequestBuilder::new(stub))
5276 }
5277
5278 pub fn with_request<V: Into<crate::model::DeleteBackupRequest>>(mut self, v: V) -> Self {
5280 self.0.request = v.into();
5281 self
5282 }
5283
5284 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5286 self.0.options = v.into();
5287 self
5288 }
5289
5290 pub async fn send(self) -> Result<longrunning::model::Operation> {
5297 (*self.0.stub)
5298 .delete_backup(self.0.request, self.0.options)
5299 .await
5300 .map(gax::response::Response::into_body)
5301 }
5302
5303 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
5305 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5306 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5307 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5308
5309 let stub = self.0.stub.clone();
5310 let mut options = self.0.options.clone();
5311 options.set_retry_policy(gax::retry_policy::NeverRetry);
5312 let query = move |name| {
5313 let stub = stub.clone();
5314 let options = options.clone();
5315 async {
5316 let op = GetOperation::new(stub)
5317 .set_name(name)
5318 .with_options(options)
5319 .send()
5320 .await?;
5321 Ok(Operation::new(op))
5322 }
5323 };
5324
5325 let start = move || async {
5326 let op = self.send().await?;
5327 Ok(Operation::new(op))
5328 };
5329
5330 lro::internal::new_unit_response_poller(
5331 polling_error_policy,
5332 polling_backoff_policy,
5333 start,
5334 query,
5335 )
5336 }
5337
5338 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5342 self.0.request.name = v.into();
5343 self
5344 }
5345 }
5346
5347 #[doc(hidden)]
5348 impl gax::options::internal::RequestBuilder for DeleteBackup {
5349 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5350 &mut self.0.options
5351 }
5352 }
5353
5354 #[derive(Clone, Debug)]
5372 pub struct UpdateBackup(RequestBuilder<crate::model::UpdateBackupRequest>);
5373
5374 impl UpdateBackup {
5375 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5376 Self(RequestBuilder::new(stub))
5377 }
5378
5379 pub fn with_request<V: Into<crate::model::UpdateBackupRequest>>(mut self, v: V) -> Self {
5381 self.0.request = v.into();
5382 self
5383 }
5384
5385 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5387 self.0.options = v.into();
5388 self
5389 }
5390
5391 pub async fn send(self) -> Result<longrunning::model::Operation> {
5398 (*self.0.stub)
5399 .update_backup(self.0.request, self.0.options)
5400 .await
5401 .map(gax::response::Response::into_body)
5402 }
5403
5404 pub fn poller(
5406 self,
5407 ) -> impl lro::Poller<crate::model::Backup, crate::model::OperationMetadata> {
5408 type Operation =
5409 lro::internal::Operation<crate::model::Backup, crate::model::OperationMetadata>;
5410 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5411 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5412
5413 let stub = self.0.stub.clone();
5414 let mut options = self.0.options.clone();
5415 options.set_retry_policy(gax::retry_policy::NeverRetry);
5416 let query = move |name| {
5417 let stub = stub.clone();
5418 let options = options.clone();
5419 async {
5420 let op = GetOperation::new(stub)
5421 .set_name(name)
5422 .with_options(options)
5423 .send()
5424 .await?;
5425 Ok(Operation::new(op))
5426 }
5427 };
5428
5429 let start = move || async {
5430 let op = self.send().await?;
5431 Ok(Operation::new(op))
5432 };
5433
5434 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5435 }
5436
5437 pub fn set_update_mask<T>(mut self, v: T) -> Self
5441 where
5442 T: std::convert::Into<wkt::FieldMask>,
5443 {
5444 self.0.request.update_mask = std::option::Option::Some(v.into());
5445 self
5446 }
5447
5448 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5452 where
5453 T: std::convert::Into<wkt::FieldMask>,
5454 {
5455 self.0.request.update_mask = v.map(|x| x.into());
5456 self
5457 }
5458
5459 pub fn set_backup<T>(mut self, v: T) -> Self
5463 where
5464 T: std::convert::Into<crate::model::Backup>,
5465 {
5466 self.0.request.backup = std::option::Option::Some(v.into());
5467 self
5468 }
5469
5470 pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5474 where
5475 T: std::convert::Into<crate::model::Backup>,
5476 {
5477 self.0.request.backup = v.map(|x| x.into());
5478 self
5479 }
5480 }
5481
5482 #[doc(hidden)]
5483 impl gax::options::internal::RequestBuilder for UpdateBackup {
5484 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5485 &mut self.0.options
5486 }
5487 }
5488
5489 #[derive(Clone, Debug)]
5507 pub struct CreateBackupPolicy(RequestBuilder<crate::model::CreateBackupPolicyRequest>);
5508
5509 impl CreateBackupPolicy {
5510 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5511 Self(RequestBuilder::new(stub))
5512 }
5513
5514 pub fn with_request<V: Into<crate::model::CreateBackupPolicyRequest>>(
5516 mut self,
5517 v: V,
5518 ) -> Self {
5519 self.0.request = v.into();
5520 self
5521 }
5522
5523 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5525 self.0.options = v.into();
5526 self
5527 }
5528
5529 pub async fn send(self) -> Result<longrunning::model::Operation> {
5536 (*self.0.stub)
5537 .create_backup_policy(self.0.request, self.0.options)
5538 .await
5539 .map(gax::response::Response::into_body)
5540 }
5541
5542 pub fn poller(
5544 self,
5545 ) -> impl lro::Poller<crate::model::BackupPolicy, crate::model::OperationMetadata> {
5546 type Operation = lro::internal::Operation<
5547 crate::model::BackupPolicy,
5548 crate::model::OperationMetadata,
5549 >;
5550 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5551 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5552
5553 let stub = self.0.stub.clone();
5554 let mut options = self.0.options.clone();
5555 options.set_retry_policy(gax::retry_policy::NeverRetry);
5556 let query = move |name| {
5557 let stub = stub.clone();
5558 let options = options.clone();
5559 async {
5560 let op = GetOperation::new(stub)
5561 .set_name(name)
5562 .with_options(options)
5563 .send()
5564 .await?;
5565 Ok(Operation::new(op))
5566 }
5567 };
5568
5569 let start = move || async {
5570 let op = self.send().await?;
5571 Ok(Operation::new(op))
5572 };
5573
5574 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5575 }
5576
5577 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5581 self.0.request.parent = v.into();
5582 self
5583 }
5584
5585 pub fn set_backup_policy<T>(mut self, v: T) -> Self
5589 where
5590 T: std::convert::Into<crate::model::BackupPolicy>,
5591 {
5592 self.0.request.backup_policy = std::option::Option::Some(v.into());
5593 self
5594 }
5595
5596 pub fn set_or_clear_backup_policy<T>(mut self, v: std::option::Option<T>) -> Self
5600 where
5601 T: std::convert::Into<crate::model::BackupPolicy>,
5602 {
5603 self.0.request.backup_policy = v.map(|x| x.into());
5604 self
5605 }
5606
5607 pub fn set_backup_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5611 self.0.request.backup_policy_id = v.into();
5612 self
5613 }
5614 }
5615
5616 #[doc(hidden)]
5617 impl gax::options::internal::RequestBuilder for CreateBackupPolicy {
5618 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5619 &mut self.0.options
5620 }
5621 }
5622
5623 #[derive(Clone, Debug)]
5640 pub struct GetBackupPolicy(RequestBuilder<crate::model::GetBackupPolicyRequest>);
5641
5642 impl GetBackupPolicy {
5643 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5644 Self(RequestBuilder::new(stub))
5645 }
5646
5647 pub fn with_request<V: Into<crate::model::GetBackupPolicyRequest>>(mut self, v: V) -> Self {
5649 self.0.request = v.into();
5650 self
5651 }
5652
5653 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5655 self.0.options = v.into();
5656 self
5657 }
5658
5659 pub async fn send(self) -> Result<crate::model::BackupPolicy> {
5661 (*self.0.stub)
5662 .get_backup_policy(self.0.request, self.0.options)
5663 .await
5664 .map(gax::response::Response::into_body)
5665 }
5666
5667 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5671 self.0.request.name = v.into();
5672 self
5673 }
5674 }
5675
5676 #[doc(hidden)]
5677 impl gax::options::internal::RequestBuilder for GetBackupPolicy {
5678 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5679 &mut self.0.options
5680 }
5681 }
5682
5683 #[derive(Clone, Debug)]
5704 pub struct ListBackupPolicies(RequestBuilder<crate::model::ListBackupPoliciesRequest>);
5705
5706 impl ListBackupPolicies {
5707 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5708 Self(RequestBuilder::new(stub))
5709 }
5710
5711 pub fn with_request<V: Into<crate::model::ListBackupPoliciesRequest>>(
5713 mut self,
5714 v: V,
5715 ) -> Self {
5716 self.0.request = v.into();
5717 self
5718 }
5719
5720 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5722 self.0.options = v.into();
5723 self
5724 }
5725
5726 pub async fn send(self) -> Result<crate::model::ListBackupPoliciesResponse> {
5728 (*self.0.stub)
5729 .list_backup_policies(self.0.request, self.0.options)
5730 .await
5731 .map(gax::response::Response::into_body)
5732 }
5733
5734 pub fn by_page(
5736 self,
5737 ) -> impl gax::paginator::Paginator<crate::model::ListBackupPoliciesResponse, gax::error::Error>
5738 {
5739 use std::clone::Clone;
5740 let token = self.0.request.page_token.clone();
5741 let execute = move |token: String| {
5742 let mut builder = self.clone();
5743 builder.0.request = builder.0.request.set_page_token(token);
5744 builder.send()
5745 };
5746 gax::paginator::internal::new_paginator(token, execute)
5747 }
5748
5749 pub fn by_item(
5751 self,
5752 ) -> impl gax::paginator::ItemPaginator<
5753 crate::model::ListBackupPoliciesResponse,
5754 gax::error::Error,
5755 > {
5756 use gax::paginator::Paginator;
5757 self.by_page().items()
5758 }
5759
5760 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5764 self.0.request.parent = v.into();
5765 self
5766 }
5767
5768 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5770 self.0.request.page_size = v.into();
5771 self
5772 }
5773
5774 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5776 self.0.request.page_token = v.into();
5777 self
5778 }
5779
5780 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5782 self.0.request.filter = v.into();
5783 self
5784 }
5785
5786 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5788 self.0.request.order_by = v.into();
5789 self
5790 }
5791 }
5792
5793 #[doc(hidden)]
5794 impl gax::options::internal::RequestBuilder for ListBackupPolicies {
5795 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5796 &mut self.0.options
5797 }
5798 }
5799
5800 #[derive(Clone, Debug)]
5818 pub struct UpdateBackupPolicy(RequestBuilder<crate::model::UpdateBackupPolicyRequest>);
5819
5820 impl UpdateBackupPolicy {
5821 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5822 Self(RequestBuilder::new(stub))
5823 }
5824
5825 pub fn with_request<V: Into<crate::model::UpdateBackupPolicyRequest>>(
5827 mut self,
5828 v: V,
5829 ) -> Self {
5830 self.0.request = v.into();
5831 self
5832 }
5833
5834 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5836 self.0.options = v.into();
5837 self
5838 }
5839
5840 pub async fn send(self) -> Result<longrunning::model::Operation> {
5847 (*self.0.stub)
5848 .update_backup_policy(self.0.request, self.0.options)
5849 .await
5850 .map(gax::response::Response::into_body)
5851 }
5852
5853 pub fn poller(
5855 self,
5856 ) -> impl lro::Poller<crate::model::BackupPolicy, crate::model::OperationMetadata> {
5857 type Operation = lro::internal::Operation<
5858 crate::model::BackupPolicy,
5859 crate::model::OperationMetadata,
5860 >;
5861 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5862 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5863
5864 let stub = self.0.stub.clone();
5865 let mut options = self.0.options.clone();
5866 options.set_retry_policy(gax::retry_policy::NeverRetry);
5867 let query = move |name| {
5868 let stub = stub.clone();
5869 let options = options.clone();
5870 async {
5871 let op = GetOperation::new(stub)
5872 .set_name(name)
5873 .with_options(options)
5874 .send()
5875 .await?;
5876 Ok(Operation::new(op))
5877 }
5878 };
5879
5880 let start = move || async {
5881 let op = self.send().await?;
5882 Ok(Operation::new(op))
5883 };
5884
5885 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
5886 }
5887
5888 pub fn set_update_mask<T>(mut self, v: T) -> Self
5892 where
5893 T: std::convert::Into<wkt::FieldMask>,
5894 {
5895 self.0.request.update_mask = std::option::Option::Some(v.into());
5896 self
5897 }
5898
5899 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5903 where
5904 T: std::convert::Into<wkt::FieldMask>,
5905 {
5906 self.0.request.update_mask = v.map(|x| x.into());
5907 self
5908 }
5909
5910 pub fn set_backup_policy<T>(mut self, v: T) -> Self
5914 where
5915 T: std::convert::Into<crate::model::BackupPolicy>,
5916 {
5917 self.0.request.backup_policy = std::option::Option::Some(v.into());
5918 self
5919 }
5920
5921 pub fn set_or_clear_backup_policy<T>(mut self, v: std::option::Option<T>) -> Self
5925 where
5926 T: std::convert::Into<crate::model::BackupPolicy>,
5927 {
5928 self.0.request.backup_policy = v.map(|x| x.into());
5929 self
5930 }
5931 }
5932
5933 #[doc(hidden)]
5934 impl gax::options::internal::RequestBuilder for UpdateBackupPolicy {
5935 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5936 &mut self.0.options
5937 }
5938 }
5939
5940 #[derive(Clone, Debug)]
5958 pub struct DeleteBackupPolicy(RequestBuilder<crate::model::DeleteBackupPolicyRequest>);
5959
5960 impl DeleteBackupPolicy {
5961 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5962 Self(RequestBuilder::new(stub))
5963 }
5964
5965 pub fn with_request<V: Into<crate::model::DeleteBackupPolicyRequest>>(
5967 mut self,
5968 v: V,
5969 ) -> Self {
5970 self.0.request = v.into();
5971 self
5972 }
5973
5974 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5976 self.0.options = v.into();
5977 self
5978 }
5979
5980 pub async fn send(self) -> Result<longrunning::model::Operation> {
5987 (*self.0.stub)
5988 .delete_backup_policy(self.0.request, self.0.options)
5989 .await
5990 .map(gax::response::Response::into_body)
5991 }
5992
5993 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
5995 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5996 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5997 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5998
5999 let stub = self.0.stub.clone();
6000 let mut options = self.0.options.clone();
6001 options.set_retry_policy(gax::retry_policy::NeverRetry);
6002 let query = move |name| {
6003 let stub = stub.clone();
6004 let options = options.clone();
6005 async {
6006 let op = GetOperation::new(stub)
6007 .set_name(name)
6008 .with_options(options)
6009 .send()
6010 .await?;
6011 Ok(Operation::new(op))
6012 }
6013 };
6014
6015 let start = move || async {
6016 let op = self.send().await?;
6017 Ok(Operation::new(op))
6018 };
6019
6020 lro::internal::new_unit_response_poller(
6021 polling_error_policy,
6022 polling_backoff_policy,
6023 start,
6024 query,
6025 )
6026 }
6027
6028 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6032 self.0.request.name = v.into();
6033 self
6034 }
6035 }
6036
6037 #[doc(hidden)]
6038 impl gax::options::internal::RequestBuilder for DeleteBackupPolicy {
6039 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6040 &mut self.0.options
6041 }
6042 }
6043
6044 #[derive(Clone, Debug)]
6065 pub struct ListQuotaRules(RequestBuilder<crate::model::ListQuotaRulesRequest>);
6066
6067 impl ListQuotaRules {
6068 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6069 Self(RequestBuilder::new(stub))
6070 }
6071
6072 pub fn with_request<V: Into<crate::model::ListQuotaRulesRequest>>(mut self, v: V) -> Self {
6074 self.0.request = v.into();
6075 self
6076 }
6077
6078 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6080 self.0.options = v.into();
6081 self
6082 }
6083
6084 pub async fn send(self) -> Result<crate::model::ListQuotaRulesResponse> {
6086 (*self.0.stub)
6087 .list_quota_rules(self.0.request, self.0.options)
6088 .await
6089 .map(gax::response::Response::into_body)
6090 }
6091
6092 pub fn by_page(
6094 self,
6095 ) -> impl gax::paginator::Paginator<crate::model::ListQuotaRulesResponse, gax::error::Error>
6096 {
6097 use std::clone::Clone;
6098 let token = self.0.request.page_token.clone();
6099 let execute = move |token: String| {
6100 let mut builder = self.clone();
6101 builder.0.request = builder.0.request.set_page_token(token);
6102 builder.send()
6103 };
6104 gax::paginator::internal::new_paginator(token, execute)
6105 }
6106
6107 pub fn by_item(
6109 self,
6110 ) -> impl gax::paginator::ItemPaginator<crate::model::ListQuotaRulesResponse, gax::error::Error>
6111 {
6112 use gax::paginator::Paginator;
6113 self.by_page().items()
6114 }
6115
6116 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6120 self.0.request.parent = v.into();
6121 self
6122 }
6123
6124 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6126 self.0.request.page_size = v.into();
6127 self
6128 }
6129
6130 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6132 self.0.request.page_token = v.into();
6133 self
6134 }
6135
6136 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6138 self.0.request.filter = v.into();
6139 self
6140 }
6141
6142 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6144 self.0.request.order_by = v.into();
6145 self
6146 }
6147 }
6148
6149 #[doc(hidden)]
6150 impl gax::options::internal::RequestBuilder for ListQuotaRules {
6151 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6152 &mut self.0.options
6153 }
6154 }
6155
6156 #[derive(Clone, Debug)]
6173 pub struct GetQuotaRule(RequestBuilder<crate::model::GetQuotaRuleRequest>);
6174
6175 impl GetQuotaRule {
6176 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6177 Self(RequestBuilder::new(stub))
6178 }
6179
6180 pub fn with_request<V: Into<crate::model::GetQuotaRuleRequest>>(mut self, v: V) -> Self {
6182 self.0.request = v.into();
6183 self
6184 }
6185
6186 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6188 self.0.options = v.into();
6189 self
6190 }
6191
6192 pub async fn send(self) -> Result<crate::model::QuotaRule> {
6194 (*self.0.stub)
6195 .get_quota_rule(self.0.request, self.0.options)
6196 .await
6197 .map(gax::response::Response::into_body)
6198 }
6199
6200 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6204 self.0.request.name = v.into();
6205 self
6206 }
6207 }
6208
6209 #[doc(hidden)]
6210 impl gax::options::internal::RequestBuilder for GetQuotaRule {
6211 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6212 &mut self.0.options
6213 }
6214 }
6215
6216 #[derive(Clone, Debug)]
6234 pub struct CreateQuotaRule(RequestBuilder<crate::model::CreateQuotaRuleRequest>);
6235
6236 impl CreateQuotaRule {
6237 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6238 Self(RequestBuilder::new(stub))
6239 }
6240
6241 pub fn with_request<V: Into<crate::model::CreateQuotaRuleRequest>>(mut self, v: V) -> Self {
6243 self.0.request = v.into();
6244 self
6245 }
6246
6247 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6249 self.0.options = v.into();
6250 self
6251 }
6252
6253 pub async fn send(self) -> Result<longrunning::model::Operation> {
6260 (*self.0.stub)
6261 .create_quota_rule(self.0.request, self.0.options)
6262 .await
6263 .map(gax::response::Response::into_body)
6264 }
6265
6266 pub fn poller(
6268 self,
6269 ) -> impl lro::Poller<crate::model::QuotaRule, crate::model::OperationMetadata> {
6270 type Operation =
6271 lro::internal::Operation<crate::model::QuotaRule, crate::model::OperationMetadata>;
6272 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6273 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6274
6275 let stub = self.0.stub.clone();
6276 let mut options = self.0.options.clone();
6277 options.set_retry_policy(gax::retry_policy::NeverRetry);
6278 let query = move |name| {
6279 let stub = stub.clone();
6280 let options = options.clone();
6281 async {
6282 let op = GetOperation::new(stub)
6283 .set_name(name)
6284 .with_options(options)
6285 .send()
6286 .await?;
6287 Ok(Operation::new(op))
6288 }
6289 };
6290
6291 let start = move || async {
6292 let op = self.send().await?;
6293 Ok(Operation::new(op))
6294 };
6295
6296 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6297 }
6298
6299 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6303 self.0.request.parent = v.into();
6304 self
6305 }
6306
6307 pub fn set_quota_rule<T>(mut self, v: T) -> Self
6311 where
6312 T: std::convert::Into<crate::model::QuotaRule>,
6313 {
6314 self.0.request.quota_rule = std::option::Option::Some(v.into());
6315 self
6316 }
6317
6318 pub fn set_or_clear_quota_rule<T>(mut self, v: std::option::Option<T>) -> Self
6322 where
6323 T: std::convert::Into<crate::model::QuotaRule>,
6324 {
6325 self.0.request.quota_rule = v.map(|x| x.into());
6326 self
6327 }
6328
6329 pub fn set_quota_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6333 self.0.request.quota_rule_id = v.into();
6334 self
6335 }
6336 }
6337
6338 #[doc(hidden)]
6339 impl gax::options::internal::RequestBuilder for CreateQuotaRule {
6340 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6341 &mut self.0.options
6342 }
6343 }
6344
6345 #[derive(Clone, Debug)]
6363 pub struct UpdateQuotaRule(RequestBuilder<crate::model::UpdateQuotaRuleRequest>);
6364
6365 impl UpdateQuotaRule {
6366 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6367 Self(RequestBuilder::new(stub))
6368 }
6369
6370 pub fn with_request<V: Into<crate::model::UpdateQuotaRuleRequest>>(mut self, v: V) -> Self {
6372 self.0.request = v.into();
6373 self
6374 }
6375
6376 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6378 self.0.options = v.into();
6379 self
6380 }
6381
6382 pub async fn send(self) -> Result<longrunning::model::Operation> {
6389 (*self.0.stub)
6390 .update_quota_rule(self.0.request, self.0.options)
6391 .await
6392 .map(gax::response::Response::into_body)
6393 }
6394
6395 pub fn poller(
6397 self,
6398 ) -> impl lro::Poller<crate::model::QuotaRule, crate::model::OperationMetadata> {
6399 type Operation =
6400 lro::internal::Operation<crate::model::QuotaRule, crate::model::OperationMetadata>;
6401 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6402 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6403
6404 let stub = self.0.stub.clone();
6405 let mut options = self.0.options.clone();
6406 options.set_retry_policy(gax::retry_policy::NeverRetry);
6407 let query = move |name| {
6408 let stub = stub.clone();
6409 let options = options.clone();
6410 async {
6411 let op = GetOperation::new(stub)
6412 .set_name(name)
6413 .with_options(options)
6414 .send()
6415 .await?;
6416 Ok(Operation::new(op))
6417 }
6418 };
6419
6420 let start = move || async {
6421 let op = self.send().await?;
6422 Ok(Operation::new(op))
6423 };
6424
6425 lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6426 }
6427
6428 pub fn set_update_mask<T>(mut self, v: T) -> Self
6430 where
6431 T: std::convert::Into<wkt::FieldMask>,
6432 {
6433 self.0.request.update_mask = std::option::Option::Some(v.into());
6434 self
6435 }
6436
6437 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6439 where
6440 T: std::convert::Into<wkt::FieldMask>,
6441 {
6442 self.0.request.update_mask = v.map(|x| x.into());
6443 self
6444 }
6445
6446 pub fn set_quota_rule<T>(mut self, v: T) -> Self
6450 where
6451 T: std::convert::Into<crate::model::QuotaRule>,
6452 {
6453 self.0.request.quota_rule = std::option::Option::Some(v.into());
6454 self
6455 }
6456
6457 pub fn set_or_clear_quota_rule<T>(mut self, v: std::option::Option<T>) -> Self
6461 where
6462 T: std::convert::Into<crate::model::QuotaRule>,
6463 {
6464 self.0.request.quota_rule = v.map(|x| x.into());
6465 self
6466 }
6467 }
6468
6469 #[doc(hidden)]
6470 impl gax::options::internal::RequestBuilder for UpdateQuotaRule {
6471 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6472 &mut self.0.options
6473 }
6474 }
6475
6476 #[derive(Clone, Debug)]
6494 pub struct DeleteQuotaRule(RequestBuilder<crate::model::DeleteQuotaRuleRequest>);
6495
6496 impl DeleteQuotaRule {
6497 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6498 Self(RequestBuilder::new(stub))
6499 }
6500
6501 pub fn with_request<V: Into<crate::model::DeleteQuotaRuleRequest>>(mut self, v: V) -> Self {
6503 self.0.request = v.into();
6504 self
6505 }
6506
6507 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6509 self.0.options = v.into();
6510 self
6511 }
6512
6513 pub async fn send(self) -> Result<longrunning::model::Operation> {
6520 (*self.0.stub)
6521 .delete_quota_rule(self.0.request, self.0.options)
6522 .await
6523 .map(gax::response::Response::into_body)
6524 }
6525
6526 pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
6528 type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6529 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6530 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6531
6532 let stub = self.0.stub.clone();
6533 let mut options = self.0.options.clone();
6534 options.set_retry_policy(gax::retry_policy::NeverRetry);
6535 let query = move |name| {
6536 let stub = stub.clone();
6537 let options = options.clone();
6538 async {
6539 let op = GetOperation::new(stub)
6540 .set_name(name)
6541 .with_options(options)
6542 .send()
6543 .await?;
6544 Ok(Operation::new(op))
6545 }
6546 };
6547
6548 let start = move || async {
6549 let op = self.send().await?;
6550 Ok(Operation::new(op))
6551 };
6552
6553 lro::internal::new_unit_response_poller(
6554 polling_error_policy,
6555 polling_backoff_policy,
6556 start,
6557 query,
6558 )
6559 }
6560
6561 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6565 self.0.request.name = v.into();
6566 self
6567 }
6568 }
6569
6570 #[doc(hidden)]
6571 impl gax::options::internal::RequestBuilder for DeleteQuotaRule {
6572 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6573 &mut self.0.options
6574 }
6575 }
6576
6577 #[derive(Clone, Debug)]
6598 pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
6599
6600 impl ListLocations {
6601 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6602 Self(RequestBuilder::new(stub))
6603 }
6604
6605 pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
6607 mut self,
6608 v: V,
6609 ) -> Self {
6610 self.0.request = v.into();
6611 self
6612 }
6613
6614 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6616 self.0.options = v.into();
6617 self
6618 }
6619
6620 pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
6622 (*self.0.stub)
6623 .list_locations(self.0.request, self.0.options)
6624 .await
6625 .map(gax::response::Response::into_body)
6626 }
6627
6628 pub fn by_page(
6630 self,
6631 ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
6632 {
6633 use std::clone::Clone;
6634 let token = self.0.request.page_token.clone();
6635 let execute = move |token: String| {
6636 let mut builder = self.clone();
6637 builder.0.request = builder.0.request.set_page_token(token);
6638 builder.send()
6639 };
6640 gax::paginator::internal::new_paginator(token, execute)
6641 }
6642
6643 pub fn by_item(
6645 self,
6646 ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
6647 {
6648 use gax::paginator::Paginator;
6649 self.by_page().items()
6650 }
6651
6652 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6654 self.0.request.name = v.into();
6655 self
6656 }
6657
6658 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6660 self.0.request.filter = v.into();
6661 self
6662 }
6663
6664 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6666 self.0.request.page_size = v.into();
6667 self
6668 }
6669
6670 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6672 self.0.request.page_token = v.into();
6673 self
6674 }
6675 }
6676
6677 #[doc(hidden)]
6678 impl gax::options::internal::RequestBuilder for ListLocations {
6679 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6680 &mut self.0.options
6681 }
6682 }
6683
6684 #[derive(Clone, Debug)]
6701 pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
6702
6703 impl GetLocation {
6704 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6705 Self(RequestBuilder::new(stub))
6706 }
6707
6708 pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
6710 self.0.request = v.into();
6711 self
6712 }
6713
6714 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6716 self.0.options = v.into();
6717 self
6718 }
6719
6720 pub async fn send(self) -> Result<location::model::Location> {
6722 (*self.0.stub)
6723 .get_location(self.0.request, self.0.options)
6724 .await
6725 .map(gax::response::Response::into_body)
6726 }
6727
6728 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6730 self.0.request.name = v.into();
6731 self
6732 }
6733 }
6734
6735 #[doc(hidden)]
6736 impl gax::options::internal::RequestBuilder for GetLocation {
6737 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6738 &mut self.0.options
6739 }
6740 }
6741
6742 #[derive(Clone, Debug)]
6763 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
6764
6765 impl ListOperations {
6766 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6767 Self(RequestBuilder::new(stub))
6768 }
6769
6770 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
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::ListOperationsResponse> {
6787 (*self.0.stub)
6788 .list_operations(self.0.request, self.0.options)
6789 .await
6790 .map(gax::response::Response::into_body)
6791 }
6792
6793 pub fn by_page(
6795 self,
6796 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
6797 {
6798 use std::clone::Clone;
6799 let token = self.0.request.page_token.clone();
6800 let execute = move |token: String| {
6801 let mut builder = self.clone();
6802 builder.0.request = builder.0.request.set_page_token(token);
6803 builder.send()
6804 };
6805 gax::paginator::internal::new_paginator(token, execute)
6806 }
6807
6808 pub fn by_item(
6810 self,
6811 ) -> impl gax::paginator::ItemPaginator<
6812 longrunning::model::ListOperationsResponse,
6813 gax::error::Error,
6814 > {
6815 use gax::paginator::Paginator;
6816 self.by_page().items()
6817 }
6818
6819 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6821 self.0.request.name = v.into();
6822 self
6823 }
6824
6825 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6827 self.0.request.filter = v.into();
6828 self
6829 }
6830
6831 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6833 self.0.request.page_size = v.into();
6834 self
6835 }
6836
6837 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6839 self.0.request.page_token = v.into();
6840 self
6841 }
6842
6843 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
6845 self.0.request.return_partial_success = v.into();
6846 self
6847 }
6848 }
6849
6850 #[doc(hidden)]
6851 impl gax::options::internal::RequestBuilder for ListOperations {
6852 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6853 &mut self.0.options
6854 }
6855 }
6856
6857 #[derive(Clone, Debug)]
6874 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
6875
6876 impl GetOperation {
6877 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6878 Self(RequestBuilder::new(stub))
6879 }
6880
6881 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
6883 mut self,
6884 v: V,
6885 ) -> Self {
6886 self.0.request = v.into();
6887 self
6888 }
6889
6890 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6892 self.0.options = v.into();
6893 self
6894 }
6895
6896 pub async fn send(self) -> Result<longrunning::model::Operation> {
6898 (*self.0.stub)
6899 .get_operation(self.0.request, self.0.options)
6900 .await
6901 .map(gax::response::Response::into_body)
6902 }
6903
6904 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6906 self.0.request.name = v.into();
6907 self
6908 }
6909 }
6910
6911 #[doc(hidden)]
6912 impl gax::options::internal::RequestBuilder for GetOperation {
6913 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6914 &mut self.0.options
6915 }
6916 }
6917
6918 #[derive(Clone, Debug)]
6935 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
6936
6937 impl DeleteOperation {
6938 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6939 Self(RequestBuilder::new(stub))
6940 }
6941
6942 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
6944 mut self,
6945 v: V,
6946 ) -> Self {
6947 self.0.request = v.into();
6948 self
6949 }
6950
6951 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6953 self.0.options = v.into();
6954 self
6955 }
6956
6957 pub async fn send(self) -> Result<()> {
6959 (*self.0.stub)
6960 .delete_operation(self.0.request, self.0.options)
6961 .await
6962 .map(gax::response::Response::into_body)
6963 }
6964
6965 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6967 self.0.request.name = v.into();
6968 self
6969 }
6970 }
6971
6972 #[doc(hidden)]
6973 impl gax::options::internal::RequestBuilder for DeleteOperation {
6974 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6975 &mut self.0.options
6976 }
6977 }
6978
6979 #[derive(Clone, Debug)]
6996 pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
6997
6998 impl CancelOperation {
6999 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7000 Self(RequestBuilder::new(stub))
7001 }
7002
7003 pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
7005 mut self,
7006 v: V,
7007 ) -> Self {
7008 self.0.request = v.into();
7009 self
7010 }
7011
7012 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7014 self.0.options = v.into();
7015 self
7016 }
7017
7018 pub async fn send(self) -> Result<()> {
7020 (*self.0.stub)
7021 .cancel_operation(self.0.request, self.0.options)
7022 .await
7023 .map(gax::response::Response::into_body)
7024 }
7025
7026 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7028 self.0.request.name = v.into();
7029 self
7030 }
7031 }
7032
7033 #[doc(hidden)]
7034 impl gax::options::internal::RequestBuilder for CancelOperation {
7035 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7036 &mut self.0.options
7037 }
7038 }
7039}