1pub mod net_app {
19 use crate::Result;
20
21 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::NetApp;
38 pub struct Factory;
39 impl crate::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 ) -> crate::ClientBuilderResult<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>,
55 request: R,
56 options: crate::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
64 Self {
65 stub,
66 request: R::default(),
67 options: crate::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<crate::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(crate::Response::into_body)
121 }
122
123 pub fn by_page(
125 self,
126 ) -> impl google_cloud_gax::paginator::Paginator<
127 crate::model::ListStoragePoolsResponse,
128 crate::Error,
129 > {
130 use std::clone::Clone;
131 let token = self.0.request.page_token.clone();
132 let execute = move |token: String| {
133 let mut builder = self.clone();
134 builder.0.request = builder.0.request.set_page_token(token);
135 builder.send()
136 };
137 google_cloud_gax::paginator::internal::new_paginator(token, execute)
138 }
139
140 pub fn by_item(
142 self,
143 ) -> impl google_cloud_gax::paginator::ItemPaginator<
144 crate::model::ListStoragePoolsResponse,
145 crate::Error,
146 > {
147 use google_cloud_gax::paginator::Paginator;
148 self.by_page().items()
149 }
150
151 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
155 self.0.request.parent = v.into();
156 self
157 }
158
159 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
161 self.0.request.page_size = v.into();
162 self
163 }
164
165 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
167 self.0.request.page_token = v.into();
168 self
169 }
170
171 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
173 self.0.request.order_by = v.into();
174 self
175 }
176
177 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
179 self.0.request.filter = v.into();
180 self
181 }
182 }
183
184 #[doc(hidden)]
185 impl crate::RequestBuilder for ListStoragePools {
186 fn request_options(&mut self) -> &mut crate::RequestOptions {
187 &mut self.0.options
188 }
189 }
190
191 #[derive(Clone, Debug)]
209 pub struct CreateStoragePool(RequestBuilder<crate::model::CreateStoragePoolRequest>);
210
211 impl CreateStoragePool {
212 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
213 Self(RequestBuilder::new(stub))
214 }
215
216 pub fn with_request<V: Into<crate::model::CreateStoragePoolRequest>>(
218 mut self,
219 v: V,
220 ) -> Self {
221 self.0.request = v.into();
222 self
223 }
224
225 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
227 self.0.options = v.into();
228 self
229 }
230
231 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
238 (*self.0.stub)
239 .create_storage_pool(self.0.request, self.0.options)
240 .await
241 .map(crate::Response::into_body)
242 }
243
244 pub fn poller(
246 self,
247 ) -> impl google_cloud_lro::Poller<crate::model::StoragePool, crate::model::OperationMetadata>
248 {
249 type Operation = google_cloud_lro::internal::Operation<
250 crate::model::StoragePool,
251 crate::model::OperationMetadata,
252 >;
253 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
254 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
255 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
256 if let Some(ref mut details) = poller_options.tracing {
257 details.method_name =
258 "google_cloud_netapp_v1::client::NetApp::create_storage_pool::until_done";
259 }
260
261 let stub = self.0.stub.clone();
262 let mut options = self.0.options.clone();
263 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
264 let query = move |name| {
265 let stub = stub.clone();
266 let options = options.clone();
267 async {
268 let op = GetOperation::new(stub)
269 .set_name(name)
270 .with_options(options)
271 .send()
272 .await?;
273 Ok(Operation::new(op))
274 }
275 };
276
277 let start = move || async {
278 let op = self.send().await?;
279 Ok(Operation::new(op))
280 };
281
282 use google_cloud_lro::internal::PollerExt;
283 {
284 google_cloud_lro::internal::new_poller(
285 polling_error_policy,
286 polling_backoff_policy,
287 start,
288 query,
289 )
290 }
291 .with_options(poller_options)
292 }
293
294 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
298 self.0.request.parent = v.into();
299 self
300 }
301
302 pub fn set_storage_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
306 self.0.request.storage_pool_id = v.into();
307 self
308 }
309
310 pub fn set_storage_pool<T>(mut self, v: T) -> Self
314 where
315 T: std::convert::Into<crate::model::StoragePool>,
316 {
317 self.0.request.storage_pool = std::option::Option::Some(v.into());
318 self
319 }
320
321 pub fn set_or_clear_storage_pool<T>(mut self, v: std::option::Option<T>) -> Self
325 where
326 T: std::convert::Into<crate::model::StoragePool>,
327 {
328 self.0.request.storage_pool = v.map(|x| x.into());
329 self
330 }
331 }
332
333 #[doc(hidden)]
334 impl crate::RequestBuilder for CreateStoragePool {
335 fn request_options(&mut self) -> &mut crate::RequestOptions {
336 &mut self.0.options
337 }
338 }
339
340 #[derive(Clone, Debug)]
357 pub struct GetStoragePool(RequestBuilder<crate::model::GetStoragePoolRequest>);
358
359 impl GetStoragePool {
360 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
361 Self(RequestBuilder::new(stub))
362 }
363
364 pub fn with_request<V: Into<crate::model::GetStoragePoolRequest>>(mut self, v: V) -> Self {
366 self.0.request = v.into();
367 self
368 }
369
370 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
372 self.0.options = v.into();
373 self
374 }
375
376 pub async fn send(self) -> Result<crate::model::StoragePool> {
378 (*self.0.stub)
379 .get_storage_pool(self.0.request, self.0.options)
380 .await
381 .map(crate::Response::into_body)
382 }
383
384 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
388 self.0.request.name = v.into();
389 self
390 }
391 }
392
393 #[doc(hidden)]
394 impl crate::RequestBuilder for GetStoragePool {
395 fn request_options(&mut self) -> &mut crate::RequestOptions {
396 &mut self.0.options
397 }
398 }
399
400 #[derive(Clone, Debug)]
418 pub struct UpdateStoragePool(RequestBuilder<crate::model::UpdateStoragePoolRequest>);
419
420 impl UpdateStoragePool {
421 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
422 Self(RequestBuilder::new(stub))
423 }
424
425 pub fn with_request<V: Into<crate::model::UpdateStoragePoolRequest>>(
427 mut self,
428 v: V,
429 ) -> Self {
430 self.0.request = v.into();
431 self
432 }
433
434 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
436 self.0.options = v.into();
437 self
438 }
439
440 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
447 (*self.0.stub)
448 .update_storage_pool(self.0.request, self.0.options)
449 .await
450 .map(crate::Response::into_body)
451 }
452
453 pub fn poller(
455 self,
456 ) -> impl google_cloud_lro::Poller<crate::model::StoragePool, crate::model::OperationMetadata>
457 {
458 type Operation = google_cloud_lro::internal::Operation<
459 crate::model::StoragePool,
460 crate::model::OperationMetadata,
461 >;
462 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
463 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
464 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
465 if let Some(ref mut details) = poller_options.tracing {
466 details.method_name =
467 "google_cloud_netapp_v1::client::NetApp::update_storage_pool::until_done";
468 }
469
470 let stub = self.0.stub.clone();
471 let mut options = self.0.options.clone();
472 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
473 let query = move |name| {
474 let stub = stub.clone();
475 let options = options.clone();
476 async {
477 let op = GetOperation::new(stub)
478 .set_name(name)
479 .with_options(options)
480 .send()
481 .await?;
482 Ok(Operation::new(op))
483 }
484 };
485
486 let start = move || async {
487 let op = self.send().await?;
488 Ok(Operation::new(op))
489 };
490
491 use google_cloud_lro::internal::PollerExt;
492 {
493 google_cloud_lro::internal::new_poller(
494 polling_error_policy,
495 polling_backoff_policy,
496 start,
497 query,
498 )
499 }
500 .with_options(poller_options)
501 }
502
503 pub fn set_update_mask<T>(mut self, v: T) -> Self
507 where
508 T: std::convert::Into<wkt::FieldMask>,
509 {
510 self.0.request.update_mask = std::option::Option::Some(v.into());
511 self
512 }
513
514 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
518 where
519 T: std::convert::Into<wkt::FieldMask>,
520 {
521 self.0.request.update_mask = v.map(|x| x.into());
522 self
523 }
524
525 pub fn set_storage_pool<T>(mut self, v: T) -> Self
529 where
530 T: std::convert::Into<crate::model::StoragePool>,
531 {
532 self.0.request.storage_pool = std::option::Option::Some(v.into());
533 self
534 }
535
536 pub fn set_or_clear_storage_pool<T>(mut self, v: std::option::Option<T>) -> Self
540 where
541 T: std::convert::Into<crate::model::StoragePool>,
542 {
543 self.0.request.storage_pool = v.map(|x| x.into());
544 self
545 }
546 }
547
548 #[doc(hidden)]
549 impl crate::RequestBuilder for UpdateStoragePool {
550 fn request_options(&mut self) -> &mut crate::RequestOptions {
551 &mut self.0.options
552 }
553 }
554
555 #[derive(Clone, Debug)]
573 pub struct DeleteStoragePool(RequestBuilder<crate::model::DeleteStoragePoolRequest>);
574
575 impl DeleteStoragePool {
576 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
577 Self(RequestBuilder::new(stub))
578 }
579
580 pub fn with_request<V: Into<crate::model::DeleteStoragePoolRequest>>(
582 mut self,
583 v: V,
584 ) -> Self {
585 self.0.request = v.into();
586 self
587 }
588
589 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
591 self.0.options = v.into();
592 self
593 }
594
595 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
602 (*self.0.stub)
603 .delete_storage_pool(self.0.request, self.0.options)
604 .await
605 .map(crate::Response::into_body)
606 }
607
608 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
610 type Operation =
611 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
612 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
613 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
614 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
615 if let Some(ref mut details) = poller_options.tracing {
616 details.method_name =
617 "google_cloud_netapp_v1::client::NetApp::delete_storage_pool::until_done";
618 }
619
620 let stub = self.0.stub.clone();
621 let mut options = self.0.options.clone();
622 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
623 let query = move |name| {
624 let stub = stub.clone();
625 let options = options.clone();
626 async {
627 let op = GetOperation::new(stub)
628 .set_name(name)
629 .with_options(options)
630 .send()
631 .await?;
632 Ok(Operation::new(op))
633 }
634 };
635
636 let start = move || async {
637 let op = self.send().await?;
638 Ok(Operation::new(op))
639 };
640
641 use google_cloud_lro::internal::PollerExt;
642 {
643 google_cloud_lro::internal::new_unit_response_poller(
644 polling_error_policy,
645 polling_backoff_policy,
646 start,
647 query,
648 )
649 }
650 .with_options(poller_options)
651 }
652
653 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
657 self.0.request.name = v.into();
658 self
659 }
660 }
661
662 #[doc(hidden)]
663 impl crate::RequestBuilder for DeleteStoragePool {
664 fn request_options(&mut self) -> &mut crate::RequestOptions {
665 &mut self.0.options
666 }
667 }
668
669 #[derive(Clone, Debug)]
687 pub struct ValidateDirectoryService(
688 RequestBuilder<crate::model::ValidateDirectoryServiceRequest>,
689 );
690
691 impl ValidateDirectoryService {
692 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
693 Self(RequestBuilder::new(stub))
694 }
695
696 pub fn with_request<V: Into<crate::model::ValidateDirectoryServiceRequest>>(
698 mut self,
699 v: V,
700 ) -> Self {
701 self.0.request = v.into();
702 self
703 }
704
705 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
707 self.0.options = v.into();
708 self
709 }
710
711 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
718 (*self.0.stub)
719 .validate_directory_service(self.0.request, self.0.options)
720 .await
721 .map(crate::Response::into_body)
722 }
723
724 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
726 type Operation =
727 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
728 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
729 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
730 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
731 if let Some(ref mut details) = poller_options.tracing {
732 details.method_name = "google_cloud_netapp_v1::client::NetApp::validate_directory_service::until_done";
733 }
734
735 let stub = self.0.stub.clone();
736 let mut options = self.0.options.clone();
737 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
738 let query = move |name| {
739 let stub = stub.clone();
740 let options = options.clone();
741 async {
742 let op = GetOperation::new(stub)
743 .set_name(name)
744 .with_options(options)
745 .send()
746 .await?;
747 Ok(Operation::new(op))
748 }
749 };
750
751 let start = move || async {
752 let op = self.send().await?;
753 Ok(Operation::new(op))
754 };
755
756 use google_cloud_lro::internal::PollerExt;
757 {
758 google_cloud_lro::internal::new_unit_response_poller(
759 polling_error_policy,
760 polling_backoff_policy,
761 start,
762 query,
763 )
764 }
765 .with_options(poller_options)
766 }
767
768 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
772 self.0.request.name = v.into();
773 self
774 }
775
776 pub fn set_directory_service_type<T: Into<crate::model::DirectoryServiceType>>(
778 mut self,
779 v: T,
780 ) -> Self {
781 self.0.request.directory_service_type = v.into();
782 self
783 }
784 }
785
786 #[doc(hidden)]
787 impl crate::RequestBuilder for ValidateDirectoryService {
788 fn request_options(&mut self) -> &mut crate::RequestOptions {
789 &mut self.0.options
790 }
791 }
792
793 #[derive(Clone, Debug)]
811 pub struct SwitchActiveReplicaZone(
812 RequestBuilder<crate::model::SwitchActiveReplicaZoneRequest>,
813 );
814
815 impl SwitchActiveReplicaZone {
816 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
817 Self(RequestBuilder::new(stub))
818 }
819
820 pub fn with_request<V: Into<crate::model::SwitchActiveReplicaZoneRequest>>(
822 mut self,
823 v: V,
824 ) -> Self {
825 self.0.request = v.into();
826 self
827 }
828
829 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
831 self.0.options = v.into();
832 self
833 }
834
835 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
842 (*self.0.stub)
843 .switch_active_replica_zone(self.0.request, self.0.options)
844 .await
845 .map(crate::Response::into_body)
846 }
847
848 pub fn poller(
850 self,
851 ) -> impl google_cloud_lro::Poller<crate::model::StoragePool, crate::model::OperationMetadata>
852 {
853 type Operation = google_cloud_lro::internal::Operation<
854 crate::model::StoragePool,
855 crate::model::OperationMetadata,
856 >;
857 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
858 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
859 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
860 if let Some(ref mut details) = poller_options.tracing {
861 details.method_name = "google_cloud_netapp_v1::client::NetApp::switch_active_replica_zone::until_done";
862 }
863
864 let stub = self.0.stub.clone();
865 let mut options = self.0.options.clone();
866 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
867 let query = move |name| {
868 let stub = stub.clone();
869 let options = options.clone();
870 async {
871 let op = GetOperation::new(stub)
872 .set_name(name)
873 .with_options(options)
874 .send()
875 .await?;
876 Ok(Operation::new(op))
877 }
878 };
879
880 let start = move || async {
881 let op = self.send().await?;
882 Ok(Operation::new(op))
883 };
884
885 use google_cloud_lro::internal::PollerExt;
886 {
887 google_cloud_lro::internal::new_poller(
888 polling_error_policy,
889 polling_backoff_policy,
890 start,
891 query,
892 )
893 }
894 .with_options(poller_options)
895 }
896
897 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
901 self.0.request.name = v.into();
902 self
903 }
904 }
905
906 #[doc(hidden)]
907 impl crate::RequestBuilder for SwitchActiveReplicaZone {
908 fn request_options(&mut self) -> &mut crate::RequestOptions {
909 &mut self.0.options
910 }
911 }
912
913 #[derive(Clone, Debug)]
934 pub struct ListVolumes(RequestBuilder<crate::model::ListVolumesRequest>);
935
936 impl ListVolumes {
937 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
938 Self(RequestBuilder::new(stub))
939 }
940
941 pub fn with_request<V: Into<crate::model::ListVolumesRequest>>(mut self, v: V) -> Self {
943 self.0.request = v.into();
944 self
945 }
946
947 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
949 self.0.options = v.into();
950 self
951 }
952
953 pub async fn send(self) -> Result<crate::model::ListVolumesResponse> {
955 (*self.0.stub)
956 .list_volumes(self.0.request, self.0.options)
957 .await
958 .map(crate::Response::into_body)
959 }
960
961 pub fn by_page(
963 self,
964 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListVolumesResponse, crate::Error>
965 {
966 use std::clone::Clone;
967 let token = self.0.request.page_token.clone();
968 let execute = move |token: String| {
969 let mut builder = self.clone();
970 builder.0.request = builder.0.request.set_page_token(token);
971 builder.send()
972 };
973 google_cloud_gax::paginator::internal::new_paginator(token, execute)
974 }
975
976 pub fn by_item(
978 self,
979 ) -> impl google_cloud_gax::paginator::ItemPaginator<
980 crate::model::ListVolumesResponse,
981 crate::Error,
982 > {
983 use google_cloud_gax::paginator::Paginator;
984 self.by_page().items()
985 }
986
987 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
991 self.0.request.parent = v.into();
992 self
993 }
994
995 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
997 self.0.request.page_size = v.into();
998 self
999 }
1000
1001 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1003 self.0.request.page_token = v.into();
1004 self
1005 }
1006
1007 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1009 self.0.request.filter = v.into();
1010 self
1011 }
1012
1013 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1015 self.0.request.order_by = v.into();
1016 self
1017 }
1018 }
1019
1020 #[doc(hidden)]
1021 impl crate::RequestBuilder for ListVolumes {
1022 fn request_options(&mut self) -> &mut crate::RequestOptions {
1023 &mut self.0.options
1024 }
1025 }
1026
1027 #[derive(Clone, Debug)]
1044 pub struct GetVolume(RequestBuilder<crate::model::GetVolumeRequest>);
1045
1046 impl GetVolume {
1047 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1048 Self(RequestBuilder::new(stub))
1049 }
1050
1051 pub fn with_request<V: Into<crate::model::GetVolumeRequest>>(mut self, v: V) -> Self {
1053 self.0.request = v.into();
1054 self
1055 }
1056
1057 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1059 self.0.options = v.into();
1060 self
1061 }
1062
1063 pub async fn send(self) -> Result<crate::model::Volume> {
1065 (*self.0.stub)
1066 .get_volume(self.0.request, self.0.options)
1067 .await
1068 .map(crate::Response::into_body)
1069 }
1070
1071 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1075 self.0.request.name = v.into();
1076 self
1077 }
1078 }
1079
1080 #[doc(hidden)]
1081 impl crate::RequestBuilder for GetVolume {
1082 fn request_options(&mut self) -> &mut crate::RequestOptions {
1083 &mut self.0.options
1084 }
1085 }
1086
1087 #[derive(Clone, Debug)]
1105 pub struct CreateVolume(RequestBuilder<crate::model::CreateVolumeRequest>);
1106
1107 impl CreateVolume {
1108 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1109 Self(RequestBuilder::new(stub))
1110 }
1111
1112 pub fn with_request<V: Into<crate::model::CreateVolumeRequest>>(mut self, v: V) -> Self {
1114 self.0.request = v.into();
1115 self
1116 }
1117
1118 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1120 self.0.options = v.into();
1121 self
1122 }
1123
1124 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1131 (*self.0.stub)
1132 .create_volume(self.0.request, self.0.options)
1133 .await
1134 .map(crate::Response::into_body)
1135 }
1136
1137 pub fn poller(
1139 self,
1140 ) -> impl google_cloud_lro::Poller<crate::model::Volume, crate::model::OperationMetadata>
1141 {
1142 type Operation = google_cloud_lro::internal::Operation<
1143 crate::model::Volume,
1144 crate::model::OperationMetadata,
1145 >;
1146 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1147 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1148 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1149 if let Some(ref mut details) = poller_options.tracing {
1150 details.method_name =
1151 "google_cloud_netapp_v1::client::NetApp::create_volume::until_done";
1152 }
1153
1154 let stub = self.0.stub.clone();
1155 let mut options = self.0.options.clone();
1156 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1157 let query = move |name| {
1158 let stub = stub.clone();
1159 let options = options.clone();
1160 async {
1161 let op = GetOperation::new(stub)
1162 .set_name(name)
1163 .with_options(options)
1164 .send()
1165 .await?;
1166 Ok(Operation::new(op))
1167 }
1168 };
1169
1170 let start = move || async {
1171 let op = self.send().await?;
1172 Ok(Operation::new(op))
1173 };
1174
1175 use google_cloud_lro::internal::PollerExt;
1176 {
1177 google_cloud_lro::internal::new_poller(
1178 polling_error_policy,
1179 polling_backoff_policy,
1180 start,
1181 query,
1182 )
1183 }
1184 .with_options(poller_options)
1185 }
1186
1187 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1191 self.0.request.parent = v.into();
1192 self
1193 }
1194
1195 pub fn set_volume_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1199 self.0.request.volume_id = v.into();
1200 self
1201 }
1202
1203 pub fn set_volume<T>(mut self, v: T) -> Self
1207 where
1208 T: std::convert::Into<crate::model::Volume>,
1209 {
1210 self.0.request.volume = std::option::Option::Some(v.into());
1211 self
1212 }
1213
1214 pub fn set_or_clear_volume<T>(mut self, v: std::option::Option<T>) -> Self
1218 where
1219 T: std::convert::Into<crate::model::Volume>,
1220 {
1221 self.0.request.volume = v.map(|x| x.into());
1222 self
1223 }
1224 }
1225
1226 #[doc(hidden)]
1227 impl crate::RequestBuilder for CreateVolume {
1228 fn request_options(&mut self) -> &mut crate::RequestOptions {
1229 &mut self.0.options
1230 }
1231 }
1232
1233 #[derive(Clone, Debug)]
1251 pub struct UpdateVolume(RequestBuilder<crate::model::UpdateVolumeRequest>);
1252
1253 impl UpdateVolume {
1254 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1255 Self(RequestBuilder::new(stub))
1256 }
1257
1258 pub fn with_request<V: Into<crate::model::UpdateVolumeRequest>>(mut self, v: V) -> Self {
1260 self.0.request = v.into();
1261 self
1262 }
1263
1264 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1266 self.0.options = v.into();
1267 self
1268 }
1269
1270 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1277 (*self.0.stub)
1278 .update_volume(self.0.request, self.0.options)
1279 .await
1280 .map(crate::Response::into_body)
1281 }
1282
1283 pub fn poller(
1285 self,
1286 ) -> impl google_cloud_lro::Poller<crate::model::Volume, crate::model::OperationMetadata>
1287 {
1288 type Operation = google_cloud_lro::internal::Operation<
1289 crate::model::Volume,
1290 crate::model::OperationMetadata,
1291 >;
1292 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1293 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1294 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1295 if let Some(ref mut details) = poller_options.tracing {
1296 details.method_name =
1297 "google_cloud_netapp_v1::client::NetApp::update_volume::until_done";
1298 }
1299
1300 let stub = self.0.stub.clone();
1301 let mut options = self.0.options.clone();
1302 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1303 let query = move |name| {
1304 let stub = stub.clone();
1305 let options = options.clone();
1306 async {
1307 let op = GetOperation::new(stub)
1308 .set_name(name)
1309 .with_options(options)
1310 .send()
1311 .await?;
1312 Ok(Operation::new(op))
1313 }
1314 };
1315
1316 let start = move || async {
1317 let op = self.send().await?;
1318 Ok(Operation::new(op))
1319 };
1320
1321 use google_cloud_lro::internal::PollerExt;
1322 {
1323 google_cloud_lro::internal::new_poller(
1324 polling_error_policy,
1325 polling_backoff_policy,
1326 start,
1327 query,
1328 )
1329 }
1330 .with_options(poller_options)
1331 }
1332
1333 pub fn set_update_mask<T>(mut self, v: T) -> Self
1337 where
1338 T: std::convert::Into<wkt::FieldMask>,
1339 {
1340 self.0.request.update_mask = std::option::Option::Some(v.into());
1341 self
1342 }
1343
1344 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1348 where
1349 T: std::convert::Into<wkt::FieldMask>,
1350 {
1351 self.0.request.update_mask = v.map(|x| x.into());
1352 self
1353 }
1354
1355 pub fn set_volume<T>(mut self, v: T) -> Self
1359 where
1360 T: std::convert::Into<crate::model::Volume>,
1361 {
1362 self.0.request.volume = std::option::Option::Some(v.into());
1363 self
1364 }
1365
1366 pub fn set_or_clear_volume<T>(mut self, v: std::option::Option<T>) -> Self
1370 where
1371 T: std::convert::Into<crate::model::Volume>,
1372 {
1373 self.0.request.volume = v.map(|x| x.into());
1374 self
1375 }
1376 }
1377
1378 #[doc(hidden)]
1379 impl crate::RequestBuilder for UpdateVolume {
1380 fn request_options(&mut self) -> &mut crate::RequestOptions {
1381 &mut self.0.options
1382 }
1383 }
1384
1385 #[derive(Clone, Debug)]
1403 pub struct DeleteVolume(RequestBuilder<crate::model::DeleteVolumeRequest>);
1404
1405 impl DeleteVolume {
1406 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1407 Self(RequestBuilder::new(stub))
1408 }
1409
1410 pub fn with_request<V: Into<crate::model::DeleteVolumeRequest>>(mut self, v: V) -> Self {
1412 self.0.request = v.into();
1413 self
1414 }
1415
1416 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1418 self.0.options = v.into();
1419 self
1420 }
1421
1422 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1429 (*self.0.stub)
1430 .delete_volume(self.0.request, self.0.options)
1431 .await
1432 .map(crate::Response::into_body)
1433 }
1434
1435 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1437 type Operation =
1438 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1439 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1440 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1441 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1442 if let Some(ref mut details) = poller_options.tracing {
1443 details.method_name =
1444 "google_cloud_netapp_v1::client::NetApp::delete_volume::until_done";
1445 }
1446
1447 let stub = self.0.stub.clone();
1448 let mut options = self.0.options.clone();
1449 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1450 let query = move |name| {
1451 let stub = stub.clone();
1452 let options = options.clone();
1453 async {
1454 let op = GetOperation::new(stub)
1455 .set_name(name)
1456 .with_options(options)
1457 .send()
1458 .await?;
1459 Ok(Operation::new(op))
1460 }
1461 };
1462
1463 let start = move || async {
1464 let op = self.send().await?;
1465 Ok(Operation::new(op))
1466 };
1467
1468 use google_cloud_lro::internal::PollerExt;
1469 {
1470 google_cloud_lro::internal::new_unit_response_poller(
1471 polling_error_policy,
1472 polling_backoff_policy,
1473 start,
1474 query,
1475 )
1476 }
1477 .with_options(poller_options)
1478 }
1479
1480 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1484 self.0.request.name = v.into();
1485 self
1486 }
1487
1488 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
1490 self.0.request.force = v.into();
1491 self
1492 }
1493 }
1494
1495 #[doc(hidden)]
1496 impl crate::RequestBuilder for DeleteVolume {
1497 fn request_options(&mut self) -> &mut crate::RequestOptions {
1498 &mut self.0.options
1499 }
1500 }
1501
1502 #[derive(Clone, Debug)]
1520 pub struct RevertVolume(RequestBuilder<crate::model::RevertVolumeRequest>);
1521
1522 impl RevertVolume {
1523 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1524 Self(RequestBuilder::new(stub))
1525 }
1526
1527 pub fn with_request<V: Into<crate::model::RevertVolumeRequest>>(mut self, v: V) -> Self {
1529 self.0.request = v.into();
1530 self
1531 }
1532
1533 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1535 self.0.options = v.into();
1536 self
1537 }
1538
1539 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1546 (*self.0.stub)
1547 .revert_volume(self.0.request, self.0.options)
1548 .await
1549 .map(crate::Response::into_body)
1550 }
1551
1552 pub fn poller(
1554 self,
1555 ) -> impl google_cloud_lro::Poller<crate::model::Volume, crate::model::OperationMetadata>
1556 {
1557 type Operation = google_cloud_lro::internal::Operation<
1558 crate::model::Volume,
1559 crate::model::OperationMetadata,
1560 >;
1561 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1562 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1563 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1564 if let Some(ref mut details) = poller_options.tracing {
1565 details.method_name =
1566 "google_cloud_netapp_v1::client::NetApp::revert_volume::until_done";
1567 }
1568
1569 let stub = self.0.stub.clone();
1570 let mut options = self.0.options.clone();
1571 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1572 let query = move |name| {
1573 let stub = stub.clone();
1574 let options = options.clone();
1575 async {
1576 let op = GetOperation::new(stub)
1577 .set_name(name)
1578 .with_options(options)
1579 .send()
1580 .await?;
1581 Ok(Operation::new(op))
1582 }
1583 };
1584
1585 let start = move || async {
1586 let op = self.send().await?;
1587 Ok(Operation::new(op))
1588 };
1589
1590 use google_cloud_lro::internal::PollerExt;
1591 {
1592 google_cloud_lro::internal::new_poller(
1593 polling_error_policy,
1594 polling_backoff_policy,
1595 start,
1596 query,
1597 )
1598 }
1599 .with_options(poller_options)
1600 }
1601
1602 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1606 self.0.request.name = v.into();
1607 self
1608 }
1609
1610 pub fn set_snapshot_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1614 self.0.request.snapshot_id = v.into();
1615 self
1616 }
1617 }
1618
1619 #[doc(hidden)]
1620 impl crate::RequestBuilder for RevertVolume {
1621 fn request_options(&mut self) -> &mut crate::RequestOptions {
1622 &mut self.0.options
1623 }
1624 }
1625
1626 #[derive(Clone, Debug)]
1644 pub struct EstablishVolumePeering(RequestBuilder<crate::model::EstablishVolumePeeringRequest>);
1645
1646 impl EstablishVolumePeering {
1647 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1648 Self(RequestBuilder::new(stub))
1649 }
1650
1651 pub fn with_request<V: Into<crate::model::EstablishVolumePeeringRequest>>(
1653 mut self,
1654 v: V,
1655 ) -> Self {
1656 self.0.request = v.into();
1657 self
1658 }
1659
1660 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1662 self.0.options = v.into();
1663 self
1664 }
1665
1666 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1673 (*self.0.stub)
1674 .establish_volume_peering(self.0.request, self.0.options)
1675 .await
1676 .map(crate::Response::into_body)
1677 }
1678
1679 pub fn poller(
1681 self,
1682 ) -> impl google_cloud_lro::Poller<crate::model::Volume, crate::model::OperationMetadata>
1683 {
1684 type Operation = google_cloud_lro::internal::Operation<
1685 crate::model::Volume,
1686 crate::model::OperationMetadata,
1687 >;
1688 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1689 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1690 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1691 if let Some(ref mut details) = poller_options.tracing {
1692 details.method_name =
1693 "google_cloud_netapp_v1::client::NetApp::establish_volume_peering::until_done";
1694 }
1695
1696 let stub = self.0.stub.clone();
1697 let mut options = self.0.options.clone();
1698 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1699 let query = move |name| {
1700 let stub = stub.clone();
1701 let options = options.clone();
1702 async {
1703 let op = GetOperation::new(stub)
1704 .set_name(name)
1705 .with_options(options)
1706 .send()
1707 .await?;
1708 Ok(Operation::new(op))
1709 }
1710 };
1711
1712 let start = move || async {
1713 let op = self.send().await?;
1714 Ok(Operation::new(op))
1715 };
1716
1717 use google_cloud_lro::internal::PollerExt;
1718 {
1719 google_cloud_lro::internal::new_poller(
1720 polling_error_policy,
1721 polling_backoff_policy,
1722 start,
1723 query,
1724 )
1725 }
1726 .with_options(poller_options)
1727 }
1728
1729 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1733 self.0.request.name = v.into();
1734 self
1735 }
1736
1737 pub fn set_peer_cluster_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1741 self.0.request.peer_cluster_name = v.into();
1742 self
1743 }
1744
1745 pub fn set_peer_svm_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1749 self.0.request.peer_svm_name = v.into();
1750 self
1751 }
1752
1753 pub fn set_peer_ip_addresses<T, V>(mut self, v: T) -> Self
1755 where
1756 T: std::iter::IntoIterator<Item = V>,
1757 V: std::convert::Into<std::string::String>,
1758 {
1759 use std::iter::Iterator;
1760 self.0.request.peer_ip_addresses = v.into_iter().map(|i| i.into()).collect();
1761 self
1762 }
1763
1764 pub fn set_peer_volume_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1768 self.0.request.peer_volume_name = v.into();
1769 self
1770 }
1771 }
1772
1773 #[doc(hidden)]
1774 impl crate::RequestBuilder for EstablishVolumePeering {
1775 fn request_options(&mut self) -> &mut crate::RequestOptions {
1776 &mut self.0.options
1777 }
1778 }
1779
1780 #[derive(Clone, Debug)]
1801 pub struct ListSnapshots(RequestBuilder<crate::model::ListSnapshotsRequest>);
1802
1803 impl ListSnapshots {
1804 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1805 Self(RequestBuilder::new(stub))
1806 }
1807
1808 pub fn with_request<V: Into<crate::model::ListSnapshotsRequest>>(mut self, v: V) -> Self {
1810 self.0.request = v.into();
1811 self
1812 }
1813
1814 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1816 self.0.options = v.into();
1817 self
1818 }
1819
1820 pub async fn send(self) -> Result<crate::model::ListSnapshotsResponse> {
1822 (*self.0.stub)
1823 .list_snapshots(self.0.request, self.0.options)
1824 .await
1825 .map(crate::Response::into_body)
1826 }
1827
1828 pub fn by_page(
1830 self,
1831 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListSnapshotsResponse, crate::Error>
1832 {
1833 use std::clone::Clone;
1834 let token = self.0.request.page_token.clone();
1835 let execute = move |token: String| {
1836 let mut builder = self.clone();
1837 builder.0.request = builder.0.request.set_page_token(token);
1838 builder.send()
1839 };
1840 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1841 }
1842
1843 pub fn by_item(
1845 self,
1846 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1847 crate::model::ListSnapshotsResponse,
1848 crate::Error,
1849 > {
1850 use google_cloud_gax::paginator::Paginator;
1851 self.by_page().items()
1852 }
1853
1854 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1858 self.0.request.parent = v.into();
1859 self
1860 }
1861
1862 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1864 self.0.request.page_size = v.into();
1865 self
1866 }
1867
1868 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1870 self.0.request.page_token = v.into();
1871 self
1872 }
1873
1874 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1876 self.0.request.order_by = v.into();
1877 self
1878 }
1879
1880 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1882 self.0.request.filter = v.into();
1883 self
1884 }
1885 }
1886
1887 #[doc(hidden)]
1888 impl crate::RequestBuilder for ListSnapshots {
1889 fn request_options(&mut self) -> &mut crate::RequestOptions {
1890 &mut self.0.options
1891 }
1892 }
1893
1894 #[derive(Clone, Debug)]
1911 pub struct GetSnapshot(RequestBuilder<crate::model::GetSnapshotRequest>);
1912
1913 impl GetSnapshot {
1914 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1915 Self(RequestBuilder::new(stub))
1916 }
1917
1918 pub fn with_request<V: Into<crate::model::GetSnapshotRequest>>(mut self, v: V) -> Self {
1920 self.0.request = v.into();
1921 self
1922 }
1923
1924 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1926 self.0.options = v.into();
1927 self
1928 }
1929
1930 pub async fn send(self) -> Result<crate::model::Snapshot> {
1932 (*self.0.stub)
1933 .get_snapshot(self.0.request, self.0.options)
1934 .await
1935 .map(crate::Response::into_body)
1936 }
1937
1938 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1942 self.0.request.name = v.into();
1943 self
1944 }
1945 }
1946
1947 #[doc(hidden)]
1948 impl crate::RequestBuilder for GetSnapshot {
1949 fn request_options(&mut self) -> &mut crate::RequestOptions {
1950 &mut self.0.options
1951 }
1952 }
1953
1954 #[derive(Clone, Debug)]
1972 pub struct CreateSnapshot(RequestBuilder<crate::model::CreateSnapshotRequest>);
1973
1974 impl CreateSnapshot {
1975 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1976 Self(RequestBuilder::new(stub))
1977 }
1978
1979 pub fn with_request<V: Into<crate::model::CreateSnapshotRequest>>(mut self, v: V) -> Self {
1981 self.0.request = v.into();
1982 self
1983 }
1984
1985 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1987 self.0.options = v.into();
1988 self
1989 }
1990
1991 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1998 (*self.0.stub)
1999 .create_snapshot(self.0.request, self.0.options)
2000 .await
2001 .map(crate::Response::into_body)
2002 }
2003
2004 pub fn poller(
2006 self,
2007 ) -> impl google_cloud_lro::Poller<crate::model::Snapshot, crate::model::OperationMetadata>
2008 {
2009 type Operation = google_cloud_lro::internal::Operation<
2010 crate::model::Snapshot,
2011 crate::model::OperationMetadata,
2012 >;
2013 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2014 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2015 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2016 if let Some(ref mut details) = poller_options.tracing {
2017 details.method_name =
2018 "google_cloud_netapp_v1::client::NetApp::create_snapshot::until_done";
2019 }
2020
2021 let stub = self.0.stub.clone();
2022 let mut options = self.0.options.clone();
2023 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2024 let query = move |name| {
2025 let stub = stub.clone();
2026 let options = options.clone();
2027 async {
2028 let op = GetOperation::new(stub)
2029 .set_name(name)
2030 .with_options(options)
2031 .send()
2032 .await?;
2033 Ok(Operation::new(op))
2034 }
2035 };
2036
2037 let start = move || async {
2038 let op = self.send().await?;
2039 Ok(Operation::new(op))
2040 };
2041
2042 use google_cloud_lro::internal::PollerExt;
2043 {
2044 google_cloud_lro::internal::new_poller(
2045 polling_error_policy,
2046 polling_backoff_policy,
2047 start,
2048 query,
2049 )
2050 }
2051 .with_options(poller_options)
2052 }
2053
2054 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2058 self.0.request.parent = v.into();
2059 self
2060 }
2061
2062 pub fn set_snapshot<T>(mut self, v: T) -> Self
2066 where
2067 T: std::convert::Into<crate::model::Snapshot>,
2068 {
2069 self.0.request.snapshot = std::option::Option::Some(v.into());
2070 self
2071 }
2072
2073 pub fn set_or_clear_snapshot<T>(mut self, v: std::option::Option<T>) -> Self
2077 where
2078 T: std::convert::Into<crate::model::Snapshot>,
2079 {
2080 self.0.request.snapshot = v.map(|x| x.into());
2081 self
2082 }
2083
2084 pub fn set_snapshot_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2088 self.0.request.snapshot_id = v.into();
2089 self
2090 }
2091 }
2092
2093 #[doc(hidden)]
2094 impl crate::RequestBuilder for CreateSnapshot {
2095 fn request_options(&mut self) -> &mut crate::RequestOptions {
2096 &mut self.0.options
2097 }
2098 }
2099
2100 #[derive(Clone, Debug)]
2118 pub struct DeleteSnapshot(RequestBuilder<crate::model::DeleteSnapshotRequest>);
2119
2120 impl DeleteSnapshot {
2121 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2122 Self(RequestBuilder::new(stub))
2123 }
2124
2125 pub fn with_request<V: Into<crate::model::DeleteSnapshotRequest>>(mut self, v: V) -> Self {
2127 self.0.request = v.into();
2128 self
2129 }
2130
2131 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2133 self.0.options = v.into();
2134 self
2135 }
2136
2137 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2144 (*self.0.stub)
2145 .delete_snapshot(self.0.request, self.0.options)
2146 .await
2147 .map(crate::Response::into_body)
2148 }
2149
2150 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2152 type Operation =
2153 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2154 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2155 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2156 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2157 if let Some(ref mut details) = poller_options.tracing {
2158 details.method_name =
2159 "google_cloud_netapp_v1::client::NetApp::delete_snapshot::until_done";
2160 }
2161
2162 let stub = self.0.stub.clone();
2163 let mut options = self.0.options.clone();
2164 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2165 let query = move |name| {
2166 let stub = stub.clone();
2167 let options = options.clone();
2168 async {
2169 let op = GetOperation::new(stub)
2170 .set_name(name)
2171 .with_options(options)
2172 .send()
2173 .await?;
2174 Ok(Operation::new(op))
2175 }
2176 };
2177
2178 let start = move || async {
2179 let op = self.send().await?;
2180 Ok(Operation::new(op))
2181 };
2182
2183 use google_cloud_lro::internal::PollerExt;
2184 {
2185 google_cloud_lro::internal::new_unit_response_poller(
2186 polling_error_policy,
2187 polling_backoff_policy,
2188 start,
2189 query,
2190 )
2191 }
2192 .with_options(poller_options)
2193 }
2194
2195 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2199 self.0.request.name = v.into();
2200 self
2201 }
2202 }
2203
2204 #[doc(hidden)]
2205 impl crate::RequestBuilder for DeleteSnapshot {
2206 fn request_options(&mut self) -> &mut crate::RequestOptions {
2207 &mut self.0.options
2208 }
2209 }
2210
2211 #[derive(Clone, Debug)]
2229 pub struct UpdateSnapshot(RequestBuilder<crate::model::UpdateSnapshotRequest>);
2230
2231 impl UpdateSnapshot {
2232 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2233 Self(RequestBuilder::new(stub))
2234 }
2235
2236 pub fn with_request<V: Into<crate::model::UpdateSnapshotRequest>>(mut self, v: V) -> Self {
2238 self.0.request = v.into();
2239 self
2240 }
2241
2242 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2244 self.0.options = v.into();
2245 self
2246 }
2247
2248 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2255 (*self.0.stub)
2256 .update_snapshot(self.0.request, self.0.options)
2257 .await
2258 .map(crate::Response::into_body)
2259 }
2260
2261 pub fn poller(
2263 self,
2264 ) -> impl google_cloud_lro::Poller<crate::model::Snapshot, crate::model::OperationMetadata>
2265 {
2266 type Operation = google_cloud_lro::internal::Operation<
2267 crate::model::Snapshot,
2268 crate::model::OperationMetadata,
2269 >;
2270 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2271 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2272 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2273 if let Some(ref mut details) = poller_options.tracing {
2274 details.method_name =
2275 "google_cloud_netapp_v1::client::NetApp::update_snapshot::until_done";
2276 }
2277
2278 let stub = self.0.stub.clone();
2279 let mut options = self.0.options.clone();
2280 options.set_retry_policy(google_cloud_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 use google_cloud_lro::internal::PollerExt;
2300 {
2301 google_cloud_lro::internal::new_poller(
2302 polling_error_policy,
2303 polling_backoff_policy,
2304 start,
2305 query,
2306 )
2307 }
2308 .with_options(poller_options)
2309 }
2310
2311 pub fn set_update_mask<T>(mut self, v: T) -> Self
2315 where
2316 T: std::convert::Into<wkt::FieldMask>,
2317 {
2318 self.0.request.update_mask = std::option::Option::Some(v.into());
2319 self
2320 }
2321
2322 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2326 where
2327 T: std::convert::Into<wkt::FieldMask>,
2328 {
2329 self.0.request.update_mask = v.map(|x| x.into());
2330 self
2331 }
2332
2333 pub fn set_snapshot<T>(mut self, v: T) -> Self
2337 where
2338 T: std::convert::Into<crate::model::Snapshot>,
2339 {
2340 self.0.request.snapshot = std::option::Option::Some(v.into());
2341 self
2342 }
2343
2344 pub fn set_or_clear_snapshot<T>(mut self, v: std::option::Option<T>) -> Self
2348 where
2349 T: std::convert::Into<crate::model::Snapshot>,
2350 {
2351 self.0.request.snapshot = v.map(|x| x.into());
2352 self
2353 }
2354 }
2355
2356 #[doc(hidden)]
2357 impl crate::RequestBuilder for UpdateSnapshot {
2358 fn request_options(&mut self) -> &mut crate::RequestOptions {
2359 &mut self.0.options
2360 }
2361 }
2362
2363 #[derive(Clone, Debug)]
2384 pub struct ListActiveDirectories(RequestBuilder<crate::model::ListActiveDirectoriesRequest>);
2385
2386 impl ListActiveDirectories {
2387 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2388 Self(RequestBuilder::new(stub))
2389 }
2390
2391 pub fn with_request<V: Into<crate::model::ListActiveDirectoriesRequest>>(
2393 mut self,
2394 v: V,
2395 ) -> Self {
2396 self.0.request = v.into();
2397 self
2398 }
2399
2400 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2402 self.0.options = v.into();
2403 self
2404 }
2405
2406 pub async fn send(self) -> Result<crate::model::ListActiveDirectoriesResponse> {
2408 (*self.0.stub)
2409 .list_active_directories(self.0.request, self.0.options)
2410 .await
2411 .map(crate::Response::into_body)
2412 }
2413
2414 pub fn by_page(
2416 self,
2417 ) -> impl google_cloud_gax::paginator::Paginator<
2418 crate::model::ListActiveDirectoriesResponse,
2419 crate::Error,
2420 > {
2421 use std::clone::Clone;
2422 let token = self.0.request.page_token.clone();
2423 let execute = move |token: String| {
2424 let mut builder = self.clone();
2425 builder.0.request = builder.0.request.set_page_token(token);
2426 builder.send()
2427 };
2428 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2429 }
2430
2431 pub fn by_item(
2433 self,
2434 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2435 crate::model::ListActiveDirectoriesResponse,
2436 crate::Error,
2437 > {
2438 use google_cloud_gax::paginator::Paginator;
2439 self.by_page().items()
2440 }
2441
2442 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2446 self.0.request.parent = v.into();
2447 self
2448 }
2449
2450 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2452 self.0.request.page_size = v.into();
2453 self
2454 }
2455
2456 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2458 self.0.request.page_token = v.into();
2459 self
2460 }
2461
2462 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2464 self.0.request.filter = v.into();
2465 self
2466 }
2467
2468 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2470 self.0.request.order_by = v.into();
2471 self
2472 }
2473 }
2474
2475 #[doc(hidden)]
2476 impl crate::RequestBuilder for ListActiveDirectories {
2477 fn request_options(&mut self) -> &mut crate::RequestOptions {
2478 &mut self.0.options
2479 }
2480 }
2481
2482 #[derive(Clone, Debug)]
2499 pub struct GetActiveDirectory(RequestBuilder<crate::model::GetActiveDirectoryRequest>);
2500
2501 impl GetActiveDirectory {
2502 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2503 Self(RequestBuilder::new(stub))
2504 }
2505
2506 pub fn with_request<V: Into<crate::model::GetActiveDirectoryRequest>>(
2508 mut self,
2509 v: V,
2510 ) -> Self {
2511 self.0.request = v.into();
2512 self
2513 }
2514
2515 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2517 self.0.options = v.into();
2518 self
2519 }
2520
2521 pub async fn send(self) -> Result<crate::model::ActiveDirectory> {
2523 (*self.0.stub)
2524 .get_active_directory(self.0.request, self.0.options)
2525 .await
2526 .map(crate::Response::into_body)
2527 }
2528
2529 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2533 self.0.request.name = v.into();
2534 self
2535 }
2536 }
2537
2538 #[doc(hidden)]
2539 impl crate::RequestBuilder for GetActiveDirectory {
2540 fn request_options(&mut self) -> &mut crate::RequestOptions {
2541 &mut self.0.options
2542 }
2543 }
2544
2545 #[derive(Clone, Debug)]
2563 pub struct CreateActiveDirectory(RequestBuilder<crate::model::CreateActiveDirectoryRequest>);
2564
2565 impl CreateActiveDirectory {
2566 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2567 Self(RequestBuilder::new(stub))
2568 }
2569
2570 pub fn with_request<V: Into<crate::model::CreateActiveDirectoryRequest>>(
2572 mut self,
2573 v: V,
2574 ) -> Self {
2575 self.0.request = v.into();
2576 self
2577 }
2578
2579 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2581 self.0.options = v.into();
2582 self
2583 }
2584
2585 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2592 (*self.0.stub)
2593 .create_active_directory(self.0.request, self.0.options)
2594 .await
2595 .map(crate::Response::into_body)
2596 }
2597
2598 pub fn poller(
2600 self,
2601 ) -> impl google_cloud_lro::Poller<crate::model::ActiveDirectory, crate::model::OperationMetadata>
2602 {
2603 type Operation = google_cloud_lro::internal::Operation<
2604 crate::model::ActiveDirectory,
2605 crate::model::OperationMetadata,
2606 >;
2607 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2608 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2609 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2610 if let Some(ref mut details) = poller_options.tracing {
2611 details.method_name =
2612 "google_cloud_netapp_v1::client::NetApp::create_active_directory::until_done";
2613 }
2614
2615 let stub = self.0.stub.clone();
2616 let mut options = self.0.options.clone();
2617 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2618 let query = move |name| {
2619 let stub = stub.clone();
2620 let options = options.clone();
2621 async {
2622 let op = GetOperation::new(stub)
2623 .set_name(name)
2624 .with_options(options)
2625 .send()
2626 .await?;
2627 Ok(Operation::new(op))
2628 }
2629 };
2630
2631 let start = move || async {
2632 let op = self.send().await?;
2633 Ok(Operation::new(op))
2634 };
2635
2636 use google_cloud_lro::internal::PollerExt;
2637 {
2638 google_cloud_lro::internal::new_poller(
2639 polling_error_policy,
2640 polling_backoff_policy,
2641 start,
2642 query,
2643 )
2644 }
2645 .with_options(poller_options)
2646 }
2647
2648 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2652 self.0.request.parent = v.into();
2653 self
2654 }
2655
2656 pub fn set_active_directory<T>(mut self, v: T) -> Self
2660 where
2661 T: std::convert::Into<crate::model::ActiveDirectory>,
2662 {
2663 self.0.request.active_directory = std::option::Option::Some(v.into());
2664 self
2665 }
2666
2667 pub fn set_or_clear_active_directory<T>(mut self, v: std::option::Option<T>) -> Self
2671 where
2672 T: std::convert::Into<crate::model::ActiveDirectory>,
2673 {
2674 self.0.request.active_directory = v.map(|x| x.into());
2675 self
2676 }
2677
2678 pub fn set_active_directory_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2682 self.0.request.active_directory_id = v.into();
2683 self
2684 }
2685 }
2686
2687 #[doc(hidden)]
2688 impl crate::RequestBuilder for CreateActiveDirectory {
2689 fn request_options(&mut self) -> &mut crate::RequestOptions {
2690 &mut self.0.options
2691 }
2692 }
2693
2694 #[derive(Clone, Debug)]
2712 pub struct UpdateActiveDirectory(RequestBuilder<crate::model::UpdateActiveDirectoryRequest>);
2713
2714 impl UpdateActiveDirectory {
2715 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2716 Self(RequestBuilder::new(stub))
2717 }
2718
2719 pub fn with_request<V: Into<crate::model::UpdateActiveDirectoryRequest>>(
2721 mut self,
2722 v: V,
2723 ) -> Self {
2724 self.0.request = v.into();
2725 self
2726 }
2727
2728 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2730 self.0.options = v.into();
2731 self
2732 }
2733
2734 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2741 (*self.0.stub)
2742 .update_active_directory(self.0.request, self.0.options)
2743 .await
2744 .map(crate::Response::into_body)
2745 }
2746
2747 pub fn poller(
2749 self,
2750 ) -> impl google_cloud_lro::Poller<crate::model::ActiveDirectory, crate::model::OperationMetadata>
2751 {
2752 type Operation = google_cloud_lro::internal::Operation<
2753 crate::model::ActiveDirectory,
2754 crate::model::OperationMetadata,
2755 >;
2756 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2757 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2758 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2759 if let Some(ref mut details) = poller_options.tracing {
2760 details.method_name =
2761 "google_cloud_netapp_v1::client::NetApp::update_active_directory::until_done";
2762 }
2763
2764 let stub = self.0.stub.clone();
2765 let mut options = self.0.options.clone();
2766 options.set_retry_policy(google_cloud_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 use google_cloud_lro::internal::PollerExt;
2786 {
2787 google_cloud_lro::internal::new_poller(
2788 polling_error_policy,
2789 polling_backoff_policy,
2790 start,
2791 query,
2792 )
2793 }
2794 .with_options(poller_options)
2795 }
2796
2797 pub fn set_update_mask<T>(mut self, v: T) -> Self
2801 where
2802 T: std::convert::Into<wkt::FieldMask>,
2803 {
2804 self.0.request.update_mask = std::option::Option::Some(v.into());
2805 self
2806 }
2807
2808 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2812 where
2813 T: std::convert::Into<wkt::FieldMask>,
2814 {
2815 self.0.request.update_mask = v.map(|x| x.into());
2816 self
2817 }
2818
2819 pub fn set_active_directory<T>(mut self, v: T) -> Self
2823 where
2824 T: std::convert::Into<crate::model::ActiveDirectory>,
2825 {
2826 self.0.request.active_directory = std::option::Option::Some(v.into());
2827 self
2828 }
2829
2830 pub fn set_or_clear_active_directory<T>(mut self, v: std::option::Option<T>) -> Self
2834 where
2835 T: std::convert::Into<crate::model::ActiveDirectory>,
2836 {
2837 self.0.request.active_directory = v.map(|x| x.into());
2838 self
2839 }
2840 }
2841
2842 #[doc(hidden)]
2843 impl crate::RequestBuilder for UpdateActiveDirectory {
2844 fn request_options(&mut self) -> &mut crate::RequestOptions {
2845 &mut self.0.options
2846 }
2847 }
2848
2849 #[derive(Clone, Debug)]
2867 pub struct DeleteActiveDirectory(RequestBuilder<crate::model::DeleteActiveDirectoryRequest>);
2868
2869 impl DeleteActiveDirectory {
2870 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2871 Self(RequestBuilder::new(stub))
2872 }
2873
2874 pub fn with_request<V: Into<crate::model::DeleteActiveDirectoryRequest>>(
2876 mut self,
2877 v: V,
2878 ) -> Self {
2879 self.0.request = v.into();
2880 self
2881 }
2882
2883 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2885 self.0.options = v.into();
2886 self
2887 }
2888
2889 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2896 (*self.0.stub)
2897 .delete_active_directory(self.0.request, self.0.options)
2898 .await
2899 .map(crate::Response::into_body)
2900 }
2901
2902 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2904 type Operation =
2905 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2906 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2907 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2908 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2909 if let Some(ref mut details) = poller_options.tracing {
2910 details.method_name =
2911 "google_cloud_netapp_v1::client::NetApp::delete_active_directory::until_done";
2912 }
2913
2914 let stub = self.0.stub.clone();
2915 let mut options = self.0.options.clone();
2916 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2917 let query = move |name| {
2918 let stub = stub.clone();
2919 let options = options.clone();
2920 async {
2921 let op = GetOperation::new(stub)
2922 .set_name(name)
2923 .with_options(options)
2924 .send()
2925 .await?;
2926 Ok(Operation::new(op))
2927 }
2928 };
2929
2930 let start = move || async {
2931 let op = self.send().await?;
2932 Ok(Operation::new(op))
2933 };
2934
2935 use google_cloud_lro::internal::PollerExt;
2936 {
2937 google_cloud_lro::internal::new_unit_response_poller(
2938 polling_error_policy,
2939 polling_backoff_policy,
2940 start,
2941 query,
2942 )
2943 }
2944 .with_options(poller_options)
2945 }
2946
2947 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2951 self.0.request.name = v.into();
2952 self
2953 }
2954 }
2955
2956 #[doc(hidden)]
2957 impl crate::RequestBuilder for DeleteActiveDirectory {
2958 fn request_options(&mut self) -> &mut crate::RequestOptions {
2959 &mut self.0.options
2960 }
2961 }
2962
2963 #[derive(Clone, Debug)]
2984 pub struct ListKmsConfigs(RequestBuilder<crate::model::ListKmsConfigsRequest>);
2985
2986 impl ListKmsConfigs {
2987 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2988 Self(RequestBuilder::new(stub))
2989 }
2990
2991 pub fn with_request<V: Into<crate::model::ListKmsConfigsRequest>>(mut self, v: V) -> Self {
2993 self.0.request = v.into();
2994 self
2995 }
2996
2997 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2999 self.0.options = v.into();
3000 self
3001 }
3002
3003 pub async fn send(self) -> Result<crate::model::ListKmsConfigsResponse> {
3005 (*self.0.stub)
3006 .list_kms_configs(self.0.request, self.0.options)
3007 .await
3008 .map(crate::Response::into_body)
3009 }
3010
3011 pub fn by_page(
3013 self,
3014 ) -> impl google_cloud_gax::paginator::Paginator<
3015 crate::model::ListKmsConfigsResponse,
3016 crate::Error,
3017 > {
3018 use std::clone::Clone;
3019 let token = self.0.request.page_token.clone();
3020 let execute = move |token: String| {
3021 let mut builder = self.clone();
3022 builder.0.request = builder.0.request.set_page_token(token);
3023 builder.send()
3024 };
3025 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3026 }
3027
3028 pub fn by_item(
3030 self,
3031 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3032 crate::model::ListKmsConfigsResponse,
3033 crate::Error,
3034 > {
3035 use google_cloud_gax::paginator::Paginator;
3036 self.by_page().items()
3037 }
3038
3039 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3043 self.0.request.parent = v.into();
3044 self
3045 }
3046
3047 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3049 self.0.request.page_size = v.into();
3050 self
3051 }
3052
3053 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3055 self.0.request.page_token = v.into();
3056 self
3057 }
3058
3059 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3061 self.0.request.order_by = v.into();
3062 self
3063 }
3064
3065 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3067 self.0.request.filter = v.into();
3068 self
3069 }
3070 }
3071
3072 #[doc(hidden)]
3073 impl crate::RequestBuilder for ListKmsConfigs {
3074 fn request_options(&mut self) -> &mut crate::RequestOptions {
3075 &mut self.0.options
3076 }
3077 }
3078
3079 #[derive(Clone, Debug)]
3097 pub struct CreateKmsConfig(RequestBuilder<crate::model::CreateKmsConfigRequest>);
3098
3099 impl CreateKmsConfig {
3100 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3101 Self(RequestBuilder::new(stub))
3102 }
3103
3104 pub fn with_request<V: Into<crate::model::CreateKmsConfigRequest>>(mut self, v: V) -> Self {
3106 self.0.request = v.into();
3107 self
3108 }
3109
3110 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3112 self.0.options = v.into();
3113 self
3114 }
3115
3116 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3123 (*self.0.stub)
3124 .create_kms_config(self.0.request, self.0.options)
3125 .await
3126 .map(crate::Response::into_body)
3127 }
3128
3129 pub fn poller(
3131 self,
3132 ) -> impl google_cloud_lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata>
3133 {
3134 type Operation = google_cloud_lro::internal::Operation<
3135 crate::model::KmsConfig,
3136 crate::model::OperationMetadata,
3137 >;
3138 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3139 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3140 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3141 if let Some(ref mut details) = poller_options.tracing {
3142 details.method_name =
3143 "google_cloud_netapp_v1::client::NetApp::create_kms_config::until_done";
3144 }
3145
3146 let stub = self.0.stub.clone();
3147 let mut options = self.0.options.clone();
3148 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3149 let query = move |name| {
3150 let stub = stub.clone();
3151 let options = options.clone();
3152 async {
3153 let op = GetOperation::new(stub)
3154 .set_name(name)
3155 .with_options(options)
3156 .send()
3157 .await?;
3158 Ok(Operation::new(op))
3159 }
3160 };
3161
3162 let start = move || async {
3163 let op = self.send().await?;
3164 Ok(Operation::new(op))
3165 };
3166
3167 use google_cloud_lro::internal::PollerExt;
3168 {
3169 google_cloud_lro::internal::new_poller(
3170 polling_error_policy,
3171 polling_backoff_policy,
3172 start,
3173 query,
3174 )
3175 }
3176 .with_options(poller_options)
3177 }
3178
3179 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3183 self.0.request.parent = v.into();
3184 self
3185 }
3186
3187 pub fn set_kms_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3191 self.0.request.kms_config_id = v.into();
3192 self
3193 }
3194
3195 pub fn set_kms_config<T>(mut self, v: T) -> Self
3199 where
3200 T: std::convert::Into<crate::model::KmsConfig>,
3201 {
3202 self.0.request.kms_config = std::option::Option::Some(v.into());
3203 self
3204 }
3205
3206 pub fn set_or_clear_kms_config<T>(mut self, v: std::option::Option<T>) -> Self
3210 where
3211 T: std::convert::Into<crate::model::KmsConfig>,
3212 {
3213 self.0.request.kms_config = v.map(|x| x.into());
3214 self
3215 }
3216 }
3217
3218 #[doc(hidden)]
3219 impl crate::RequestBuilder for CreateKmsConfig {
3220 fn request_options(&mut self) -> &mut crate::RequestOptions {
3221 &mut self.0.options
3222 }
3223 }
3224
3225 #[derive(Clone, Debug)]
3242 pub struct GetKmsConfig(RequestBuilder<crate::model::GetKmsConfigRequest>);
3243
3244 impl GetKmsConfig {
3245 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3246 Self(RequestBuilder::new(stub))
3247 }
3248
3249 pub fn with_request<V: Into<crate::model::GetKmsConfigRequest>>(mut self, v: V) -> Self {
3251 self.0.request = v.into();
3252 self
3253 }
3254
3255 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3257 self.0.options = v.into();
3258 self
3259 }
3260
3261 pub async fn send(self) -> Result<crate::model::KmsConfig> {
3263 (*self.0.stub)
3264 .get_kms_config(self.0.request, self.0.options)
3265 .await
3266 .map(crate::Response::into_body)
3267 }
3268
3269 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3273 self.0.request.name = v.into();
3274 self
3275 }
3276 }
3277
3278 #[doc(hidden)]
3279 impl crate::RequestBuilder for GetKmsConfig {
3280 fn request_options(&mut self) -> &mut crate::RequestOptions {
3281 &mut self.0.options
3282 }
3283 }
3284
3285 #[derive(Clone, Debug)]
3303 pub struct UpdateKmsConfig(RequestBuilder<crate::model::UpdateKmsConfigRequest>);
3304
3305 impl UpdateKmsConfig {
3306 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3307 Self(RequestBuilder::new(stub))
3308 }
3309
3310 pub fn with_request<V: Into<crate::model::UpdateKmsConfigRequest>>(mut self, v: V) -> Self {
3312 self.0.request = v.into();
3313 self
3314 }
3315
3316 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3318 self.0.options = v.into();
3319 self
3320 }
3321
3322 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3329 (*self.0.stub)
3330 .update_kms_config(self.0.request, self.0.options)
3331 .await
3332 .map(crate::Response::into_body)
3333 }
3334
3335 pub fn poller(
3337 self,
3338 ) -> impl google_cloud_lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata>
3339 {
3340 type Operation = google_cloud_lro::internal::Operation<
3341 crate::model::KmsConfig,
3342 crate::model::OperationMetadata,
3343 >;
3344 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3345 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3346 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3347 if let Some(ref mut details) = poller_options.tracing {
3348 details.method_name =
3349 "google_cloud_netapp_v1::client::NetApp::update_kms_config::until_done";
3350 }
3351
3352 let stub = self.0.stub.clone();
3353 let mut options = self.0.options.clone();
3354 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3355 let query = move |name| {
3356 let stub = stub.clone();
3357 let options = options.clone();
3358 async {
3359 let op = GetOperation::new(stub)
3360 .set_name(name)
3361 .with_options(options)
3362 .send()
3363 .await?;
3364 Ok(Operation::new(op))
3365 }
3366 };
3367
3368 let start = move || async {
3369 let op = self.send().await?;
3370 Ok(Operation::new(op))
3371 };
3372
3373 use google_cloud_lro::internal::PollerExt;
3374 {
3375 google_cloud_lro::internal::new_poller(
3376 polling_error_policy,
3377 polling_backoff_policy,
3378 start,
3379 query,
3380 )
3381 }
3382 .with_options(poller_options)
3383 }
3384
3385 pub fn set_update_mask<T>(mut self, v: T) -> Self
3389 where
3390 T: std::convert::Into<wkt::FieldMask>,
3391 {
3392 self.0.request.update_mask = std::option::Option::Some(v.into());
3393 self
3394 }
3395
3396 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3400 where
3401 T: std::convert::Into<wkt::FieldMask>,
3402 {
3403 self.0.request.update_mask = v.map(|x| x.into());
3404 self
3405 }
3406
3407 pub fn set_kms_config<T>(mut self, v: T) -> Self
3411 where
3412 T: std::convert::Into<crate::model::KmsConfig>,
3413 {
3414 self.0.request.kms_config = std::option::Option::Some(v.into());
3415 self
3416 }
3417
3418 pub fn set_or_clear_kms_config<T>(mut self, v: std::option::Option<T>) -> Self
3422 where
3423 T: std::convert::Into<crate::model::KmsConfig>,
3424 {
3425 self.0.request.kms_config = v.map(|x| x.into());
3426 self
3427 }
3428 }
3429
3430 #[doc(hidden)]
3431 impl crate::RequestBuilder for UpdateKmsConfig {
3432 fn request_options(&mut self) -> &mut crate::RequestOptions {
3433 &mut self.0.options
3434 }
3435 }
3436
3437 #[derive(Clone, Debug)]
3455 pub struct EncryptVolumes(RequestBuilder<crate::model::EncryptVolumesRequest>);
3456
3457 impl EncryptVolumes {
3458 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3459 Self(RequestBuilder::new(stub))
3460 }
3461
3462 pub fn with_request<V: Into<crate::model::EncryptVolumesRequest>>(mut self, v: V) -> Self {
3464 self.0.request = v.into();
3465 self
3466 }
3467
3468 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3470 self.0.options = v.into();
3471 self
3472 }
3473
3474 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3481 (*self.0.stub)
3482 .encrypt_volumes(self.0.request, self.0.options)
3483 .await
3484 .map(crate::Response::into_body)
3485 }
3486
3487 pub fn poller(
3489 self,
3490 ) -> impl google_cloud_lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata>
3491 {
3492 type Operation = google_cloud_lro::internal::Operation<
3493 crate::model::KmsConfig,
3494 crate::model::OperationMetadata,
3495 >;
3496 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3497 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3498 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3499 if let Some(ref mut details) = poller_options.tracing {
3500 details.method_name =
3501 "google_cloud_netapp_v1::client::NetApp::encrypt_volumes::until_done";
3502 }
3503
3504 let stub = self.0.stub.clone();
3505 let mut options = self.0.options.clone();
3506 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3507 let query = move |name| {
3508 let stub = stub.clone();
3509 let options = options.clone();
3510 async {
3511 let op = GetOperation::new(stub)
3512 .set_name(name)
3513 .with_options(options)
3514 .send()
3515 .await?;
3516 Ok(Operation::new(op))
3517 }
3518 };
3519
3520 let start = move || async {
3521 let op = self.send().await?;
3522 Ok(Operation::new(op))
3523 };
3524
3525 use google_cloud_lro::internal::PollerExt;
3526 {
3527 google_cloud_lro::internal::new_poller(
3528 polling_error_policy,
3529 polling_backoff_policy,
3530 start,
3531 query,
3532 )
3533 }
3534 .with_options(poller_options)
3535 }
3536
3537 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3541 self.0.request.name = v.into();
3542 self
3543 }
3544 }
3545
3546 #[doc(hidden)]
3547 impl crate::RequestBuilder for EncryptVolumes {
3548 fn request_options(&mut self) -> &mut crate::RequestOptions {
3549 &mut self.0.options
3550 }
3551 }
3552
3553 #[derive(Clone, Debug)]
3570 pub struct VerifyKmsConfig(RequestBuilder<crate::model::VerifyKmsConfigRequest>);
3571
3572 impl VerifyKmsConfig {
3573 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3574 Self(RequestBuilder::new(stub))
3575 }
3576
3577 pub fn with_request<V: Into<crate::model::VerifyKmsConfigRequest>>(mut self, v: V) -> Self {
3579 self.0.request = v.into();
3580 self
3581 }
3582
3583 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3585 self.0.options = v.into();
3586 self
3587 }
3588
3589 pub async fn send(self) -> Result<crate::model::VerifyKmsConfigResponse> {
3591 (*self.0.stub)
3592 .verify_kms_config(self.0.request, self.0.options)
3593 .await
3594 .map(crate::Response::into_body)
3595 }
3596
3597 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3601 self.0.request.name = v.into();
3602 self
3603 }
3604 }
3605
3606 #[doc(hidden)]
3607 impl crate::RequestBuilder for VerifyKmsConfig {
3608 fn request_options(&mut self) -> &mut crate::RequestOptions {
3609 &mut self.0.options
3610 }
3611 }
3612
3613 #[derive(Clone, Debug)]
3631 pub struct DeleteKmsConfig(RequestBuilder<crate::model::DeleteKmsConfigRequest>);
3632
3633 impl DeleteKmsConfig {
3634 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3635 Self(RequestBuilder::new(stub))
3636 }
3637
3638 pub fn with_request<V: Into<crate::model::DeleteKmsConfigRequest>>(mut self, v: V) -> Self {
3640 self.0.request = v.into();
3641 self
3642 }
3643
3644 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3646 self.0.options = v.into();
3647 self
3648 }
3649
3650 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3657 (*self.0.stub)
3658 .delete_kms_config(self.0.request, self.0.options)
3659 .await
3660 .map(crate::Response::into_body)
3661 }
3662
3663 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3665 type Operation =
3666 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3667 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3668 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3669 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3670 if let Some(ref mut details) = poller_options.tracing {
3671 details.method_name =
3672 "google_cloud_netapp_v1::client::NetApp::delete_kms_config::until_done";
3673 }
3674
3675 let stub = self.0.stub.clone();
3676 let mut options = self.0.options.clone();
3677 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3678 let query = move |name| {
3679 let stub = stub.clone();
3680 let options = options.clone();
3681 async {
3682 let op = GetOperation::new(stub)
3683 .set_name(name)
3684 .with_options(options)
3685 .send()
3686 .await?;
3687 Ok(Operation::new(op))
3688 }
3689 };
3690
3691 let start = move || async {
3692 let op = self.send().await?;
3693 Ok(Operation::new(op))
3694 };
3695
3696 use google_cloud_lro::internal::PollerExt;
3697 {
3698 google_cloud_lro::internal::new_unit_response_poller(
3699 polling_error_policy,
3700 polling_backoff_policy,
3701 start,
3702 query,
3703 )
3704 }
3705 .with_options(poller_options)
3706 }
3707
3708 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3712 self.0.request.name = v.into();
3713 self
3714 }
3715 }
3716
3717 #[doc(hidden)]
3718 impl crate::RequestBuilder for DeleteKmsConfig {
3719 fn request_options(&mut self) -> &mut crate::RequestOptions {
3720 &mut self.0.options
3721 }
3722 }
3723
3724 #[derive(Clone, Debug)]
3745 pub struct ListReplications(RequestBuilder<crate::model::ListReplicationsRequest>);
3746
3747 impl ListReplications {
3748 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3749 Self(RequestBuilder::new(stub))
3750 }
3751
3752 pub fn with_request<V: Into<crate::model::ListReplicationsRequest>>(
3754 mut self,
3755 v: V,
3756 ) -> Self {
3757 self.0.request = v.into();
3758 self
3759 }
3760
3761 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3763 self.0.options = v.into();
3764 self
3765 }
3766
3767 pub async fn send(self) -> Result<crate::model::ListReplicationsResponse> {
3769 (*self.0.stub)
3770 .list_replications(self.0.request, self.0.options)
3771 .await
3772 .map(crate::Response::into_body)
3773 }
3774
3775 pub fn by_page(
3777 self,
3778 ) -> impl google_cloud_gax::paginator::Paginator<
3779 crate::model::ListReplicationsResponse,
3780 crate::Error,
3781 > {
3782 use std::clone::Clone;
3783 let token = self.0.request.page_token.clone();
3784 let execute = move |token: String| {
3785 let mut builder = self.clone();
3786 builder.0.request = builder.0.request.set_page_token(token);
3787 builder.send()
3788 };
3789 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3790 }
3791
3792 pub fn by_item(
3794 self,
3795 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3796 crate::model::ListReplicationsResponse,
3797 crate::Error,
3798 > {
3799 use google_cloud_gax::paginator::Paginator;
3800 self.by_page().items()
3801 }
3802
3803 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3807 self.0.request.parent = v.into();
3808 self
3809 }
3810
3811 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3813 self.0.request.page_size = v.into();
3814 self
3815 }
3816
3817 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3819 self.0.request.page_token = v.into();
3820 self
3821 }
3822
3823 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3825 self.0.request.order_by = v.into();
3826 self
3827 }
3828
3829 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3831 self.0.request.filter = v.into();
3832 self
3833 }
3834 }
3835
3836 #[doc(hidden)]
3837 impl crate::RequestBuilder for ListReplications {
3838 fn request_options(&mut self) -> &mut crate::RequestOptions {
3839 &mut self.0.options
3840 }
3841 }
3842
3843 #[derive(Clone, Debug)]
3860 pub struct GetReplication(RequestBuilder<crate::model::GetReplicationRequest>);
3861
3862 impl GetReplication {
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::GetReplicationRequest>>(mut self, v: V) -> Self {
3869 self.0.request = v.into();
3870 self
3871 }
3872
3873 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3875 self.0.options = v.into();
3876 self
3877 }
3878
3879 pub async fn send(self) -> Result<crate::model::Replication> {
3881 (*self.0.stub)
3882 .get_replication(self.0.request, self.0.options)
3883 .await
3884 .map(crate::Response::into_body)
3885 }
3886
3887 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3891 self.0.request.name = v.into();
3892 self
3893 }
3894 }
3895
3896 #[doc(hidden)]
3897 impl crate::RequestBuilder for GetReplication {
3898 fn request_options(&mut self) -> &mut crate::RequestOptions {
3899 &mut self.0.options
3900 }
3901 }
3902
3903 #[derive(Clone, Debug)]
3921 pub struct CreateReplication(RequestBuilder<crate::model::CreateReplicationRequest>);
3922
3923 impl CreateReplication {
3924 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3925 Self(RequestBuilder::new(stub))
3926 }
3927
3928 pub fn with_request<V: Into<crate::model::CreateReplicationRequest>>(
3930 mut self,
3931 v: V,
3932 ) -> Self {
3933 self.0.request = v.into();
3934 self
3935 }
3936
3937 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3939 self.0.options = v.into();
3940 self
3941 }
3942
3943 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3950 (*self.0.stub)
3951 .create_replication(self.0.request, self.0.options)
3952 .await
3953 .map(crate::Response::into_body)
3954 }
3955
3956 pub fn poller(
3958 self,
3959 ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
3960 {
3961 type Operation = google_cloud_lro::internal::Operation<
3962 crate::model::Replication,
3963 crate::model::OperationMetadata,
3964 >;
3965 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3966 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3967 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3968 if let Some(ref mut details) = poller_options.tracing {
3969 details.method_name =
3970 "google_cloud_netapp_v1::client::NetApp::create_replication::until_done";
3971 }
3972
3973 let stub = self.0.stub.clone();
3974 let mut options = self.0.options.clone();
3975 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3976 let query = move |name| {
3977 let stub = stub.clone();
3978 let options = options.clone();
3979 async {
3980 let op = GetOperation::new(stub)
3981 .set_name(name)
3982 .with_options(options)
3983 .send()
3984 .await?;
3985 Ok(Operation::new(op))
3986 }
3987 };
3988
3989 let start = move || async {
3990 let op = self.send().await?;
3991 Ok(Operation::new(op))
3992 };
3993
3994 use google_cloud_lro::internal::PollerExt;
3995 {
3996 google_cloud_lro::internal::new_poller(
3997 polling_error_policy,
3998 polling_backoff_policy,
3999 start,
4000 query,
4001 )
4002 }
4003 .with_options(poller_options)
4004 }
4005
4006 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4010 self.0.request.parent = v.into();
4011 self
4012 }
4013
4014 pub fn set_replication<T>(mut self, v: T) -> Self
4018 where
4019 T: std::convert::Into<crate::model::Replication>,
4020 {
4021 self.0.request.replication = std::option::Option::Some(v.into());
4022 self
4023 }
4024
4025 pub fn set_or_clear_replication<T>(mut self, v: std::option::Option<T>) -> Self
4029 where
4030 T: std::convert::Into<crate::model::Replication>,
4031 {
4032 self.0.request.replication = v.map(|x| x.into());
4033 self
4034 }
4035
4036 pub fn set_replication_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4040 self.0.request.replication_id = v.into();
4041 self
4042 }
4043 }
4044
4045 #[doc(hidden)]
4046 impl crate::RequestBuilder for CreateReplication {
4047 fn request_options(&mut self) -> &mut crate::RequestOptions {
4048 &mut self.0.options
4049 }
4050 }
4051
4052 #[derive(Clone, Debug)]
4070 pub struct DeleteReplication(RequestBuilder<crate::model::DeleteReplicationRequest>);
4071
4072 impl DeleteReplication {
4073 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4074 Self(RequestBuilder::new(stub))
4075 }
4076
4077 pub fn with_request<V: Into<crate::model::DeleteReplicationRequest>>(
4079 mut self,
4080 v: V,
4081 ) -> Self {
4082 self.0.request = v.into();
4083 self
4084 }
4085
4086 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4088 self.0.options = v.into();
4089 self
4090 }
4091
4092 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4099 (*self.0.stub)
4100 .delete_replication(self.0.request, self.0.options)
4101 .await
4102 .map(crate::Response::into_body)
4103 }
4104
4105 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
4107 type Operation =
4108 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4109 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4110 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4111 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4112 if let Some(ref mut details) = poller_options.tracing {
4113 details.method_name =
4114 "google_cloud_netapp_v1::client::NetApp::delete_replication::until_done";
4115 }
4116
4117 let stub = self.0.stub.clone();
4118 let mut options = self.0.options.clone();
4119 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4120 let query = move |name| {
4121 let stub = stub.clone();
4122 let options = options.clone();
4123 async {
4124 let op = GetOperation::new(stub)
4125 .set_name(name)
4126 .with_options(options)
4127 .send()
4128 .await?;
4129 Ok(Operation::new(op))
4130 }
4131 };
4132
4133 let start = move || async {
4134 let op = self.send().await?;
4135 Ok(Operation::new(op))
4136 };
4137
4138 use google_cloud_lro::internal::PollerExt;
4139 {
4140 google_cloud_lro::internal::new_unit_response_poller(
4141 polling_error_policy,
4142 polling_backoff_policy,
4143 start,
4144 query,
4145 )
4146 }
4147 .with_options(poller_options)
4148 }
4149
4150 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4154 self.0.request.name = v.into();
4155 self
4156 }
4157 }
4158
4159 #[doc(hidden)]
4160 impl crate::RequestBuilder for DeleteReplication {
4161 fn request_options(&mut self) -> &mut crate::RequestOptions {
4162 &mut self.0.options
4163 }
4164 }
4165
4166 #[derive(Clone, Debug)]
4184 pub struct UpdateReplication(RequestBuilder<crate::model::UpdateReplicationRequest>);
4185
4186 impl UpdateReplication {
4187 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4188 Self(RequestBuilder::new(stub))
4189 }
4190
4191 pub fn with_request<V: Into<crate::model::UpdateReplicationRequest>>(
4193 mut self,
4194 v: V,
4195 ) -> Self {
4196 self.0.request = v.into();
4197 self
4198 }
4199
4200 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4202 self.0.options = v.into();
4203 self
4204 }
4205
4206 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4213 (*self.0.stub)
4214 .update_replication(self.0.request, self.0.options)
4215 .await
4216 .map(crate::Response::into_body)
4217 }
4218
4219 pub fn poller(
4221 self,
4222 ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4223 {
4224 type Operation = google_cloud_lro::internal::Operation<
4225 crate::model::Replication,
4226 crate::model::OperationMetadata,
4227 >;
4228 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4229 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4230 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4231 if let Some(ref mut details) = poller_options.tracing {
4232 details.method_name =
4233 "google_cloud_netapp_v1::client::NetApp::update_replication::until_done";
4234 }
4235
4236 let stub = self.0.stub.clone();
4237 let mut options = self.0.options.clone();
4238 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4239 let query = move |name| {
4240 let stub = stub.clone();
4241 let options = options.clone();
4242 async {
4243 let op = GetOperation::new(stub)
4244 .set_name(name)
4245 .with_options(options)
4246 .send()
4247 .await?;
4248 Ok(Operation::new(op))
4249 }
4250 };
4251
4252 let start = move || async {
4253 let op = self.send().await?;
4254 Ok(Operation::new(op))
4255 };
4256
4257 use google_cloud_lro::internal::PollerExt;
4258 {
4259 google_cloud_lro::internal::new_poller(
4260 polling_error_policy,
4261 polling_backoff_policy,
4262 start,
4263 query,
4264 )
4265 }
4266 .with_options(poller_options)
4267 }
4268
4269 pub fn set_update_mask<T>(mut self, v: T) -> Self
4273 where
4274 T: std::convert::Into<wkt::FieldMask>,
4275 {
4276 self.0.request.update_mask = std::option::Option::Some(v.into());
4277 self
4278 }
4279
4280 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4284 where
4285 T: std::convert::Into<wkt::FieldMask>,
4286 {
4287 self.0.request.update_mask = v.map(|x| x.into());
4288 self
4289 }
4290
4291 pub fn set_replication<T>(mut self, v: T) -> Self
4295 where
4296 T: std::convert::Into<crate::model::Replication>,
4297 {
4298 self.0.request.replication = std::option::Option::Some(v.into());
4299 self
4300 }
4301
4302 pub fn set_or_clear_replication<T>(mut self, v: std::option::Option<T>) -> Self
4306 where
4307 T: std::convert::Into<crate::model::Replication>,
4308 {
4309 self.0.request.replication = v.map(|x| x.into());
4310 self
4311 }
4312 }
4313
4314 #[doc(hidden)]
4315 impl crate::RequestBuilder for UpdateReplication {
4316 fn request_options(&mut self) -> &mut crate::RequestOptions {
4317 &mut self.0.options
4318 }
4319 }
4320
4321 #[derive(Clone, Debug)]
4339 pub struct StopReplication(RequestBuilder<crate::model::StopReplicationRequest>);
4340
4341 impl StopReplication {
4342 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4343 Self(RequestBuilder::new(stub))
4344 }
4345
4346 pub fn with_request<V: Into<crate::model::StopReplicationRequest>>(mut self, v: V) -> Self {
4348 self.0.request = v.into();
4349 self
4350 }
4351
4352 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4354 self.0.options = v.into();
4355 self
4356 }
4357
4358 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4365 (*self.0.stub)
4366 .stop_replication(self.0.request, self.0.options)
4367 .await
4368 .map(crate::Response::into_body)
4369 }
4370
4371 pub fn poller(
4373 self,
4374 ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4375 {
4376 type Operation = google_cloud_lro::internal::Operation<
4377 crate::model::Replication,
4378 crate::model::OperationMetadata,
4379 >;
4380 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4381 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4382 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4383 if let Some(ref mut details) = poller_options.tracing {
4384 details.method_name =
4385 "google_cloud_netapp_v1::client::NetApp::stop_replication::until_done";
4386 }
4387
4388 let stub = self.0.stub.clone();
4389 let mut options = self.0.options.clone();
4390 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4391 let query = move |name| {
4392 let stub = stub.clone();
4393 let options = options.clone();
4394 async {
4395 let op = GetOperation::new(stub)
4396 .set_name(name)
4397 .with_options(options)
4398 .send()
4399 .await?;
4400 Ok(Operation::new(op))
4401 }
4402 };
4403
4404 let start = move || async {
4405 let op = self.send().await?;
4406 Ok(Operation::new(op))
4407 };
4408
4409 use google_cloud_lro::internal::PollerExt;
4410 {
4411 google_cloud_lro::internal::new_poller(
4412 polling_error_policy,
4413 polling_backoff_policy,
4414 start,
4415 query,
4416 )
4417 }
4418 .with_options(poller_options)
4419 }
4420
4421 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4425 self.0.request.name = v.into();
4426 self
4427 }
4428
4429 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
4431 self.0.request.force = v.into();
4432 self
4433 }
4434 }
4435
4436 #[doc(hidden)]
4437 impl crate::RequestBuilder for StopReplication {
4438 fn request_options(&mut self) -> &mut crate::RequestOptions {
4439 &mut self.0.options
4440 }
4441 }
4442
4443 #[derive(Clone, Debug)]
4461 pub struct ResumeReplication(RequestBuilder<crate::model::ResumeReplicationRequest>);
4462
4463 impl ResumeReplication {
4464 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4465 Self(RequestBuilder::new(stub))
4466 }
4467
4468 pub fn with_request<V: Into<crate::model::ResumeReplicationRequest>>(
4470 mut self,
4471 v: V,
4472 ) -> Self {
4473 self.0.request = v.into();
4474 self
4475 }
4476
4477 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4479 self.0.options = v.into();
4480 self
4481 }
4482
4483 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4490 (*self.0.stub)
4491 .resume_replication(self.0.request, self.0.options)
4492 .await
4493 .map(crate::Response::into_body)
4494 }
4495
4496 pub fn poller(
4498 self,
4499 ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4500 {
4501 type Operation = google_cloud_lro::internal::Operation<
4502 crate::model::Replication,
4503 crate::model::OperationMetadata,
4504 >;
4505 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4506 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4507 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4508 if let Some(ref mut details) = poller_options.tracing {
4509 details.method_name =
4510 "google_cloud_netapp_v1::client::NetApp::resume_replication::until_done";
4511 }
4512
4513 let stub = self.0.stub.clone();
4514 let mut options = self.0.options.clone();
4515 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4516 let query = move |name| {
4517 let stub = stub.clone();
4518 let options = options.clone();
4519 async {
4520 let op = GetOperation::new(stub)
4521 .set_name(name)
4522 .with_options(options)
4523 .send()
4524 .await?;
4525 Ok(Operation::new(op))
4526 }
4527 };
4528
4529 let start = move || async {
4530 let op = self.send().await?;
4531 Ok(Operation::new(op))
4532 };
4533
4534 use google_cloud_lro::internal::PollerExt;
4535 {
4536 google_cloud_lro::internal::new_poller(
4537 polling_error_policy,
4538 polling_backoff_policy,
4539 start,
4540 query,
4541 )
4542 }
4543 .with_options(poller_options)
4544 }
4545
4546 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4550 self.0.request.name = v.into();
4551 self
4552 }
4553 }
4554
4555 #[doc(hidden)]
4556 impl crate::RequestBuilder for ResumeReplication {
4557 fn request_options(&mut self) -> &mut crate::RequestOptions {
4558 &mut self.0.options
4559 }
4560 }
4561
4562 #[derive(Clone, Debug)]
4580 pub struct ReverseReplicationDirection(
4581 RequestBuilder<crate::model::ReverseReplicationDirectionRequest>,
4582 );
4583
4584 impl ReverseReplicationDirection {
4585 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4586 Self(RequestBuilder::new(stub))
4587 }
4588
4589 pub fn with_request<V: Into<crate::model::ReverseReplicationDirectionRequest>>(
4591 mut self,
4592 v: V,
4593 ) -> Self {
4594 self.0.request = v.into();
4595 self
4596 }
4597
4598 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4600 self.0.options = v.into();
4601 self
4602 }
4603
4604 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4611 (*self.0.stub)
4612 .reverse_replication_direction(self.0.request, self.0.options)
4613 .await
4614 .map(crate::Response::into_body)
4615 }
4616
4617 pub fn poller(
4619 self,
4620 ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4621 {
4622 type Operation = google_cloud_lro::internal::Operation<
4623 crate::model::Replication,
4624 crate::model::OperationMetadata,
4625 >;
4626 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4627 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4628 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4629 if let Some(ref mut details) = poller_options.tracing {
4630 details.method_name = "google_cloud_netapp_v1::client::NetApp::reverse_replication_direction::until_done";
4631 }
4632
4633 let stub = self.0.stub.clone();
4634 let mut options = self.0.options.clone();
4635 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4636 let query = move |name| {
4637 let stub = stub.clone();
4638 let options = options.clone();
4639 async {
4640 let op = GetOperation::new(stub)
4641 .set_name(name)
4642 .with_options(options)
4643 .send()
4644 .await?;
4645 Ok(Operation::new(op))
4646 }
4647 };
4648
4649 let start = move || async {
4650 let op = self.send().await?;
4651 Ok(Operation::new(op))
4652 };
4653
4654 use google_cloud_lro::internal::PollerExt;
4655 {
4656 google_cloud_lro::internal::new_poller(
4657 polling_error_policy,
4658 polling_backoff_policy,
4659 start,
4660 query,
4661 )
4662 }
4663 .with_options(poller_options)
4664 }
4665
4666 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4670 self.0.request.name = v.into();
4671 self
4672 }
4673 }
4674
4675 #[doc(hidden)]
4676 impl crate::RequestBuilder for ReverseReplicationDirection {
4677 fn request_options(&mut self) -> &mut crate::RequestOptions {
4678 &mut self.0.options
4679 }
4680 }
4681
4682 #[derive(Clone, Debug)]
4700 pub struct EstablishPeering(RequestBuilder<crate::model::EstablishPeeringRequest>);
4701
4702 impl EstablishPeering {
4703 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4704 Self(RequestBuilder::new(stub))
4705 }
4706
4707 pub fn with_request<V: Into<crate::model::EstablishPeeringRequest>>(
4709 mut self,
4710 v: V,
4711 ) -> Self {
4712 self.0.request = v.into();
4713 self
4714 }
4715
4716 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4718 self.0.options = v.into();
4719 self
4720 }
4721
4722 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4729 (*self.0.stub)
4730 .establish_peering(self.0.request, self.0.options)
4731 .await
4732 .map(crate::Response::into_body)
4733 }
4734
4735 pub fn poller(
4737 self,
4738 ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4739 {
4740 type Operation = google_cloud_lro::internal::Operation<
4741 crate::model::Replication,
4742 crate::model::OperationMetadata,
4743 >;
4744 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4745 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4746 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4747 if let Some(ref mut details) = poller_options.tracing {
4748 details.method_name =
4749 "google_cloud_netapp_v1::client::NetApp::establish_peering::until_done";
4750 }
4751
4752 let stub = self.0.stub.clone();
4753 let mut options = self.0.options.clone();
4754 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4755 let query = move |name| {
4756 let stub = stub.clone();
4757 let options = options.clone();
4758 async {
4759 let op = GetOperation::new(stub)
4760 .set_name(name)
4761 .with_options(options)
4762 .send()
4763 .await?;
4764 Ok(Operation::new(op))
4765 }
4766 };
4767
4768 let start = move || async {
4769 let op = self.send().await?;
4770 Ok(Operation::new(op))
4771 };
4772
4773 use google_cloud_lro::internal::PollerExt;
4774 {
4775 google_cloud_lro::internal::new_poller(
4776 polling_error_policy,
4777 polling_backoff_policy,
4778 start,
4779 query,
4780 )
4781 }
4782 .with_options(poller_options)
4783 }
4784
4785 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4789 self.0.request.name = v.into();
4790 self
4791 }
4792
4793 pub fn set_peer_cluster_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4797 self.0.request.peer_cluster_name = v.into();
4798 self
4799 }
4800
4801 pub fn set_peer_svm_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4805 self.0.request.peer_svm_name = v.into();
4806 self
4807 }
4808
4809 pub fn set_peer_ip_addresses<T, V>(mut self, v: T) -> Self
4811 where
4812 T: std::iter::IntoIterator<Item = V>,
4813 V: std::convert::Into<std::string::String>,
4814 {
4815 use std::iter::Iterator;
4816 self.0.request.peer_ip_addresses = v.into_iter().map(|i| i.into()).collect();
4817 self
4818 }
4819
4820 pub fn set_peer_volume_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4824 self.0.request.peer_volume_name = v.into();
4825 self
4826 }
4827 }
4828
4829 #[doc(hidden)]
4830 impl crate::RequestBuilder for EstablishPeering {
4831 fn request_options(&mut self) -> &mut crate::RequestOptions {
4832 &mut self.0.options
4833 }
4834 }
4835
4836 #[derive(Clone, Debug)]
4854 pub struct SyncReplication(RequestBuilder<crate::model::SyncReplicationRequest>);
4855
4856 impl SyncReplication {
4857 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4858 Self(RequestBuilder::new(stub))
4859 }
4860
4861 pub fn with_request<V: Into<crate::model::SyncReplicationRequest>>(mut self, v: V) -> Self {
4863 self.0.request = v.into();
4864 self
4865 }
4866
4867 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4869 self.0.options = v.into();
4870 self
4871 }
4872
4873 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4880 (*self.0.stub)
4881 .sync_replication(self.0.request, self.0.options)
4882 .await
4883 .map(crate::Response::into_body)
4884 }
4885
4886 pub fn poller(
4888 self,
4889 ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4890 {
4891 type Operation = google_cloud_lro::internal::Operation<
4892 crate::model::Replication,
4893 crate::model::OperationMetadata,
4894 >;
4895 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4896 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4897 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4898 if let Some(ref mut details) = poller_options.tracing {
4899 details.method_name =
4900 "google_cloud_netapp_v1::client::NetApp::sync_replication::until_done";
4901 }
4902
4903 let stub = self.0.stub.clone();
4904 let mut options = self.0.options.clone();
4905 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4906 let query = move |name| {
4907 let stub = stub.clone();
4908 let options = options.clone();
4909 async {
4910 let op = GetOperation::new(stub)
4911 .set_name(name)
4912 .with_options(options)
4913 .send()
4914 .await?;
4915 Ok(Operation::new(op))
4916 }
4917 };
4918
4919 let start = move || async {
4920 let op = self.send().await?;
4921 Ok(Operation::new(op))
4922 };
4923
4924 use google_cloud_lro::internal::PollerExt;
4925 {
4926 google_cloud_lro::internal::new_poller(
4927 polling_error_policy,
4928 polling_backoff_policy,
4929 start,
4930 query,
4931 )
4932 }
4933 .with_options(poller_options)
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 crate::RequestBuilder for SyncReplication {
4947 fn request_options(&mut self) -> &mut crate::RequestOptions {
4948 &mut self.0.options
4949 }
4950 }
4951
4952 #[derive(Clone, Debug)]
4970 pub struct CreateBackupVault(RequestBuilder<crate::model::CreateBackupVaultRequest>);
4971
4972 impl CreateBackupVault {
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::CreateBackupVaultRequest>>(
4979 mut self,
4980 v: V,
4981 ) -> Self {
4982 self.0.request = v.into();
4983 self
4984 }
4985
4986 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4988 self.0.options = v.into();
4989 self
4990 }
4991
4992 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4999 (*self.0.stub)
5000 .create_backup_vault(self.0.request, self.0.options)
5001 .await
5002 .map(crate::Response::into_body)
5003 }
5004
5005 pub fn poller(
5007 self,
5008 ) -> impl google_cloud_lro::Poller<crate::model::BackupVault, crate::model::OperationMetadata>
5009 {
5010 type Operation = google_cloud_lro::internal::Operation<
5011 crate::model::BackupVault,
5012 crate::model::OperationMetadata,
5013 >;
5014 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5015 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5016 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5017 if let Some(ref mut details) = poller_options.tracing {
5018 details.method_name =
5019 "google_cloud_netapp_v1::client::NetApp::create_backup_vault::until_done";
5020 }
5021
5022 let stub = self.0.stub.clone();
5023 let mut options = self.0.options.clone();
5024 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5025 let query = move |name| {
5026 let stub = stub.clone();
5027 let options = options.clone();
5028 async {
5029 let op = GetOperation::new(stub)
5030 .set_name(name)
5031 .with_options(options)
5032 .send()
5033 .await?;
5034 Ok(Operation::new(op))
5035 }
5036 };
5037
5038 let start = move || async {
5039 let op = self.send().await?;
5040 Ok(Operation::new(op))
5041 };
5042
5043 use google_cloud_lro::internal::PollerExt;
5044 {
5045 google_cloud_lro::internal::new_poller(
5046 polling_error_policy,
5047 polling_backoff_policy,
5048 start,
5049 query,
5050 )
5051 }
5052 .with_options(poller_options)
5053 }
5054
5055 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5059 self.0.request.parent = v.into();
5060 self
5061 }
5062
5063 pub fn set_backup_vault_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5067 self.0.request.backup_vault_id = v.into();
5068 self
5069 }
5070
5071 pub fn set_backup_vault<T>(mut self, v: T) -> Self
5075 where
5076 T: std::convert::Into<crate::model::BackupVault>,
5077 {
5078 self.0.request.backup_vault = std::option::Option::Some(v.into());
5079 self
5080 }
5081
5082 pub fn set_or_clear_backup_vault<T>(mut self, v: std::option::Option<T>) -> Self
5086 where
5087 T: std::convert::Into<crate::model::BackupVault>,
5088 {
5089 self.0.request.backup_vault = v.map(|x| x.into());
5090 self
5091 }
5092 }
5093
5094 #[doc(hidden)]
5095 impl crate::RequestBuilder for CreateBackupVault {
5096 fn request_options(&mut self) -> &mut crate::RequestOptions {
5097 &mut self.0.options
5098 }
5099 }
5100
5101 #[derive(Clone, Debug)]
5118 pub struct GetBackupVault(RequestBuilder<crate::model::GetBackupVaultRequest>);
5119
5120 impl GetBackupVault {
5121 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5122 Self(RequestBuilder::new(stub))
5123 }
5124
5125 pub fn with_request<V: Into<crate::model::GetBackupVaultRequest>>(mut self, v: V) -> Self {
5127 self.0.request = v.into();
5128 self
5129 }
5130
5131 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5133 self.0.options = v.into();
5134 self
5135 }
5136
5137 pub async fn send(self) -> Result<crate::model::BackupVault> {
5139 (*self.0.stub)
5140 .get_backup_vault(self.0.request, self.0.options)
5141 .await
5142 .map(crate::Response::into_body)
5143 }
5144
5145 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5149 self.0.request.name = v.into();
5150 self
5151 }
5152 }
5153
5154 #[doc(hidden)]
5155 impl crate::RequestBuilder for GetBackupVault {
5156 fn request_options(&mut self) -> &mut crate::RequestOptions {
5157 &mut self.0.options
5158 }
5159 }
5160
5161 #[derive(Clone, Debug)]
5182 pub struct ListBackupVaults(RequestBuilder<crate::model::ListBackupVaultsRequest>);
5183
5184 impl ListBackupVaults {
5185 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5186 Self(RequestBuilder::new(stub))
5187 }
5188
5189 pub fn with_request<V: Into<crate::model::ListBackupVaultsRequest>>(
5191 mut self,
5192 v: V,
5193 ) -> Self {
5194 self.0.request = v.into();
5195 self
5196 }
5197
5198 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5200 self.0.options = v.into();
5201 self
5202 }
5203
5204 pub async fn send(self) -> Result<crate::model::ListBackupVaultsResponse> {
5206 (*self.0.stub)
5207 .list_backup_vaults(self.0.request, self.0.options)
5208 .await
5209 .map(crate::Response::into_body)
5210 }
5211
5212 pub fn by_page(
5214 self,
5215 ) -> impl google_cloud_gax::paginator::Paginator<
5216 crate::model::ListBackupVaultsResponse,
5217 crate::Error,
5218 > {
5219 use std::clone::Clone;
5220 let token = self.0.request.page_token.clone();
5221 let execute = move |token: String| {
5222 let mut builder = self.clone();
5223 builder.0.request = builder.0.request.set_page_token(token);
5224 builder.send()
5225 };
5226 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5227 }
5228
5229 pub fn by_item(
5231 self,
5232 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5233 crate::model::ListBackupVaultsResponse,
5234 crate::Error,
5235 > {
5236 use google_cloud_gax::paginator::Paginator;
5237 self.by_page().items()
5238 }
5239
5240 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5244 self.0.request.parent = v.into();
5245 self
5246 }
5247
5248 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5250 self.0.request.page_size = v.into();
5251 self
5252 }
5253
5254 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5256 self.0.request.page_token = v.into();
5257 self
5258 }
5259
5260 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5262 self.0.request.order_by = v.into();
5263 self
5264 }
5265
5266 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5268 self.0.request.filter = v.into();
5269 self
5270 }
5271 }
5272
5273 #[doc(hidden)]
5274 impl crate::RequestBuilder for ListBackupVaults {
5275 fn request_options(&mut self) -> &mut crate::RequestOptions {
5276 &mut self.0.options
5277 }
5278 }
5279
5280 #[derive(Clone, Debug)]
5298 pub struct UpdateBackupVault(RequestBuilder<crate::model::UpdateBackupVaultRequest>);
5299
5300 impl UpdateBackupVault {
5301 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5302 Self(RequestBuilder::new(stub))
5303 }
5304
5305 pub fn with_request<V: Into<crate::model::UpdateBackupVaultRequest>>(
5307 mut self,
5308 v: V,
5309 ) -> Self {
5310 self.0.request = v.into();
5311 self
5312 }
5313
5314 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5316 self.0.options = v.into();
5317 self
5318 }
5319
5320 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5327 (*self.0.stub)
5328 .update_backup_vault(self.0.request, self.0.options)
5329 .await
5330 .map(crate::Response::into_body)
5331 }
5332
5333 pub fn poller(
5335 self,
5336 ) -> impl google_cloud_lro::Poller<crate::model::BackupVault, crate::model::OperationMetadata>
5337 {
5338 type Operation = google_cloud_lro::internal::Operation<
5339 crate::model::BackupVault,
5340 crate::model::OperationMetadata,
5341 >;
5342 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5343 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5344 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5345 if let Some(ref mut details) = poller_options.tracing {
5346 details.method_name =
5347 "google_cloud_netapp_v1::client::NetApp::update_backup_vault::until_done";
5348 }
5349
5350 let stub = self.0.stub.clone();
5351 let mut options = self.0.options.clone();
5352 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5353 let query = move |name| {
5354 let stub = stub.clone();
5355 let options = options.clone();
5356 async {
5357 let op = GetOperation::new(stub)
5358 .set_name(name)
5359 .with_options(options)
5360 .send()
5361 .await?;
5362 Ok(Operation::new(op))
5363 }
5364 };
5365
5366 let start = move || async {
5367 let op = self.send().await?;
5368 Ok(Operation::new(op))
5369 };
5370
5371 use google_cloud_lro::internal::PollerExt;
5372 {
5373 google_cloud_lro::internal::new_poller(
5374 polling_error_policy,
5375 polling_backoff_policy,
5376 start,
5377 query,
5378 )
5379 }
5380 .with_options(poller_options)
5381 }
5382
5383 pub fn set_update_mask<T>(mut self, v: T) -> Self
5387 where
5388 T: std::convert::Into<wkt::FieldMask>,
5389 {
5390 self.0.request.update_mask = std::option::Option::Some(v.into());
5391 self
5392 }
5393
5394 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5398 where
5399 T: std::convert::Into<wkt::FieldMask>,
5400 {
5401 self.0.request.update_mask = v.map(|x| x.into());
5402 self
5403 }
5404
5405 pub fn set_backup_vault<T>(mut self, v: T) -> Self
5409 where
5410 T: std::convert::Into<crate::model::BackupVault>,
5411 {
5412 self.0.request.backup_vault = std::option::Option::Some(v.into());
5413 self
5414 }
5415
5416 pub fn set_or_clear_backup_vault<T>(mut self, v: std::option::Option<T>) -> Self
5420 where
5421 T: std::convert::Into<crate::model::BackupVault>,
5422 {
5423 self.0.request.backup_vault = v.map(|x| x.into());
5424 self
5425 }
5426 }
5427
5428 #[doc(hidden)]
5429 impl crate::RequestBuilder for UpdateBackupVault {
5430 fn request_options(&mut self) -> &mut crate::RequestOptions {
5431 &mut self.0.options
5432 }
5433 }
5434
5435 #[derive(Clone, Debug)]
5453 pub struct DeleteBackupVault(RequestBuilder<crate::model::DeleteBackupVaultRequest>);
5454
5455 impl DeleteBackupVault {
5456 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5457 Self(RequestBuilder::new(stub))
5458 }
5459
5460 pub fn with_request<V: Into<crate::model::DeleteBackupVaultRequest>>(
5462 mut self,
5463 v: V,
5464 ) -> Self {
5465 self.0.request = v.into();
5466 self
5467 }
5468
5469 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5471 self.0.options = v.into();
5472 self
5473 }
5474
5475 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5482 (*self.0.stub)
5483 .delete_backup_vault(self.0.request, self.0.options)
5484 .await
5485 .map(crate::Response::into_body)
5486 }
5487
5488 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5490 type Operation =
5491 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5492 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5493 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5494 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5495 if let Some(ref mut details) = poller_options.tracing {
5496 details.method_name =
5497 "google_cloud_netapp_v1::client::NetApp::delete_backup_vault::until_done";
5498 }
5499
5500 let stub = self.0.stub.clone();
5501 let mut options = self.0.options.clone();
5502 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5503 let query = move |name| {
5504 let stub = stub.clone();
5505 let options = options.clone();
5506 async {
5507 let op = GetOperation::new(stub)
5508 .set_name(name)
5509 .with_options(options)
5510 .send()
5511 .await?;
5512 Ok(Operation::new(op))
5513 }
5514 };
5515
5516 let start = move || async {
5517 let op = self.send().await?;
5518 Ok(Operation::new(op))
5519 };
5520
5521 use google_cloud_lro::internal::PollerExt;
5522 {
5523 google_cloud_lro::internal::new_unit_response_poller(
5524 polling_error_policy,
5525 polling_backoff_policy,
5526 start,
5527 query,
5528 )
5529 }
5530 .with_options(poller_options)
5531 }
5532
5533 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5537 self.0.request.name = v.into();
5538 self
5539 }
5540 }
5541
5542 #[doc(hidden)]
5543 impl crate::RequestBuilder for DeleteBackupVault {
5544 fn request_options(&mut self) -> &mut crate::RequestOptions {
5545 &mut self.0.options
5546 }
5547 }
5548
5549 #[derive(Clone, Debug)]
5567 pub struct CreateBackup(RequestBuilder<crate::model::CreateBackupRequest>);
5568
5569 impl CreateBackup {
5570 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5571 Self(RequestBuilder::new(stub))
5572 }
5573
5574 pub fn with_request<V: Into<crate::model::CreateBackupRequest>>(mut self, v: V) -> Self {
5576 self.0.request = v.into();
5577 self
5578 }
5579
5580 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5582 self.0.options = v.into();
5583 self
5584 }
5585
5586 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5593 (*self.0.stub)
5594 .create_backup(self.0.request, self.0.options)
5595 .await
5596 .map(crate::Response::into_body)
5597 }
5598
5599 pub fn poller(
5601 self,
5602 ) -> impl google_cloud_lro::Poller<crate::model::Backup, crate::model::OperationMetadata>
5603 {
5604 type Operation = google_cloud_lro::internal::Operation<
5605 crate::model::Backup,
5606 crate::model::OperationMetadata,
5607 >;
5608 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5609 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5610 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5611 if let Some(ref mut details) = poller_options.tracing {
5612 details.method_name =
5613 "google_cloud_netapp_v1::client::NetApp::create_backup::until_done";
5614 }
5615
5616 let stub = self.0.stub.clone();
5617 let mut options = self.0.options.clone();
5618 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5619 let query = move |name| {
5620 let stub = stub.clone();
5621 let options = options.clone();
5622 async {
5623 let op = GetOperation::new(stub)
5624 .set_name(name)
5625 .with_options(options)
5626 .send()
5627 .await?;
5628 Ok(Operation::new(op))
5629 }
5630 };
5631
5632 let start = move || async {
5633 let op = self.send().await?;
5634 Ok(Operation::new(op))
5635 };
5636
5637 use google_cloud_lro::internal::PollerExt;
5638 {
5639 google_cloud_lro::internal::new_poller(
5640 polling_error_policy,
5641 polling_backoff_policy,
5642 start,
5643 query,
5644 )
5645 }
5646 .with_options(poller_options)
5647 }
5648
5649 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5653 self.0.request.parent = v.into();
5654 self
5655 }
5656
5657 pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5661 self.0.request.backup_id = v.into();
5662 self
5663 }
5664
5665 pub fn set_backup<T>(mut self, v: T) -> Self
5669 where
5670 T: std::convert::Into<crate::model::Backup>,
5671 {
5672 self.0.request.backup = std::option::Option::Some(v.into());
5673 self
5674 }
5675
5676 pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5680 where
5681 T: std::convert::Into<crate::model::Backup>,
5682 {
5683 self.0.request.backup = v.map(|x| x.into());
5684 self
5685 }
5686 }
5687
5688 #[doc(hidden)]
5689 impl crate::RequestBuilder for CreateBackup {
5690 fn request_options(&mut self) -> &mut crate::RequestOptions {
5691 &mut self.0.options
5692 }
5693 }
5694
5695 #[derive(Clone, Debug)]
5712 pub struct GetBackup(RequestBuilder<crate::model::GetBackupRequest>);
5713
5714 impl GetBackup {
5715 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5716 Self(RequestBuilder::new(stub))
5717 }
5718
5719 pub fn with_request<V: Into<crate::model::GetBackupRequest>>(mut self, v: V) -> Self {
5721 self.0.request = v.into();
5722 self
5723 }
5724
5725 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5727 self.0.options = v.into();
5728 self
5729 }
5730
5731 pub async fn send(self) -> Result<crate::model::Backup> {
5733 (*self.0.stub)
5734 .get_backup(self.0.request, self.0.options)
5735 .await
5736 .map(crate::Response::into_body)
5737 }
5738
5739 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5743 self.0.request.name = v.into();
5744 self
5745 }
5746 }
5747
5748 #[doc(hidden)]
5749 impl crate::RequestBuilder for GetBackup {
5750 fn request_options(&mut self) -> &mut crate::RequestOptions {
5751 &mut self.0.options
5752 }
5753 }
5754
5755 #[derive(Clone, Debug)]
5776 pub struct ListBackups(RequestBuilder<crate::model::ListBackupsRequest>);
5777
5778 impl ListBackups {
5779 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5780 Self(RequestBuilder::new(stub))
5781 }
5782
5783 pub fn with_request<V: Into<crate::model::ListBackupsRequest>>(mut self, v: V) -> Self {
5785 self.0.request = v.into();
5786 self
5787 }
5788
5789 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5791 self.0.options = v.into();
5792 self
5793 }
5794
5795 pub async fn send(self) -> Result<crate::model::ListBackupsResponse> {
5797 (*self.0.stub)
5798 .list_backups(self.0.request, self.0.options)
5799 .await
5800 .map(crate::Response::into_body)
5801 }
5802
5803 pub fn by_page(
5805 self,
5806 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListBackupsResponse, crate::Error>
5807 {
5808 use std::clone::Clone;
5809 let token = self.0.request.page_token.clone();
5810 let execute = move |token: String| {
5811 let mut builder = self.clone();
5812 builder.0.request = builder.0.request.set_page_token(token);
5813 builder.send()
5814 };
5815 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5816 }
5817
5818 pub fn by_item(
5820 self,
5821 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5822 crate::model::ListBackupsResponse,
5823 crate::Error,
5824 > {
5825 use google_cloud_gax::paginator::Paginator;
5826 self.by_page().items()
5827 }
5828
5829 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5833 self.0.request.parent = v.into();
5834 self
5835 }
5836
5837 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5839 self.0.request.page_size = v.into();
5840 self
5841 }
5842
5843 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5845 self.0.request.page_token = v.into();
5846 self
5847 }
5848
5849 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5851 self.0.request.order_by = v.into();
5852 self
5853 }
5854
5855 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5857 self.0.request.filter = v.into();
5858 self
5859 }
5860 }
5861
5862 #[doc(hidden)]
5863 impl crate::RequestBuilder for ListBackups {
5864 fn request_options(&mut self) -> &mut crate::RequestOptions {
5865 &mut self.0.options
5866 }
5867 }
5868
5869 #[derive(Clone, Debug)]
5887 pub struct DeleteBackup(RequestBuilder<crate::model::DeleteBackupRequest>);
5888
5889 impl DeleteBackup {
5890 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5891 Self(RequestBuilder::new(stub))
5892 }
5893
5894 pub fn with_request<V: Into<crate::model::DeleteBackupRequest>>(mut self, v: V) -> Self {
5896 self.0.request = v.into();
5897 self
5898 }
5899
5900 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5902 self.0.options = v.into();
5903 self
5904 }
5905
5906 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5913 (*self.0.stub)
5914 .delete_backup(self.0.request, self.0.options)
5915 .await
5916 .map(crate::Response::into_body)
5917 }
5918
5919 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5921 type Operation =
5922 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5923 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5924 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5925 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5926 if let Some(ref mut details) = poller_options.tracing {
5927 details.method_name =
5928 "google_cloud_netapp_v1::client::NetApp::delete_backup::until_done";
5929 }
5930
5931 let stub = self.0.stub.clone();
5932 let mut options = self.0.options.clone();
5933 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5934 let query = move |name| {
5935 let stub = stub.clone();
5936 let options = options.clone();
5937 async {
5938 let op = GetOperation::new(stub)
5939 .set_name(name)
5940 .with_options(options)
5941 .send()
5942 .await?;
5943 Ok(Operation::new(op))
5944 }
5945 };
5946
5947 let start = move || async {
5948 let op = self.send().await?;
5949 Ok(Operation::new(op))
5950 };
5951
5952 use google_cloud_lro::internal::PollerExt;
5953 {
5954 google_cloud_lro::internal::new_unit_response_poller(
5955 polling_error_policy,
5956 polling_backoff_policy,
5957 start,
5958 query,
5959 )
5960 }
5961 .with_options(poller_options)
5962 }
5963
5964 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5968 self.0.request.name = v.into();
5969 self
5970 }
5971 }
5972
5973 #[doc(hidden)]
5974 impl crate::RequestBuilder for DeleteBackup {
5975 fn request_options(&mut self) -> &mut crate::RequestOptions {
5976 &mut self.0.options
5977 }
5978 }
5979
5980 #[derive(Clone, Debug)]
5998 pub struct UpdateBackup(RequestBuilder<crate::model::UpdateBackupRequest>);
5999
6000 impl UpdateBackup {
6001 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6002 Self(RequestBuilder::new(stub))
6003 }
6004
6005 pub fn with_request<V: Into<crate::model::UpdateBackupRequest>>(mut self, v: V) -> Self {
6007 self.0.request = v.into();
6008 self
6009 }
6010
6011 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6013 self.0.options = v.into();
6014 self
6015 }
6016
6017 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6024 (*self.0.stub)
6025 .update_backup(self.0.request, self.0.options)
6026 .await
6027 .map(crate::Response::into_body)
6028 }
6029
6030 pub fn poller(
6032 self,
6033 ) -> impl google_cloud_lro::Poller<crate::model::Backup, crate::model::OperationMetadata>
6034 {
6035 type Operation = google_cloud_lro::internal::Operation<
6036 crate::model::Backup,
6037 crate::model::OperationMetadata,
6038 >;
6039 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6040 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6041 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6042 if let Some(ref mut details) = poller_options.tracing {
6043 details.method_name =
6044 "google_cloud_netapp_v1::client::NetApp::update_backup::until_done";
6045 }
6046
6047 let stub = self.0.stub.clone();
6048 let mut options = self.0.options.clone();
6049 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6050 let query = move |name| {
6051 let stub = stub.clone();
6052 let options = options.clone();
6053 async {
6054 let op = GetOperation::new(stub)
6055 .set_name(name)
6056 .with_options(options)
6057 .send()
6058 .await?;
6059 Ok(Operation::new(op))
6060 }
6061 };
6062
6063 let start = move || async {
6064 let op = self.send().await?;
6065 Ok(Operation::new(op))
6066 };
6067
6068 use google_cloud_lro::internal::PollerExt;
6069 {
6070 google_cloud_lro::internal::new_poller(
6071 polling_error_policy,
6072 polling_backoff_policy,
6073 start,
6074 query,
6075 )
6076 }
6077 .with_options(poller_options)
6078 }
6079
6080 pub fn set_update_mask<T>(mut self, v: T) -> Self
6084 where
6085 T: std::convert::Into<wkt::FieldMask>,
6086 {
6087 self.0.request.update_mask = std::option::Option::Some(v.into());
6088 self
6089 }
6090
6091 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6095 where
6096 T: std::convert::Into<wkt::FieldMask>,
6097 {
6098 self.0.request.update_mask = v.map(|x| x.into());
6099 self
6100 }
6101
6102 pub fn set_backup<T>(mut self, v: T) -> Self
6106 where
6107 T: std::convert::Into<crate::model::Backup>,
6108 {
6109 self.0.request.backup = std::option::Option::Some(v.into());
6110 self
6111 }
6112
6113 pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
6117 where
6118 T: std::convert::Into<crate::model::Backup>,
6119 {
6120 self.0.request.backup = v.map(|x| x.into());
6121 self
6122 }
6123 }
6124
6125 #[doc(hidden)]
6126 impl crate::RequestBuilder for UpdateBackup {
6127 fn request_options(&mut self) -> &mut crate::RequestOptions {
6128 &mut self.0.options
6129 }
6130 }
6131
6132 #[derive(Clone, Debug)]
6150 pub struct CreateBackupPolicy(RequestBuilder<crate::model::CreateBackupPolicyRequest>);
6151
6152 impl CreateBackupPolicy {
6153 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6154 Self(RequestBuilder::new(stub))
6155 }
6156
6157 pub fn with_request<V: Into<crate::model::CreateBackupPolicyRequest>>(
6159 mut self,
6160 v: V,
6161 ) -> Self {
6162 self.0.request = v.into();
6163 self
6164 }
6165
6166 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6168 self.0.options = v.into();
6169 self
6170 }
6171
6172 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6179 (*self.0.stub)
6180 .create_backup_policy(self.0.request, self.0.options)
6181 .await
6182 .map(crate::Response::into_body)
6183 }
6184
6185 pub fn poller(
6187 self,
6188 ) -> impl google_cloud_lro::Poller<crate::model::BackupPolicy, crate::model::OperationMetadata>
6189 {
6190 type Operation = google_cloud_lro::internal::Operation<
6191 crate::model::BackupPolicy,
6192 crate::model::OperationMetadata,
6193 >;
6194 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6195 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6196 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6197 if let Some(ref mut details) = poller_options.tracing {
6198 details.method_name =
6199 "google_cloud_netapp_v1::client::NetApp::create_backup_policy::until_done";
6200 }
6201
6202 let stub = self.0.stub.clone();
6203 let mut options = self.0.options.clone();
6204 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6205 let query = move |name| {
6206 let stub = stub.clone();
6207 let options = options.clone();
6208 async {
6209 let op = GetOperation::new(stub)
6210 .set_name(name)
6211 .with_options(options)
6212 .send()
6213 .await?;
6214 Ok(Operation::new(op))
6215 }
6216 };
6217
6218 let start = move || async {
6219 let op = self.send().await?;
6220 Ok(Operation::new(op))
6221 };
6222
6223 use google_cloud_lro::internal::PollerExt;
6224 {
6225 google_cloud_lro::internal::new_poller(
6226 polling_error_policy,
6227 polling_backoff_policy,
6228 start,
6229 query,
6230 )
6231 }
6232 .with_options(poller_options)
6233 }
6234
6235 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6239 self.0.request.parent = v.into();
6240 self
6241 }
6242
6243 pub fn set_backup_policy<T>(mut self, v: T) -> Self
6247 where
6248 T: std::convert::Into<crate::model::BackupPolicy>,
6249 {
6250 self.0.request.backup_policy = std::option::Option::Some(v.into());
6251 self
6252 }
6253
6254 pub fn set_or_clear_backup_policy<T>(mut self, v: std::option::Option<T>) -> Self
6258 where
6259 T: std::convert::Into<crate::model::BackupPolicy>,
6260 {
6261 self.0.request.backup_policy = v.map(|x| x.into());
6262 self
6263 }
6264
6265 pub fn set_backup_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6269 self.0.request.backup_policy_id = v.into();
6270 self
6271 }
6272 }
6273
6274 #[doc(hidden)]
6275 impl crate::RequestBuilder for CreateBackupPolicy {
6276 fn request_options(&mut self) -> &mut crate::RequestOptions {
6277 &mut self.0.options
6278 }
6279 }
6280
6281 #[derive(Clone, Debug)]
6298 pub struct GetBackupPolicy(RequestBuilder<crate::model::GetBackupPolicyRequest>);
6299
6300 impl GetBackupPolicy {
6301 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6302 Self(RequestBuilder::new(stub))
6303 }
6304
6305 pub fn with_request<V: Into<crate::model::GetBackupPolicyRequest>>(mut self, v: V) -> Self {
6307 self.0.request = v.into();
6308 self
6309 }
6310
6311 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6313 self.0.options = v.into();
6314 self
6315 }
6316
6317 pub async fn send(self) -> Result<crate::model::BackupPolicy> {
6319 (*self.0.stub)
6320 .get_backup_policy(self.0.request, self.0.options)
6321 .await
6322 .map(crate::Response::into_body)
6323 }
6324
6325 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6329 self.0.request.name = v.into();
6330 self
6331 }
6332 }
6333
6334 #[doc(hidden)]
6335 impl crate::RequestBuilder for GetBackupPolicy {
6336 fn request_options(&mut self) -> &mut crate::RequestOptions {
6337 &mut self.0.options
6338 }
6339 }
6340
6341 #[derive(Clone, Debug)]
6362 pub struct ListBackupPolicies(RequestBuilder<crate::model::ListBackupPoliciesRequest>);
6363
6364 impl ListBackupPolicies {
6365 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6366 Self(RequestBuilder::new(stub))
6367 }
6368
6369 pub fn with_request<V: Into<crate::model::ListBackupPoliciesRequest>>(
6371 mut self,
6372 v: V,
6373 ) -> Self {
6374 self.0.request = v.into();
6375 self
6376 }
6377
6378 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6380 self.0.options = v.into();
6381 self
6382 }
6383
6384 pub async fn send(self) -> Result<crate::model::ListBackupPoliciesResponse> {
6386 (*self.0.stub)
6387 .list_backup_policies(self.0.request, self.0.options)
6388 .await
6389 .map(crate::Response::into_body)
6390 }
6391
6392 pub fn by_page(
6394 self,
6395 ) -> impl google_cloud_gax::paginator::Paginator<
6396 crate::model::ListBackupPoliciesResponse,
6397 crate::Error,
6398 > {
6399 use std::clone::Clone;
6400 let token = self.0.request.page_token.clone();
6401 let execute = move |token: String| {
6402 let mut builder = self.clone();
6403 builder.0.request = builder.0.request.set_page_token(token);
6404 builder.send()
6405 };
6406 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6407 }
6408
6409 pub fn by_item(
6411 self,
6412 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6413 crate::model::ListBackupPoliciesResponse,
6414 crate::Error,
6415 > {
6416 use google_cloud_gax::paginator::Paginator;
6417 self.by_page().items()
6418 }
6419
6420 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6424 self.0.request.parent = v.into();
6425 self
6426 }
6427
6428 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6430 self.0.request.page_size = v.into();
6431 self
6432 }
6433
6434 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6436 self.0.request.page_token = v.into();
6437 self
6438 }
6439
6440 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6442 self.0.request.filter = v.into();
6443 self
6444 }
6445
6446 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6448 self.0.request.order_by = v.into();
6449 self
6450 }
6451 }
6452
6453 #[doc(hidden)]
6454 impl crate::RequestBuilder for ListBackupPolicies {
6455 fn request_options(&mut self) -> &mut crate::RequestOptions {
6456 &mut self.0.options
6457 }
6458 }
6459
6460 #[derive(Clone, Debug)]
6478 pub struct UpdateBackupPolicy(RequestBuilder<crate::model::UpdateBackupPolicyRequest>);
6479
6480 impl UpdateBackupPolicy {
6481 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6482 Self(RequestBuilder::new(stub))
6483 }
6484
6485 pub fn with_request<V: Into<crate::model::UpdateBackupPolicyRequest>>(
6487 mut self,
6488 v: V,
6489 ) -> Self {
6490 self.0.request = v.into();
6491 self
6492 }
6493
6494 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6496 self.0.options = v.into();
6497 self
6498 }
6499
6500 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6507 (*self.0.stub)
6508 .update_backup_policy(self.0.request, self.0.options)
6509 .await
6510 .map(crate::Response::into_body)
6511 }
6512
6513 pub fn poller(
6515 self,
6516 ) -> impl google_cloud_lro::Poller<crate::model::BackupPolicy, crate::model::OperationMetadata>
6517 {
6518 type Operation = google_cloud_lro::internal::Operation<
6519 crate::model::BackupPolicy,
6520 crate::model::OperationMetadata,
6521 >;
6522 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6523 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6524 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6525 if let Some(ref mut details) = poller_options.tracing {
6526 details.method_name =
6527 "google_cloud_netapp_v1::client::NetApp::update_backup_policy::until_done";
6528 }
6529
6530 let stub = self.0.stub.clone();
6531 let mut options = self.0.options.clone();
6532 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6533 let query = move |name| {
6534 let stub = stub.clone();
6535 let options = options.clone();
6536 async {
6537 let op = GetOperation::new(stub)
6538 .set_name(name)
6539 .with_options(options)
6540 .send()
6541 .await?;
6542 Ok(Operation::new(op))
6543 }
6544 };
6545
6546 let start = move || async {
6547 let op = self.send().await?;
6548 Ok(Operation::new(op))
6549 };
6550
6551 use google_cloud_lro::internal::PollerExt;
6552 {
6553 google_cloud_lro::internal::new_poller(
6554 polling_error_policy,
6555 polling_backoff_policy,
6556 start,
6557 query,
6558 )
6559 }
6560 .with_options(poller_options)
6561 }
6562
6563 pub fn set_update_mask<T>(mut self, v: T) -> Self
6567 where
6568 T: std::convert::Into<wkt::FieldMask>,
6569 {
6570 self.0.request.update_mask = std::option::Option::Some(v.into());
6571 self
6572 }
6573
6574 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6578 where
6579 T: std::convert::Into<wkt::FieldMask>,
6580 {
6581 self.0.request.update_mask = v.map(|x| x.into());
6582 self
6583 }
6584
6585 pub fn set_backup_policy<T>(mut self, v: T) -> Self
6589 where
6590 T: std::convert::Into<crate::model::BackupPolicy>,
6591 {
6592 self.0.request.backup_policy = std::option::Option::Some(v.into());
6593 self
6594 }
6595
6596 pub fn set_or_clear_backup_policy<T>(mut self, v: std::option::Option<T>) -> Self
6600 where
6601 T: std::convert::Into<crate::model::BackupPolicy>,
6602 {
6603 self.0.request.backup_policy = v.map(|x| x.into());
6604 self
6605 }
6606 }
6607
6608 #[doc(hidden)]
6609 impl crate::RequestBuilder for UpdateBackupPolicy {
6610 fn request_options(&mut self) -> &mut crate::RequestOptions {
6611 &mut self.0.options
6612 }
6613 }
6614
6615 #[derive(Clone, Debug)]
6633 pub struct DeleteBackupPolicy(RequestBuilder<crate::model::DeleteBackupPolicyRequest>);
6634
6635 impl DeleteBackupPolicy {
6636 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6637 Self(RequestBuilder::new(stub))
6638 }
6639
6640 pub fn with_request<V: Into<crate::model::DeleteBackupPolicyRequest>>(
6642 mut self,
6643 v: V,
6644 ) -> Self {
6645 self.0.request = v.into();
6646 self
6647 }
6648
6649 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6651 self.0.options = v.into();
6652 self
6653 }
6654
6655 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6662 (*self.0.stub)
6663 .delete_backup_policy(self.0.request, self.0.options)
6664 .await
6665 .map(crate::Response::into_body)
6666 }
6667
6668 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6670 type Operation =
6671 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6672 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6673 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6674 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6675 if let Some(ref mut details) = poller_options.tracing {
6676 details.method_name =
6677 "google_cloud_netapp_v1::client::NetApp::delete_backup_policy::until_done";
6678 }
6679
6680 let stub = self.0.stub.clone();
6681 let mut options = self.0.options.clone();
6682 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6683 let query = move |name| {
6684 let stub = stub.clone();
6685 let options = options.clone();
6686 async {
6687 let op = GetOperation::new(stub)
6688 .set_name(name)
6689 .with_options(options)
6690 .send()
6691 .await?;
6692 Ok(Operation::new(op))
6693 }
6694 };
6695
6696 let start = move || async {
6697 let op = self.send().await?;
6698 Ok(Operation::new(op))
6699 };
6700
6701 use google_cloud_lro::internal::PollerExt;
6702 {
6703 google_cloud_lro::internal::new_unit_response_poller(
6704 polling_error_policy,
6705 polling_backoff_policy,
6706 start,
6707 query,
6708 )
6709 }
6710 .with_options(poller_options)
6711 }
6712
6713 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6717 self.0.request.name = v.into();
6718 self
6719 }
6720 }
6721
6722 #[doc(hidden)]
6723 impl crate::RequestBuilder for DeleteBackupPolicy {
6724 fn request_options(&mut self) -> &mut crate::RequestOptions {
6725 &mut self.0.options
6726 }
6727 }
6728
6729 #[derive(Clone, Debug)]
6750 pub struct ListQuotaRules(RequestBuilder<crate::model::ListQuotaRulesRequest>);
6751
6752 impl ListQuotaRules {
6753 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6754 Self(RequestBuilder::new(stub))
6755 }
6756
6757 pub fn with_request<V: Into<crate::model::ListQuotaRulesRequest>>(mut self, v: V) -> Self {
6759 self.0.request = v.into();
6760 self
6761 }
6762
6763 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6765 self.0.options = v.into();
6766 self
6767 }
6768
6769 pub async fn send(self) -> Result<crate::model::ListQuotaRulesResponse> {
6771 (*self.0.stub)
6772 .list_quota_rules(self.0.request, self.0.options)
6773 .await
6774 .map(crate::Response::into_body)
6775 }
6776
6777 pub fn by_page(
6779 self,
6780 ) -> impl google_cloud_gax::paginator::Paginator<
6781 crate::model::ListQuotaRulesResponse,
6782 crate::Error,
6783 > {
6784 use std::clone::Clone;
6785 let token = self.0.request.page_token.clone();
6786 let execute = move |token: String| {
6787 let mut builder = self.clone();
6788 builder.0.request = builder.0.request.set_page_token(token);
6789 builder.send()
6790 };
6791 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6792 }
6793
6794 pub fn by_item(
6796 self,
6797 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6798 crate::model::ListQuotaRulesResponse,
6799 crate::Error,
6800 > {
6801 use google_cloud_gax::paginator::Paginator;
6802 self.by_page().items()
6803 }
6804
6805 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6809 self.0.request.parent = v.into();
6810 self
6811 }
6812
6813 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6815 self.0.request.page_size = v.into();
6816 self
6817 }
6818
6819 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6821 self.0.request.page_token = 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_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6833 self.0.request.order_by = v.into();
6834 self
6835 }
6836 }
6837
6838 #[doc(hidden)]
6839 impl crate::RequestBuilder for ListQuotaRules {
6840 fn request_options(&mut self) -> &mut crate::RequestOptions {
6841 &mut self.0.options
6842 }
6843 }
6844
6845 #[derive(Clone, Debug)]
6862 pub struct GetQuotaRule(RequestBuilder<crate::model::GetQuotaRuleRequest>);
6863
6864 impl GetQuotaRule {
6865 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6866 Self(RequestBuilder::new(stub))
6867 }
6868
6869 pub fn with_request<V: Into<crate::model::GetQuotaRuleRequest>>(mut self, v: V) -> Self {
6871 self.0.request = v.into();
6872 self
6873 }
6874
6875 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6877 self.0.options = v.into();
6878 self
6879 }
6880
6881 pub async fn send(self) -> Result<crate::model::QuotaRule> {
6883 (*self.0.stub)
6884 .get_quota_rule(self.0.request, self.0.options)
6885 .await
6886 .map(crate::Response::into_body)
6887 }
6888
6889 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6893 self.0.request.name = v.into();
6894 self
6895 }
6896 }
6897
6898 #[doc(hidden)]
6899 impl crate::RequestBuilder for GetQuotaRule {
6900 fn request_options(&mut self) -> &mut crate::RequestOptions {
6901 &mut self.0.options
6902 }
6903 }
6904
6905 #[derive(Clone, Debug)]
6923 pub struct CreateQuotaRule(RequestBuilder<crate::model::CreateQuotaRuleRequest>);
6924
6925 impl CreateQuotaRule {
6926 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6927 Self(RequestBuilder::new(stub))
6928 }
6929
6930 pub fn with_request<V: Into<crate::model::CreateQuotaRuleRequest>>(mut self, v: V) -> Self {
6932 self.0.request = v.into();
6933 self
6934 }
6935
6936 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6938 self.0.options = v.into();
6939 self
6940 }
6941
6942 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6949 (*self.0.stub)
6950 .create_quota_rule(self.0.request, self.0.options)
6951 .await
6952 .map(crate::Response::into_body)
6953 }
6954
6955 pub fn poller(
6957 self,
6958 ) -> impl google_cloud_lro::Poller<crate::model::QuotaRule, crate::model::OperationMetadata>
6959 {
6960 type Operation = google_cloud_lro::internal::Operation<
6961 crate::model::QuotaRule,
6962 crate::model::OperationMetadata,
6963 >;
6964 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6965 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6966 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6967 if let Some(ref mut details) = poller_options.tracing {
6968 details.method_name =
6969 "google_cloud_netapp_v1::client::NetApp::create_quota_rule::until_done";
6970 }
6971
6972 let stub = self.0.stub.clone();
6973 let mut options = self.0.options.clone();
6974 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6975 let query = move |name| {
6976 let stub = stub.clone();
6977 let options = options.clone();
6978 async {
6979 let op = GetOperation::new(stub)
6980 .set_name(name)
6981 .with_options(options)
6982 .send()
6983 .await?;
6984 Ok(Operation::new(op))
6985 }
6986 };
6987
6988 let start = move || async {
6989 let op = self.send().await?;
6990 Ok(Operation::new(op))
6991 };
6992
6993 use google_cloud_lro::internal::PollerExt;
6994 {
6995 google_cloud_lro::internal::new_poller(
6996 polling_error_policy,
6997 polling_backoff_policy,
6998 start,
6999 query,
7000 )
7001 }
7002 .with_options(poller_options)
7003 }
7004
7005 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7009 self.0.request.parent = v.into();
7010 self
7011 }
7012
7013 pub fn set_quota_rule<T>(mut self, v: T) -> Self
7017 where
7018 T: std::convert::Into<crate::model::QuotaRule>,
7019 {
7020 self.0.request.quota_rule = std::option::Option::Some(v.into());
7021 self
7022 }
7023
7024 pub fn set_or_clear_quota_rule<T>(mut self, v: std::option::Option<T>) -> Self
7028 where
7029 T: std::convert::Into<crate::model::QuotaRule>,
7030 {
7031 self.0.request.quota_rule = v.map(|x| x.into());
7032 self
7033 }
7034
7035 pub fn set_quota_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7039 self.0.request.quota_rule_id = v.into();
7040 self
7041 }
7042 }
7043
7044 #[doc(hidden)]
7045 impl crate::RequestBuilder for CreateQuotaRule {
7046 fn request_options(&mut self) -> &mut crate::RequestOptions {
7047 &mut self.0.options
7048 }
7049 }
7050
7051 #[derive(Clone, Debug)]
7069 pub struct UpdateQuotaRule(RequestBuilder<crate::model::UpdateQuotaRuleRequest>);
7070
7071 impl UpdateQuotaRule {
7072 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7073 Self(RequestBuilder::new(stub))
7074 }
7075
7076 pub fn with_request<V: Into<crate::model::UpdateQuotaRuleRequest>>(mut self, v: V) -> Self {
7078 self.0.request = v.into();
7079 self
7080 }
7081
7082 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7084 self.0.options = v.into();
7085 self
7086 }
7087
7088 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7095 (*self.0.stub)
7096 .update_quota_rule(self.0.request, self.0.options)
7097 .await
7098 .map(crate::Response::into_body)
7099 }
7100
7101 pub fn poller(
7103 self,
7104 ) -> impl google_cloud_lro::Poller<crate::model::QuotaRule, crate::model::OperationMetadata>
7105 {
7106 type Operation = google_cloud_lro::internal::Operation<
7107 crate::model::QuotaRule,
7108 crate::model::OperationMetadata,
7109 >;
7110 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7111 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7112 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7113 if let Some(ref mut details) = poller_options.tracing {
7114 details.method_name =
7115 "google_cloud_netapp_v1::client::NetApp::update_quota_rule::until_done";
7116 }
7117
7118 let stub = self.0.stub.clone();
7119 let mut options = self.0.options.clone();
7120 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7121 let query = move |name| {
7122 let stub = stub.clone();
7123 let options = options.clone();
7124 async {
7125 let op = GetOperation::new(stub)
7126 .set_name(name)
7127 .with_options(options)
7128 .send()
7129 .await?;
7130 Ok(Operation::new(op))
7131 }
7132 };
7133
7134 let start = move || async {
7135 let op = self.send().await?;
7136 Ok(Operation::new(op))
7137 };
7138
7139 use google_cloud_lro::internal::PollerExt;
7140 {
7141 google_cloud_lro::internal::new_poller(
7142 polling_error_policy,
7143 polling_backoff_policy,
7144 start,
7145 query,
7146 )
7147 }
7148 .with_options(poller_options)
7149 }
7150
7151 pub fn set_update_mask<T>(mut self, v: T) -> Self
7153 where
7154 T: std::convert::Into<wkt::FieldMask>,
7155 {
7156 self.0.request.update_mask = std::option::Option::Some(v.into());
7157 self
7158 }
7159
7160 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7162 where
7163 T: std::convert::Into<wkt::FieldMask>,
7164 {
7165 self.0.request.update_mask = v.map(|x| x.into());
7166 self
7167 }
7168
7169 pub fn set_quota_rule<T>(mut self, v: T) -> Self
7173 where
7174 T: std::convert::Into<crate::model::QuotaRule>,
7175 {
7176 self.0.request.quota_rule = std::option::Option::Some(v.into());
7177 self
7178 }
7179
7180 pub fn set_or_clear_quota_rule<T>(mut self, v: std::option::Option<T>) -> Self
7184 where
7185 T: std::convert::Into<crate::model::QuotaRule>,
7186 {
7187 self.0.request.quota_rule = v.map(|x| x.into());
7188 self
7189 }
7190 }
7191
7192 #[doc(hidden)]
7193 impl crate::RequestBuilder for UpdateQuotaRule {
7194 fn request_options(&mut self) -> &mut crate::RequestOptions {
7195 &mut self.0.options
7196 }
7197 }
7198
7199 #[derive(Clone, Debug)]
7217 pub struct DeleteQuotaRule(RequestBuilder<crate::model::DeleteQuotaRuleRequest>);
7218
7219 impl DeleteQuotaRule {
7220 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7221 Self(RequestBuilder::new(stub))
7222 }
7223
7224 pub fn with_request<V: Into<crate::model::DeleteQuotaRuleRequest>>(mut self, v: V) -> Self {
7226 self.0.request = v.into();
7227 self
7228 }
7229
7230 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7232 self.0.options = v.into();
7233 self
7234 }
7235
7236 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7243 (*self.0.stub)
7244 .delete_quota_rule(self.0.request, self.0.options)
7245 .await
7246 .map(crate::Response::into_body)
7247 }
7248
7249 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7251 type Operation =
7252 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7253 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7254 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7255 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7256 if let Some(ref mut details) = poller_options.tracing {
7257 details.method_name =
7258 "google_cloud_netapp_v1::client::NetApp::delete_quota_rule::until_done";
7259 }
7260
7261 let stub = self.0.stub.clone();
7262 let mut options = self.0.options.clone();
7263 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7264 let query = move |name| {
7265 let stub = stub.clone();
7266 let options = options.clone();
7267 async {
7268 let op = GetOperation::new(stub)
7269 .set_name(name)
7270 .with_options(options)
7271 .send()
7272 .await?;
7273 Ok(Operation::new(op))
7274 }
7275 };
7276
7277 let start = move || async {
7278 let op = self.send().await?;
7279 Ok(Operation::new(op))
7280 };
7281
7282 use google_cloud_lro::internal::PollerExt;
7283 {
7284 google_cloud_lro::internal::new_unit_response_poller(
7285 polling_error_policy,
7286 polling_backoff_policy,
7287 start,
7288 query,
7289 )
7290 }
7291 .with_options(poller_options)
7292 }
7293
7294 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7298 self.0.request.name = v.into();
7299 self
7300 }
7301 }
7302
7303 #[doc(hidden)]
7304 impl crate::RequestBuilder for DeleteQuotaRule {
7305 fn request_options(&mut self) -> &mut crate::RequestOptions {
7306 &mut self.0.options
7307 }
7308 }
7309
7310 #[derive(Clone, Debug)]
7328 pub struct RestoreBackupFiles(RequestBuilder<crate::model::RestoreBackupFilesRequest>);
7329
7330 impl RestoreBackupFiles {
7331 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7332 Self(RequestBuilder::new(stub))
7333 }
7334
7335 pub fn with_request<V: Into<crate::model::RestoreBackupFilesRequest>>(
7337 mut self,
7338 v: V,
7339 ) -> Self {
7340 self.0.request = v.into();
7341 self
7342 }
7343
7344 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7346 self.0.options = v.into();
7347 self
7348 }
7349
7350 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7357 (*self.0.stub)
7358 .restore_backup_files(self.0.request, self.0.options)
7359 .await
7360 .map(crate::Response::into_body)
7361 }
7362
7363 pub fn poller(
7365 self,
7366 ) -> impl google_cloud_lro::Poller<
7367 crate::model::RestoreBackupFilesResponse,
7368 crate::model::OperationMetadata,
7369 > {
7370 type Operation = google_cloud_lro::internal::Operation<
7371 crate::model::RestoreBackupFilesResponse,
7372 crate::model::OperationMetadata,
7373 >;
7374 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7375 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7376 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7377 if let Some(ref mut details) = poller_options.tracing {
7378 details.method_name =
7379 "google_cloud_netapp_v1::client::NetApp::restore_backup_files::until_done";
7380 }
7381
7382 let stub = self.0.stub.clone();
7383 let mut options = self.0.options.clone();
7384 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7385 let query = move |name| {
7386 let stub = stub.clone();
7387 let options = options.clone();
7388 async {
7389 let op = GetOperation::new(stub)
7390 .set_name(name)
7391 .with_options(options)
7392 .send()
7393 .await?;
7394 Ok(Operation::new(op))
7395 }
7396 };
7397
7398 let start = move || async {
7399 let op = self.send().await?;
7400 Ok(Operation::new(op))
7401 };
7402
7403 use google_cloud_lro::internal::PollerExt;
7404 {
7405 google_cloud_lro::internal::new_poller(
7406 polling_error_policy,
7407 polling_backoff_policy,
7408 start,
7409 query,
7410 )
7411 }
7412 .with_options(poller_options)
7413 }
7414
7415 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7419 self.0.request.name = v.into();
7420 self
7421 }
7422
7423 pub fn set_backup<T: Into<std::string::String>>(mut self, v: T) -> Self {
7427 self.0.request.backup = v.into();
7428 self
7429 }
7430
7431 pub fn set_file_list<T, V>(mut self, v: T) -> Self
7435 where
7436 T: std::iter::IntoIterator<Item = V>,
7437 V: std::convert::Into<std::string::String>,
7438 {
7439 use std::iter::Iterator;
7440 self.0.request.file_list = v.into_iter().map(|i| i.into()).collect();
7441 self
7442 }
7443
7444 pub fn set_restore_destination_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
7446 self.0.request.restore_destination_path = v.into();
7447 self
7448 }
7449 }
7450
7451 #[doc(hidden)]
7452 impl crate::RequestBuilder for RestoreBackupFiles {
7453 fn request_options(&mut self) -> &mut crate::RequestOptions {
7454 &mut self.0.options
7455 }
7456 }
7457
7458 #[derive(Clone, Debug)]
7479 pub struct ListHostGroups(RequestBuilder<crate::model::ListHostGroupsRequest>);
7480
7481 impl ListHostGroups {
7482 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7483 Self(RequestBuilder::new(stub))
7484 }
7485
7486 pub fn with_request<V: Into<crate::model::ListHostGroupsRequest>>(mut self, v: V) -> Self {
7488 self.0.request = v.into();
7489 self
7490 }
7491
7492 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7494 self.0.options = v.into();
7495 self
7496 }
7497
7498 pub async fn send(self) -> Result<crate::model::ListHostGroupsResponse> {
7500 (*self.0.stub)
7501 .list_host_groups(self.0.request, self.0.options)
7502 .await
7503 .map(crate::Response::into_body)
7504 }
7505
7506 pub fn by_page(
7508 self,
7509 ) -> impl google_cloud_gax::paginator::Paginator<
7510 crate::model::ListHostGroupsResponse,
7511 crate::Error,
7512 > {
7513 use std::clone::Clone;
7514 let token = self.0.request.page_token.clone();
7515 let execute = move |token: String| {
7516 let mut builder = self.clone();
7517 builder.0.request = builder.0.request.set_page_token(token);
7518 builder.send()
7519 };
7520 google_cloud_gax::paginator::internal::new_paginator(token, execute)
7521 }
7522
7523 pub fn by_item(
7525 self,
7526 ) -> impl google_cloud_gax::paginator::ItemPaginator<
7527 crate::model::ListHostGroupsResponse,
7528 crate::Error,
7529 > {
7530 use google_cloud_gax::paginator::Paginator;
7531 self.by_page().items()
7532 }
7533
7534 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7538 self.0.request.parent = v.into();
7539 self
7540 }
7541
7542 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7544 self.0.request.page_size = v.into();
7545 self
7546 }
7547
7548 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7550 self.0.request.page_token = v.into();
7551 self
7552 }
7553
7554 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7556 self.0.request.filter = v.into();
7557 self
7558 }
7559
7560 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7562 self.0.request.order_by = v.into();
7563 self
7564 }
7565 }
7566
7567 #[doc(hidden)]
7568 impl crate::RequestBuilder for ListHostGroups {
7569 fn request_options(&mut self) -> &mut crate::RequestOptions {
7570 &mut self.0.options
7571 }
7572 }
7573
7574 #[derive(Clone, Debug)]
7591 pub struct GetHostGroup(RequestBuilder<crate::model::GetHostGroupRequest>);
7592
7593 impl GetHostGroup {
7594 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7595 Self(RequestBuilder::new(stub))
7596 }
7597
7598 pub fn with_request<V: Into<crate::model::GetHostGroupRequest>>(mut self, v: V) -> Self {
7600 self.0.request = v.into();
7601 self
7602 }
7603
7604 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7606 self.0.options = v.into();
7607 self
7608 }
7609
7610 pub async fn send(self) -> Result<crate::model::HostGroup> {
7612 (*self.0.stub)
7613 .get_host_group(self.0.request, self.0.options)
7614 .await
7615 .map(crate::Response::into_body)
7616 }
7617
7618 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7622 self.0.request.name = v.into();
7623 self
7624 }
7625 }
7626
7627 #[doc(hidden)]
7628 impl crate::RequestBuilder for GetHostGroup {
7629 fn request_options(&mut self) -> &mut crate::RequestOptions {
7630 &mut self.0.options
7631 }
7632 }
7633
7634 #[derive(Clone, Debug)]
7652 pub struct CreateHostGroup(RequestBuilder<crate::model::CreateHostGroupRequest>);
7653
7654 impl CreateHostGroup {
7655 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7656 Self(RequestBuilder::new(stub))
7657 }
7658
7659 pub fn with_request<V: Into<crate::model::CreateHostGroupRequest>>(mut self, v: V) -> Self {
7661 self.0.request = v.into();
7662 self
7663 }
7664
7665 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7667 self.0.options = v.into();
7668 self
7669 }
7670
7671 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7678 (*self.0.stub)
7679 .create_host_group(self.0.request, self.0.options)
7680 .await
7681 .map(crate::Response::into_body)
7682 }
7683
7684 pub fn poller(
7686 self,
7687 ) -> impl google_cloud_lro::Poller<crate::model::HostGroup, crate::model::OperationMetadata>
7688 {
7689 type Operation = google_cloud_lro::internal::Operation<
7690 crate::model::HostGroup,
7691 crate::model::OperationMetadata,
7692 >;
7693 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7694 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7695 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7696 if let Some(ref mut details) = poller_options.tracing {
7697 details.method_name =
7698 "google_cloud_netapp_v1::client::NetApp::create_host_group::until_done";
7699 }
7700
7701 let stub = self.0.stub.clone();
7702 let mut options = self.0.options.clone();
7703 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7704 let query = move |name| {
7705 let stub = stub.clone();
7706 let options = options.clone();
7707 async {
7708 let op = GetOperation::new(stub)
7709 .set_name(name)
7710 .with_options(options)
7711 .send()
7712 .await?;
7713 Ok(Operation::new(op))
7714 }
7715 };
7716
7717 let start = move || async {
7718 let op = self.send().await?;
7719 Ok(Operation::new(op))
7720 };
7721
7722 use google_cloud_lro::internal::PollerExt;
7723 {
7724 google_cloud_lro::internal::new_poller(
7725 polling_error_policy,
7726 polling_backoff_policy,
7727 start,
7728 query,
7729 )
7730 }
7731 .with_options(poller_options)
7732 }
7733
7734 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7738 self.0.request.parent = v.into();
7739 self
7740 }
7741
7742 pub fn set_host_group<T>(mut self, v: T) -> Self
7746 where
7747 T: std::convert::Into<crate::model::HostGroup>,
7748 {
7749 self.0.request.host_group = std::option::Option::Some(v.into());
7750 self
7751 }
7752
7753 pub fn set_or_clear_host_group<T>(mut self, v: std::option::Option<T>) -> Self
7757 where
7758 T: std::convert::Into<crate::model::HostGroup>,
7759 {
7760 self.0.request.host_group = v.map(|x| x.into());
7761 self
7762 }
7763
7764 pub fn set_host_group_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7768 self.0.request.host_group_id = v.into();
7769 self
7770 }
7771 }
7772
7773 #[doc(hidden)]
7774 impl crate::RequestBuilder for CreateHostGroup {
7775 fn request_options(&mut self) -> &mut crate::RequestOptions {
7776 &mut self.0.options
7777 }
7778 }
7779
7780 #[derive(Clone, Debug)]
7798 pub struct UpdateHostGroup(RequestBuilder<crate::model::UpdateHostGroupRequest>);
7799
7800 impl UpdateHostGroup {
7801 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7802 Self(RequestBuilder::new(stub))
7803 }
7804
7805 pub fn with_request<V: Into<crate::model::UpdateHostGroupRequest>>(mut self, v: V) -> Self {
7807 self.0.request = v.into();
7808 self
7809 }
7810
7811 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7813 self.0.options = v.into();
7814 self
7815 }
7816
7817 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7824 (*self.0.stub)
7825 .update_host_group(self.0.request, self.0.options)
7826 .await
7827 .map(crate::Response::into_body)
7828 }
7829
7830 pub fn poller(
7832 self,
7833 ) -> impl google_cloud_lro::Poller<crate::model::HostGroup, crate::model::OperationMetadata>
7834 {
7835 type Operation = google_cloud_lro::internal::Operation<
7836 crate::model::HostGroup,
7837 crate::model::OperationMetadata,
7838 >;
7839 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7840 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7841 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7842 if let Some(ref mut details) = poller_options.tracing {
7843 details.method_name =
7844 "google_cloud_netapp_v1::client::NetApp::update_host_group::until_done";
7845 }
7846
7847 let stub = self.0.stub.clone();
7848 let mut options = self.0.options.clone();
7849 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7850 let query = move |name| {
7851 let stub = stub.clone();
7852 let options = options.clone();
7853 async {
7854 let op = GetOperation::new(stub)
7855 .set_name(name)
7856 .with_options(options)
7857 .send()
7858 .await?;
7859 Ok(Operation::new(op))
7860 }
7861 };
7862
7863 let start = move || async {
7864 let op = self.send().await?;
7865 Ok(Operation::new(op))
7866 };
7867
7868 use google_cloud_lro::internal::PollerExt;
7869 {
7870 google_cloud_lro::internal::new_poller(
7871 polling_error_policy,
7872 polling_backoff_policy,
7873 start,
7874 query,
7875 )
7876 }
7877 .with_options(poller_options)
7878 }
7879
7880 pub fn set_host_group<T>(mut self, v: T) -> Self
7884 where
7885 T: std::convert::Into<crate::model::HostGroup>,
7886 {
7887 self.0.request.host_group = std::option::Option::Some(v.into());
7888 self
7889 }
7890
7891 pub fn set_or_clear_host_group<T>(mut self, v: std::option::Option<T>) -> Self
7895 where
7896 T: std::convert::Into<crate::model::HostGroup>,
7897 {
7898 self.0.request.host_group = v.map(|x| x.into());
7899 self
7900 }
7901
7902 pub fn set_update_mask<T>(mut self, v: T) -> Self
7904 where
7905 T: std::convert::Into<wkt::FieldMask>,
7906 {
7907 self.0.request.update_mask = std::option::Option::Some(v.into());
7908 self
7909 }
7910
7911 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7913 where
7914 T: std::convert::Into<wkt::FieldMask>,
7915 {
7916 self.0.request.update_mask = v.map(|x| x.into());
7917 self
7918 }
7919 }
7920
7921 #[doc(hidden)]
7922 impl crate::RequestBuilder for UpdateHostGroup {
7923 fn request_options(&mut self) -> &mut crate::RequestOptions {
7924 &mut self.0.options
7925 }
7926 }
7927
7928 #[derive(Clone, Debug)]
7946 pub struct DeleteHostGroup(RequestBuilder<crate::model::DeleteHostGroupRequest>);
7947
7948 impl DeleteHostGroup {
7949 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7950 Self(RequestBuilder::new(stub))
7951 }
7952
7953 pub fn with_request<V: Into<crate::model::DeleteHostGroupRequest>>(mut self, v: V) -> Self {
7955 self.0.request = v.into();
7956 self
7957 }
7958
7959 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7961 self.0.options = v.into();
7962 self
7963 }
7964
7965 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7972 (*self.0.stub)
7973 .delete_host_group(self.0.request, self.0.options)
7974 .await
7975 .map(crate::Response::into_body)
7976 }
7977
7978 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7980 type Operation =
7981 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7982 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7983 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7984 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7985 if let Some(ref mut details) = poller_options.tracing {
7986 details.method_name =
7987 "google_cloud_netapp_v1::client::NetApp::delete_host_group::until_done";
7988 }
7989
7990 let stub = self.0.stub.clone();
7991 let mut options = self.0.options.clone();
7992 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7993 let query = move |name| {
7994 let stub = stub.clone();
7995 let options = options.clone();
7996 async {
7997 let op = GetOperation::new(stub)
7998 .set_name(name)
7999 .with_options(options)
8000 .send()
8001 .await?;
8002 Ok(Operation::new(op))
8003 }
8004 };
8005
8006 let start = move || async {
8007 let op = self.send().await?;
8008 Ok(Operation::new(op))
8009 };
8010
8011 use google_cloud_lro::internal::PollerExt;
8012 {
8013 google_cloud_lro::internal::new_unit_response_poller(
8014 polling_error_policy,
8015 polling_backoff_policy,
8016 start,
8017 query,
8018 )
8019 }
8020 .with_options(poller_options)
8021 }
8022
8023 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8027 self.0.request.name = v.into();
8028 self
8029 }
8030 }
8031
8032 #[doc(hidden)]
8033 impl crate::RequestBuilder for DeleteHostGroup {
8034 fn request_options(&mut self) -> &mut crate::RequestOptions {
8035 &mut self.0.options
8036 }
8037 }
8038
8039 #[derive(Clone, Debug)]
8056 pub struct ExecuteOntapPost(RequestBuilder<crate::model::ExecuteOntapPostRequest>);
8057
8058 impl ExecuteOntapPost {
8059 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8060 Self(RequestBuilder::new(stub))
8061 }
8062
8063 pub fn with_request<V: Into<crate::model::ExecuteOntapPostRequest>>(
8065 mut self,
8066 v: V,
8067 ) -> Self {
8068 self.0.request = v.into();
8069 self
8070 }
8071
8072 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8074 self.0.options = v.into();
8075 self
8076 }
8077
8078 pub async fn send(self) -> Result<crate::model::ExecuteOntapPostResponse> {
8080 (*self.0.stub)
8081 .execute_ontap_post(self.0.request, self.0.options)
8082 .await
8083 .map(crate::Response::into_body)
8084 }
8085
8086 pub fn set_body<T>(mut self, v: T) -> Self
8090 where
8091 T: std::convert::Into<wkt::Struct>,
8092 {
8093 self.0.request.body = std::option::Option::Some(v.into());
8094 self
8095 }
8096
8097 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
8101 where
8102 T: std::convert::Into<wkt::Struct>,
8103 {
8104 self.0.request.body = v.map(|x| x.into());
8105 self
8106 }
8107
8108 pub fn set_ontap_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
8112 self.0.request.ontap_path = v.into();
8113 self
8114 }
8115 }
8116
8117 #[doc(hidden)]
8118 impl crate::RequestBuilder for ExecuteOntapPost {
8119 fn request_options(&mut self) -> &mut crate::RequestOptions {
8120 &mut self.0.options
8121 }
8122 }
8123
8124 #[derive(Clone, Debug)]
8141 pub struct ExecuteOntapGet(RequestBuilder<crate::model::ExecuteOntapGetRequest>);
8142
8143 impl ExecuteOntapGet {
8144 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8145 Self(RequestBuilder::new(stub))
8146 }
8147
8148 pub fn with_request<V: Into<crate::model::ExecuteOntapGetRequest>>(mut self, v: V) -> Self {
8150 self.0.request = v.into();
8151 self
8152 }
8153
8154 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8156 self.0.options = v.into();
8157 self
8158 }
8159
8160 pub async fn send(self) -> Result<crate::model::ExecuteOntapGetResponse> {
8162 (*self.0.stub)
8163 .execute_ontap_get(self.0.request, self.0.options)
8164 .await
8165 .map(crate::Response::into_body)
8166 }
8167
8168 pub fn set_ontap_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
8172 self.0.request.ontap_path = v.into();
8173 self
8174 }
8175 }
8176
8177 #[doc(hidden)]
8178 impl crate::RequestBuilder for ExecuteOntapGet {
8179 fn request_options(&mut self) -> &mut crate::RequestOptions {
8180 &mut self.0.options
8181 }
8182 }
8183
8184 #[derive(Clone, Debug)]
8201 pub struct ExecuteOntapDelete(RequestBuilder<crate::model::ExecuteOntapDeleteRequest>);
8202
8203 impl ExecuteOntapDelete {
8204 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8205 Self(RequestBuilder::new(stub))
8206 }
8207
8208 pub fn with_request<V: Into<crate::model::ExecuteOntapDeleteRequest>>(
8210 mut self,
8211 v: V,
8212 ) -> Self {
8213 self.0.request = v.into();
8214 self
8215 }
8216
8217 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8219 self.0.options = v.into();
8220 self
8221 }
8222
8223 pub async fn send(self) -> Result<crate::model::ExecuteOntapDeleteResponse> {
8225 (*self.0.stub)
8226 .execute_ontap_delete(self.0.request, self.0.options)
8227 .await
8228 .map(crate::Response::into_body)
8229 }
8230
8231 pub fn set_ontap_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
8235 self.0.request.ontap_path = v.into();
8236 self
8237 }
8238 }
8239
8240 #[doc(hidden)]
8241 impl crate::RequestBuilder for ExecuteOntapDelete {
8242 fn request_options(&mut self) -> &mut crate::RequestOptions {
8243 &mut self.0.options
8244 }
8245 }
8246
8247 #[derive(Clone, Debug)]
8264 pub struct ExecuteOntapPatch(RequestBuilder<crate::model::ExecuteOntapPatchRequest>);
8265
8266 impl ExecuteOntapPatch {
8267 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8268 Self(RequestBuilder::new(stub))
8269 }
8270
8271 pub fn with_request<V: Into<crate::model::ExecuteOntapPatchRequest>>(
8273 mut self,
8274 v: V,
8275 ) -> Self {
8276 self.0.request = v.into();
8277 self
8278 }
8279
8280 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8282 self.0.options = v.into();
8283 self
8284 }
8285
8286 pub async fn send(self) -> Result<crate::model::ExecuteOntapPatchResponse> {
8288 (*self.0.stub)
8289 .execute_ontap_patch(self.0.request, self.0.options)
8290 .await
8291 .map(crate::Response::into_body)
8292 }
8293
8294 pub fn set_body<T>(mut self, v: T) -> Self
8298 where
8299 T: std::convert::Into<wkt::Struct>,
8300 {
8301 self.0.request.body = std::option::Option::Some(v.into());
8302 self
8303 }
8304
8305 pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
8309 where
8310 T: std::convert::Into<wkt::Struct>,
8311 {
8312 self.0.request.body = v.map(|x| x.into());
8313 self
8314 }
8315
8316 pub fn set_ontap_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
8320 self.0.request.ontap_path = v.into();
8321 self
8322 }
8323 }
8324
8325 #[doc(hidden)]
8326 impl crate::RequestBuilder for ExecuteOntapPatch {
8327 fn request_options(&mut self) -> &mut crate::RequestOptions {
8328 &mut self.0.options
8329 }
8330 }
8331
8332 #[derive(Clone, Debug)]
8353 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
8354
8355 impl ListLocations {
8356 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8357 Self(RequestBuilder::new(stub))
8358 }
8359
8360 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
8362 mut self,
8363 v: V,
8364 ) -> Self {
8365 self.0.request = v.into();
8366 self
8367 }
8368
8369 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8371 self.0.options = v.into();
8372 self
8373 }
8374
8375 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
8377 (*self.0.stub)
8378 .list_locations(self.0.request, self.0.options)
8379 .await
8380 .map(crate::Response::into_body)
8381 }
8382
8383 pub fn by_page(
8385 self,
8386 ) -> impl google_cloud_gax::paginator::Paginator<
8387 google_cloud_location::model::ListLocationsResponse,
8388 crate::Error,
8389 > {
8390 use std::clone::Clone;
8391 let token = self.0.request.page_token.clone();
8392 let execute = move |token: String| {
8393 let mut builder = self.clone();
8394 builder.0.request = builder.0.request.set_page_token(token);
8395 builder.send()
8396 };
8397 google_cloud_gax::paginator::internal::new_paginator(token, execute)
8398 }
8399
8400 pub fn by_item(
8402 self,
8403 ) -> impl google_cloud_gax::paginator::ItemPaginator<
8404 google_cloud_location::model::ListLocationsResponse,
8405 crate::Error,
8406 > {
8407 use google_cloud_gax::paginator::Paginator;
8408 self.by_page().items()
8409 }
8410
8411 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8413 self.0.request.name = v.into();
8414 self
8415 }
8416
8417 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8419 self.0.request.filter = v.into();
8420 self
8421 }
8422
8423 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8425 self.0.request.page_size = v.into();
8426 self
8427 }
8428
8429 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8431 self.0.request.page_token = v.into();
8432 self
8433 }
8434 }
8435
8436 #[doc(hidden)]
8437 impl crate::RequestBuilder for ListLocations {
8438 fn request_options(&mut self) -> &mut crate::RequestOptions {
8439 &mut self.0.options
8440 }
8441 }
8442
8443 #[derive(Clone, Debug)]
8460 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8461
8462 impl GetLocation {
8463 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8464 Self(RequestBuilder::new(stub))
8465 }
8466
8467 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8469 mut self,
8470 v: V,
8471 ) -> Self {
8472 self.0.request = v.into();
8473 self
8474 }
8475
8476 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8478 self.0.options = v.into();
8479 self
8480 }
8481
8482 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
8484 (*self.0.stub)
8485 .get_location(self.0.request, self.0.options)
8486 .await
8487 .map(crate::Response::into_body)
8488 }
8489
8490 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8492 self.0.request.name = v.into();
8493 self
8494 }
8495 }
8496
8497 #[doc(hidden)]
8498 impl crate::RequestBuilder for GetLocation {
8499 fn request_options(&mut self) -> &mut crate::RequestOptions {
8500 &mut self.0.options
8501 }
8502 }
8503
8504 #[derive(Clone, Debug)]
8525 pub struct ListOperations(
8526 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
8527 );
8528
8529 impl ListOperations {
8530 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8531 Self(RequestBuilder::new(stub))
8532 }
8533
8534 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
8536 mut self,
8537 v: V,
8538 ) -> Self {
8539 self.0.request = v.into();
8540 self
8541 }
8542
8543 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8545 self.0.options = v.into();
8546 self
8547 }
8548
8549 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
8551 (*self.0.stub)
8552 .list_operations(self.0.request, self.0.options)
8553 .await
8554 .map(crate::Response::into_body)
8555 }
8556
8557 pub fn by_page(
8559 self,
8560 ) -> impl google_cloud_gax::paginator::Paginator<
8561 google_cloud_longrunning::model::ListOperationsResponse,
8562 crate::Error,
8563 > {
8564 use std::clone::Clone;
8565 let token = self.0.request.page_token.clone();
8566 let execute = move |token: String| {
8567 let mut builder = self.clone();
8568 builder.0.request = builder.0.request.set_page_token(token);
8569 builder.send()
8570 };
8571 google_cloud_gax::paginator::internal::new_paginator(token, execute)
8572 }
8573
8574 pub fn by_item(
8576 self,
8577 ) -> impl google_cloud_gax::paginator::ItemPaginator<
8578 google_cloud_longrunning::model::ListOperationsResponse,
8579 crate::Error,
8580 > {
8581 use google_cloud_gax::paginator::Paginator;
8582 self.by_page().items()
8583 }
8584
8585 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8587 self.0.request.name = v.into();
8588 self
8589 }
8590
8591 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8593 self.0.request.filter = v.into();
8594 self
8595 }
8596
8597 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8599 self.0.request.page_size = v.into();
8600 self
8601 }
8602
8603 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8605 self.0.request.page_token = v.into();
8606 self
8607 }
8608
8609 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8611 self.0.request.return_partial_success = v.into();
8612 self
8613 }
8614 }
8615
8616 #[doc(hidden)]
8617 impl crate::RequestBuilder for ListOperations {
8618 fn request_options(&mut self) -> &mut crate::RequestOptions {
8619 &mut self.0.options
8620 }
8621 }
8622
8623 #[derive(Clone, Debug)]
8640 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
8641
8642 impl GetOperation {
8643 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8644 Self(RequestBuilder::new(stub))
8645 }
8646
8647 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
8649 mut self,
8650 v: V,
8651 ) -> Self {
8652 self.0.request = v.into();
8653 self
8654 }
8655
8656 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8658 self.0.options = v.into();
8659 self
8660 }
8661
8662 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8664 (*self.0.stub)
8665 .get_operation(self.0.request, self.0.options)
8666 .await
8667 .map(crate::Response::into_body)
8668 }
8669
8670 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8672 self.0.request.name = v.into();
8673 self
8674 }
8675 }
8676
8677 #[doc(hidden)]
8678 impl crate::RequestBuilder for GetOperation {
8679 fn request_options(&mut self) -> &mut crate::RequestOptions {
8680 &mut self.0.options
8681 }
8682 }
8683
8684 #[derive(Clone, Debug)]
8701 pub struct DeleteOperation(
8702 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
8703 );
8704
8705 impl DeleteOperation {
8706 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8707 Self(RequestBuilder::new(stub))
8708 }
8709
8710 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
8712 mut self,
8713 v: V,
8714 ) -> Self {
8715 self.0.request = v.into();
8716 self
8717 }
8718
8719 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8721 self.0.options = v.into();
8722 self
8723 }
8724
8725 pub async fn send(self) -> Result<()> {
8727 (*self.0.stub)
8728 .delete_operation(self.0.request, self.0.options)
8729 .await
8730 .map(crate::Response::into_body)
8731 }
8732
8733 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8735 self.0.request.name = v.into();
8736 self
8737 }
8738 }
8739
8740 #[doc(hidden)]
8741 impl crate::RequestBuilder for DeleteOperation {
8742 fn request_options(&mut self) -> &mut crate::RequestOptions {
8743 &mut self.0.options
8744 }
8745 }
8746
8747 #[derive(Clone, Debug)]
8764 pub struct CancelOperation(
8765 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
8766 );
8767
8768 impl CancelOperation {
8769 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8770 Self(RequestBuilder::new(stub))
8771 }
8772
8773 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
8775 mut self,
8776 v: V,
8777 ) -> Self {
8778 self.0.request = v.into();
8779 self
8780 }
8781
8782 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8784 self.0.options = v.into();
8785 self
8786 }
8787
8788 pub async fn send(self) -> Result<()> {
8790 (*self.0.stub)
8791 .cancel_operation(self.0.request, self.0.options)
8792 .await
8793 .map(crate::Response::into_body)
8794 }
8795
8796 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8798 self.0.request.name = v.into();
8799 self
8800 }
8801 }
8802
8803 #[doc(hidden)]
8804 impl crate::RequestBuilder for CancelOperation {
8805 fn request_options(&mut self) -> &mut crate::RequestOptions {
8806 &mut self.0.options
8807 }
8808 }
8809}