Skip to main content

google_cloud_netapp_v1/
builder.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17/// Request and client builders for [NetApp][crate::client::NetApp].
18pub mod net_app {
19    use crate::Result;
20
21    /// A builder for [NetApp][crate::client::NetApp].
22    ///
23    /// ```
24    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
25    /// # use google_cloud_netapp_v1::*;
26    /// # use builder::net_app::ClientBuilder;
27    /// # use client::NetApp;
28    /// let builder : ClientBuilder = NetApp::builder();
29    /// let client = builder
30    ///     .with_endpoint("https://netapp.googleapis.com")
31    ///     .build().await?;
32    /// # Ok(()) }
33    /// ```
34    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    /// Common implementation for [crate::client::NetApp] request builders.
52    #[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    /// The request builder for [NetApp::list_storage_pools][crate::client::NetApp::list_storage_pools] calls.
73    ///
74    /// # Example
75    /// ```
76    /// # use google_cloud_netapp_v1::builder::net_app::ListStoragePools;
77    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
78    /// use google_cloud_gax::paginator::ItemPaginator;
79    ///
80    /// let builder = prepare_request_builder();
81    /// let mut items = builder.by_item();
82    /// while let Some(result) = items.next().await {
83    ///   let item = result?;
84    /// }
85    /// # Ok(()) }
86    ///
87    /// fn prepare_request_builder() -> ListStoragePools {
88    ///   # panic!();
89    ///   // ... details omitted ...
90    /// }
91    /// ```
92    #[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        /// Sets the full request, replacing any prior values.
101        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        /// Sets all the options, replacing any prior values.
110        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
111            self.0.options = v.into();
112            self
113        }
114
115        /// Sends the request.
116        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        /// Streams each page in the collection.
124        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        /// Streams each item in the collection.
141        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        /// Sets the value of [parent][crate::model::ListStoragePoolsRequest::parent].
152        ///
153        /// This is a **required** field for requests.
154        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        /// Sets the value of [page_size][crate::model::ListStoragePoolsRequest::page_size].
160        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        /// Sets the value of [page_token][crate::model::ListStoragePoolsRequest::page_token].
166        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        /// Sets the value of [order_by][crate::model::ListStoragePoolsRequest::order_by].
172        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        /// Sets the value of [filter][crate::model::ListStoragePoolsRequest::filter].
178        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    /// The request builder for [NetApp::create_storage_pool][crate::client::NetApp::create_storage_pool] calls.
192    ///
193    /// # Example
194    /// ```
195    /// # use google_cloud_netapp_v1::builder::net_app::CreateStoragePool;
196    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
197    /// use google_cloud_lro::Poller;
198    ///
199    /// let builder = prepare_request_builder();
200    /// let response = builder.poller().until_done().await?;
201    /// # Ok(()) }
202    ///
203    /// fn prepare_request_builder() -> CreateStoragePool {
204    ///   # panic!();
205    ///   // ... details omitted ...
206    /// }
207    /// ```
208    #[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        /// Sets the full request, replacing any prior values.
217        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        /// Sets all the options, replacing any prior values.
226        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
227            self.0.options = v.into();
228            self
229        }
230
231        /// Sends the request.
232        ///
233        /// # Long running operations
234        ///
235        /// This starts, but does not poll, a longrunning operation. More information
236        /// on [create_storage_pool][crate::client::NetApp::create_storage_pool].
237        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        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_storage_pool`.
245        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
256            let stub = self.0.stub.clone();
257            let mut options = self.0.options.clone();
258            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
259            let query = move |name| {
260                let stub = stub.clone();
261                let options = options.clone();
262                async {
263                    let op = GetOperation::new(stub)
264                        .set_name(name)
265                        .with_options(options)
266                        .send()
267                        .await?;
268                    Ok(Operation::new(op))
269                }
270            };
271
272            let start = move || async {
273                let op = self.send().await?;
274                Ok(Operation::new(op))
275            };
276
277            google_cloud_lro::internal::new_poller(
278                polling_error_policy,
279                polling_backoff_policy,
280                start,
281                query,
282            )
283        }
284
285        /// Sets the value of [parent][crate::model::CreateStoragePoolRequest::parent].
286        ///
287        /// This is a **required** field for requests.
288        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
289            self.0.request.parent = v.into();
290            self
291        }
292
293        /// Sets the value of [storage_pool_id][crate::model::CreateStoragePoolRequest::storage_pool_id].
294        ///
295        /// This is a **required** field for requests.
296        pub fn set_storage_pool_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
297            self.0.request.storage_pool_id = v.into();
298            self
299        }
300
301        /// Sets the value of [storage_pool][crate::model::CreateStoragePoolRequest::storage_pool].
302        ///
303        /// This is a **required** field for requests.
304        pub fn set_storage_pool<T>(mut self, v: T) -> Self
305        where
306            T: std::convert::Into<crate::model::StoragePool>,
307        {
308            self.0.request.storage_pool = std::option::Option::Some(v.into());
309            self
310        }
311
312        /// Sets or clears the value of [storage_pool][crate::model::CreateStoragePoolRequest::storage_pool].
313        ///
314        /// This is a **required** field for requests.
315        pub fn set_or_clear_storage_pool<T>(mut self, v: std::option::Option<T>) -> Self
316        where
317            T: std::convert::Into<crate::model::StoragePool>,
318        {
319            self.0.request.storage_pool = v.map(|x| x.into());
320            self
321        }
322    }
323
324    #[doc(hidden)]
325    impl crate::RequestBuilder for CreateStoragePool {
326        fn request_options(&mut self) -> &mut crate::RequestOptions {
327            &mut self.0.options
328        }
329    }
330
331    /// The request builder for [NetApp::get_storage_pool][crate::client::NetApp::get_storage_pool] calls.
332    ///
333    /// # Example
334    /// ```
335    /// # use google_cloud_netapp_v1::builder::net_app::GetStoragePool;
336    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
337    ///
338    /// let builder = prepare_request_builder();
339    /// let response = builder.send().await?;
340    /// # Ok(()) }
341    ///
342    /// fn prepare_request_builder() -> GetStoragePool {
343    ///   # panic!();
344    ///   // ... details omitted ...
345    /// }
346    /// ```
347    #[derive(Clone, Debug)]
348    pub struct GetStoragePool(RequestBuilder<crate::model::GetStoragePoolRequest>);
349
350    impl GetStoragePool {
351        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
352            Self(RequestBuilder::new(stub))
353        }
354
355        /// Sets the full request, replacing any prior values.
356        pub fn with_request<V: Into<crate::model::GetStoragePoolRequest>>(mut self, v: V) -> Self {
357            self.0.request = v.into();
358            self
359        }
360
361        /// Sets all the options, replacing any prior values.
362        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
363            self.0.options = v.into();
364            self
365        }
366
367        /// Sends the request.
368        pub async fn send(self) -> Result<crate::model::StoragePool> {
369            (*self.0.stub)
370                .get_storage_pool(self.0.request, self.0.options)
371                .await
372                .map(crate::Response::into_body)
373        }
374
375        /// Sets the value of [name][crate::model::GetStoragePoolRequest::name].
376        ///
377        /// This is a **required** field for requests.
378        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
379            self.0.request.name = v.into();
380            self
381        }
382    }
383
384    #[doc(hidden)]
385    impl crate::RequestBuilder for GetStoragePool {
386        fn request_options(&mut self) -> &mut crate::RequestOptions {
387            &mut self.0.options
388        }
389    }
390
391    /// The request builder for [NetApp::update_storage_pool][crate::client::NetApp::update_storage_pool] calls.
392    ///
393    /// # Example
394    /// ```
395    /// # use google_cloud_netapp_v1::builder::net_app::UpdateStoragePool;
396    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
397    /// use google_cloud_lro::Poller;
398    ///
399    /// let builder = prepare_request_builder();
400    /// let response = builder.poller().until_done().await?;
401    /// # Ok(()) }
402    ///
403    /// fn prepare_request_builder() -> UpdateStoragePool {
404    ///   # panic!();
405    ///   // ... details omitted ...
406    /// }
407    /// ```
408    #[derive(Clone, Debug)]
409    pub struct UpdateStoragePool(RequestBuilder<crate::model::UpdateStoragePoolRequest>);
410
411    impl UpdateStoragePool {
412        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
413            Self(RequestBuilder::new(stub))
414        }
415
416        /// Sets the full request, replacing any prior values.
417        pub fn with_request<V: Into<crate::model::UpdateStoragePoolRequest>>(
418            mut self,
419            v: V,
420        ) -> Self {
421            self.0.request = v.into();
422            self
423        }
424
425        /// Sets all the options, replacing any prior values.
426        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
427            self.0.options = v.into();
428            self
429        }
430
431        /// Sends the request.
432        ///
433        /// # Long running operations
434        ///
435        /// This starts, but does not poll, a longrunning operation. More information
436        /// on [update_storage_pool][crate::client::NetApp::update_storage_pool].
437        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
438            (*self.0.stub)
439                .update_storage_pool(self.0.request, self.0.options)
440                .await
441                .map(crate::Response::into_body)
442        }
443
444        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_storage_pool`.
445        pub fn poller(
446            self,
447        ) -> impl google_cloud_lro::Poller<crate::model::StoragePool, crate::model::OperationMetadata>
448        {
449            type Operation = google_cloud_lro::internal::Operation<
450                crate::model::StoragePool,
451                crate::model::OperationMetadata,
452            >;
453            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
454            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
455
456            let stub = self.0.stub.clone();
457            let mut options = self.0.options.clone();
458            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
459            let query = move |name| {
460                let stub = stub.clone();
461                let options = options.clone();
462                async {
463                    let op = GetOperation::new(stub)
464                        .set_name(name)
465                        .with_options(options)
466                        .send()
467                        .await?;
468                    Ok(Operation::new(op))
469                }
470            };
471
472            let start = move || async {
473                let op = self.send().await?;
474                Ok(Operation::new(op))
475            };
476
477            google_cloud_lro::internal::new_poller(
478                polling_error_policy,
479                polling_backoff_policy,
480                start,
481                query,
482            )
483        }
484
485        /// Sets the value of [update_mask][crate::model::UpdateStoragePoolRequest::update_mask].
486        ///
487        /// This is a **required** field for requests.
488        pub fn set_update_mask<T>(mut self, v: T) -> Self
489        where
490            T: std::convert::Into<wkt::FieldMask>,
491        {
492            self.0.request.update_mask = std::option::Option::Some(v.into());
493            self
494        }
495
496        /// Sets or clears the value of [update_mask][crate::model::UpdateStoragePoolRequest::update_mask].
497        ///
498        /// This is a **required** field for requests.
499        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
500        where
501            T: std::convert::Into<wkt::FieldMask>,
502        {
503            self.0.request.update_mask = v.map(|x| x.into());
504            self
505        }
506
507        /// Sets the value of [storage_pool][crate::model::UpdateStoragePoolRequest::storage_pool].
508        ///
509        /// This is a **required** field for requests.
510        pub fn set_storage_pool<T>(mut self, v: T) -> Self
511        where
512            T: std::convert::Into<crate::model::StoragePool>,
513        {
514            self.0.request.storage_pool = std::option::Option::Some(v.into());
515            self
516        }
517
518        /// Sets or clears the value of [storage_pool][crate::model::UpdateStoragePoolRequest::storage_pool].
519        ///
520        /// This is a **required** field for requests.
521        pub fn set_or_clear_storage_pool<T>(mut self, v: std::option::Option<T>) -> Self
522        where
523            T: std::convert::Into<crate::model::StoragePool>,
524        {
525            self.0.request.storage_pool = v.map(|x| x.into());
526            self
527        }
528    }
529
530    #[doc(hidden)]
531    impl crate::RequestBuilder for UpdateStoragePool {
532        fn request_options(&mut self) -> &mut crate::RequestOptions {
533            &mut self.0.options
534        }
535    }
536
537    /// The request builder for [NetApp::delete_storage_pool][crate::client::NetApp::delete_storage_pool] calls.
538    ///
539    /// # Example
540    /// ```
541    /// # use google_cloud_netapp_v1::builder::net_app::DeleteStoragePool;
542    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
543    /// use google_cloud_lro::Poller;
544    ///
545    /// let builder = prepare_request_builder();
546    /// let response = builder.poller().until_done().await?;
547    /// # Ok(()) }
548    ///
549    /// fn prepare_request_builder() -> DeleteStoragePool {
550    ///   # panic!();
551    ///   // ... details omitted ...
552    /// }
553    /// ```
554    #[derive(Clone, Debug)]
555    pub struct DeleteStoragePool(RequestBuilder<crate::model::DeleteStoragePoolRequest>);
556
557    impl DeleteStoragePool {
558        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
559            Self(RequestBuilder::new(stub))
560        }
561
562        /// Sets the full request, replacing any prior values.
563        pub fn with_request<V: Into<crate::model::DeleteStoragePoolRequest>>(
564            mut self,
565            v: V,
566        ) -> Self {
567            self.0.request = v.into();
568            self
569        }
570
571        /// Sets all the options, replacing any prior values.
572        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
573            self.0.options = v.into();
574            self
575        }
576
577        /// Sends the request.
578        ///
579        /// # Long running operations
580        ///
581        /// This starts, but does not poll, a longrunning operation. More information
582        /// on [delete_storage_pool][crate::client::NetApp::delete_storage_pool].
583        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
584            (*self.0.stub)
585                .delete_storage_pool(self.0.request, self.0.options)
586                .await
587                .map(crate::Response::into_body)
588        }
589
590        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_storage_pool`.
591        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
592            type Operation =
593                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
594            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
595            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
596
597            let stub = self.0.stub.clone();
598            let mut options = self.0.options.clone();
599            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
600            let query = move |name| {
601                let stub = stub.clone();
602                let options = options.clone();
603                async {
604                    let op = GetOperation::new(stub)
605                        .set_name(name)
606                        .with_options(options)
607                        .send()
608                        .await?;
609                    Ok(Operation::new(op))
610                }
611            };
612
613            let start = move || async {
614                let op = self.send().await?;
615                Ok(Operation::new(op))
616            };
617
618            google_cloud_lro::internal::new_unit_response_poller(
619                polling_error_policy,
620                polling_backoff_policy,
621                start,
622                query,
623            )
624        }
625
626        /// Sets the value of [name][crate::model::DeleteStoragePoolRequest::name].
627        ///
628        /// This is a **required** field for requests.
629        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
630            self.0.request.name = v.into();
631            self
632        }
633    }
634
635    #[doc(hidden)]
636    impl crate::RequestBuilder for DeleteStoragePool {
637        fn request_options(&mut self) -> &mut crate::RequestOptions {
638            &mut self.0.options
639        }
640    }
641
642    /// The request builder for [NetApp::validate_directory_service][crate::client::NetApp::validate_directory_service] calls.
643    ///
644    /// # Example
645    /// ```
646    /// # use google_cloud_netapp_v1::builder::net_app::ValidateDirectoryService;
647    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
648    /// use google_cloud_lro::Poller;
649    ///
650    /// let builder = prepare_request_builder();
651    /// let response = builder.poller().until_done().await?;
652    /// # Ok(()) }
653    ///
654    /// fn prepare_request_builder() -> ValidateDirectoryService {
655    ///   # panic!();
656    ///   // ... details omitted ...
657    /// }
658    /// ```
659    #[derive(Clone, Debug)]
660    pub struct ValidateDirectoryService(
661        RequestBuilder<crate::model::ValidateDirectoryServiceRequest>,
662    );
663
664    impl ValidateDirectoryService {
665        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
666            Self(RequestBuilder::new(stub))
667        }
668
669        /// Sets the full request, replacing any prior values.
670        pub fn with_request<V: Into<crate::model::ValidateDirectoryServiceRequest>>(
671            mut self,
672            v: V,
673        ) -> Self {
674            self.0.request = v.into();
675            self
676        }
677
678        /// Sets all the options, replacing any prior values.
679        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
680            self.0.options = v.into();
681            self
682        }
683
684        /// Sends the request.
685        ///
686        /// # Long running operations
687        ///
688        /// This starts, but does not poll, a longrunning operation. More information
689        /// on [validate_directory_service][crate::client::NetApp::validate_directory_service].
690        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
691            (*self.0.stub)
692                .validate_directory_service(self.0.request, self.0.options)
693                .await
694                .map(crate::Response::into_body)
695        }
696
697        /// Creates a [Poller][google_cloud_lro::Poller] to work with `validate_directory_service`.
698        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
699            type Operation =
700                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
701            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
702            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
703
704            let stub = self.0.stub.clone();
705            let mut options = self.0.options.clone();
706            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
707            let query = move |name| {
708                let stub = stub.clone();
709                let options = options.clone();
710                async {
711                    let op = GetOperation::new(stub)
712                        .set_name(name)
713                        .with_options(options)
714                        .send()
715                        .await?;
716                    Ok(Operation::new(op))
717                }
718            };
719
720            let start = move || async {
721                let op = self.send().await?;
722                Ok(Operation::new(op))
723            };
724
725            google_cloud_lro::internal::new_unit_response_poller(
726                polling_error_policy,
727                polling_backoff_policy,
728                start,
729                query,
730            )
731        }
732
733        /// Sets the value of [name][crate::model::ValidateDirectoryServiceRequest::name].
734        ///
735        /// This is a **required** field for requests.
736        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
737            self.0.request.name = v.into();
738            self
739        }
740
741        /// Sets the value of [directory_service_type][crate::model::ValidateDirectoryServiceRequest::directory_service_type].
742        pub fn set_directory_service_type<T: Into<crate::model::DirectoryServiceType>>(
743            mut self,
744            v: T,
745        ) -> Self {
746            self.0.request.directory_service_type = v.into();
747            self
748        }
749    }
750
751    #[doc(hidden)]
752    impl crate::RequestBuilder for ValidateDirectoryService {
753        fn request_options(&mut self) -> &mut crate::RequestOptions {
754            &mut self.0.options
755        }
756    }
757
758    /// The request builder for [NetApp::switch_active_replica_zone][crate::client::NetApp::switch_active_replica_zone] calls.
759    ///
760    /// # Example
761    /// ```
762    /// # use google_cloud_netapp_v1::builder::net_app::SwitchActiveReplicaZone;
763    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
764    /// use google_cloud_lro::Poller;
765    ///
766    /// let builder = prepare_request_builder();
767    /// let response = builder.poller().until_done().await?;
768    /// # Ok(()) }
769    ///
770    /// fn prepare_request_builder() -> SwitchActiveReplicaZone {
771    ///   # panic!();
772    ///   // ... details omitted ...
773    /// }
774    /// ```
775    #[derive(Clone, Debug)]
776    pub struct SwitchActiveReplicaZone(
777        RequestBuilder<crate::model::SwitchActiveReplicaZoneRequest>,
778    );
779
780    impl SwitchActiveReplicaZone {
781        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
782            Self(RequestBuilder::new(stub))
783        }
784
785        /// Sets the full request, replacing any prior values.
786        pub fn with_request<V: Into<crate::model::SwitchActiveReplicaZoneRequest>>(
787            mut self,
788            v: V,
789        ) -> Self {
790            self.0.request = v.into();
791            self
792        }
793
794        /// Sets all the options, replacing any prior values.
795        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
796            self.0.options = v.into();
797            self
798        }
799
800        /// Sends the request.
801        ///
802        /// # Long running operations
803        ///
804        /// This starts, but does not poll, a longrunning operation. More information
805        /// on [switch_active_replica_zone][crate::client::NetApp::switch_active_replica_zone].
806        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
807            (*self.0.stub)
808                .switch_active_replica_zone(self.0.request, self.0.options)
809                .await
810                .map(crate::Response::into_body)
811        }
812
813        /// Creates a [Poller][google_cloud_lro::Poller] to work with `switch_active_replica_zone`.
814        pub fn poller(
815            self,
816        ) -> impl google_cloud_lro::Poller<crate::model::StoragePool, crate::model::OperationMetadata>
817        {
818            type Operation = google_cloud_lro::internal::Operation<
819                crate::model::StoragePool,
820                crate::model::OperationMetadata,
821            >;
822            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
823            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
824
825            let stub = self.0.stub.clone();
826            let mut options = self.0.options.clone();
827            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
828            let query = move |name| {
829                let stub = stub.clone();
830                let options = options.clone();
831                async {
832                    let op = GetOperation::new(stub)
833                        .set_name(name)
834                        .with_options(options)
835                        .send()
836                        .await?;
837                    Ok(Operation::new(op))
838                }
839            };
840
841            let start = move || async {
842                let op = self.send().await?;
843                Ok(Operation::new(op))
844            };
845
846            google_cloud_lro::internal::new_poller(
847                polling_error_policy,
848                polling_backoff_policy,
849                start,
850                query,
851            )
852        }
853
854        /// Sets the value of [name][crate::model::SwitchActiveReplicaZoneRequest::name].
855        ///
856        /// This is a **required** field for requests.
857        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
858            self.0.request.name = v.into();
859            self
860        }
861    }
862
863    #[doc(hidden)]
864    impl crate::RequestBuilder for SwitchActiveReplicaZone {
865        fn request_options(&mut self) -> &mut crate::RequestOptions {
866            &mut self.0.options
867        }
868    }
869
870    /// The request builder for [NetApp::list_volumes][crate::client::NetApp::list_volumes] calls.
871    ///
872    /// # Example
873    /// ```
874    /// # use google_cloud_netapp_v1::builder::net_app::ListVolumes;
875    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
876    /// use google_cloud_gax::paginator::ItemPaginator;
877    ///
878    /// let builder = prepare_request_builder();
879    /// let mut items = builder.by_item();
880    /// while let Some(result) = items.next().await {
881    ///   let item = result?;
882    /// }
883    /// # Ok(()) }
884    ///
885    /// fn prepare_request_builder() -> ListVolumes {
886    ///   # panic!();
887    ///   // ... details omitted ...
888    /// }
889    /// ```
890    #[derive(Clone, Debug)]
891    pub struct ListVolumes(RequestBuilder<crate::model::ListVolumesRequest>);
892
893    impl ListVolumes {
894        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
895            Self(RequestBuilder::new(stub))
896        }
897
898        /// Sets the full request, replacing any prior values.
899        pub fn with_request<V: Into<crate::model::ListVolumesRequest>>(mut self, v: V) -> Self {
900            self.0.request = v.into();
901            self
902        }
903
904        /// Sets all the options, replacing any prior values.
905        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
906            self.0.options = v.into();
907            self
908        }
909
910        /// Sends the request.
911        pub async fn send(self) -> Result<crate::model::ListVolumesResponse> {
912            (*self.0.stub)
913                .list_volumes(self.0.request, self.0.options)
914                .await
915                .map(crate::Response::into_body)
916        }
917
918        /// Streams each page in the collection.
919        pub fn by_page(
920            self,
921        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListVolumesResponse, crate::Error>
922        {
923            use std::clone::Clone;
924            let token = self.0.request.page_token.clone();
925            let execute = move |token: String| {
926                let mut builder = self.clone();
927                builder.0.request = builder.0.request.set_page_token(token);
928                builder.send()
929            };
930            google_cloud_gax::paginator::internal::new_paginator(token, execute)
931        }
932
933        /// Streams each item in the collection.
934        pub fn by_item(
935            self,
936        ) -> impl google_cloud_gax::paginator::ItemPaginator<
937            crate::model::ListVolumesResponse,
938            crate::Error,
939        > {
940            use google_cloud_gax::paginator::Paginator;
941            self.by_page().items()
942        }
943
944        /// Sets the value of [parent][crate::model::ListVolumesRequest::parent].
945        ///
946        /// This is a **required** field for requests.
947        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
948            self.0.request.parent = v.into();
949            self
950        }
951
952        /// Sets the value of [page_size][crate::model::ListVolumesRequest::page_size].
953        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
954            self.0.request.page_size = v.into();
955            self
956        }
957
958        /// Sets the value of [page_token][crate::model::ListVolumesRequest::page_token].
959        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
960            self.0.request.page_token = v.into();
961            self
962        }
963
964        /// Sets the value of [filter][crate::model::ListVolumesRequest::filter].
965        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
966            self.0.request.filter = v.into();
967            self
968        }
969
970        /// Sets the value of [order_by][crate::model::ListVolumesRequest::order_by].
971        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
972            self.0.request.order_by = v.into();
973            self
974        }
975    }
976
977    #[doc(hidden)]
978    impl crate::RequestBuilder for ListVolumes {
979        fn request_options(&mut self) -> &mut crate::RequestOptions {
980            &mut self.0.options
981        }
982    }
983
984    /// The request builder for [NetApp::get_volume][crate::client::NetApp::get_volume] calls.
985    ///
986    /// # Example
987    /// ```
988    /// # use google_cloud_netapp_v1::builder::net_app::GetVolume;
989    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
990    ///
991    /// let builder = prepare_request_builder();
992    /// let response = builder.send().await?;
993    /// # Ok(()) }
994    ///
995    /// fn prepare_request_builder() -> GetVolume {
996    ///   # panic!();
997    ///   // ... details omitted ...
998    /// }
999    /// ```
1000    #[derive(Clone, Debug)]
1001    pub struct GetVolume(RequestBuilder<crate::model::GetVolumeRequest>);
1002
1003    impl GetVolume {
1004        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1005            Self(RequestBuilder::new(stub))
1006        }
1007
1008        /// Sets the full request, replacing any prior values.
1009        pub fn with_request<V: Into<crate::model::GetVolumeRequest>>(mut self, v: V) -> Self {
1010            self.0.request = v.into();
1011            self
1012        }
1013
1014        /// Sets all the options, replacing any prior values.
1015        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1016            self.0.options = v.into();
1017            self
1018        }
1019
1020        /// Sends the request.
1021        pub async fn send(self) -> Result<crate::model::Volume> {
1022            (*self.0.stub)
1023                .get_volume(self.0.request, self.0.options)
1024                .await
1025                .map(crate::Response::into_body)
1026        }
1027
1028        /// Sets the value of [name][crate::model::GetVolumeRequest::name].
1029        ///
1030        /// This is a **required** field for requests.
1031        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1032            self.0.request.name = v.into();
1033            self
1034        }
1035    }
1036
1037    #[doc(hidden)]
1038    impl crate::RequestBuilder for GetVolume {
1039        fn request_options(&mut self) -> &mut crate::RequestOptions {
1040            &mut self.0.options
1041        }
1042    }
1043
1044    /// The request builder for [NetApp::create_volume][crate::client::NetApp::create_volume] calls.
1045    ///
1046    /// # Example
1047    /// ```
1048    /// # use google_cloud_netapp_v1::builder::net_app::CreateVolume;
1049    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1050    /// use google_cloud_lro::Poller;
1051    ///
1052    /// let builder = prepare_request_builder();
1053    /// let response = builder.poller().until_done().await?;
1054    /// # Ok(()) }
1055    ///
1056    /// fn prepare_request_builder() -> CreateVolume {
1057    ///   # panic!();
1058    ///   // ... details omitted ...
1059    /// }
1060    /// ```
1061    #[derive(Clone, Debug)]
1062    pub struct CreateVolume(RequestBuilder<crate::model::CreateVolumeRequest>);
1063
1064    impl CreateVolume {
1065        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1066            Self(RequestBuilder::new(stub))
1067        }
1068
1069        /// Sets the full request, replacing any prior values.
1070        pub fn with_request<V: Into<crate::model::CreateVolumeRequest>>(mut self, v: V) -> Self {
1071            self.0.request = v.into();
1072            self
1073        }
1074
1075        /// Sets all the options, replacing any prior values.
1076        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1077            self.0.options = v.into();
1078            self
1079        }
1080
1081        /// Sends the request.
1082        ///
1083        /// # Long running operations
1084        ///
1085        /// This starts, but does not poll, a longrunning operation. More information
1086        /// on [create_volume][crate::client::NetApp::create_volume].
1087        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1088            (*self.0.stub)
1089                .create_volume(self.0.request, self.0.options)
1090                .await
1091                .map(crate::Response::into_body)
1092        }
1093
1094        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_volume`.
1095        pub fn poller(
1096            self,
1097        ) -> impl google_cloud_lro::Poller<crate::model::Volume, crate::model::OperationMetadata>
1098        {
1099            type Operation = google_cloud_lro::internal::Operation<
1100                crate::model::Volume,
1101                crate::model::OperationMetadata,
1102            >;
1103            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1104            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1105
1106            let stub = self.0.stub.clone();
1107            let mut options = self.0.options.clone();
1108            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1109            let query = move |name| {
1110                let stub = stub.clone();
1111                let options = options.clone();
1112                async {
1113                    let op = GetOperation::new(stub)
1114                        .set_name(name)
1115                        .with_options(options)
1116                        .send()
1117                        .await?;
1118                    Ok(Operation::new(op))
1119                }
1120            };
1121
1122            let start = move || async {
1123                let op = self.send().await?;
1124                Ok(Operation::new(op))
1125            };
1126
1127            google_cloud_lro::internal::new_poller(
1128                polling_error_policy,
1129                polling_backoff_policy,
1130                start,
1131                query,
1132            )
1133        }
1134
1135        /// Sets the value of [parent][crate::model::CreateVolumeRequest::parent].
1136        ///
1137        /// This is a **required** field for requests.
1138        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1139            self.0.request.parent = v.into();
1140            self
1141        }
1142
1143        /// Sets the value of [volume_id][crate::model::CreateVolumeRequest::volume_id].
1144        ///
1145        /// This is a **required** field for requests.
1146        pub fn set_volume_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1147            self.0.request.volume_id = v.into();
1148            self
1149        }
1150
1151        /// Sets the value of [volume][crate::model::CreateVolumeRequest::volume].
1152        ///
1153        /// This is a **required** field for requests.
1154        pub fn set_volume<T>(mut self, v: T) -> Self
1155        where
1156            T: std::convert::Into<crate::model::Volume>,
1157        {
1158            self.0.request.volume = std::option::Option::Some(v.into());
1159            self
1160        }
1161
1162        /// Sets or clears the value of [volume][crate::model::CreateVolumeRequest::volume].
1163        ///
1164        /// This is a **required** field for requests.
1165        pub fn set_or_clear_volume<T>(mut self, v: std::option::Option<T>) -> Self
1166        where
1167            T: std::convert::Into<crate::model::Volume>,
1168        {
1169            self.0.request.volume = v.map(|x| x.into());
1170            self
1171        }
1172    }
1173
1174    #[doc(hidden)]
1175    impl crate::RequestBuilder for CreateVolume {
1176        fn request_options(&mut self) -> &mut crate::RequestOptions {
1177            &mut self.0.options
1178        }
1179    }
1180
1181    /// The request builder for [NetApp::update_volume][crate::client::NetApp::update_volume] calls.
1182    ///
1183    /// # Example
1184    /// ```
1185    /// # use google_cloud_netapp_v1::builder::net_app::UpdateVolume;
1186    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1187    /// use google_cloud_lro::Poller;
1188    ///
1189    /// let builder = prepare_request_builder();
1190    /// let response = builder.poller().until_done().await?;
1191    /// # Ok(()) }
1192    ///
1193    /// fn prepare_request_builder() -> UpdateVolume {
1194    ///   # panic!();
1195    ///   // ... details omitted ...
1196    /// }
1197    /// ```
1198    #[derive(Clone, Debug)]
1199    pub struct UpdateVolume(RequestBuilder<crate::model::UpdateVolumeRequest>);
1200
1201    impl UpdateVolume {
1202        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1203            Self(RequestBuilder::new(stub))
1204        }
1205
1206        /// Sets the full request, replacing any prior values.
1207        pub fn with_request<V: Into<crate::model::UpdateVolumeRequest>>(mut self, v: V) -> Self {
1208            self.0.request = v.into();
1209            self
1210        }
1211
1212        /// Sets all the options, replacing any prior values.
1213        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1214            self.0.options = v.into();
1215            self
1216        }
1217
1218        /// Sends the request.
1219        ///
1220        /// # Long running operations
1221        ///
1222        /// This starts, but does not poll, a longrunning operation. More information
1223        /// on [update_volume][crate::client::NetApp::update_volume].
1224        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1225            (*self.0.stub)
1226                .update_volume(self.0.request, self.0.options)
1227                .await
1228                .map(crate::Response::into_body)
1229        }
1230
1231        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_volume`.
1232        pub fn poller(
1233            self,
1234        ) -> impl google_cloud_lro::Poller<crate::model::Volume, crate::model::OperationMetadata>
1235        {
1236            type Operation = google_cloud_lro::internal::Operation<
1237                crate::model::Volume,
1238                crate::model::OperationMetadata,
1239            >;
1240            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1241            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1242
1243            let stub = self.0.stub.clone();
1244            let mut options = self.0.options.clone();
1245            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1246            let query = move |name| {
1247                let stub = stub.clone();
1248                let options = options.clone();
1249                async {
1250                    let op = GetOperation::new(stub)
1251                        .set_name(name)
1252                        .with_options(options)
1253                        .send()
1254                        .await?;
1255                    Ok(Operation::new(op))
1256                }
1257            };
1258
1259            let start = move || async {
1260                let op = self.send().await?;
1261                Ok(Operation::new(op))
1262            };
1263
1264            google_cloud_lro::internal::new_poller(
1265                polling_error_policy,
1266                polling_backoff_policy,
1267                start,
1268                query,
1269            )
1270        }
1271
1272        /// Sets the value of [update_mask][crate::model::UpdateVolumeRequest::update_mask].
1273        ///
1274        /// This is a **required** field for requests.
1275        pub fn set_update_mask<T>(mut self, v: T) -> Self
1276        where
1277            T: std::convert::Into<wkt::FieldMask>,
1278        {
1279            self.0.request.update_mask = std::option::Option::Some(v.into());
1280            self
1281        }
1282
1283        /// Sets or clears the value of [update_mask][crate::model::UpdateVolumeRequest::update_mask].
1284        ///
1285        /// This is a **required** field for requests.
1286        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1287        where
1288            T: std::convert::Into<wkt::FieldMask>,
1289        {
1290            self.0.request.update_mask = v.map(|x| x.into());
1291            self
1292        }
1293
1294        /// Sets the value of [volume][crate::model::UpdateVolumeRequest::volume].
1295        ///
1296        /// This is a **required** field for requests.
1297        pub fn set_volume<T>(mut self, v: T) -> Self
1298        where
1299            T: std::convert::Into<crate::model::Volume>,
1300        {
1301            self.0.request.volume = std::option::Option::Some(v.into());
1302            self
1303        }
1304
1305        /// Sets or clears the value of [volume][crate::model::UpdateVolumeRequest::volume].
1306        ///
1307        /// This is a **required** field for requests.
1308        pub fn set_or_clear_volume<T>(mut self, v: std::option::Option<T>) -> Self
1309        where
1310            T: std::convert::Into<crate::model::Volume>,
1311        {
1312            self.0.request.volume = v.map(|x| x.into());
1313            self
1314        }
1315    }
1316
1317    #[doc(hidden)]
1318    impl crate::RequestBuilder for UpdateVolume {
1319        fn request_options(&mut self) -> &mut crate::RequestOptions {
1320            &mut self.0.options
1321        }
1322    }
1323
1324    /// The request builder for [NetApp::delete_volume][crate::client::NetApp::delete_volume] calls.
1325    ///
1326    /// # Example
1327    /// ```
1328    /// # use google_cloud_netapp_v1::builder::net_app::DeleteVolume;
1329    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1330    /// use google_cloud_lro::Poller;
1331    ///
1332    /// let builder = prepare_request_builder();
1333    /// let response = builder.poller().until_done().await?;
1334    /// # Ok(()) }
1335    ///
1336    /// fn prepare_request_builder() -> DeleteVolume {
1337    ///   # panic!();
1338    ///   // ... details omitted ...
1339    /// }
1340    /// ```
1341    #[derive(Clone, Debug)]
1342    pub struct DeleteVolume(RequestBuilder<crate::model::DeleteVolumeRequest>);
1343
1344    impl DeleteVolume {
1345        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1346            Self(RequestBuilder::new(stub))
1347        }
1348
1349        /// Sets the full request, replacing any prior values.
1350        pub fn with_request<V: Into<crate::model::DeleteVolumeRequest>>(mut self, v: V) -> Self {
1351            self.0.request = v.into();
1352            self
1353        }
1354
1355        /// Sets all the options, replacing any prior values.
1356        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1357            self.0.options = v.into();
1358            self
1359        }
1360
1361        /// Sends the request.
1362        ///
1363        /// # Long running operations
1364        ///
1365        /// This starts, but does not poll, a longrunning operation. More information
1366        /// on [delete_volume][crate::client::NetApp::delete_volume].
1367        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1368            (*self.0.stub)
1369                .delete_volume(self.0.request, self.0.options)
1370                .await
1371                .map(crate::Response::into_body)
1372        }
1373
1374        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_volume`.
1375        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1376            type Operation =
1377                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1378            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1379            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1380
1381            let stub = self.0.stub.clone();
1382            let mut options = self.0.options.clone();
1383            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1384            let query = move |name| {
1385                let stub = stub.clone();
1386                let options = options.clone();
1387                async {
1388                    let op = GetOperation::new(stub)
1389                        .set_name(name)
1390                        .with_options(options)
1391                        .send()
1392                        .await?;
1393                    Ok(Operation::new(op))
1394                }
1395            };
1396
1397            let start = move || async {
1398                let op = self.send().await?;
1399                Ok(Operation::new(op))
1400            };
1401
1402            google_cloud_lro::internal::new_unit_response_poller(
1403                polling_error_policy,
1404                polling_backoff_policy,
1405                start,
1406                query,
1407            )
1408        }
1409
1410        /// Sets the value of [name][crate::model::DeleteVolumeRequest::name].
1411        ///
1412        /// This is a **required** field for requests.
1413        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1414            self.0.request.name = v.into();
1415            self
1416        }
1417
1418        /// Sets the value of [force][crate::model::DeleteVolumeRequest::force].
1419        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
1420            self.0.request.force = v.into();
1421            self
1422        }
1423    }
1424
1425    #[doc(hidden)]
1426    impl crate::RequestBuilder for DeleteVolume {
1427        fn request_options(&mut self) -> &mut crate::RequestOptions {
1428            &mut self.0.options
1429        }
1430    }
1431
1432    /// The request builder for [NetApp::revert_volume][crate::client::NetApp::revert_volume] calls.
1433    ///
1434    /// # Example
1435    /// ```
1436    /// # use google_cloud_netapp_v1::builder::net_app::RevertVolume;
1437    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1438    /// use google_cloud_lro::Poller;
1439    ///
1440    /// let builder = prepare_request_builder();
1441    /// let response = builder.poller().until_done().await?;
1442    /// # Ok(()) }
1443    ///
1444    /// fn prepare_request_builder() -> RevertVolume {
1445    ///   # panic!();
1446    ///   // ... details omitted ...
1447    /// }
1448    /// ```
1449    #[derive(Clone, Debug)]
1450    pub struct RevertVolume(RequestBuilder<crate::model::RevertVolumeRequest>);
1451
1452    impl RevertVolume {
1453        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1454            Self(RequestBuilder::new(stub))
1455        }
1456
1457        /// Sets the full request, replacing any prior values.
1458        pub fn with_request<V: Into<crate::model::RevertVolumeRequest>>(mut self, v: V) -> Self {
1459            self.0.request = v.into();
1460            self
1461        }
1462
1463        /// Sets all the options, replacing any prior values.
1464        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1465            self.0.options = v.into();
1466            self
1467        }
1468
1469        /// Sends the request.
1470        ///
1471        /// # Long running operations
1472        ///
1473        /// This starts, but does not poll, a longrunning operation. More information
1474        /// on [revert_volume][crate::client::NetApp::revert_volume].
1475        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1476            (*self.0.stub)
1477                .revert_volume(self.0.request, self.0.options)
1478                .await
1479                .map(crate::Response::into_body)
1480        }
1481
1482        /// Creates a [Poller][google_cloud_lro::Poller] to work with `revert_volume`.
1483        pub fn poller(
1484            self,
1485        ) -> impl google_cloud_lro::Poller<crate::model::Volume, crate::model::OperationMetadata>
1486        {
1487            type Operation = google_cloud_lro::internal::Operation<
1488                crate::model::Volume,
1489                crate::model::OperationMetadata,
1490            >;
1491            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1492            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1493
1494            let stub = self.0.stub.clone();
1495            let mut options = self.0.options.clone();
1496            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1497            let query = move |name| {
1498                let stub = stub.clone();
1499                let options = options.clone();
1500                async {
1501                    let op = GetOperation::new(stub)
1502                        .set_name(name)
1503                        .with_options(options)
1504                        .send()
1505                        .await?;
1506                    Ok(Operation::new(op))
1507                }
1508            };
1509
1510            let start = move || async {
1511                let op = self.send().await?;
1512                Ok(Operation::new(op))
1513            };
1514
1515            google_cloud_lro::internal::new_poller(
1516                polling_error_policy,
1517                polling_backoff_policy,
1518                start,
1519                query,
1520            )
1521        }
1522
1523        /// Sets the value of [name][crate::model::RevertVolumeRequest::name].
1524        ///
1525        /// This is a **required** field for requests.
1526        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1527            self.0.request.name = v.into();
1528            self
1529        }
1530
1531        /// Sets the value of [snapshot_id][crate::model::RevertVolumeRequest::snapshot_id].
1532        ///
1533        /// This is a **required** field for requests.
1534        pub fn set_snapshot_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1535            self.0.request.snapshot_id = v.into();
1536            self
1537        }
1538    }
1539
1540    #[doc(hidden)]
1541    impl crate::RequestBuilder for RevertVolume {
1542        fn request_options(&mut self) -> &mut crate::RequestOptions {
1543            &mut self.0.options
1544        }
1545    }
1546
1547    /// The request builder for [NetApp::establish_volume_peering][crate::client::NetApp::establish_volume_peering] calls.
1548    ///
1549    /// # Example
1550    /// ```
1551    /// # use google_cloud_netapp_v1::builder::net_app::EstablishVolumePeering;
1552    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1553    /// use google_cloud_lro::Poller;
1554    ///
1555    /// let builder = prepare_request_builder();
1556    /// let response = builder.poller().until_done().await?;
1557    /// # Ok(()) }
1558    ///
1559    /// fn prepare_request_builder() -> EstablishVolumePeering {
1560    ///   # panic!();
1561    ///   // ... details omitted ...
1562    /// }
1563    /// ```
1564    #[derive(Clone, Debug)]
1565    pub struct EstablishVolumePeering(RequestBuilder<crate::model::EstablishVolumePeeringRequest>);
1566
1567    impl EstablishVolumePeering {
1568        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1569            Self(RequestBuilder::new(stub))
1570        }
1571
1572        /// Sets the full request, replacing any prior values.
1573        pub fn with_request<V: Into<crate::model::EstablishVolumePeeringRequest>>(
1574            mut self,
1575            v: V,
1576        ) -> Self {
1577            self.0.request = v.into();
1578            self
1579        }
1580
1581        /// Sets all the options, replacing any prior values.
1582        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1583            self.0.options = v.into();
1584            self
1585        }
1586
1587        /// Sends the request.
1588        ///
1589        /// # Long running operations
1590        ///
1591        /// This starts, but does not poll, a longrunning operation. More information
1592        /// on [establish_volume_peering][crate::client::NetApp::establish_volume_peering].
1593        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1594            (*self.0.stub)
1595                .establish_volume_peering(self.0.request, self.0.options)
1596                .await
1597                .map(crate::Response::into_body)
1598        }
1599
1600        /// Creates a [Poller][google_cloud_lro::Poller] to work with `establish_volume_peering`.
1601        pub fn poller(
1602            self,
1603        ) -> impl google_cloud_lro::Poller<crate::model::Volume, crate::model::OperationMetadata>
1604        {
1605            type Operation = google_cloud_lro::internal::Operation<
1606                crate::model::Volume,
1607                crate::model::OperationMetadata,
1608            >;
1609            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1610            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1611
1612            let stub = self.0.stub.clone();
1613            let mut options = self.0.options.clone();
1614            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1615            let query = move |name| {
1616                let stub = stub.clone();
1617                let options = options.clone();
1618                async {
1619                    let op = GetOperation::new(stub)
1620                        .set_name(name)
1621                        .with_options(options)
1622                        .send()
1623                        .await?;
1624                    Ok(Operation::new(op))
1625                }
1626            };
1627
1628            let start = move || async {
1629                let op = self.send().await?;
1630                Ok(Operation::new(op))
1631            };
1632
1633            google_cloud_lro::internal::new_poller(
1634                polling_error_policy,
1635                polling_backoff_policy,
1636                start,
1637                query,
1638            )
1639        }
1640
1641        /// Sets the value of [name][crate::model::EstablishVolumePeeringRequest::name].
1642        ///
1643        /// This is a **required** field for requests.
1644        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1645            self.0.request.name = v.into();
1646            self
1647        }
1648
1649        /// Sets the value of [peer_cluster_name][crate::model::EstablishVolumePeeringRequest::peer_cluster_name].
1650        ///
1651        /// This is a **required** field for requests.
1652        pub fn set_peer_cluster_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1653            self.0.request.peer_cluster_name = v.into();
1654            self
1655        }
1656
1657        /// Sets the value of [peer_svm_name][crate::model::EstablishVolumePeeringRequest::peer_svm_name].
1658        ///
1659        /// This is a **required** field for requests.
1660        pub fn set_peer_svm_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1661            self.0.request.peer_svm_name = v.into();
1662            self
1663        }
1664
1665        /// Sets the value of [peer_ip_addresses][crate::model::EstablishVolumePeeringRequest::peer_ip_addresses].
1666        pub fn set_peer_ip_addresses<T, V>(mut self, v: T) -> Self
1667        where
1668            T: std::iter::IntoIterator<Item = V>,
1669            V: std::convert::Into<std::string::String>,
1670        {
1671            use std::iter::Iterator;
1672            self.0.request.peer_ip_addresses = v.into_iter().map(|i| i.into()).collect();
1673            self
1674        }
1675
1676        /// Sets the value of [peer_volume_name][crate::model::EstablishVolumePeeringRequest::peer_volume_name].
1677        ///
1678        /// This is a **required** field for requests.
1679        pub fn set_peer_volume_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1680            self.0.request.peer_volume_name = v.into();
1681            self
1682        }
1683    }
1684
1685    #[doc(hidden)]
1686    impl crate::RequestBuilder for EstablishVolumePeering {
1687        fn request_options(&mut self) -> &mut crate::RequestOptions {
1688            &mut self.0.options
1689        }
1690    }
1691
1692    /// The request builder for [NetApp::list_snapshots][crate::client::NetApp::list_snapshots] calls.
1693    ///
1694    /// # Example
1695    /// ```
1696    /// # use google_cloud_netapp_v1::builder::net_app::ListSnapshots;
1697    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1698    /// use google_cloud_gax::paginator::ItemPaginator;
1699    ///
1700    /// let builder = prepare_request_builder();
1701    /// let mut items = builder.by_item();
1702    /// while let Some(result) = items.next().await {
1703    ///   let item = result?;
1704    /// }
1705    /// # Ok(()) }
1706    ///
1707    /// fn prepare_request_builder() -> ListSnapshots {
1708    ///   # panic!();
1709    ///   // ... details omitted ...
1710    /// }
1711    /// ```
1712    #[derive(Clone, Debug)]
1713    pub struct ListSnapshots(RequestBuilder<crate::model::ListSnapshotsRequest>);
1714
1715    impl ListSnapshots {
1716        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1717            Self(RequestBuilder::new(stub))
1718        }
1719
1720        /// Sets the full request, replacing any prior values.
1721        pub fn with_request<V: Into<crate::model::ListSnapshotsRequest>>(mut self, v: V) -> Self {
1722            self.0.request = v.into();
1723            self
1724        }
1725
1726        /// Sets all the options, replacing any prior values.
1727        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1728            self.0.options = v.into();
1729            self
1730        }
1731
1732        /// Sends the request.
1733        pub async fn send(self) -> Result<crate::model::ListSnapshotsResponse> {
1734            (*self.0.stub)
1735                .list_snapshots(self.0.request, self.0.options)
1736                .await
1737                .map(crate::Response::into_body)
1738        }
1739
1740        /// Streams each page in the collection.
1741        pub fn by_page(
1742            self,
1743        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListSnapshotsResponse, crate::Error>
1744        {
1745            use std::clone::Clone;
1746            let token = self.0.request.page_token.clone();
1747            let execute = move |token: String| {
1748                let mut builder = self.clone();
1749                builder.0.request = builder.0.request.set_page_token(token);
1750                builder.send()
1751            };
1752            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1753        }
1754
1755        /// Streams each item in the collection.
1756        pub fn by_item(
1757            self,
1758        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1759            crate::model::ListSnapshotsResponse,
1760            crate::Error,
1761        > {
1762            use google_cloud_gax::paginator::Paginator;
1763            self.by_page().items()
1764        }
1765
1766        /// Sets the value of [parent][crate::model::ListSnapshotsRequest::parent].
1767        ///
1768        /// This is a **required** field for requests.
1769        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1770            self.0.request.parent = v.into();
1771            self
1772        }
1773
1774        /// Sets the value of [page_size][crate::model::ListSnapshotsRequest::page_size].
1775        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1776            self.0.request.page_size = v.into();
1777            self
1778        }
1779
1780        /// Sets the value of [page_token][crate::model::ListSnapshotsRequest::page_token].
1781        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1782            self.0.request.page_token = v.into();
1783            self
1784        }
1785
1786        /// Sets the value of [order_by][crate::model::ListSnapshotsRequest::order_by].
1787        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1788            self.0.request.order_by = v.into();
1789            self
1790        }
1791
1792        /// Sets the value of [filter][crate::model::ListSnapshotsRequest::filter].
1793        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1794            self.0.request.filter = v.into();
1795            self
1796        }
1797    }
1798
1799    #[doc(hidden)]
1800    impl crate::RequestBuilder for ListSnapshots {
1801        fn request_options(&mut self) -> &mut crate::RequestOptions {
1802            &mut self.0.options
1803        }
1804    }
1805
1806    /// The request builder for [NetApp::get_snapshot][crate::client::NetApp::get_snapshot] calls.
1807    ///
1808    /// # Example
1809    /// ```
1810    /// # use google_cloud_netapp_v1::builder::net_app::GetSnapshot;
1811    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1812    ///
1813    /// let builder = prepare_request_builder();
1814    /// let response = builder.send().await?;
1815    /// # Ok(()) }
1816    ///
1817    /// fn prepare_request_builder() -> GetSnapshot {
1818    ///   # panic!();
1819    ///   // ... details omitted ...
1820    /// }
1821    /// ```
1822    #[derive(Clone, Debug)]
1823    pub struct GetSnapshot(RequestBuilder<crate::model::GetSnapshotRequest>);
1824
1825    impl GetSnapshot {
1826        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1827            Self(RequestBuilder::new(stub))
1828        }
1829
1830        /// Sets the full request, replacing any prior values.
1831        pub fn with_request<V: Into<crate::model::GetSnapshotRequest>>(mut self, v: V) -> Self {
1832            self.0.request = v.into();
1833            self
1834        }
1835
1836        /// Sets all the options, replacing any prior values.
1837        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1838            self.0.options = v.into();
1839            self
1840        }
1841
1842        /// Sends the request.
1843        pub async fn send(self) -> Result<crate::model::Snapshot> {
1844            (*self.0.stub)
1845                .get_snapshot(self.0.request, self.0.options)
1846                .await
1847                .map(crate::Response::into_body)
1848        }
1849
1850        /// Sets the value of [name][crate::model::GetSnapshotRequest::name].
1851        ///
1852        /// This is a **required** field for requests.
1853        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1854            self.0.request.name = v.into();
1855            self
1856        }
1857    }
1858
1859    #[doc(hidden)]
1860    impl crate::RequestBuilder for GetSnapshot {
1861        fn request_options(&mut self) -> &mut crate::RequestOptions {
1862            &mut self.0.options
1863        }
1864    }
1865
1866    /// The request builder for [NetApp::create_snapshot][crate::client::NetApp::create_snapshot] calls.
1867    ///
1868    /// # Example
1869    /// ```
1870    /// # use google_cloud_netapp_v1::builder::net_app::CreateSnapshot;
1871    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
1872    /// use google_cloud_lro::Poller;
1873    ///
1874    /// let builder = prepare_request_builder();
1875    /// let response = builder.poller().until_done().await?;
1876    /// # Ok(()) }
1877    ///
1878    /// fn prepare_request_builder() -> CreateSnapshot {
1879    ///   # panic!();
1880    ///   // ... details omitted ...
1881    /// }
1882    /// ```
1883    #[derive(Clone, Debug)]
1884    pub struct CreateSnapshot(RequestBuilder<crate::model::CreateSnapshotRequest>);
1885
1886    impl CreateSnapshot {
1887        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
1888            Self(RequestBuilder::new(stub))
1889        }
1890
1891        /// Sets the full request, replacing any prior values.
1892        pub fn with_request<V: Into<crate::model::CreateSnapshotRequest>>(mut self, v: V) -> Self {
1893            self.0.request = v.into();
1894            self
1895        }
1896
1897        /// Sets all the options, replacing any prior values.
1898        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1899            self.0.options = v.into();
1900            self
1901        }
1902
1903        /// Sends the request.
1904        ///
1905        /// # Long running operations
1906        ///
1907        /// This starts, but does not poll, a longrunning operation. More information
1908        /// on [create_snapshot][crate::client::NetApp::create_snapshot].
1909        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1910            (*self.0.stub)
1911                .create_snapshot(self.0.request, self.0.options)
1912                .await
1913                .map(crate::Response::into_body)
1914        }
1915
1916        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_snapshot`.
1917        pub fn poller(
1918            self,
1919        ) -> impl google_cloud_lro::Poller<crate::model::Snapshot, crate::model::OperationMetadata>
1920        {
1921            type Operation = google_cloud_lro::internal::Operation<
1922                crate::model::Snapshot,
1923                crate::model::OperationMetadata,
1924            >;
1925            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1926            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1927
1928            let stub = self.0.stub.clone();
1929            let mut options = self.0.options.clone();
1930            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1931            let query = move |name| {
1932                let stub = stub.clone();
1933                let options = options.clone();
1934                async {
1935                    let op = GetOperation::new(stub)
1936                        .set_name(name)
1937                        .with_options(options)
1938                        .send()
1939                        .await?;
1940                    Ok(Operation::new(op))
1941                }
1942            };
1943
1944            let start = move || async {
1945                let op = self.send().await?;
1946                Ok(Operation::new(op))
1947            };
1948
1949            google_cloud_lro::internal::new_poller(
1950                polling_error_policy,
1951                polling_backoff_policy,
1952                start,
1953                query,
1954            )
1955        }
1956
1957        /// Sets the value of [parent][crate::model::CreateSnapshotRequest::parent].
1958        ///
1959        /// This is a **required** field for requests.
1960        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1961            self.0.request.parent = v.into();
1962            self
1963        }
1964
1965        /// Sets the value of [snapshot][crate::model::CreateSnapshotRequest::snapshot].
1966        ///
1967        /// This is a **required** field for requests.
1968        pub fn set_snapshot<T>(mut self, v: T) -> Self
1969        where
1970            T: std::convert::Into<crate::model::Snapshot>,
1971        {
1972            self.0.request.snapshot = std::option::Option::Some(v.into());
1973            self
1974        }
1975
1976        /// Sets or clears the value of [snapshot][crate::model::CreateSnapshotRequest::snapshot].
1977        ///
1978        /// This is a **required** field for requests.
1979        pub fn set_or_clear_snapshot<T>(mut self, v: std::option::Option<T>) -> Self
1980        where
1981            T: std::convert::Into<crate::model::Snapshot>,
1982        {
1983            self.0.request.snapshot = v.map(|x| x.into());
1984            self
1985        }
1986
1987        /// Sets the value of [snapshot_id][crate::model::CreateSnapshotRequest::snapshot_id].
1988        ///
1989        /// This is a **required** field for requests.
1990        pub fn set_snapshot_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1991            self.0.request.snapshot_id = v.into();
1992            self
1993        }
1994    }
1995
1996    #[doc(hidden)]
1997    impl crate::RequestBuilder for CreateSnapshot {
1998        fn request_options(&mut self) -> &mut crate::RequestOptions {
1999            &mut self.0.options
2000        }
2001    }
2002
2003    /// The request builder for [NetApp::delete_snapshot][crate::client::NetApp::delete_snapshot] calls.
2004    ///
2005    /// # Example
2006    /// ```
2007    /// # use google_cloud_netapp_v1::builder::net_app::DeleteSnapshot;
2008    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2009    /// use google_cloud_lro::Poller;
2010    ///
2011    /// let builder = prepare_request_builder();
2012    /// let response = builder.poller().until_done().await?;
2013    /// # Ok(()) }
2014    ///
2015    /// fn prepare_request_builder() -> DeleteSnapshot {
2016    ///   # panic!();
2017    ///   // ... details omitted ...
2018    /// }
2019    /// ```
2020    #[derive(Clone, Debug)]
2021    pub struct DeleteSnapshot(RequestBuilder<crate::model::DeleteSnapshotRequest>);
2022
2023    impl DeleteSnapshot {
2024        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2025            Self(RequestBuilder::new(stub))
2026        }
2027
2028        /// Sets the full request, replacing any prior values.
2029        pub fn with_request<V: Into<crate::model::DeleteSnapshotRequest>>(mut self, v: V) -> Self {
2030            self.0.request = v.into();
2031            self
2032        }
2033
2034        /// Sets all the options, replacing any prior values.
2035        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2036            self.0.options = v.into();
2037            self
2038        }
2039
2040        /// Sends the request.
2041        ///
2042        /// # Long running operations
2043        ///
2044        /// This starts, but does not poll, a longrunning operation. More information
2045        /// on [delete_snapshot][crate::client::NetApp::delete_snapshot].
2046        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2047            (*self.0.stub)
2048                .delete_snapshot(self.0.request, self.0.options)
2049                .await
2050                .map(crate::Response::into_body)
2051        }
2052
2053        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_snapshot`.
2054        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2055            type Operation =
2056                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2057            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2058            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2059
2060            let stub = self.0.stub.clone();
2061            let mut options = self.0.options.clone();
2062            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2063            let query = move |name| {
2064                let stub = stub.clone();
2065                let options = options.clone();
2066                async {
2067                    let op = GetOperation::new(stub)
2068                        .set_name(name)
2069                        .with_options(options)
2070                        .send()
2071                        .await?;
2072                    Ok(Operation::new(op))
2073                }
2074            };
2075
2076            let start = move || async {
2077                let op = self.send().await?;
2078                Ok(Operation::new(op))
2079            };
2080
2081            google_cloud_lro::internal::new_unit_response_poller(
2082                polling_error_policy,
2083                polling_backoff_policy,
2084                start,
2085                query,
2086            )
2087        }
2088
2089        /// Sets the value of [name][crate::model::DeleteSnapshotRequest::name].
2090        ///
2091        /// This is a **required** field for requests.
2092        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2093            self.0.request.name = v.into();
2094            self
2095        }
2096    }
2097
2098    #[doc(hidden)]
2099    impl crate::RequestBuilder for DeleteSnapshot {
2100        fn request_options(&mut self) -> &mut crate::RequestOptions {
2101            &mut self.0.options
2102        }
2103    }
2104
2105    /// The request builder for [NetApp::update_snapshot][crate::client::NetApp::update_snapshot] calls.
2106    ///
2107    /// # Example
2108    /// ```
2109    /// # use google_cloud_netapp_v1::builder::net_app::UpdateSnapshot;
2110    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2111    /// use google_cloud_lro::Poller;
2112    ///
2113    /// let builder = prepare_request_builder();
2114    /// let response = builder.poller().until_done().await?;
2115    /// # Ok(()) }
2116    ///
2117    /// fn prepare_request_builder() -> UpdateSnapshot {
2118    ///   # panic!();
2119    ///   // ... details omitted ...
2120    /// }
2121    /// ```
2122    #[derive(Clone, Debug)]
2123    pub struct UpdateSnapshot(RequestBuilder<crate::model::UpdateSnapshotRequest>);
2124
2125    impl UpdateSnapshot {
2126        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2127            Self(RequestBuilder::new(stub))
2128        }
2129
2130        /// Sets the full request, replacing any prior values.
2131        pub fn with_request<V: Into<crate::model::UpdateSnapshotRequest>>(mut self, v: V) -> Self {
2132            self.0.request = v.into();
2133            self
2134        }
2135
2136        /// Sets all the options, replacing any prior values.
2137        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2138            self.0.options = v.into();
2139            self
2140        }
2141
2142        /// Sends the request.
2143        ///
2144        /// # Long running operations
2145        ///
2146        /// This starts, but does not poll, a longrunning operation. More information
2147        /// on [update_snapshot][crate::client::NetApp::update_snapshot].
2148        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2149            (*self.0.stub)
2150                .update_snapshot(self.0.request, self.0.options)
2151                .await
2152                .map(crate::Response::into_body)
2153        }
2154
2155        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_snapshot`.
2156        pub fn poller(
2157            self,
2158        ) -> impl google_cloud_lro::Poller<crate::model::Snapshot, crate::model::OperationMetadata>
2159        {
2160            type Operation = google_cloud_lro::internal::Operation<
2161                crate::model::Snapshot,
2162                crate::model::OperationMetadata,
2163            >;
2164            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2165            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2166
2167            let stub = self.0.stub.clone();
2168            let mut options = self.0.options.clone();
2169            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2170            let query = move |name| {
2171                let stub = stub.clone();
2172                let options = options.clone();
2173                async {
2174                    let op = GetOperation::new(stub)
2175                        .set_name(name)
2176                        .with_options(options)
2177                        .send()
2178                        .await?;
2179                    Ok(Operation::new(op))
2180                }
2181            };
2182
2183            let start = move || async {
2184                let op = self.send().await?;
2185                Ok(Operation::new(op))
2186            };
2187
2188            google_cloud_lro::internal::new_poller(
2189                polling_error_policy,
2190                polling_backoff_policy,
2191                start,
2192                query,
2193            )
2194        }
2195
2196        /// Sets the value of [update_mask][crate::model::UpdateSnapshotRequest::update_mask].
2197        ///
2198        /// This is a **required** field for requests.
2199        pub fn set_update_mask<T>(mut self, v: T) -> Self
2200        where
2201            T: std::convert::Into<wkt::FieldMask>,
2202        {
2203            self.0.request.update_mask = std::option::Option::Some(v.into());
2204            self
2205        }
2206
2207        /// Sets or clears the value of [update_mask][crate::model::UpdateSnapshotRequest::update_mask].
2208        ///
2209        /// This is a **required** field for requests.
2210        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2211        where
2212            T: std::convert::Into<wkt::FieldMask>,
2213        {
2214            self.0.request.update_mask = v.map(|x| x.into());
2215            self
2216        }
2217
2218        /// Sets the value of [snapshot][crate::model::UpdateSnapshotRequest::snapshot].
2219        ///
2220        /// This is a **required** field for requests.
2221        pub fn set_snapshot<T>(mut self, v: T) -> Self
2222        where
2223            T: std::convert::Into<crate::model::Snapshot>,
2224        {
2225            self.0.request.snapshot = std::option::Option::Some(v.into());
2226            self
2227        }
2228
2229        /// Sets or clears the value of [snapshot][crate::model::UpdateSnapshotRequest::snapshot].
2230        ///
2231        /// This is a **required** field for requests.
2232        pub fn set_or_clear_snapshot<T>(mut self, v: std::option::Option<T>) -> Self
2233        where
2234            T: std::convert::Into<crate::model::Snapshot>,
2235        {
2236            self.0.request.snapshot = v.map(|x| x.into());
2237            self
2238        }
2239    }
2240
2241    #[doc(hidden)]
2242    impl crate::RequestBuilder for UpdateSnapshot {
2243        fn request_options(&mut self) -> &mut crate::RequestOptions {
2244            &mut self.0.options
2245        }
2246    }
2247
2248    /// The request builder for [NetApp::list_active_directories][crate::client::NetApp::list_active_directories] calls.
2249    ///
2250    /// # Example
2251    /// ```
2252    /// # use google_cloud_netapp_v1::builder::net_app::ListActiveDirectories;
2253    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2254    /// use google_cloud_gax::paginator::ItemPaginator;
2255    ///
2256    /// let builder = prepare_request_builder();
2257    /// let mut items = builder.by_item();
2258    /// while let Some(result) = items.next().await {
2259    ///   let item = result?;
2260    /// }
2261    /// # Ok(()) }
2262    ///
2263    /// fn prepare_request_builder() -> ListActiveDirectories {
2264    ///   # panic!();
2265    ///   // ... details omitted ...
2266    /// }
2267    /// ```
2268    #[derive(Clone, Debug)]
2269    pub struct ListActiveDirectories(RequestBuilder<crate::model::ListActiveDirectoriesRequest>);
2270
2271    impl ListActiveDirectories {
2272        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2273            Self(RequestBuilder::new(stub))
2274        }
2275
2276        /// Sets the full request, replacing any prior values.
2277        pub fn with_request<V: Into<crate::model::ListActiveDirectoriesRequest>>(
2278            mut self,
2279            v: V,
2280        ) -> Self {
2281            self.0.request = v.into();
2282            self
2283        }
2284
2285        /// Sets all the options, replacing any prior values.
2286        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2287            self.0.options = v.into();
2288            self
2289        }
2290
2291        /// Sends the request.
2292        pub async fn send(self) -> Result<crate::model::ListActiveDirectoriesResponse> {
2293            (*self.0.stub)
2294                .list_active_directories(self.0.request, self.0.options)
2295                .await
2296                .map(crate::Response::into_body)
2297        }
2298
2299        /// Streams each page in the collection.
2300        pub fn by_page(
2301            self,
2302        ) -> impl google_cloud_gax::paginator::Paginator<
2303            crate::model::ListActiveDirectoriesResponse,
2304            crate::Error,
2305        > {
2306            use std::clone::Clone;
2307            let token = self.0.request.page_token.clone();
2308            let execute = move |token: String| {
2309                let mut builder = self.clone();
2310                builder.0.request = builder.0.request.set_page_token(token);
2311                builder.send()
2312            };
2313            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2314        }
2315
2316        /// Streams each item in the collection.
2317        pub fn by_item(
2318            self,
2319        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2320            crate::model::ListActiveDirectoriesResponse,
2321            crate::Error,
2322        > {
2323            use google_cloud_gax::paginator::Paginator;
2324            self.by_page().items()
2325        }
2326
2327        /// Sets the value of [parent][crate::model::ListActiveDirectoriesRequest::parent].
2328        ///
2329        /// This is a **required** field for requests.
2330        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2331            self.0.request.parent = v.into();
2332            self
2333        }
2334
2335        /// Sets the value of [page_size][crate::model::ListActiveDirectoriesRequest::page_size].
2336        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2337            self.0.request.page_size = v.into();
2338            self
2339        }
2340
2341        /// Sets the value of [page_token][crate::model::ListActiveDirectoriesRequest::page_token].
2342        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2343            self.0.request.page_token = v.into();
2344            self
2345        }
2346
2347        /// Sets the value of [filter][crate::model::ListActiveDirectoriesRequest::filter].
2348        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2349            self.0.request.filter = v.into();
2350            self
2351        }
2352
2353        /// Sets the value of [order_by][crate::model::ListActiveDirectoriesRequest::order_by].
2354        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2355            self.0.request.order_by = v.into();
2356            self
2357        }
2358    }
2359
2360    #[doc(hidden)]
2361    impl crate::RequestBuilder for ListActiveDirectories {
2362        fn request_options(&mut self) -> &mut crate::RequestOptions {
2363            &mut self.0.options
2364        }
2365    }
2366
2367    /// The request builder for [NetApp::get_active_directory][crate::client::NetApp::get_active_directory] calls.
2368    ///
2369    /// # Example
2370    /// ```
2371    /// # use google_cloud_netapp_v1::builder::net_app::GetActiveDirectory;
2372    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2373    ///
2374    /// let builder = prepare_request_builder();
2375    /// let response = builder.send().await?;
2376    /// # Ok(()) }
2377    ///
2378    /// fn prepare_request_builder() -> GetActiveDirectory {
2379    ///   # panic!();
2380    ///   // ... details omitted ...
2381    /// }
2382    /// ```
2383    #[derive(Clone, Debug)]
2384    pub struct GetActiveDirectory(RequestBuilder<crate::model::GetActiveDirectoryRequest>);
2385
2386    impl GetActiveDirectory {
2387        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2388            Self(RequestBuilder::new(stub))
2389        }
2390
2391        /// Sets the full request, replacing any prior values.
2392        pub fn with_request<V: Into<crate::model::GetActiveDirectoryRequest>>(
2393            mut self,
2394            v: V,
2395        ) -> Self {
2396            self.0.request = v.into();
2397            self
2398        }
2399
2400        /// Sets all the options, replacing any prior values.
2401        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2402            self.0.options = v.into();
2403            self
2404        }
2405
2406        /// Sends the request.
2407        pub async fn send(self) -> Result<crate::model::ActiveDirectory> {
2408            (*self.0.stub)
2409                .get_active_directory(self.0.request, self.0.options)
2410                .await
2411                .map(crate::Response::into_body)
2412        }
2413
2414        /// Sets the value of [name][crate::model::GetActiveDirectoryRequest::name].
2415        ///
2416        /// This is a **required** field for requests.
2417        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2418            self.0.request.name = v.into();
2419            self
2420        }
2421    }
2422
2423    #[doc(hidden)]
2424    impl crate::RequestBuilder for GetActiveDirectory {
2425        fn request_options(&mut self) -> &mut crate::RequestOptions {
2426            &mut self.0.options
2427        }
2428    }
2429
2430    /// The request builder for [NetApp::create_active_directory][crate::client::NetApp::create_active_directory] calls.
2431    ///
2432    /// # Example
2433    /// ```
2434    /// # use google_cloud_netapp_v1::builder::net_app::CreateActiveDirectory;
2435    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2436    /// use google_cloud_lro::Poller;
2437    ///
2438    /// let builder = prepare_request_builder();
2439    /// let response = builder.poller().until_done().await?;
2440    /// # Ok(()) }
2441    ///
2442    /// fn prepare_request_builder() -> CreateActiveDirectory {
2443    ///   # panic!();
2444    ///   // ... details omitted ...
2445    /// }
2446    /// ```
2447    #[derive(Clone, Debug)]
2448    pub struct CreateActiveDirectory(RequestBuilder<crate::model::CreateActiveDirectoryRequest>);
2449
2450    impl CreateActiveDirectory {
2451        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2452            Self(RequestBuilder::new(stub))
2453        }
2454
2455        /// Sets the full request, replacing any prior values.
2456        pub fn with_request<V: Into<crate::model::CreateActiveDirectoryRequest>>(
2457            mut self,
2458            v: V,
2459        ) -> Self {
2460            self.0.request = v.into();
2461            self
2462        }
2463
2464        /// Sets all the options, replacing any prior values.
2465        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2466            self.0.options = v.into();
2467            self
2468        }
2469
2470        /// Sends the request.
2471        ///
2472        /// # Long running operations
2473        ///
2474        /// This starts, but does not poll, a longrunning operation. More information
2475        /// on [create_active_directory][crate::client::NetApp::create_active_directory].
2476        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2477            (*self.0.stub)
2478                .create_active_directory(self.0.request, self.0.options)
2479                .await
2480                .map(crate::Response::into_body)
2481        }
2482
2483        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_active_directory`.
2484        pub fn poller(
2485            self,
2486        ) -> impl google_cloud_lro::Poller<crate::model::ActiveDirectory, crate::model::OperationMetadata>
2487        {
2488            type Operation = google_cloud_lro::internal::Operation<
2489                crate::model::ActiveDirectory,
2490                crate::model::OperationMetadata,
2491            >;
2492            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2493            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2494
2495            let stub = self.0.stub.clone();
2496            let mut options = self.0.options.clone();
2497            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2498            let query = move |name| {
2499                let stub = stub.clone();
2500                let options = options.clone();
2501                async {
2502                    let op = GetOperation::new(stub)
2503                        .set_name(name)
2504                        .with_options(options)
2505                        .send()
2506                        .await?;
2507                    Ok(Operation::new(op))
2508                }
2509            };
2510
2511            let start = move || async {
2512                let op = self.send().await?;
2513                Ok(Operation::new(op))
2514            };
2515
2516            google_cloud_lro::internal::new_poller(
2517                polling_error_policy,
2518                polling_backoff_policy,
2519                start,
2520                query,
2521            )
2522        }
2523
2524        /// Sets the value of [parent][crate::model::CreateActiveDirectoryRequest::parent].
2525        ///
2526        /// This is a **required** field for requests.
2527        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2528            self.0.request.parent = v.into();
2529            self
2530        }
2531
2532        /// Sets the value of [active_directory][crate::model::CreateActiveDirectoryRequest::active_directory].
2533        ///
2534        /// This is a **required** field for requests.
2535        pub fn set_active_directory<T>(mut self, v: T) -> Self
2536        where
2537            T: std::convert::Into<crate::model::ActiveDirectory>,
2538        {
2539            self.0.request.active_directory = std::option::Option::Some(v.into());
2540            self
2541        }
2542
2543        /// Sets or clears the value of [active_directory][crate::model::CreateActiveDirectoryRequest::active_directory].
2544        ///
2545        /// This is a **required** field for requests.
2546        pub fn set_or_clear_active_directory<T>(mut self, v: std::option::Option<T>) -> Self
2547        where
2548            T: std::convert::Into<crate::model::ActiveDirectory>,
2549        {
2550            self.0.request.active_directory = v.map(|x| x.into());
2551            self
2552        }
2553
2554        /// Sets the value of [active_directory_id][crate::model::CreateActiveDirectoryRequest::active_directory_id].
2555        ///
2556        /// This is a **required** field for requests.
2557        pub fn set_active_directory_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2558            self.0.request.active_directory_id = v.into();
2559            self
2560        }
2561    }
2562
2563    #[doc(hidden)]
2564    impl crate::RequestBuilder for CreateActiveDirectory {
2565        fn request_options(&mut self) -> &mut crate::RequestOptions {
2566            &mut self.0.options
2567        }
2568    }
2569
2570    /// The request builder for [NetApp::update_active_directory][crate::client::NetApp::update_active_directory] calls.
2571    ///
2572    /// # Example
2573    /// ```
2574    /// # use google_cloud_netapp_v1::builder::net_app::UpdateActiveDirectory;
2575    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2576    /// use google_cloud_lro::Poller;
2577    ///
2578    /// let builder = prepare_request_builder();
2579    /// let response = builder.poller().until_done().await?;
2580    /// # Ok(()) }
2581    ///
2582    /// fn prepare_request_builder() -> UpdateActiveDirectory {
2583    ///   # panic!();
2584    ///   // ... details omitted ...
2585    /// }
2586    /// ```
2587    #[derive(Clone, Debug)]
2588    pub struct UpdateActiveDirectory(RequestBuilder<crate::model::UpdateActiveDirectoryRequest>);
2589
2590    impl UpdateActiveDirectory {
2591        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2592            Self(RequestBuilder::new(stub))
2593        }
2594
2595        /// Sets the full request, replacing any prior values.
2596        pub fn with_request<V: Into<crate::model::UpdateActiveDirectoryRequest>>(
2597            mut self,
2598            v: V,
2599        ) -> Self {
2600            self.0.request = v.into();
2601            self
2602        }
2603
2604        /// Sets all the options, replacing any prior values.
2605        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2606            self.0.options = v.into();
2607            self
2608        }
2609
2610        /// Sends the request.
2611        ///
2612        /// # Long running operations
2613        ///
2614        /// This starts, but does not poll, a longrunning operation. More information
2615        /// on [update_active_directory][crate::client::NetApp::update_active_directory].
2616        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2617            (*self.0.stub)
2618                .update_active_directory(self.0.request, self.0.options)
2619                .await
2620                .map(crate::Response::into_body)
2621        }
2622
2623        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_active_directory`.
2624        pub fn poller(
2625            self,
2626        ) -> impl google_cloud_lro::Poller<crate::model::ActiveDirectory, crate::model::OperationMetadata>
2627        {
2628            type Operation = google_cloud_lro::internal::Operation<
2629                crate::model::ActiveDirectory,
2630                crate::model::OperationMetadata,
2631            >;
2632            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2633            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2634
2635            let stub = self.0.stub.clone();
2636            let mut options = self.0.options.clone();
2637            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2638            let query = move |name| {
2639                let stub = stub.clone();
2640                let options = options.clone();
2641                async {
2642                    let op = GetOperation::new(stub)
2643                        .set_name(name)
2644                        .with_options(options)
2645                        .send()
2646                        .await?;
2647                    Ok(Operation::new(op))
2648                }
2649            };
2650
2651            let start = move || async {
2652                let op = self.send().await?;
2653                Ok(Operation::new(op))
2654            };
2655
2656            google_cloud_lro::internal::new_poller(
2657                polling_error_policy,
2658                polling_backoff_policy,
2659                start,
2660                query,
2661            )
2662        }
2663
2664        /// Sets the value of [update_mask][crate::model::UpdateActiveDirectoryRequest::update_mask].
2665        ///
2666        /// This is a **required** field for requests.
2667        pub fn set_update_mask<T>(mut self, v: T) -> Self
2668        where
2669            T: std::convert::Into<wkt::FieldMask>,
2670        {
2671            self.0.request.update_mask = std::option::Option::Some(v.into());
2672            self
2673        }
2674
2675        /// Sets or clears the value of [update_mask][crate::model::UpdateActiveDirectoryRequest::update_mask].
2676        ///
2677        /// This is a **required** field for requests.
2678        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2679        where
2680            T: std::convert::Into<wkt::FieldMask>,
2681        {
2682            self.0.request.update_mask = v.map(|x| x.into());
2683            self
2684        }
2685
2686        /// Sets the value of [active_directory][crate::model::UpdateActiveDirectoryRequest::active_directory].
2687        ///
2688        /// This is a **required** field for requests.
2689        pub fn set_active_directory<T>(mut self, v: T) -> Self
2690        where
2691            T: std::convert::Into<crate::model::ActiveDirectory>,
2692        {
2693            self.0.request.active_directory = std::option::Option::Some(v.into());
2694            self
2695        }
2696
2697        /// Sets or clears the value of [active_directory][crate::model::UpdateActiveDirectoryRequest::active_directory].
2698        ///
2699        /// This is a **required** field for requests.
2700        pub fn set_or_clear_active_directory<T>(mut self, v: std::option::Option<T>) -> Self
2701        where
2702            T: std::convert::Into<crate::model::ActiveDirectory>,
2703        {
2704            self.0.request.active_directory = v.map(|x| x.into());
2705            self
2706        }
2707    }
2708
2709    #[doc(hidden)]
2710    impl crate::RequestBuilder for UpdateActiveDirectory {
2711        fn request_options(&mut self) -> &mut crate::RequestOptions {
2712            &mut self.0.options
2713        }
2714    }
2715
2716    /// The request builder for [NetApp::delete_active_directory][crate::client::NetApp::delete_active_directory] calls.
2717    ///
2718    /// # Example
2719    /// ```
2720    /// # use google_cloud_netapp_v1::builder::net_app::DeleteActiveDirectory;
2721    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2722    /// use google_cloud_lro::Poller;
2723    ///
2724    /// let builder = prepare_request_builder();
2725    /// let response = builder.poller().until_done().await?;
2726    /// # Ok(()) }
2727    ///
2728    /// fn prepare_request_builder() -> DeleteActiveDirectory {
2729    ///   # panic!();
2730    ///   // ... details omitted ...
2731    /// }
2732    /// ```
2733    #[derive(Clone, Debug)]
2734    pub struct DeleteActiveDirectory(RequestBuilder<crate::model::DeleteActiveDirectoryRequest>);
2735
2736    impl DeleteActiveDirectory {
2737        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2738            Self(RequestBuilder::new(stub))
2739        }
2740
2741        /// Sets the full request, replacing any prior values.
2742        pub fn with_request<V: Into<crate::model::DeleteActiveDirectoryRequest>>(
2743            mut self,
2744            v: V,
2745        ) -> Self {
2746            self.0.request = v.into();
2747            self
2748        }
2749
2750        /// Sets all the options, replacing any prior values.
2751        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2752            self.0.options = v.into();
2753            self
2754        }
2755
2756        /// Sends the request.
2757        ///
2758        /// # Long running operations
2759        ///
2760        /// This starts, but does not poll, a longrunning operation. More information
2761        /// on [delete_active_directory][crate::client::NetApp::delete_active_directory].
2762        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2763            (*self.0.stub)
2764                .delete_active_directory(self.0.request, self.0.options)
2765                .await
2766                .map(crate::Response::into_body)
2767        }
2768
2769        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_active_directory`.
2770        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2771            type Operation =
2772                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2773            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2774            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2775
2776            let stub = self.0.stub.clone();
2777            let mut options = self.0.options.clone();
2778            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2779            let query = move |name| {
2780                let stub = stub.clone();
2781                let options = options.clone();
2782                async {
2783                    let op = GetOperation::new(stub)
2784                        .set_name(name)
2785                        .with_options(options)
2786                        .send()
2787                        .await?;
2788                    Ok(Operation::new(op))
2789                }
2790            };
2791
2792            let start = move || async {
2793                let op = self.send().await?;
2794                Ok(Operation::new(op))
2795            };
2796
2797            google_cloud_lro::internal::new_unit_response_poller(
2798                polling_error_policy,
2799                polling_backoff_policy,
2800                start,
2801                query,
2802            )
2803        }
2804
2805        /// Sets the value of [name][crate::model::DeleteActiveDirectoryRequest::name].
2806        ///
2807        /// This is a **required** field for requests.
2808        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2809            self.0.request.name = v.into();
2810            self
2811        }
2812    }
2813
2814    #[doc(hidden)]
2815    impl crate::RequestBuilder for DeleteActiveDirectory {
2816        fn request_options(&mut self) -> &mut crate::RequestOptions {
2817            &mut self.0.options
2818        }
2819    }
2820
2821    /// The request builder for [NetApp::list_kms_configs][crate::client::NetApp::list_kms_configs] calls.
2822    ///
2823    /// # Example
2824    /// ```
2825    /// # use google_cloud_netapp_v1::builder::net_app::ListKmsConfigs;
2826    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2827    /// use google_cloud_gax::paginator::ItemPaginator;
2828    ///
2829    /// let builder = prepare_request_builder();
2830    /// let mut items = builder.by_item();
2831    /// while let Some(result) = items.next().await {
2832    ///   let item = result?;
2833    /// }
2834    /// # Ok(()) }
2835    ///
2836    /// fn prepare_request_builder() -> ListKmsConfigs {
2837    ///   # panic!();
2838    ///   // ... details omitted ...
2839    /// }
2840    /// ```
2841    #[derive(Clone, Debug)]
2842    pub struct ListKmsConfigs(RequestBuilder<crate::model::ListKmsConfigsRequest>);
2843
2844    impl ListKmsConfigs {
2845        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2846            Self(RequestBuilder::new(stub))
2847        }
2848
2849        /// Sets the full request, replacing any prior values.
2850        pub fn with_request<V: Into<crate::model::ListKmsConfigsRequest>>(mut self, v: V) -> Self {
2851            self.0.request = v.into();
2852            self
2853        }
2854
2855        /// Sets all the options, replacing any prior values.
2856        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2857            self.0.options = v.into();
2858            self
2859        }
2860
2861        /// Sends the request.
2862        pub async fn send(self) -> Result<crate::model::ListKmsConfigsResponse> {
2863            (*self.0.stub)
2864                .list_kms_configs(self.0.request, self.0.options)
2865                .await
2866                .map(crate::Response::into_body)
2867        }
2868
2869        /// Streams each page in the collection.
2870        pub fn by_page(
2871            self,
2872        ) -> impl google_cloud_gax::paginator::Paginator<
2873            crate::model::ListKmsConfigsResponse,
2874            crate::Error,
2875        > {
2876            use std::clone::Clone;
2877            let token = self.0.request.page_token.clone();
2878            let execute = move |token: String| {
2879                let mut builder = self.clone();
2880                builder.0.request = builder.0.request.set_page_token(token);
2881                builder.send()
2882            };
2883            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2884        }
2885
2886        /// Streams each item in the collection.
2887        pub fn by_item(
2888            self,
2889        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2890            crate::model::ListKmsConfigsResponse,
2891            crate::Error,
2892        > {
2893            use google_cloud_gax::paginator::Paginator;
2894            self.by_page().items()
2895        }
2896
2897        /// Sets the value of [parent][crate::model::ListKmsConfigsRequest::parent].
2898        ///
2899        /// This is a **required** field for requests.
2900        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2901            self.0.request.parent = v.into();
2902            self
2903        }
2904
2905        /// Sets the value of [page_size][crate::model::ListKmsConfigsRequest::page_size].
2906        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2907            self.0.request.page_size = v.into();
2908            self
2909        }
2910
2911        /// Sets the value of [page_token][crate::model::ListKmsConfigsRequest::page_token].
2912        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2913            self.0.request.page_token = v.into();
2914            self
2915        }
2916
2917        /// Sets the value of [order_by][crate::model::ListKmsConfigsRequest::order_by].
2918        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2919            self.0.request.order_by = v.into();
2920            self
2921        }
2922
2923        /// Sets the value of [filter][crate::model::ListKmsConfigsRequest::filter].
2924        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2925            self.0.request.filter = v.into();
2926            self
2927        }
2928    }
2929
2930    #[doc(hidden)]
2931    impl crate::RequestBuilder for ListKmsConfigs {
2932        fn request_options(&mut self) -> &mut crate::RequestOptions {
2933            &mut self.0.options
2934        }
2935    }
2936
2937    /// The request builder for [NetApp::create_kms_config][crate::client::NetApp::create_kms_config] calls.
2938    ///
2939    /// # Example
2940    /// ```
2941    /// # use google_cloud_netapp_v1::builder::net_app::CreateKmsConfig;
2942    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
2943    /// use google_cloud_lro::Poller;
2944    ///
2945    /// let builder = prepare_request_builder();
2946    /// let response = builder.poller().until_done().await?;
2947    /// # Ok(()) }
2948    ///
2949    /// fn prepare_request_builder() -> CreateKmsConfig {
2950    ///   # panic!();
2951    ///   // ... details omitted ...
2952    /// }
2953    /// ```
2954    #[derive(Clone, Debug)]
2955    pub struct CreateKmsConfig(RequestBuilder<crate::model::CreateKmsConfigRequest>);
2956
2957    impl CreateKmsConfig {
2958        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
2959            Self(RequestBuilder::new(stub))
2960        }
2961
2962        /// Sets the full request, replacing any prior values.
2963        pub fn with_request<V: Into<crate::model::CreateKmsConfigRequest>>(mut self, v: V) -> Self {
2964            self.0.request = v.into();
2965            self
2966        }
2967
2968        /// Sets all the options, replacing any prior values.
2969        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2970            self.0.options = v.into();
2971            self
2972        }
2973
2974        /// Sends the request.
2975        ///
2976        /// # Long running operations
2977        ///
2978        /// This starts, but does not poll, a longrunning operation. More information
2979        /// on [create_kms_config][crate::client::NetApp::create_kms_config].
2980        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2981            (*self.0.stub)
2982                .create_kms_config(self.0.request, self.0.options)
2983                .await
2984                .map(crate::Response::into_body)
2985        }
2986
2987        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_kms_config`.
2988        pub fn poller(
2989            self,
2990        ) -> impl google_cloud_lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata>
2991        {
2992            type Operation = google_cloud_lro::internal::Operation<
2993                crate::model::KmsConfig,
2994                crate::model::OperationMetadata,
2995            >;
2996            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2997            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2998
2999            let stub = self.0.stub.clone();
3000            let mut options = self.0.options.clone();
3001            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3002            let query = move |name| {
3003                let stub = stub.clone();
3004                let options = options.clone();
3005                async {
3006                    let op = GetOperation::new(stub)
3007                        .set_name(name)
3008                        .with_options(options)
3009                        .send()
3010                        .await?;
3011                    Ok(Operation::new(op))
3012                }
3013            };
3014
3015            let start = move || async {
3016                let op = self.send().await?;
3017                Ok(Operation::new(op))
3018            };
3019
3020            google_cloud_lro::internal::new_poller(
3021                polling_error_policy,
3022                polling_backoff_policy,
3023                start,
3024                query,
3025            )
3026        }
3027
3028        /// Sets the value of [parent][crate::model::CreateKmsConfigRequest::parent].
3029        ///
3030        /// This is a **required** field for requests.
3031        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3032            self.0.request.parent = v.into();
3033            self
3034        }
3035
3036        /// Sets the value of [kms_config_id][crate::model::CreateKmsConfigRequest::kms_config_id].
3037        ///
3038        /// This is a **required** field for requests.
3039        pub fn set_kms_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3040            self.0.request.kms_config_id = v.into();
3041            self
3042        }
3043
3044        /// Sets the value of [kms_config][crate::model::CreateKmsConfigRequest::kms_config].
3045        ///
3046        /// This is a **required** field for requests.
3047        pub fn set_kms_config<T>(mut self, v: T) -> Self
3048        where
3049            T: std::convert::Into<crate::model::KmsConfig>,
3050        {
3051            self.0.request.kms_config = std::option::Option::Some(v.into());
3052            self
3053        }
3054
3055        /// Sets or clears the value of [kms_config][crate::model::CreateKmsConfigRequest::kms_config].
3056        ///
3057        /// This is a **required** field for requests.
3058        pub fn set_or_clear_kms_config<T>(mut self, v: std::option::Option<T>) -> Self
3059        where
3060            T: std::convert::Into<crate::model::KmsConfig>,
3061        {
3062            self.0.request.kms_config = v.map(|x| x.into());
3063            self
3064        }
3065    }
3066
3067    #[doc(hidden)]
3068    impl crate::RequestBuilder for CreateKmsConfig {
3069        fn request_options(&mut self) -> &mut crate::RequestOptions {
3070            &mut self.0.options
3071        }
3072    }
3073
3074    /// The request builder for [NetApp::get_kms_config][crate::client::NetApp::get_kms_config] calls.
3075    ///
3076    /// # Example
3077    /// ```
3078    /// # use google_cloud_netapp_v1::builder::net_app::GetKmsConfig;
3079    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3080    ///
3081    /// let builder = prepare_request_builder();
3082    /// let response = builder.send().await?;
3083    /// # Ok(()) }
3084    ///
3085    /// fn prepare_request_builder() -> GetKmsConfig {
3086    ///   # panic!();
3087    ///   // ... details omitted ...
3088    /// }
3089    /// ```
3090    #[derive(Clone, Debug)]
3091    pub struct GetKmsConfig(RequestBuilder<crate::model::GetKmsConfigRequest>);
3092
3093    impl GetKmsConfig {
3094        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3095            Self(RequestBuilder::new(stub))
3096        }
3097
3098        /// Sets the full request, replacing any prior values.
3099        pub fn with_request<V: Into<crate::model::GetKmsConfigRequest>>(mut self, v: V) -> Self {
3100            self.0.request = v.into();
3101            self
3102        }
3103
3104        /// Sets all the options, replacing any prior values.
3105        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3106            self.0.options = v.into();
3107            self
3108        }
3109
3110        /// Sends the request.
3111        pub async fn send(self) -> Result<crate::model::KmsConfig> {
3112            (*self.0.stub)
3113                .get_kms_config(self.0.request, self.0.options)
3114                .await
3115                .map(crate::Response::into_body)
3116        }
3117
3118        /// Sets the value of [name][crate::model::GetKmsConfigRequest::name].
3119        ///
3120        /// This is a **required** field for requests.
3121        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3122            self.0.request.name = v.into();
3123            self
3124        }
3125    }
3126
3127    #[doc(hidden)]
3128    impl crate::RequestBuilder for GetKmsConfig {
3129        fn request_options(&mut self) -> &mut crate::RequestOptions {
3130            &mut self.0.options
3131        }
3132    }
3133
3134    /// The request builder for [NetApp::update_kms_config][crate::client::NetApp::update_kms_config] calls.
3135    ///
3136    /// # Example
3137    /// ```
3138    /// # use google_cloud_netapp_v1::builder::net_app::UpdateKmsConfig;
3139    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3140    /// use google_cloud_lro::Poller;
3141    ///
3142    /// let builder = prepare_request_builder();
3143    /// let response = builder.poller().until_done().await?;
3144    /// # Ok(()) }
3145    ///
3146    /// fn prepare_request_builder() -> UpdateKmsConfig {
3147    ///   # panic!();
3148    ///   // ... details omitted ...
3149    /// }
3150    /// ```
3151    #[derive(Clone, Debug)]
3152    pub struct UpdateKmsConfig(RequestBuilder<crate::model::UpdateKmsConfigRequest>);
3153
3154    impl UpdateKmsConfig {
3155        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3156            Self(RequestBuilder::new(stub))
3157        }
3158
3159        /// Sets the full request, replacing any prior values.
3160        pub fn with_request<V: Into<crate::model::UpdateKmsConfigRequest>>(mut self, v: V) -> Self {
3161            self.0.request = v.into();
3162            self
3163        }
3164
3165        /// Sets all the options, replacing any prior values.
3166        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3167            self.0.options = v.into();
3168            self
3169        }
3170
3171        /// Sends the request.
3172        ///
3173        /// # Long running operations
3174        ///
3175        /// This starts, but does not poll, a longrunning operation. More information
3176        /// on [update_kms_config][crate::client::NetApp::update_kms_config].
3177        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3178            (*self.0.stub)
3179                .update_kms_config(self.0.request, self.0.options)
3180                .await
3181                .map(crate::Response::into_body)
3182        }
3183
3184        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_kms_config`.
3185        pub fn poller(
3186            self,
3187        ) -> impl google_cloud_lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata>
3188        {
3189            type Operation = google_cloud_lro::internal::Operation<
3190                crate::model::KmsConfig,
3191                crate::model::OperationMetadata,
3192            >;
3193            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3194            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3195
3196            let stub = self.0.stub.clone();
3197            let mut options = self.0.options.clone();
3198            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3199            let query = move |name| {
3200                let stub = stub.clone();
3201                let options = options.clone();
3202                async {
3203                    let op = GetOperation::new(stub)
3204                        .set_name(name)
3205                        .with_options(options)
3206                        .send()
3207                        .await?;
3208                    Ok(Operation::new(op))
3209                }
3210            };
3211
3212            let start = move || async {
3213                let op = self.send().await?;
3214                Ok(Operation::new(op))
3215            };
3216
3217            google_cloud_lro::internal::new_poller(
3218                polling_error_policy,
3219                polling_backoff_policy,
3220                start,
3221                query,
3222            )
3223        }
3224
3225        /// Sets the value of [update_mask][crate::model::UpdateKmsConfigRequest::update_mask].
3226        ///
3227        /// This is a **required** field for requests.
3228        pub fn set_update_mask<T>(mut self, v: T) -> Self
3229        where
3230            T: std::convert::Into<wkt::FieldMask>,
3231        {
3232            self.0.request.update_mask = std::option::Option::Some(v.into());
3233            self
3234        }
3235
3236        /// Sets or clears the value of [update_mask][crate::model::UpdateKmsConfigRequest::update_mask].
3237        ///
3238        /// This is a **required** field for requests.
3239        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3240        where
3241            T: std::convert::Into<wkt::FieldMask>,
3242        {
3243            self.0.request.update_mask = v.map(|x| x.into());
3244            self
3245        }
3246
3247        /// Sets the value of [kms_config][crate::model::UpdateKmsConfigRequest::kms_config].
3248        ///
3249        /// This is a **required** field for requests.
3250        pub fn set_kms_config<T>(mut self, v: T) -> Self
3251        where
3252            T: std::convert::Into<crate::model::KmsConfig>,
3253        {
3254            self.0.request.kms_config = std::option::Option::Some(v.into());
3255            self
3256        }
3257
3258        /// Sets or clears the value of [kms_config][crate::model::UpdateKmsConfigRequest::kms_config].
3259        ///
3260        /// This is a **required** field for requests.
3261        pub fn set_or_clear_kms_config<T>(mut self, v: std::option::Option<T>) -> Self
3262        where
3263            T: std::convert::Into<crate::model::KmsConfig>,
3264        {
3265            self.0.request.kms_config = v.map(|x| x.into());
3266            self
3267        }
3268    }
3269
3270    #[doc(hidden)]
3271    impl crate::RequestBuilder for UpdateKmsConfig {
3272        fn request_options(&mut self) -> &mut crate::RequestOptions {
3273            &mut self.0.options
3274        }
3275    }
3276
3277    /// The request builder for [NetApp::encrypt_volumes][crate::client::NetApp::encrypt_volumes] calls.
3278    ///
3279    /// # Example
3280    /// ```
3281    /// # use google_cloud_netapp_v1::builder::net_app::EncryptVolumes;
3282    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3283    /// use google_cloud_lro::Poller;
3284    ///
3285    /// let builder = prepare_request_builder();
3286    /// let response = builder.poller().until_done().await?;
3287    /// # Ok(()) }
3288    ///
3289    /// fn prepare_request_builder() -> EncryptVolumes {
3290    ///   # panic!();
3291    ///   // ... details omitted ...
3292    /// }
3293    /// ```
3294    #[derive(Clone, Debug)]
3295    pub struct EncryptVolumes(RequestBuilder<crate::model::EncryptVolumesRequest>);
3296
3297    impl EncryptVolumes {
3298        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3299            Self(RequestBuilder::new(stub))
3300        }
3301
3302        /// Sets the full request, replacing any prior values.
3303        pub fn with_request<V: Into<crate::model::EncryptVolumesRequest>>(mut self, v: V) -> Self {
3304            self.0.request = v.into();
3305            self
3306        }
3307
3308        /// Sets all the options, replacing any prior values.
3309        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3310            self.0.options = v.into();
3311            self
3312        }
3313
3314        /// Sends the request.
3315        ///
3316        /// # Long running operations
3317        ///
3318        /// This starts, but does not poll, a longrunning operation. More information
3319        /// on [encrypt_volumes][crate::client::NetApp::encrypt_volumes].
3320        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3321            (*self.0.stub)
3322                .encrypt_volumes(self.0.request, self.0.options)
3323                .await
3324                .map(crate::Response::into_body)
3325        }
3326
3327        /// Creates a [Poller][google_cloud_lro::Poller] to work with `encrypt_volumes`.
3328        pub fn poller(
3329            self,
3330        ) -> impl google_cloud_lro::Poller<crate::model::KmsConfig, crate::model::OperationMetadata>
3331        {
3332            type Operation = google_cloud_lro::internal::Operation<
3333                crate::model::KmsConfig,
3334                crate::model::OperationMetadata,
3335            >;
3336            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3337            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3338
3339            let stub = self.0.stub.clone();
3340            let mut options = self.0.options.clone();
3341            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3342            let query = move |name| {
3343                let stub = stub.clone();
3344                let options = options.clone();
3345                async {
3346                    let op = GetOperation::new(stub)
3347                        .set_name(name)
3348                        .with_options(options)
3349                        .send()
3350                        .await?;
3351                    Ok(Operation::new(op))
3352                }
3353            };
3354
3355            let start = move || async {
3356                let op = self.send().await?;
3357                Ok(Operation::new(op))
3358            };
3359
3360            google_cloud_lro::internal::new_poller(
3361                polling_error_policy,
3362                polling_backoff_policy,
3363                start,
3364                query,
3365            )
3366        }
3367
3368        /// Sets the value of [name][crate::model::EncryptVolumesRequest::name].
3369        ///
3370        /// This is a **required** field for requests.
3371        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3372            self.0.request.name = v.into();
3373            self
3374        }
3375    }
3376
3377    #[doc(hidden)]
3378    impl crate::RequestBuilder for EncryptVolumes {
3379        fn request_options(&mut self) -> &mut crate::RequestOptions {
3380            &mut self.0.options
3381        }
3382    }
3383
3384    /// The request builder for [NetApp::verify_kms_config][crate::client::NetApp::verify_kms_config] calls.
3385    ///
3386    /// # Example
3387    /// ```
3388    /// # use google_cloud_netapp_v1::builder::net_app::VerifyKmsConfig;
3389    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3390    ///
3391    /// let builder = prepare_request_builder();
3392    /// let response = builder.send().await?;
3393    /// # Ok(()) }
3394    ///
3395    /// fn prepare_request_builder() -> VerifyKmsConfig {
3396    ///   # panic!();
3397    ///   // ... details omitted ...
3398    /// }
3399    /// ```
3400    #[derive(Clone, Debug)]
3401    pub struct VerifyKmsConfig(RequestBuilder<crate::model::VerifyKmsConfigRequest>);
3402
3403    impl VerifyKmsConfig {
3404        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3405            Self(RequestBuilder::new(stub))
3406        }
3407
3408        /// Sets the full request, replacing any prior values.
3409        pub fn with_request<V: Into<crate::model::VerifyKmsConfigRequest>>(mut self, v: V) -> Self {
3410            self.0.request = v.into();
3411            self
3412        }
3413
3414        /// Sets all the options, replacing any prior values.
3415        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3416            self.0.options = v.into();
3417            self
3418        }
3419
3420        /// Sends the request.
3421        pub async fn send(self) -> Result<crate::model::VerifyKmsConfigResponse> {
3422            (*self.0.stub)
3423                .verify_kms_config(self.0.request, self.0.options)
3424                .await
3425                .map(crate::Response::into_body)
3426        }
3427
3428        /// Sets the value of [name][crate::model::VerifyKmsConfigRequest::name].
3429        ///
3430        /// This is a **required** field for requests.
3431        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3432            self.0.request.name = v.into();
3433            self
3434        }
3435    }
3436
3437    #[doc(hidden)]
3438    impl crate::RequestBuilder for VerifyKmsConfig {
3439        fn request_options(&mut self) -> &mut crate::RequestOptions {
3440            &mut self.0.options
3441        }
3442    }
3443
3444    /// The request builder for [NetApp::delete_kms_config][crate::client::NetApp::delete_kms_config] calls.
3445    ///
3446    /// # Example
3447    /// ```
3448    /// # use google_cloud_netapp_v1::builder::net_app::DeleteKmsConfig;
3449    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3450    /// use google_cloud_lro::Poller;
3451    ///
3452    /// let builder = prepare_request_builder();
3453    /// let response = builder.poller().until_done().await?;
3454    /// # Ok(()) }
3455    ///
3456    /// fn prepare_request_builder() -> DeleteKmsConfig {
3457    ///   # panic!();
3458    ///   // ... details omitted ...
3459    /// }
3460    /// ```
3461    #[derive(Clone, Debug)]
3462    pub struct DeleteKmsConfig(RequestBuilder<crate::model::DeleteKmsConfigRequest>);
3463
3464    impl DeleteKmsConfig {
3465        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3466            Self(RequestBuilder::new(stub))
3467        }
3468
3469        /// Sets the full request, replacing any prior values.
3470        pub fn with_request<V: Into<crate::model::DeleteKmsConfigRequest>>(mut self, v: V) -> Self {
3471            self.0.request = v.into();
3472            self
3473        }
3474
3475        /// Sets all the options, replacing any prior values.
3476        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3477            self.0.options = v.into();
3478            self
3479        }
3480
3481        /// Sends the request.
3482        ///
3483        /// # Long running operations
3484        ///
3485        /// This starts, but does not poll, a longrunning operation. More information
3486        /// on [delete_kms_config][crate::client::NetApp::delete_kms_config].
3487        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3488            (*self.0.stub)
3489                .delete_kms_config(self.0.request, self.0.options)
3490                .await
3491                .map(crate::Response::into_body)
3492        }
3493
3494        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_kms_config`.
3495        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3496            type Operation =
3497                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3498            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3499            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3500
3501            let stub = self.0.stub.clone();
3502            let mut options = self.0.options.clone();
3503            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3504            let query = move |name| {
3505                let stub = stub.clone();
3506                let options = options.clone();
3507                async {
3508                    let op = GetOperation::new(stub)
3509                        .set_name(name)
3510                        .with_options(options)
3511                        .send()
3512                        .await?;
3513                    Ok(Operation::new(op))
3514                }
3515            };
3516
3517            let start = move || async {
3518                let op = self.send().await?;
3519                Ok(Operation::new(op))
3520            };
3521
3522            google_cloud_lro::internal::new_unit_response_poller(
3523                polling_error_policy,
3524                polling_backoff_policy,
3525                start,
3526                query,
3527            )
3528        }
3529
3530        /// Sets the value of [name][crate::model::DeleteKmsConfigRequest::name].
3531        ///
3532        /// This is a **required** field for requests.
3533        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3534            self.0.request.name = v.into();
3535            self
3536        }
3537    }
3538
3539    #[doc(hidden)]
3540    impl crate::RequestBuilder for DeleteKmsConfig {
3541        fn request_options(&mut self) -> &mut crate::RequestOptions {
3542            &mut self.0.options
3543        }
3544    }
3545
3546    /// The request builder for [NetApp::list_replications][crate::client::NetApp::list_replications] calls.
3547    ///
3548    /// # Example
3549    /// ```
3550    /// # use google_cloud_netapp_v1::builder::net_app::ListReplications;
3551    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3552    /// use google_cloud_gax::paginator::ItemPaginator;
3553    ///
3554    /// let builder = prepare_request_builder();
3555    /// let mut items = builder.by_item();
3556    /// while let Some(result) = items.next().await {
3557    ///   let item = result?;
3558    /// }
3559    /// # Ok(()) }
3560    ///
3561    /// fn prepare_request_builder() -> ListReplications {
3562    ///   # panic!();
3563    ///   // ... details omitted ...
3564    /// }
3565    /// ```
3566    #[derive(Clone, Debug)]
3567    pub struct ListReplications(RequestBuilder<crate::model::ListReplicationsRequest>);
3568
3569    impl ListReplications {
3570        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3571            Self(RequestBuilder::new(stub))
3572        }
3573
3574        /// Sets the full request, replacing any prior values.
3575        pub fn with_request<V: Into<crate::model::ListReplicationsRequest>>(
3576            mut self,
3577            v: V,
3578        ) -> Self {
3579            self.0.request = v.into();
3580            self
3581        }
3582
3583        /// Sets all the options, replacing any prior values.
3584        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3585            self.0.options = v.into();
3586            self
3587        }
3588
3589        /// Sends the request.
3590        pub async fn send(self) -> Result<crate::model::ListReplicationsResponse> {
3591            (*self.0.stub)
3592                .list_replications(self.0.request, self.0.options)
3593                .await
3594                .map(crate::Response::into_body)
3595        }
3596
3597        /// Streams each page in the collection.
3598        pub fn by_page(
3599            self,
3600        ) -> impl google_cloud_gax::paginator::Paginator<
3601            crate::model::ListReplicationsResponse,
3602            crate::Error,
3603        > {
3604            use std::clone::Clone;
3605            let token = self.0.request.page_token.clone();
3606            let execute = move |token: String| {
3607                let mut builder = self.clone();
3608                builder.0.request = builder.0.request.set_page_token(token);
3609                builder.send()
3610            };
3611            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3612        }
3613
3614        /// Streams each item in the collection.
3615        pub fn by_item(
3616            self,
3617        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3618            crate::model::ListReplicationsResponse,
3619            crate::Error,
3620        > {
3621            use google_cloud_gax::paginator::Paginator;
3622            self.by_page().items()
3623        }
3624
3625        /// Sets the value of [parent][crate::model::ListReplicationsRequest::parent].
3626        ///
3627        /// This is a **required** field for requests.
3628        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3629            self.0.request.parent = v.into();
3630            self
3631        }
3632
3633        /// Sets the value of [page_size][crate::model::ListReplicationsRequest::page_size].
3634        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3635            self.0.request.page_size = v.into();
3636            self
3637        }
3638
3639        /// Sets the value of [page_token][crate::model::ListReplicationsRequest::page_token].
3640        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3641            self.0.request.page_token = v.into();
3642            self
3643        }
3644
3645        /// Sets the value of [order_by][crate::model::ListReplicationsRequest::order_by].
3646        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3647            self.0.request.order_by = v.into();
3648            self
3649        }
3650
3651        /// Sets the value of [filter][crate::model::ListReplicationsRequest::filter].
3652        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3653            self.0.request.filter = v.into();
3654            self
3655        }
3656    }
3657
3658    #[doc(hidden)]
3659    impl crate::RequestBuilder for ListReplications {
3660        fn request_options(&mut self) -> &mut crate::RequestOptions {
3661            &mut self.0.options
3662        }
3663    }
3664
3665    /// The request builder for [NetApp::get_replication][crate::client::NetApp::get_replication] calls.
3666    ///
3667    /// # Example
3668    /// ```
3669    /// # use google_cloud_netapp_v1::builder::net_app::GetReplication;
3670    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3671    ///
3672    /// let builder = prepare_request_builder();
3673    /// let response = builder.send().await?;
3674    /// # Ok(()) }
3675    ///
3676    /// fn prepare_request_builder() -> GetReplication {
3677    ///   # panic!();
3678    ///   // ... details omitted ...
3679    /// }
3680    /// ```
3681    #[derive(Clone, Debug)]
3682    pub struct GetReplication(RequestBuilder<crate::model::GetReplicationRequest>);
3683
3684    impl GetReplication {
3685        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3686            Self(RequestBuilder::new(stub))
3687        }
3688
3689        /// Sets the full request, replacing any prior values.
3690        pub fn with_request<V: Into<crate::model::GetReplicationRequest>>(mut self, v: V) -> Self {
3691            self.0.request = v.into();
3692            self
3693        }
3694
3695        /// Sets all the options, replacing any prior values.
3696        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3697            self.0.options = v.into();
3698            self
3699        }
3700
3701        /// Sends the request.
3702        pub async fn send(self) -> Result<crate::model::Replication> {
3703            (*self.0.stub)
3704                .get_replication(self.0.request, self.0.options)
3705                .await
3706                .map(crate::Response::into_body)
3707        }
3708
3709        /// Sets the value of [name][crate::model::GetReplicationRequest::name].
3710        ///
3711        /// This is a **required** field for requests.
3712        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3713            self.0.request.name = v.into();
3714            self
3715        }
3716    }
3717
3718    #[doc(hidden)]
3719    impl crate::RequestBuilder for GetReplication {
3720        fn request_options(&mut self) -> &mut crate::RequestOptions {
3721            &mut self.0.options
3722        }
3723    }
3724
3725    /// The request builder for [NetApp::create_replication][crate::client::NetApp::create_replication] calls.
3726    ///
3727    /// # Example
3728    /// ```
3729    /// # use google_cloud_netapp_v1::builder::net_app::CreateReplication;
3730    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3731    /// use google_cloud_lro::Poller;
3732    ///
3733    /// let builder = prepare_request_builder();
3734    /// let response = builder.poller().until_done().await?;
3735    /// # Ok(()) }
3736    ///
3737    /// fn prepare_request_builder() -> CreateReplication {
3738    ///   # panic!();
3739    ///   // ... details omitted ...
3740    /// }
3741    /// ```
3742    #[derive(Clone, Debug)]
3743    pub struct CreateReplication(RequestBuilder<crate::model::CreateReplicationRequest>);
3744
3745    impl CreateReplication {
3746        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3747            Self(RequestBuilder::new(stub))
3748        }
3749
3750        /// Sets the full request, replacing any prior values.
3751        pub fn with_request<V: Into<crate::model::CreateReplicationRequest>>(
3752            mut self,
3753            v: V,
3754        ) -> Self {
3755            self.0.request = v.into();
3756            self
3757        }
3758
3759        /// Sets all the options, replacing any prior values.
3760        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3761            self.0.options = v.into();
3762            self
3763        }
3764
3765        /// Sends the request.
3766        ///
3767        /// # Long running operations
3768        ///
3769        /// This starts, but does not poll, a longrunning operation. More information
3770        /// on [create_replication][crate::client::NetApp::create_replication].
3771        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3772            (*self.0.stub)
3773                .create_replication(self.0.request, self.0.options)
3774                .await
3775                .map(crate::Response::into_body)
3776        }
3777
3778        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_replication`.
3779        pub fn poller(
3780            self,
3781        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
3782        {
3783            type Operation = google_cloud_lro::internal::Operation<
3784                crate::model::Replication,
3785                crate::model::OperationMetadata,
3786            >;
3787            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3788            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3789
3790            let stub = self.0.stub.clone();
3791            let mut options = self.0.options.clone();
3792            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3793            let query = move |name| {
3794                let stub = stub.clone();
3795                let options = options.clone();
3796                async {
3797                    let op = GetOperation::new(stub)
3798                        .set_name(name)
3799                        .with_options(options)
3800                        .send()
3801                        .await?;
3802                    Ok(Operation::new(op))
3803                }
3804            };
3805
3806            let start = move || async {
3807                let op = self.send().await?;
3808                Ok(Operation::new(op))
3809            };
3810
3811            google_cloud_lro::internal::new_poller(
3812                polling_error_policy,
3813                polling_backoff_policy,
3814                start,
3815                query,
3816            )
3817        }
3818
3819        /// Sets the value of [parent][crate::model::CreateReplicationRequest::parent].
3820        ///
3821        /// This is a **required** field for requests.
3822        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3823            self.0.request.parent = v.into();
3824            self
3825        }
3826
3827        /// Sets the value of [replication][crate::model::CreateReplicationRequest::replication].
3828        ///
3829        /// This is a **required** field for requests.
3830        pub fn set_replication<T>(mut self, v: T) -> Self
3831        where
3832            T: std::convert::Into<crate::model::Replication>,
3833        {
3834            self.0.request.replication = std::option::Option::Some(v.into());
3835            self
3836        }
3837
3838        /// Sets or clears the value of [replication][crate::model::CreateReplicationRequest::replication].
3839        ///
3840        /// This is a **required** field for requests.
3841        pub fn set_or_clear_replication<T>(mut self, v: std::option::Option<T>) -> Self
3842        where
3843            T: std::convert::Into<crate::model::Replication>,
3844        {
3845            self.0.request.replication = v.map(|x| x.into());
3846            self
3847        }
3848
3849        /// Sets the value of [replication_id][crate::model::CreateReplicationRequest::replication_id].
3850        ///
3851        /// This is a **required** field for requests.
3852        pub fn set_replication_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3853            self.0.request.replication_id = v.into();
3854            self
3855        }
3856    }
3857
3858    #[doc(hidden)]
3859    impl crate::RequestBuilder for CreateReplication {
3860        fn request_options(&mut self) -> &mut crate::RequestOptions {
3861            &mut self.0.options
3862        }
3863    }
3864
3865    /// The request builder for [NetApp::delete_replication][crate::client::NetApp::delete_replication] calls.
3866    ///
3867    /// # Example
3868    /// ```
3869    /// # use google_cloud_netapp_v1::builder::net_app::DeleteReplication;
3870    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3871    /// use google_cloud_lro::Poller;
3872    ///
3873    /// let builder = prepare_request_builder();
3874    /// let response = builder.poller().until_done().await?;
3875    /// # Ok(()) }
3876    ///
3877    /// fn prepare_request_builder() -> DeleteReplication {
3878    ///   # panic!();
3879    ///   // ... details omitted ...
3880    /// }
3881    /// ```
3882    #[derive(Clone, Debug)]
3883    pub struct DeleteReplication(RequestBuilder<crate::model::DeleteReplicationRequest>);
3884
3885    impl DeleteReplication {
3886        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3887            Self(RequestBuilder::new(stub))
3888        }
3889
3890        /// Sets the full request, replacing any prior values.
3891        pub fn with_request<V: Into<crate::model::DeleteReplicationRequest>>(
3892            mut self,
3893            v: V,
3894        ) -> Self {
3895            self.0.request = v.into();
3896            self
3897        }
3898
3899        /// Sets all the options, replacing any prior values.
3900        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3901            self.0.options = v.into();
3902            self
3903        }
3904
3905        /// Sends the request.
3906        ///
3907        /// # Long running operations
3908        ///
3909        /// This starts, but does not poll, a longrunning operation. More information
3910        /// on [delete_replication][crate::client::NetApp::delete_replication].
3911        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3912            (*self.0.stub)
3913                .delete_replication(self.0.request, self.0.options)
3914                .await
3915                .map(crate::Response::into_body)
3916        }
3917
3918        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_replication`.
3919        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3920            type Operation =
3921                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3922            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3923            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3924
3925            let stub = self.0.stub.clone();
3926            let mut options = self.0.options.clone();
3927            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3928            let query = move |name| {
3929                let stub = stub.clone();
3930                let options = options.clone();
3931                async {
3932                    let op = GetOperation::new(stub)
3933                        .set_name(name)
3934                        .with_options(options)
3935                        .send()
3936                        .await?;
3937                    Ok(Operation::new(op))
3938                }
3939            };
3940
3941            let start = move || async {
3942                let op = self.send().await?;
3943                Ok(Operation::new(op))
3944            };
3945
3946            google_cloud_lro::internal::new_unit_response_poller(
3947                polling_error_policy,
3948                polling_backoff_policy,
3949                start,
3950                query,
3951            )
3952        }
3953
3954        /// Sets the value of [name][crate::model::DeleteReplicationRequest::name].
3955        ///
3956        /// This is a **required** field for requests.
3957        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3958            self.0.request.name = v.into();
3959            self
3960        }
3961    }
3962
3963    #[doc(hidden)]
3964    impl crate::RequestBuilder for DeleteReplication {
3965        fn request_options(&mut self) -> &mut crate::RequestOptions {
3966            &mut self.0.options
3967        }
3968    }
3969
3970    /// The request builder for [NetApp::update_replication][crate::client::NetApp::update_replication] calls.
3971    ///
3972    /// # Example
3973    /// ```
3974    /// # use google_cloud_netapp_v1::builder::net_app::UpdateReplication;
3975    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
3976    /// use google_cloud_lro::Poller;
3977    ///
3978    /// let builder = prepare_request_builder();
3979    /// let response = builder.poller().until_done().await?;
3980    /// # Ok(()) }
3981    ///
3982    /// fn prepare_request_builder() -> UpdateReplication {
3983    ///   # panic!();
3984    ///   // ... details omitted ...
3985    /// }
3986    /// ```
3987    #[derive(Clone, Debug)]
3988    pub struct UpdateReplication(RequestBuilder<crate::model::UpdateReplicationRequest>);
3989
3990    impl UpdateReplication {
3991        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
3992            Self(RequestBuilder::new(stub))
3993        }
3994
3995        /// Sets the full request, replacing any prior values.
3996        pub fn with_request<V: Into<crate::model::UpdateReplicationRequest>>(
3997            mut self,
3998            v: V,
3999        ) -> Self {
4000            self.0.request = v.into();
4001            self
4002        }
4003
4004        /// Sets all the options, replacing any prior values.
4005        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4006            self.0.options = v.into();
4007            self
4008        }
4009
4010        /// Sends the request.
4011        ///
4012        /// # Long running operations
4013        ///
4014        /// This starts, but does not poll, a longrunning operation. More information
4015        /// on [update_replication][crate::client::NetApp::update_replication].
4016        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4017            (*self.0.stub)
4018                .update_replication(self.0.request, self.0.options)
4019                .await
4020                .map(crate::Response::into_body)
4021        }
4022
4023        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_replication`.
4024        pub fn poller(
4025            self,
4026        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4027        {
4028            type Operation = google_cloud_lro::internal::Operation<
4029                crate::model::Replication,
4030                crate::model::OperationMetadata,
4031            >;
4032            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4033            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4034
4035            let stub = self.0.stub.clone();
4036            let mut options = self.0.options.clone();
4037            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4038            let query = move |name| {
4039                let stub = stub.clone();
4040                let options = options.clone();
4041                async {
4042                    let op = GetOperation::new(stub)
4043                        .set_name(name)
4044                        .with_options(options)
4045                        .send()
4046                        .await?;
4047                    Ok(Operation::new(op))
4048                }
4049            };
4050
4051            let start = move || async {
4052                let op = self.send().await?;
4053                Ok(Operation::new(op))
4054            };
4055
4056            google_cloud_lro::internal::new_poller(
4057                polling_error_policy,
4058                polling_backoff_policy,
4059                start,
4060                query,
4061            )
4062        }
4063
4064        /// Sets the value of [update_mask][crate::model::UpdateReplicationRequest::update_mask].
4065        ///
4066        /// This is a **required** field for requests.
4067        pub fn set_update_mask<T>(mut self, v: T) -> Self
4068        where
4069            T: std::convert::Into<wkt::FieldMask>,
4070        {
4071            self.0.request.update_mask = std::option::Option::Some(v.into());
4072            self
4073        }
4074
4075        /// Sets or clears the value of [update_mask][crate::model::UpdateReplicationRequest::update_mask].
4076        ///
4077        /// This is a **required** field for requests.
4078        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4079        where
4080            T: std::convert::Into<wkt::FieldMask>,
4081        {
4082            self.0.request.update_mask = v.map(|x| x.into());
4083            self
4084        }
4085
4086        /// Sets the value of [replication][crate::model::UpdateReplicationRequest::replication].
4087        ///
4088        /// This is a **required** field for requests.
4089        pub fn set_replication<T>(mut self, v: T) -> Self
4090        where
4091            T: std::convert::Into<crate::model::Replication>,
4092        {
4093            self.0.request.replication = std::option::Option::Some(v.into());
4094            self
4095        }
4096
4097        /// Sets or clears the value of [replication][crate::model::UpdateReplicationRequest::replication].
4098        ///
4099        /// This is a **required** field for requests.
4100        pub fn set_or_clear_replication<T>(mut self, v: std::option::Option<T>) -> Self
4101        where
4102            T: std::convert::Into<crate::model::Replication>,
4103        {
4104            self.0.request.replication = v.map(|x| x.into());
4105            self
4106        }
4107    }
4108
4109    #[doc(hidden)]
4110    impl crate::RequestBuilder for UpdateReplication {
4111        fn request_options(&mut self) -> &mut crate::RequestOptions {
4112            &mut self.0.options
4113        }
4114    }
4115
4116    /// The request builder for [NetApp::stop_replication][crate::client::NetApp::stop_replication] calls.
4117    ///
4118    /// # Example
4119    /// ```
4120    /// # use google_cloud_netapp_v1::builder::net_app::StopReplication;
4121    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4122    /// use google_cloud_lro::Poller;
4123    ///
4124    /// let builder = prepare_request_builder();
4125    /// let response = builder.poller().until_done().await?;
4126    /// # Ok(()) }
4127    ///
4128    /// fn prepare_request_builder() -> StopReplication {
4129    ///   # panic!();
4130    ///   // ... details omitted ...
4131    /// }
4132    /// ```
4133    #[derive(Clone, Debug)]
4134    pub struct StopReplication(RequestBuilder<crate::model::StopReplicationRequest>);
4135
4136    impl StopReplication {
4137        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4138            Self(RequestBuilder::new(stub))
4139        }
4140
4141        /// Sets the full request, replacing any prior values.
4142        pub fn with_request<V: Into<crate::model::StopReplicationRequest>>(mut self, v: V) -> Self {
4143            self.0.request = v.into();
4144            self
4145        }
4146
4147        /// Sets all the options, replacing any prior values.
4148        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4149            self.0.options = v.into();
4150            self
4151        }
4152
4153        /// Sends the request.
4154        ///
4155        /// # Long running operations
4156        ///
4157        /// This starts, but does not poll, a longrunning operation. More information
4158        /// on [stop_replication][crate::client::NetApp::stop_replication].
4159        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4160            (*self.0.stub)
4161                .stop_replication(self.0.request, self.0.options)
4162                .await
4163                .map(crate::Response::into_body)
4164        }
4165
4166        /// Creates a [Poller][google_cloud_lro::Poller] to work with `stop_replication`.
4167        pub fn poller(
4168            self,
4169        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4170        {
4171            type Operation = google_cloud_lro::internal::Operation<
4172                crate::model::Replication,
4173                crate::model::OperationMetadata,
4174            >;
4175            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4176            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4177
4178            let stub = self.0.stub.clone();
4179            let mut options = self.0.options.clone();
4180            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4181            let query = move |name| {
4182                let stub = stub.clone();
4183                let options = options.clone();
4184                async {
4185                    let op = GetOperation::new(stub)
4186                        .set_name(name)
4187                        .with_options(options)
4188                        .send()
4189                        .await?;
4190                    Ok(Operation::new(op))
4191                }
4192            };
4193
4194            let start = move || async {
4195                let op = self.send().await?;
4196                Ok(Operation::new(op))
4197            };
4198
4199            google_cloud_lro::internal::new_poller(
4200                polling_error_policy,
4201                polling_backoff_policy,
4202                start,
4203                query,
4204            )
4205        }
4206
4207        /// Sets the value of [name][crate::model::StopReplicationRequest::name].
4208        ///
4209        /// This is a **required** field for requests.
4210        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4211            self.0.request.name = v.into();
4212            self
4213        }
4214
4215        /// Sets the value of [force][crate::model::StopReplicationRequest::force].
4216        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
4217            self.0.request.force = v.into();
4218            self
4219        }
4220    }
4221
4222    #[doc(hidden)]
4223    impl crate::RequestBuilder for StopReplication {
4224        fn request_options(&mut self) -> &mut crate::RequestOptions {
4225            &mut self.0.options
4226        }
4227    }
4228
4229    /// The request builder for [NetApp::resume_replication][crate::client::NetApp::resume_replication] calls.
4230    ///
4231    /// # Example
4232    /// ```
4233    /// # use google_cloud_netapp_v1::builder::net_app::ResumeReplication;
4234    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4235    /// use google_cloud_lro::Poller;
4236    ///
4237    /// let builder = prepare_request_builder();
4238    /// let response = builder.poller().until_done().await?;
4239    /// # Ok(()) }
4240    ///
4241    /// fn prepare_request_builder() -> ResumeReplication {
4242    ///   # panic!();
4243    ///   // ... details omitted ...
4244    /// }
4245    /// ```
4246    #[derive(Clone, Debug)]
4247    pub struct ResumeReplication(RequestBuilder<crate::model::ResumeReplicationRequest>);
4248
4249    impl ResumeReplication {
4250        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4251            Self(RequestBuilder::new(stub))
4252        }
4253
4254        /// Sets the full request, replacing any prior values.
4255        pub fn with_request<V: Into<crate::model::ResumeReplicationRequest>>(
4256            mut self,
4257            v: V,
4258        ) -> Self {
4259            self.0.request = v.into();
4260            self
4261        }
4262
4263        /// Sets all the options, replacing any prior values.
4264        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4265            self.0.options = v.into();
4266            self
4267        }
4268
4269        /// Sends the request.
4270        ///
4271        /// # Long running operations
4272        ///
4273        /// This starts, but does not poll, a longrunning operation. More information
4274        /// on [resume_replication][crate::client::NetApp::resume_replication].
4275        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4276            (*self.0.stub)
4277                .resume_replication(self.0.request, self.0.options)
4278                .await
4279                .map(crate::Response::into_body)
4280        }
4281
4282        /// Creates a [Poller][google_cloud_lro::Poller] to work with `resume_replication`.
4283        pub fn poller(
4284            self,
4285        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4286        {
4287            type Operation = google_cloud_lro::internal::Operation<
4288                crate::model::Replication,
4289                crate::model::OperationMetadata,
4290            >;
4291            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4292            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4293
4294            let stub = self.0.stub.clone();
4295            let mut options = self.0.options.clone();
4296            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4297            let query = move |name| {
4298                let stub = stub.clone();
4299                let options = options.clone();
4300                async {
4301                    let op = GetOperation::new(stub)
4302                        .set_name(name)
4303                        .with_options(options)
4304                        .send()
4305                        .await?;
4306                    Ok(Operation::new(op))
4307                }
4308            };
4309
4310            let start = move || async {
4311                let op = self.send().await?;
4312                Ok(Operation::new(op))
4313            };
4314
4315            google_cloud_lro::internal::new_poller(
4316                polling_error_policy,
4317                polling_backoff_policy,
4318                start,
4319                query,
4320            )
4321        }
4322
4323        /// Sets the value of [name][crate::model::ResumeReplicationRequest::name].
4324        ///
4325        /// This is a **required** field for requests.
4326        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4327            self.0.request.name = v.into();
4328            self
4329        }
4330    }
4331
4332    #[doc(hidden)]
4333    impl crate::RequestBuilder for ResumeReplication {
4334        fn request_options(&mut self) -> &mut crate::RequestOptions {
4335            &mut self.0.options
4336        }
4337    }
4338
4339    /// The request builder for [NetApp::reverse_replication_direction][crate::client::NetApp::reverse_replication_direction] calls.
4340    ///
4341    /// # Example
4342    /// ```
4343    /// # use google_cloud_netapp_v1::builder::net_app::ReverseReplicationDirection;
4344    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4345    /// use google_cloud_lro::Poller;
4346    ///
4347    /// let builder = prepare_request_builder();
4348    /// let response = builder.poller().until_done().await?;
4349    /// # Ok(()) }
4350    ///
4351    /// fn prepare_request_builder() -> ReverseReplicationDirection {
4352    ///   # panic!();
4353    ///   // ... details omitted ...
4354    /// }
4355    /// ```
4356    #[derive(Clone, Debug)]
4357    pub struct ReverseReplicationDirection(
4358        RequestBuilder<crate::model::ReverseReplicationDirectionRequest>,
4359    );
4360
4361    impl ReverseReplicationDirection {
4362        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4363            Self(RequestBuilder::new(stub))
4364        }
4365
4366        /// Sets the full request, replacing any prior values.
4367        pub fn with_request<V: Into<crate::model::ReverseReplicationDirectionRequest>>(
4368            mut self,
4369            v: V,
4370        ) -> Self {
4371            self.0.request = v.into();
4372            self
4373        }
4374
4375        /// Sets all the options, replacing any prior values.
4376        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4377            self.0.options = v.into();
4378            self
4379        }
4380
4381        /// Sends the request.
4382        ///
4383        /// # Long running operations
4384        ///
4385        /// This starts, but does not poll, a longrunning operation. More information
4386        /// on [reverse_replication_direction][crate::client::NetApp::reverse_replication_direction].
4387        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4388            (*self.0.stub)
4389                .reverse_replication_direction(self.0.request, self.0.options)
4390                .await
4391                .map(crate::Response::into_body)
4392        }
4393
4394        /// Creates a [Poller][google_cloud_lro::Poller] to work with `reverse_replication_direction`.
4395        pub fn poller(
4396            self,
4397        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4398        {
4399            type Operation = google_cloud_lro::internal::Operation<
4400                crate::model::Replication,
4401                crate::model::OperationMetadata,
4402            >;
4403            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4404            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4405
4406            let stub = self.0.stub.clone();
4407            let mut options = self.0.options.clone();
4408            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4409            let query = move |name| {
4410                let stub = stub.clone();
4411                let options = options.clone();
4412                async {
4413                    let op = GetOperation::new(stub)
4414                        .set_name(name)
4415                        .with_options(options)
4416                        .send()
4417                        .await?;
4418                    Ok(Operation::new(op))
4419                }
4420            };
4421
4422            let start = move || async {
4423                let op = self.send().await?;
4424                Ok(Operation::new(op))
4425            };
4426
4427            google_cloud_lro::internal::new_poller(
4428                polling_error_policy,
4429                polling_backoff_policy,
4430                start,
4431                query,
4432            )
4433        }
4434
4435        /// Sets the value of [name][crate::model::ReverseReplicationDirectionRequest::name].
4436        ///
4437        /// This is a **required** field for requests.
4438        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4439            self.0.request.name = v.into();
4440            self
4441        }
4442    }
4443
4444    #[doc(hidden)]
4445    impl crate::RequestBuilder for ReverseReplicationDirection {
4446        fn request_options(&mut self) -> &mut crate::RequestOptions {
4447            &mut self.0.options
4448        }
4449    }
4450
4451    /// The request builder for [NetApp::establish_peering][crate::client::NetApp::establish_peering] calls.
4452    ///
4453    /// # Example
4454    /// ```
4455    /// # use google_cloud_netapp_v1::builder::net_app::EstablishPeering;
4456    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4457    /// use google_cloud_lro::Poller;
4458    ///
4459    /// let builder = prepare_request_builder();
4460    /// let response = builder.poller().until_done().await?;
4461    /// # Ok(()) }
4462    ///
4463    /// fn prepare_request_builder() -> EstablishPeering {
4464    ///   # panic!();
4465    ///   // ... details omitted ...
4466    /// }
4467    /// ```
4468    #[derive(Clone, Debug)]
4469    pub struct EstablishPeering(RequestBuilder<crate::model::EstablishPeeringRequest>);
4470
4471    impl EstablishPeering {
4472        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4473            Self(RequestBuilder::new(stub))
4474        }
4475
4476        /// Sets the full request, replacing any prior values.
4477        pub fn with_request<V: Into<crate::model::EstablishPeeringRequest>>(
4478            mut self,
4479            v: V,
4480        ) -> Self {
4481            self.0.request = v.into();
4482            self
4483        }
4484
4485        /// Sets all the options, replacing any prior values.
4486        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4487            self.0.options = v.into();
4488            self
4489        }
4490
4491        /// Sends the request.
4492        ///
4493        /// # Long running operations
4494        ///
4495        /// This starts, but does not poll, a longrunning operation. More information
4496        /// on [establish_peering][crate::client::NetApp::establish_peering].
4497        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4498            (*self.0.stub)
4499                .establish_peering(self.0.request, self.0.options)
4500                .await
4501                .map(crate::Response::into_body)
4502        }
4503
4504        /// Creates a [Poller][google_cloud_lro::Poller] to work with `establish_peering`.
4505        pub fn poller(
4506            self,
4507        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4508        {
4509            type Operation = google_cloud_lro::internal::Operation<
4510                crate::model::Replication,
4511                crate::model::OperationMetadata,
4512            >;
4513            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4514            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4515
4516            let stub = self.0.stub.clone();
4517            let mut options = self.0.options.clone();
4518            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4519            let query = move |name| {
4520                let stub = stub.clone();
4521                let options = options.clone();
4522                async {
4523                    let op = GetOperation::new(stub)
4524                        .set_name(name)
4525                        .with_options(options)
4526                        .send()
4527                        .await?;
4528                    Ok(Operation::new(op))
4529                }
4530            };
4531
4532            let start = move || async {
4533                let op = self.send().await?;
4534                Ok(Operation::new(op))
4535            };
4536
4537            google_cloud_lro::internal::new_poller(
4538                polling_error_policy,
4539                polling_backoff_policy,
4540                start,
4541                query,
4542            )
4543        }
4544
4545        /// Sets the value of [name][crate::model::EstablishPeeringRequest::name].
4546        ///
4547        /// This is a **required** field for requests.
4548        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4549            self.0.request.name = v.into();
4550            self
4551        }
4552
4553        /// Sets the value of [peer_cluster_name][crate::model::EstablishPeeringRequest::peer_cluster_name].
4554        ///
4555        /// This is a **required** field for requests.
4556        pub fn set_peer_cluster_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4557            self.0.request.peer_cluster_name = v.into();
4558            self
4559        }
4560
4561        /// Sets the value of [peer_svm_name][crate::model::EstablishPeeringRequest::peer_svm_name].
4562        ///
4563        /// This is a **required** field for requests.
4564        pub fn set_peer_svm_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4565            self.0.request.peer_svm_name = v.into();
4566            self
4567        }
4568
4569        /// Sets the value of [peer_ip_addresses][crate::model::EstablishPeeringRequest::peer_ip_addresses].
4570        pub fn set_peer_ip_addresses<T, V>(mut self, v: T) -> Self
4571        where
4572            T: std::iter::IntoIterator<Item = V>,
4573            V: std::convert::Into<std::string::String>,
4574        {
4575            use std::iter::Iterator;
4576            self.0.request.peer_ip_addresses = v.into_iter().map(|i| i.into()).collect();
4577            self
4578        }
4579
4580        /// Sets the value of [peer_volume_name][crate::model::EstablishPeeringRequest::peer_volume_name].
4581        ///
4582        /// This is a **required** field for requests.
4583        pub fn set_peer_volume_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4584            self.0.request.peer_volume_name = v.into();
4585            self
4586        }
4587    }
4588
4589    #[doc(hidden)]
4590    impl crate::RequestBuilder for EstablishPeering {
4591        fn request_options(&mut self) -> &mut crate::RequestOptions {
4592            &mut self.0.options
4593        }
4594    }
4595
4596    /// The request builder for [NetApp::sync_replication][crate::client::NetApp::sync_replication] calls.
4597    ///
4598    /// # Example
4599    /// ```
4600    /// # use google_cloud_netapp_v1::builder::net_app::SyncReplication;
4601    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4602    /// use google_cloud_lro::Poller;
4603    ///
4604    /// let builder = prepare_request_builder();
4605    /// let response = builder.poller().until_done().await?;
4606    /// # Ok(()) }
4607    ///
4608    /// fn prepare_request_builder() -> SyncReplication {
4609    ///   # panic!();
4610    ///   // ... details omitted ...
4611    /// }
4612    /// ```
4613    #[derive(Clone, Debug)]
4614    pub struct SyncReplication(RequestBuilder<crate::model::SyncReplicationRequest>);
4615
4616    impl SyncReplication {
4617        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4618            Self(RequestBuilder::new(stub))
4619        }
4620
4621        /// Sets the full request, replacing any prior values.
4622        pub fn with_request<V: Into<crate::model::SyncReplicationRequest>>(mut self, v: V) -> Self {
4623            self.0.request = v.into();
4624            self
4625        }
4626
4627        /// Sets all the options, replacing any prior values.
4628        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4629            self.0.options = v.into();
4630            self
4631        }
4632
4633        /// Sends the request.
4634        ///
4635        /// # Long running operations
4636        ///
4637        /// This starts, but does not poll, a longrunning operation. More information
4638        /// on [sync_replication][crate::client::NetApp::sync_replication].
4639        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4640            (*self.0.stub)
4641                .sync_replication(self.0.request, self.0.options)
4642                .await
4643                .map(crate::Response::into_body)
4644        }
4645
4646        /// Creates a [Poller][google_cloud_lro::Poller] to work with `sync_replication`.
4647        pub fn poller(
4648            self,
4649        ) -> impl google_cloud_lro::Poller<crate::model::Replication, crate::model::OperationMetadata>
4650        {
4651            type Operation = google_cloud_lro::internal::Operation<
4652                crate::model::Replication,
4653                crate::model::OperationMetadata,
4654            >;
4655            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4656            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4657
4658            let stub = self.0.stub.clone();
4659            let mut options = self.0.options.clone();
4660            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4661            let query = move |name| {
4662                let stub = stub.clone();
4663                let options = options.clone();
4664                async {
4665                    let op = GetOperation::new(stub)
4666                        .set_name(name)
4667                        .with_options(options)
4668                        .send()
4669                        .await?;
4670                    Ok(Operation::new(op))
4671                }
4672            };
4673
4674            let start = move || async {
4675                let op = self.send().await?;
4676                Ok(Operation::new(op))
4677            };
4678
4679            google_cloud_lro::internal::new_poller(
4680                polling_error_policy,
4681                polling_backoff_policy,
4682                start,
4683                query,
4684            )
4685        }
4686
4687        /// Sets the value of [name][crate::model::SyncReplicationRequest::name].
4688        ///
4689        /// This is a **required** field for requests.
4690        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4691            self.0.request.name = v.into();
4692            self
4693        }
4694    }
4695
4696    #[doc(hidden)]
4697    impl crate::RequestBuilder for SyncReplication {
4698        fn request_options(&mut self) -> &mut crate::RequestOptions {
4699            &mut self.0.options
4700        }
4701    }
4702
4703    /// The request builder for [NetApp::create_backup_vault][crate::client::NetApp::create_backup_vault] calls.
4704    ///
4705    /// # Example
4706    /// ```
4707    /// # use google_cloud_netapp_v1::builder::net_app::CreateBackupVault;
4708    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4709    /// use google_cloud_lro::Poller;
4710    ///
4711    /// let builder = prepare_request_builder();
4712    /// let response = builder.poller().until_done().await?;
4713    /// # Ok(()) }
4714    ///
4715    /// fn prepare_request_builder() -> CreateBackupVault {
4716    ///   # panic!();
4717    ///   // ... details omitted ...
4718    /// }
4719    /// ```
4720    #[derive(Clone, Debug)]
4721    pub struct CreateBackupVault(RequestBuilder<crate::model::CreateBackupVaultRequest>);
4722
4723    impl CreateBackupVault {
4724        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4725            Self(RequestBuilder::new(stub))
4726        }
4727
4728        /// Sets the full request, replacing any prior values.
4729        pub fn with_request<V: Into<crate::model::CreateBackupVaultRequest>>(
4730            mut self,
4731            v: V,
4732        ) -> Self {
4733            self.0.request = v.into();
4734            self
4735        }
4736
4737        /// Sets all the options, replacing any prior values.
4738        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4739            self.0.options = v.into();
4740            self
4741        }
4742
4743        /// Sends the request.
4744        ///
4745        /// # Long running operations
4746        ///
4747        /// This starts, but does not poll, a longrunning operation. More information
4748        /// on [create_backup_vault][crate::client::NetApp::create_backup_vault].
4749        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4750            (*self.0.stub)
4751                .create_backup_vault(self.0.request, self.0.options)
4752                .await
4753                .map(crate::Response::into_body)
4754        }
4755
4756        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_backup_vault`.
4757        pub fn poller(
4758            self,
4759        ) -> impl google_cloud_lro::Poller<crate::model::BackupVault, crate::model::OperationMetadata>
4760        {
4761            type Operation = google_cloud_lro::internal::Operation<
4762                crate::model::BackupVault,
4763                crate::model::OperationMetadata,
4764            >;
4765            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4766            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4767
4768            let stub = self.0.stub.clone();
4769            let mut options = self.0.options.clone();
4770            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4771            let query = move |name| {
4772                let stub = stub.clone();
4773                let options = options.clone();
4774                async {
4775                    let op = GetOperation::new(stub)
4776                        .set_name(name)
4777                        .with_options(options)
4778                        .send()
4779                        .await?;
4780                    Ok(Operation::new(op))
4781                }
4782            };
4783
4784            let start = move || async {
4785                let op = self.send().await?;
4786                Ok(Operation::new(op))
4787            };
4788
4789            google_cloud_lro::internal::new_poller(
4790                polling_error_policy,
4791                polling_backoff_policy,
4792                start,
4793                query,
4794            )
4795        }
4796
4797        /// Sets the value of [parent][crate::model::CreateBackupVaultRequest::parent].
4798        ///
4799        /// This is a **required** field for requests.
4800        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4801            self.0.request.parent = v.into();
4802            self
4803        }
4804
4805        /// Sets the value of [backup_vault_id][crate::model::CreateBackupVaultRequest::backup_vault_id].
4806        ///
4807        /// This is a **required** field for requests.
4808        pub fn set_backup_vault_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4809            self.0.request.backup_vault_id = v.into();
4810            self
4811        }
4812
4813        /// Sets the value of [backup_vault][crate::model::CreateBackupVaultRequest::backup_vault].
4814        ///
4815        /// This is a **required** field for requests.
4816        pub fn set_backup_vault<T>(mut self, v: T) -> Self
4817        where
4818            T: std::convert::Into<crate::model::BackupVault>,
4819        {
4820            self.0.request.backup_vault = std::option::Option::Some(v.into());
4821            self
4822        }
4823
4824        /// Sets or clears the value of [backup_vault][crate::model::CreateBackupVaultRequest::backup_vault].
4825        ///
4826        /// This is a **required** field for requests.
4827        pub fn set_or_clear_backup_vault<T>(mut self, v: std::option::Option<T>) -> Self
4828        where
4829            T: std::convert::Into<crate::model::BackupVault>,
4830        {
4831            self.0.request.backup_vault = v.map(|x| x.into());
4832            self
4833        }
4834    }
4835
4836    #[doc(hidden)]
4837    impl crate::RequestBuilder for CreateBackupVault {
4838        fn request_options(&mut self) -> &mut crate::RequestOptions {
4839            &mut self.0.options
4840        }
4841    }
4842
4843    /// The request builder for [NetApp::get_backup_vault][crate::client::NetApp::get_backup_vault] calls.
4844    ///
4845    /// # Example
4846    /// ```
4847    /// # use google_cloud_netapp_v1::builder::net_app::GetBackupVault;
4848    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4849    ///
4850    /// let builder = prepare_request_builder();
4851    /// let response = builder.send().await?;
4852    /// # Ok(()) }
4853    ///
4854    /// fn prepare_request_builder() -> GetBackupVault {
4855    ///   # panic!();
4856    ///   // ... details omitted ...
4857    /// }
4858    /// ```
4859    #[derive(Clone, Debug)]
4860    pub struct GetBackupVault(RequestBuilder<crate::model::GetBackupVaultRequest>);
4861
4862    impl GetBackupVault {
4863        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4864            Self(RequestBuilder::new(stub))
4865        }
4866
4867        /// Sets the full request, replacing any prior values.
4868        pub fn with_request<V: Into<crate::model::GetBackupVaultRequest>>(mut self, v: V) -> Self {
4869            self.0.request = v.into();
4870            self
4871        }
4872
4873        /// Sets all the options, replacing any prior values.
4874        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4875            self.0.options = v.into();
4876            self
4877        }
4878
4879        /// Sends the request.
4880        pub async fn send(self) -> Result<crate::model::BackupVault> {
4881            (*self.0.stub)
4882                .get_backup_vault(self.0.request, self.0.options)
4883                .await
4884                .map(crate::Response::into_body)
4885        }
4886
4887        /// Sets the value of [name][crate::model::GetBackupVaultRequest::name].
4888        ///
4889        /// This is a **required** field for requests.
4890        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4891            self.0.request.name = v.into();
4892            self
4893        }
4894    }
4895
4896    #[doc(hidden)]
4897    impl crate::RequestBuilder for GetBackupVault {
4898        fn request_options(&mut self) -> &mut crate::RequestOptions {
4899            &mut self.0.options
4900        }
4901    }
4902
4903    /// The request builder for [NetApp::list_backup_vaults][crate::client::NetApp::list_backup_vaults] calls.
4904    ///
4905    /// # Example
4906    /// ```
4907    /// # use google_cloud_netapp_v1::builder::net_app::ListBackupVaults;
4908    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
4909    /// use google_cloud_gax::paginator::ItemPaginator;
4910    ///
4911    /// let builder = prepare_request_builder();
4912    /// let mut items = builder.by_item();
4913    /// while let Some(result) = items.next().await {
4914    ///   let item = result?;
4915    /// }
4916    /// # Ok(()) }
4917    ///
4918    /// fn prepare_request_builder() -> ListBackupVaults {
4919    ///   # panic!();
4920    ///   // ... details omitted ...
4921    /// }
4922    /// ```
4923    #[derive(Clone, Debug)]
4924    pub struct ListBackupVaults(RequestBuilder<crate::model::ListBackupVaultsRequest>);
4925
4926    impl ListBackupVaults {
4927        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
4928            Self(RequestBuilder::new(stub))
4929        }
4930
4931        /// Sets the full request, replacing any prior values.
4932        pub fn with_request<V: Into<crate::model::ListBackupVaultsRequest>>(
4933            mut self,
4934            v: V,
4935        ) -> Self {
4936            self.0.request = v.into();
4937            self
4938        }
4939
4940        /// Sets all the options, replacing any prior values.
4941        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4942            self.0.options = v.into();
4943            self
4944        }
4945
4946        /// Sends the request.
4947        pub async fn send(self) -> Result<crate::model::ListBackupVaultsResponse> {
4948            (*self.0.stub)
4949                .list_backup_vaults(self.0.request, self.0.options)
4950                .await
4951                .map(crate::Response::into_body)
4952        }
4953
4954        /// Streams each page in the collection.
4955        pub fn by_page(
4956            self,
4957        ) -> impl google_cloud_gax::paginator::Paginator<
4958            crate::model::ListBackupVaultsResponse,
4959            crate::Error,
4960        > {
4961            use std::clone::Clone;
4962            let token = self.0.request.page_token.clone();
4963            let execute = move |token: String| {
4964                let mut builder = self.clone();
4965                builder.0.request = builder.0.request.set_page_token(token);
4966                builder.send()
4967            };
4968            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4969        }
4970
4971        /// Streams each item in the collection.
4972        pub fn by_item(
4973            self,
4974        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4975            crate::model::ListBackupVaultsResponse,
4976            crate::Error,
4977        > {
4978            use google_cloud_gax::paginator::Paginator;
4979            self.by_page().items()
4980        }
4981
4982        /// Sets the value of [parent][crate::model::ListBackupVaultsRequest::parent].
4983        ///
4984        /// This is a **required** field for requests.
4985        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4986            self.0.request.parent = v.into();
4987            self
4988        }
4989
4990        /// Sets the value of [page_size][crate::model::ListBackupVaultsRequest::page_size].
4991        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4992            self.0.request.page_size = v.into();
4993            self
4994        }
4995
4996        /// Sets the value of [page_token][crate::model::ListBackupVaultsRequest::page_token].
4997        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4998            self.0.request.page_token = v.into();
4999            self
5000        }
5001
5002        /// Sets the value of [order_by][crate::model::ListBackupVaultsRequest::order_by].
5003        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5004            self.0.request.order_by = v.into();
5005            self
5006        }
5007
5008        /// Sets the value of [filter][crate::model::ListBackupVaultsRequest::filter].
5009        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5010            self.0.request.filter = v.into();
5011            self
5012        }
5013    }
5014
5015    #[doc(hidden)]
5016    impl crate::RequestBuilder for ListBackupVaults {
5017        fn request_options(&mut self) -> &mut crate::RequestOptions {
5018            &mut self.0.options
5019        }
5020    }
5021
5022    /// The request builder for [NetApp::update_backup_vault][crate::client::NetApp::update_backup_vault] calls.
5023    ///
5024    /// # Example
5025    /// ```
5026    /// # use google_cloud_netapp_v1::builder::net_app::UpdateBackupVault;
5027    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5028    /// use google_cloud_lro::Poller;
5029    ///
5030    /// let builder = prepare_request_builder();
5031    /// let response = builder.poller().until_done().await?;
5032    /// # Ok(()) }
5033    ///
5034    /// fn prepare_request_builder() -> UpdateBackupVault {
5035    ///   # panic!();
5036    ///   // ... details omitted ...
5037    /// }
5038    /// ```
5039    #[derive(Clone, Debug)]
5040    pub struct UpdateBackupVault(RequestBuilder<crate::model::UpdateBackupVaultRequest>);
5041
5042    impl UpdateBackupVault {
5043        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5044            Self(RequestBuilder::new(stub))
5045        }
5046
5047        /// Sets the full request, replacing any prior values.
5048        pub fn with_request<V: Into<crate::model::UpdateBackupVaultRequest>>(
5049            mut self,
5050            v: V,
5051        ) -> Self {
5052            self.0.request = v.into();
5053            self
5054        }
5055
5056        /// Sets all the options, replacing any prior values.
5057        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5058            self.0.options = v.into();
5059            self
5060        }
5061
5062        /// Sends the request.
5063        ///
5064        /// # Long running operations
5065        ///
5066        /// This starts, but does not poll, a longrunning operation. More information
5067        /// on [update_backup_vault][crate::client::NetApp::update_backup_vault].
5068        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5069            (*self.0.stub)
5070                .update_backup_vault(self.0.request, self.0.options)
5071                .await
5072                .map(crate::Response::into_body)
5073        }
5074
5075        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_backup_vault`.
5076        pub fn poller(
5077            self,
5078        ) -> impl google_cloud_lro::Poller<crate::model::BackupVault, crate::model::OperationMetadata>
5079        {
5080            type Operation = google_cloud_lro::internal::Operation<
5081                crate::model::BackupVault,
5082                crate::model::OperationMetadata,
5083            >;
5084            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5085            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5086
5087            let stub = self.0.stub.clone();
5088            let mut options = self.0.options.clone();
5089            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5090            let query = move |name| {
5091                let stub = stub.clone();
5092                let options = options.clone();
5093                async {
5094                    let op = GetOperation::new(stub)
5095                        .set_name(name)
5096                        .with_options(options)
5097                        .send()
5098                        .await?;
5099                    Ok(Operation::new(op))
5100                }
5101            };
5102
5103            let start = move || async {
5104                let op = self.send().await?;
5105                Ok(Operation::new(op))
5106            };
5107
5108            google_cloud_lro::internal::new_poller(
5109                polling_error_policy,
5110                polling_backoff_policy,
5111                start,
5112                query,
5113            )
5114        }
5115
5116        /// Sets the value of [update_mask][crate::model::UpdateBackupVaultRequest::update_mask].
5117        ///
5118        /// This is a **required** field for requests.
5119        pub fn set_update_mask<T>(mut self, v: T) -> Self
5120        where
5121            T: std::convert::Into<wkt::FieldMask>,
5122        {
5123            self.0.request.update_mask = std::option::Option::Some(v.into());
5124            self
5125        }
5126
5127        /// Sets or clears the value of [update_mask][crate::model::UpdateBackupVaultRequest::update_mask].
5128        ///
5129        /// This is a **required** field for requests.
5130        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5131        where
5132            T: std::convert::Into<wkt::FieldMask>,
5133        {
5134            self.0.request.update_mask = v.map(|x| x.into());
5135            self
5136        }
5137
5138        /// Sets the value of [backup_vault][crate::model::UpdateBackupVaultRequest::backup_vault].
5139        ///
5140        /// This is a **required** field for requests.
5141        pub fn set_backup_vault<T>(mut self, v: T) -> Self
5142        where
5143            T: std::convert::Into<crate::model::BackupVault>,
5144        {
5145            self.0.request.backup_vault = std::option::Option::Some(v.into());
5146            self
5147        }
5148
5149        /// Sets or clears the value of [backup_vault][crate::model::UpdateBackupVaultRequest::backup_vault].
5150        ///
5151        /// This is a **required** field for requests.
5152        pub fn set_or_clear_backup_vault<T>(mut self, v: std::option::Option<T>) -> Self
5153        where
5154            T: std::convert::Into<crate::model::BackupVault>,
5155        {
5156            self.0.request.backup_vault = v.map(|x| x.into());
5157            self
5158        }
5159    }
5160
5161    #[doc(hidden)]
5162    impl crate::RequestBuilder for UpdateBackupVault {
5163        fn request_options(&mut self) -> &mut crate::RequestOptions {
5164            &mut self.0.options
5165        }
5166    }
5167
5168    /// The request builder for [NetApp::delete_backup_vault][crate::client::NetApp::delete_backup_vault] calls.
5169    ///
5170    /// # Example
5171    /// ```
5172    /// # use google_cloud_netapp_v1::builder::net_app::DeleteBackupVault;
5173    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5174    /// use google_cloud_lro::Poller;
5175    ///
5176    /// let builder = prepare_request_builder();
5177    /// let response = builder.poller().until_done().await?;
5178    /// # Ok(()) }
5179    ///
5180    /// fn prepare_request_builder() -> DeleteBackupVault {
5181    ///   # panic!();
5182    ///   // ... details omitted ...
5183    /// }
5184    /// ```
5185    #[derive(Clone, Debug)]
5186    pub struct DeleteBackupVault(RequestBuilder<crate::model::DeleteBackupVaultRequest>);
5187
5188    impl DeleteBackupVault {
5189        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5190            Self(RequestBuilder::new(stub))
5191        }
5192
5193        /// Sets the full request, replacing any prior values.
5194        pub fn with_request<V: Into<crate::model::DeleteBackupVaultRequest>>(
5195            mut self,
5196            v: V,
5197        ) -> Self {
5198            self.0.request = v.into();
5199            self
5200        }
5201
5202        /// Sets all the options, replacing any prior values.
5203        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5204            self.0.options = v.into();
5205            self
5206        }
5207
5208        /// Sends the request.
5209        ///
5210        /// # Long running operations
5211        ///
5212        /// This starts, but does not poll, a longrunning operation. More information
5213        /// on [delete_backup_vault][crate::client::NetApp::delete_backup_vault].
5214        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5215            (*self.0.stub)
5216                .delete_backup_vault(self.0.request, self.0.options)
5217                .await
5218                .map(crate::Response::into_body)
5219        }
5220
5221        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_backup_vault`.
5222        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5223            type Operation =
5224                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5225            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5226            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5227
5228            let stub = self.0.stub.clone();
5229            let mut options = self.0.options.clone();
5230            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5231            let query = move |name| {
5232                let stub = stub.clone();
5233                let options = options.clone();
5234                async {
5235                    let op = GetOperation::new(stub)
5236                        .set_name(name)
5237                        .with_options(options)
5238                        .send()
5239                        .await?;
5240                    Ok(Operation::new(op))
5241                }
5242            };
5243
5244            let start = move || async {
5245                let op = self.send().await?;
5246                Ok(Operation::new(op))
5247            };
5248
5249            google_cloud_lro::internal::new_unit_response_poller(
5250                polling_error_policy,
5251                polling_backoff_policy,
5252                start,
5253                query,
5254            )
5255        }
5256
5257        /// Sets the value of [name][crate::model::DeleteBackupVaultRequest::name].
5258        ///
5259        /// This is a **required** field for requests.
5260        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5261            self.0.request.name = v.into();
5262            self
5263        }
5264    }
5265
5266    #[doc(hidden)]
5267    impl crate::RequestBuilder for DeleteBackupVault {
5268        fn request_options(&mut self) -> &mut crate::RequestOptions {
5269            &mut self.0.options
5270        }
5271    }
5272
5273    /// The request builder for [NetApp::create_backup][crate::client::NetApp::create_backup] calls.
5274    ///
5275    /// # Example
5276    /// ```
5277    /// # use google_cloud_netapp_v1::builder::net_app::CreateBackup;
5278    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5279    /// use google_cloud_lro::Poller;
5280    ///
5281    /// let builder = prepare_request_builder();
5282    /// let response = builder.poller().until_done().await?;
5283    /// # Ok(()) }
5284    ///
5285    /// fn prepare_request_builder() -> CreateBackup {
5286    ///   # panic!();
5287    ///   // ... details omitted ...
5288    /// }
5289    /// ```
5290    #[derive(Clone, Debug)]
5291    pub struct CreateBackup(RequestBuilder<crate::model::CreateBackupRequest>);
5292
5293    impl CreateBackup {
5294        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5295            Self(RequestBuilder::new(stub))
5296        }
5297
5298        /// Sets the full request, replacing any prior values.
5299        pub fn with_request<V: Into<crate::model::CreateBackupRequest>>(mut self, v: V) -> Self {
5300            self.0.request = v.into();
5301            self
5302        }
5303
5304        /// Sets all the options, replacing any prior values.
5305        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5306            self.0.options = v.into();
5307            self
5308        }
5309
5310        /// Sends the request.
5311        ///
5312        /// # Long running operations
5313        ///
5314        /// This starts, but does not poll, a longrunning operation. More information
5315        /// on [create_backup][crate::client::NetApp::create_backup].
5316        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5317            (*self.0.stub)
5318                .create_backup(self.0.request, self.0.options)
5319                .await
5320                .map(crate::Response::into_body)
5321        }
5322
5323        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_backup`.
5324        pub fn poller(
5325            self,
5326        ) -> impl google_cloud_lro::Poller<crate::model::Backup, crate::model::OperationMetadata>
5327        {
5328            type Operation = google_cloud_lro::internal::Operation<
5329                crate::model::Backup,
5330                crate::model::OperationMetadata,
5331            >;
5332            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5333            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5334
5335            let stub = self.0.stub.clone();
5336            let mut options = self.0.options.clone();
5337            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5338            let query = move |name| {
5339                let stub = stub.clone();
5340                let options = options.clone();
5341                async {
5342                    let op = GetOperation::new(stub)
5343                        .set_name(name)
5344                        .with_options(options)
5345                        .send()
5346                        .await?;
5347                    Ok(Operation::new(op))
5348                }
5349            };
5350
5351            let start = move || async {
5352                let op = self.send().await?;
5353                Ok(Operation::new(op))
5354            };
5355
5356            google_cloud_lro::internal::new_poller(
5357                polling_error_policy,
5358                polling_backoff_policy,
5359                start,
5360                query,
5361            )
5362        }
5363
5364        /// Sets the value of [parent][crate::model::CreateBackupRequest::parent].
5365        ///
5366        /// This is a **required** field for requests.
5367        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5368            self.0.request.parent = v.into();
5369            self
5370        }
5371
5372        /// Sets the value of [backup_id][crate::model::CreateBackupRequest::backup_id].
5373        ///
5374        /// This is a **required** field for requests.
5375        pub fn set_backup_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5376            self.0.request.backup_id = v.into();
5377            self
5378        }
5379
5380        /// Sets the value of [backup][crate::model::CreateBackupRequest::backup].
5381        ///
5382        /// This is a **required** field for requests.
5383        pub fn set_backup<T>(mut self, v: T) -> Self
5384        where
5385            T: std::convert::Into<crate::model::Backup>,
5386        {
5387            self.0.request.backup = std::option::Option::Some(v.into());
5388            self
5389        }
5390
5391        /// Sets or clears the value of [backup][crate::model::CreateBackupRequest::backup].
5392        ///
5393        /// This is a **required** field for requests.
5394        pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5395        where
5396            T: std::convert::Into<crate::model::Backup>,
5397        {
5398            self.0.request.backup = v.map(|x| x.into());
5399            self
5400        }
5401    }
5402
5403    #[doc(hidden)]
5404    impl crate::RequestBuilder for CreateBackup {
5405        fn request_options(&mut self) -> &mut crate::RequestOptions {
5406            &mut self.0.options
5407        }
5408    }
5409
5410    /// The request builder for [NetApp::get_backup][crate::client::NetApp::get_backup] calls.
5411    ///
5412    /// # Example
5413    /// ```
5414    /// # use google_cloud_netapp_v1::builder::net_app::GetBackup;
5415    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5416    ///
5417    /// let builder = prepare_request_builder();
5418    /// let response = builder.send().await?;
5419    /// # Ok(()) }
5420    ///
5421    /// fn prepare_request_builder() -> GetBackup {
5422    ///   # panic!();
5423    ///   // ... details omitted ...
5424    /// }
5425    /// ```
5426    #[derive(Clone, Debug)]
5427    pub struct GetBackup(RequestBuilder<crate::model::GetBackupRequest>);
5428
5429    impl GetBackup {
5430        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5431            Self(RequestBuilder::new(stub))
5432        }
5433
5434        /// Sets the full request, replacing any prior values.
5435        pub fn with_request<V: Into<crate::model::GetBackupRequest>>(mut self, v: V) -> Self {
5436            self.0.request = v.into();
5437            self
5438        }
5439
5440        /// Sets all the options, replacing any prior values.
5441        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5442            self.0.options = v.into();
5443            self
5444        }
5445
5446        /// Sends the request.
5447        pub async fn send(self) -> Result<crate::model::Backup> {
5448            (*self.0.stub)
5449                .get_backup(self.0.request, self.0.options)
5450                .await
5451                .map(crate::Response::into_body)
5452        }
5453
5454        /// Sets the value of [name][crate::model::GetBackupRequest::name].
5455        ///
5456        /// This is a **required** field for requests.
5457        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5458            self.0.request.name = v.into();
5459            self
5460        }
5461    }
5462
5463    #[doc(hidden)]
5464    impl crate::RequestBuilder for GetBackup {
5465        fn request_options(&mut self) -> &mut crate::RequestOptions {
5466            &mut self.0.options
5467        }
5468    }
5469
5470    /// The request builder for [NetApp::list_backups][crate::client::NetApp::list_backups] calls.
5471    ///
5472    /// # Example
5473    /// ```
5474    /// # use google_cloud_netapp_v1::builder::net_app::ListBackups;
5475    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5476    /// use google_cloud_gax::paginator::ItemPaginator;
5477    ///
5478    /// let builder = prepare_request_builder();
5479    /// let mut items = builder.by_item();
5480    /// while let Some(result) = items.next().await {
5481    ///   let item = result?;
5482    /// }
5483    /// # Ok(()) }
5484    ///
5485    /// fn prepare_request_builder() -> ListBackups {
5486    ///   # panic!();
5487    ///   // ... details omitted ...
5488    /// }
5489    /// ```
5490    #[derive(Clone, Debug)]
5491    pub struct ListBackups(RequestBuilder<crate::model::ListBackupsRequest>);
5492
5493    impl ListBackups {
5494        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5495            Self(RequestBuilder::new(stub))
5496        }
5497
5498        /// Sets the full request, replacing any prior values.
5499        pub fn with_request<V: Into<crate::model::ListBackupsRequest>>(mut self, v: V) -> Self {
5500            self.0.request = v.into();
5501            self
5502        }
5503
5504        /// Sets all the options, replacing any prior values.
5505        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5506            self.0.options = v.into();
5507            self
5508        }
5509
5510        /// Sends the request.
5511        pub async fn send(self) -> Result<crate::model::ListBackupsResponse> {
5512            (*self.0.stub)
5513                .list_backups(self.0.request, self.0.options)
5514                .await
5515                .map(crate::Response::into_body)
5516        }
5517
5518        /// Streams each page in the collection.
5519        pub fn by_page(
5520            self,
5521        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListBackupsResponse, crate::Error>
5522        {
5523            use std::clone::Clone;
5524            let token = self.0.request.page_token.clone();
5525            let execute = move |token: String| {
5526                let mut builder = self.clone();
5527                builder.0.request = builder.0.request.set_page_token(token);
5528                builder.send()
5529            };
5530            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5531        }
5532
5533        /// Streams each item in the collection.
5534        pub fn by_item(
5535            self,
5536        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5537            crate::model::ListBackupsResponse,
5538            crate::Error,
5539        > {
5540            use google_cloud_gax::paginator::Paginator;
5541            self.by_page().items()
5542        }
5543
5544        /// Sets the value of [parent][crate::model::ListBackupsRequest::parent].
5545        ///
5546        /// This is a **required** field for requests.
5547        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5548            self.0.request.parent = v.into();
5549            self
5550        }
5551
5552        /// Sets the value of [page_size][crate::model::ListBackupsRequest::page_size].
5553        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5554            self.0.request.page_size = v.into();
5555            self
5556        }
5557
5558        /// Sets the value of [page_token][crate::model::ListBackupsRequest::page_token].
5559        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5560            self.0.request.page_token = v.into();
5561            self
5562        }
5563
5564        /// Sets the value of [order_by][crate::model::ListBackupsRequest::order_by].
5565        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5566            self.0.request.order_by = v.into();
5567            self
5568        }
5569
5570        /// Sets the value of [filter][crate::model::ListBackupsRequest::filter].
5571        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5572            self.0.request.filter = v.into();
5573            self
5574        }
5575    }
5576
5577    #[doc(hidden)]
5578    impl crate::RequestBuilder for ListBackups {
5579        fn request_options(&mut self) -> &mut crate::RequestOptions {
5580            &mut self.0.options
5581        }
5582    }
5583
5584    /// The request builder for [NetApp::delete_backup][crate::client::NetApp::delete_backup] calls.
5585    ///
5586    /// # Example
5587    /// ```
5588    /// # use google_cloud_netapp_v1::builder::net_app::DeleteBackup;
5589    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5590    /// use google_cloud_lro::Poller;
5591    ///
5592    /// let builder = prepare_request_builder();
5593    /// let response = builder.poller().until_done().await?;
5594    /// # Ok(()) }
5595    ///
5596    /// fn prepare_request_builder() -> DeleteBackup {
5597    ///   # panic!();
5598    ///   // ... details omitted ...
5599    /// }
5600    /// ```
5601    #[derive(Clone, Debug)]
5602    pub struct DeleteBackup(RequestBuilder<crate::model::DeleteBackupRequest>);
5603
5604    impl DeleteBackup {
5605        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5606            Self(RequestBuilder::new(stub))
5607        }
5608
5609        /// Sets the full request, replacing any prior values.
5610        pub fn with_request<V: Into<crate::model::DeleteBackupRequest>>(mut self, v: V) -> Self {
5611            self.0.request = v.into();
5612            self
5613        }
5614
5615        /// Sets all the options, replacing any prior values.
5616        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5617            self.0.options = v.into();
5618            self
5619        }
5620
5621        /// Sends the request.
5622        ///
5623        /// # Long running operations
5624        ///
5625        /// This starts, but does not poll, a longrunning operation. More information
5626        /// on [delete_backup][crate::client::NetApp::delete_backup].
5627        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5628            (*self.0.stub)
5629                .delete_backup(self.0.request, self.0.options)
5630                .await
5631                .map(crate::Response::into_body)
5632        }
5633
5634        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_backup`.
5635        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5636            type Operation =
5637                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5638            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5639            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5640
5641            let stub = self.0.stub.clone();
5642            let mut options = self.0.options.clone();
5643            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5644            let query = move |name| {
5645                let stub = stub.clone();
5646                let options = options.clone();
5647                async {
5648                    let op = GetOperation::new(stub)
5649                        .set_name(name)
5650                        .with_options(options)
5651                        .send()
5652                        .await?;
5653                    Ok(Operation::new(op))
5654                }
5655            };
5656
5657            let start = move || async {
5658                let op = self.send().await?;
5659                Ok(Operation::new(op))
5660            };
5661
5662            google_cloud_lro::internal::new_unit_response_poller(
5663                polling_error_policy,
5664                polling_backoff_policy,
5665                start,
5666                query,
5667            )
5668        }
5669
5670        /// Sets the value of [name][crate::model::DeleteBackupRequest::name].
5671        ///
5672        /// This is a **required** field for requests.
5673        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5674            self.0.request.name = v.into();
5675            self
5676        }
5677    }
5678
5679    #[doc(hidden)]
5680    impl crate::RequestBuilder for DeleteBackup {
5681        fn request_options(&mut self) -> &mut crate::RequestOptions {
5682            &mut self.0.options
5683        }
5684    }
5685
5686    /// The request builder for [NetApp::update_backup][crate::client::NetApp::update_backup] calls.
5687    ///
5688    /// # Example
5689    /// ```
5690    /// # use google_cloud_netapp_v1::builder::net_app::UpdateBackup;
5691    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5692    /// use google_cloud_lro::Poller;
5693    ///
5694    /// let builder = prepare_request_builder();
5695    /// let response = builder.poller().until_done().await?;
5696    /// # Ok(()) }
5697    ///
5698    /// fn prepare_request_builder() -> UpdateBackup {
5699    ///   # panic!();
5700    ///   // ... details omitted ...
5701    /// }
5702    /// ```
5703    #[derive(Clone, Debug)]
5704    pub struct UpdateBackup(RequestBuilder<crate::model::UpdateBackupRequest>);
5705
5706    impl UpdateBackup {
5707        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5708            Self(RequestBuilder::new(stub))
5709        }
5710
5711        /// Sets the full request, replacing any prior values.
5712        pub fn with_request<V: Into<crate::model::UpdateBackupRequest>>(mut self, v: V) -> Self {
5713            self.0.request = v.into();
5714            self
5715        }
5716
5717        /// Sets all the options, replacing any prior values.
5718        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5719            self.0.options = v.into();
5720            self
5721        }
5722
5723        /// Sends the request.
5724        ///
5725        /// # Long running operations
5726        ///
5727        /// This starts, but does not poll, a longrunning operation. More information
5728        /// on [update_backup][crate::client::NetApp::update_backup].
5729        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5730            (*self.0.stub)
5731                .update_backup(self.0.request, self.0.options)
5732                .await
5733                .map(crate::Response::into_body)
5734        }
5735
5736        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_backup`.
5737        pub fn poller(
5738            self,
5739        ) -> impl google_cloud_lro::Poller<crate::model::Backup, crate::model::OperationMetadata>
5740        {
5741            type Operation = google_cloud_lro::internal::Operation<
5742                crate::model::Backup,
5743                crate::model::OperationMetadata,
5744            >;
5745            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5746            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5747
5748            let stub = self.0.stub.clone();
5749            let mut options = self.0.options.clone();
5750            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5751            let query = move |name| {
5752                let stub = stub.clone();
5753                let options = options.clone();
5754                async {
5755                    let op = GetOperation::new(stub)
5756                        .set_name(name)
5757                        .with_options(options)
5758                        .send()
5759                        .await?;
5760                    Ok(Operation::new(op))
5761                }
5762            };
5763
5764            let start = move || async {
5765                let op = self.send().await?;
5766                Ok(Operation::new(op))
5767            };
5768
5769            google_cloud_lro::internal::new_poller(
5770                polling_error_policy,
5771                polling_backoff_policy,
5772                start,
5773                query,
5774            )
5775        }
5776
5777        /// Sets the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
5778        ///
5779        /// This is a **required** field for requests.
5780        pub fn set_update_mask<T>(mut self, v: T) -> Self
5781        where
5782            T: std::convert::Into<wkt::FieldMask>,
5783        {
5784            self.0.request.update_mask = std::option::Option::Some(v.into());
5785            self
5786        }
5787
5788        /// Sets or clears the value of [update_mask][crate::model::UpdateBackupRequest::update_mask].
5789        ///
5790        /// This is a **required** field for requests.
5791        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5792        where
5793            T: std::convert::Into<wkt::FieldMask>,
5794        {
5795            self.0.request.update_mask = v.map(|x| x.into());
5796            self
5797        }
5798
5799        /// Sets the value of [backup][crate::model::UpdateBackupRequest::backup].
5800        ///
5801        /// This is a **required** field for requests.
5802        pub fn set_backup<T>(mut self, v: T) -> Self
5803        where
5804            T: std::convert::Into<crate::model::Backup>,
5805        {
5806            self.0.request.backup = std::option::Option::Some(v.into());
5807            self
5808        }
5809
5810        /// Sets or clears the value of [backup][crate::model::UpdateBackupRequest::backup].
5811        ///
5812        /// This is a **required** field for requests.
5813        pub fn set_or_clear_backup<T>(mut self, v: std::option::Option<T>) -> Self
5814        where
5815            T: std::convert::Into<crate::model::Backup>,
5816        {
5817            self.0.request.backup = v.map(|x| x.into());
5818            self
5819        }
5820    }
5821
5822    #[doc(hidden)]
5823    impl crate::RequestBuilder for UpdateBackup {
5824        fn request_options(&mut self) -> &mut crate::RequestOptions {
5825            &mut self.0.options
5826        }
5827    }
5828
5829    /// The request builder for [NetApp::create_backup_policy][crate::client::NetApp::create_backup_policy] calls.
5830    ///
5831    /// # Example
5832    /// ```
5833    /// # use google_cloud_netapp_v1::builder::net_app::CreateBackupPolicy;
5834    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5835    /// use google_cloud_lro::Poller;
5836    ///
5837    /// let builder = prepare_request_builder();
5838    /// let response = builder.poller().until_done().await?;
5839    /// # Ok(()) }
5840    ///
5841    /// fn prepare_request_builder() -> CreateBackupPolicy {
5842    ///   # panic!();
5843    ///   // ... details omitted ...
5844    /// }
5845    /// ```
5846    #[derive(Clone, Debug)]
5847    pub struct CreateBackupPolicy(RequestBuilder<crate::model::CreateBackupPolicyRequest>);
5848
5849    impl CreateBackupPolicy {
5850        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5851            Self(RequestBuilder::new(stub))
5852        }
5853
5854        /// Sets the full request, replacing any prior values.
5855        pub fn with_request<V: Into<crate::model::CreateBackupPolicyRequest>>(
5856            mut self,
5857            v: V,
5858        ) -> Self {
5859            self.0.request = v.into();
5860            self
5861        }
5862
5863        /// Sets all the options, replacing any prior values.
5864        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5865            self.0.options = v.into();
5866            self
5867        }
5868
5869        /// Sends the request.
5870        ///
5871        /// # Long running operations
5872        ///
5873        /// This starts, but does not poll, a longrunning operation. More information
5874        /// on [create_backup_policy][crate::client::NetApp::create_backup_policy].
5875        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5876            (*self.0.stub)
5877                .create_backup_policy(self.0.request, self.0.options)
5878                .await
5879                .map(crate::Response::into_body)
5880        }
5881
5882        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_backup_policy`.
5883        pub fn poller(
5884            self,
5885        ) -> impl google_cloud_lro::Poller<crate::model::BackupPolicy, crate::model::OperationMetadata>
5886        {
5887            type Operation = google_cloud_lro::internal::Operation<
5888                crate::model::BackupPolicy,
5889                crate::model::OperationMetadata,
5890            >;
5891            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5892            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5893
5894            let stub = self.0.stub.clone();
5895            let mut options = self.0.options.clone();
5896            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5897            let query = move |name| {
5898                let stub = stub.clone();
5899                let options = options.clone();
5900                async {
5901                    let op = GetOperation::new(stub)
5902                        .set_name(name)
5903                        .with_options(options)
5904                        .send()
5905                        .await?;
5906                    Ok(Operation::new(op))
5907                }
5908            };
5909
5910            let start = move || async {
5911                let op = self.send().await?;
5912                Ok(Operation::new(op))
5913            };
5914
5915            google_cloud_lro::internal::new_poller(
5916                polling_error_policy,
5917                polling_backoff_policy,
5918                start,
5919                query,
5920            )
5921        }
5922
5923        /// Sets the value of [parent][crate::model::CreateBackupPolicyRequest::parent].
5924        ///
5925        /// This is a **required** field for requests.
5926        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5927            self.0.request.parent = v.into();
5928            self
5929        }
5930
5931        /// Sets the value of [backup_policy][crate::model::CreateBackupPolicyRequest::backup_policy].
5932        ///
5933        /// This is a **required** field for requests.
5934        pub fn set_backup_policy<T>(mut self, v: T) -> Self
5935        where
5936            T: std::convert::Into<crate::model::BackupPolicy>,
5937        {
5938            self.0.request.backup_policy = std::option::Option::Some(v.into());
5939            self
5940        }
5941
5942        /// Sets or clears the value of [backup_policy][crate::model::CreateBackupPolicyRequest::backup_policy].
5943        ///
5944        /// This is a **required** field for requests.
5945        pub fn set_or_clear_backup_policy<T>(mut self, v: std::option::Option<T>) -> Self
5946        where
5947            T: std::convert::Into<crate::model::BackupPolicy>,
5948        {
5949            self.0.request.backup_policy = v.map(|x| x.into());
5950            self
5951        }
5952
5953        /// Sets the value of [backup_policy_id][crate::model::CreateBackupPolicyRequest::backup_policy_id].
5954        ///
5955        /// This is a **required** field for requests.
5956        pub fn set_backup_policy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5957            self.0.request.backup_policy_id = v.into();
5958            self
5959        }
5960    }
5961
5962    #[doc(hidden)]
5963    impl crate::RequestBuilder for CreateBackupPolicy {
5964        fn request_options(&mut self) -> &mut crate::RequestOptions {
5965            &mut self.0.options
5966        }
5967    }
5968
5969    /// The request builder for [NetApp::get_backup_policy][crate::client::NetApp::get_backup_policy] calls.
5970    ///
5971    /// # Example
5972    /// ```
5973    /// # use google_cloud_netapp_v1::builder::net_app::GetBackupPolicy;
5974    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
5975    ///
5976    /// let builder = prepare_request_builder();
5977    /// let response = builder.send().await?;
5978    /// # Ok(()) }
5979    ///
5980    /// fn prepare_request_builder() -> GetBackupPolicy {
5981    ///   # panic!();
5982    ///   // ... details omitted ...
5983    /// }
5984    /// ```
5985    #[derive(Clone, Debug)]
5986    pub struct GetBackupPolicy(RequestBuilder<crate::model::GetBackupPolicyRequest>);
5987
5988    impl GetBackupPolicy {
5989        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
5990            Self(RequestBuilder::new(stub))
5991        }
5992
5993        /// Sets the full request, replacing any prior values.
5994        pub fn with_request<V: Into<crate::model::GetBackupPolicyRequest>>(mut self, v: V) -> Self {
5995            self.0.request = v.into();
5996            self
5997        }
5998
5999        /// Sets all the options, replacing any prior values.
6000        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6001            self.0.options = v.into();
6002            self
6003        }
6004
6005        /// Sends the request.
6006        pub async fn send(self) -> Result<crate::model::BackupPolicy> {
6007            (*self.0.stub)
6008                .get_backup_policy(self.0.request, self.0.options)
6009                .await
6010                .map(crate::Response::into_body)
6011        }
6012
6013        /// Sets the value of [name][crate::model::GetBackupPolicyRequest::name].
6014        ///
6015        /// This is a **required** field for requests.
6016        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6017            self.0.request.name = v.into();
6018            self
6019        }
6020    }
6021
6022    #[doc(hidden)]
6023    impl crate::RequestBuilder for GetBackupPolicy {
6024        fn request_options(&mut self) -> &mut crate::RequestOptions {
6025            &mut self.0.options
6026        }
6027    }
6028
6029    /// The request builder for [NetApp::list_backup_policies][crate::client::NetApp::list_backup_policies] calls.
6030    ///
6031    /// # Example
6032    /// ```
6033    /// # use google_cloud_netapp_v1::builder::net_app::ListBackupPolicies;
6034    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6035    /// use google_cloud_gax::paginator::ItemPaginator;
6036    ///
6037    /// let builder = prepare_request_builder();
6038    /// let mut items = builder.by_item();
6039    /// while let Some(result) = items.next().await {
6040    ///   let item = result?;
6041    /// }
6042    /// # Ok(()) }
6043    ///
6044    /// fn prepare_request_builder() -> ListBackupPolicies {
6045    ///   # panic!();
6046    ///   // ... details omitted ...
6047    /// }
6048    /// ```
6049    #[derive(Clone, Debug)]
6050    pub struct ListBackupPolicies(RequestBuilder<crate::model::ListBackupPoliciesRequest>);
6051
6052    impl ListBackupPolicies {
6053        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6054            Self(RequestBuilder::new(stub))
6055        }
6056
6057        /// Sets the full request, replacing any prior values.
6058        pub fn with_request<V: Into<crate::model::ListBackupPoliciesRequest>>(
6059            mut self,
6060            v: V,
6061        ) -> Self {
6062            self.0.request = v.into();
6063            self
6064        }
6065
6066        /// Sets all the options, replacing any prior values.
6067        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6068            self.0.options = v.into();
6069            self
6070        }
6071
6072        /// Sends the request.
6073        pub async fn send(self) -> Result<crate::model::ListBackupPoliciesResponse> {
6074            (*self.0.stub)
6075                .list_backup_policies(self.0.request, self.0.options)
6076                .await
6077                .map(crate::Response::into_body)
6078        }
6079
6080        /// Streams each page in the collection.
6081        pub fn by_page(
6082            self,
6083        ) -> impl google_cloud_gax::paginator::Paginator<
6084            crate::model::ListBackupPoliciesResponse,
6085            crate::Error,
6086        > {
6087            use std::clone::Clone;
6088            let token = self.0.request.page_token.clone();
6089            let execute = move |token: String| {
6090                let mut builder = self.clone();
6091                builder.0.request = builder.0.request.set_page_token(token);
6092                builder.send()
6093            };
6094            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6095        }
6096
6097        /// Streams each item in the collection.
6098        pub fn by_item(
6099            self,
6100        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6101            crate::model::ListBackupPoliciesResponse,
6102            crate::Error,
6103        > {
6104            use google_cloud_gax::paginator::Paginator;
6105            self.by_page().items()
6106        }
6107
6108        /// Sets the value of [parent][crate::model::ListBackupPoliciesRequest::parent].
6109        ///
6110        /// This is a **required** field for requests.
6111        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6112            self.0.request.parent = v.into();
6113            self
6114        }
6115
6116        /// Sets the value of [page_size][crate::model::ListBackupPoliciesRequest::page_size].
6117        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6118            self.0.request.page_size = v.into();
6119            self
6120        }
6121
6122        /// Sets the value of [page_token][crate::model::ListBackupPoliciesRequest::page_token].
6123        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6124            self.0.request.page_token = v.into();
6125            self
6126        }
6127
6128        /// Sets the value of [filter][crate::model::ListBackupPoliciesRequest::filter].
6129        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6130            self.0.request.filter = v.into();
6131            self
6132        }
6133
6134        /// Sets the value of [order_by][crate::model::ListBackupPoliciesRequest::order_by].
6135        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6136            self.0.request.order_by = v.into();
6137            self
6138        }
6139    }
6140
6141    #[doc(hidden)]
6142    impl crate::RequestBuilder for ListBackupPolicies {
6143        fn request_options(&mut self) -> &mut crate::RequestOptions {
6144            &mut self.0.options
6145        }
6146    }
6147
6148    /// The request builder for [NetApp::update_backup_policy][crate::client::NetApp::update_backup_policy] calls.
6149    ///
6150    /// # Example
6151    /// ```
6152    /// # use google_cloud_netapp_v1::builder::net_app::UpdateBackupPolicy;
6153    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6154    /// use google_cloud_lro::Poller;
6155    ///
6156    /// let builder = prepare_request_builder();
6157    /// let response = builder.poller().until_done().await?;
6158    /// # Ok(()) }
6159    ///
6160    /// fn prepare_request_builder() -> UpdateBackupPolicy {
6161    ///   # panic!();
6162    ///   // ... details omitted ...
6163    /// }
6164    /// ```
6165    #[derive(Clone, Debug)]
6166    pub struct UpdateBackupPolicy(RequestBuilder<crate::model::UpdateBackupPolicyRequest>);
6167
6168    impl UpdateBackupPolicy {
6169        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6170            Self(RequestBuilder::new(stub))
6171        }
6172
6173        /// Sets the full request, replacing any prior values.
6174        pub fn with_request<V: Into<crate::model::UpdateBackupPolicyRequest>>(
6175            mut self,
6176            v: V,
6177        ) -> Self {
6178            self.0.request = v.into();
6179            self
6180        }
6181
6182        /// Sets all the options, replacing any prior values.
6183        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6184            self.0.options = v.into();
6185            self
6186        }
6187
6188        /// Sends the request.
6189        ///
6190        /// # Long running operations
6191        ///
6192        /// This starts, but does not poll, a longrunning operation. More information
6193        /// on [update_backup_policy][crate::client::NetApp::update_backup_policy].
6194        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6195            (*self.0.stub)
6196                .update_backup_policy(self.0.request, self.0.options)
6197                .await
6198                .map(crate::Response::into_body)
6199        }
6200
6201        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_backup_policy`.
6202        pub fn poller(
6203            self,
6204        ) -> impl google_cloud_lro::Poller<crate::model::BackupPolicy, crate::model::OperationMetadata>
6205        {
6206            type Operation = google_cloud_lro::internal::Operation<
6207                crate::model::BackupPolicy,
6208                crate::model::OperationMetadata,
6209            >;
6210            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6211            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6212
6213            let stub = self.0.stub.clone();
6214            let mut options = self.0.options.clone();
6215            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6216            let query = move |name| {
6217                let stub = stub.clone();
6218                let options = options.clone();
6219                async {
6220                    let op = GetOperation::new(stub)
6221                        .set_name(name)
6222                        .with_options(options)
6223                        .send()
6224                        .await?;
6225                    Ok(Operation::new(op))
6226                }
6227            };
6228
6229            let start = move || async {
6230                let op = self.send().await?;
6231                Ok(Operation::new(op))
6232            };
6233
6234            google_cloud_lro::internal::new_poller(
6235                polling_error_policy,
6236                polling_backoff_policy,
6237                start,
6238                query,
6239            )
6240        }
6241
6242        /// Sets the value of [update_mask][crate::model::UpdateBackupPolicyRequest::update_mask].
6243        ///
6244        /// This is a **required** field for requests.
6245        pub fn set_update_mask<T>(mut self, v: T) -> Self
6246        where
6247            T: std::convert::Into<wkt::FieldMask>,
6248        {
6249            self.0.request.update_mask = std::option::Option::Some(v.into());
6250            self
6251        }
6252
6253        /// Sets or clears the value of [update_mask][crate::model::UpdateBackupPolicyRequest::update_mask].
6254        ///
6255        /// This is a **required** field for requests.
6256        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6257        where
6258            T: std::convert::Into<wkt::FieldMask>,
6259        {
6260            self.0.request.update_mask = v.map(|x| x.into());
6261            self
6262        }
6263
6264        /// Sets the value of [backup_policy][crate::model::UpdateBackupPolicyRequest::backup_policy].
6265        ///
6266        /// This is a **required** field for requests.
6267        pub fn set_backup_policy<T>(mut self, v: T) -> Self
6268        where
6269            T: std::convert::Into<crate::model::BackupPolicy>,
6270        {
6271            self.0.request.backup_policy = std::option::Option::Some(v.into());
6272            self
6273        }
6274
6275        /// Sets or clears the value of [backup_policy][crate::model::UpdateBackupPolicyRequest::backup_policy].
6276        ///
6277        /// This is a **required** field for requests.
6278        pub fn set_or_clear_backup_policy<T>(mut self, v: std::option::Option<T>) -> Self
6279        where
6280            T: std::convert::Into<crate::model::BackupPolicy>,
6281        {
6282            self.0.request.backup_policy = v.map(|x| x.into());
6283            self
6284        }
6285    }
6286
6287    #[doc(hidden)]
6288    impl crate::RequestBuilder for UpdateBackupPolicy {
6289        fn request_options(&mut self) -> &mut crate::RequestOptions {
6290            &mut self.0.options
6291        }
6292    }
6293
6294    /// The request builder for [NetApp::delete_backup_policy][crate::client::NetApp::delete_backup_policy] calls.
6295    ///
6296    /// # Example
6297    /// ```
6298    /// # use google_cloud_netapp_v1::builder::net_app::DeleteBackupPolicy;
6299    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6300    /// use google_cloud_lro::Poller;
6301    ///
6302    /// let builder = prepare_request_builder();
6303    /// let response = builder.poller().until_done().await?;
6304    /// # Ok(()) }
6305    ///
6306    /// fn prepare_request_builder() -> DeleteBackupPolicy {
6307    ///   # panic!();
6308    ///   // ... details omitted ...
6309    /// }
6310    /// ```
6311    #[derive(Clone, Debug)]
6312    pub struct DeleteBackupPolicy(RequestBuilder<crate::model::DeleteBackupPolicyRequest>);
6313
6314    impl DeleteBackupPolicy {
6315        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6316            Self(RequestBuilder::new(stub))
6317        }
6318
6319        /// Sets the full request, replacing any prior values.
6320        pub fn with_request<V: Into<crate::model::DeleteBackupPolicyRequest>>(
6321            mut self,
6322            v: V,
6323        ) -> Self {
6324            self.0.request = v.into();
6325            self
6326        }
6327
6328        /// Sets all the options, replacing any prior values.
6329        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6330            self.0.options = v.into();
6331            self
6332        }
6333
6334        /// Sends the request.
6335        ///
6336        /// # Long running operations
6337        ///
6338        /// This starts, but does not poll, a longrunning operation. More information
6339        /// on [delete_backup_policy][crate::client::NetApp::delete_backup_policy].
6340        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6341            (*self.0.stub)
6342                .delete_backup_policy(self.0.request, self.0.options)
6343                .await
6344                .map(crate::Response::into_body)
6345        }
6346
6347        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_backup_policy`.
6348        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6349            type Operation =
6350                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6351            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6352            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6353
6354            let stub = self.0.stub.clone();
6355            let mut options = self.0.options.clone();
6356            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6357            let query = move |name| {
6358                let stub = stub.clone();
6359                let options = options.clone();
6360                async {
6361                    let op = GetOperation::new(stub)
6362                        .set_name(name)
6363                        .with_options(options)
6364                        .send()
6365                        .await?;
6366                    Ok(Operation::new(op))
6367                }
6368            };
6369
6370            let start = move || async {
6371                let op = self.send().await?;
6372                Ok(Operation::new(op))
6373            };
6374
6375            google_cloud_lro::internal::new_unit_response_poller(
6376                polling_error_policy,
6377                polling_backoff_policy,
6378                start,
6379                query,
6380            )
6381        }
6382
6383        /// Sets the value of [name][crate::model::DeleteBackupPolicyRequest::name].
6384        ///
6385        /// This is a **required** field for requests.
6386        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6387            self.0.request.name = v.into();
6388            self
6389        }
6390    }
6391
6392    #[doc(hidden)]
6393    impl crate::RequestBuilder for DeleteBackupPolicy {
6394        fn request_options(&mut self) -> &mut crate::RequestOptions {
6395            &mut self.0.options
6396        }
6397    }
6398
6399    /// The request builder for [NetApp::list_quota_rules][crate::client::NetApp::list_quota_rules] calls.
6400    ///
6401    /// # Example
6402    /// ```
6403    /// # use google_cloud_netapp_v1::builder::net_app::ListQuotaRules;
6404    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6405    /// use google_cloud_gax::paginator::ItemPaginator;
6406    ///
6407    /// let builder = prepare_request_builder();
6408    /// let mut items = builder.by_item();
6409    /// while let Some(result) = items.next().await {
6410    ///   let item = result?;
6411    /// }
6412    /// # Ok(()) }
6413    ///
6414    /// fn prepare_request_builder() -> ListQuotaRules {
6415    ///   # panic!();
6416    ///   // ... details omitted ...
6417    /// }
6418    /// ```
6419    #[derive(Clone, Debug)]
6420    pub struct ListQuotaRules(RequestBuilder<crate::model::ListQuotaRulesRequest>);
6421
6422    impl ListQuotaRules {
6423        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6424            Self(RequestBuilder::new(stub))
6425        }
6426
6427        /// Sets the full request, replacing any prior values.
6428        pub fn with_request<V: Into<crate::model::ListQuotaRulesRequest>>(mut self, v: V) -> Self {
6429            self.0.request = v.into();
6430            self
6431        }
6432
6433        /// Sets all the options, replacing any prior values.
6434        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6435            self.0.options = v.into();
6436            self
6437        }
6438
6439        /// Sends the request.
6440        pub async fn send(self) -> Result<crate::model::ListQuotaRulesResponse> {
6441            (*self.0.stub)
6442                .list_quota_rules(self.0.request, self.0.options)
6443                .await
6444                .map(crate::Response::into_body)
6445        }
6446
6447        /// Streams each page in the collection.
6448        pub fn by_page(
6449            self,
6450        ) -> impl google_cloud_gax::paginator::Paginator<
6451            crate::model::ListQuotaRulesResponse,
6452            crate::Error,
6453        > {
6454            use std::clone::Clone;
6455            let token = self.0.request.page_token.clone();
6456            let execute = move |token: String| {
6457                let mut builder = self.clone();
6458                builder.0.request = builder.0.request.set_page_token(token);
6459                builder.send()
6460            };
6461            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6462        }
6463
6464        /// Streams each item in the collection.
6465        pub fn by_item(
6466            self,
6467        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6468            crate::model::ListQuotaRulesResponse,
6469            crate::Error,
6470        > {
6471            use google_cloud_gax::paginator::Paginator;
6472            self.by_page().items()
6473        }
6474
6475        /// Sets the value of [parent][crate::model::ListQuotaRulesRequest::parent].
6476        ///
6477        /// This is a **required** field for requests.
6478        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6479            self.0.request.parent = v.into();
6480            self
6481        }
6482
6483        /// Sets the value of [page_size][crate::model::ListQuotaRulesRequest::page_size].
6484        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6485            self.0.request.page_size = v.into();
6486            self
6487        }
6488
6489        /// Sets the value of [page_token][crate::model::ListQuotaRulesRequest::page_token].
6490        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6491            self.0.request.page_token = v.into();
6492            self
6493        }
6494
6495        /// Sets the value of [filter][crate::model::ListQuotaRulesRequest::filter].
6496        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6497            self.0.request.filter = v.into();
6498            self
6499        }
6500
6501        /// Sets the value of [order_by][crate::model::ListQuotaRulesRequest::order_by].
6502        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6503            self.0.request.order_by = v.into();
6504            self
6505        }
6506    }
6507
6508    #[doc(hidden)]
6509    impl crate::RequestBuilder for ListQuotaRules {
6510        fn request_options(&mut self) -> &mut crate::RequestOptions {
6511            &mut self.0.options
6512        }
6513    }
6514
6515    /// The request builder for [NetApp::get_quota_rule][crate::client::NetApp::get_quota_rule] calls.
6516    ///
6517    /// # Example
6518    /// ```
6519    /// # use google_cloud_netapp_v1::builder::net_app::GetQuotaRule;
6520    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6521    ///
6522    /// let builder = prepare_request_builder();
6523    /// let response = builder.send().await?;
6524    /// # Ok(()) }
6525    ///
6526    /// fn prepare_request_builder() -> GetQuotaRule {
6527    ///   # panic!();
6528    ///   // ... details omitted ...
6529    /// }
6530    /// ```
6531    #[derive(Clone, Debug)]
6532    pub struct GetQuotaRule(RequestBuilder<crate::model::GetQuotaRuleRequest>);
6533
6534    impl GetQuotaRule {
6535        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6536            Self(RequestBuilder::new(stub))
6537        }
6538
6539        /// Sets the full request, replacing any prior values.
6540        pub fn with_request<V: Into<crate::model::GetQuotaRuleRequest>>(mut self, v: V) -> Self {
6541            self.0.request = v.into();
6542            self
6543        }
6544
6545        /// Sets all the options, replacing any prior values.
6546        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6547            self.0.options = v.into();
6548            self
6549        }
6550
6551        /// Sends the request.
6552        pub async fn send(self) -> Result<crate::model::QuotaRule> {
6553            (*self.0.stub)
6554                .get_quota_rule(self.0.request, self.0.options)
6555                .await
6556                .map(crate::Response::into_body)
6557        }
6558
6559        /// Sets the value of [name][crate::model::GetQuotaRuleRequest::name].
6560        ///
6561        /// This is a **required** field for requests.
6562        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6563            self.0.request.name = v.into();
6564            self
6565        }
6566    }
6567
6568    #[doc(hidden)]
6569    impl crate::RequestBuilder for GetQuotaRule {
6570        fn request_options(&mut self) -> &mut crate::RequestOptions {
6571            &mut self.0.options
6572        }
6573    }
6574
6575    /// The request builder for [NetApp::create_quota_rule][crate::client::NetApp::create_quota_rule] calls.
6576    ///
6577    /// # Example
6578    /// ```
6579    /// # use google_cloud_netapp_v1::builder::net_app::CreateQuotaRule;
6580    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6581    /// use google_cloud_lro::Poller;
6582    ///
6583    /// let builder = prepare_request_builder();
6584    /// let response = builder.poller().until_done().await?;
6585    /// # Ok(()) }
6586    ///
6587    /// fn prepare_request_builder() -> CreateQuotaRule {
6588    ///   # panic!();
6589    ///   // ... details omitted ...
6590    /// }
6591    /// ```
6592    #[derive(Clone, Debug)]
6593    pub struct CreateQuotaRule(RequestBuilder<crate::model::CreateQuotaRuleRequest>);
6594
6595    impl CreateQuotaRule {
6596        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6597            Self(RequestBuilder::new(stub))
6598        }
6599
6600        /// Sets the full request, replacing any prior values.
6601        pub fn with_request<V: Into<crate::model::CreateQuotaRuleRequest>>(mut self, v: V) -> Self {
6602            self.0.request = v.into();
6603            self
6604        }
6605
6606        /// Sets all the options, replacing any prior values.
6607        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6608            self.0.options = v.into();
6609            self
6610        }
6611
6612        /// Sends the request.
6613        ///
6614        /// # Long running operations
6615        ///
6616        /// This starts, but does not poll, a longrunning operation. More information
6617        /// on [create_quota_rule][crate::client::NetApp::create_quota_rule].
6618        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6619            (*self.0.stub)
6620                .create_quota_rule(self.0.request, self.0.options)
6621                .await
6622                .map(crate::Response::into_body)
6623        }
6624
6625        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_quota_rule`.
6626        pub fn poller(
6627            self,
6628        ) -> impl google_cloud_lro::Poller<crate::model::QuotaRule, crate::model::OperationMetadata>
6629        {
6630            type Operation = google_cloud_lro::internal::Operation<
6631                crate::model::QuotaRule,
6632                crate::model::OperationMetadata,
6633            >;
6634            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6635            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6636
6637            let stub = self.0.stub.clone();
6638            let mut options = self.0.options.clone();
6639            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6640            let query = move |name| {
6641                let stub = stub.clone();
6642                let options = options.clone();
6643                async {
6644                    let op = GetOperation::new(stub)
6645                        .set_name(name)
6646                        .with_options(options)
6647                        .send()
6648                        .await?;
6649                    Ok(Operation::new(op))
6650                }
6651            };
6652
6653            let start = move || async {
6654                let op = self.send().await?;
6655                Ok(Operation::new(op))
6656            };
6657
6658            google_cloud_lro::internal::new_poller(
6659                polling_error_policy,
6660                polling_backoff_policy,
6661                start,
6662                query,
6663            )
6664        }
6665
6666        /// Sets the value of [parent][crate::model::CreateQuotaRuleRequest::parent].
6667        ///
6668        /// This is a **required** field for requests.
6669        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6670            self.0.request.parent = v.into();
6671            self
6672        }
6673
6674        /// Sets the value of [quota_rule][crate::model::CreateQuotaRuleRequest::quota_rule].
6675        ///
6676        /// This is a **required** field for requests.
6677        pub fn set_quota_rule<T>(mut self, v: T) -> Self
6678        where
6679            T: std::convert::Into<crate::model::QuotaRule>,
6680        {
6681            self.0.request.quota_rule = std::option::Option::Some(v.into());
6682            self
6683        }
6684
6685        /// Sets or clears the value of [quota_rule][crate::model::CreateQuotaRuleRequest::quota_rule].
6686        ///
6687        /// This is a **required** field for requests.
6688        pub fn set_or_clear_quota_rule<T>(mut self, v: std::option::Option<T>) -> Self
6689        where
6690            T: std::convert::Into<crate::model::QuotaRule>,
6691        {
6692            self.0.request.quota_rule = v.map(|x| x.into());
6693            self
6694        }
6695
6696        /// Sets the value of [quota_rule_id][crate::model::CreateQuotaRuleRequest::quota_rule_id].
6697        ///
6698        /// This is a **required** field for requests.
6699        pub fn set_quota_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6700            self.0.request.quota_rule_id = v.into();
6701            self
6702        }
6703    }
6704
6705    #[doc(hidden)]
6706    impl crate::RequestBuilder for CreateQuotaRule {
6707        fn request_options(&mut self) -> &mut crate::RequestOptions {
6708            &mut self.0.options
6709        }
6710    }
6711
6712    /// The request builder for [NetApp::update_quota_rule][crate::client::NetApp::update_quota_rule] calls.
6713    ///
6714    /// # Example
6715    /// ```
6716    /// # use google_cloud_netapp_v1::builder::net_app::UpdateQuotaRule;
6717    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6718    /// use google_cloud_lro::Poller;
6719    ///
6720    /// let builder = prepare_request_builder();
6721    /// let response = builder.poller().until_done().await?;
6722    /// # Ok(()) }
6723    ///
6724    /// fn prepare_request_builder() -> UpdateQuotaRule {
6725    ///   # panic!();
6726    ///   // ... details omitted ...
6727    /// }
6728    /// ```
6729    #[derive(Clone, Debug)]
6730    pub struct UpdateQuotaRule(RequestBuilder<crate::model::UpdateQuotaRuleRequest>);
6731
6732    impl UpdateQuotaRule {
6733        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6734            Self(RequestBuilder::new(stub))
6735        }
6736
6737        /// Sets the full request, replacing any prior values.
6738        pub fn with_request<V: Into<crate::model::UpdateQuotaRuleRequest>>(mut self, v: V) -> Self {
6739            self.0.request = v.into();
6740            self
6741        }
6742
6743        /// Sets all the options, replacing any prior values.
6744        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6745            self.0.options = v.into();
6746            self
6747        }
6748
6749        /// Sends the request.
6750        ///
6751        /// # Long running operations
6752        ///
6753        /// This starts, but does not poll, a longrunning operation. More information
6754        /// on [update_quota_rule][crate::client::NetApp::update_quota_rule].
6755        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6756            (*self.0.stub)
6757                .update_quota_rule(self.0.request, self.0.options)
6758                .await
6759                .map(crate::Response::into_body)
6760        }
6761
6762        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_quota_rule`.
6763        pub fn poller(
6764            self,
6765        ) -> impl google_cloud_lro::Poller<crate::model::QuotaRule, crate::model::OperationMetadata>
6766        {
6767            type Operation = google_cloud_lro::internal::Operation<
6768                crate::model::QuotaRule,
6769                crate::model::OperationMetadata,
6770            >;
6771            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6772            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6773
6774            let stub = self.0.stub.clone();
6775            let mut options = self.0.options.clone();
6776            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6777            let query = move |name| {
6778                let stub = stub.clone();
6779                let options = options.clone();
6780                async {
6781                    let op = GetOperation::new(stub)
6782                        .set_name(name)
6783                        .with_options(options)
6784                        .send()
6785                        .await?;
6786                    Ok(Operation::new(op))
6787                }
6788            };
6789
6790            let start = move || async {
6791                let op = self.send().await?;
6792                Ok(Operation::new(op))
6793            };
6794
6795            google_cloud_lro::internal::new_poller(
6796                polling_error_policy,
6797                polling_backoff_policy,
6798                start,
6799                query,
6800            )
6801        }
6802
6803        /// Sets the value of [update_mask][crate::model::UpdateQuotaRuleRequest::update_mask].
6804        pub fn set_update_mask<T>(mut self, v: T) -> Self
6805        where
6806            T: std::convert::Into<wkt::FieldMask>,
6807        {
6808            self.0.request.update_mask = std::option::Option::Some(v.into());
6809            self
6810        }
6811
6812        /// Sets or clears the value of [update_mask][crate::model::UpdateQuotaRuleRequest::update_mask].
6813        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6814        where
6815            T: std::convert::Into<wkt::FieldMask>,
6816        {
6817            self.0.request.update_mask = v.map(|x| x.into());
6818            self
6819        }
6820
6821        /// Sets the value of [quota_rule][crate::model::UpdateQuotaRuleRequest::quota_rule].
6822        ///
6823        /// This is a **required** field for requests.
6824        pub fn set_quota_rule<T>(mut self, v: T) -> Self
6825        where
6826            T: std::convert::Into<crate::model::QuotaRule>,
6827        {
6828            self.0.request.quota_rule = std::option::Option::Some(v.into());
6829            self
6830        }
6831
6832        /// Sets or clears the value of [quota_rule][crate::model::UpdateQuotaRuleRequest::quota_rule].
6833        ///
6834        /// This is a **required** field for requests.
6835        pub fn set_or_clear_quota_rule<T>(mut self, v: std::option::Option<T>) -> Self
6836        where
6837            T: std::convert::Into<crate::model::QuotaRule>,
6838        {
6839            self.0.request.quota_rule = v.map(|x| x.into());
6840            self
6841        }
6842    }
6843
6844    #[doc(hidden)]
6845    impl crate::RequestBuilder for UpdateQuotaRule {
6846        fn request_options(&mut self) -> &mut crate::RequestOptions {
6847            &mut self.0.options
6848        }
6849    }
6850
6851    /// The request builder for [NetApp::delete_quota_rule][crate::client::NetApp::delete_quota_rule] calls.
6852    ///
6853    /// # Example
6854    /// ```
6855    /// # use google_cloud_netapp_v1::builder::net_app::DeleteQuotaRule;
6856    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6857    /// use google_cloud_lro::Poller;
6858    ///
6859    /// let builder = prepare_request_builder();
6860    /// let response = builder.poller().until_done().await?;
6861    /// # Ok(()) }
6862    ///
6863    /// fn prepare_request_builder() -> DeleteQuotaRule {
6864    ///   # panic!();
6865    ///   // ... details omitted ...
6866    /// }
6867    /// ```
6868    #[derive(Clone, Debug)]
6869    pub struct DeleteQuotaRule(RequestBuilder<crate::model::DeleteQuotaRuleRequest>);
6870
6871    impl DeleteQuotaRule {
6872        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6873            Self(RequestBuilder::new(stub))
6874        }
6875
6876        /// Sets the full request, replacing any prior values.
6877        pub fn with_request<V: Into<crate::model::DeleteQuotaRuleRequest>>(mut self, v: V) -> Self {
6878            self.0.request = v.into();
6879            self
6880        }
6881
6882        /// Sets all the options, replacing any prior values.
6883        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6884            self.0.options = v.into();
6885            self
6886        }
6887
6888        /// Sends the request.
6889        ///
6890        /// # Long running operations
6891        ///
6892        /// This starts, but does not poll, a longrunning operation. More information
6893        /// on [delete_quota_rule][crate::client::NetApp::delete_quota_rule].
6894        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6895            (*self.0.stub)
6896                .delete_quota_rule(self.0.request, self.0.options)
6897                .await
6898                .map(crate::Response::into_body)
6899        }
6900
6901        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_quota_rule`.
6902        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6903            type Operation =
6904                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6905            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6906            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6907
6908            let stub = self.0.stub.clone();
6909            let mut options = self.0.options.clone();
6910            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6911            let query = move |name| {
6912                let stub = stub.clone();
6913                let options = options.clone();
6914                async {
6915                    let op = GetOperation::new(stub)
6916                        .set_name(name)
6917                        .with_options(options)
6918                        .send()
6919                        .await?;
6920                    Ok(Operation::new(op))
6921                }
6922            };
6923
6924            let start = move || async {
6925                let op = self.send().await?;
6926                Ok(Operation::new(op))
6927            };
6928
6929            google_cloud_lro::internal::new_unit_response_poller(
6930                polling_error_policy,
6931                polling_backoff_policy,
6932                start,
6933                query,
6934            )
6935        }
6936
6937        /// Sets the value of [name][crate::model::DeleteQuotaRuleRequest::name].
6938        ///
6939        /// This is a **required** field for requests.
6940        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6941            self.0.request.name = v.into();
6942            self
6943        }
6944    }
6945
6946    #[doc(hidden)]
6947    impl crate::RequestBuilder for DeleteQuotaRule {
6948        fn request_options(&mut self) -> &mut crate::RequestOptions {
6949            &mut self.0.options
6950        }
6951    }
6952
6953    /// The request builder for [NetApp::restore_backup_files][crate::client::NetApp::restore_backup_files] calls.
6954    ///
6955    /// # Example
6956    /// ```
6957    /// # use google_cloud_netapp_v1::builder::net_app::RestoreBackupFiles;
6958    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
6959    /// use google_cloud_lro::Poller;
6960    ///
6961    /// let builder = prepare_request_builder();
6962    /// let response = builder.poller().until_done().await?;
6963    /// # Ok(()) }
6964    ///
6965    /// fn prepare_request_builder() -> RestoreBackupFiles {
6966    ///   # panic!();
6967    ///   // ... details omitted ...
6968    /// }
6969    /// ```
6970    #[derive(Clone, Debug)]
6971    pub struct RestoreBackupFiles(RequestBuilder<crate::model::RestoreBackupFilesRequest>);
6972
6973    impl RestoreBackupFiles {
6974        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
6975            Self(RequestBuilder::new(stub))
6976        }
6977
6978        /// Sets the full request, replacing any prior values.
6979        pub fn with_request<V: Into<crate::model::RestoreBackupFilesRequest>>(
6980            mut self,
6981            v: V,
6982        ) -> Self {
6983            self.0.request = v.into();
6984            self
6985        }
6986
6987        /// Sets all the options, replacing any prior values.
6988        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6989            self.0.options = v.into();
6990            self
6991        }
6992
6993        /// Sends the request.
6994        ///
6995        /// # Long running operations
6996        ///
6997        /// This starts, but does not poll, a longrunning operation. More information
6998        /// on [restore_backup_files][crate::client::NetApp::restore_backup_files].
6999        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7000            (*self.0.stub)
7001                .restore_backup_files(self.0.request, self.0.options)
7002                .await
7003                .map(crate::Response::into_body)
7004        }
7005
7006        /// Creates a [Poller][google_cloud_lro::Poller] to work with `restore_backup_files`.
7007        pub fn poller(
7008            self,
7009        ) -> impl google_cloud_lro::Poller<
7010            crate::model::RestoreBackupFilesResponse,
7011            crate::model::OperationMetadata,
7012        > {
7013            type Operation = google_cloud_lro::internal::Operation<
7014                crate::model::RestoreBackupFilesResponse,
7015                crate::model::OperationMetadata,
7016            >;
7017            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7018            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7019
7020            let stub = self.0.stub.clone();
7021            let mut options = self.0.options.clone();
7022            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7023            let query = move |name| {
7024                let stub = stub.clone();
7025                let options = options.clone();
7026                async {
7027                    let op = GetOperation::new(stub)
7028                        .set_name(name)
7029                        .with_options(options)
7030                        .send()
7031                        .await?;
7032                    Ok(Operation::new(op))
7033                }
7034            };
7035
7036            let start = move || async {
7037                let op = self.send().await?;
7038                Ok(Operation::new(op))
7039            };
7040
7041            google_cloud_lro::internal::new_poller(
7042                polling_error_policy,
7043                polling_backoff_policy,
7044                start,
7045                query,
7046            )
7047        }
7048
7049        /// Sets the value of [name][crate::model::RestoreBackupFilesRequest::name].
7050        ///
7051        /// This is a **required** field for requests.
7052        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7053            self.0.request.name = v.into();
7054            self
7055        }
7056
7057        /// Sets the value of [backup][crate::model::RestoreBackupFilesRequest::backup].
7058        ///
7059        /// This is a **required** field for requests.
7060        pub fn set_backup<T: Into<std::string::String>>(mut self, v: T) -> Self {
7061            self.0.request.backup = v.into();
7062            self
7063        }
7064
7065        /// Sets the value of [file_list][crate::model::RestoreBackupFilesRequest::file_list].
7066        ///
7067        /// This is a **required** field for requests.
7068        pub fn set_file_list<T, V>(mut self, v: T) -> Self
7069        where
7070            T: std::iter::IntoIterator<Item = V>,
7071            V: std::convert::Into<std::string::String>,
7072        {
7073            use std::iter::Iterator;
7074            self.0.request.file_list = v.into_iter().map(|i| i.into()).collect();
7075            self
7076        }
7077
7078        /// Sets the value of [restore_destination_path][crate::model::RestoreBackupFilesRequest::restore_destination_path].
7079        pub fn set_restore_destination_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
7080            self.0.request.restore_destination_path = v.into();
7081            self
7082        }
7083    }
7084
7085    #[doc(hidden)]
7086    impl crate::RequestBuilder for RestoreBackupFiles {
7087        fn request_options(&mut self) -> &mut crate::RequestOptions {
7088            &mut self.0.options
7089        }
7090    }
7091
7092    /// The request builder for [NetApp::list_host_groups][crate::client::NetApp::list_host_groups] calls.
7093    ///
7094    /// # Example
7095    /// ```
7096    /// # use google_cloud_netapp_v1::builder::net_app::ListHostGroups;
7097    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7098    /// use google_cloud_gax::paginator::ItemPaginator;
7099    ///
7100    /// let builder = prepare_request_builder();
7101    /// let mut items = builder.by_item();
7102    /// while let Some(result) = items.next().await {
7103    ///   let item = result?;
7104    /// }
7105    /// # Ok(()) }
7106    ///
7107    /// fn prepare_request_builder() -> ListHostGroups {
7108    ///   # panic!();
7109    ///   // ... details omitted ...
7110    /// }
7111    /// ```
7112    #[derive(Clone, Debug)]
7113    pub struct ListHostGroups(RequestBuilder<crate::model::ListHostGroupsRequest>);
7114
7115    impl ListHostGroups {
7116        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7117            Self(RequestBuilder::new(stub))
7118        }
7119
7120        /// Sets the full request, replacing any prior values.
7121        pub fn with_request<V: Into<crate::model::ListHostGroupsRequest>>(mut self, v: V) -> Self {
7122            self.0.request = v.into();
7123            self
7124        }
7125
7126        /// Sets all the options, replacing any prior values.
7127        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7128            self.0.options = v.into();
7129            self
7130        }
7131
7132        /// Sends the request.
7133        pub async fn send(self) -> Result<crate::model::ListHostGroupsResponse> {
7134            (*self.0.stub)
7135                .list_host_groups(self.0.request, self.0.options)
7136                .await
7137                .map(crate::Response::into_body)
7138        }
7139
7140        /// Streams each page in the collection.
7141        pub fn by_page(
7142            self,
7143        ) -> impl google_cloud_gax::paginator::Paginator<
7144            crate::model::ListHostGroupsResponse,
7145            crate::Error,
7146        > {
7147            use std::clone::Clone;
7148            let token = self.0.request.page_token.clone();
7149            let execute = move |token: String| {
7150                let mut builder = self.clone();
7151                builder.0.request = builder.0.request.set_page_token(token);
7152                builder.send()
7153            };
7154            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7155        }
7156
7157        /// Streams each item in the collection.
7158        pub fn by_item(
7159            self,
7160        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7161            crate::model::ListHostGroupsResponse,
7162            crate::Error,
7163        > {
7164            use google_cloud_gax::paginator::Paginator;
7165            self.by_page().items()
7166        }
7167
7168        /// Sets the value of [parent][crate::model::ListHostGroupsRequest::parent].
7169        ///
7170        /// This is a **required** field for requests.
7171        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7172            self.0.request.parent = v.into();
7173            self
7174        }
7175
7176        /// Sets the value of [page_size][crate::model::ListHostGroupsRequest::page_size].
7177        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7178            self.0.request.page_size = v.into();
7179            self
7180        }
7181
7182        /// Sets the value of [page_token][crate::model::ListHostGroupsRequest::page_token].
7183        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7184            self.0.request.page_token = v.into();
7185            self
7186        }
7187
7188        /// Sets the value of [filter][crate::model::ListHostGroupsRequest::filter].
7189        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7190            self.0.request.filter = v.into();
7191            self
7192        }
7193
7194        /// Sets the value of [order_by][crate::model::ListHostGroupsRequest::order_by].
7195        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7196            self.0.request.order_by = v.into();
7197            self
7198        }
7199    }
7200
7201    #[doc(hidden)]
7202    impl crate::RequestBuilder for ListHostGroups {
7203        fn request_options(&mut self) -> &mut crate::RequestOptions {
7204            &mut self.0.options
7205        }
7206    }
7207
7208    /// The request builder for [NetApp::get_host_group][crate::client::NetApp::get_host_group] calls.
7209    ///
7210    /// # Example
7211    /// ```
7212    /// # use google_cloud_netapp_v1::builder::net_app::GetHostGroup;
7213    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7214    ///
7215    /// let builder = prepare_request_builder();
7216    /// let response = builder.send().await?;
7217    /// # Ok(()) }
7218    ///
7219    /// fn prepare_request_builder() -> GetHostGroup {
7220    ///   # panic!();
7221    ///   // ... details omitted ...
7222    /// }
7223    /// ```
7224    #[derive(Clone, Debug)]
7225    pub struct GetHostGroup(RequestBuilder<crate::model::GetHostGroupRequest>);
7226
7227    impl GetHostGroup {
7228        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7229            Self(RequestBuilder::new(stub))
7230        }
7231
7232        /// Sets the full request, replacing any prior values.
7233        pub fn with_request<V: Into<crate::model::GetHostGroupRequest>>(mut self, v: V) -> Self {
7234            self.0.request = v.into();
7235            self
7236        }
7237
7238        /// Sets all the options, replacing any prior values.
7239        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7240            self.0.options = v.into();
7241            self
7242        }
7243
7244        /// Sends the request.
7245        pub async fn send(self) -> Result<crate::model::HostGroup> {
7246            (*self.0.stub)
7247                .get_host_group(self.0.request, self.0.options)
7248                .await
7249                .map(crate::Response::into_body)
7250        }
7251
7252        /// Sets the value of [name][crate::model::GetHostGroupRequest::name].
7253        ///
7254        /// This is a **required** field for requests.
7255        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7256            self.0.request.name = v.into();
7257            self
7258        }
7259    }
7260
7261    #[doc(hidden)]
7262    impl crate::RequestBuilder for GetHostGroup {
7263        fn request_options(&mut self) -> &mut crate::RequestOptions {
7264            &mut self.0.options
7265        }
7266    }
7267
7268    /// The request builder for [NetApp::create_host_group][crate::client::NetApp::create_host_group] calls.
7269    ///
7270    /// # Example
7271    /// ```
7272    /// # use google_cloud_netapp_v1::builder::net_app::CreateHostGroup;
7273    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7274    /// use google_cloud_lro::Poller;
7275    ///
7276    /// let builder = prepare_request_builder();
7277    /// let response = builder.poller().until_done().await?;
7278    /// # Ok(()) }
7279    ///
7280    /// fn prepare_request_builder() -> CreateHostGroup {
7281    ///   # panic!();
7282    ///   // ... details omitted ...
7283    /// }
7284    /// ```
7285    #[derive(Clone, Debug)]
7286    pub struct CreateHostGroup(RequestBuilder<crate::model::CreateHostGroupRequest>);
7287
7288    impl CreateHostGroup {
7289        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7290            Self(RequestBuilder::new(stub))
7291        }
7292
7293        /// Sets the full request, replacing any prior values.
7294        pub fn with_request<V: Into<crate::model::CreateHostGroupRequest>>(mut self, v: V) -> Self {
7295            self.0.request = v.into();
7296            self
7297        }
7298
7299        /// Sets all the options, replacing any prior values.
7300        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7301            self.0.options = v.into();
7302            self
7303        }
7304
7305        /// Sends the request.
7306        ///
7307        /// # Long running operations
7308        ///
7309        /// This starts, but does not poll, a longrunning operation. More information
7310        /// on [create_host_group][crate::client::NetApp::create_host_group].
7311        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7312            (*self.0.stub)
7313                .create_host_group(self.0.request, self.0.options)
7314                .await
7315                .map(crate::Response::into_body)
7316        }
7317
7318        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_host_group`.
7319        pub fn poller(
7320            self,
7321        ) -> impl google_cloud_lro::Poller<crate::model::HostGroup, crate::model::OperationMetadata>
7322        {
7323            type Operation = google_cloud_lro::internal::Operation<
7324                crate::model::HostGroup,
7325                crate::model::OperationMetadata,
7326            >;
7327            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7328            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7329
7330            let stub = self.0.stub.clone();
7331            let mut options = self.0.options.clone();
7332            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7333            let query = move |name| {
7334                let stub = stub.clone();
7335                let options = options.clone();
7336                async {
7337                    let op = GetOperation::new(stub)
7338                        .set_name(name)
7339                        .with_options(options)
7340                        .send()
7341                        .await?;
7342                    Ok(Operation::new(op))
7343                }
7344            };
7345
7346            let start = move || async {
7347                let op = self.send().await?;
7348                Ok(Operation::new(op))
7349            };
7350
7351            google_cloud_lro::internal::new_poller(
7352                polling_error_policy,
7353                polling_backoff_policy,
7354                start,
7355                query,
7356            )
7357        }
7358
7359        /// Sets the value of [parent][crate::model::CreateHostGroupRequest::parent].
7360        ///
7361        /// This is a **required** field for requests.
7362        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7363            self.0.request.parent = v.into();
7364            self
7365        }
7366
7367        /// Sets the value of [host_group][crate::model::CreateHostGroupRequest::host_group].
7368        ///
7369        /// This is a **required** field for requests.
7370        pub fn set_host_group<T>(mut self, v: T) -> Self
7371        where
7372            T: std::convert::Into<crate::model::HostGroup>,
7373        {
7374            self.0.request.host_group = std::option::Option::Some(v.into());
7375            self
7376        }
7377
7378        /// Sets or clears the value of [host_group][crate::model::CreateHostGroupRequest::host_group].
7379        ///
7380        /// This is a **required** field for requests.
7381        pub fn set_or_clear_host_group<T>(mut self, v: std::option::Option<T>) -> Self
7382        where
7383            T: std::convert::Into<crate::model::HostGroup>,
7384        {
7385            self.0.request.host_group = v.map(|x| x.into());
7386            self
7387        }
7388
7389        /// Sets the value of [host_group_id][crate::model::CreateHostGroupRequest::host_group_id].
7390        ///
7391        /// This is a **required** field for requests.
7392        pub fn set_host_group_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7393            self.0.request.host_group_id = v.into();
7394            self
7395        }
7396    }
7397
7398    #[doc(hidden)]
7399    impl crate::RequestBuilder for CreateHostGroup {
7400        fn request_options(&mut self) -> &mut crate::RequestOptions {
7401            &mut self.0.options
7402        }
7403    }
7404
7405    /// The request builder for [NetApp::update_host_group][crate::client::NetApp::update_host_group] calls.
7406    ///
7407    /// # Example
7408    /// ```
7409    /// # use google_cloud_netapp_v1::builder::net_app::UpdateHostGroup;
7410    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7411    /// use google_cloud_lro::Poller;
7412    ///
7413    /// let builder = prepare_request_builder();
7414    /// let response = builder.poller().until_done().await?;
7415    /// # Ok(()) }
7416    ///
7417    /// fn prepare_request_builder() -> UpdateHostGroup {
7418    ///   # panic!();
7419    ///   // ... details omitted ...
7420    /// }
7421    /// ```
7422    #[derive(Clone, Debug)]
7423    pub struct UpdateHostGroup(RequestBuilder<crate::model::UpdateHostGroupRequest>);
7424
7425    impl UpdateHostGroup {
7426        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7427            Self(RequestBuilder::new(stub))
7428        }
7429
7430        /// Sets the full request, replacing any prior values.
7431        pub fn with_request<V: Into<crate::model::UpdateHostGroupRequest>>(mut self, v: V) -> Self {
7432            self.0.request = v.into();
7433            self
7434        }
7435
7436        /// Sets all the options, replacing any prior values.
7437        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7438            self.0.options = v.into();
7439            self
7440        }
7441
7442        /// Sends the request.
7443        ///
7444        /// # Long running operations
7445        ///
7446        /// This starts, but does not poll, a longrunning operation. More information
7447        /// on [update_host_group][crate::client::NetApp::update_host_group].
7448        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7449            (*self.0.stub)
7450                .update_host_group(self.0.request, self.0.options)
7451                .await
7452                .map(crate::Response::into_body)
7453        }
7454
7455        /// Creates a [Poller][google_cloud_lro::Poller] to work with `update_host_group`.
7456        pub fn poller(
7457            self,
7458        ) -> impl google_cloud_lro::Poller<crate::model::HostGroup, crate::model::OperationMetadata>
7459        {
7460            type Operation = google_cloud_lro::internal::Operation<
7461                crate::model::HostGroup,
7462                crate::model::OperationMetadata,
7463            >;
7464            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7465            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7466
7467            let stub = self.0.stub.clone();
7468            let mut options = self.0.options.clone();
7469            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7470            let query = move |name| {
7471                let stub = stub.clone();
7472                let options = options.clone();
7473                async {
7474                    let op = GetOperation::new(stub)
7475                        .set_name(name)
7476                        .with_options(options)
7477                        .send()
7478                        .await?;
7479                    Ok(Operation::new(op))
7480                }
7481            };
7482
7483            let start = move || async {
7484                let op = self.send().await?;
7485                Ok(Operation::new(op))
7486            };
7487
7488            google_cloud_lro::internal::new_poller(
7489                polling_error_policy,
7490                polling_backoff_policy,
7491                start,
7492                query,
7493            )
7494        }
7495
7496        /// Sets the value of [host_group][crate::model::UpdateHostGroupRequest::host_group].
7497        ///
7498        /// This is a **required** field for requests.
7499        pub fn set_host_group<T>(mut self, v: T) -> Self
7500        where
7501            T: std::convert::Into<crate::model::HostGroup>,
7502        {
7503            self.0.request.host_group = std::option::Option::Some(v.into());
7504            self
7505        }
7506
7507        /// Sets or clears the value of [host_group][crate::model::UpdateHostGroupRequest::host_group].
7508        ///
7509        /// This is a **required** field for requests.
7510        pub fn set_or_clear_host_group<T>(mut self, v: std::option::Option<T>) -> Self
7511        where
7512            T: std::convert::Into<crate::model::HostGroup>,
7513        {
7514            self.0.request.host_group = v.map(|x| x.into());
7515            self
7516        }
7517
7518        /// Sets the value of [update_mask][crate::model::UpdateHostGroupRequest::update_mask].
7519        pub fn set_update_mask<T>(mut self, v: T) -> Self
7520        where
7521            T: std::convert::Into<wkt::FieldMask>,
7522        {
7523            self.0.request.update_mask = std::option::Option::Some(v.into());
7524            self
7525        }
7526
7527        /// Sets or clears the value of [update_mask][crate::model::UpdateHostGroupRequest::update_mask].
7528        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7529        where
7530            T: std::convert::Into<wkt::FieldMask>,
7531        {
7532            self.0.request.update_mask = v.map(|x| x.into());
7533            self
7534        }
7535    }
7536
7537    #[doc(hidden)]
7538    impl crate::RequestBuilder for UpdateHostGroup {
7539        fn request_options(&mut self) -> &mut crate::RequestOptions {
7540            &mut self.0.options
7541        }
7542    }
7543
7544    /// The request builder for [NetApp::delete_host_group][crate::client::NetApp::delete_host_group] calls.
7545    ///
7546    /// # Example
7547    /// ```
7548    /// # use google_cloud_netapp_v1::builder::net_app::DeleteHostGroup;
7549    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7550    /// use google_cloud_lro::Poller;
7551    ///
7552    /// let builder = prepare_request_builder();
7553    /// let response = builder.poller().until_done().await?;
7554    /// # Ok(()) }
7555    ///
7556    /// fn prepare_request_builder() -> DeleteHostGroup {
7557    ///   # panic!();
7558    ///   // ... details omitted ...
7559    /// }
7560    /// ```
7561    #[derive(Clone, Debug)]
7562    pub struct DeleteHostGroup(RequestBuilder<crate::model::DeleteHostGroupRequest>);
7563
7564    impl DeleteHostGroup {
7565        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7566            Self(RequestBuilder::new(stub))
7567        }
7568
7569        /// Sets the full request, replacing any prior values.
7570        pub fn with_request<V: Into<crate::model::DeleteHostGroupRequest>>(mut self, v: V) -> Self {
7571            self.0.request = v.into();
7572            self
7573        }
7574
7575        /// Sets all the options, replacing any prior values.
7576        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7577            self.0.options = v.into();
7578            self
7579        }
7580
7581        /// Sends the request.
7582        ///
7583        /// # Long running operations
7584        ///
7585        /// This starts, but does not poll, a longrunning operation. More information
7586        /// on [delete_host_group][crate::client::NetApp::delete_host_group].
7587        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7588            (*self.0.stub)
7589                .delete_host_group(self.0.request, self.0.options)
7590                .await
7591                .map(crate::Response::into_body)
7592        }
7593
7594        /// Creates a [Poller][google_cloud_lro::Poller] to work with `delete_host_group`.
7595        pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7596            type Operation =
7597                google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7598            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7599            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7600
7601            let stub = self.0.stub.clone();
7602            let mut options = self.0.options.clone();
7603            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7604            let query = move |name| {
7605                let stub = stub.clone();
7606                let options = options.clone();
7607                async {
7608                    let op = GetOperation::new(stub)
7609                        .set_name(name)
7610                        .with_options(options)
7611                        .send()
7612                        .await?;
7613                    Ok(Operation::new(op))
7614                }
7615            };
7616
7617            let start = move || async {
7618                let op = self.send().await?;
7619                Ok(Operation::new(op))
7620            };
7621
7622            google_cloud_lro::internal::new_unit_response_poller(
7623                polling_error_policy,
7624                polling_backoff_policy,
7625                start,
7626                query,
7627            )
7628        }
7629
7630        /// Sets the value of [name][crate::model::DeleteHostGroupRequest::name].
7631        ///
7632        /// This is a **required** field for requests.
7633        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7634            self.0.request.name = v.into();
7635            self
7636        }
7637    }
7638
7639    #[doc(hidden)]
7640    impl crate::RequestBuilder for DeleteHostGroup {
7641        fn request_options(&mut self) -> &mut crate::RequestOptions {
7642            &mut self.0.options
7643        }
7644    }
7645
7646    /// The request builder for [NetApp::execute_ontap_post][crate::client::NetApp::execute_ontap_post] calls.
7647    ///
7648    /// # Example
7649    /// ```
7650    /// # use google_cloud_netapp_v1::builder::net_app::ExecuteOntapPost;
7651    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7652    ///
7653    /// let builder = prepare_request_builder();
7654    /// let response = builder.send().await?;
7655    /// # Ok(()) }
7656    ///
7657    /// fn prepare_request_builder() -> ExecuteOntapPost {
7658    ///   # panic!();
7659    ///   // ... details omitted ...
7660    /// }
7661    /// ```
7662    #[derive(Clone, Debug)]
7663    pub struct ExecuteOntapPost(RequestBuilder<crate::model::ExecuteOntapPostRequest>);
7664
7665    impl ExecuteOntapPost {
7666        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7667            Self(RequestBuilder::new(stub))
7668        }
7669
7670        /// Sets the full request, replacing any prior values.
7671        pub fn with_request<V: Into<crate::model::ExecuteOntapPostRequest>>(
7672            mut self,
7673            v: V,
7674        ) -> Self {
7675            self.0.request = v.into();
7676            self
7677        }
7678
7679        /// Sets all the options, replacing any prior values.
7680        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7681            self.0.options = v.into();
7682            self
7683        }
7684
7685        /// Sends the request.
7686        pub async fn send(self) -> Result<crate::model::ExecuteOntapPostResponse> {
7687            (*self.0.stub)
7688                .execute_ontap_post(self.0.request, self.0.options)
7689                .await
7690                .map(crate::Response::into_body)
7691        }
7692
7693        /// Sets the value of [body][crate::model::ExecuteOntapPostRequest::body].
7694        ///
7695        /// This is a **required** field for requests.
7696        pub fn set_body<T>(mut self, v: T) -> Self
7697        where
7698            T: std::convert::Into<wkt::Struct>,
7699        {
7700            self.0.request.body = std::option::Option::Some(v.into());
7701            self
7702        }
7703
7704        /// Sets or clears the value of [body][crate::model::ExecuteOntapPostRequest::body].
7705        ///
7706        /// This is a **required** field for requests.
7707        pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
7708        where
7709            T: std::convert::Into<wkt::Struct>,
7710        {
7711            self.0.request.body = v.map(|x| x.into());
7712            self
7713        }
7714
7715        /// Sets the value of [ontap_path][crate::model::ExecuteOntapPostRequest::ontap_path].
7716        ///
7717        /// This is a **required** field for requests.
7718        pub fn set_ontap_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
7719            self.0.request.ontap_path = v.into();
7720            self
7721        }
7722    }
7723
7724    #[doc(hidden)]
7725    impl crate::RequestBuilder for ExecuteOntapPost {
7726        fn request_options(&mut self) -> &mut crate::RequestOptions {
7727            &mut self.0.options
7728        }
7729    }
7730
7731    /// The request builder for [NetApp::execute_ontap_get][crate::client::NetApp::execute_ontap_get] calls.
7732    ///
7733    /// # Example
7734    /// ```
7735    /// # use google_cloud_netapp_v1::builder::net_app::ExecuteOntapGet;
7736    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7737    ///
7738    /// let builder = prepare_request_builder();
7739    /// let response = builder.send().await?;
7740    /// # Ok(()) }
7741    ///
7742    /// fn prepare_request_builder() -> ExecuteOntapGet {
7743    ///   # panic!();
7744    ///   // ... details omitted ...
7745    /// }
7746    /// ```
7747    #[derive(Clone, Debug)]
7748    pub struct ExecuteOntapGet(RequestBuilder<crate::model::ExecuteOntapGetRequest>);
7749
7750    impl ExecuteOntapGet {
7751        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7752            Self(RequestBuilder::new(stub))
7753        }
7754
7755        /// Sets the full request, replacing any prior values.
7756        pub fn with_request<V: Into<crate::model::ExecuteOntapGetRequest>>(mut self, v: V) -> Self {
7757            self.0.request = v.into();
7758            self
7759        }
7760
7761        /// Sets all the options, replacing any prior values.
7762        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7763            self.0.options = v.into();
7764            self
7765        }
7766
7767        /// Sends the request.
7768        pub async fn send(self) -> Result<crate::model::ExecuteOntapGetResponse> {
7769            (*self.0.stub)
7770                .execute_ontap_get(self.0.request, self.0.options)
7771                .await
7772                .map(crate::Response::into_body)
7773        }
7774
7775        /// Sets the value of [ontap_path][crate::model::ExecuteOntapGetRequest::ontap_path].
7776        ///
7777        /// This is a **required** field for requests.
7778        pub fn set_ontap_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
7779            self.0.request.ontap_path = v.into();
7780            self
7781        }
7782    }
7783
7784    #[doc(hidden)]
7785    impl crate::RequestBuilder for ExecuteOntapGet {
7786        fn request_options(&mut self) -> &mut crate::RequestOptions {
7787            &mut self.0.options
7788        }
7789    }
7790
7791    /// The request builder for [NetApp::execute_ontap_delete][crate::client::NetApp::execute_ontap_delete] calls.
7792    ///
7793    /// # Example
7794    /// ```
7795    /// # use google_cloud_netapp_v1::builder::net_app::ExecuteOntapDelete;
7796    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7797    ///
7798    /// let builder = prepare_request_builder();
7799    /// let response = builder.send().await?;
7800    /// # Ok(()) }
7801    ///
7802    /// fn prepare_request_builder() -> ExecuteOntapDelete {
7803    ///   # panic!();
7804    ///   // ... details omitted ...
7805    /// }
7806    /// ```
7807    #[derive(Clone, Debug)]
7808    pub struct ExecuteOntapDelete(RequestBuilder<crate::model::ExecuteOntapDeleteRequest>);
7809
7810    impl ExecuteOntapDelete {
7811        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7812            Self(RequestBuilder::new(stub))
7813        }
7814
7815        /// Sets the full request, replacing any prior values.
7816        pub fn with_request<V: Into<crate::model::ExecuteOntapDeleteRequest>>(
7817            mut self,
7818            v: V,
7819        ) -> Self {
7820            self.0.request = v.into();
7821            self
7822        }
7823
7824        /// Sets all the options, replacing any prior values.
7825        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7826            self.0.options = v.into();
7827            self
7828        }
7829
7830        /// Sends the request.
7831        pub async fn send(self) -> Result<crate::model::ExecuteOntapDeleteResponse> {
7832            (*self.0.stub)
7833                .execute_ontap_delete(self.0.request, self.0.options)
7834                .await
7835                .map(crate::Response::into_body)
7836        }
7837
7838        /// Sets the value of [ontap_path][crate::model::ExecuteOntapDeleteRequest::ontap_path].
7839        ///
7840        /// This is a **required** field for requests.
7841        pub fn set_ontap_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
7842            self.0.request.ontap_path = v.into();
7843            self
7844        }
7845    }
7846
7847    #[doc(hidden)]
7848    impl crate::RequestBuilder for ExecuteOntapDelete {
7849        fn request_options(&mut self) -> &mut crate::RequestOptions {
7850            &mut self.0.options
7851        }
7852    }
7853
7854    /// The request builder for [NetApp::execute_ontap_patch][crate::client::NetApp::execute_ontap_patch] calls.
7855    ///
7856    /// # Example
7857    /// ```
7858    /// # use google_cloud_netapp_v1::builder::net_app::ExecuteOntapPatch;
7859    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7860    ///
7861    /// let builder = prepare_request_builder();
7862    /// let response = builder.send().await?;
7863    /// # Ok(()) }
7864    ///
7865    /// fn prepare_request_builder() -> ExecuteOntapPatch {
7866    ///   # panic!();
7867    ///   // ... details omitted ...
7868    /// }
7869    /// ```
7870    #[derive(Clone, Debug)]
7871    pub struct ExecuteOntapPatch(RequestBuilder<crate::model::ExecuteOntapPatchRequest>);
7872
7873    impl ExecuteOntapPatch {
7874        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7875            Self(RequestBuilder::new(stub))
7876        }
7877
7878        /// Sets the full request, replacing any prior values.
7879        pub fn with_request<V: Into<crate::model::ExecuteOntapPatchRequest>>(
7880            mut self,
7881            v: V,
7882        ) -> Self {
7883            self.0.request = v.into();
7884            self
7885        }
7886
7887        /// Sets all the options, replacing any prior values.
7888        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7889            self.0.options = v.into();
7890            self
7891        }
7892
7893        /// Sends the request.
7894        pub async fn send(self) -> Result<crate::model::ExecuteOntapPatchResponse> {
7895            (*self.0.stub)
7896                .execute_ontap_patch(self.0.request, self.0.options)
7897                .await
7898                .map(crate::Response::into_body)
7899        }
7900
7901        /// Sets the value of [body][crate::model::ExecuteOntapPatchRequest::body].
7902        ///
7903        /// This is a **required** field for requests.
7904        pub fn set_body<T>(mut self, v: T) -> Self
7905        where
7906            T: std::convert::Into<wkt::Struct>,
7907        {
7908            self.0.request.body = std::option::Option::Some(v.into());
7909            self
7910        }
7911
7912        /// Sets or clears the value of [body][crate::model::ExecuteOntapPatchRequest::body].
7913        ///
7914        /// This is a **required** field for requests.
7915        pub fn set_or_clear_body<T>(mut self, v: std::option::Option<T>) -> Self
7916        where
7917            T: std::convert::Into<wkt::Struct>,
7918        {
7919            self.0.request.body = v.map(|x| x.into());
7920            self
7921        }
7922
7923        /// Sets the value of [ontap_path][crate::model::ExecuteOntapPatchRequest::ontap_path].
7924        ///
7925        /// This is a **required** field for requests.
7926        pub fn set_ontap_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
7927            self.0.request.ontap_path = v.into();
7928            self
7929        }
7930    }
7931
7932    #[doc(hidden)]
7933    impl crate::RequestBuilder for ExecuteOntapPatch {
7934        fn request_options(&mut self) -> &mut crate::RequestOptions {
7935            &mut self.0.options
7936        }
7937    }
7938
7939    /// The request builder for [NetApp::list_locations][crate::client::NetApp::list_locations] calls.
7940    ///
7941    /// # Example
7942    /// ```
7943    /// # use google_cloud_netapp_v1::builder::net_app::ListLocations;
7944    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
7945    /// use google_cloud_gax::paginator::ItemPaginator;
7946    ///
7947    /// let builder = prepare_request_builder();
7948    /// let mut items = builder.by_item();
7949    /// while let Some(result) = items.next().await {
7950    ///   let item = result?;
7951    /// }
7952    /// # Ok(()) }
7953    ///
7954    /// fn prepare_request_builder() -> ListLocations {
7955    ///   # panic!();
7956    ///   // ... details omitted ...
7957    /// }
7958    /// ```
7959    #[derive(Clone, Debug)]
7960    pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
7961
7962    impl ListLocations {
7963        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
7964            Self(RequestBuilder::new(stub))
7965        }
7966
7967        /// Sets the full request, replacing any prior values.
7968        pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
7969            mut self,
7970            v: V,
7971        ) -> Self {
7972            self.0.request = v.into();
7973            self
7974        }
7975
7976        /// Sets all the options, replacing any prior values.
7977        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7978            self.0.options = v.into();
7979            self
7980        }
7981
7982        /// Sends the request.
7983        pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
7984            (*self.0.stub)
7985                .list_locations(self.0.request, self.0.options)
7986                .await
7987                .map(crate::Response::into_body)
7988        }
7989
7990        /// Streams each page in the collection.
7991        pub fn by_page(
7992            self,
7993        ) -> impl google_cloud_gax::paginator::Paginator<
7994            google_cloud_location::model::ListLocationsResponse,
7995            crate::Error,
7996        > {
7997            use std::clone::Clone;
7998            let token = self.0.request.page_token.clone();
7999            let execute = move |token: String| {
8000                let mut builder = self.clone();
8001                builder.0.request = builder.0.request.set_page_token(token);
8002                builder.send()
8003            };
8004            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8005        }
8006
8007        /// Streams each item in the collection.
8008        pub fn by_item(
8009            self,
8010        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8011            google_cloud_location::model::ListLocationsResponse,
8012            crate::Error,
8013        > {
8014            use google_cloud_gax::paginator::Paginator;
8015            self.by_page().items()
8016        }
8017
8018        /// Sets the value of [name][google_cloud_location::model::ListLocationsRequest::name].
8019        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8020            self.0.request.name = v.into();
8021            self
8022        }
8023
8024        /// Sets the value of [filter][google_cloud_location::model::ListLocationsRequest::filter].
8025        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8026            self.0.request.filter = v.into();
8027            self
8028        }
8029
8030        /// Sets the value of [page_size][google_cloud_location::model::ListLocationsRequest::page_size].
8031        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8032            self.0.request.page_size = v.into();
8033            self
8034        }
8035
8036        /// Sets the value of [page_token][google_cloud_location::model::ListLocationsRequest::page_token].
8037        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8038            self.0.request.page_token = v.into();
8039            self
8040        }
8041    }
8042
8043    #[doc(hidden)]
8044    impl crate::RequestBuilder for ListLocations {
8045        fn request_options(&mut self) -> &mut crate::RequestOptions {
8046            &mut self.0.options
8047        }
8048    }
8049
8050    /// The request builder for [NetApp::get_location][crate::client::NetApp::get_location] calls.
8051    ///
8052    /// # Example
8053    /// ```
8054    /// # use google_cloud_netapp_v1::builder::net_app::GetLocation;
8055    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
8056    ///
8057    /// let builder = prepare_request_builder();
8058    /// let response = builder.send().await?;
8059    /// # Ok(()) }
8060    ///
8061    /// fn prepare_request_builder() -> GetLocation {
8062    ///   # panic!();
8063    ///   // ... details omitted ...
8064    /// }
8065    /// ```
8066    #[derive(Clone, Debug)]
8067    pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8068
8069    impl GetLocation {
8070        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8071            Self(RequestBuilder::new(stub))
8072        }
8073
8074        /// Sets the full request, replacing any prior values.
8075        pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8076            mut self,
8077            v: V,
8078        ) -> Self {
8079            self.0.request = v.into();
8080            self
8081        }
8082
8083        /// Sets all the options, replacing any prior values.
8084        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8085            self.0.options = v.into();
8086            self
8087        }
8088
8089        /// Sends the request.
8090        pub async fn send(self) -> Result<google_cloud_location::model::Location> {
8091            (*self.0.stub)
8092                .get_location(self.0.request, self.0.options)
8093                .await
8094                .map(crate::Response::into_body)
8095        }
8096
8097        /// Sets the value of [name][google_cloud_location::model::GetLocationRequest::name].
8098        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8099            self.0.request.name = v.into();
8100            self
8101        }
8102    }
8103
8104    #[doc(hidden)]
8105    impl crate::RequestBuilder for GetLocation {
8106        fn request_options(&mut self) -> &mut crate::RequestOptions {
8107            &mut self.0.options
8108        }
8109    }
8110
8111    /// The request builder for [NetApp::list_operations][crate::client::NetApp::list_operations] calls.
8112    ///
8113    /// # Example
8114    /// ```
8115    /// # use google_cloud_netapp_v1::builder::net_app::ListOperations;
8116    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
8117    /// use google_cloud_gax::paginator::ItemPaginator;
8118    ///
8119    /// let builder = prepare_request_builder();
8120    /// let mut items = builder.by_item();
8121    /// while let Some(result) = items.next().await {
8122    ///   let item = result?;
8123    /// }
8124    /// # Ok(()) }
8125    ///
8126    /// fn prepare_request_builder() -> ListOperations {
8127    ///   # panic!();
8128    ///   // ... details omitted ...
8129    /// }
8130    /// ```
8131    #[derive(Clone, Debug)]
8132    pub struct ListOperations(
8133        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
8134    );
8135
8136    impl ListOperations {
8137        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8138            Self(RequestBuilder::new(stub))
8139        }
8140
8141        /// Sets the full request, replacing any prior values.
8142        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
8143            mut self,
8144            v: V,
8145        ) -> Self {
8146            self.0.request = v.into();
8147            self
8148        }
8149
8150        /// Sets all the options, replacing any prior values.
8151        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8152            self.0.options = v.into();
8153            self
8154        }
8155
8156        /// Sends the request.
8157        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
8158            (*self.0.stub)
8159                .list_operations(self.0.request, self.0.options)
8160                .await
8161                .map(crate::Response::into_body)
8162        }
8163
8164        /// Streams each page in the collection.
8165        pub fn by_page(
8166            self,
8167        ) -> impl google_cloud_gax::paginator::Paginator<
8168            google_cloud_longrunning::model::ListOperationsResponse,
8169            crate::Error,
8170        > {
8171            use std::clone::Clone;
8172            let token = self.0.request.page_token.clone();
8173            let execute = move |token: String| {
8174                let mut builder = self.clone();
8175                builder.0.request = builder.0.request.set_page_token(token);
8176                builder.send()
8177            };
8178            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8179        }
8180
8181        /// Streams each item in the collection.
8182        pub fn by_item(
8183            self,
8184        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8185            google_cloud_longrunning::model::ListOperationsResponse,
8186            crate::Error,
8187        > {
8188            use google_cloud_gax::paginator::Paginator;
8189            self.by_page().items()
8190        }
8191
8192        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
8193        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8194            self.0.request.name = v.into();
8195            self
8196        }
8197
8198        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
8199        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8200            self.0.request.filter = v.into();
8201            self
8202        }
8203
8204        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
8205        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8206            self.0.request.page_size = v.into();
8207            self
8208        }
8209
8210        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
8211        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8212            self.0.request.page_token = v.into();
8213            self
8214        }
8215
8216        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
8217        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8218            self.0.request.return_partial_success = v.into();
8219            self
8220        }
8221    }
8222
8223    #[doc(hidden)]
8224    impl crate::RequestBuilder for ListOperations {
8225        fn request_options(&mut self) -> &mut crate::RequestOptions {
8226            &mut self.0.options
8227        }
8228    }
8229
8230    /// The request builder for [NetApp::get_operation][crate::client::NetApp::get_operation] calls.
8231    ///
8232    /// # Example
8233    /// ```
8234    /// # use google_cloud_netapp_v1::builder::net_app::GetOperation;
8235    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
8236    ///
8237    /// let builder = prepare_request_builder();
8238    /// let response = builder.send().await?;
8239    /// # Ok(()) }
8240    ///
8241    /// fn prepare_request_builder() -> GetOperation {
8242    ///   # panic!();
8243    ///   // ... details omitted ...
8244    /// }
8245    /// ```
8246    #[derive(Clone, Debug)]
8247    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
8248
8249    impl GetOperation {
8250        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8251            Self(RequestBuilder::new(stub))
8252        }
8253
8254        /// Sets the full request, replacing any prior values.
8255        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
8256            mut self,
8257            v: V,
8258        ) -> Self {
8259            self.0.request = v.into();
8260            self
8261        }
8262
8263        /// Sets all the options, replacing any prior values.
8264        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8265            self.0.options = v.into();
8266            self
8267        }
8268
8269        /// Sends the request.
8270        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8271            (*self.0.stub)
8272                .get_operation(self.0.request, self.0.options)
8273                .await
8274                .map(crate::Response::into_body)
8275        }
8276
8277        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
8278        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8279            self.0.request.name = v.into();
8280            self
8281        }
8282    }
8283
8284    #[doc(hidden)]
8285    impl crate::RequestBuilder for GetOperation {
8286        fn request_options(&mut self) -> &mut crate::RequestOptions {
8287            &mut self.0.options
8288        }
8289    }
8290
8291    /// The request builder for [NetApp::delete_operation][crate::client::NetApp::delete_operation] calls.
8292    ///
8293    /// # Example
8294    /// ```
8295    /// # use google_cloud_netapp_v1::builder::net_app::DeleteOperation;
8296    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
8297    ///
8298    /// let builder = prepare_request_builder();
8299    /// let response = builder.send().await?;
8300    /// # Ok(()) }
8301    ///
8302    /// fn prepare_request_builder() -> DeleteOperation {
8303    ///   # panic!();
8304    ///   // ... details omitted ...
8305    /// }
8306    /// ```
8307    #[derive(Clone, Debug)]
8308    pub struct DeleteOperation(
8309        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
8310    );
8311
8312    impl DeleteOperation {
8313        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8314            Self(RequestBuilder::new(stub))
8315        }
8316
8317        /// Sets the full request, replacing any prior values.
8318        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
8319            mut self,
8320            v: V,
8321        ) -> Self {
8322            self.0.request = v.into();
8323            self
8324        }
8325
8326        /// Sets all the options, replacing any prior values.
8327        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8328            self.0.options = v.into();
8329            self
8330        }
8331
8332        /// Sends the request.
8333        pub async fn send(self) -> Result<()> {
8334            (*self.0.stub)
8335                .delete_operation(self.0.request, self.0.options)
8336                .await
8337                .map(crate::Response::into_body)
8338        }
8339
8340        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
8341        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8342            self.0.request.name = v.into();
8343            self
8344        }
8345    }
8346
8347    #[doc(hidden)]
8348    impl crate::RequestBuilder for DeleteOperation {
8349        fn request_options(&mut self) -> &mut crate::RequestOptions {
8350            &mut self.0.options
8351        }
8352    }
8353
8354    /// The request builder for [NetApp::cancel_operation][crate::client::NetApp::cancel_operation] calls.
8355    ///
8356    /// # Example
8357    /// ```
8358    /// # use google_cloud_netapp_v1::builder::net_app::CancelOperation;
8359    /// # async fn sample() -> google_cloud_netapp_v1::Result<()> {
8360    ///
8361    /// let builder = prepare_request_builder();
8362    /// let response = builder.send().await?;
8363    /// # Ok(()) }
8364    ///
8365    /// fn prepare_request_builder() -> CancelOperation {
8366    ///   # panic!();
8367    ///   // ... details omitted ...
8368    /// }
8369    /// ```
8370    #[derive(Clone, Debug)]
8371    pub struct CancelOperation(
8372        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
8373    );
8374
8375    impl CancelOperation {
8376        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::NetApp>) -> Self {
8377            Self(RequestBuilder::new(stub))
8378        }
8379
8380        /// Sets the full request, replacing any prior values.
8381        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
8382            mut self,
8383            v: V,
8384        ) -> Self {
8385            self.0.request = v.into();
8386            self
8387        }
8388
8389        /// Sets all the options, replacing any prior values.
8390        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8391            self.0.options = v.into();
8392            self
8393        }
8394
8395        /// Sends the request.
8396        pub async fn send(self) -> Result<()> {
8397            (*self.0.stub)
8398                .cancel_operation(self.0.request, self.0.options)
8399                .await
8400                .map(crate::Response::into_body)
8401        }
8402
8403        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
8404        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8405            self.0.request.name = v.into();
8406            self
8407        }
8408    }
8409
8410    #[doc(hidden)]
8411    impl crate::RequestBuilder for CancelOperation {
8412        fn request_options(&mut self) -> &mut crate::RequestOptions {
8413            &mut self.0.options
8414        }
8415    }
8416}