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